UNPKG

3.04 MBJavaScriptView Raw
1/******/ (function(modules) { // webpackBootstrap
2/******/ // The module cache
3/******/ var installedModules = {};
4
5/******/ // The require function
6/******/ function __webpack_require__(moduleId) {
7
8/******/ // Check if module is in cache
9/******/ if(installedModules[moduleId])
10/******/ return installedModules[moduleId].exports;
11
12/******/ // Create a new module (and put it into the cache)
13/******/ var module = installedModules[moduleId] = {
14/******/ exports: {},
15/******/ id: moduleId,
16/******/ loaded: false
17/******/ };
18
19/******/ // Execute the module function
20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
22/******/ // Flag the module as loaded
23/******/ module.loaded = true;
24
25/******/ // Return the exports of the module
26/******/ return module.exports;
27/******/ }
28
29
30/******/ // expose the modules object (__webpack_modules__)
31/******/ __webpack_require__.m = modules;
32
33/******/ // expose the module cache
34/******/ __webpack_require__.c = installedModules;
35
36/******/ // __webpack_public_path__
37/******/ __webpack_require__.p = "";
38
39/******/ // Load entry module and return exports
40/******/ return __webpack_require__(0);
41/******/ })
42/************************************************************************/
43/******/ ([
44/* 0 */
45/***/ function(module, exports, __webpack_require__) {
46
47 'use strict';
48
49 var _react = __webpack_require__(89);
50
51 var _react2 = _interopRequireDefault(_react);
52
53 var _reactDom = __webpack_require__(122);
54
55 var _reactRedux = __webpack_require__(629);
56
57 var _reactRouter = __webpack_require__(260);
58
59 var _MainRoutes = __webpack_require__(651);
60
61 var _MainRoutes2 = _interopRequireDefault(_MainRoutes);
62
63 var _store = __webpack_require__(763);
64
65 var _store2 = _interopRequireDefault(_store);
66
67 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
68
69 // Preload store with basePath
70
71 // Self-defined
72 /* global document, require */
73
74 /**
75 * Entry point for webpack
76 * @author patrickkerrypei / https://github.com/patrickkerrypei
77 */
78
79 // Libraries
80 var basePath = document.getElementById('baseUrlHolder').getAttribute('data');
81 var store = (0, _store2.default)({ basePath: basePath });
82
83 __webpack_require__(626);
84 __webpack_require__(773);
85 __webpack_require__(775);
86 __webpack_require__(602);
87 __webpack_require__(776);
88 __webpack_require__(787);
89 __webpack_require__(733);
90 __webpack_require__(730);
91
92 (0, _reactDom.render)(_react2.default.createElement(
93 _reactRedux.Provider,
94 { store: store },
95 _react2.default.createElement(_reactRouter.Router, { history: _reactRouter.browserHistory, routes: _MainRoutes2.default })
96 ), document.getElementById('mainEntry'));
97
98/***/ },
99/* 1 */,
100/* 2 */,
101/* 3 */,
102/* 4 */,
103/* 5 */,
104/* 6 */,
105/* 7 */,
106/* 8 */,
107/* 9 */,
108/* 10 */,
109/* 11 */,
110/* 12 */,
111/* 13 */,
112/* 14 */,
113/* 15 */,
114/* 16 */,
115/* 17 */,
116/* 18 */,
117/* 19 */,
118/* 20 */,
119/* 21 */,
120/* 22 */,
121/* 23 */,
122/* 24 */,
123/* 25 */,
124/* 26 */,
125/* 27 */,
126/* 28 */,
127/* 29 */,
128/* 30 */,
129/* 31 */,
130/* 32 */,
131/* 33 */,
132/* 34 */,
133/* 35 */,
134/* 36 */,
135/* 37 */,
136/* 38 */,
137/* 39 */,
138/* 40 */,
139/* 41 */,
140/* 42 */,
141/* 43 */,
142/* 44 */,
143/* 45 */,
144/* 46 */,
145/* 47 */,
146/* 48 */,
147/* 49 */,
148/* 50 */,
149/* 51 */,
150/* 52 */,
151/* 53 */,
152/* 54 */,
153/* 55 */,
154/* 56 */,
155/* 57 */,
156/* 58 */,
157/* 59 */,
158/* 60 */,
159/* 61 */,
160/* 62 */,
161/* 63 */,
162/* 64 */,
163/* 65 */,
164/* 66 */,
165/* 67 */,
166/* 68 */,
167/* 69 */,
168/* 70 */,
169/* 71 */,
170/* 72 */,
171/* 73 */,
172/* 74 */,
173/* 75 */,
174/* 76 */,
175/* 77 */,
176/* 78 */,
177/* 79 */,
178/* 80 */,
179/* 81 */,
180/* 82 */,
181/* 83 */,
182/* 84 */,
183/* 85 */,
184/* 86 */,
185/* 87 */,
186/* 88 */,
187/* 89 */
188/***/ function(module, exports, __webpack_require__) {
189
190 'use strict';
191
192 module.exports = __webpack_require__(90);
193
194
195/***/ },
196/* 90 */
197/***/ function(module, exports, __webpack_require__) {
198
199 /**
200 * Copyright 2013-present, Facebook, Inc.
201 * All rights reserved.
202 *
203 * This source code is licensed under the BSD-style license found in the
204 * LICENSE file in the root directory of this source tree. An additional grant
205 * of patent rights can be found in the PATENTS file in the same directory.
206 *
207 * @providesModule React
208 */
209
210 'use strict';
211
212 var _assign = __webpack_require__(91);
213
214 var ReactChildren = __webpack_require__(92);
215 var ReactComponent = __webpack_require__(104);
216 var ReactPureComponent = __webpack_require__(107);
217 var ReactClass = __webpack_require__(108);
218 var ReactDOMFactories = __webpack_require__(113);
219 var ReactElement = __webpack_require__(96);
220 var ReactPropTypes = __webpack_require__(119);
221 var ReactVersion = __webpack_require__(120);
222
223 var onlyChild = __webpack_require__(121);
224 var warning = __webpack_require__(98);
225
226 var createElement = ReactElement.createElement;
227 var createFactory = ReactElement.createFactory;
228 var cloneElement = ReactElement.cloneElement;
229
230 if ((undefined) !== 'production') {
231 var ReactElementValidator = __webpack_require__(114);
232 createElement = ReactElementValidator.createElement;
233 createFactory = ReactElementValidator.createFactory;
234 cloneElement = ReactElementValidator.cloneElement;
235 }
236
237 var __spread = _assign;
238
239 if ((undefined) !== 'production') {
240 var warned = false;
241 __spread = function () {
242 (undefined) !== 'production' ? warning(warned, '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.') : void 0;
243 warned = true;
244 return _assign.apply(null, arguments);
245 };
246 }
247
248 var React = {
249
250 // Modern
251
252 Children: {
253 map: ReactChildren.map,
254 forEach: ReactChildren.forEach,
255 count: ReactChildren.count,
256 toArray: ReactChildren.toArray,
257 only: onlyChild
258 },
259
260 Component: ReactComponent,
261 PureComponent: ReactPureComponent,
262
263 createElement: createElement,
264 cloneElement: cloneElement,
265 isValidElement: ReactElement.isValidElement,
266
267 // Classic
268
269 PropTypes: ReactPropTypes,
270 createClass: ReactClass.createClass,
271 createFactory: createFactory,
272 createMixin: function (mixin) {
273 // Currently a noop. Will be used to validate and trace mixins.
274 return mixin;
275 },
276
277 // This looks DOM specific but these are actually isomorphic helpers
278 // since they are just generating DOM strings.
279 DOM: ReactDOMFactories,
280
281 version: ReactVersion,
282
283 // Deprecated hook for JSX spread, don't use this for anything.
284 __spread: __spread
285 };
286
287 module.exports = React;
288
289/***/ },
290/* 91 */
291/***/ function(module, exports) {
292
293 'use strict';
294 /* eslint-disable no-unused-vars */
295 var hasOwnProperty = Object.prototype.hasOwnProperty;
296 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
297
298 function toObject(val) {
299 if (val === null || val === undefined) {
300 throw new TypeError('Object.assign cannot be called with null or undefined');
301 }
302
303 return Object(val);
304 }
305
306 function shouldUseNative() {
307 try {
308 if (!Object.assign) {
309 return false;
310 }
311
312 // Detect buggy property enumeration order in older V8 versions.
313
314 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
315 var test1 = new String('abc'); // eslint-disable-line
316 test1[5] = 'de';
317 if (Object.getOwnPropertyNames(test1)[0] === '5') {
318 return false;
319 }
320
321 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
322 var test2 = {};
323 for (var i = 0; i < 10; i++) {
324 test2['_' + String.fromCharCode(i)] = i;
325 }
326 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
327 return test2[n];
328 });
329 if (order2.join('') !== '0123456789') {
330 return false;
331 }
332
333 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
334 var test3 = {};
335 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
336 test3[letter] = letter;
337 });
338 if (Object.keys(Object.assign({}, test3)).join('') !==
339 'abcdefghijklmnopqrst') {
340 return false;
341 }
342
343 return true;
344 } catch (e) {
345 // We don't expect any of the above to throw, but better to be safe.
346 return false;
347 }
348 }
349
350 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
351 var from;
352 var to = toObject(target);
353 var symbols;
354
355 for (var s = 1; s < arguments.length; s++) {
356 from = Object(arguments[s]);
357
358 for (var key in from) {
359 if (hasOwnProperty.call(from, key)) {
360 to[key] = from[key];
361 }
362 }
363
364 if (Object.getOwnPropertySymbols) {
365 symbols = Object.getOwnPropertySymbols(from);
366 for (var i = 0; i < symbols.length; i++) {
367 if (propIsEnumerable.call(from, symbols[i])) {
368 to[symbols[i]] = from[symbols[i]];
369 }
370 }
371 }
372 }
373
374 return to;
375 };
376
377
378/***/ },
379/* 92 */
380/***/ function(module, exports, __webpack_require__) {
381
382 /**
383 * Copyright 2013-present, Facebook, Inc.
384 * All rights reserved.
385 *
386 * This source code is licensed under the BSD-style license found in the
387 * LICENSE file in the root directory of this source tree. An additional grant
388 * of patent rights can be found in the PATENTS file in the same directory.
389 *
390 * @providesModule ReactChildren
391 */
392
393 'use strict';
394
395 var PooledClass = __webpack_require__(93);
396 var ReactElement = __webpack_require__(96);
397
398 var emptyFunction = __webpack_require__(99);
399 var traverseAllChildren = __webpack_require__(101);
400
401 var twoArgumentPooler = PooledClass.twoArgumentPooler;
402 var fourArgumentPooler = PooledClass.fourArgumentPooler;
403
404 var userProvidedKeyEscapeRegex = /\/+/g;
405 function escapeUserProvidedKey(text) {
406 return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
407 }
408
409 /**
410 * PooledClass representing the bookkeeping associated with performing a child
411 * traversal. Allows avoiding binding callbacks.
412 *
413 * @constructor ForEachBookKeeping
414 * @param {!function} forEachFunction Function to perform traversal with.
415 * @param {?*} forEachContext Context to perform context with.
416 */
417 function ForEachBookKeeping(forEachFunction, forEachContext) {
418 this.func = forEachFunction;
419 this.context = forEachContext;
420 this.count = 0;
421 }
422 ForEachBookKeeping.prototype.destructor = function () {
423 this.func = null;
424 this.context = null;
425 this.count = 0;
426 };
427 PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler);
428
429 function forEachSingleChild(bookKeeping, child, name) {
430 var func = bookKeeping.func;
431 var context = bookKeeping.context;
432
433 func.call(context, child, bookKeeping.count++);
434 }
435
436 /**
437 * Iterates through children that are typically specified as `props.children`.
438 *
439 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.foreach
440 *
441 * The provided forEachFunc(child, index) will be called for each
442 * leaf child.
443 *
444 * @param {?*} children Children tree container.
445 * @param {function(*, int)} forEachFunc
446 * @param {*} forEachContext Context for forEachContext.
447 */
448 function forEachChildren(children, forEachFunc, forEachContext) {
449 if (children == null) {
450 return children;
451 }
452 var traverseContext = ForEachBookKeeping.getPooled(forEachFunc, forEachContext);
453 traverseAllChildren(children, forEachSingleChild, traverseContext);
454 ForEachBookKeeping.release(traverseContext);
455 }
456
457 /**
458 * PooledClass representing the bookkeeping associated with performing a child
459 * mapping. Allows avoiding binding callbacks.
460 *
461 * @constructor MapBookKeeping
462 * @param {!*} mapResult Object containing the ordered map of results.
463 * @param {!function} mapFunction Function to perform mapping with.
464 * @param {?*} mapContext Context to perform mapping with.
465 */
466 function MapBookKeeping(mapResult, keyPrefix, mapFunction, mapContext) {
467 this.result = mapResult;
468 this.keyPrefix = keyPrefix;
469 this.func = mapFunction;
470 this.context = mapContext;
471 this.count = 0;
472 }
473 MapBookKeeping.prototype.destructor = function () {
474 this.result = null;
475 this.keyPrefix = null;
476 this.func = null;
477 this.context = null;
478 this.count = 0;
479 };
480 PooledClass.addPoolingTo(MapBookKeeping, fourArgumentPooler);
481
482 function mapSingleChildIntoContext(bookKeeping, child, childKey) {
483 var result = bookKeeping.result;
484 var keyPrefix = bookKeeping.keyPrefix;
485 var func = bookKeeping.func;
486 var context = bookKeeping.context;
487
488
489 var mappedChild = func.call(context, child, bookKeeping.count++);
490 if (Array.isArray(mappedChild)) {
491 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
492 } else if (mappedChild != null) {
493 if (ReactElement.isValidElement(mappedChild)) {
494 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
495 // Keep both the (mapped) and old keys if they differ, just as
496 // traverseAllChildren used to do for objects as children
497 keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
498 }
499 result.push(mappedChild);
500 }
501 }
502
503 function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
504 var escapedPrefix = '';
505 if (prefix != null) {
506 escapedPrefix = escapeUserProvidedKey(prefix) + '/';
507 }
508 var traverseContext = MapBookKeeping.getPooled(array, escapedPrefix, func, context);
509 traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
510 MapBookKeeping.release(traverseContext);
511 }
512
513 /**
514 * Maps children that are typically specified as `props.children`.
515 *
516 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.map
517 *
518 * The provided mapFunction(child, key, index) will be called for each
519 * leaf child.
520 *
521 * @param {?*} children Children tree container.
522 * @param {function(*, int)} func The map function.
523 * @param {*} context Context for mapFunction.
524 * @return {object} Object containing the ordered map of results.
525 */
526 function mapChildren(children, func, context) {
527 if (children == null) {
528 return children;
529 }
530 var result = [];
531 mapIntoWithKeyPrefixInternal(children, result, null, func, context);
532 return result;
533 }
534
535 function forEachSingleChildDummy(traverseContext, child, name) {
536 return null;
537 }
538
539 /**
540 * Count the number of children that are typically specified as
541 * `props.children`.
542 *
543 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.count
544 *
545 * @param {?*} children Children tree container.
546 * @return {number} The number of children.
547 */
548 function countChildren(children, context) {
549 return traverseAllChildren(children, forEachSingleChildDummy, null);
550 }
551
552 /**
553 * Flatten a children object (typically specified as `props.children`) and
554 * return an array with appropriately re-keyed children.
555 *
556 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.toarray
557 */
558 function toArray(children) {
559 var result = [];
560 mapIntoWithKeyPrefixInternal(children, result, null, emptyFunction.thatReturnsArgument);
561 return result;
562 }
563
564 var ReactChildren = {
565 forEach: forEachChildren,
566 map: mapChildren,
567 mapIntoWithKeyPrefixInternal: mapIntoWithKeyPrefixInternal,
568 count: countChildren,
569 toArray: toArray
570 };
571
572 module.exports = ReactChildren;
573
574/***/ },
575/* 93 */
576/***/ function(module, exports, __webpack_require__) {
577
578 /**
579 * Copyright 2013-present, Facebook, Inc.
580 * All rights reserved.
581 *
582 * This source code is licensed under the BSD-style license found in the
583 * LICENSE file in the root directory of this source tree. An additional grant
584 * of patent rights can be found in the PATENTS file in the same directory.
585 *
586 * @providesModule PooledClass
587 */
588
589 'use strict';
590
591 var _prodInvariant = __webpack_require__(94);
592
593 var invariant = __webpack_require__(95);
594
595 /**
596 * Static poolers. Several custom versions for each potential number of
597 * arguments. A completely generic pooler is easy to implement, but would
598 * require accessing the `arguments` object. In each of these, `this` refers to
599 * the Class itself, not an instance. If any others are needed, simply add them
600 * here, or in their own files.
601 */
602 var oneArgumentPooler = function (copyFieldsFrom) {
603 var Klass = this;
604 if (Klass.instancePool.length) {
605 var instance = Klass.instancePool.pop();
606 Klass.call(instance, copyFieldsFrom);
607 return instance;
608 } else {
609 return new Klass(copyFieldsFrom);
610 }
611 };
612
613 var twoArgumentPooler = function (a1, a2) {
614 var Klass = this;
615 if (Klass.instancePool.length) {
616 var instance = Klass.instancePool.pop();
617 Klass.call(instance, a1, a2);
618 return instance;
619 } else {
620 return new Klass(a1, a2);
621 }
622 };
623
624 var threeArgumentPooler = function (a1, a2, a3) {
625 var Klass = this;
626 if (Klass.instancePool.length) {
627 var instance = Klass.instancePool.pop();
628 Klass.call(instance, a1, a2, a3);
629 return instance;
630 } else {
631 return new Klass(a1, a2, a3);
632 }
633 };
634
635 var fourArgumentPooler = function (a1, a2, a3, a4) {
636 var Klass = this;
637 if (Klass.instancePool.length) {
638 var instance = Klass.instancePool.pop();
639 Klass.call(instance, a1, a2, a3, a4);
640 return instance;
641 } else {
642 return new Klass(a1, a2, a3, a4);
643 }
644 };
645
646 var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
647 var Klass = this;
648 if (Klass.instancePool.length) {
649 var instance = Klass.instancePool.pop();
650 Klass.call(instance, a1, a2, a3, a4, a5);
651 return instance;
652 } else {
653 return new Klass(a1, a2, a3, a4, a5);
654 }
655 };
656
657 var standardReleaser = function (instance) {
658 var Klass = this;
659 !(instance instanceof Klass) ? (undefined) !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
660 instance.destructor();
661 if (Klass.instancePool.length < Klass.poolSize) {
662 Klass.instancePool.push(instance);
663 }
664 };
665
666 var DEFAULT_POOL_SIZE = 10;
667 var DEFAULT_POOLER = oneArgumentPooler;
668
669 /**
670 * Augments `CopyConstructor` to be a poolable class, augmenting only the class
671 * itself (statically) not adding any prototypical fields. Any CopyConstructor
672 * you give this may have a `poolSize` property, and will look for a
673 * prototypical `destructor` on instances.
674 *
675 * @param {Function} CopyConstructor Constructor that can be used to reset.
676 * @param {Function} pooler Customizable pooler.
677 */
678 var addPoolingTo = function (CopyConstructor, pooler) {
679 var NewKlass = CopyConstructor;
680 NewKlass.instancePool = [];
681 NewKlass.getPooled = pooler || DEFAULT_POOLER;
682 if (!NewKlass.poolSize) {
683 NewKlass.poolSize = DEFAULT_POOL_SIZE;
684 }
685 NewKlass.release = standardReleaser;
686 return NewKlass;
687 };
688
689 var PooledClass = {
690 addPoolingTo: addPoolingTo,
691 oneArgumentPooler: oneArgumentPooler,
692 twoArgumentPooler: twoArgumentPooler,
693 threeArgumentPooler: threeArgumentPooler,
694 fourArgumentPooler: fourArgumentPooler,
695 fiveArgumentPooler: fiveArgumentPooler
696 };
697
698 module.exports = PooledClass;
699
700/***/ },
701/* 94 */
702/***/ function(module, exports) {
703
704 /**
705 * Copyright (c) 2013-present, Facebook, Inc.
706 * All rights reserved.
707 *
708 * This source code is licensed under the BSD-style license found in the
709 * LICENSE file in the root directory of this source tree. An additional grant
710 * of patent rights can be found in the PATENTS file in the same directory.
711 *
712 * @providesModule reactProdInvariant
713 *
714 */
715 'use strict';
716
717 /**
718 * WARNING: DO NOT manually require this module.
719 * This is a replacement for `invariant(...)` used by the error code system
720 * and will _only_ be required by the corresponding babel pass.
721 * It always throws.
722 */
723
724 function reactProdInvariant(code) {
725 var argCount = arguments.length - 1;
726
727 var message = 'Minified React error #' + code + '; visit ' + 'http://facebook.github.io/react/docs/error-decoder.html?invariant=' + code;
728
729 for (var argIdx = 0; argIdx < argCount; argIdx++) {
730 message += '&args[]=' + encodeURIComponent(arguments[argIdx + 1]);
731 }
732
733 message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
734
735 var error = new Error(message);
736 error.name = 'Invariant Violation';
737 error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
738
739 throw error;
740 }
741
742 module.exports = reactProdInvariant;
743
744/***/ },
745/* 95 */
746/***/ function(module, exports, __webpack_require__) {
747
748 /**
749 * Copyright (c) 2013-present, Facebook, Inc.
750 * All rights reserved.
751 *
752 * This source code is licensed under the BSD-style license found in the
753 * LICENSE file in the root directory of this source tree. An additional grant
754 * of patent rights can be found in the PATENTS file in the same directory.
755 *
756 */
757
758 'use strict';
759
760 /**
761 * Use invariant() to assert state which your program assumes to be true.
762 *
763 * Provide sprintf-style format (only %s is supported) and arguments
764 * to provide information about what broke and what you were
765 * expecting.
766 *
767 * The invariant message will be stripped in production, but the invariant
768 * will remain to ensure logic does not differ in production.
769 */
770
771 function invariant(condition, format, a, b, c, d, e, f) {
772 if ((undefined) !== 'production') {
773 if (format === undefined) {
774 throw new Error('invariant requires an error message argument');
775 }
776 }
777
778 if (!condition) {
779 var error;
780 if (format === undefined) {
781 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
782 } else {
783 var args = [a, b, c, d, e, f];
784 var argIndex = 0;
785 error = new Error(format.replace(/%s/g, function () {
786 return args[argIndex++];
787 }));
788 error.name = 'Invariant Violation';
789 }
790
791 error.framesToPop = 1; // we don't care about invariant's own frame
792 throw error;
793 }
794 }
795
796 module.exports = invariant;
797
798/***/ },
799/* 96 */
800/***/ function(module, exports, __webpack_require__) {
801
802 /**
803 * Copyright 2014-present, Facebook, Inc.
804 * All rights reserved.
805 *
806 * This source code is licensed under the BSD-style license found in the
807 * LICENSE file in the root directory of this source tree. An additional grant
808 * of patent rights can be found in the PATENTS file in the same directory.
809 *
810 * @providesModule ReactElement
811 */
812
813 'use strict';
814
815 var _assign = __webpack_require__(91);
816
817 var ReactCurrentOwner = __webpack_require__(97);
818
819 var warning = __webpack_require__(98);
820 var canDefineProperty = __webpack_require__(100);
821 var hasOwnProperty = Object.prototype.hasOwnProperty;
822
823 // The Symbol used to tag the ReactElement type. If there is no native Symbol
824 // nor polyfill, then a plain number is used for performance.
825 var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
826
827 var RESERVED_PROPS = {
828 key: true,
829 ref: true,
830 __self: true,
831 __source: true
832 };
833
834 var specialPropKeyWarningShown, specialPropRefWarningShown;
835
836 function hasValidRef(config) {
837 if ((undefined) !== 'production') {
838 if (hasOwnProperty.call(config, 'ref')) {
839 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
840 if (getter && getter.isReactWarning) {
841 return false;
842 }
843 }
844 }
845 return config.ref !== undefined;
846 }
847
848 function hasValidKey(config) {
849 if ((undefined) !== 'production') {
850 if (hasOwnProperty.call(config, 'key')) {
851 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
852 if (getter && getter.isReactWarning) {
853 return false;
854 }
855 }
856 }
857 return config.key !== undefined;
858 }
859
860 function defineKeyPropWarningGetter(props, displayName) {
861 var warnAboutAccessingKey = function () {
862 if (!specialPropKeyWarningShown) {
863 specialPropKeyWarningShown = true;
864 (undefined) !== '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;
865 }
866 };
867 warnAboutAccessingKey.isReactWarning = true;
868 Object.defineProperty(props, 'key', {
869 get: warnAboutAccessingKey,
870 configurable: true
871 });
872 }
873
874 function defineRefPropWarningGetter(props, displayName) {
875 var warnAboutAccessingRef = function () {
876 if (!specialPropRefWarningShown) {
877 specialPropRefWarningShown = true;
878 (undefined) !== '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;
879 }
880 };
881 warnAboutAccessingRef.isReactWarning = true;
882 Object.defineProperty(props, 'ref', {
883 get: warnAboutAccessingRef,
884 configurable: true
885 });
886 }
887
888 /**
889 * Factory method to create a new React element. This no longer adheres to
890 * the class pattern, so do not use new to call it. Also, no instanceof check
891 * will work. Instead test $$typeof field against Symbol.for('react.element') to check
892 * if something is a React Element.
893 *
894 * @param {*} type
895 * @param {*} key
896 * @param {string|object} ref
897 * @param {*} self A *temporary* helper to detect places where `this` is
898 * different from the `owner` when React.createElement is called, so that we
899 * can warn. We want to get rid of owner and replace string `ref`s with arrow
900 * functions, and as long as `this` and owner are the same, there will be no
901 * change in behavior.
902 * @param {*} source An annotation object (added by a transpiler or otherwise)
903 * indicating filename, line number, and/or other information.
904 * @param {*} owner
905 * @param {*} props
906 * @internal
907 */
908 var ReactElement = function (type, key, ref, self, source, owner, props) {
909 var element = {
910 // This tag allow us to uniquely identify this as a React Element
911 $$typeof: REACT_ELEMENT_TYPE,
912
913 // Built-in properties that belong on the element
914 type: type,
915 key: key,
916 ref: ref,
917 props: props,
918
919 // Record the component responsible for creating this element.
920 _owner: owner
921 };
922
923 if ((undefined) !== 'production') {
924 // The validation flag is currently mutative. We put it on
925 // an external backing store so that we can freeze the whole object.
926 // This can be replaced with a WeakMap once they are implemented in
927 // commonly used development environments.
928 element._store = {};
929 var shadowChildren = Array.isArray(props.children) ? props.children.slice(0) : props.children;
930
931 // To make comparing ReactElements easier for testing purposes, we make
932 // the validation flag non-enumerable (where possible, which should
933 // include every environment we run tests in), so the test framework
934 // ignores it.
935 if (canDefineProperty) {
936 Object.defineProperty(element._store, 'validated', {
937 configurable: false,
938 enumerable: false,
939 writable: true,
940 value: false
941 });
942 // self and source are DEV only properties.
943 Object.defineProperty(element, '_self', {
944 configurable: false,
945 enumerable: false,
946 writable: false,
947 value: self
948 });
949 Object.defineProperty(element, '_shadowChildren', {
950 configurable: false,
951 enumerable: false,
952 writable: false,
953 value: shadowChildren
954 });
955 // Two elements created in two different places should be considered
956 // equal for testing purposes and therefore we hide it from enumeration.
957 Object.defineProperty(element, '_source', {
958 configurable: false,
959 enumerable: false,
960 writable: false,
961 value: source
962 });
963 } else {
964 element._store.validated = false;
965 element._self = self;
966 element._shadowChildren = shadowChildren;
967 element._source = source;
968 }
969 if (Object.freeze) {
970 Object.freeze(element.props);
971 Object.freeze(element);
972 }
973 }
974
975 return element;
976 };
977
978 /**
979 * Create and return a new ReactElement of the given type.
980 * See https://facebook.github.io/react/docs/top-level-api.html#react.createelement
981 */
982 ReactElement.createElement = function (type, config, children) {
983 var propName;
984
985 // Reserved names are extracted
986 var props = {};
987
988 var key = null;
989 var ref = null;
990 var self = null;
991 var source = null;
992
993 if (config != null) {
994 if (hasValidRef(config)) {
995 ref = config.ref;
996 }
997 if (hasValidKey(config)) {
998 key = '' + config.key;
999 }
1000
1001 self = config.__self === undefined ? null : config.__self;
1002 source = config.__source === undefined ? null : config.__source;
1003 // Remaining properties are added to a new props object
1004 for (propName in config) {
1005 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1006 props[propName] = config[propName];
1007 }
1008 }
1009 }
1010
1011 // Children can be more than one argument, and those are transferred onto
1012 // the newly allocated props object.
1013 var childrenLength = arguments.length - 2;
1014 if (childrenLength === 1) {
1015 props.children = children;
1016 } else if (childrenLength > 1) {
1017 var childArray = Array(childrenLength);
1018 for (var i = 0; i < childrenLength; i++) {
1019 childArray[i] = arguments[i + 2];
1020 }
1021 props.children = childArray;
1022 }
1023
1024 // Resolve default props
1025 if (type && type.defaultProps) {
1026 var defaultProps = type.defaultProps;
1027 for (propName in defaultProps) {
1028 if (props[propName] === undefined) {
1029 props[propName] = defaultProps[propName];
1030 }
1031 }
1032 }
1033 if ((undefined) !== 'production') {
1034 if (key || ref) {
1035 if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
1036 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1037 if (key) {
1038 defineKeyPropWarningGetter(props, displayName);
1039 }
1040 if (ref) {
1041 defineRefPropWarningGetter(props, displayName);
1042 }
1043 }
1044 }
1045 }
1046 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1047 };
1048
1049 /**
1050 * Return a function that produces ReactElements of a given type.
1051 * See https://facebook.github.io/react/docs/top-level-api.html#react.createfactory
1052 */
1053 ReactElement.createFactory = function (type) {
1054 var factory = ReactElement.createElement.bind(null, type);
1055 // Expose the type on the factory and the prototype so that it can be
1056 // easily accessed on elements. E.g. `<Foo />.type === Foo`.
1057 // This should not be named `constructor` since this may not be the function
1058 // that created the element, and it may not even be a constructor.
1059 // Legacy hook TODO: Warn if this is accessed
1060 factory.type = type;
1061 return factory;
1062 };
1063
1064 ReactElement.cloneAndReplaceKey = function (oldElement, newKey) {
1065 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1066
1067 return newElement;
1068 };
1069
1070 /**
1071 * Clone and return a new ReactElement using element as the starting point.
1072 * See https://facebook.github.io/react/docs/top-level-api.html#react.cloneelement
1073 */
1074 ReactElement.cloneElement = function (element, config, children) {
1075 var propName;
1076
1077 // Original props are copied
1078 var props = _assign({}, element.props);
1079
1080 // Reserved names are extracted
1081 var key = element.key;
1082 var ref = element.ref;
1083 // Self is preserved since the owner is preserved.
1084 var self = element._self;
1085 // Source is preserved since cloneElement is unlikely to be targeted by a
1086 // transpiler, and the original source is probably a better indicator of the
1087 // true owner.
1088 var source = element._source;
1089
1090 // Owner will be preserved, unless ref is overridden
1091 var owner = element._owner;
1092
1093 if (config != null) {
1094 if (hasValidRef(config)) {
1095 // Silently steal the ref from the parent.
1096 ref = config.ref;
1097 owner = ReactCurrentOwner.current;
1098 }
1099 if (hasValidKey(config)) {
1100 key = '' + config.key;
1101 }
1102
1103 // Remaining properties override existing props
1104 var defaultProps;
1105 if (element.type && element.type.defaultProps) {
1106 defaultProps = element.type.defaultProps;
1107 }
1108 for (propName in config) {
1109 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
1110 if (config[propName] === undefined && defaultProps !== undefined) {
1111 // Resolve default props
1112 props[propName] = defaultProps[propName];
1113 } else {
1114 props[propName] = config[propName];
1115 }
1116 }
1117 }
1118 }
1119
1120 // Children can be more than one argument, and those are transferred onto
1121 // the newly allocated props object.
1122 var childrenLength = arguments.length - 2;
1123 if (childrenLength === 1) {
1124 props.children = children;
1125 } else if (childrenLength > 1) {
1126 var childArray = Array(childrenLength);
1127 for (var i = 0; i < childrenLength; i++) {
1128 childArray[i] = arguments[i + 2];
1129 }
1130 props.children = childArray;
1131 }
1132
1133 return ReactElement(element.type, key, ref, self, source, owner, props);
1134 };
1135
1136 /**
1137 * Verifies the object is a ReactElement.
1138 * See https://facebook.github.io/react/docs/top-level-api.html#react.isvalidelement
1139 * @param {?object} object
1140 * @return {boolean} True if `object` is a valid component.
1141 * @final
1142 */
1143 ReactElement.isValidElement = function (object) {
1144 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1145 };
1146
1147 ReactElement.REACT_ELEMENT_TYPE = REACT_ELEMENT_TYPE;
1148
1149 module.exports = ReactElement;
1150
1151/***/ },
1152/* 97 */
1153/***/ function(module, exports) {
1154
1155 /**
1156 * Copyright 2013-present, Facebook, Inc.
1157 * All rights reserved.
1158 *
1159 * This source code is licensed under the BSD-style license found in the
1160 * LICENSE file in the root directory of this source tree. An additional grant
1161 * of patent rights can be found in the PATENTS file in the same directory.
1162 *
1163 * @providesModule ReactCurrentOwner
1164 */
1165
1166 'use strict';
1167
1168 /**
1169 * Keeps track of the current owner.
1170 *
1171 * The current owner is the component who should own any components that are
1172 * currently being constructed.
1173 */
1174
1175 var ReactCurrentOwner = {
1176
1177 /**
1178 * @internal
1179 * @type {ReactComponent}
1180 */
1181 current: null
1182
1183 };
1184
1185 module.exports = ReactCurrentOwner;
1186
1187/***/ },
1188/* 98 */
1189/***/ function(module, exports, __webpack_require__) {
1190
1191 /**
1192 * Copyright 2014-2015, Facebook, Inc.
1193 * All rights reserved.
1194 *
1195 * This source code is licensed under the BSD-style license found in the
1196 * LICENSE file in the root directory of this source tree. An additional grant
1197 * of patent rights can be found in the PATENTS file in the same directory.
1198 *
1199 */
1200
1201 'use strict';
1202
1203 var emptyFunction = __webpack_require__(99);
1204
1205 /**
1206 * Similar to invariant but only logs a warning if the condition is not met.
1207 * This can be used to log issues in development environments in critical
1208 * paths. Removing the logging code for production environments will keep the
1209 * same logic and follow the same code paths.
1210 */
1211
1212 var warning = emptyFunction;
1213
1214 if ((undefined) !== 'production') {
1215 (function () {
1216 var printWarning = function printWarning(format) {
1217 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1218 args[_key - 1] = arguments[_key];
1219 }
1220
1221 var argIndex = 0;
1222 var message = 'Warning: ' + format.replace(/%s/g, function () {
1223 return args[argIndex++];
1224 });
1225 if (typeof console !== 'undefined') {
1226 console.error(message);
1227 }
1228 try {
1229 // --- Welcome to debugging React ---
1230 // This error was thrown as a convenience so that you can use this stack
1231 // to find the callsite that caused this warning to fire.
1232 throw new Error(message);
1233 } catch (x) {}
1234 };
1235
1236 warning = function warning(condition, format) {
1237 if (format === undefined) {
1238 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1239 }
1240
1241 if (format.indexOf('Failed Composite propType: ') === 0) {
1242 return; // Ignore CompositeComponent proptype check.
1243 }
1244
1245 if (!condition) {
1246 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
1247 args[_key2 - 2] = arguments[_key2];
1248 }
1249
1250 printWarning.apply(undefined, [format].concat(args));
1251 }
1252 };
1253 })();
1254 }
1255
1256 module.exports = warning;
1257
1258/***/ },
1259/* 99 */
1260/***/ function(module, exports) {
1261
1262 "use strict";
1263
1264 /**
1265 * Copyright (c) 2013-present, Facebook, Inc.
1266 * All rights reserved.
1267 *
1268 * This source code is licensed under the BSD-style license found in the
1269 * LICENSE file in the root directory of this source tree. An additional grant
1270 * of patent rights can be found in the PATENTS file in the same directory.
1271 *
1272 *
1273 */
1274
1275 function makeEmptyFunction(arg) {
1276 return function () {
1277 return arg;
1278 };
1279 }
1280
1281 /**
1282 * This function accepts and discards inputs; it has no side effects. This is
1283 * primarily useful idiomatically for overridable function endpoints which
1284 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
1285 */
1286 var emptyFunction = function emptyFunction() {};
1287
1288 emptyFunction.thatReturns = makeEmptyFunction;
1289 emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
1290 emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
1291 emptyFunction.thatReturnsNull = makeEmptyFunction(null);
1292 emptyFunction.thatReturnsThis = function () {
1293 return this;
1294 };
1295 emptyFunction.thatReturnsArgument = function (arg) {
1296 return arg;
1297 };
1298
1299 module.exports = emptyFunction;
1300
1301/***/ },
1302/* 100 */
1303/***/ function(module, exports, __webpack_require__) {
1304
1305 /**
1306 * Copyright 2013-present, Facebook, Inc.
1307 * All rights reserved.
1308 *
1309 * This source code is licensed under the BSD-style license found in the
1310 * LICENSE file in the root directory of this source tree. An additional grant
1311 * of patent rights can be found in the PATENTS file in the same directory.
1312 *
1313 * @providesModule canDefineProperty
1314 */
1315
1316 'use strict';
1317
1318 var canDefineProperty = false;
1319 if ((undefined) !== 'production') {
1320 try {
1321 Object.defineProperty({}, 'x', { get: function () {} });
1322 canDefineProperty = true;
1323 } catch (x) {
1324 // IE will fail on defineProperty
1325 }
1326 }
1327
1328 module.exports = canDefineProperty;
1329
1330/***/ },
1331/* 101 */
1332/***/ function(module, exports, __webpack_require__) {
1333
1334 /**
1335 * Copyright 2013-present, Facebook, Inc.
1336 * All rights reserved.
1337 *
1338 * This source code is licensed under the BSD-style license found in the
1339 * LICENSE file in the root directory of this source tree. An additional grant
1340 * of patent rights can be found in the PATENTS file in the same directory.
1341 *
1342 * @providesModule traverseAllChildren
1343 */
1344
1345 'use strict';
1346
1347 var _prodInvariant = __webpack_require__(94);
1348
1349 var ReactCurrentOwner = __webpack_require__(97);
1350 var ReactElement = __webpack_require__(96);
1351
1352 var getIteratorFn = __webpack_require__(102);
1353 var invariant = __webpack_require__(95);
1354 var KeyEscapeUtils = __webpack_require__(103);
1355 var warning = __webpack_require__(98);
1356
1357 var SEPARATOR = '.';
1358 var SUBSEPARATOR = ':';
1359
1360 /**
1361 * TODO: Test that a single child and an array with one item have the same key
1362 * pattern.
1363 */
1364
1365 var didWarnAboutMaps = false;
1366
1367 /**
1368 * Generate a key string that identifies a component within a set.
1369 *
1370 * @param {*} component A component that could contain a manual key.
1371 * @param {number} index Index that is used if a manual key is not provided.
1372 * @return {string}
1373 */
1374 function getComponentKey(component, index) {
1375 // Do some typechecking here since we call this blindly. We want to ensure
1376 // that we don't block potential future ES APIs.
1377 if (component && typeof component === 'object' && component.key != null) {
1378 // Explicit key
1379 return KeyEscapeUtils.escape(component.key);
1380 }
1381 // Implicit key determined by the index in the set
1382 return index.toString(36);
1383 }
1384
1385 /**
1386 * @param {?*} children Children tree container.
1387 * @param {!string} nameSoFar Name of the key path so far.
1388 * @param {!function} callback Callback to invoke with each child found.
1389 * @param {?*} traverseContext Used to pass information throughout the traversal
1390 * process.
1391 * @return {!number} The number of children in this subtree.
1392 */
1393 function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
1394 var type = typeof children;
1395
1396 if (type === 'undefined' || type === 'boolean') {
1397 // All of the above are perceived as null.
1398 children = null;
1399 }
1400
1401 if (children === null || type === 'string' || type === 'number' || ReactElement.isValidElement(children)) {
1402 callback(traverseContext, children,
1403 // If it's the only child, treat the name as if it was wrapped in an array
1404 // so that it's consistent if the number of children grows.
1405 nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
1406 return 1;
1407 }
1408
1409 var child;
1410 var nextName;
1411 var subtreeCount = 0; // Count of children found in the current subtree.
1412 var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
1413
1414 if (Array.isArray(children)) {
1415 for (var i = 0; i < children.length; i++) {
1416 child = children[i];
1417 nextName = nextNamePrefix + getComponentKey(child, i);
1418 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1419 }
1420 } else {
1421 var iteratorFn = getIteratorFn(children);
1422 if (iteratorFn) {
1423 var iterator = iteratorFn.call(children);
1424 var step;
1425 if (iteratorFn !== children.entries) {
1426 var ii = 0;
1427 while (!(step = iterator.next()).done) {
1428 child = step.value;
1429 nextName = nextNamePrefix + getComponentKey(child, ii++);
1430 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1431 }
1432 } else {
1433 if ((undefined) !== 'production') {
1434 var mapsAsChildrenAddendum = '';
1435 if (ReactCurrentOwner.current) {
1436 var mapsAsChildrenOwnerName = ReactCurrentOwner.current.getName();
1437 if (mapsAsChildrenOwnerName) {
1438 mapsAsChildrenAddendum = ' Check the render method of `' + mapsAsChildrenOwnerName + '`.';
1439 }
1440 }
1441 (undefined) !== '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;
1442 didWarnAboutMaps = true;
1443 }
1444 // Iterator will provide entry [k,v] tuples rather than values.
1445 while (!(step = iterator.next()).done) {
1446 var entry = step.value;
1447 if (entry) {
1448 child = entry[1];
1449 nextName = nextNamePrefix + KeyEscapeUtils.escape(entry[0]) + SUBSEPARATOR + getComponentKey(child, 0);
1450 subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
1451 }
1452 }
1453 }
1454 } else if (type === 'object') {
1455 var addendum = '';
1456 if ((undefined) !== 'production') {
1457 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.';
1458 if (children._isReactElement) {
1459 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.';
1460 }
1461 if (ReactCurrentOwner.current) {
1462 var name = ReactCurrentOwner.current.getName();
1463 if (name) {
1464 addendum += ' Check the render method of `' + name + '`.';
1465 }
1466 }
1467 }
1468 var childrenString = String(children);
1469 true ? (undefined) !== '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;
1470 }
1471 }
1472
1473 return subtreeCount;
1474 }
1475
1476 /**
1477 * Traverses children that are typically specified as `props.children`, but
1478 * might also be specified through attributes:
1479 *
1480 * - `traverseAllChildren(this.props.children, ...)`
1481 * - `traverseAllChildren(this.props.leftPanelChildren, ...)`
1482 *
1483 * The `traverseContext` is an optional argument that is passed through the
1484 * entire traversal. It can be used to store accumulations or anything else that
1485 * the callback might find relevant.
1486 *
1487 * @param {?*} children Children tree object.
1488 * @param {!function} callback To invoke upon traversing each child.
1489 * @param {?*} traverseContext Context for traversal.
1490 * @return {!number} The number of children in this subtree.
1491 */
1492 function traverseAllChildren(children, callback, traverseContext) {
1493 if (children == null) {
1494 return 0;
1495 }
1496
1497 return traverseAllChildrenImpl(children, '', callback, traverseContext);
1498 }
1499
1500 module.exports = traverseAllChildren;
1501
1502/***/ },
1503/* 102 */
1504/***/ function(module, exports) {
1505
1506 /**
1507 * Copyright 2013-present, Facebook, Inc.
1508 * All rights reserved.
1509 *
1510 * This source code is licensed under the BSD-style license found in the
1511 * LICENSE file in the root directory of this source tree. An additional grant
1512 * of patent rights can be found in the PATENTS file in the same directory.
1513 *
1514 * @providesModule getIteratorFn
1515 *
1516 */
1517
1518 'use strict';
1519
1520 /* global Symbol */
1521
1522 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1523 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1524
1525 /**
1526 * Returns the iterator method function contained on the iterable object.
1527 *
1528 * Be sure to invoke the function with the iterable as context:
1529 *
1530 * var iteratorFn = getIteratorFn(myIterable);
1531 * if (iteratorFn) {
1532 * var iterator = iteratorFn.call(myIterable);
1533 * ...
1534 * }
1535 *
1536 * @param {?object} maybeIterable
1537 * @return {?function}
1538 */
1539 function getIteratorFn(maybeIterable) {
1540 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1541 if (typeof iteratorFn === 'function') {
1542 return iteratorFn;
1543 }
1544 }
1545
1546 module.exports = getIteratorFn;
1547
1548/***/ },
1549/* 103 */
1550/***/ function(module, exports) {
1551
1552 /**
1553 * Copyright 2013-present, Facebook, Inc.
1554 * All rights reserved.
1555 *
1556 * This source code is licensed under the BSD-style license found in the
1557 * LICENSE file in the root directory of this source tree. An additional grant
1558 * of patent rights can be found in the PATENTS file in the same directory.
1559 *
1560 * @providesModule KeyEscapeUtils
1561 *
1562 */
1563
1564 'use strict';
1565
1566 /**
1567 * Escape and wrap key so it is safe to use as a reactid
1568 *
1569 * @param {string} key to be escaped.
1570 * @return {string} the escaped key.
1571 */
1572
1573 function escape(key) {
1574 var escapeRegex = /[=:]/g;
1575 var escaperLookup = {
1576 '=': '=0',
1577 ':': '=2'
1578 };
1579 var escapedString = ('' + key).replace(escapeRegex, function (match) {
1580 return escaperLookup[match];
1581 });
1582
1583 return '$' + escapedString;
1584 }
1585
1586 /**
1587 * Unescape and unwrap key for human-readable display
1588 *
1589 * @param {string} key to unescape.
1590 * @return {string} the unescaped key.
1591 */
1592 function unescape(key) {
1593 var unescapeRegex = /(=0|=2)/g;
1594 var unescaperLookup = {
1595 '=0': '=',
1596 '=2': ':'
1597 };
1598 var keySubstring = key[0] === '.' && key[1] === '$' ? key.substring(2) : key.substring(1);
1599
1600 return ('' + keySubstring).replace(unescapeRegex, function (match) {
1601 return unescaperLookup[match];
1602 });
1603 }
1604
1605 var KeyEscapeUtils = {
1606 escape: escape,
1607 unescape: unescape
1608 };
1609
1610 module.exports = KeyEscapeUtils;
1611
1612/***/ },
1613/* 104 */
1614/***/ function(module, exports, __webpack_require__) {
1615
1616 /**
1617 * Copyright 2013-present, Facebook, Inc.
1618 * All rights reserved.
1619 *
1620 * This source code is licensed under the BSD-style license found in the
1621 * LICENSE file in the root directory of this source tree. An additional grant
1622 * of patent rights can be found in the PATENTS file in the same directory.
1623 *
1624 * @providesModule ReactComponent
1625 */
1626
1627 'use strict';
1628
1629 var _prodInvariant = __webpack_require__(94);
1630
1631 var ReactNoopUpdateQueue = __webpack_require__(105);
1632
1633 var canDefineProperty = __webpack_require__(100);
1634 var emptyObject = __webpack_require__(106);
1635 var invariant = __webpack_require__(95);
1636 var warning = __webpack_require__(98);
1637
1638 /**
1639 * Base class helpers for the updating state of a component.
1640 */
1641 function ReactComponent(props, context, updater) {
1642 this.props = props;
1643 this.context = context;
1644 this.refs = emptyObject;
1645 // We initialize the default updater but the real one gets injected by the
1646 // renderer.
1647 this.updater = updater || ReactNoopUpdateQueue;
1648 }
1649
1650 ReactComponent.prototype.isReactComponent = {};
1651
1652 /**
1653 * Sets a subset of the state. Always use this to mutate
1654 * state. You should treat `this.state` as immutable.
1655 *
1656 * There is no guarantee that `this.state` will be immediately updated, so
1657 * accessing `this.state` after calling this method may return the old value.
1658 *
1659 * There is no guarantee that calls to `setState` will run synchronously,
1660 * as they may eventually be batched together. You can provide an optional
1661 * callback that will be executed when the call to setState is actually
1662 * completed.
1663 *
1664 * When a function is provided to setState, it will be called at some point in
1665 * the future (not synchronously). It will be called with the up to date
1666 * component arguments (state, props, context). These values can be different
1667 * from this.* because your function may be called after receiveProps but before
1668 * shouldComponentUpdate, and this new state, props, and context will not yet be
1669 * assigned to this.
1670 *
1671 * @param {object|function} partialState Next partial state or function to
1672 * produce next partial state to be merged with current state.
1673 * @param {?function} callback Called after state is updated.
1674 * @final
1675 * @protected
1676 */
1677 ReactComponent.prototype.setState = function (partialState, callback) {
1678 !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? (undefined) !== '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;
1679 this.updater.enqueueSetState(this, partialState);
1680 if (callback) {
1681 this.updater.enqueueCallback(this, callback, 'setState');
1682 }
1683 };
1684
1685 /**
1686 * Forces an update. This should only be invoked when it is known with
1687 * certainty that we are **not** in a DOM transaction.
1688 *
1689 * You may want to call this when you know that some deeper aspect of the
1690 * component's state has changed but `setState` was not called.
1691 *
1692 * This will not invoke `shouldComponentUpdate`, but it will invoke
1693 * `componentWillUpdate` and `componentDidUpdate`.
1694 *
1695 * @param {?function} callback Called after update is complete.
1696 * @final
1697 * @protected
1698 */
1699 ReactComponent.prototype.forceUpdate = function (callback) {
1700 this.updater.enqueueForceUpdate(this);
1701 if (callback) {
1702 this.updater.enqueueCallback(this, callback, 'forceUpdate');
1703 }
1704 };
1705
1706 /**
1707 * Deprecated APIs. These APIs used to exist on classic React classes but since
1708 * we would like to deprecate them, we're not going to move them over to this
1709 * modern base class. Instead, we define a getter that warns if it's accessed.
1710 */
1711 if ((undefined) !== 'production') {
1712 var deprecatedAPIs = {
1713 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
1714 replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
1715 };
1716 var defineDeprecationWarning = function (methodName, info) {
1717 if (canDefineProperty) {
1718 Object.defineProperty(ReactComponent.prototype, methodName, {
1719 get: function () {
1720 (undefined) !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
1721 return undefined;
1722 }
1723 });
1724 }
1725 };
1726 for (var fnName in deprecatedAPIs) {
1727 if (deprecatedAPIs.hasOwnProperty(fnName)) {
1728 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
1729 }
1730 }
1731 }
1732
1733 module.exports = ReactComponent;
1734
1735/***/ },
1736/* 105 */
1737/***/ function(module, exports, __webpack_require__) {
1738
1739 /**
1740 * Copyright 2015-present, Facebook, Inc.
1741 * All rights reserved.
1742 *
1743 * This source code is licensed under the BSD-style license found in the
1744 * LICENSE file in the root directory of this source tree. An additional grant
1745 * of patent rights can be found in the PATENTS file in the same directory.
1746 *
1747 * @providesModule ReactNoopUpdateQueue
1748 */
1749
1750 'use strict';
1751
1752 var warning = __webpack_require__(98);
1753
1754 function warnNoop(publicInstance, callerName) {
1755 if ((undefined) !== 'production') {
1756 var constructor = publicInstance.constructor;
1757 (undefined) !== '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;
1758 }
1759 }
1760
1761 /**
1762 * This is the abstract API for an update queue.
1763 */
1764 var ReactNoopUpdateQueue = {
1765
1766 /**
1767 * Checks whether or not this composite component is mounted.
1768 * @param {ReactClass} publicInstance The instance we want to test.
1769 * @return {boolean} True if mounted, false otherwise.
1770 * @protected
1771 * @final
1772 */
1773 isMounted: function (publicInstance) {
1774 return false;
1775 },
1776
1777 /**
1778 * Enqueue a callback that will be executed after all the pending updates
1779 * have processed.
1780 *
1781 * @param {ReactClass} publicInstance The instance to use as `this` context.
1782 * @param {?function} callback Called after state is updated.
1783 * @internal
1784 */
1785 enqueueCallback: function (publicInstance, callback) {},
1786
1787 /**
1788 * Forces an update. This should only be invoked when it is known with
1789 * certainty that we are **not** in a DOM transaction.
1790 *
1791 * You may want to call this when you know that some deeper aspect of the
1792 * component's state has changed but `setState` was not called.
1793 *
1794 * This will not invoke `shouldComponentUpdate`, but it will invoke
1795 * `componentWillUpdate` and `componentDidUpdate`.
1796 *
1797 * @param {ReactClass} publicInstance The instance that should rerender.
1798 * @internal
1799 */
1800 enqueueForceUpdate: function (publicInstance) {
1801 warnNoop(publicInstance, 'forceUpdate');
1802 },
1803
1804 /**
1805 * Replaces all of the state. Always use this or `setState` to mutate state.
1806 * You should treat `this.state` as immutable.
1807 *
1808 * There is no guarantee that `this.state` will be immediately updated, so
1809 * accessing `this.state` after calling this method may return the old value.
1810 *
1811 * @param {ReactClass} publicInstance The instance that should rerender.
1812 * @param {object} completeState Next state.
1813 * @internal
1814 */
1815 enqueueReplaceState: function (publicInstance, completeState) {
1816 warnNoop(publicInstance, 'replaceState');
1817 },
1818
1819 /**
1820 * Sets a subset of the state. This only exists because _pendingState is
1821 * internal. This provides a merging strategy that is not available to deep
1822 * properties which is confusing. TODO: Expose pendingState or don't use it
1823 * during the merge.
1824 *
1825 * @param {ReactClass} publicInstance The instance that should rerender.
1826 * @param {object} partialState Next partial state to be merged with state.
1827 * @internal
1828 */
1829 enqueueSetState: function (publicInstance, partialState) {
1830 warnNoop(publicInstance, 'setState');
1831 }
1832 };
1833
1834 module.exports = ReactNoopUpdateQueue;
1835
1836/***/ },
1837/* 106 */
1838/***/ function(module, exports, __webpack_require__) {
1839
1840 /**
1841 * Copyright (c) 2013-present, Facebook, Inc.
1842 * All rights reserved.
1843 *
1844 * This source code is licensed under the BSD-style license found in the
1845 * LICENSE file in the root directory of this source tree. An additional grant
1846 * of patent rights can be found in the PATENTS file in the same directory.
1847 *
1848 */
1849
1850 'use strict';
1851
1852 var emptyObject = {};
1853
1854 if ((undefined) !== 'production') {
1855 Object.freeze(emptyObject);
1856 }
1857
1858 module.exports = emptyObject;
1859
1860/***/ },
1861/* 107 */
1862/***/ function(module, exports, __webpack_require__) {
1863
1864 /**
1865 * Copyright 2013-present, Facebook, Inc.
1866 * All rights reserved.
1867 *
1868 * This source code is licensed under the BSD-style license found in the
1869 * LICENSE file in the root directory of this source tree. An additional grant
1870 * of patent rights can be found in the PATENTS file in the same directory.
1871 *
1872 * @providesModule ReactPureComponent
1873 */
1874
1875 'use strict';
1876
1877 var _assign = __webpack_require__(91);
1878
1879 var ReactComponent = __webpack_require__(104);
1880 var ReactNoopUpdateQueue = __webpack_require__(105);
1881
1882 var emptyObject = __webpack_require__(106);
1883
1884 /**
1885 * Base class helpers for the updating state of a component.
1886 */
1887 function ReactPureComponent(props, context, updater) {
1888 // Duplicated from ReactComponent.
1889 this.props = props;
1890 this.context = context;
1891 this.refs = emptyObject;
1892 // We initialize the default updater but the real one gets injected by the
1893 // renderer.
1894 this.updater = updater || ReactNoopUpdateQueue;
1895 }
1896
1897 function ComponentDummy() {}
1898 ComponentDummy.prototype = ReactComponent.prototype;
1899 ReactPureComponent.prototype = new ComponentDummy();
1900 ReactPureComponent.prototype.constructor = ReactPureComponent;
1901 // Avoid an extra prototype jump for these methods.
1902 _assign(ReactPureComponent.prototype, ReactComponent.prototype);
1903 ReactPureComponent.prototype.isPureReactComponent = true;
1904
1905 module.exports = ReactPureComponent;
1906
1907/***/ },
1908/* 108 */
1909/***/ function(module, exports, __webpack_require__) {
1910
1911 /**
1912 * Copyright 2013-present, Facebook, Inc.
1913 * All rights reserved.
1914 *
1915 * This source code is licensed under the BSD-style license found in the
1916 * LICENSE file in the root directory of this source tree. An additional grant
1917 * of patent rights can be found in the PATENTS file in the same directory.
1918 *
1919 * @providesModule ReactClass
1920 */
1921
1922 'use strict';
1923
1924 var _prodInvariant = __webpack_require__(94),
1925 _assign = __webpack_require__(91);
1926
1927 var ReactComponent = __webpack_require__(104);
1928 var ReactElement = __webpack_require__(96);
1929 var ReactPropTypeLocations = __webpack_require__(109);
1930 var ReactPropTypeLocationNames = __webpack_require__(111);
1931 var ReactNoopUpdateQueue = __webpack_require__(105);
1932
1933 var emptyObject = __webpack_require__(106);
1934 var invariant = __webpack_require__(95);
1935 var keyMirror = __webpack_require__(110);
1936 var keyOf = __webpack_require__(112);
1937 var warning = __webpack_require__(98);
1938
1939 var MIXINS_KEY = keyOf({ mixins: null });
1940
1941 /**
1942 * Policies that describe methods in `ReactClassInterface`.
1943 */
1944 var SpecPolicy = keyMirror({
1945 /**
1946 * These methods may be defined only once by the class specification or mixin.
1947 */
1948 DEFINE_ONCE: null,
1949 /**
1950 * These methods may be defined by both the class specification and mixins.
1951 * Subsequent definitions will be chained. These methods must return void.
1952 */
1953 DEFINE_MANY: null,
1954 /**
1955 * These methods are overriding the base class.
1956 */
1957 OVERRIDE_BASE: null,
1958 /**
1959 * These methods are similar to DEFINE_MANY, except we assume they return
1960 * objects. We try to merge the keys of the return values of all the mixed in
1961 * functions. If there is a key conflict we throw.
1962 */
1963 DEFINE_MANY_MERGED: null
1964 });
1965
1966 var injectedMixins = [];
1967
1968 /**
1969 * Composite components are higher-level components that compose other composite
1970 * or host components.
1971 *
1972 * To create a new type of `ReactClass`, pass a specification of
1973 * your new class to `React.createClass`. The only requirement of your class
1974 * specification is that you implement a `render` method.
1975 *
1976 * var MyComponent = React.createClass({
1977 * render: function() {
1978 * return <div>Hello World</div>;
1979 * }
1980 * });
1981 *
1982 * The class specification supports a specific protocol of methods that have
1983 * special meaning (e.g. `render`). See `ReactClassInterface` for
1984 * more the comprehensive protocol. Any other properties and methods in the
1985 * class specification will be available on the prototype.
1986 *
1987 * @interface ReactClassInterface
1988 * @internal
1989 */
1990 var ReactClassInterface = {
1991
1992 /**
1993 * An array of Mixin objects to include when defining your component.
1994 *
1995 * @type {array}
1996 * @optional
1997 */
1998 mixins: SpecPolicy.DEFINE_MANY,
1999
2000 /**
2001 * An object containing properties and methods that should be defined on
2002 * the component's constructor instead of its prototype (static methods).
2003 *
2004 * @type {object}
2005 * @optional
2006 */
2007 statics: SpecPolicy.DEFINE_MANY,
2008
2009 /**
2010 * Definition of prop types for this component.
2011 *
2012 * @type {object}
2013 * @optional
2014 */
2015 propTypes: SpecPolicy.DEFINE_MANY,
2016
2017 /**
2018 * Definition of context types for this component.
2019 *
2020 * @type {object}
2021 * @optional
2022 */
2023 contextTypes: SpecPolicy.DEFINE_MANY,
2024
2025 /**
2026 * Definition of context types this component sets for its children.
2027 *
2028 * @type {object}
2029 * @optional
2030 */
2031 childContextTypes: SpecPolicy.DEFINE_MANY,
2032
2033 // ==== Definition methods ====
2034
2035 /**
2036 * Invoked when the component is mounted. Values in the mapping will be set on
2037 * `this.props` if that prop is not specified (i.e. using an `in` check).
2038 *
2039 * This method is invoked before `getInitialState` and therefore cannot rely
2040 * on `this.state` or use `this.setState`.
2041 *
2042 * @return {object}
2043 * @optional
2044 */
2045 getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED,
2046
2047 /**
2048 * Invoked once before the component is mounted. The return value will be used
2049 * as the initial value of `this.state`.
2050 *
2051 * getInitialState: function() {
2052 * return {
2053 * isOn: false,
2054 * fooBaz: new BazFoo()
2055 * }
2056 * }
2057 *
2058 * @return {object}
2059 * @optional
2060 */
2061 getInitialState: SpecPolicy.DEFINE_MANY_MERGED,
2062
2063 /**
2064 * @return {object}
2065 * @optional
2066 */
2067 getChildContext: SpecPolicy.DEFINE_MANY_MERGED,
2068
2069 /**
2070 * Uses props from `this.props` and state from `this.state` to render the
2071 * structure of the component.
2072 *
2073 * No guarantees are made about when or how often this method is invoked, so
2074 * it must not have side effects.
2075 *
2076 * render: function() {
2077 * var name = this.props.name;
2078 * return <div>Hello, {name}!</div>;
2079 * }
2080 *
2081 * @return {ReactComponent}
2082 * @nosideeffects
2083 * @required
2084 */
2085 render: SpecPolicy.DEFINE_ONCE,
2086
2087 // ==== Delegate methods ====
2088
2089 /**
2090 * Invoked when the component is initially created and about to be mounted.
2091 * This may have side effects, but any external subscriptions or data created
2092 * by this method must be cleaned up in `componentWillUnmount`.
2093 *
2094 * @optional
2095 */
2096 componentWillMount: SpecPolicy.DEFINE_MANY,
2097
2098 /**
2099 * Invoked when the component has been mounted and has a DOM representation.
2100 * However, there is no guarantee that the DOM node is in the document.
2101 *
2102 * Use this as an opportunity to operate on the DOM when the component has
2103 * been mounted (initialized and rendered) for the first time.
2104 *
2105 * @param {DOMElement} rootNode DOM element representing the component.
2106 * @optional
2107 */
2108 componentDidMount: SpecPolicy.DEFINE_MANY,
2109
2110 /**
2111 * Invoked before the component receives new props.
2112 *
2113 * Use this as an opportunity to react to a prop transition by updating the
2114 * state using `this.setState`. Current props are accessed via `this.props`.
2115 *
2116 * componentWillReceiveProps: function(nextProps, nextContext) {
2117 * this.setState({
2118 * likesIncreasing: nextProps.likeCount > this.props.likeCount
2119 * });
2120 * }
2121 *
2122 * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop
2123 * transition may cause a state change, but the opposite is not true. If you
2124 * need it, you are probably looking for `componentWillUpdate`.
2125 *
2126 * @param {object} nextProps
2127 * @optional
2128 */
2129 componentWillReceiveProps: SpecPolicy.DEFINE_MANY,
2130
2131 /**
2132 * Invoked while deciding if the component should be updated as a result of
2133 * receiving new props, state and/or context.
2134 *
2135 * Use this as an opportunity to `return false` when you're certain that the
2136 * transition to the new props/state/context will not require a component
2137 * update.
2138 *
2139 * shouldComponentUpdate: function(nextProps, nextState, nextContext) {
2140 * return !equal(nextProps, this.props) ||
2141 * !equal(nextState, this.state) ||
2142 * !equal(nextContext, this.context);
2143 * }
2144 *
2145 * @param {object} nextProps
2146 * @param {?object} nextState
2147 * @param {?object} nextContext
2148 * @return {boolean} True if the component should update.
2149 * @optional
2150 */
2151 shouldComponentUpdate: SpecPolicy.DEFINE_ONCE,
2152
2153 /**
2154 * Invoked when the component is about to update due to a transition from
2155 * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`
2156 * and `nextContext`.
2157 *
2158 * Use this as an opportunity to perform preparation before an update occurs.
2159 *
2160 * NOTE: You **cannot** use `this.setState()` in this method.
2161 *
2162 * @param {object} nextProps
2163 * @param {?object} nextState
2164 * @param {?object} nextContext
2165 * @param {ReactReconcileTransaction} transaction
2166 * @optional
2167 */
2168 componentWillUpdate: SpecPolicy.DEFINE_MANY,
2169
2170 /**
2171 * Invoked when the component's DOM representation has been updated.
2172 *
2173 * Use this as an opportunity to operate on the DOM when the component has
2174 * been updated.
2175 *
2176 * @param {object} prevProps
2177 * @param {?object} prevState
2178 * @param {?object} prevContext
2179 * @param {DOMElement} rootNode DOM element representing the component.
2180 * @optional
2181 */
2182 componentDidUpdate: SpecPolicy.DEFINE_MANY,
2183
2184 /**
2185 * Invoked when the component is about to be removed from its parent and have
2186 * its DOM representation destroyed.
2187 *
2188 * Use this as an opportunity to deallocate any external resources.
2189 *
2190 * NOTE: There is no `componentDidUnmount` since your component will have been
2191 * destroyed by that point.
2192 *
2193 * @optional
2194 */
2195 componentWillUnmount: SpecPolicy.DEFINE_MANY,
2196
2197 // ==== Advanced methods ====
2198
2199 /**
2200 * Updates the component's currently mounted DOM representation.
2201 *
2202 * By default, this implements React's rendering and reconciliation algorithm.
2203 * Sophisticated clients may wish to override this.
2204 *
2205 * @param {ReactReconcileTransaction} transaction
2206 * @internal
2207 * @overridable
2208 */
2209 updateComponent: SpecPolicy.OVERRIDE_BASE
2210
2211 };
2212
2213 /**
2214 * Mapping from class specification keys to special processing functions.
2215 *
2216 * Although these are declared like instance properties in the specification
2217 * when defining classes using `React.createClass`, they are actually static
2218 * and are accessible on the constructor instead of the prototype. Despite
2219 * being static, they must be defined outside of the "statics" key under
2220 * which all other static methods are defined.
2221 */
2222 var RESERVED_SPEC_KEYS = {
2223 displayName: function (Constructor, displayName) {
2224 Constructor.displayName = displayName;
2225 },
2226 mixins: function (Constructor, mixins) {
2227 if (mixins) {
2228 for (var i = 0; i < mixins.length; i++) {
2229 mixSpecIntoComponent(Constructor, mixins[i]);
2230 }
2231 }
2232 },
2233 childContextTypes: function (Constructor, childContextTypes) {
2234 if ((undefined) !== 'production') {
2235 validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
2236 }
2237 Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
2238 },
2239 contextTypes: function (Constructor, contextTypes) {
2240 if ((undefined) !== 'production') {
2241 validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
2242 }
2243 Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
2244 },
2245 /**
2246 * Special case getDefaultProps which should move into statics but requires
2247 * automatic merging.
2248 */
2249 getDefaultProps: function (Constructor, getDefaultProps) {
2250 if (Constructor.getDefaultProps) {
2251 Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps);
2252 } else {
2253 Constructor.getDefaultProps = getDefaultProps;
2254 }
2255 },
2256 propTypes: function (Constructor, propTypes) {
2257 if ((undefined) !== 'production') {
2258 validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
2259 }
2260 Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
2261 },
2262 statics: function (Constructor, statics) {
2263 mixStaticSpecIntoComponent(Constructor, statics);
2264 },
2265 autobind: function () {} };
2266
2267 // noop
2268 function validateTypeDef(Constructor, typeDef, location) {
2269 for (var propName in typeDef) {
2270 if (typeDef.hasOwnProperty(propName)) {
2271 // use a warning instead of an invariant so components
2272 // don't show up in prod but only in __DEV__
2273 (undefined) !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
2274 }
2275 }
2276 }
2277
2278 function validateMethodOverride(isAlreadyDefined, name) {
2279 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
2280
2281 // Disallow overriding of base class methods unless explicitly allowed.
2282 if (ReactClassMixin.hasOwnProperty(name)) {
2283 !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? (undefined) !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.', name) : _prodInvariant('73', name) : void 0;
2284 }
2285
2286 // Disallow defining methods more than once unless explicitly allowed.
2287 if (isAlreadyDefined) {
2288 !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? (undefined) !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('74', name) : void 0;
2289 }
2290 }
2291
2292 /**
2293 * Mixin helper which handles policy validation and reserved
2294 * specification keys when building React classes.
2295 */
2296 function mixSpecIntoComponent(Constructor, spec) {
2297 if (!spec) {
2298 if ((undefined) !== 'production') {
2299 var typeofSpec = typeof spec;
2300 var isMixinValid = typeofSpec === 'object' && spec !== null;
2301
2302 (undefined) !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0;
2303 }
2304
2305 return;
2306 }
2307
2308 !(typeof spec !== 'function') ? (undefined) !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component class or function as a mixin. Instead, just use a regular object.') : _prodInvariant('75') : void 0;
2309 !!ReactElement.isValidElement(spec) ? (undefined) !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to use a component as a mixin. Instead, just use a regular object.') : _prodInvariant('76') : void 0;
2310
2311 var proto = Constructor.prototype;
2312 var autoBindPairs = proto.__reactAutoBindPairs;
2313
2314 // By handling mixins before any other properties, we ensure the same
2315 // chaining order is applied to methods with DEFINE_MANY policy, whether
2316 // mixins are listed before or after these methods in the spec.
2317 if (spec.hasOwnProperty(MIXINS_KEY)) {
2318 RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);
2319 }
2320
2321 for (var name in spec) {
2322 if (!spec.hasOwnProperty(name)) {
2323 continue;
2324 }
2325
2326 if (name === MIXINS_KEY) {
2327 // We have already handled mixins in a special case above.
2328 continue;
2329 }
2330
2331 var property = spec[name];
2332 var isAlreadyDefined = proto.hasOwnProperty(name);
2333 validateMethodOverride(isAlreadyDefined, name);
2334
2335 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
2336 RESERVED_SPEC_KEYS[name](Constructor, property);
2337 } else {
2338 // Setup methods on prototype:
2339 // The following member methods should not be automatically bound:
2340 // 1. Expected ReactClass methods (in the "interface").
2341 // 2. Overridden methods (that were mixed in).
2342 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
2343 var isFunction = typeof property === 'function';
2344 var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
2345
2346 if (shouldAutoBind) {
2347 autoBindPairs.push(name, property);
2348 proto[name] = property;
2349 } else {
2350 if (isAlreadyDefined) {
2351 var specPolicy = ReactClassInterface[name];
2352
2353 // These cases should already be caught by validateMethodOverride.
2354 !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? (undefined) !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.', specPolicy, name) : _prodInvariant('77', specPolicy, name) : void 0;
2355
2356 // For methods which are defined more than once, call the existing
2357 // methods before calling the new property, merging if appropriate.
2358 if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) {
2359 proto[name] = createMergedResultFunction(proto[name], property);
2360 } else if (specPolicy === SpecPolicy.DEFINE_MANY) {
2361 proto[name] = createChainedFunction(proto[name], property);
2362 }
2363 } else {
2364 proto[name] = property;
2365 if ((undefined) !== 'production') {
2366 // Add verbose displayName to the function, which helps when looking
2367 // at profiling tools.
2368 if (typeof property === 'function' && spec.displayName) {
2369 proto[name].displayName = spec.displayName + '_' + name;
2370 }
2371 }
2372 }
2373 }
2374 }
2375 }
2376 }
2377
2378 function mixStaticSpecIntoComponent(Constructor, statics) {
2379 if (!statics) {
2380 return;
2381 }
2382 for (var name in statics) {
2383 var property = statics[name];
2384 if (!statics.hasOwnProperty(name)) {
2385 continue;
2386 }
2387
2388 var isReserved = name in RESERVED_SPEC_KEYS;
2389 !!isReserved ? (undefined) !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.', name) : _prodInvariant('78', name) : void 0;
2390
2391 var isInherited = name in Constructor;
2392 !!isInherited ? (undefined) !== 'production' ? invariant(false, 'ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.', name) : _prodInvariant('79', name) : void 0;
2393 Constructor[name] = property;
2394 }
2395 }
2396
2397 /**
2398 * Merge two objects, but throw if both contain the same key.
2399 *
2400 * @param {object} one The first object, which is mutated.
2401 * @param {object} two The second object
2402 * @return {object} one after it has been mutated to contain everything in two.
2403 */
2404 function mergeIntoWithNoDuplicateKeys(one, two) {
2405 !(one && two && typeof one === 'object' && typeof two === 'object') ? (undefined) !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : _prodInvariant('80') : void 0;
2406
2407 for (var key in two) {
2408 if (two.hasOwnProperty(key)) {
2409 !(one[key] === undefined) ? (undefined) !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.', key) : _prodInvariant('81', key) : void 0;
2410 one[key] = two[key];
2411 }
2412 }
2413 return one;
2414 }
2415
2416 /**
2417 * Creates a function that invokes two functions and merges their return values.
2418 *
2419 * @param {function} one Function to invoke first.
2420 * @param {function} two Function to invoke second.
2421 * @return {function} Function that invokes the two argument functions.
2422 * @private
2423 */
2424 function createMergedResultFunction(one, two) {
2425 return function mergedResult() {
2426 var a = one.apply(this, arguments);
2427 var b = two.apply(this, arguments);
2428 if (a == null) {
2429 return b;
2430 } else if (b == null) {
2431 return a;
2432 }
2433 var c = {};
2434 mergeIntoWithNoDuplicateKeys(c, a);
2435 mergeIntoWithNoDuplicateKeys(c, b);
2436 return c;
2437 };
2438 }
2439
2440 /**
2441 * Creates a function that invokes two functions and ignores their return vales.
2442 *
2443 * @param {function} one Function to invoke first.
2444 * @param {function} two Function to invoke second.
2445 * @return {function} Function that invokes the two argument functions.
2446 * @private
2447 */
2448 function createChainedFunction(one, two) {
2449 return function chainedFunction() {
2450 one.apply(this, arguments);
2451 two.apply(this, arguments);
2452 };
2453 }
2454
2455 /**
2456 * Binds a method to the component.
2457 *
2458 * @param {object} component Component whose method is going to be bound.
2459 * @param {function} method Method to be bound.
2460 * @return {function} The bound method.
2461 */
2462 function bindAutoBindMethod(component, method) {
2463 var boundMethod = method.bind(component);
2464 if ((undefined) !== 'production') {
2465 boundMethod.__reactBoundContext = component;
2466 boundMethod.__reactBoundMethod = method;
2467 boundMethod.__reactBoundArguments = null;
2468 var componentName = component.constructor.displayName;
2469 var _bind = boundMethod.bind;
2470 boundMethod.bind = function (newThis) {
2471 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
2472 args[_key - 1] = arguments[_key];
2473 }
2474
2475 // User is trying to bind() an autobound method; we effectively will
2476 // ignore the value of "this" that the user is trying to use, so
2477 // let's warn.
2478 if (newThis !== component && newThis !== null) {
2479 (undefined) !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
2480 } else if (!args.length) {
2481 (undefined) !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
2482 return boundMethod;
2483 }
2484 var reboundMethod = _bind.apply(boundMethod, arguments);
2485 reboundMethod.__reactBoundContext = component;
2486 reboundMethod.__reactBoundMethod = method;
2487 reboundMethod.__reactBoundArguments = args;
2488 return reboundMethod;
2489 };
2490 }
2491 return boundMethod;
2492 }
2493
2494 /**
2495 * Binds all auto-bound methods in a component.
2496 *
2497 * @param {object} component Component whose method is going to be bound.
2498 */
2499 function bindAutoBindMethods(component) {
2500 var pairs = component.__reactAutoBindPairs;
2501 for (var i = 0; i < pairs.length; i += 2) {
2502 var autoBindKey = pairs[i];
2503 var method = pairs[i + 1];
2504 component[autoBindKey] = bindAutoBindMethod(component, method);
2505 }
2506 }
2507
2508 /**
2509 * Add more to the ReactClass base class. These are all legacy features and
2510 * therefore not already part of the modern ReactComponent.
2511 */
2512 var ReactClassMixin = {
2513
2514 /**
2515 * TODO: This will be deprecated because state should always keep a consistent
2516 * type signature and the only use case for this, is to avoid that.
2517 */
2518 replaceState: function (newState, callback) {
2519 this.updater.enqueueReplaceState(this, newState);
2520 if (callback) {
2521 this.updater.enqueueCallback(this, callback, 'replaceState');
2522 }
2523 },
2524
2525 /**
2526 * Checks whether or not this composite component is mounted.
2527 * @return {boolean} True if mounted, false otherwise.
2528 * @protected
2529 * @final
2530 */
2531 isMounted: function () {
2532 return this.updater.isMounted(this);
2533 }
2534 };
2535
2536 var ReactClassComponent = function () {};
2537 _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
2538
2539 /**
2540 * Module for creating composite components.
2541 *
2542 * @class ReactClass
2543 */
2544 var ReactClass = {
2545
2546 /**
2547 * Creates a composite component class given a class specification.
2548 * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass
2549 *
2550 * @param {object} spec Class specification (which must define `render`).
2551 * @return {function} Component constructor function.
2552 * @public
2553 */
2554 createClass: function (spec) {
2555 var Constructor = function (props, context, updater) {
2556 // This constructor gets overridden by mocks. The argument is used
2557 // by mocks to assert on what gets mounted.
2558
2559 if ((undefined) !== 'production') {
2560 (undefined) !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
2561 }
2562
2563 // Wire up auto-binding
2564 if (this.__reactAutoBindPairs.length) {
2565 bindAutoBindMethods(this);
2566 }
2567
2568 this.props = props;
2569 this.context = context;
2570 this.refs = emptyObject;
2571 this.updater = updater || ReactNoopUpdateQueue;
2572
2573 this.state = null;
2574
2575 // ReactClasses doesn't have constructors. Instead, they use the
2576 // getInitialState and componentWillMount methods for initialization.
2577
2578 var initialState = this.getInitialState ? this.getInitialState() : null;
2579 if ((undefined) !== 'production') {
2580 // We allow auto-mocks to proceed as if they're returning null.
2581 if (initialState === undefined && this.getInitialState._isMockFunction) {
2582 // This is probably bad practice. Consider warning here and
2583 // deprecating this convenience.
2584 initialState = null;
2585 }
2586 }
2587 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? (undefined) !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : _prodInvariant('82', Constructor.displayName || 'ReactCompositeComponent') : void 0;
2588
2589 this.state = initialState;
2590 };
2591 Constructor.prototype = new ReactClassComponent();
2592 Constructor.prototype.constructor = Constructor;
2593 Constructor.prototype.__reactAutoBindPairs = [];
2594
2595 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
2596
2597 mixSpecIntoComponent(Constructor, spec);
2598
2599 // Initialize the defaultProps property after all mixins have been merged.
2600 if (Constructor.getDefaultProps) {
2601 Constructor.defaultProps = Constructor.getDefaultProps();
2602 }
2603
2604 if ((undefined) !== 'production') {
2605 // This is a tag to indicate that the use of these method names is ok,
2606 // since it's used with createClass. If it's not, then it's likely a
2607 // mistake so we'll warn you to use the static property, property
2608 // initializer or constructor respectively.
2609 if (Constructor.getDefaultProps) {
2610 Constructor.getDefaultProps.isReactClassApproved = {};
2611 }
2612 if (Constructor.prototype.getInitialState) {
2613 Constructor.prototype.getInitialState.isReactClassApproved = {};
2614 }
2615 }
2616
2617 !Constructor.prototype.render ? (undefined) !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : _prodInvariant('83') : void 0;
2618
2619 if ((undefined) !== 'production') {
2620 (undefined) !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%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.', spec.displayName || 'A component') : void 0;
2621 (undefined) !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
2622 }
2623
2624 // Reduce time spent doing lookups by setting these on the prototype.
2625 for (var methodName in ReactClassInterface) {
2626 if (!Constructor.prototype[methodName]) {
2627 Constructor.prototype[methodName] = null;
2628 }
2629 }
2630
2631 return Constructor;
2632 },
2633
2634 injection: {
2635 injectMixin: function (mixin) {
2636 injectedMixins.push(mixin);
2637 }
2638 }
2639
2640 };
2641
2642 module.exports = ReactClass;
2643
2644/***/ },
2645/* 109 */
2646/***/ function(module, exports, __webpack_require__) {
2647
2648 /**
2649 * Copyright 2013-present, Facebook, Inc.
2650 * All rights reserved.
2651 *
2652 * This source code is licensed under the BSD-style license found in the
2653 * LICENSE file in the root directory of this source tree. An additional grant
2654 * of patent rights can be found in the PATENTS file in the same directory.
2655 *
2656 * @providesModule ReactPropTypeLocations
2657 */
2658
2659 'use strict';
2660
2661 var keyMirror = __webpack_require__(110);
2662
2663 var ReactPropTypeLocations = keyMirror({
2664 prop: null,
2665 context: null,
2666 childContext: null
2667 });
2668
2669 module.exports = ReactPropTypeLocations;
2670
2671/***/ },
2672/* 110 */
2673/***/ function(module, exports, __webpack_require__) {
2674
2675 /**
2676 * Copyright (c) 2013-present, Facebook, Inc.
2677 * All rights reserved.
2678 *
2679 * This source code is licensed under the BSD-style license found in the
2680 * LICENSE file in the root directory of this source tree. An additional grant
2681 * of patent rights can be found in the PATENTS file in the same directory.
2682 *
2683 * @typechecks static-only
2684 */
2685
2686 'use strict';
2687
2688 var invariant = __webpack_require__(95);
2689
2690 /**
2691 * Constructs an enumeration with keys equal to their value.
2692 *
2693 * For example:
2694 *
2695 * var COLORS = keyMirror({blue: null, red: null});
2696 * var myColor = COLORS.blue;
2697 * var isColorValid = !!COLORS[myColor];
2698 *
2699 * The last line could not be performed if the values of the generated enum were
2700 * not equal to their keys.
2701 *
2702 * Input: {key1: val1, key2: val2}
2703 * Output: {key1: key1, key2: key2}
2704 *
2705 * @param {object} obj
2706 * @return {object}
2707 */
2708 var keyMirror = function keyMirror(obj) {
2709 var ret = {};
2710 var key;
2711 !(obj instanceof Object && !Array.isArray(obj)) ? (undefined) !== 'production' ? invariant(false, 'keyMirror(...): Argument must be an object.') : invariant(false) : void 0;
2712 for (key in obj) {
2713 if (!obj.hasOwnProperty(key)) {
2714 continue;
2715 }
2716 ret[key] = key;
2717 }
2718 return ret;
2719 };
2720
2721 module.exports = keyMirror;
2722
2723/***/ },
2724/* 111 */
2725/***/ function(module, exports, __webpack_require__) {
2726
2727 /**
2728 * Copyright 2013-present, Facebook, Inc.
2729 * All rights reserved.
2730 *
2731 * This source code is licensed under the BSD-style license found in the
2732 * LICENSE file in the root directory of this source tree. An additional grant
2733 * of patent rights can be found in the PATENTS file in the same directory.
2734 *
2735 * @providesModule ReactPropTypeLocationNames
2736 */
2737
2738 'use strict';
2739
2740 var ReactPropTypeLocationNames = {};
2741
2742 if ((undefined) !== 'production') {
2743 ReactPropTypeLocationNames = {
2744 prop: 'prop',
2745 context: 'context',
2746 childContext: 'child context'
2747 };
2748 }
2749
2750 module.exports = ReactPropTypeLocationNames;
2751
2752/***/ },
2753/* 112 */
2754/***/ function(module, exports) {
2755
2756 "use strict";
2757
2758 /**
2759 * Copyright (c) 2013-present, Facebook, Inc.
2760 * All rights reserved.
2761 *
2762 * This source code is licensed under the BSD-style license found in the
2763 * LICENSE file in the root directory of this source tree. An additional grant
2764 * of patent rights can be found in the PATENTS file in the same directory.
2765 *
2766 */
2767
2768 /**
2769 * Allows extraction of a minified key. Let's the build system minify keys
2770 * without losing the ability to dynamically use key strings as values
2771 * themselves. Pass in an object with a single key/val pair and it will return
2772 * you the string key of that single record. Suppose you want to grab the
2773 * value for a key 'className' inside of an object. Key/val minification may
2774 * have aliased that key to be 'xa12'. keyOf({className: null}) will return
2775 * 'xa12' in that case. Resolve keys you want to use once at startup time, then
2776 * reuse those resolutions.
2777 */
2778 var keyOf = function keyOf(oneKeyObj) {
2779 var key;
2780 for (key in oneKeyObj) {
2781 if (!oneKeyObj.hasOwnProperty(key)) {
2782 continue;
2783 }
2784 return key;
2785 }
2786 return null;
2787 };
2788
2789 module.exports = keyOf;
2790
2791/***/ },
2792/* 113 */
2793/***/ function(module, exports, __webpack_require__) {
2794
2795 /**
2796 * Copyright 2013-present, Facebook, Inc.
2797 * All rights reserved.
2798 *
2799 * This source code is licensed under the BSD-style license found in the
2800 * LICENSE file in the root directory of this source tree. An additional grant
2801 * of patent rights can be found in the PATENTS file in the same directory.
2802 *
2803 * @providesModule ReactDOMFactories
2804 */
2805
2806 'use strict';
2807
2808 var ReactElement = __webpack_require__(96);
2809
2810 /**
2811 * Create a factory that creates HTML tag elements.
2812 *
2813 * @private
2814 */
2815 var createDOMFactory = ReactElement.createFactory;
2816 if ((undefined) !== 'production') {
2817 var ReactElementValidator = __webpack_require__(114);
2818 createDOMFactory = ReactElementValidator.createFactory;
2819 }
2820
2821 /**
2822 * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes.
2823 * This is also accessible via `React.DOM`.
2824 *
2825 * @public
2826 */
2827 var ReactDOMFactories = {
2828 a: createDOMFactory('a'),
2829 abbr: createDOMFactory('abbr'),
2830 address: createDOMFactory('address'),
2831 area: createDOMFactory('area'),
2832 article: createDOMFactory('article'),
2833 aside: createDOMFactory('aside'),
2834 audio: createDOMFactory('audio'),
2835 b: createDOMFactory('b'),
2836 base: createDOMFactory('base'),
2837 bdi: createDOMFactory('bdi'),
2838 bdo: createDOMFactory('bdo'),
2839 big: createDOMFactory('big'),
2840 blockquote: createDOMFactory('blockquote'),
2841 body: createDOMFactory('body'),
2842 br: createDOMFactory('br'),
2843 button: createDOMFactory('button'),
2844 canvas: createDOMFactory('canvas'),
2845 caption: createDOMFactory('caption'),
2846 cite: createDOMFactory('cite'),
2847 code: createDOMFactory('code'),
2848 col: createDOMFactory('col'),
2849 colgroup: createDOMFactory('colgroup'),
2850 data: createDOMFactory('data'),
2851 datalist: createDOMFactory('datalist'),
2852 dd: createDOMFactory('dd'),
2853 del: createDOMFactory('del'),
2854 details: createDOMFactory('details'),
2855 dfn: createDOMFactory('dfn'),
2856 dialog: createDOMFactory('dialog'),
2857 div: createDOMFactory('div'),
2858 dl: createDOMFactory('dl'),
2859 dt: createDOMFactory('dt'),
2860 em: createDOMFactory('em'),
2861 embed: createDOMFactory('embed'),
2862 fieldset: createDOMFactory('fieldset'),
2863 figcaption: createDOMFactory('figcaption'),
2864 figure: createDOMFactory('figure'),
2865 footer: createDOMFactory('footer'),
2866 form: createDOMFactory('form'),
2867 h1: createDOMFactory('h1'),
2868 h2: createDOMFactory('h2'),
2869 h3: createDOMFactory('h3'),
2870 h4: createDOMFactory('h4'),
2871 h5: createDOMFactory('h5'),
2872 h6: createDOMFactory('h6'),
2873 head: createDOMFactory('head'),
2874 header: createDOMFactory('header'),
2875 hgroup: createDOMFactory('hgroup'),
2876 hr: createDOMFactory('hr'),
2877 html: createDOMFactory('html'),
2878 i: createDOMFactory('i'),
2879 iframe: createDOMFactory('iframe'),
2880 img: createDOMFactory('img'),
2881 input: createDOMFactory('input'),
2882 ins: createDOMFactory('ins'),
2883 kbd: createDOMFactory('kbd'),
2884 keygen: createDOMFactory('keygen'),
2885 label: createDOMFactory('label'),
2886 legend: createDOMFactory('legend'),
2887 li: createDOMFactory('li'),
2888 link: createDOMFactory('link'),
2889 main: createDOMFactory('main'),
2890 map: createDOMFactory('map'),
2891 mark: createDOMFactory('mark'),
2892 menu: createDOMFactory('menu'),
2893 menuitem: createDOMFactory('menuitem'),
2894 meta: createDOMFactory('meta'),
2895 meter: createDOMFactory('meter'),
2896 nav: createDOMFactory('nav'),
2897 noscript: createDOMFactory('noscript'),
2898 object: createDOMFactory('object'),
2899 ol: createDOMFactory('ol'),
2900 optgroup: createDOMFactory('optgroup'),
2901 option: createDOMFactory('option'),
2902 output: createDOMFactory('output'),
2903 p: createDOMFactory('p'),
2904 param: createDOMFactory('param'),
2905 picture: createDOMFactory('picture'),
2906 pre: createDOMFactory('pre'),
2907 progress: createDOMFactory('progress'),
2908 q: createDOMFactory('q'),
2909 rp: createDOMFactory('rp'),
2910 rt: createDOMFactory('rt'),
2911 ruby: createDOMFactory('ruby'),
2912 s: createDOMFactory('s'),
2913 samp: createDOMFactory('samp'),
2914 script: createDOMFactory('script'),
2915 section: createDOMFactory('section'),
2916 select: createDOMFactory('select'),
2917 small: createDOMFactory('small'),
2918 source: createDOMFactory('source'),
2919 span: createDOMFactory('span'),
2920 strong: createDOMFactory('strong'),
2921 style: createDOMFactory('style'),
2922 sub: createDOMFactory('sub'),
2923 summary: createDOMFactory('summary'),
2924 sup: createDOMFactory('sup'),
2925 table: createDOMFactory('table'),
2926 tbody: createDOMFactory('tbody'),
2927 td: createDOMFactory('td'),
2928 textarea: createDOMFactory('textarea'),
2929 tfoot: createDOMFactory('tfoot'),
2930 th: createDOMFactory('th'),
2931 thead: createDOMFactory('thead'),
2932 time: createDOMFactory('time'),
2933 title: createDOMFactory('title'),
2934 tr: createDOMFactory('tr'),
2935 track: createDOMFactory('track'),
2936 u: createDOMFactory('u'),
2937 ul: createDOMFactory('ul'),
2938 'var': createDOMFactory('var'),
2939 video: createDOMFactory('video'),
2940 wbr: createDOMFactory('wbr'),
2941
2942 // SVG
2943 circle: createDOMFactory('circle'),
2944 clipPath: createDOMFactory('clipPath'),
2945 defs: createDOMFactory('defs'),
2946 ellipse: createDOMFactory('ellipse'),
2947 g: createDOMFactory('g'),
2948 image: createDOMFactory('image'),
2949 line: createDOMFactory('line'),
2950 linearGradient: createDOMFactory('linearGradient'),
2951 mask: createDOMFactory('mask'),
2952 path: createDOMFactory('path'),
2953 pattern: createDOMFactory('pattern'),
2954 polygon: createDOMFactory('polygon'),
2955 polyline: createDOMFactory('polyline'),
2956 radialGradient: createDOMFactory('radialGradient'),
2957 rect: createDOMFactory('rect'),
2958 stop: createDOMFactory('stop'),
2959 svg: createDOMFactory('svg'),
2960 text: createDOMFactory('text'),
2961 tspan: createDOMFactory('tspan')
2962 };
2963
2964 module.exports = ReactDOMFactories;
2965
2966/***/ },
2967/* 114 */
2968/***/ function(module, exports, __webpack_require__) {
2969
2970 /**
2971 * Copyright 2014-present, Facebook, Inc.
2972 * All rights reserved.
2973 *
2974 * This source code is licensed under the BSD-style license found in the
2975 * LICENSE file in the root directory of this source tree. An additional grant
2976 * of patent rights can be found in the PATENTS file in the same directory.
2977 *
2978 * @providesModule ReactElementValidator
2979 */
2980
2981 /**
2982 * ReactElementValidator provides a wrapper around a element factory
2983 * which validates the props passed to the element. This is intended to be
2984 * used only in DEV and could be replaced by a static type checker for languages
2985 * that support it.
2986 */
2987
2988 'use strict';
2989
2990 var ReactCurrentOwner = __webpack_require__(97);
2991 var ReactComponentTreeHook = __webpack_require__(115);
2992 var ReactElement = __webpack_require__(96);
2993 var ReactPropTypeLocations = __webpack_require__(109);
2994
2995 var checkReactTypeSpec = __webpack_require__(116);
2996
2997 var canDefineProperty = __webpack_require__(100);
2998 var getIteratorFn = __webpack_require__(102);
2999 var warning = __webpack_require__(98);
3000
3001 function getDeclarationErrorAddendum() {
3002 if (ReactCurrentOwner.current) {
3003 var name = ReactCurrentOwner.current.getName();
3004 if (name) {
3005 return ' Check the render method of `' + name + '`.';
3006 }
3007 }
3008 return '';
3009 }
3010
3011 /**
3012 * Warn if there's no key explicitly set on dynamic arrays of children or
3013 * object keys are not valid. This allows us to keep track of children between
3014 * updates.
3015 */
3016 var ownerHasKeyUseWarning = {};
3017
3018 function getCurrentComponentErrorInfo(parentType) {
3019 var info = getDeclarationErrorAddendum();
3020
3021 if (!info) {
3022 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
3023 if (parentName) {
3024 info = ' Check the top-level render call using <' + parentName + '>.';
3025 }
3026 }
3027 return info;
3028 }
3029
3030 /**
3031 * Warn if the element doesn't have an explicit key assigned to it.
3032 * This element is in an array. The array could grow and shrink or be
3033 * reordered. All children that haven't already been validated are required to
3034 * have a "key" property assigned to it. Error statuses are cached so a warning
3035 * will only be shown once.
3036 *
3037 * @internal
3038 * @param {ReactElement} element Element that requires a key.
3039 * @param {*} parentType element's parent's type.
3040 */
3041 function validateExplicitKey(element, parentType) {
3042 if (!element._store || element._store.validated || element.key != null) {
3043 return;
3044 }
3045 element._store.validated = true;
3046
3047 var memoizer = ownerHasKeyUseWarning.uniqueKey || (ownerHasKeyUseWarning.uniqueKey = {});
3048
3049 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
3050 if (memoizer[currentComponentErrorInfo]) {
3051 return;
3052 }
3053 memoizer[currentComponentErrorInfo] = true;
3054
3055 // Usually the current owner is the offender, but if it accepts children as a
3056 // property, it may be the creator of the child that's responsible for
3057 // assigning it a key.
3058 var childOwner = '';
3059 if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
3060 // Give the component that originally created this child.
3061 childOwner = ' It was passed a child from ' + element._owner.getName() + '.';
3062 }
3063
3064 (undefined) !== '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;
3065 }
3066
3067 /**
3068 * Ensure that every element either is passed in a static location, in an
3069 * array with an explicit keys property defined, or in an object literal
3070 * with valid key property.
3071 *
3072 * @internal
3073 * @param {ReactNode} node Statically passed child of any type.
3074 * @param {*} parentType node's parent's type.
3075 */
3076 function validateChildKeys(node, parentType) {
3077 if (typeof node !== 'object') {
3078 return;
3079 }
3080 if (Array.isArray(node)) {
3081 for (var i = 0; i < node.length; i++) {
3082 var child = node[i];
3083 if (ReactElement.isValidElement(child)) {
3084 validateExplicitKey(child, parentType);
3085 }
3086 }
3087 } else if (ReactElement.isValidElement(node)) {
3088 // This element was passed in a valid location.
3089 if (node._store) {
3090 node._store.validated = true;
3091 }
3092 } else if (node) {
3093 var iteratorFn = getIteratorFn(node);
3094 // Entry iterators provide implicit keys.
3095 if (iteratorFn) {
3096 if (iteratorFn !== node.entries) {
3097 var iterator = iteratorFn.call(node);
3098 var step;
3099 while (!(step = iterator.next()).done) {
3100 if (ReactElement.isValidElement(step.value)) {
3101 validateExplicitKey(step.value, parentType);
3102 }
3103 }
3104 }
3105 }
3106 }
3107 }
3108
3109 /**
3110 * Given an element, validate that its props follow the propTypes definition,
3111 * provided by the type.
3112 *
3113 * @param {ReactElement} element
3114 */
3115 function validatePropTypes(element) {
3116 var componentClass = element.type;
3117 if (typeof componentClass !== 'function') {
3118 return;
3119 }
3120 var name = componentClass.displayName || componentClass.name;
3121 if (componentClass.propTypes) {
3122 checkReactTypeSpec(componentClass.propTypes, element.props, ReactPropTypeLocations.prop, name, element, null);
3123 }
3124 if (typeof componentClass.getDefaultProps === 'function') {
3125 (undefined) !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
3126 }
3127 }
3128
3129 var ReactElementValidator = {
3130
3131 createElement: function (type, props, children) {
3132 var validType = typeof type === 'string' || typeof type === 'function';
3133 // We warn in this case but don't throw. We expect the element creation to
3134 // succeed and there will likely be errors in render.
3135 if (!validType) {
3136 (undefined) !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
3137 }
3138
3139 var element = ReactElement.createElement.apply(this, arguments);
3140
3141 // The result can be nullish if a mock or a custom function is used.
3142 // TODO: Drop this when these are no longer allowed as the type argument.
3143 if (element == null) {
3144 return element;
3145 }
3146
3147 // Skip key warning if the type isn't valid since our key validation logic
3148 // doesn't expect a non-string/function type and can throw confusing errors.
3149 // We don't want exception behavior to differ between dev and prod.
3150 // (Rendering will throw with a helpful message and as soon as the type is
3151 // fixed, the key warnings will appear.)
3152 if (validType) {
3153 for (var i = 2; i < arguments.length; i++) {
3154 validateChildKeys(arguments[i], type);
3155 }
3156 }
3157
3158 validatePropTypes(element);
3159
3160 return element;
3161 },
3162
3163 createFactory: function (type) {
3164 var validatedFactory = ReactElementValidator.createElement.bind(null, type);
3165 // Legacy hook TODO: Warn if this is accessed
3166 validatedFactory.type = type;
3167
3168 if ((undefined) !== 'production') {
3169 if (canDefineProperty) {
3170 Object.defineProperty(validatedFactory, 'type', {
3171 enumerable: false,
3172 get: function () {
3173 (undefined) !== 'production' ? warning(false, 'Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.') : void 0;
3174 Object.defineProperty(this, 'type', {
3175 value: type
3176 });
3177 return type;
3178 }
3179 });
3180 }
3181 }
3182
3183 return validatedFactory;
3184 },
3185
3186 cloneElement: function (element, props, children) {
3187 var newElement = ReactElement.cloneElement.apply(this, arguments);
3188 for (var i = 2; i < arguments.length; i++) {
3189 validateChildKeys(arguments[i], newElement.type);
3190 }
3191 validatePropTypes(newElement);
3192 return newElement;
3193 }
3194
3195 };
3196
3197 module.exports = ReactElementValidator;
3198
3199/***/ },
3200/* 115 */
3201/***/ function(module, exports, __webpack_require__) {
3202
3203 /**
3204 * Copyright 2016-present, Facebook, Inc.
3205 * All rights reserved.
3206 *
3207 * This source code is licensed under the BSD-style license found in the
3208 * LICENSE file in the root directory of this source tree. An additional grant
3209 * of patent rights can be found in the PATENTS file in the same directory.
3210 *
3211 * @providesModule ReactComponentTreeHook
3212 */
3213
3214 'use strict';
3215
3216 var _prodInvariant = __webpack_require__(94);
3217
3218 var ReactCurrentOwner = __webpack_require__(97);
3219
3220 var invariant = __webpack_require__(95);
3221 var warning = __webpack_require__(98);
3222
3223 function isNative(fn) {
3224 // Based on isNative() from Lodash
3225 var funcToString = Function.prototype.toString;
3226 var hasOwnProperty = Object.prototype.hasOwnProperty;
3227 var reIsNative = RegExp('^' + funcToString
3228 // Take an example native function source for comparison
3229 .call(hasOwnProperty)
3230 // Strip regex characters so we can use it for regex
3231 .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
3232 // Remove hasOwnProperty from the template to make it generic
3233 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
3234 try {
3235 var source = funcToString.call(fn);
3236 return reIsNative.test(source);
3237 } catch (err) {
3238 return false;
3239 }
3240 }
3241
3242 var canUseCollections =
3243 // Array.from
3244 typeof Array.from === 'function' &&
3245 // Map
3246 typeof Map === 'function' && isNative(Map) &&
3247 // Map.prototype.keys
3248 Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) &&
3249 // Set
3250 typeof Set === 'function' && isNative(Set) &&
3251 // Set.prototype.keys
3252 Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys);
3253
3254 var itemMap;
3255 var rootIDSet;
3256
3257 var itemByKey;
3258 var rootByKey;
3259
3260 if (canUseCollections) {
3261 itemMap = new Map();
3262 rootIDSet = new Set();
3263 } else {
3264 itemByKey = {};
3265 rootByKey = {};
3266 }
3267
3268 var unmountedIDs = [];
3269
3270 // Use non-numeric keys to prevent V8 performance issues:
3271 // https://github.com/facebook/react/pull/7232
3272 function getKeyFromID(id) {
3273 return '.' + id;
3274 }
3275 function getIDFromKey(key) {
3276 return parseInt(key.substr(1), 10);
3277 }
3278
3279 function get(id) {
3280 if (canUseCollections) {
3281 return itemMap.get(id);
3282 } else {
3283 var key = getKeyFromID(id);
3284 return itemByKey[key];
3285 }
3286 }
3287
3288 function remove(id) {
3289 if (canUseCollections) {
3290 itemMap['delete'](id);
3291 } else {
3292 var key = getKeyFromID(id);
3293 delete itemByKey[key];
3294 }
3295 }
3296
3297 function create(id, element, parentID) {
3298 var item = {
3299 element: element,
3300 parentID: parentID,
3301 text: null,
3302 childIDs: [],
3303 isMounted: false,
3304 updateCount: 0
3305 };
3306
3307 if (canUseCollections) {
3308 itemMap.set(id, item);
3309 } else {
3310 var key = getKeyFromID(id);
3311 itemByKey[key] = item;
3312 }
3313 }
3314
3315 function addRoot(id) {
3316 if (canUseCollections) {
3317 rootIDSet.add(id);
3318 } else {
3319 var key = getKeyFromID(id);
3320 rootByKey[key] = true;
3321 }
3322 }
3323
3324 function removeRoot(id) {
3325 if (canUseCollections) {
3326 rootIDSet['delete'](id);
3327 } else {
3328 var key = getKeyFromID(id);
3329 delete rootByKey[key];
3330 }
3331 }
3332
3333 function getRegisteredIDs() {
3334 if (canUseCollections) {
3335 return Array.from(itemMap.keys());
3336 } else {
3337 return Object.keys(itemByKey).map(getIDFromKey);
3338 }
3339 }
3340
3341 function getRootIDs() {
3342 if (canUseCollections) {
3343 return Array.from(rootIDSet.keys());
3344 } else {
3345 return Object.keys(rootByKey).map(getIDFromKey);
3346 }
3347 }
3348
3349 function purgeDeep(id) {
3350 var item = get(id);
3351 if (item) {
3352 var childIDs = item.childIDs;
3353
3354 remove(id);
3355 childIDs.forEach(purgeDeep);
3356 }
3357 }
3358
3359 function describeComponentFrame(name, source, ownerName) {
3360 return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
3361 }
3362
3363 function getDisplayName(element) {
3364 if (element == null) {
3365 return '#empty';
3366 } else if (typeof element === 'string' || typeof element === 'number') {
3367 return '#text';
3368 } else if (typeof element.type === 'string') {
3369 return element.type;
3370 } else {
3371 return element.type.displayName || element.type.name || 'Unknown';
3372 }
3373 }
3374
3375 function describeID(id) {
3376 var name = ReactComponentTreeHook.getDisplayName(id);
3377 var element = ReactComponentTreeHook.getElement(id);
3378 var ownerID = ReactComponentTreeHook.getOwnerID(id);
3379 var ownerName;
3380 if (ownerID) {
3381 ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
3382 }
3383 (undefined) !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
3384 return describeComponentFrame(name, element && element._source, ownerName);
3385 }
3386
3387 var ReactComponentTreeHook = {
3388 onSetChildren: function (id, nextChildIDs) {
3389 var item = get(id);
3390 item.childIDs = nextChildIDs;
3391
3392 for (var i = 0; i < nextChildIDs.length; i++) {
3393 var nextChildID = nextChildIDs[i];
3394 var nextChild = get(nextChildID);
3395 !nextChild ? (undefined) !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0;
3396 !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? (undefined) !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0;
3397 !nextChild.isMounted ? (undefined) !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0;
3398 if (nextChild.parentID == null) {
3399 nextChild.parentID = id;
3400 // TODO: This shouldn't be necessary but mounting a new root during in
3401 // componentWillMount currently causes not-yet-mounted components to
3402 // be purged from our tree data so their parent ID is missing.
3403 }
3404 !(nextChild.parentID === id) ? (undefined) !== '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;
3405 }
3406 },
3407 onBeforeMountComponent: function (id, element, parentID) {
3408 create(id, element, parentID);
3409 },
3410 onBeforeUpdateComponent: function (id, element) {
3411 var item = get(id);
3412 if (!item || !item.isMounted) {
3413 // We may end up here as a result of setState() in componentWillUnmount().
3414 // In this case, ignore the element.
3415 return;
3416 }
3417 item.element = element;
3418 },
3419 onMountComponent: function (id) {
3420 var item = get(id);
3421 item.isMounted = true;
3422 var isRoot = item.parentID === 0;
3423 if (isRoot) {
3424 addRoot(id);
3425 }
3426 },
3427 onUpdateComponent: function (id) {
3428 var item = get(id);
3429 if (!item || !item.isMounted) {
3430 // We may end up here as a result of setState() in componentWillUnmount().
3431 // In this case, ignore the element.
3432 return;
3433 }
3434 item.updateCount++;
3435 },
3436 onUnmountComponent: function (id) {
3437 var item = get(id);
3438 if (item) {
3439 // We need to check if it exists.
3440 // `item` might not exist if it is inside an error boundary, and a sibling
3441 // error boundary child threw while mounting. Then this instance never
3442 // got a chance to mount, but it still gets an unmounting event during
3443 // the error boundary cleanup.
3444 item.isMounted = false;
3445 var isRoot = item.parentID === 0;
3446 if (isRoot) {
3447 removeRoot(id);
3448 }
3449 }
3450 unmountedIDs.push(id);
3451 },
3452 purgeUnmountedComponents: function () {
3453 if (ReactComponentTreeHook._preventPurging) {
3454 // Should only be used for testing.
3455 return;
3456 }
3457
3458 for (var i = 0; i < unmountedIDs.length; i++) {
3459 var id = unmountedIDs[i];
3460 purgeDeep(id);
3461 }
3462 unmountedIDs.length = 0;
3463 },
3464 isMounted: function (id) {
3465 var item = get(id);
3466 return item ? item.isMounted : false;
3467 },
3468 getCurrentStackAddendum: function (topElement) {
3469 var info = '';
3470 if (topElement) {
3471 var type = topElement.type;
3472 var name = typeof type === 'function' ? type.displayName || type.name : type;
3473 var owner = topElement._owner;
3474 info += describeComponentFrame(name || 'Unknown', topElement._source, owner && owner.getName());
3475 }
3476
3477 var currentOwner = ReactCurrentOwner.current;
3478 var id = currentOwner && currentOwner._debugID;
3479
3480 info += ReactComponentTreeHook.getStackAddendumByID(id);
3481 return info;
3482 },
3483 getStackAddendumByID: function (id) {
3484 var info = '';
3485 while (id) {
3486 info += describeID(id);
3487 id = ReactComponentTreeHook.getParentID(id);
3488 }
3489 return info;
3490 },
3491 getChildIDs: function (id) {
3492 var item = get(id);
3493 return item ? item.childIDs : [];
3494 },
3495 getDisplayName: function (id) {
3496 var element = ReactComponentTreeHook.getElement(id);
3497 if (!element) {
3498 return null;
3499 }
3500 return getDisplayName(element);
3501 },
3502 getElement: function (id) {
3503 var item = get(id);
3504 return item ? item.element : null;
3505 },
3506 getOwnerID: function (id) {
3507 var element = ReactComponentTreeHook.getElement(id);
3508 if (!element || !element._owner) {
3509 return null;
3510 }
3511 return element._owner._debugID;
3512 },
3513 getParentID: function (id) {
3514 var item = get(id);
3515 return item ? item.parentID : null;
3516 },
3517 getSource: function (id) {
3518 var item = get(id);
3519 var element = item ? item.element : null;
3520 var source = element != null ? element._source : null;
3521 return source;
3522 },
3523 getText: function (id) {
3524 var element = ReactComponentTreeHook.getElement(id);
3525 if (typeof element === 'string') {
3526 return element;
3527 } else if (typeof element === 'number') {
3528 return '' + element;
3529 } else {
3530 return null;
3531 }
3532 },
3533 getUpdateCount: function (id) {
3534 var item = get(id);
3535 return item ? item.updateCount : 0;
3536 },
3537
3538
3539 getRegisteredIDs: getRegisteredIDs,
3540
3541 getRootIDs: getRootIDs
3542 };
3543
3544 module.exports = ReactComponentTreeHook;
3545
3546/***/ },
3547/* 116 */
3548/***/ function(module, exports, __webpack_require__) {
3549
3550 /* WEBPACK VAR INJECTION */(function(process) {/**
3551 * Copyright 2013-present, Facebook, Inc.
3552 * All rights reserved.
3553 *
3554 * This source code is licensed under the BSD-style license found in the
3555 * LICENSE file in the root directory of this source tree. An additional grant
3556 * of patent rights can be found in the PATENTS file in the same directory.
3557 *
3558 * @providesModule checkReactTypeSpec
3559 */
3560
3561 'use strict';
3562
3563 var _prodInvariant = __webpack_require__(94);
3564
3565 var ReactPropTypeLocationNames = __webpack_require__(111);
3566 var ReactPropTypesSecret = __webpack_require__(118);
3567
3568 var invariant = __webpack_require__(95);
3569 var warning = __webpack_require__(98);
3570
3571 var ReactComponentTreeHook;
3572
3573 if (typeof process !== 'undefined' && ({"NODE_ENV":undefined}) && (undefined) === 'test') {
3574 // Temporary hack.
3575 // Inline requires don't work well with Jest:
3576 // https://github.com/facebook/react/issues/7240
3577 // Remove the inline requires when we don't need them anymore:
3578 // https://github.com/facebook/react/pull/7178
3579 ReactComponentTreeHook = __webpack_require__(115);
3580 }
3581
3582 var loggedTypeFailures = {};
3583
3584 /**
3585 * Assert that the values match with the type specs.
3586 * Error messages are memorized and will only be shown once.
3587 *
3588 * @param {object} typeSpecs Map of name to a ReactPropType
3589 * @param {object} values Runtime values that need to be type-checked
3590 * @param {string} location e.g. "prop", "context", "child context"
3591 * @param {string} componentName Name of the component for error messages.
3592 * @param {?object} element The React element that is being type-checked
3593 * @param {?number} debugID The React component instance that is being type-checked
3594 * @private
3595 */
3596 function checkReactTypeSpec(typeSpecs, values, location, componentName, element, debugID) {
3597 for (var typeSpecName in typeSpecs) {
3598 if (typeSpecs.hasOwnProperty(typeSpecName)) {
3599 var error;
3600 // Prop type validation may throw. In case they do, we don't want to
3601 // fail the render phase where it didn't fail before. So we log it.
3602 // After these have been cleaned up, we'll let them throw.
3603 try {
3604 // This is intentionally an invariant that gets caught. It's the same
3605 // behavior as without this statement except with a better message.
3606 !(typeof typeSpecs[typeSpecName] === 'function') ? (undefined) !== '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;
3607 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
3608 } catch (ex) {
3609 error = ex;
3610 }
3611 (undefined) !== '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;
3612 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
3613 // Only monitor this failure once because there tends to be a lot of the
3614 // same error.
3615 loggedTypeFailures[error.message] = true;
3616
3617 var componentStackInfo = '';
3618
3619 if ((undefined) !== 'production') {
3620 if (!ReactComponentTreeHook) {
3621 ReactComponentTreeHook = __webpack_require__(115);
3622 }
3623 if (debugID !== null) {
3624 componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID);
3625 } else if (element !== null) {
3626 componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element);
3627 }
3628 }
3629
3630 (undefined) !== 'production' ? warning(false, 'Failed %s type: %s%s', location, error.message, componentStackInfo) : void 0;
3631 }
3632 }
3633 }
3634 }
3635
3636 module.exports = checkReactTypeSpec;
3637 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117)))
3638
3639/***/ },
3640/* 117 */
3641/***/ function(module, exports) {
3642
3643 // shim for using process in browser
3644 var process = module.exports = {};
3645
3646 // cached from whatever global is present so that test runners that stub it
3647 // don't break things. But we need to wrap it in a try catch in case it is
3648 // wrapped in strict mode code which doesn't define any globals. It's inside a
3649 // function because try/catches deoptimize in certain engines.
3650
3651 var cachedSetTimeout;
3652 var cachedClearTimeout;
3653
3654 function defaultSetTimout() {
3655 throw new Error('setTimeout has not been defined');
3656 }
3657 function defaultClearTimeout () {
3658 throw new Error('clearTimeout has not been defined');
3659 }
3660 (function () {
3661 try {
3662 if (typeof setTimeout === 'function') {
3663 cachedSetTimeout = setTimeout;
3664 } else {
3665 cachedSetTimeout = defaultSetTimout;
3666 }
3667 } catch (e) {
3668 cachedSetTimeout = defaultSetTimout;
3669 }
3670 try {
3671 if (typeof clearTimeout === 'function') {
3672 cachedClearTimeout = clearTimeout;
3673 } else {
3674 cachedClearTimeout = defaultClearTimeout;
3675 }
3676 } catch (e) {
3677 cachedClearTimeout = defaultClearTimeout;
3678 }
3679 } ())
3680 function runTimeout(fun) {
3681 if (cachedSetTimeout === setTimeout) {
3682 //normal enviroments in sane situations
3683 return setTimeout(fun, 0);
3684 }
3685 // if setTimeout wasn't available but was latter defined
3686 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
3687 cachedSetTimeout = setTimeout;
3688 return setTimeout(fun, 0);
3689 }
3690 try {
3691 // when when somebody has screwed with setTimeout but no I.E. maddness
3692 return cachedSetTimeout(fun, 0);
3693 } catch(e){
3694 try {
3695 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3696 return cachedSetTimeout.call(null, fun, 0);
3697 } catch(e){
3698 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
3699 return cachedSetTimeout.call(this, fun, 0);
3700 }
3701 }
3702
3703
3704 }
3705 function runClearTimeout(marker) {
3706 if (cachedClearTimeout === clearTimeout) {
3707 //normal enviroments in sane situations
3708 return clearTimeout(marker);
3709 }
3710 // if clearTimeout wasn't available but was latter defined
3711 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
3712 cachedClearTimeout = clearTimeout;
3713 return clearTimeout(marker);
3714 }
3715 try {
3716 // when when somebody has screwed with setTimeout but no I.E. maddness
3717 return cachedClearTimeout(marker);
3718 } catch (e){
3719 try {
3720 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
3721 return cachedClearTimeout.call(null, marker);
3722 } catch (e){
3723 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
3724 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
3725 return cachedClearTimeout.call(this, marker);
3726 }
3727 }
3728
3729
3730
3731 }
3732 var queue = [];
3733 var draining = false;
3734 var currentQueue;
3735 var queueIndex = -1;
3736
3737 function cleanUpNextTick() {
3738 if (!draining || !currentQueue) {
3739 return;
3740 }
3741 draining = false;
3742 if (currentQueue.length) {
3743 queue = currentQueue.concat(queue);
3744 } else {
3745 queueIndex = -1;
3746 }
3747 if (queue.length) {
3748 drainQueue();
3749 }
3750 }
3751
3752 function drainQueue() {
3753 if (draining) {
3754 return;
3755 }
3756 var timeout = runTimeout(cleanUpNextTick);
3757 draining = true;
3758
3759 var len = queue.length;
3760 while(len) {
3761 currentQueue = queue;
3762 queue = [];
3763 while (++queueIndex < len) {
3764 if (currentQueue) {
3765 currentQueue[queueIndex].run();
3766 }
3767 }
3768 queueIndex = -1;
3769 len = queue.length;
3770 }
3771 currentQueue = null;
3772 draining = false;
3773 runClearTimeout(timeout);
3774 }
3775
3776 process.nextTick = function (fun) {
3777 var args = new Array(arguments.length - 1);
3778 if (arguments.length > 1) {
3779 for (var i = 1; i < arguments.length; i++) {
3780 args[i - 1] = arguments[i];
3781 }
3782 }
3783 queue.push(new Item(fun, args));
3784 if (queue.length === 1 && !draining) {
3785 runTimeout(drainQueue);
3786 }
3787 };
3788
3789 // v8 likes predictible objects
3790 function Item(fun, array) {
3791 this.fun = fun;
3792 this.array = array;
3793 }
3794 Item.prototype.run = function () {
3795 this.fun.apply(null, this.array);
3796 };
3797 process.title = 'browser';
3798 process.browser = true;
3799 process.env = {};
3800 process.argv = [];
3801 process.version = ''; // empty string to avoid regexp issues
3802 process.versions = {};
3803
3804 function noop() {}
3805
3806 process.on = noop;
3807 process.addListener = noop;
3808 process.once = noop;
3809 process.off = noop;
3810 process.removeListener = noop;
3811 process.removeAllListeners = noop;
3812 process.emit = noop;
3813
3814 process.binding = function (name) {
3815 throw new Error('process.binding is not supported');
3816 };
3817
3818 process.cwd = function () { return '/' };
3819 process.chdir = function (dir) {
3820 throw new Error('process.chdir is not supported');
3821 };
3822 process.umask = function() { return 0; };
3823
3824
3825/***/ },
3826/* 118 */
3827/***/ function(module, exports) {
3828
3829 /**
3830 * Copyright 2013-present, Facebook, Inc.
3831 * All rights reserved.
3832 *
3833 * This source code is licensed under the BSD-style license found in the
3834 * LICENSE file in the root directory of this source tree. An additional grant
3835 * of patent rights can be found in the PATENTS file in the same directory.
3836 *
3837 * @providesModule ReactPropTypesSecret
3838 */
3839
3840 'use strict';
3841
3842 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
3843
3844 module.exports = ReactPropTypesSecret;
3845
3846/***/ },
3847/* 119 */
3848/***/ function(module, exports, __webpack_require__) {
3849
3850 /**
3851 * Copyright 2013-present, Facebook, Inc.
3852 * All rights reserved.
3853 *
3854 * This source code is licensed under the BSD-style license found in the
3855 * LICENSE file in the root directory of this source tree. An additional grant
3856 * of patent rights can be found in the PATENTS file in the same directory.
3857 *
3858 * @providesModule ReactPropTypes
3859 */
3860
3861 'use strict';
3862
3863 var ReactElement = __webpack_require__(96);
3864 var ReactPropTypeLocationNames = __webpack_require__(111);
3865 var ReactPropTypesSecret = __webpack_require__(118);
3866
3867 var emptyFunction = __webpack_require__(99);
3868 var getIteratorFn = __webpack_require__(102);
3869 var warning = __webpack_require__(98);
3870
3871 /**
3872 * Collection of methods that allow declaration and validation of props that are
3873 * supplied to React components. Example usage:
3874 *
3875 * var Props = require('ReactPropTypes');
3876 * var MyArticle = React.createClass({
3877 * propTypes: {
3878 * // An optional string prop named "description".
3879 * description: Props.string,
3880 *
3881 * // A required enum prop named "category".
3882 * category: Props.oneOf(['News','Photos']).isRequired,
3883 *
3884 * // A prop named "dialog" that requires an instance of Dialog.
3885 * dialog: Props.instanceOf(Dialog).isRequired
3886 * },
3887 * render: function() { ... }
3888 * });
3889 *
3890 * A more formal specification of how these methods are used:
3891 *
3892 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
3893 * decl := ReactPropTypes.{type}(.isRequired)?
3894 *
3895 * Each and every declaration produces a function with the same signature. This
3896 * allows the creation of custom validation functions. For example:
3897 *
3898 * var MyLink = React.createClass({
3899 * propTypes: {
3900 * // An optional string or URI prop named "href".
3901 * href: function(props, propName, componentName) {
3902 * var propValue = props[propName];
3903 * if (propValue != null && typeof propValue !== 'string' &&
3904 * !(propValue instanceof URI)) {
3905 * return new Error(
3906 * 'Expected a string or an URI for ' + propName + ' in ' +
3907 * componentName
3908 * );
3909 * }
3910 * }
3911 * },
3912 * render: function() {...}
3913 * });
3914 *
3915 * @internal
3916 */
3917
3918 var ANONYMOUS = '<<anonymous>>';
3919
3920 var ReactPropTypes = {
3921 array: createPrimitiveTypeChecker('array'),
3922 bool: createPrimitiveTypeChecker('boolean'),
3923 func: createPrimitiveTypeChecker('function'),
3924 number: createPrimitiveTypeChecker('number'),
3925 object: createPrimitiveTypeChecker('object'),
3926 string: createPrimitiveTypeChecker('string'),
3927 symbol: createPrimitiveTypeChecker('symbol'),
3928
3929 any: createAnyTypeChecker(),
3930 arrayOf: createArrayOfTypeChecker,
3931 element: createElementTypeChecker(),
3932 instanceOf: createInstanceTypeChecker,
3933 node: createNodeChecker(),
3934 objectOf: createObjectOfTypeChecker,
3935 oneOf: createEnumTypeChecker,
3936 oneOfType: createUnionTypeChecker,
3937 shape: createShapeTypeChecker
3938 };
3939
3940 /**
3941 * inlined Object.is polyfill to avoid requiring consumers ship their own
3942 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
3943 */
3944 /*eslint-disable no-self-compare*/
3945 function is(x, y) {
3946 // SameValue algorithm
3947 if (x === y) {
3948 // Steps 1-5, 7-10
3949 // Steps 6.b-6.e: +0 != -0
3950 return x !== 0 || 1 / x === 1 / y;
3951 } else {
3952 // Step 6.a: NaN == NaN
3953 return x !== x && y !== y;
3954 }
3955 }
3956 /*eslint-enable no-self-compare*/
3957
3958 /**
3959 * We use an Error-like object for backward compatibility as people may call
3960 * PropTypes directly and inspect their output. However we don't use real
3961 * Errors anymore. We don't inspect their stack anyway, and creating them
3962 * is prohibitively expensive if they are created too often, such as what
3963 * happens in oneOfType() for any type before the one that matched.
3964 */
3965 function PropTypeError(message) {
3966 this.message = message;
3967 this.stack = '';
3968 }
3969 // Make `instanceof Error` still work for returned errors.
3970 PropTypeError.prototype = Error.prototype;
3971
3972 function createChainableTypeChecker(validate) {
3973 if ((undefined) !== 'production') {
3974 var manualPropTypeCallCache = {};
3975 }
3976 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
3977 componentName = componentName || ANONYMOUS;
3978 propFullName = propFullName || propName;
3979 if ((undefined) !== 'production') {
3980 if (secret !== ReactPropTypesSecret && typeof console !== 'undefined') {
3981 var cacheKey = componentName + ':' + propName;
3982 if (!manualPropTypeCallCache[cacheKey]) {
3983 (undefined) !== 'production' ? warning(false, 'You are manually calling a React.PropTypes validation ' + 'function for the `%s` prop on `%s`. This is deprecated ' + 'and will not work in the next major version. You may be ' + 'seeing this warning due to a third-party PropTypes library. ' + 'See https://fb.me/react-warning-dont-call-proptypes for details.', propFullName, componentName) : void 0;
3984 manualPropTypeCallCache[cacheKey] = true;
3985 }
3986 }
3987 }
3988 if (props[propName] == null) {
3989 var locationName = ReactPropTypeLocationNames[location];
3990 if (isRequired) {
3991 return new PropTypeError('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.'));
3992 }
3993 return null;
3994 } else {
3995 return validate(props, propName, componentName, location, propFullName);
3996 }
3997 }
3998
3999 var chainedCheckType = checkType.bind(null, false);
4000 chainedCheckType.isRequired = checkType.bind(null, true);
4001
4002 return chainedCheckType;
4003 }
4004
4005 function createPrimitiveTypeChecker(expectedType) {
4006 function validate(props, propName, componentName, location, propFullName, secret) {
4007 var propValue = props[propName];
4008 var propType = getPropType(propValue);
4009 if (propType !== expectedType) {
4010 var locationName = ReactPropTypeLocationNames[location];
4011 // `propValue` being instance of, say, date/regexp, pass the 'object'
4012 // check, but we can offer a more precise error message here rather than
4013 // 'of type `object`'.
4014 var preciseType = getPreciseType(propValue);
4015
4016 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
4017 }
4018 return null;
4019 }
4020 return createChainableTypeChecker(validate);
4021 }
4022
4023 function createAnyTypeChecker() {
4024 return createChainableTypeChecker(emptyFunction.thatReturns(null));
4025 }
4026
4027 function createArrayOfTypeChecker(typeChecker) {
4028 function validate(props, propName, componentName, location, propFullName) {
4029 if (typeof typeChecker !== 'function') {
4030 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
4031 }
4032 var propValue = props[propName];
4033 if (!Array.isArray(propValue)) {
4034 var locationName = ReactPropTypeLocationNames[location];
4035 var propType = getPropType(propValue);
4036 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
4037 }
4038 for (var i = 0; i < propValue.length; i++) {
4039 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
4040 if (error instanceof Error) {
4041 return error;
4042 }
4043 }
4044 return null;
4045 }
4046 return createChainableTypeChecker(validate);
4047 }
4048
4049 function createElementTypeChecker() {
4050 function validate(props, propName, componentName, location, propFullName) {
4051 var propValue = props[propName];
4052 if (!ReactElement.isValidElement(propValue)) {
4053 var locationName = ReactPropTypeLocationNames[location];
4054 var propType = getPropType(propValue);
4055 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
4056 }
4057 return null;
4058 }
4059 return createChainableTypeChecker(validate);
4060 }
4061
4062 function createInstanceTypeChecker(expectedClass) {
4063 function validate(props, propName, componentName, location, propFullName) {
4064 if (!(props[propName] instanceof expectedClass)) {
4065 var locationName = ReactPropTypeLocationNames[location];
4066 var expectedClassName = expectedClass.name || ANONYMOUS;
4067 var actualClassName = getClassName(props[propName]);
4068 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
4069 }
4070 return null;
4071 }
4072 return createChainableTypeChecker(validate);
4073 }
4074
4075 function createEnumTypeChecker(expectedValues) {
4076 if (!Array.isArray(expectedValues)) {
4077 (undefined) !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
4078 return emptyFunction.thatReturnsNull;
4079 }
4080
4081 function validate(props, propName, componentName, location, propFullName) {
4082 var propValue = props[propName];
4083 for (var i = 0; i < expectedValues.length; i++) {
4084 if (is(propValue, expectedValues[i])) {
4085 return null;
4086 }
4087 }
4088
4089 var locationName = ReactPropTypeLocationNames[location];
4090 var valuesString = JSON.stringify(expectedValues);
4091 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
4092 }
4093 return createChainableTypeChecker(validate);
4094 }
4095
4096 function createObjectOfTypeChecker(typeChecker) {
4097 function validate(props, propName, componentName, location, propFullName) {
4098 if (typeof typeChecker !== 'function') {
4099 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
4100 }
4101 var propValue = props[propName];
4102 var propType = getPropType(propValue);
4103 if (propType !== 'object') {
4104 var locationName = ReactPropTypeLocationNames[location];
4105 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
4106 }
4107 for (var key in propValue) {
4108 if (propValue.hasOwnProperty(key)) {
4109 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4110 if (error instanceof Error) {
4111 return error;
4112 }
4113 }
4114 }
4115 return null;
4116 }
4117 return createChainableTypeChecker(validate);
4118 }
4119
4120 function createUnionTypeChecker(arrayOfTypeCheckers) {
4121 if (!Array.isArray(arrayOfTypeCheckers)) {
4122 (undefined) !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
4123 return emptyFunction.thatReturnsNull;
4124 }
4125
4126 function validate(props, propName, componentName, location, propFullName) {
4127 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
4128 var checker = arrayOfTypeCheckers[i];
4129 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
4130 return null;
4131 }
4132 }
4133
4134 var locationName = ReactPropTypeLocationNames[location];
4135 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
4136 }
4137 return createChainableTypeChecker(validate);
4138 }
4139
4140 function createNodeChecker() {
4141 function validate(props, propName, componentName, location, propFullName) {
4142 if (!isNode(props[propName])) {
4143 var locationName = ReactPropTypeLocationNames[location];
4144 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
4145 }
4146 return null;
4147 }
4148 return createChainableTypeChecker(validate);
4149 }
4150
4151 function createShapeTypeChecker(shapeTypes) {
4152 function validate(props, propName, componentName, location, propFullName) {
4153 var propValue = props[propName];
4154 var propType = getPropType(propValue);
4155 if (propType !== 'object') {
4156 var locationName = ReactPropTypeLocationNames[location];
4157 return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
4158 }
4159 for (var key in shapeTypes) {
4160 var checker = shapeTypes[key];
4161 if (!checker) {
4162 continue;
4163 }
4164 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
4165 if (error) {
4166 return error;
4167 }
4168 }
4169 return null;
4170 }
4171 return createChainableTypeChecker(validate);
4172 }
4173
4174 function isNode(propValue) {
4175 switch (typeof propValue) {
4176 case 'number':
4177 case 'string':
4178 case 'undefined':
4179 return true;
4180 case 'boolean':
4181 return !propValue;
4182 case 'object':
4183 if (Array.isArray(propValue)) {
4184 return propValue.every(isNode);
4185 }
4186 if (propValue === null || ReactElement.isValidElement(propValue)) {
4187 return true;
4188 }
4189
4190 var iteratorFn = getIteratorFn(propValue);
4191 if (iteratorFn) {
4192 var iterator = iteratorFn.call(propValue);
4193 var step;
4194 if (iteratorFn !== propValue.entries) {
4195 while (!(step = iterator.next()).done) {
4196 if (!isNode(step.value)) {
4197 return false;
4198 }
4199 }
4200 } else {
4201 // Iterator will provide entry [k,v] tuples rather than values.
4202 while (!(step = iterator.next()).done) {
4203 var entry = step.value;
4204 if (entry) {
4205 if (!isNode(entry[1])) {
4206 return false;
4207 }
4208 }
4209 }
4210 }
4211 } else {
4212 return false;
4213 }
4214
4215 return true;
4216 default:
4217 return false;
4218 }
4219 }
4220
4221 function isSymbol(propType, propValue) {
4222 // Native Symbol.
4223 if (propType === 'symbol') {
4224 return true;
4225 }
4226
4227 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
4228 if (propValue['@@toStringTag'] === 'Symbol') {
4229 return true;
4230 }
4231
4232 // Fallback for non-spec compliant Symbols which are polyfilled.
4233 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
4234 return true;
4235 }
4236
4237 return false;
4238 }
4239
4240 // Equivalent of `typeof` but with special handling for array and regexp.
4241 function getPropType(propValue) {
4242 var propType = typeof propValue;
4243 if (Array.isArray(propValue)) {
4244 return 'array';
4245 }
4246 if (propValue instanceof RegExp) {
4247 // Old webkits (at least until Android 4.0) return 'function' rather than
4248 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
4249 // passes PropTypes.object.
4250 return 'object';
4251 }
4252 if (isSymbol(propType, propValue)) {
4253 return 'symbol';
4254 }
4255 return propType;
4256 }
4257
4258 // This handles more types than `getPropType`. Only used for error messages.
4259 // See `createPrimitiveTypeChecker`.
4260 function getPreciseType(propValue) {
4261 var propType = getPropType(propValue);
4262 if (propType === 'object') {
4263 if (propValue instanceof Date) {
4264 return 'date';
4265 } else if (propValue instanceof RegExp) {
4266 return 'regexp';
4267 }
4268 }
4269 return propType;
4270 }
4271
4272 // Returns class name of the object, if any.
4273 function getClassName(propValue) {
4274 if (!propValue.constructor || !propValue.constructor.name) {
4275 return ANONYMOUS;
4276 }
4277 return propValue.constructor.name;
4278 }
4279
4280 module.exports = ReactPropTypes;
4281
4282/***/ },
4283/* 120 */
4284/***/ function(module, exports) {
4285
4286 /**
4287 * Copyright 2013-present, Facebook, Inc.
4288 * All rights reserved.
4289 *
4290 * This source code is licensed under the BSD-style license found in the
4291 * LICENSE file in the root directory of this source tree. An additional grant
4292 * of patent rights can be found in the PATENTS file in the same directory.
4293 *
4294 * @providesModule ReactVersion
4295 */
4296
4297 'use strict';
4298
4299 module.exports = '15.3.2';
4300
4301/***/ },
4302/* 121 */
4303/***/ function(module, exports, __webpack_require__) {
4304
4305 /**
4306 * Copyright 2013-present, Facebook, Inc.
4307 * All rights reserved.
4308 *
4309 * This source code is licensed under the BSD-style license found in the
4310 * LICENSE file in the root directory of this source tree. An additional grant
4311 * of patent rights can be found in the PATENTS file in the same directory.
4312 *
4313 * @providesModule onlyChild
4314 */
4315 'use strict';
4316
4317 var _prodInvariant = __webpack_require__(94);
4318
4319 var ReactElement = __webpack_require__(96);
4320
4321 var invariant = __webpack_require__(95);
4322
4323 /**
4324 * Returns the first child in a collection of children and verifies that there
4325 * is only one child in the collection.
4326 *
4327 * See https://facebook.github.io/react/docs/top-level-api.html#react.children.only
4328 *
4329 * The current implementation of this function assumes that a single child gets
4330 * passed without a wrapper, but the purpose of this helper function is to
4331 * abstract away the particular structure of children.
4332 *
4333 * @param {?object} children Child collection structure.
4334 * @return {ReactElement} The first and only `ReactElement` contained in the
4335 * structure.
4336 */
4337 function onlyChild(children) {
4338 !ReactElement.isValidElement(children) ? (undefined) !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0;
4339 return children;
4340 }
4341
4342 module.exports = onlyChild;
4343
4344/***/ },
4345/* 122 */
4346/***/ function(module, exports, __webpack_require__) {
4347
4348 'use strict';
4349
4350 module.exports = __webpack_require__(123);
4351
4352
4353/***/ },
4354/* 123 */
4355/***/ function(module, exports, __webpack_require__) {
4356
4357 /**
4358 * Copyright 2013-present, Facebook, Inc.
4359 * All rights reserved.
4360 *
4361 * This source code is licensed under the BSD-style license found in the
4362 * LICENSE file in the root directory of this source tree. An additional grant
4363 * of patent rights can be found in the PATENTS file in the same directory.
4364 *
4365 * @providesModule ReactDOM
4366 */
4367
4368 /* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
4369
4370 'use strict';
4371
4372 var ReactDOMComponentTree = __webpack_require__(124);
4373 var ReactDefaultInjection = __webpack_require__(127);
4374 var ReactMount = __webpack_require__(250);
4375 var ReactReconciler = __webpack_require__(147);
4376 var ReactUpdates = __webpack_require__(144);
4377 var ReactVersion = __webpack_require__(120);
4378
4379 var findDOMNode = __webpack_require__(255);
4380 var getHostComponentFromComposite = __webpack_require__(256);
4381 var renderSubtreeIntoContainer = __webpack_require__(257);
4382 var warning = __webpack_require__(98);
4383
4384 ReactDefaultInjection.inject();
4385
4386 var ReactDOM = {
4387 findDOMNode: findDOMNode,
4388 render: ReactMount.render,
4389 unmountComponentAtNode: ReactMount.unmountComponentAtNode,
4390 version: ReactVersion,
4391
4392 /* eslint-disable camelcase */
4393 unstable_batchedUpdates: ReactUpdates.batchedUpdates,
4394 unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
4395 };
4396
4397 // Inject the runtime into a devtools global hook regardless of browser.
4398 // Allows for debugging when the hook is injected on the page.
4399 /* eslint-enable camelcase */
4400 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
4401 __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
4402 ComponentTree: {
4403 getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
4404 getNodeFromInstance: function (inst) {
4405 // inst is an internal instance (but could be a composite)
4406 if (inst._renderedComponent) {
4407 inst = getHostComponentFromComposite(inst);
4408 }
4409 if (inst) {
4410 return ReactDOMComponentTree.getNodeFromInstance(inst);
4411 } else {
4412 return null;
4413 }
4414 }
4415 },
4416 Mount: ReactMount,
4417 Reconciler: ReactReconciler
4418 });
4419 }
4420
4421 if ((undefined) !== 'production') {
4422 var ExecutionEnvironment = __webpack_require__(137);
4423 if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
4424
4425 // First check if devtools is not installed
4426 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
4427 // If we're in Chrome or Firefox, provide a download link if not installed.
4428 if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
4429 // Firefox does not have the issue with devtools loaded over file://
4430 var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
4431 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');
4432 }
4433 }
4434
4435 var testFunc = function testFn() {};
4436 (undefined) !== '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;
4437
4438 // If we're in IE8, check to see if we are in compatibility mode and provide
4439 // information on preventing compatibility mode
4440 var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
4441
4442 (undefined) !== '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;
4443
4444 var expectedFeatures = [
4445 // shims
4446 Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim];
4447
4448 for (var i = 0; i < expectedFeatures.length; i++) {
4449 if (!expectedFeatures[i]) {
4450 (undefined) !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
4451 break;
4452 }
4453 }
4454 }
4455 }
4456
4457 if ((undefined) !== 'production') {
4458 var ReactInstrumentation = __webpack_require__(150);
4459 var ReactDOMUnknownPropertyHook = __webpack_require__(258);
4460 var ReactDOMNullInputValuePropHook = __webpack_require__(259);
4461
4462 ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook);
4463 ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook);
4464 }
4465
4466 module.exports = ReactDOM;
4467
4468/***/ },
4469/* 124 */
4470/***/ function(module, exports, __webpack_require__) {
4471
4472 /**
4473 * Copyright 2013-present, Facebook, Inc.
4474 * All rights reserved.
4475 *
4476 * This source code is licensed under the BSD-style license found in the
4477 * LICENSE file in the root directory of this source tree. An additional grant
4478 * of patent rights can be found in the PATENTS file in the same directory.
4479 *
4480 * @providesModule ReactDOMComponentTree
4481 */
4482
4483 'use strict';
4484
4485 var _prodInvariant = __webpack_require__(94);
4486
4487 var DOMProperty = __webpack_require__(125);
4488 var ReactDOMComponentFlags = __webpack_require__(126);
4489
4490 var invariant = __webpack_require__(95);
4491
4492 var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
4493 var Flags = ReactDOMComponentFlags;
4494
4495 var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);
4496
4497 /**
4498 * Drill down (through composites and empty components) until we get a host or
4499 * host text component.
4500 *
4501 * This is pretty polymorphic but unavoidable with the current structure we have
4502 * for `_renderedChildren`.
4503 */
4504 function getRenderedHostOrTextFromComponent(component) {
4505 var rendered;
4506 while (rendered = component._renderedComponent) {
4507 component = rendered;
4508 }
4509 return component;
4510 }
4511
4512 /**
4513 * Populate `_hostNode` on the rendered host/text component with the given
4514 * DOM node. The passed `inst` can be a composite.
4515 */
4516 function precacheNode(inst, node) {
4517 var hostInst = getRenderedHostOrTextFromComponent(inst);
4518 hostInst._hostNode = node;
4519 node[internalInstanceKey] = hostInst;
4520 }
4521
4522 function uncacheNode(inst) {
4523 var node = inst._hostNode;
4524 if (node) {
4525 delete node[internalInstanceKey];
4526 inst._hostNode = null;
4527 }
4528 }
4529
4530 /**
4531 * Populate `_hostNode` on each child of `inst`, assuming that the children
4532 * match up with the DOM (element) children of `node`.
4533 *
4534 * We cache entire levels at once to avoid an n^2 problem where we access the
4535 * children of a node sequentially and have to walk from the start to our target
4536 * node every time.
4537 *
4538 * Since we update `_renderedChildren` and the actual DOM at (slightly)
4539 * different times, we could race here and see a newer `_renderedChildren` than
4540 * the DOM nodes we see. To avoid this, ReactMultiChild calls
4541 * `prepareToManageChildren` before we change `_renderedChildren`, at which
4542 * time the container's child nodes are always cached (until it unmounts).
4543 */
4544 function precacheChildNodes(inst, node) {
4545 if (inst._flags & Flags.hasCachedChildNodes) {
4546 return;
4547 }
4548 var children = inst._renderedChildren;
4549 var childNode = node.firstChild;
4550 outer: for (var name in children) {
4551 if (!children.hasOwnProperty(name)) {
4552 continue;
4553 }
4554 var childInst = children[name];
4555 var childID = getRenderedHostOrTextFromComponent(childInst)._domID;
4556 if (childID === 0) {
4557 // We're currently unmounting this child in ReactMultiChild; skip it.
4558 continue;
4559 }
4560 // We assume the child nodes are in the same order as the child instances.
4561 for (; childNode !== null; childNode = childNode.nextSibling) {
4562 if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
4563 precacheNode(childInst, childNode);
4564 continue outer;
4565 }
4566 }
4567 // We reached the end of the DOM children without finding an ID match.
4568 true ? (undefined) !== 'production' ? invariant(false, 'Unable to find element with ID %s.', childID) : _prodInvariant('32', childID) : void 0;
4569 }
4570 inst._flags |= Flags.hasCachedChildNodes;
4571 }
4572
4573 /**
4574 * Given a DOM node, return the closest ReactDOMComponent or
4575 * ReactDOMTextComponent instance ancestor.
4576 */
4577 function getClosestInstanceFromNode(node) {
4578 if (node[internalInstanceKey]) {
4579 return node[internalInstanceKey];
4580 }
4581
4582 // Walk up the tree until we find an ancestor whose instance we have cached.
4583 var parents = [];
4584 while (!node[internalInstanceKey]) {
4585 parents.push(node);
4586 if (node.parentNode) {
4587 node = node.parentNode;
4588 } else {
4589 // Top of the tree. This node must not be part of a React tree (or is
4590 // unmounted, potentially).
4591 return null;
4592 }
4593 }
4594
4595 var closest;
4596 var inst;
4597 for (; node && (inst = node[internalInstanceKey]); node = parents.pop()) {
4598 closest = inst;
4599 if (parents.length) {
4600 precacheChildNodes(inst, node);
4601 }
4602 }
4603
4604 return closest;
4605 }
4606
4607 /**
4608 * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
4609 * instance, or null if the node was not rendered by this React.
4610 */
4611 function getInstanceFromNode(node) {
4612 var inst = getClosestInstanceFromNode(node);
4613 if (inst != null && inst._hostNode === node) {
4614 return inst;
4615 } else {
4616 return null;
4617 }
4618 }
4619
4620 /**
4621 * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
4622 * DOM node.
4623 */
4624 function getNodeFromInstance(inst) {
4625 // Without this first invariant, passing a non-DOM-component triggers the next
4626 // invariant for a missing parent, which is super confusing.
4627 !(inst._hostNode !== undefined) ? (undefined) !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
4628
4629 if (inst._hostNode) {
4630 return inst._hostNode;
4631 }
4632
4633 // Walk up the tree until we find an ancestor whose DOM node we have cached.
4634 var parents = [];
4635 while (!inst._hostNode) {
4636 parents.push(inst);
4637 !inst._hostParent ? (undefined) !== 'production' ? invariant(false, 'React DOM tree root should always have a node reference.') : _prodInvariant('34') : void 0;
4638 inst = inst._hostParent;
4639 }
4640
4641 // Now parents contains each ancestor that does *not* have a cached native
4642 // node, and `inst` is the deepest ancestor that does.
4643 for (; parents.length; inst = parents.pop()) {
4644 precacheChildNodes(inst, inst._hostNode);
4645 }
4646
4647 return inst._hostNode;
4648 }
4649
4650 var ReactDOMComponentTree = {
4651 getClosestInstanceFromNode: getClosestInstanceFromNode,
4652 getInstanceFromNode: getInstanceFromNode,
4653 getNodeFromInstance: getNodeFromInstance,
4654 precacheChildNodes: precacheChildNodes,
4655 precacheNode: precacheNode,
4656 uncacheNode: uncacheNode
4657 };
4658
4659 module.exports = ReactDOMComponentTree;
4660
4661/***/ },
4662/* 125 */
4663/***/ function(module, exports, __webpack_require__) {
4664
4665 /**
4666 * Copyright 2013-present, Facebook, Inc.
4667 * All rights reserved.
4668 *
4669 * This source code is licensed under the BSD-style license found in the
4670 * LICENSE file in the root directory of this source tree. An additional grant
4671 * of patent rights can be found in the PATENTS file in the same directory.
4672 *
4673 * @providesModule DOMProperty
4674 */
4675
4676 'use strict';
4677
4678 var _prodInvariant = __webpack_require__(94);
4679
4680 var invariant = __webpack_require__(95);
4681
4682 function checkMask(value, bitmask) {
4683 return (value & bitmask) === bitmask;
4684 }
4685
4686 var DOMPropertyInjection = {
4687 /**
4688 * Mapping from normalized, camelcased property names to a configuration that
4689 * specifies how the associated DOM property should be accessed or rendered.
4690 */
4691 MUST_USE_PROPERTY: 0x1,
4692 HAS_BOOLEAN_VALUE: 0x4,
4693 HAS_NUMERIC_VALUE: 0x8,
4694 HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
4695 HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
4696
4697 /**
4698 * Inject some specialized knowledge about the DOM. This takes a config object
4699 * with the following properties:
4700 *
4701 * isCustomAttribute: function that given an attribute name will return true
4702 * if it can be inserted into the DOM verbatim. Useful for data-* or aria-*
4703 * attributes where it's impossible to enumerate all of the possible
4704 * attribute names,
4705 *
4706 * Properties: object mapping DOM property name to one of the
4707 * DOMPropertyInjection constants or null. If your attribute isn't in here,
4708 * it won't get written to the DOM.
4709 *
4710 * DOMAttributeNames: object mapping React attribute name to the DOM
4711 * attribute name. Attribute names not specified use the **lowercase**
4712 * normalized name.
4713 *
4714 * DOMAttributeNamespaces: object mapping React attribute name to the DOM
4715 * attribute namespace URL. (Attribute names not specified use no namespace.)
4716 *
4717 * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties.
4718 * Property names not specified use the normalized name.
4719 *
4720 * DOMMutationMethods: Properties that require special mutation methods. If
4721 * `value` is undefined, the mutation method should unset the property.
4722 *
4723 * @param {object} domPropertyConfig the config as described above.
4724 */
4725 injectDOMPropertyConfig: function (domPropertyConfig) {
4726 var Injection = DOMPropertyInjection;
4727 var Properties = domPropertyConfig.Properties || {};
4728 var DOMAttributeNamespaces = domPropertyConfig.DOMAttributeNamespaces || {};
4729 var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {};
4730 var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {};
4731 var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {};
4732
4733 if (domPropertyConfig.isCustomAttribute) {
4734 DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute);
4735 }
4736
4737 for (var propName in Properties) {
4738 !!DOMProperty.properties.hasOwnProperty(propName) ? (undefined) !== '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;
4739
4740 var lowerCased = propName.toLowerCase();
4741 var propConfig = Properties[propName];
4742
4743 var propertyInfo = {
4744 attributeName: lowerCased,
4745 attributeNamespace: null,
4746 propertyName: propName,
4747 mutationMethod: null,
4748
4749 mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
4750 hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
4751 hasNumericValue: checkMask(propConfig, Injection.HAS_NUMERIC_VALUE),
4752 hasPositiveNumericValue: checkMask(propConfig, Injection.HAS_POSITIVE_NUMERIC_VALUE),
4753 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
4754 };
4755 !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? (undefined) !== '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;
4756
4757 if ((undefined) !== 'production') {
4758 DOMProperty.getPossibleStandardName[lowerCased] = propName;
4759 }
4760
4761 if (DOMAttributeNames.hasOwnProperty(propName)) {
4762 var attributeName = DOMAttributeNames[propName];
4763 propertyInfo.attributeName = attributeName;
4764 if ((undefined) !== 'production') {
4765 DOMProperty.getPossibleStandardName[attributeName] = propName;
4766 }
4767 }
4768
4769 if (DOMAttributeNamespaces.hasOwnProperty(propName)) {
4770 propertyInfo.attributeNamespace = DOMAttributeNamespaces[propName];
4771 }
4772
4773 if (DOMPropertyNames.hasOwnProperty(propName)) {
4774 propertyInfo.propertyName = DOMPropertyNames[propName];
4775 }
4776
4777 if (DOMMutationMethods.hasOwnProperty(propName)) {
4778 propertyInfo.mutationMethod = DOMMutationMethods[propName];
4779 }
4780
4781 DOMProperty.properties[propName] = propertyInfo;
4782 }
4783 }
4784 };
4785
4786 /* eslint-disable max-len */
4787 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';
4788 /* eslint-enable max-len */
4789
4790 /**
4791 * DOMProperty exports lookup objects that can be used like functions:
4792 *
4793 * > DOMProperty.isValid['id']
4794 * true
4795 * > DOMProperty.isValid['foobar']
4796 * undefined
4797 *
4798 * Although this may be confusing, it performs better in general.
4799 *
4800 * @see http://jsperf.com/key-exists
4801 * @see http://jsperf.com/key-missing
4802 */
4803 var DOMProperty = {
4804
4805 ID_ATTRIBUTE_NAME: 'data-reactid',
4806 ROOT_ATTRIBUTE_NAME: 'data-reactroot',
4807
4808 ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
4809 ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040',
4810
4811 /**
4812 * Map from property "standard name" to an object with info about how to set
4813 * the property in the DOM. Each object contains:
4814 *
4815 * attributeName:
4816 * Used when rendering markup or with `*Attribute()`.
4817 * attributeNamespace
4818 * propertyName:
4819 * Used on DOM node instances. (This includes properties that mutate due to
4820 * external factors.)
4821 * mutationMethod:
4822 * If non-null, used instead of the property or `setAttribute()` after
4823 * initial render.
4824 * mustUseProperty:
4825 * Whether the property must be accessed and mutated as an object property.
4826 * hasBooleanValue:
4827 * Whether the property should be removed when set to a falsey value.
4828 * hasNumericValue:
4829 * Whether the property must be numeric or parse as a numeric and should be
4830 * removed when set to a falsey value.
4831 * hasPositiveNumericValue:
4832 * Whether the property must be positive numeric or parse as a positive
4833 * numeric and should be removed when set to a falsey value.
4834 * hasOverloadedBooleanValue:
4835 * Whether the property can be used as a flag as well as with a value.
4836 * Removed when strictly equal to false; present without a value when
4837 * strictly equal to true; present with a value otherwise.
4838 */
4839 properties: {},
4840
4841 /**
4842 * Mapping from lowercase property names to the properly cased version, used
4843 * to warn in the case of missing properties. Available only in __DEV__.
4844 * @type {Object}
4845 */
4846 getPossibleStandardName: (undefined) !== 'production' ? {} : null,
4847
4848 /**
4849 * All of the isCustomAttribute() functions that have been injected.
4850 */
4851 _isCustomAttributeFunctions: [],
4852
4853 /**
4854 * Checks whether a property name is a custom attribute.
4855 * @method
4856 */
4857 isCustomAttribute: function (attributeName) {
4858 for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) {
4859 var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i];
4860 if (isCustomAttributeFn(attributeName)) {
4861 return true;
4862 }
4863 }
4864 return false;
4865 },
4866
4867 injection: DOMPropertyInjection
4868 };
4869
4870 module.exports = DOMProperty;
4871
4872/***/ },
4873/* 126 */
4874/***/ function(module, exports) {
4875
4876 /**
4877 * Copyright 2015-present, Facebook, Inc.
4878 * All rights reserved.
4879 *
4880 * This source code is licensed under the BSD-style license found in the
4881 * LICENSE file in the root directory of this source tree. An additional grant
4882 * of patent rights can be found in the PATENTS file in the same directory.
4883 *
4884 * @providesModule ReactDOMComponentFlags
4885 */
4886
4887 'use strict';
4888
4889 var ReactDOMComponentFlags = {
4890 hasCachedChildNodes: 1 << 0
4891 };
4892
4893 module.exports = ReactDOMComponentFlags;
4894
4895/***/ },
4896/* 127 */
4897/***/ function(module, exports, __webpack_require__) {
4898
4899 /**
4900 * Copyright 2013-present, Facebook, Inc.
4901 * All rights reserved.
4902 *
4903 * This source code is licensed under the BSD-style license found in the
4904 * LICENSE file in the root directory of this source tree. An additional grant
4905 * of patent rights can be found in the PATENTS file in the same directory.
4906 *
4907 * @providesModule ReactDefaultInjection
4908 */
4909
4910 'use strict';
4911
4912 var BeforeInputEventPlugin = __webpack_require__(128);
4913 var ChangeEventPlugin = __webpack_require__(143);
4914 var DefaultEventPluginOrder = __webpack_require__(161);
4915 var EnterLeaveEventPlugin = __webpack_require__(162);
4916 var HTMLDOMPropertyConfig = __webpack_require__(167);
4917 var ReactComponentBrowserEnvironment = __webpack_require__(168);
4918 var ReactDOMComponent = __webpack_require__(182);
4919 var ReactDOMComponentTree = __webpack_require__(124);
4920 var ReactDOMEmptyComponent = __webpack_require__(221);
4921 var ReactDOMTreeTraversal = __webpack_require__(222);
4922 var ReactDOMTextComponent = __webpack_require__(223);
4923 var ReactDefaultBatchingStrategy = __webpack_require__(224);
4924 var ReactEventListener = __webpack_require__(225);
4925 var ReactInjection = __webpack_require__(228);
4926 var ReactReconcileTransaction = __webpack_require__(229);
4927 var SVGDOMPropertyConfig = __webpack_require__(237);
4928 var SelectEventPlugin = __webpack_require__(238);
4929 var SimpleEventPlugin = __webpack_require__(239);
4930
4931 var alreadyInjected = false;
4932
4933 function inject() {
4934 if (alreadyInjected) {
4935 // TODO: This is currently true because these injections are shared between
4936 // the client and the server package. They should be built independently
4937 // and not share any injection state. Then this problem will be solved.
4938 return;
4939 }
4940 alreadyInjected = true;
4941
4942 ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener);
4943
4944 /**
4945 * Inject modules for resolving DOM hierarchy and plugin ordering.
4946 */
4947 ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder);
4948 ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree);
4949 ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal);
4950
4951 /**
4952 * Some important event plugins included by default (without having to require
4953 * them).
4954 */
4955 ReactInjection.EventPluginHub.injectEventPluginsByName({
4956 SimpleEventPlugin: SimpleEventPlugin,
4957 EnterLeaveEventPlugin: EnterLeaveEventPlugin,
4958 ChangeEventPlugin: ChangeEventPlugin,
4959 SelectEventPlugin: SelectEventPlugin,
4960 BeforeInputEventPlugin: BeforeInputEventPlugin
4961 });
4962
4963 ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent);
4964
4965 ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent);
4966
4967 ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig);
4968 ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig);
4969
4970 ReactInjection.EmptyComponent.injectEmptyComponentFactory(function (instantiate) {
4971 return new ReactDOMEmptyComponent(instantiate);
4972 });
4973
4974 ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction);
4975 ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy);
4976
4977 ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment);
4978 }
4979
4980 module.exports = {
4981 inject: inject
4982 };
4983
4984/***/ },
4985/* 128 */
4986/***/ function(module, exports, __webpack_require__) {
4987
4988 /**
4989 * Copyright 2013-present Facebook, Inc.
4990 * All rights reserved.
4991 *
4992 * This source code is licensed under the BSD-style license found in the
4993 * LICENSE file in the root directory of this source tree. An additional grant
4994 * of patent rights can be found in the PATENTS file in the same directory.
4995 *
4996 * @providesModule BeforeInputEventPlugin
4997 */
4998
4999 'use strict';
5000
5001 var EventConstants = __webpack_require__(129);
5002 var EventPropagators = __webpack_require__(130);
5003 var ExecutionEnvironment = __webpack_require__(137);
5004 var FallbackCompositionState = __webpack_require__(138);
5005 var SyntheticCompositionEvent = __webpack_require__(140);
5006 var SyntheticInputEvent = __webpack_require__(142);
5007
5008 var keyOf = __webpack_require__(112);
5009
5010 var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
5011 var START_KEYCODE = 229;
5012
5013 var canUseCompositionEvent = ExecutionEnvironment.canUseDOM && 'CompositionEvent' in window;
5014
5015 var documentMode = null;
5016 if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) {
5017 documentMode = document.documentMode;
5018 }
5019
5020 // Webkit offers a very useful `textInput` event that can be used to
5021 // directly represent `beforeInput`. The IE `textinput` event is not as
5022 // useful, so we don't use it.
5023 var canUseTextInputEvent = ExecutionEnvironment.canUseDOM && 'TextEvent' in window && !documentMode && !isPresto();
5024
5025 // In IE9+, we have access to composition events, but the data supplied
5026 // by the native compositionend event may be incorrect. Japanese ideographic
5027 // spaces, for instance (\u3000) are not recorded correctly.
5028 var useFallbackCompositionData = ExecutionEnvironment.canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
5029
5030 /**
5031 * Opera <= 12 includes TextEvent in window, but does not fire
5032 * text input events. Rely on keypress instead.
5033 */
5034 function isPresto() {
5035 var opera = window.opera;
5036 return typeof opera === 'object' && typeof opera.version === 'function' && parseInt(opera.version(), 10) <= 12;
5037 }
5038
5039 var SPACEBAR_CODE = 32;
5040 var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
5041
5042 var topLevelTypes = EventConstants.topLevelTypes;
5043
5044 // Events and their corresponding property names.
5045 var eventTypes = {
5046 beforeInput: {
5047 phasedRegistrationNames: {
5048 bubbled: keyOf({ onBeforeInput: null }),
5049 captured: keyOf({ onBeforeInputCapture: null })
5050 },
5051 dependencies: [topLevelTypes.topCompositionEnd, topLevelTypes.topKeyPress, topLevelTypes.topTextInput, topLevelTypes.topPaste]
5052 },
5053 compositionEnd: {
5054 phasedRegistrationNames: {
5055 bubbled: keyOf({ onCompositionEnd: null }),
5056 captured: keyOf({ onCompositionEndCapture: null })
5057 },
5058 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionEnd, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
5059 },
5060 compositionStart: {
5061 phasedRegistrationNames: {
5062 bubbled: keyOf({ onCompositionStart: null }),
5063 captured: keyOf({ onCompositionStartCapture: null })
5064 },
5065 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionStart, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
5066 },
5067 compositionUpdate: {
5068 phasedRegistrationNames: {
5069 bubbled: keyOf({ onCompositionUpdate: null }),
5070 captured: keyOf({ onCompositionUpdateCapture: null })
5071 },
5072 dependencies: [topLevelTypes.topBlur, topLevelTypes.topCompositionUpdate, topLevelTypes.topKeyDown, topLevelTypes.topKeyPress, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown]
5073 }
5074 };
5075
5076 // Track whether we've ever handled a keypress on the space key.
5077 var hasSpaceKeypress = false;
5078
5079 /**
5080 * Return whether a native keypress event is assumed to be a command.
5081 * This is required because Firefox fires `keypress` events for key commands
5082 * (cut, copy, select-all, etc.) even though no character is inserted.
5083 */
5084 function isKeypressCommand(nativeEvent) {
5085 return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) &&
5086 // ctrlKey && altKey is equivalent to AltGr, and is not a command.
5087 !(nativeEvent.ctrlKey && nativeEvent.altKey);
5088 }
5089
5090 /**
5091 * Translate native top level events into event types.
5092 *
5093 * @param {string} topLevelType
5094 * @return {object}
5095 */
5096 function getCompositionEventType(topLevelType) {
5097 switch (topLevelType) {
5098 case topLevelTypes.topCompositionStart:
5099 return eventTypes.compositionStart;
5100 case topLevelTypes.topCompositionEnd:
5101 return eventTypes.compositionEnd;
5102 case topLevelTypes.topCompositionUpdate:
5103 return eventTypes.compositionUpdate;
5104 }
5105 }
5106
5107 /**
5108 * Does our fallback best-guess model think this event signifies that
5109 * composition has begun?
5110 *
5111 * @param {string} topLevelType
5112 * @param {object} nativeEvent
5113 * @return {boolean}
5114 */
5115 function isFallbackCompositionStart(topLevelType, nativeEvent) {
5116 return topLevelType === topLevelTypes.topKeyDown && nativeEvent.keyCode === START_KEYCODE;
5117 }
5118
5119 /**
5120 * Does our fallback mode think that this event is the end of composition?
5121 *
5122 * @param {string} topLevelType
5123 * @param {object} nativeEvent
5124 * @return {boolean}
5125 */
5126 function isFallbackCompositionEnd(topLevelType, nativeEvent) {
5127 switch (topLevelType) {
5128 case topLevelTypes.topKeyUp:
5129 // Command keys insert or clear IME input.
5130 return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
5131 case topLevelTypes.topKeyDown:
5132 // Expect IME keyCode on each keydown. If we get any other
5133 // code we must have exited earlier.
5134 return nativeEvent.keyCode !== START_KEYCODE;
5135 case topLevelTypes.topKeyPress:
5136 case topLevelTypes.topMouseDown:
5137 case topLevelTypes.topBlur:
5138 // Events are not possible without cancelling IME.
5139 return true;
5140 default:
5141 return false;
5142 }
5143 }
5144
5145 /**
5146 * Google Input Tools provides composition data via a CustomEvent,
5147 * with the `data` property populated in the `detail` object. If this
5148 * is available on the event object, use it. If not, this is a plain
5149 * composition event and we have nothing special to extract.
5150 *
5151 * @param {object} nativeEvent
5152 * @return {?string}
5153 */
5154 function getDataFromCustomEvent(nativeEvent) {
5155 var detail = nativeEvent.detail;
5156 if (typeof detail === 'object' && 'data' in detail) {
5157 return detail.data;
5158 }
5159 return null;
5160 }
5161
5162 // Track the current IME composition fallback object, if any.
5163 var currentComposition = null;
5164
5165 /**
5166 * @return {?object} A SyntheticCompositionEvent.
5167 */
5168 function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5169 var eventType;
5170 var fallbackData;
5171
5172 if (canUseCompositionEvent) {
5173 eventType = getCompositionEventType(topLevelType);
5174 } else if (!currentComposition) {
5175 if (isFallbackCompositionStart(topLevelType, nativeEvent)) {
5176 eventType = eventTypes.compositionStart;
5177 }
5178 } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) {
5179 eventType = eventTypes.compositionEnd;
5180 }
5181
5182 if (!eventType) {
5183 return null;
5184 }
5185
5186 if (useFallbackCompositionData) {
5187 // The current composition is stored statically and must not be
5188 // overwritten while composition continues.
5189 if (!currentComposition && eventType === eventTypes.compositionStart) {
5190 currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
5191 } else if (eventType === eventTypes.compositionEnd) {
5192 if (currentComposition) {
5193 fallbackData = currentComposition.getData();
5194 }
5195 }
5196 }
5197
5198 var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
5199
5200 if (fallbackData) {
5201 // Inject data generated from fallback path into the synthetic event.
5202 // This matches the property of native CompositionEventInterface.
5203 event.data = fallbackData;
5204 } else {
5205 var customData = getDataFromCustomEvent(nativeEvent);
5206 if (customData !== null) {
5207 event.data = customData;
5208 }
5209 }
5210
5211 EventPropagators.accumulateTwoPhaseDispatches(event);
5212 return event;
5213 }
5214
5215 /**
5216 * @param {string} topLevelType Record from `EventConstants`.
5217 * @param {object} nativeEvent Native browser event.
5218 * @return {?string} The string corresponding to this `beforeInput` event.
5219 */
5220 function getNativeBeforeInputChars(topLevelType, nativeEvent) {
5221 switch (topLevelType) {
5222 case topLevelTypes.topCompositionEnd:
5223 return getDataFromCustomEvent(nativeEvent);
5224 case topLevelTypes.topKeyPress:
5225 /**
5226 * If native `textInput` events are available, our goal is to make
5227 * use of them. However, there is a special case: the spacebar key.
5228 * In Webkit, preventing default on a spacebar `textInput` event
5229 * cancels character insertion, but it *also* causes the browser
5230 * to fall back to its default spacebar behavior of scrolling the
5231 * page.
5232 *
5233 * Tracking at:
5234 * https://code.google.com/p/chromium/issues/detail?id=355103
5235 *
5236 * To avoid this issue, use the keypress event as if no `textInput`
5237 * event is available.
5238 */
5239 var which = nativeEvent.which;
5240 if (which !== SPACEBAR_CODE) {
5241 return null;
5242 }
5243
5244 hasSpaceKeypress = true;
5245 return SPACEBAR_CHAR;
5246
5247 case topLevelTypes.topTextInput:
5248 // Record the characters to be added to the DOM.
5249 var chars = nativeEvent.data;
5250
5251 // If it's a spacebar character, assume that we have already handled
5252 // it at the keypress level and bail immediately. Android Chrome
5253 // doesn't give us keycodes, so we need to blacklist it.
5254 if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
5255 return null;
5256 }
5257
5258 return chars;
5259
5260 default:
5261 // For other native event types, do nothing.
5262 return null;
5263 }
5264 }
5265
5266 /**
5267 * For browsers that do not provide the `textInput` event, extract the
5268 * appropriate string to use for SyntheticInputEvent.
5269 *
5270 * @param {string} topLevelType Record from `EventConstants`.
5271 * @param {object} nativeEvent Native browser event.
5272 * @return {?string} The fallback string for this `beforeInput` event.
5273 */
5274 function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
5275 // If we are currently composing (IME) and using a fallback to do so,
5276 // try to extract the composed characters from the fallback object.
5277 // If composition event is available, we extract a string only at
5278 // compositionevent, otherwise extract it at fallback events.
5279 if (currentComposition) {
5280 if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
5281 var chars = currentComposition.getData();
5282 FallbackCompositionState.release(currentComposition);
5283 currentComposition = null;
5284 return chars;
5285 }
5286 return null;
5287 }
5288
5289 switch (topLevelType) {
5290 case topLevelTypes.topPaste:
5291 // If a paste event occurs after a keypress, throw out the input
5292 // chars. Paste events should not lead to BeforeInput events.
5293 return null;
5294 case topLevelTypes.topKeyPress:
5295 /**
5296 * As of v27, Firefox may fire keypress events even when no character
5297 * will be inserted. A few possibilities:
5298 *
5299 * - `which` is `0`. Arrow keys, Esc key, etc.
5300 *
5301 * - `which` is the pressed key code, but no char is available.
5302 * Ex: 'AltGr + d` in Polish. There is no modified character for
5303 * this key combination and no character is inserted into the
5304 * document, but FF fires the keypress for char code `100` anyway.
5305 * No `input` event will occur.
5306 *
5307 * - `which` is the pressed key code, but a command combination is
5308 * being used. Ex: `Cmd+C`. No character is inserted, and no
5309 * `input` event will occur.
5310 */
5311 if (nativeEvent.which && !isKeypressCommand(nativeEvent)) {
5312 return String.fromCharCode(nativeEvent.which);
5313 }
5314 return null;
5315 case topLevelTypes.topCompositionEnd:
5316 return useFallbackCompositionData ? null : nativeEvent.data;
5317 default:
5318 return null;
5319 }
5320 }
5321
5322 /**
5323 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
5324 * `textInput` or fallback behavior.
5325 *
5326 * @return {?object} A SyntheticInputEvent.
5327 */
5328 function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5329 var chars;
5330
5331 if (canUseTextInputEvent) {
5332 chars = getNativeBeforeInputChars(topLevelType, nativeEvent);
5333 } else {
5334 chars = getFallbackBeforeInputChars(topLevelType, nativeEvent);
5335 }
5336
5337 // If no characters are being inserted, no BeforeInput event should
5338 // be fired.
5339 if (!chars) {
5340 return null;
5341 }
5342
5343 var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
5344
5345 event.data = chars;
5346 EventPropagators.accumulateTwoPhaseDispatches(event);
5347 return event;
5348 }
5349
5350 /**
5351 * Create an `onBeforeInput` event to match
5352 * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
5353 *
5354 * This event plugin is based on the native `textInput` event
5355 * available in Chrome, Safari, Opera, and IE. This event fires after
5356 * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
5357 *
5358 * `beforeInput` is spec'd but not implemented in any browsers, and
5359 * the `input` event does not provide any useful information about what has
5360 * actually been added, contrary to the spec. Thus, `textInput` is the best
5361 * available event to identify the characters that have actually been inserted
5362 * into the target node.
5363 *
5364 * This plugin is also responsible for emitting `composition` events, thus
5365 * allowing us to share composition fallback code for both `beforeInput` and
5366 * `composition` event types.
5367 */
5368 var BeforeInputEventPlugin = {
5369
5370 eventTypes: eventTypes,
5371
5372 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5373 return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
5374 }
5375 };
5376
5377 module.exports = BeforeInputEventPlugin;
5378
5379/***/ },
5380/* 129 */
5381/***/ function(module, exports, __webpack_require__) {
5382
5383 /**
5384 * Copyright 2013-present, Facebook, Inc.
5385 * All rights reserved.
5386 *
5387 * This source code is licensed under the BSD-style license found in the
5388 * LICENSE file in the root directory of this source tree. An additional grant
5389 * of patent rights can be found in the PATENTS file in the same directory.
5390 *
5391 * @providesModule EventConstants
5392 */
5393
5394 'use strict';
5395
5396 var keyMirror = __webpack_require__(110);
5397
5398 var PropagationPhases = keyMirror({ bubbled: null, captured: null });
5399
5400 /**
5401 * Types of raw signals from the browser caught at the top level.
5402 */
5403 var topLevelTypes = keyMirror({
5404 topAbort: null,
5405 topAnimationEnd: null,
5406 topAnimationIteration: null,
5407 topAnimationStart: null,
5408 topBlur: null,
5409 topCanPlay: null,
5410 topCanPlayThrough: null,
5411 topChange: null,
5412 topClick: null,
5413 topCompositionEnd: null,
5414 topCompositionStart: null,
5415 topCompositionUpdate: null,
5416 topContextMenu: null,
5417 topCopy: null,
5418 topCut: null,
5419 topDoubleClick: null,
5420 topDrag: null,
5421 topDragEnd: null,
5422 topDragEnter: null,
5423 topDragExit: null,
5424 topDragLeave: null,
5425 topDragOver: null,
5426 topDragStart: null,
5427 topDrop: null,
5428 topDurationChange: null,
5429 topEmptied: null,
5430 topEncrypted: null,
5431 topEnded: null,
5432 topError: null,
5433 topFocus: null,
5434 topInput: null,
5435 topInvalid: null,
5436 topKeyDown: null,
5437 topKeyPress: null,
5438 topKeyUp: null,
5439 topLoad: null,
5440 topLoadedData: null,
5441 topLoadedMetadata: null,
5442 topLoadStart: null,
5443 topMouseDown: null,
5444 topMouseMove: null,
5445 topMouseOut: null,
5446 topMouseOver: null,
5447 topMouseUp: null,
5448 topPaste: null,
5449 topPause: null,
5450 topPlay: null,
5451 topPlaying: null,
5452 topProgress: null,
5453 topRateChange: null,
5454 topReset: null,
5455 topScroll: null,
5456 topSeeked: null,
5457 topSeeking: null,
5458 topSelectionChange: null,
5459 topStalled: null,
5460 topSubmit: null,
5461 topSuspend: null,
5462 topTextInput: null,
5463 topTimeUpdate: null,
5464 topTouchCancel: null,
5465 topTouchEnd: null,
5466 topTouchMove: null,
5467 topTouchStart: null,
5468 topTransitionEnd: null,
5469 topVolumeChange: null,
5470 topWaiting: null,
5471 topWheel: null
5472 });
5473
5474 var EventConstants = {
5475 topLevelTypes: topLevelTypes,
5476 PropagationPhases: PropagationPhases
5477 };
5478
5479 module.exports = EventConstants;
5480
5481/***/ },
5482/* 130 */
5483/***/ function(module, exports, __webpack_require__) {
5484
5485 /**
5486 * Copyright 2013-present, Facebook, Inc.
5487 * All rights reserved.
5488 *
5489 * This source code is licensed under the BSD-style license found in the
5490 * LICENSE file in the root directory of this source tree. An additional grant
5491 * of patent rights can be found in the PATENTS file in the same directory.
5492 *
5493 * @providesModule EventPropagators
5494 */
5495
5496 'use strict';
5497
5498 var EventConstants = __webpack_require__(129);
5499 var EventPluginHub = __webpack_require__(131);
5500 var EventPluginUtils = __webpack_require__(133);
5501
5502 var accumulateInto = __webpack_require__(135);
5503 var forEachAccumulated = __webpack_require__(136);
5504 var warning = __webpack_require__(98);
5505
5506 var PropagationPhases = EventConstants.PropagationPhases;
5507 var getListener = EventPluginHub.getListener;
5508
5509 /**
5510 * Some event types have a notion of different registration names for different
5511 * "phases" of propagation. This finds listeners by a given phase.
5512 */
5513 function listenerAtPhase(inst, event, propagationPhase) {
5514 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
5515 return getListener(inst, registrationName);
5516 }
5517
5518 /**
5519 * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
5520 * here, allows us to not have to bind or create functions for each event.
5521 * Mutating the event's members allows us to not have to create a wrapping
5522 * "dispatch" object that pairs the event with the listener.
5523 */
5524 function accumulateDirectionalDispatches(inst, upwards, event) {
5525 if ((undefined) !== 'production') {
5526 (undefined) !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
5527 }
5528 var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
5529 var listener = listenerAtPhase(inst, event, phase);
5530 if (listener) {
5531 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
5532 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
5533 }
5534 }
5535
5536 /**
5537 * Collect dispatches (must be entirely collected before dispatching - see unit
5538 * tests). Lazily allocate the array to conserve memory. We must loop through
5539 * each event and perform the traversal for each one. We cannot perform a
5540 * single traversal for the entire collection of events because each event may
5541 * have a different target.
5542 */
5543 function accumulateTwoPhaseDispatchesSingle(event) {
5544 if (event && event.dispatchConfig.phasedRegistrationNames) {
5545 EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
5546 }
5547 }
5548
5549 /**
5550 * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
5551 */
5552 function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
5553 if (event && event.dispatchConfig.phasedRegistrationNames) {
5554 var targetInst = event._targetInst;
5555 var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
5556 EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
5557 }
5558 }
5559
5560 /**
5561 * Accumulates without regard to direction, does not look for phased
5562 * registration names. Same as `accumulateDirectDispatchesSingle` but without
5563 * requiring that the `dispatchMarker` be the same as the dispatched ID.
5564 */
5565 function accumulateDispatches(inst, ignoredDirection, event) {
5566 if (event && event.dispatchConfig.registrationName) {
5567 var registrationName = event.dispatchConfig.registrationName;
5568 var listener = getListener(inst, registrationName);
5569 if (listener) {
5570 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
5571 event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
5572 }
5573 }
5574 }
5575
5576 /**
5577 * Accumulates dispatches on an `SyntheticEvent`, but only for the
5578 * `dispatchMarker`.
5579 * @param {SyntheticEvent} event
5580 */
5581 function accumulateDirectDispatchesSingle(event) {
5582 if (event && event.dispatchConfig.registrationName) {
5583 accumulateDispatches(event._targetInst, null, event);
5584 }
5585 }
5586
5587 function accumulateTwoPhaseDispatches(events) {
5588 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
5589 }
5590
5591 function accumulateTwoPhaseDispatchesSkipTarget(events) {
5592 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
5593 }
5594
5595 function accumulateEnterLeaveDispatches(leave, enter, from, to) {
5596 EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
5597 }
5598
5599 function accumulateDirectDispatches(events) {
5600 forEachAccumulated(events, accumulateDirectDispatchesSingle);
5601 }
5602
5603 /**
5604 * A small set of propagation patterns, each of which will accept a small amount
5605 * of information, and generate a set of "dispatch ready event objects" - which
5606 * are sets of events that have already been annotated with a set of dispatched
5607 * listener functions/ids. The API is designed this way to discourage these
5608 * propagation strategies from actually executing the dispatches, since we
5609 * always want to collect the entire set of dispatches before executing event a
5610 * single one.
5611 *
5612 * @constructor EventPropagators
5613 */
5614 var EventPropagators = {
5615 accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
5616 accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
5617 accumulateDirectDispatches: accumulateDirectDispatches,
5618 accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
5619 };
5620
5621 module.exports = EventPropagators;
5622
5623/***/ },
5624/* 131 */
5625/***/ function(module, exports, __webpack_require__) {
5626
5627 /**
5628 * Copyright 2013-present, Facebook, Inc.
5629 * All rights reserved.
5630 *
5631 * This source code is licensed under the BSD-style license found in the
5632 * LICENSE file in the root directory of this source tree. An additional grant
5633 * of patent rights can be found in the PATENTS file in the same directory.
5634 *
5635 * @providesModule EventPluginHub
5636 */
5637
5638 'use strict';
5639
5640 var _prodInvariant = __webpack_require__(94);
5641
5642 var EventPluginRegistry = __webpack_require__(132);
5643 var EventPluginUtils = __webpack_require__(133);
5644 var ReactErrorUtils = __webpack_require__(134);
5645
5646 var accumulateInto = __webpack_require__(135);
5647 var forEachAccumulated = __webpack_require__(136);
5648 var invariant = __webpack_require__(95);
5649
5650 /**
5651 * Internal store for event listeners
5652 */
5653 var listenerBank = {};
5654
5655 /**
5656 * Internal queue of events that have accumulated their dispatches and are
5657 * waiting to have their dispatches executed.
5658 */
5659 var eventQueue = null;
5660
5661 /**
5662 * Dispatches an event and releases it back into the pool, unless persistent.
5663 *
5664 * @param {?object} event Synthetic event to be dispatched.
5665 * @param {boolean} simulated If the event is simulated (changes exn behavior)
5666 * @private
5667 */
5668 var executeDispatchesAndRelease = function (event, simulated) {
5669 if (event) {
5670 EventPluginUtils.executeDispatchesInOrder(event, simulated);
5671
5672 if (!event.isPersistent()) {
5673 event.constructor.release(event);
5674 }
5675 }
5676 };
5677 var executeDispatchesAndReleaseSimulated = function (e) {
5678 return executeDispatchesAndRelease(e, true);
5679 };
5680 var executeDispatchesAndReleaseTopLevel = function (e) {
5681 return executeDispatchesAndRelease(e, false);
5682 };
5683
5684 var getDictionaryKey = function (inst) {
5685 // Prevents V8 performance issue:
5686 // https://github.com/facebook/react/pull/7232
5687 return '.' + inst._rootNodeID;
5688 };
5689
5690 /**
5691 * This is a unified interface for event plugins to be installed and configured.
5692 *
5693 * Event plugins can implement the following properties:
5694 *
5695 * `extractEvents` {function(string, DOMEventTarget, string, object): *}
5696 * Required. When a top-level event is fired, this method is expected to
5697 * extract synthetic events that will in turn be queued and dispatched.
5698 *
5699 * `eventTypes` {object}
5700 * Optional, plugins that fire events must publish a mapping of registration
5701 * names that are used to register listeners. Values of this mapping must
5702 * be objects that contain `registrationName` or `phasedRegistrationNames`.
5703 *
5704 * `executeDispatch` {function(object, function, string)}
5705 * Optional, allows plugins to override how an event gets dispatched. By
5706 * default, the listener is simply invoked.
5707 *
5708 * Each plugin that is injected into `EventsPluginHub` is immediately operable.
5709 *
5710 * @public
5711 */
5712 var EventPluginHub = {
5713
5714 /**
5715 * Methods for injecting dependencies.
5716 */
5717 injection: {
5718
5719 /**
5720 * @param {array} InjectedEventPluginOrder
5721 * @public
5722 */
5723 injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder,
5724
5725 /**
5726 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
5727 */
5728 injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
5729
5730 },
5731
5732 /**
5733 * Stores `listener` at `listenerBank[registrationName][key]`. Is idempotent.
5734 *
5735 * @param {object} inst The instance, which is the source of events.
5736 * @param {string} registrationName Name of listener (e.g. `onClick`).
5737 * @param {function} listener The callback to store.
5738 */
5739 putListener: function (inst, registrationName, listener) {
5740 !(typeof listener === 'function') ? (undefined) !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : _prodInvariant('94', registrationName, typeof listener) : void 0;
5741
5742 var key = getDictionaryKey(inst);
5743 var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
5744 bankForRegistrationName[key] = listener;
5745
5746 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5747 if (PluginModule && PluginModule.didPutListener) {
5748 PluginModule.didPutListener(inst, registrationName, listener);
5749 }
5750 },
5751
5752 /**
5753 * @param {object} inst The instance, which is the source of events.
5754 * @param {string} registrationName Name of listener (e.g. `onClick`).
5755 * @return {?function} The stored callback.
5756 */
5757 getListener: function (inst, registrationName) {
5758 var bankForRegistrationName = listenerBank[registrationName];
5759 var key = getDictionaryKey(inst);
5760 return bankForRegistrationName && bankForRegistrationName[key];
5761 },
5762
5763 /**
5764 * Deletes a listener from the registration bank.
5765 *
5766 * @param {object} inst The instance, which is the source of events.
5767 * @param {string} registrationName Name of listener (e.g. `onClick`).
5768 */
5769 deleteListener: function (inst, registrationName) {
5770 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5771 if (PluginModule && PluginModule.willDeleteListener) {
5772 PluginModule.willDeleteListener(inst, registrationName);
5773 }
5774
5775 var bankForRegistrationName = listenerBank[registrationName];
5776 // TODO: This should never be null -- when is it?
5777 if (bankForRegistrationName) {
5778 var key = getDictionaryKey(inst);
5779 delete bankForRegistrationName[key];
5780 }
5781 },
5782
5783 /**
5784 * Deletes all listeners for the DOM element with the supplied ID.
5785 *
5786 * @param {object} inst The instance, which is the source of events.
5787 */
5788 deleteAllListeners: function (inst) {
5789 var key = getDictionaryKey(inst);
5790 for (var registrationName in listenerBank) {
5791 if (!listenerBank.hasOwnProperty(registrationName)) {
5792 continue;
5793 }
5794
5795 if (!listenerBank[registrationName][key]) {
5796 continue;
5797 }
5798
5799 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
5800 if (PluginModule && PluginModule.willDeleteListener) {
5801 PluginModule.willDeleteListener(inst, registrationName);
5802 }
5803
5804 delete listenerBank[registrationName][key];
5805 }
5806 },
5807
5808 /**
5809 * Allows registered plugins an opportunity to extract events from top-level
5810 * native browser events.
5811 *
5812 * @return {*} An accumulation of synthetic events.
5813 * @internal
5814 */
5815 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
5816 var events;
5817 var plugins = EventPluginRegistry.plugins;
5818 for (var i = 0; i < plugins.length; i++) {
5819 // Not every plugin in the ordering may be loaded at runtime.
5820 var possiblePlugin = plugins[i];
5821 if (possiblePlugin) {
5822 var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
5823 if (extractedEvents) {
5824 events = accumulateInto(events, extractedEvents);
5825 }
5826 }
5827 }
5828 return events;
5829 },
5830
5831 /**
5832 * Enqueues a synthetic event that should be dispatched when
5833 * `processEventQueue` is invoked.
5834 *
5835 * @param {*} events An accumulation of synthetic events.
5836 * @internal
5837 */
5838 enqueueEvents: function (events) {
5839 if (events) {
5840 eventQueue = accumulateInto(eventQueue, events);
5841 }
5842 },
5843
5844 /**
5845 * Dispatches all synthetic events on the event queue.
5846 *
5847 * @internal
5848 */
5849 processEventQueue: function (simulated) {
5850 // Set `eventQueue` to null before processing it so that we can tell if more
5851 // events get enqueued while processing.
5852 var processingEventQueue = eventQueue;
5853 eventQueue = null;
5854 if (simulated) {
5855 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
5856 } else {
5857 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
5858 }
5859 !!eventQueue ? (undefined) !== '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;
5860 // This would be a good time to rethrow if any of the event handlers threw.
5861 ReactErrorUtils.rethrowCaughtError();
5862 },
5863
5864 /**
5865 * These are needed for tests only. Do not use!
5866 */
5867 __purge: function () {
5868 listenerBank = {};
5869 },
5870
5871 __getListenerBank: function () {
5872 return listenerBank;
5873 }
5874
5875 };
5876
5877 module.exports = EventPluginHub;
5878
5879/***/ },
5880/* 132 */
5881/***/ function(module, exports, __webpack_require__) {
5882
5883 /**
5884 * Copyright 2013-present, Facebook, Inc.
5885 * All rights reserved.
5886 *
5887 * This source code is licensed under the BSD-style license found in the
5888 * LICENSE file in the root directory of this source tree. An additional grant
5889 * of patent rights can be found in the PATENTS file in the same directory.
5890 *
5891 * @providesModule EventPluginRegistry
5892 */
5893
5894 'use strict';
5895
5896 var _prodInvariant = __webpack_require__(94);
5897
5898 var invariant = __webpack_require__(95);
5899
5900 /**
5901 * Injectable ordering of event plugins.
5902 */
5903 var EventPluginOrder = null;
5904
5905 /**
5906 * Injectable mapping from names to event plugin modules.
5907 */
5908 var namesToPlugins = {};
5909
5910 /**
5911 * Recomputes the plugin list using the injected plugins and plugin ordering.
5912 *
5913 * @private
5914 */
5915 function recomputePluginOrdering() {
5916 if (!EventPluginOrder) {
5917 // Wait until an `EventPluginOrder` is injected.
5918 return;
5919 }
5920 for (var pluginName in namesToPlugins) {
5921 var PluginModule = namesToPlugins[pluginName];
5922 var pluginIndex = EventPluginOrder.indexOf(pluginName);
5923 !(pluginIndex > -1) ? (undefined) !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.', pluginName) : _prodInvariant('96', pluginName) : void 0;
5924 if (EventPluginRegistry.plugins[pluginIndex]) {
5925 continue;
5926 }
5927 !PluginModule.extractEvents ? (undefined) !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.', pluginName) : _prodInvariant('97', pluginName) : void 0;
5928 EventPluginRegistry.plugins[pluginIndex] = PluginModule;
5929 var publishedEvents = PluginModule.eventTypes;
5930 for (var eventName in publishedEvents) {
5931 !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? (undefined) !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : _prodInvariant('98', eventName, pluginName) : void 0;
5932 }
5933 }
5934 }
5935
5936 /**
5937 * Publishes an event so that it can be dispatched by the supplied plugin.
5938 *
5939 * @param {object} dispatchConfig Dispatch configuration for the event.
5940 * @param {object} PluginModule Plugin publishing the event.
5941 * @return {boolean} True if the event was successfully published.
5942 * @private
5943 */
5944 function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
5945 !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? (undefined) !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.', eventName) : _prodInvariant('99', eventName) : void 0;
5946 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
5947
5948 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
5949 if (phasedRegistrationNames) {
5950 for (var phaseName in phasedRegistrationNames) {
5951 if (phasedRegistrationNames.hasOwnProperty(phaseName)) {
5952 var phasedRegistrationName = phasedRegistrationNames[phaseName];
5953 publishRegistrationName(phasedRegistrationName, PluginModule, eventName);
5954 }
5955 }
5956 return true;
5957 } else if (dispatchConfig.registrationName) {
5958 publishRegistrationName(dispatchConfig.registrationName, PluginModule, eventName);
5959 return true;
5960 }
5961 return false;
5962 }
5963
5964 /**
5965 * Publishes a registration name that is used to identify dispatched events and
5966 * can be used with `EventPluginHub.putListener` to register listeners.
5967 *
5968 * @param {string} registrationName Registration name to add.
5969 * @param {object} PluginModule Plugin publishing the event.
5970 * @private
5971 */
5972 function publishRegistrationName(registrationName, PluginModule, eventName) {
5973 !!EventPluginRegistry.registrationNameModules[registrationName] ? (undefined) !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.', registrationName) : _prodInvariant('100', registrationName) : void 0;
5974 EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
5975 EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
5976
5977 if ((undefined) !== 'production') {
5978 var lowerCasedName = registrationName.toLowerCase();
5979 EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
5980
5981 if (registrationName === 'onDoubleClick') {
5982 EventPluginRegistry.possibleRegistrationNames.ondblclick = registrationName;
5983 }
5984 }
5985 }
5986
5987 /**
5988 * Registers plugins so that they can extract and dispatch events.
5989 *
5990 * @see {EventPluginHub}
5991 */
5992 var EventPluginRegistry = {
5993
5994 /**
5995 * Ordered list of injected plugins.
5996 */
5997 plugins: [],
5998
5999 /**
6000 * Mapping from event name to dispatch config
6001 */
6002 eventNameDispatchConfigs: {},
6003
6004 /**
6005 * Mapping from registration name to plugin module
6006 */
6007 registrationNameModules: {},
6008
6009 /**
6010 * Mapping from registration name to event name
6011 */
6012 registrationNameDependencies: {},
6013
6014 /**
6015 * Mapping from lowercase registration names to the properly cased version,
6016 * used to warn in the case of missing event handlers. Available
6017 * only in __DEV__.
6018 * @type {Object}
6019 */
6020 possibleRegistrationNames: (undefined) !== 'production' ? {} : null,
6021
6022 /**
6023 * Injects an ordering of plugins (by plugin name). This allows the ordering
6024 * to be decoupled from injection of the actual plugins so that ordering is
6025 * always deterministic regardless of packaging, on-the-fly injection, etc.
6026 *
6027 * @param {array} InjectedEventPluginOrder
6028 * @internal
6029 * @see {EventPluginHub.injection.injectEventPluginOrder}
6030 */
6031 injectEventPluginOrder: function (InjectedEventPluginOrder) {
6032 !!EventPluginOrder ? (undefined) !== '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;
6033 // Clone the ordering so it cannot be dynamically mutated.
6034 EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
6035 recomputePluginOrdering();
6036 },
6037
6038 /**
6039 * Injects plugins to be used by `EventPluginHub`. The plugin names must be
6040 * in the ordering injected by `injectEventPluginOrder`.
6041 *
6042 * Plugins can be injected as part of page initialization or on-the-fly.
6043 *
6044 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
6045 * @internal
6046 * @see {EventPluginHub.injection.injectEventPluginsByName}
6047 */
6048 injectEventPluginsByName: function (injectedNamesToPlugins) {
6049 var isOrderingDirty = false;
6050 for (var pluginName in injectedNamesToPlugins) {
6051 if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
6052 continue;
6053 }
6054 var PluginModule = injectedNamesToPlugins[pluginName];
6055 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
6056 !!namesToPlugins[pluginName] ? (undefined) !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.', pluginName) : _prodInvariant('102', pluginName) : void 0;
6057 namesToPlugins[pluginName] = PluginModule;
6058 isOrderingDirty = true;
6059 }
6060 }
6061 if (isOrderingDirty) {
6062 recomputePluginOrdering();
6063 }
6064 },
6065
6066 /**
6067 * Looks up the plugin for the supplied event.
6068 *
6069 * @param {object} event A synthetic event.
6070 * @return {?object} The plugin that created the supplied event.
6071 * @internal
6072 */
6073 getPluginModuleForEvent: function (event) {
6074 var dispatchConfig = event.dispatchConfig;
6075 if (dispatchConfig.registrationName) {
6076 return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName] || null;
6077 }
6078 for (var phase in dispatchConfig.phasedRegistrationNames) {
6079 if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) {
6080 continue;
6081 }
6082 var PluginModule = EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]];
6083 if (PluginModule) {
6084 return PluginModule;
6085 }
6086 }
6087 return null;
6088 },
6089
6090 /**
6091 * Exposed for unit testing.
6092 * @private
6093 */
6094 _resetEventPlugins: function () {
6095 EventPluginOrder = null;
6096 for (var pluginName in namesToPlugins) {
6097 if (namesToPlugins.hasOwnProperty(pluginName)) {
6098 delete namesToPlugins[pluginName];
6099 }
6100 }
6101 EventPluginRegistry.plugins.length = 0;
6102
6103 var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs;
6104 for (var eventName in eventNameDispatchConfigs) {
6105 if (eventNameDispatchConfigs.hasOwnProperty(eventName)) {
6106 delete eventNameDispatchConfigs[eventName];
6107 }
6108 }
6109
6110 var registrationNameModules = EventPluginRegistry.registrationNameModules;
6111 for (var registrationName in registrationNameModules) {
6112 if (registrationNameModules.hasOwnProperty(registrationName)) {
6113 delete registrationNameModules[registrationName];
6114 }
6115 }
6116
6117 if ((undefined) !== 'production') {
6118 var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
6119 for (var lowerCasedName in possibleRegistrationNames) {
6120 if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
6121 delete possibleRegistrationNames[lowerCasedName];
6122 }
6123 }
6124 }
6125 }
6126
6127 };
6128
6129 module.exports = EventPluginRegistry;
6130
6131/***/ },
6132/* 133 */
6133/***/ function(module, exports, __webpack_require__) {
6134
6135 /**
6136 * Copyright 2013-present, Facebook, Inc.
6137 * All rights reserved.
6138 *
6139 * This source code is licensed under the BSD-style license found in the
6140 * LICENSE file in the root directory of this source tree. An additional grant
6141 * of patent rights can be found in the PATENTS file in the same directory.
6142 *
6143 * @providesModule EventPluginUtils
6144 */
6145
6146 'use strict';
6147
6148 var _prodInvariant = __webpack_require__(94);
6149
6150 var EventConstants = __webpack_require__(129);
6151 var ReactErrorUtils = __webpack_require__(134);
6152
6153 var invariant = __webpack_require__(95);
6154 var warning = __webpack_require__(98);
6155
6156 /**
6157 * Injected dependencies:
6158 */
6159
6160 /**
6161 * - `ComponentTree`: [required] Module that can convert between React instances
6162 * and actual node references.
6163 */
6164 var ComponentTree;
6165 var TreeTraversal;
6166 var injection = {
6167 injectComponentTree: function (Injected) {
6168 ComponentTree = Injected;
6169 if ((undefined) !== 'production') {
6170 (undefined) !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
6171 }
6172 },
6173 injectTreeTraversal: function (Injected) {
6174 TreeTraversal = Injected;
6175 if ((undefined) !== 'production') {
6176 (undefined) !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
6177 }
6178 }
6179 };
6180
6181 var topLevelTypes = EventConstants.topLevelTypes;
6182
6183 function isEndish(topLevelType) {
6184 return topLevelType === topLevelTypes.topMouseUp || topLevelType === topLevelTypes.topTouchEnd || topLevelType === topLevelTypes.topTouchCancel;
6185 }
6186
6187 function isMoveish(topLevelType) {
6188 return topLevelType === topLevelTypes.topMouseMove || topLevelType === topLevelTypes.topTouchMove;
6189 }
6190 function isStartish(topLevelType) {
6191 return topLevelType === topLevelTypes.topMouseDown || topLevelType === topLevelTypes.topTouchStart;
6192 }
6193
6194 var validateEventDispatches;
6195 if ((undefined) !== 'production') {
6196 validateEventDispatches = function (event) {
6197 var dispatchListeners = event._dispatchListeners;
6198 var dispatchInstances = event._dispatchInstances;
6199
6200 var listenersIsArr = Array.isArray(dispatchListeners);
6201 var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
6202
6203 var instancesIsArr = Array.isArray(dispatchInstances);
6204 var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
6205
6206 (undefined) !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
6207 };
6208 }
6209
6210 /**
6211 * Dispatch the event to the listener.
6212 * @param {SyntheticEvent} event SyntheticEvent to handle
6213 * @param {boolean} simulated If the event is simulated (changes exn behavior)
6214 * @param {function} listener Application-level callback
6215 * @param {*} inst Internal component instance
6216 */
6217 function executeDispatch(event, simulated, listener, inst) {
6218 var type = event.type || 'unknown-event';
6219 event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
6220 if (simulated) {
6221 ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
6222 } else {
6223 ReactErrorUtils.invokeGuardedCallback(type, listener, event);
6224 }
6225 event.currentTarget = null;
6226 }
6227
6228 /**
6229 * Standard/simple iteration through an event's collected dispatches.
6230 */
6231 function executeDispatchesInOrder(event, simulated) {
6232 var dispatchListeners = event._dispatchListeners;
6233 var dispatchInstances = event._dispatchInstances;
6234 if ((undefined) !== 'production') {
6235 validateEventDispatches(event);
6236 }
6237 if (Array.isArray(dispatchListeners)) {
6238 for (var i = 0; i < dispatchListeners.length; i++) {
6239 if (event.isPropagationStopped()) {
6240 break;
6241 }
6242 // Listeners and Instances are two parallel arrays that are always in sync.
6243 executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
6244 }
6245 } else if (dispatchListeners) {
6246 executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
6247 }
6248 event._dispatchListeners = null;
6249 event._dispatchInstances = null;
6250 }
6251
6252 /**
6253 * Standard/simple iteration through an event's collected dispatches, but stops
6254 * at the first dispatch execution returning true, and returns that id.
6255 *
6256 * @return {?string} id of the first dispatch execution who's listener returns
6257 * true, or null if no listener returned true.
6258 */
6259 function executeDispatchesInOrderStopAtTrueImpl(event) {
6260 var dispatchListeners = event._dispatchListeners;
6261 var dispatchInstances = event._dispatchInstances;
6262 if ((undefined) !== 'production') {
6263 validateEventDispatches(event);
6264 }
6265 if (Array.isArray(dispatchListeners)) {
6266 for (var i = 0; i < dispatchListeners.length; i++) {
6267 if (event.isPropagationStopped()) {
6268 break;
6269 }
6270 // Listeners and Instances are two parallel arrays that are always in sync.
6271 if (dispatchListeners[i](event, dispatchInstances[i])) {
6272 return dispatchInstances[i];
6273 }
6274 }
6275 } else if (dispatchListeners) {
6276 if (dispatchListeners(event, dispatchInstances)) {
6277 return dispatchInstances;
6278 }
6279 }
6280 return null;
6281 }
6282
6283 /**
6284 * @see executeDispatchesInOrderStopAtTrueImpl
6285 */
6286 function executeDispatchesInOrderStopAtTrue(event) {
6287 var ret = executeDispatchesInOrderStopAtTrueImpl(event);
6288 event._dispatchInstances = null;
6289 event._dispatchListeners = null;
6290 return ret;
6291 }
6292
6293 /**
6294 * Execution of a "direct" dispatch - there must be at most one dispatch
6295 * accumulated on the event or it is considered an error. It doesn't really make
6296 * sense for an event with multiple dispatches (bubbled) to keep track of the
6297 * return values at each dispatch execution, but it does tend to make sense when
6298 * dealing with "direct" dispatches.
6299 *
6300 * @return {*} The return value of executing the single dispatch.
6301 */
6302 function executeDirectDispatch(event) {
6303 if ((undefined) !== 'production') {
6304 validateEventDispatches(event);
6305 }
6306 var dispatchListener = event._dispatchListeners;
6307 var dispatchInstance = event._dispatchInstances;
6308 !!Array.isArray(dispatchListener) ? (undefined) !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : _prodInvariant('103') : void 0;
6309 event.currentTarget = dispatchListener ? EventPluginUtils.getNodeFromInstance(dispatchInstance) : null;
6310 var res = dispatchListener ? dispatchListener(event) : null;
6311 event.currentTarget = null;
6312 event._dispatchListeners = null;
6313 event._dispatchInstances = null;
6314 return res;
6315 }
6316
6317 /**
6318 * @param {SyntheticEvent} event
6319 * @return {boolean} True iff number of dispatches accumulated is greater than 0.
6320 */
6321 function hasDispatches(event) {
6322 return !!event._dispatchListeners;
6323 }
6324
6325 /**
6326 * General utilities that are useful in creating custom Event Plugins.
6327 */
6328 var EventPluginUtils = {
6329 isEndish: isEndish,
6330 isMoveish: isMoveish,
6331 isStartish: isStartish,
6332
6333 executeDirectDispatch: executeDirectDispatch,
6334 executeDispatchesInOrder: executeDispatchesInOrder,
6335 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
6336 hasDispatches: hasDispatches,
6337
6338 getInstanceFromNode: function (node) {
6339 return ComponentTree.getInstanceFromNode(node);
6340 },
6341 getNodeFromInstance: function (node) {
6342 return ComponentTree.getNodeFromInstance(node);
6343 },
6344 isAncestor: function (a, b) {
6345 return TreeTraversal.isAncestor(a, b);
6346 },
6347 getLowestCommonAncestor: function (a, b) {
6348 return TreeTraversal.getLowestCommonAncestor(a, b);
6349 },
6350 getParentInstance: function (inst) {
6351 return TreeTraversal.getParentInstance(inst);
6352 },
6353 traverseTwoPhase: function (target, fn, arg) {
6354 return TreeTraversal.traverseTwoPhase(target, fn, arg);
6355 },
6356 traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
6357 return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
6358 },
6359
6360 injection: injection
6361 };
6362
6363 module.exports = EventPluginUtils;
6364
6365/***/ },
6366/* 134 */
6367/***/ function(module, exports, __webpack_require__) {
6368
6369 /**
6370 * Copyright 2013-present, Facebook, Inc.
6371 * All rights reserved.
6372 *
6373 * This source code is licensed under the BSD-style license found in the
6374 * LICENSE file in the root directory of this source tree. An additional grant
6375 * of patent rights can be found in the PATENTS file in the same directory.
6376 *
6377 * @providesModule ReactErrorUtils
6378 */
6379
6380 'use strict';
6381
6382 var caughtError = null;
6383
6384 /**
6385 * Call a function while guarding against errors that happens within it.
6386 *
6387 * @param {?String} name of the guard to use for logging or debugging
6388 * @param {Function} func The function to invoke
6389 * @param {*} a First argument
6390 * @param {*} b Second argument
6391 */
6392 function invokeGuardedCallback(name, func, a, b) {
6393 try {
6394 return func(a, b);
6395 } catch (x) {
6396 if (caughtError === null) {
6397 caughtError = x;
6398 }
6399 return undefined;
6400 }
6401 }
6402
6403 var ReactErrorUtils = {
6404 invokeGuardedCallback: invokeGuardedCallback,
6405
6406 /**
6407 * Invoked by ReactTestUtils.Simulate so that any errors thrown by the event
6408 * handler are sure to be rethrown by rethrowCaughtError.
6409 */
6410 invokeGuardedCallbackWithCatch: invokeGuardedCallback,
6411
6412 /**
6413 * During execution of guarded functions we will capture the first error which
6414 * we will rethrow to be handled by the top level error handler.
6415 */
6416 rethrowCaughtError: function () {
6417 if (caughtError) {
6418 var error = caughtError;
6419 caughtError = null;
6420 throw error;
6421 }
6422 }
6423 };
6424
6425 if ((undefined) !== 'production') {
6426 /**
6427 * To help development we can get better devtools integration by simulating a
6428 * real browser event.
6429 */
6430 if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
6431 var fakeNode = document.createElement('react');
6432 ReactErrorUtils.invokeGuardedCallback = function (name, func, a, b) {
6433 var boundFunc = func.bind(null, a, b);
6434 var evtType = 'react-' + name;
6435 fakeNode.addEventListener(evtType, boundFunc, false);
6436 var evt = document.createEvent('Event');
6437 evt.initEvent(evtType, false, false);
6438 fakeNode.dispatchEvent(evt);
6439 fakeNode.removeEventListener(evtType, boundFunc, false);
6440 };
6441 }
6442 }
6443
6444 module.exports = ReactErrorUtils;
6445
6446/***/ },
6447/* 135 */
6448/***/ function(module, exports, __webpack_require__) {
6449
6450 /**
6451 * Copyright 2014-present, Facebook, Inc.
6452 * All rights reserved.
6453 *
6454 * This source code is licensed under the BSD-style license found in the
6455 * LICENSE file in the root directory of this source tree. An additional grant
6456 * of patent rights can be found in the PATENTS file in the same directory.
6457 *
6458 * @providesModule accumulateInto
6459 *
6460 */
6461
6462 'use strict';
6463
6464 var _prodInvariant = __webpack_require__(94);
6465
6466 var invariant = __webpack_require__(95);
6467
6468 /**
6469 * Accumulates items that must not be null or undefined into the first one. This
6470 * is used to conserve memory by avoiding array allocations, and thus sacrifices
6471 * API cleanness. Since `current` can be null before being passed in and not
6472 * null after this function, make sure to assign it back to `current`:
6473 *
6474 * `a = accumulateInto(a, b);`
6475 *
6476 * This API should be sparingly used. Try `accumulate` for something cleaner.
6477 *
6478 * @return {*|array<*>} An accumulation of items.
6479 */
6480
6481 function accumulateInto(current, next) {
6482 !(next != null) ? (undefined) !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : _prodInvariant('30') : void 0;
6483
6484 if (current == null) {
6485 return next;
6486 }
6487
6488 // Both are not empty. Warning: Never call x.concat(y) when you are not
6489 // certain that x is an Array (x could be a string with concat method).
6490 if (Array.isArray(current)) {
6491 if (Array.isArray(next)) {
6492 current.push.apply(current, next);
6493 return current;
6494 }
6495 current.push(next);
6496 return current;
6497 }
6498
6499 if (Array.isArray(next)) {
6500 // A bit too dangerous to mutate `next`.
6501 return [current].concat(next);
6502 }
6503
6504 return [current, next];
6505 }
6506
6507 module.exports = accumulateInto;
6508
6509/***/ },
6510/* 136 */
6511/***/ function(module, exports) {
6512
6513 /**
6514 * Copyright 2013-present, Facebook, Inc.
6515 * All rights reserved.
6516 *
6517 * This source code is licensed under the BSD-style license found in the
6518 * LICENSE file in the root directory of this source tree. An additional grant
6519 * of patent rights can be found in the PATENTS file in the same directory.
6520 *
6521 * @providesModule forEachAccumulated
6522 *
6523 */
6524
6525 'use strict';
6526
6527 /**
6528 * @param {array} arr an "accumulation" of items which is either an Array or
6529 * a single item. Useful when paired with the `accumulate` module. This is a
6530 * simple utility that allows us to reason about a collection of items, but
6531 * handling the case when there is exactly one item (and we do not need to
6532 * allocate an array).
6533 */
6534
6535 function forEachAccumulated(arr, cb, scope) {
6536 if (Array.isArray(arr)) {
6537 arr.forEach(cb, scope);
6538 } else if (arr) {
6539 cb.call(scope, arr);
6540 }
6541 }
6542
6543 module.exports = forEachAccumulated;
6544
6545/***/ },
6546/* 137 */
6547/***/ function(module, exports) {
6548
6549 /**
6550 * Copyright (c) 2013-present, Facebook, Inc.
6551 * All rights reserved.
6552 *
6553 * This source code is licensed under the BSD-style license found in the
6554 * LICENSE file in the root directory of this source tree. An additional grant
6555 * of patent rights can be found in the PATENTS file in the same directory.
6556 *
6557 */
6558
6559 'use strict';
6560
6561 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
6562
6563 /**
6564 * Simple, lightweight module assisting with the detection and context of
6565 * Worker. Helps avoid circular dependencies and allows code to reason about
6566 * whether or not they are in a Worker, even if they never include the main
6567 * `ReactWorker` dependency.
6568 */
6569 var ExecutionEnvironment = {
6570
6571 canUseDOM: canUseDOM,
6572
6573 canUseWorkers: typeof Worker !== 'undefined',
6574
6575 canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),
6576
6577 canUseViewport: canUseDOM && !!window.screen,
6578
6579 isInWorker: !canUseDOM // For now, this is true - might change in the future.
6580
6581 };
6582
6583 module.exports = ExecutionEnvironment;
6584
6585/***/ },
6586/* 138 */
6587/***/ function(module, exports, __webpack_require__) {
6588
6589 /**
6590 * Copyright 2013-present, Facebook, Inc.
6591 * All rights reserved.
6592 *
6593 * This source code is licensed under the BSD-style license found in the
6594 * LICENSE file in the root directory of this source tree. An additional grant
6595 * of patent rights can be found in the PATENTS file in the same directory.
6596 *
6597 * @providesModule FallbackCompositionState
6598 */
6599
6600 'use strict';
6601
6602 var _assign = __webpack_require__(91);
6603
6604 var PooledClass = __webpack_require__(93);
6605
6606 var getTextContentAccessor = __webpack_require__(139);
6607
6608 /**
6609 * This helper class stores information about text content of a target node,
6610 * allowing comparison of content before and after a given event.
6611 *
6612 * Identify the node where selection currently begins, then observe
6613 * both its text content and its current position in the DOM. Since the
6614 * browser may natively replace the target node during composition, we can
6615 * use its position to find its replacement.
6616 *
6617 * @param {DOMEventTarget} root
6618 */
6619 function FallbackCompositionState(root) {
6620 this._root = root;
6621 this._startText = this.getText();
6622 this._fallbackText = null;
6623 }
6624
6625 _assign(FallbackCompositionState.prototype, {
6626 destructor: function () {
6627 this._root = null;
6628 this._startText = null;
6629 this._fallbackText = null;
6630 },
6631
6632 /**
6633 * Get current text of input.
6634 *
6635 * @return {string}
6636 */
6637 getText: function () {
6638 if ('value' in this._root) {
6639 return this._root.value;
6640 }
6641 return this._root[getTextContentAccessor()];
6642 },
6643
6644 /**
6645 * Determine the differing substring between the initially stored
6646 * text content and the current content.
6647 *
6648 * @return {string}
6649 */
6650 getData: function () {
6651 if (this._fallbackText) {
6652 return this._fallbackText;
6653 }
6654
6655 var start;
6656 var startValue = this._startText;
6657 var startLength = startValue.length;
6658 var end;
6659 var endValue = this.getText();
6660 var endLength = endValue.length;
6661
6662 for (start = 0; start < startLength; start++) {
6663 if (startValue[start] !== endValue[start]) {
6664 break;
6665 }
6666 }
6667
6668 var minEnd = startLength - start;
6669 for (end = 1; end <= minEnd; end++) {
6670 if (startValue[startLength - end] !== endValue[endLength - end]) {
6671 break;
6672 }
6673 }
6674
6675 var sliceTail = end > 1 ? 1 - end : undefined;
6676 this._fallbackText = endValue.slice(start, sliceTail);
6677 return this._fallbackText;
6678 }
6679 });
6680
6681 PooledClass.addPoolingTo(FallbackCompositionState);
6682
6683 module.exports = FallbackCompositionState;
6684
6685/***/ },
6686/* 139 */
6687/***/ function(module, exports, __webpack_require__) {
6688
6689 /**
6690 * Copyright 2013-present, Facebook, Inc.
6691 * All rights reserved.
6692 *
6693 * This source code is licensed under the BSD-style license found in the
6694 * LICENSE file in the root directory of this source tree. An additional grant
6695 * of patent rights can be found in the PATENTS file in the same directory.
6696 *
6697 * @providesModule getTextContentAccessor
6698 */
6699
6700 'use strict';
6701
6702 var ExecutionEnvironment = __webpack_require__(137);
6703
6704 var contentKey = null;
6705
6706 /**
6707 * Gets the key used to access text content on a DOM node.
6708 *
6709 * @return {?string} Key used to access text content.
6710 * @internal
6711 */
6712 function getTextContentAccessor() {
6713 if (!contentKey && ExecutionEnvironment.canUseDOM) {
6714 // Prefer textContent to innerText because many browsers support both but
6715 // SVG <text> elements don't support innerText even when <div> does.
6716 contentKey = 'textContent' in document.documentElement ? 'textContent' : 'innerText';
6717 }
6718 return contentKey;
6719 }
6720
6721 module.exports = getTextContentAccessor;
6722
6723/***/ },
6724/* 140 */
6725/***/ function(module, exports, __webpack_require__) {
6726
6727 /**
6728 * Copyright 2013-present, Facebook, Inc.
6729 * All rights reserved.
6730 *
6731 * This source code is licensed under the BSD-style license found in the
6732 * LICENSE file in the root directory of this source tree. An additional grant
6733 * of patent rights can be found in the PATENTS file in the same directory.
6734 *
6735 * @providesModule SyntheticCompositionEvent
6736 */
6737
6738 'use strict';
6739
6740 var SyntheticEvent = __webpack_require__(141);
6741
6742 /**
6743 * @interface Event
6744 * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
6745 */
6746 var CompositionEventInterface = {
6747 data: null
6748 };
6749
6750 /**
6751 * @param {object} dispatchConfig Configuration used to dispatch this event.
6752 * @param {string} dispatchMarker Marker identifying the event target.
6753 * @param {object} nativeEvent Native browser event.
6754 * @extends {SyntheticUIEvent}
6755 */
6756 function SyntheticCompositionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
6757 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
6758 }
6759
6760 SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface);
6761
6762 module.exports = SyntheticCompositionEvent;
6763
6764/***/ },
6765/* 141 */
6766/***/ function(module, exports, __webpack_require__) {
6767
6768 /**
6769 * Copyright 2013-present, Facebook, Inc.
6770 * All rights reserved.
6771 *
6772 * This source code is licensed under the BSD-style license found in the
6773 * LICENSE file in the root directory of this source tree. An additional grant
6774 * of patent rights can be found in the PATENTS file in the same directory.
6775 *
6776 * @providesModule SyntheticEvent
6777 */
6778
6779 'use strict';
6780
6781 var _assign = __webpack_require__(91);
6782
6783 var PooledClass = __webpack_require__(93);
6784
6785 var emptyFunction = __webpack_require__(99);
6786 var warning = __webpack_require__(98);
6787
6788 var didWarnForAddedNewProperty = false;
6789 var isProxySupported = typeof Proxy === 'function';
6790
6791 var shouldBeReleasedProperties = ['dispatchConfig', '_targetInst', 'nativeEvent', 'isDefaultPrevented', 'isPropagationStopped', '_dispatchListeners', '_dispatchInstances'];
6792
6793 /**
6794 * @interface Event
6795 * @see http://www.w3.org/TR/DOM-Level-3-Events/
6796 */
6797 var EventInterface = {
6798 type: null,
6799 target: null,
6800 // currentTarget is set when dispatching; no use in copying it here
6801 currentTarget: emptyFunction.thatReturnsNull,
6802 eventPhase: null,
6803 bubbles: null,
6804 cancelable: null,
6805 timeStamp: function (event) {
6806 return event.timeStamp || Date.now();
6807 },
6808 defaultPrevented: null,
6809 isTrusted: null
6810 };
6811
6812 /**
6813 * Synthetic events are dispatched by event plugins, typically in response to a
6814 * top-level event delegation handler.
6815 *
6816 * These systems should generally use pooling to reduce the frequency of garbage
6817 * collection. The system should check `isPersistent` to determine whether the
6818 * event should be released into the pool after being dispatched. Users that
6819 * need a persisted event should invoke `persist`.
6820 *
6821 * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
6822 * normalizing browser quirks. Subclasses do not necessarily have to implement a
6823 * DOM interface; custom application-specific events can also subclass this.
6824 *
6825 * @param {object} dispatchConfig Configuration used to dispatch this event.
6826 * @param {*} targetInst Marker identifying the event target.
6827 * @param {object} nativeEvent Native browser event.
6828 * @param {DOMEventTarget} nativeEventTarget Target node.
6829 */
6830 function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarget) {
6831 if ((undefined) !== 'production') {
6832 // these have a getter/setter for warnings
6833 delete this.nativeEvent;
6834 delete this.preventDefault;
6835 delete this.stopPropagation;
6836 }
6837
6838 this.dispatchConfig = dispatchConfig;
6839 this._targetInst = targetInst;
6840 this.nativeEvent = nativeEvent;
6841
6842 var Interface = this.constructor.Interface;
6843 for (var propName in Interface) {
6844 if (!Interface.hasOwnProperty(propName)) {
6845 continue;
6846 }
6847 if ((undefined) !== 'production') {
6848 delete this[propName]; // this has a getter/setter for warnings
6849 }
6850 var normalize = Interface[propName];
6851 if (normalize) {
6852 this[propName] = normalize(nativeEvent);
6853 } else {
6854 if (propName === 'target') {
6855 this.target = nativeEventTarget;
6856 } else {
6857 this[propName] = nativeEvent[propName];
6858 }
6859 }
6860 }
6861
6862 var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
6863 if (defaultPrevented) {
6864 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
6865 } else {
6866 this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
6867 }
6868 this.isPropagationStopped = emptyFunction.thatReturnsFalse;
6869 return this;
6870 }
6871
6872 _assign(SyntheticEvent.prototype, {
6873
6874 preventDefault: function () {
6875 this.defaultPrevented = true;
6876 var event = this.nativeEvent;
6877 if (!event) {
6878 return;
6879 }
6880
6881 if (event.preventDefault) {
6882 event.preventDefault();
6883 } else if (typeof event.returnValue !== 'unknown') {
6884 // eslint-disable-line valid-typeof
6885 event.returnValue = false;
6886 }
6887 this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
6888 },
6889
6890 stopPropagation: function () {
6891 var event = this.nativeEvent;
6892 if (!event) {
6893 return;
6894 }
6895
6896 if (event.stopPropagation) {
6897 event.stopPropagation();
6898 } else if (typeof event.cancelBubble !== 'unknown') {
6899 // eslint-disable-line valid-typeof
6900 // The ChangeEventPlugin registers a "propertychange" event for
6901 // IE. This event does not support bubbling or cancelling, and
6902 // any references to cancelBubble throw "Member not found". A
6903 // typeof check of "unknown" circumvents this issue (and is also
6904 // IE specific).
6905 event.cancelBubble = true;
6906 }
6907
6908 this.isPropagationStopped = emptyFunction.thatReturnsTrue;
6909 },
6910
6911 /**
6912 * We release all dispatched `SyntheticEvent`s after each event loop, adding
6913 * them back into the pool. This allows a way to hold onto a reference that
6914 * won't be added back into the pool.
6915 */
6916 persist: function () {
6917 this.isPersistent = emptyFunction.thatReturnsTrue;
6918 },
6919
6920 /**
6921 * Checks if this event should be released back into the pool.
6922 *
6923 * @return {boolean} True if this should not be released, false otherwise.
6924 */
6925 isPersistent: emptyFunction.thatReturnsFalse,
6926
6927 /**
6928 * `PooledClass` looks for `destructor` on each instance it releases.
6929 */
6930 destructor: function () {
6931 var Interface = this.constructor.Interface;
6932 for (var propName in Interface) {
6933 if ((undefined) !== 'production') {
6934 Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
6935 } else {
6936 this[propName] = null;
6937 }
6938 }
6939 for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
6940 this[shouldBeReleasedProperties[i]] = null;
6941 }
6942 if ((undefined) !== 'production') {
6943 Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
6944 Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
6945 Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
6946 }
6947 }
6948
6949 });
6950
6951 SyntheticEvent.Interface = EventInterface;
6952
6953 if ((undefined) !== 'production') {
6954 if (isProxySupported) {
6955 /*eslint-disable no-func-assign */
6956 SyntheticEvent = new Proxy(SyntheticEvent, {
6957 construct: function (target, args) {
6958 return this.apply(target, Object.create(target.prototype), args);
6959 },
6960 apply: function (constructor, that, args) {
6961 return new Proxy(constructor.apply(that, args), {
6962 set: function (target, prop, value) {
6963 if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
6964 (undefined) !== '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;
6965 didWarnForAddedNewProperty = true;
6966 }
6967 target[prop] = value;
6968 return true;
6969 }
6970 });
6971 }
6972 });
6973 /*eslint-enable no-func-assign */
6974 }
6975 }
6976 /**
6977 * Helper to reduce boilerplate when creating subclasses.
6978 *
6979 * @param {function} Class
6980 * @param {?object} Interface
6981 */
6982 SyntheticEvent.augmentClass = function (Class, Interface) {
6983 var Super = this;
6984
6985 var E = function () {};
6986 E.prototype = Super.prototype;
6987 var prototype = new E();
6988
6989 _assign(prototype, Class.prototype);
6990 Class.prototype = prototype;
6991 Class.prototype.constructor = Class;
6992
6993 Class.Interface = _assign({}, Super.Interface, Interface);
6994 Class.augmentClass = Super.augmentClass;
6995
6996 PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
6997 };
6998
6999 PooledClass.addPoolingTo(SyntheticEvent, PooledClass.fourArgumentPooler);
7000
7001 module.exports = SyntheticEvent;
7002
7003 /**
7004 * Helper to nullify syntheticEvent instance properties when destructing
7005 *
7006 * @param {object} SyntheticEvent
7007 * @param {String} propName
7008 * @return {object} defineProperty object
7009 */
7010 function getPooledWarningPropertyDefinition(propName, getVal) {
7011 var isFunction = typeof getVal === 'function';
7012 return {
7013 configurable: true,
7014 set: set,
7015 get: get
7016 };
7017
7018 function set(val) {
7019 var action = isFunction ? 'setting the method' : 'setting the property';
7020 warn(action, 'This is effectively a no-op');
7021 return val;
7022 }
7023
7024 function get() {
7025 var action = isFunction ? 'accessing the method' : 'accessing the property';
7026 var result = isFunction ? 'This is a no-op function' : 'This is set to null';
7027 warn(action, result);
7028 return getVal;
7029 }
7030
7031 function warn(action, result) {
7032 var warningCondition = false;
7033 (undefined) !== '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;
7034 }
7035 }
7036
7037/***/ },
7038/* 142 */
7039/***/ function(module, exports, __webpack_require__) {
7040
7041 /**
7042 * Copyright 2013-present, Facebook, Inc.
7043 * All rights reserved.
7044 *
7045 * This source code is licensed under the BSD-style license found in the
7046 * LICENSE file in the root directory of this source tree. An additional grant
7047 * of patent rights can be found in the PATENTS file in the same directory.
7048 *
7049 * @providesModule SyntheticInputEvent
7050 */
7051
7052 'use strict';
7053
7054 var SyntheticEvent = __webpack_require__(141);
7055
7056 /**
7057 * @interface Event
7058 * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
7059 * /#events-inputevents
7060 */
7061 var InputEventInterface = {
7062 data: null
7063 };
7064
7065 /**
7066 * @param {object} dispatchConfig Configuration used to dispatch this event.
7067 * @param {string} dispatchMarker Marker identifying the event target.
7068 * @param {object} nativeEvent Native browser event.
7069 * @extends {SyntheticUIEvent}
7070 */
7071 function SyntheticInputEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
7072 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
7073 }
7074
7075 SyntheticEvent.augmentClass(SyntheticInputEvent, InputEventInterface);
7076
7077 module.exports = SyntheticInputEvent;
7078
7079/***/ },
7080/* 143 */
7081/***/ function(module, exports, __webpack_require__) {
7082
7083 /**
7084 * Copyright 2013-present, Facebook, Inc.
7085 * All rights reserved.
7086 *
7087 * This source code is licensed under the BSD-style license found in the
7088 * LICENSE file in the root directory of this source tree. An additional grant
7089 * of patent rights can be found in the PATENTS file in the same directory.
7090 *
7091 * @providesModule ChangeEventPlugin
7092 */
7093
7094 'use strict';
7095
7096 var EventConstants = __webpack_require__(129);
7097 var EventPluginHub = __webpack_require__(131);
7098 var EventPropagators = __webpack_require__(130);
7099 var ExecutionEnvironment = __webpack_require__(137);
7100 var ReactDOMComponentTree = __webpack_require__(124);
7101 var ReactUpdates = __webpack_require__(144);
7102 var SyntheticEvent = __webpack_require__(141);
7103
7104 var getEventTarget = __webpack_require__(158);
7105 var isEventSupported = __webpack_require__(159);
7106 var isTextInputElement = __webpack_require__(160);
7107 var keyOf = __webpack_require__(112);
7108
7109 var topLevelTypes = EventConstants.topLevelTypes;
7110
7111 var eventTypes = {
7112 change: {
7113 phasedRegistrationNames: {
7114 bubbled: keyOf({ onChange: null }),
7115 captured: keyOf({ onChangeCapture: null })
7116 },
7117 dependencies: [topLevelTypes.topBlur, topLevelTypes.topChange, topLevelTypes.topClick, topLevelTypes.topFocus, topLevelTypes.topInput, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topSelectionChange]
7118 }
7119 };
7120
7121 /**
7122 * For IE shims
7123 */
7124 var activeElement = null;
7125 var activeElementInst = null;
7126 var activeElementValue = null;
7127 var activeElementValueProp = null;
7128
7129 /**
7130 * SECTION: handle `change` event
7131 */
7132 function shouldUseChangeEvent(elem) {
7133 var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
7134 return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
7135 }
7136
7137 var doesChangeEventBubble = false;
7138 if (ExecutionEnvironment.canUseDOM) {
7139 // See `handleChange` comment below
7140 doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
7141 }
7142
7143 function manualDispatchChangeEvent(nativeEvent) {
7144 var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
7145 EventPropagators.accumulateTwoPhaseDispatches(event);
7146
7147 // If change and propertychange bubbled, we'd just bind to it like all the
7148 // other events and have it go through ReactBrowserEventEmitter. Since it
7149 // doesn't, we manually listen for the events and so we have to enqueue and
7150 // process the abstract event manually.
7151 //
7152 // Batching is necessary here in order to ensure that all event handlers run
7153 // before the next rerender (including event handlers attached to ancestor
7154 // elements instead of directly on the input). Without this, controlled
7155 // components don't work properly in conjunction with event bubbling because
7156 // the component is rerendered and the value reverted before all the event
7157 // handlers can run. See https://github.com/facebook/react/issues/708.
7158 ReactUpdates.batchedUpdates(runEventInBatch, event);
7159 }
7160
7161 function runEventInBatch(event) {
7162 EventPluginHub.enqueueEvents(event);
7163 EventPluginHub.processEventQueue(false);
7164 }
7165
7166 function startWatchingForChangeEventIE8(target, targetInst) {
7167 activeElement = target;
7168 activeElementInst = targetInst;
7169 activeElement.attachEvent('onchange', manualDispatchChangeEvent);
7170 }
7171
7172 function stopWatchingForChangeEventIE8() {
7173 if (!activeElement) {
7174 return;
7175 }
7176 activeElement.detachEvent('onchange', manualDispatchChangeEvent);
7177 activeElement = null;
7178 activeElementInst = null;
7179 }
7180
7181 function getTargetInstForChangeEvent(topLevelType, targetInst) {
7182 if (topLevelType === topLevelTypes.topChange) {
7183 return targetInst;
7184 }
7185 }
7186 function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
7187 if (topLevelType === topLevelTypes.topFocus) {
7188 // stopWatching() should be a noop here but we call it just in case we
7189 // missed a blur event somehow.
7190 stopWatchingForChangeEventIE8();
7191 startWatchingForChangeEventIE8(target, targetInst);
7192 } else if (topLevelType === topLevelTypes.topBlur) {
7193 stopWatchingForChangeEventIE8();
7194 }
7195 }
7196
7197 /**
7198 * SECTION: handle `input` event
7199 */
7200 var isInputEventSupported = false;
7201 if (ExecutionEnvironment.canUseDOM) {
7202 // IE9 claims to support the input event but fails to trigger it when
7203 // deleting text, so we ignore its input events.
7204 // IE10+ fire input events to often, such when a placeholder
7205 // changes or when an input with a placeholder is focused.
7206 isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
7207 }
7208
7209 /**
7210 * (For IE <=11) Replacement getter/setter for the `value` property that gets
7211 * set on the active element.
7212 */
7213 var newValueProp = {
7214 get: function () {
7215 return activeElementValueProp.get.call(this);
7216 },
7217 set: function (val) {
7218 // Cast to a string so we can do equality checks.
7219 activeElementValue = '' + val;
7220 activeElementValueProp.set.call(this, val);
7221 }
7222 };
7223
7224 /**
7225 * (For IE <=11) Starts tracking propertychange events on the passed-in element
7226 * and override the value property so that we can distinguish user events from
7227 * value changes in JS.
7228 */
7229 function startWatchingForValueChange(target, targetInst) {
7230 activeElement = target;
7231 activeElementInst = targetInst;
7232 activeElementValue = target.value;
7233 activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
7234
7235 // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
7236 // on DOM elements
7237 Object.defineProperty(activeElement, 'value', newValueProp);
7238 if (activeElement.attachEvent) {
7239 activeElement.attachEvent('onpropertychange', handlePropertyChange);
7240 } else {
7241 activeElement.addEventListener('propertychange', handlePropertyChange, false);
7242 }
7243 }
7244
7245 /**
7246 * (For IE <=11) Removes the event listeners from the currently-tracked element,
7247 * if any exists.
7248 */
7249 function stopWatchingForValueChange() {
7250 if (!activeElement) {
7251 return;
7252 }
7253
7254 // delete restores the original property definition
7255 delete activeElement.value;
7256
7257 if (activeElement.detachEvent) {
7258 activeElement.detachEvent('onpropertychange', handlePropertyChange);
7259 } else {
7260 activeElement.removeEventListener('propertychange', handlePropertyChange, false);
7261 }
7262
7263 activeElement = null;
7264 activeElementInst = null;
7265 activeElementValue = null;
7266 activeElementValueProp = null;
7267 }
7268
7269 /**
7270 * (For IE <=11) Handles a propertychange event, sending a `change` event if
7271 * the value of the active element has changed.
7272 */
7273 function handlePropertyChange(nativeEvent) {
7274 if (nativeEvent.propertyName !== 'value') {
7275 return;
7276 }
7277 var value = nativeEvent.srcElement.value;
7278 if (value === activeElementValue) {
7279 return;
7280 }
7281 activeElementValue = value;
7282
7283 manualDispatchChangeEvent(nativeEvent);
7284 }
7285
7286 /**
7287 * If a `change` event should be fired, returns the target's ID.
7288 */
7289 function getTargetInstForInputEvent(topLevelType, targetInst) {
7290 if (topLevelType === topLevelTypes.topInput) {
7291 // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
7292 // what we want so fall through here and trigger an abstract event
7293 return targetInst;
7294 }
7295 }
7296
7297 function handleEventsForInputEventIE(topLevelType, target, targetInst) {
7298 if (topLevelType === topLevelTypes.topFocus) {
7299 // In IE8, we can capture almost all .value changes by adding a
7300 // propertychange handler and looking for events with propertyName
7301 // equal to 'value'
7302 // In IE9-11, propertychange fires for most input events but is buggy and
7303 // doesn't fire when text is deleted, but conveniently, selectionchange
7304 // appears to fire in all of the remaining cases so we catch those and
7305 // forward the event if the value has changed
7306 // In either case, we don't want to call the event handler if the value
7307 // is changed from JS so we redefine a setter for `.value` that updates
7308 // our activeElementValue variable, allowing us to ignore those changes
7309 //
7310 // stopWatching() should be a noop here but we call it just in case we
7311 // missed a blur event somehow.
7312 stopWatchingForValueChange();
7313 startWatchingForValueChange(target, targetInst);
7314 } else if (topLevelType === topLevelTypes.topBlur) {
7315 stopWatchingForValueChange();
7316 }
7317 }
7318
7319 // For IE8 and IE9.
7320 function getTargetInstForInputEventIE(topLevelType, targetInst) {
7321 if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
7322 // On the selectionchange event, the target is just document which isn't
7323 // helpful for us so just check activeElement instead.
7324 //
7325 // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
7326 // propertychange on the first input event after setting `value` from a
7327 // script and fires only keydown, keypress, keyup. Catching keyup usually
7328 // gets it and catching keydown lets us fire an event for the first
7329 // keystroke if user does a key repeat (it'll be a little delayed: right
7330 // before the second keystroke). Other input methods (e.g., paste) seem to
7331 // fire selectionchange normally.
7332 if (activeElement && activeElement.value !== activeElementValue) {
7333 activeElementValue = activeElement.value;
7334 return activeElementInst;
7335 }
7336 }
7337 }
7338
7339 /**
7340 * SECTION: handle `click` event
7341 */
7342 function shouldUseClickEvent(elem) {
7343 // Use the `click` event to detect changes to checkbox and radio inputs.
7344 // This approach works across all browsers, whereas `change` does not fire
7345 // until `blur` in IE8.
7346 return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
7347 }
7348
7349 function getTargetInstForClickEvent(topLevelType, targetInst) {
7350 if (topLevelType === topLevelTypes.topClick) {
7351 return targetInst;
7352 }
7353 }
7354
7355 /**
7356 * This plugin creates an `onChange` event that normalizes change events
7357 * across form elements. This event fires at a time when it's possible to
7358 * change the element's value without seeing a flicker.
7359 *
7360 * Supported elements are:
7361 * - input (see `isTextInputElement`)
7362 * - textarea
7363 * - select
7364 */
7365 var ChangeEventPlugin = {
7366
7367 eventTypes: eventTypes,
7368
7369 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
7370 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
7371
7372 var getTargetInstFunc, handleEventFunc;
7373 if (shouldUseChangeEvent(targetNode)) {
7374 if (doesChangeEventBubble) {
7375 getTargetInstFunc = getTargetInstForChangeEvent;
7376 } else {
7377 handleEventFunc = handleEventsForChangeEventIE8;
7378 }
7379 } else if (isTextInputElement(targetNode)) {
7380 if (isInputEventSupported) {
7381 getTargetInstFunc = getTargetInstForInputEvent;
7382 } else {
7383 getTargetInstFunc = getTargetInstForInputEventIE;
7384 handleEventFunc = handleEventsForInputEventIE;
7385 }
7386 } else if (shouldUseClickEvent(targetNode)) {
7387 getTargetInstFunc = getTargetInstForClickEvent;
7388 }
7389
7390 if (getTargetInstFunc) {
7391 var inst = getTargetInstFunc(topLevelType, targetInst);
7392 if (inst) {
7393 var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
7394 event.type = 'change';
7395 EventPropagators.accumulateTwoPhaseDispatches(event);
7396 return event;
7397 }
7398 }
7399
7400 if (handleEventFunc) {
7401 handleEventFunc(topLevelType, targetNode, targetInst);
7402 }
7403 }
7404
7405 };
7406
7407 module.exports = ChangeEventPlugin;
7408
7409/***/ },
7410/* 144 */
7411/***/ function(module, exports, __webpack_require__) {
7412
7413 /**
7414 * Copyright 2013-present, Facebook, Inc.
7415 * All rights reserved.
7416 *
7417 * This source code is licensed under the BSD-style license found in the
7418 * LICENSE file in the root directory of this source tree. An additional grant
7419 * of patent rights can be found in the PATENTS file in the same directory.
7420 *
7421 * @providesModule ReactUpdates
7422 */
7423
7424 'use strict';
7425
7426 var _prodInvariant = __webpack_require__(94),
7427 _assign = __webpack_require__(91);
7428
7429 var CallbackQueue = __webpack_require__(145);
7430 var PooledClass = __webpack_require__(93);
7431 var ReactFeatureFlags = __webpack_require__(146);
7432 var ReactReconciler = __webpack_require__(147);
7433 var Transaction = __webpack_require__(157);
7434
7435 var invariant = __webpack_require__(95);
7436
7437 var dirtyComponents = [];
7438 var updateBatchNumber = 0;
7439 var asapCallbackQueue = CallbackQueue.getPooled();
7440 var asapEnqueued = false;
7441
7442 var batchingStrategy = null;
7443
7444 function ensureInjected() {
7445 !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching strategy') : _prodInvariant('123') : void 0;
7446 }
7447
7448 var NESTED_UPDATES = {
7449 initialize: function () {
7450 this.dirtyComponentsLength = dirtyComponents.length;
7451 },
7452 close: function () {
7453 if (this.dirtyComponentsLength !== dirtyComponents.length) {
7454 // Additional updates were enqueued by componentDidUpdate handlers or
7455 // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run
7456 // these new updates so that if A's componentDidUpdate calls setState on
7457 // B, B will update before the callback A's updater provided when calling
7458 // setState.
7459 dirtyComponents.splice(0, this.dirtyComponentsLength);
7460 flushBatchedUpdates();
7461 } else {
7462 dirtyComponents.length = 0;
7463 }
7464 }
7465 };
7466
7467 var UPDATE_QUEUEING = {
7468 initialize: function () {
7469 this.callbackQueue.reset();
7470 },
7471 close: function () {
7472 this.callbackQueue.notifyAll();
7473 }
7474 };
7475
7476 var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING];
7477
7478 function ReactUpdatesFlushTransaction() {
7479 this.reinitializeTransaction();
7480 this.dirtyComponentsLength = null;
7481 this.callbackQueue = CallbackQueue.getPooled();
7482 this.reconcileTransaction = ReactUpdates.ReactReconcileTransaction.getPooled(
7483 /* useCreateElement */true);
7484 }
7485
7486 _assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, {
7487 getTransactionWrappers: function () {
7488 return TRANSACTION_WRAPPERS;
7489 },
7490
7491 destructor: function () {
7492 this.dirtyComponentsLength = null;
7493 CallbackQueue.release(this.callbackQueue);
7494 this.callbackQueue = null;
7495 ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction);
7496 this.reconcileTransaction = null;
7497 },
7498
7499 perform: function (method, scope, a) {
7500 // Essentially calls `this.reconcileTransaction.perform(method, scope, a)`
7501 // with this transaction's wrappers around it.
7502 return Transaction.Mixin.perform.call(this, this.reconcileTransaction.perform, this.reconcileTransaction, method, scope, a);
7503 }
7504 });
7505
7506 PooledClass.addPoolingTo(ReactUpdatesFlushTransaction);
7507
7508 function batchedUpdates(callback, a, b, c, d, e) {
7509 ensureInjected();
7510 batchingStrategy.batchedUpdates(callback, a, b, c, d, e);
7511 }
7512
7513 /**
7514 * Array comparator for ReactComponents by mount ordering.
7515 *
7516 * @param {ReactComponent} c1 first component you're comparing
7517 * @param {ReactComponent} c2 second component you're comparing
7518 * @return {number} Return value usable by Array.prototype.sort().
7519 */
7520 function mountOrderComparator(c1, c2) {
7521 return c1._mountOrder - c2._mountOrder;
7522 }
7523
7524 function runBatchedUpdates(transaction) {
7525 var len = transaction.dirtyComponentsLength;
7526 !(len === dirtyComponents.length) ? (undefined) !== '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;
7527
7528 // Since reconciling a component higher in the owner hierarchy usually (not
7529 // always -- see shouldComponentUpdate()) will reconcile children, reconcile
7530 // them before their children by sorting the array.
7531 dirtyComponents.sort(mountOrderComparator);
7532
7533 // Any updates enqueued while reconciling must be performed after this entire
7534 // batch. Otherwise, if dirtyComponents is [A, B] where A has children B and
7535 // C, B could update twice in a single batch if C's render enqueues an update
7536 // to B (since B would have already updated, we should skip it, and the only
7537 // way we can know to do so is by checking the batch counter).
7538 updateBatchNumber++;
7539
7540 for (var i = 0; i < len; i++) {
7541 // If a component is unmounted before pending changes apply, it will still
7542 // be here, but we assume that it has cleared its _pendingCallbacks and
7543 // that performUpdateIfNecessary is a noop.
7544 var component = dirtyComponents[i];
7545
7546 // If performUpdateIfNecessary happens to enqueue any new updates, we
7547 // shouldn't execute the callbacks until the next render happens, so
7548 // stash the callbacks first
7549 var callbacks = component._pendingCallbacks;
7550 component._pendingCallbacks = null;
7551
7552 var markerName;
7553 if (ReactFeatureFlags.logTopLevelRenders) {
7554 var namedComponent = component;
7555 // Duck type TopLevelWrapper. This is probably always true.
7556 if (component._currentElement.props === component._renderedComponent._currentElement) {
7557 namedComponent = component._renderedComponent;
7558 }
7559 markerName = 'React update: ' + namedComponent.getName();
7560 console.time(markerName);
7561 }
7562
7563 ReactReconciler.performUpdateIfNecessary(component, transaction.reconcileTransaction, updateBatchNumber);
7564
7565 if (markerName) {
7566 console.timeEnd(markerName);
7567 }
7568
7569 if (callbacks) {
7570 for (var j = 0; j < callbacks.length; j++) {
7571 transaction.callbackQueue.enqueue(callbacks[j], component.getPublicInstance());
7572 }
7573 }
7574 }
7575 }
7576
7577 var flushBatchedUpdates = function () {
7578 // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents
7579 // array and perform any updates enqueued by mount-ready handlers (i.e.,
7580 // componentDidUpdate) but we need to check here too in order to catch
7581 // updates enqueued by setState callbacks and asap calls.
7582 while (dirtyComponents.length || asapEnqueued) {
7583 if (dirtyComponents.length) {
7584 var transaction = ReactUpdatesFlushTransaction.getPooled();
7585 transaction.perform(runBatchedUpdates, null, transaction);
7586 ReactUpdatesFlushTransaction.release(transaction);
7587 }
7588
7589 if (asapEnqueued) {
7590 asapEnqueued = false;
7591 var queue = asapCallbackQueue;
7592 asapCallbackQueue = CallbackQueue.getPooled();
7593 queue.notifyAll();
7594 CallbackQueue.release(queue);
7595 }
7596 }
7597 };
7598
7599 /**
7600 * Mark a component as needing a rerender, adding an optional callback to a
7601 * list of functions which will be executed once the rerender occurs.
7602 */
7603 function enqueueUpdate(component) {
7604 ensureInjected();
7605
7606 // Various parts of our code (such as ReactCompositeComponent's
7607 // _renderValidatedComponent) assume that calls to render aren't nested;
7608 // verify that that's the case. (This is called by each top-level update
7609 // function, like setState, forceUpdate, etc.; creation and
7610 // destruction of top-level components is guarded in ReactMount.)
7611
7612 if (!batchingStrategy.isBatchingUpdates) {
7613 batchingStrategy.batchedUpdates(enqueueUpdate, component);
7614 return;
7615 }
7616
7617 dirtyComponents.push(component);
7618 if (component._updateBatchNumber == null) {
7619 component._updateBatchNumber = updateBatchNumber + 1;
7620 }
7621 }
7622
7623 /**
7624 * Enqueue a callback to be run at the end of the current batching cycle. Throws
7625 * if no updates are currently being performed.
7626 */
7627 function asap(callback, context) {
7628 !batchingStrategy.isBatchingUpdates ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context whereupdates are not being batched.') : _prodInvariant('125') : void 0;
7629 asapCallbackQueue.enqueue(callback, context);
7630 asapEnqueued = true;
7631 }
7632
7633 var ReactUpdatesInjection = {
7634 injectReconcileTransaction: function (ReconcileTransaction) {
7635 !ReconcileTransaction ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : _prodInvariant('126') : void 0;
7636 ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
7637 },
7638
7639 injectBatchingStrategy: function (_batchingStrategy) {
7640 !_batchingStrategy ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : _prodInvariant('127') : void 0;
7641 !(typeof _batchingStrategy.batchedUpdates === 'function') ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : _prodInvariant('128') : void 0;
7642 !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? (undefined) !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : _prodInvariant('129') : void 0;
7643 batchingStrategy = _batchingStrategy;
7644 }
7645 };
7646
7647 var ReactUpdates = {
7648 /**
7649 * React references `ReactReconcileTransaction` using this property in order
7650 * to allow dependency injection.
7651 *
7652 * @internal
7653 */
7654 ReactReconcileTransaction: null,
7655
7656 batchedUpdates: batchedUpdates,
7657 enqueueUpdate: enqueueUpdate,
7658 flushBatchedUpdates: flushBatchedUpdates,
7659 injection: ReactUpdatesInjection,
7660 asap: asap
7661 };
7662
7663 module.exports = ReactUpdates;
7664
7665/***/ },
7666/* 145 */
7667/***/ function(module, exports, __webpack_require__) {
7668
7669 /**
7670 * Copyright 2013-present, Facebook, Inc.
7671 * All rights reserved.
7672 *
7673 * This source code is licensed under the BSD-style license found in the
7674 * LICENSE file in the root directory of this source tree. An additional grant
7675 * of patent rights can be found in the PATENTS file in the same directory.
7676 *
7677 * @providesModule CallbackQueue
7678 */
7679
7680 'use strict';
7681
7682 var _prodInvariant = __webpack_require__(94),
7683 _assign = __webpack_require__(91);
7684
7685 var PooledClass = __webpack_require__(93);
7686
7687 var invariant = __webpack_require__(95);
7688
7689 /**
7690 * A specialized pseudo-event module to help keep track of components waiting to
7691 * be notified when their DOM representations are available for use.
7692 *
7693 * This implements `PooledClass`, so you should never need to instantiate this.
7694 * Instead, use `CallbackQueue.getPooled()`.
7695 *
7696 * @class ReactMountReady
7697 * @implements PooledClass
7698 * @internal
7699 */
7700 function CallbackQueue() {
7701 this._callbacks = null;
7702 this._contexts = null;
7703 }
7704
7705 _assign(CallbackQueue.prototype, {
7706
7707 /**
7708 * Enqueues a callback to be invoked when `notifyAll` is invoked.
7709 *
7710 * @param {function} callback Invoked when `notifyAll` is invoked.
7711 * @param {?object} context Context to call `callback` with.
7712 * @internal
7713 */
7714 enqueue: function (callback, context) {
7715 this._callbacks = this._callbacks || [];
7716 this._contexts = this._contexts || [];
7717 this._callbacks.push(callback);
7718 this._contexts.push(context);
7719 },
7720
7721 /**
7722 * Invokes all enqueued callbacks and clears the queue. This is invoked after
7723 * the DOM representation of a component has been created or updated.
7724 *
7725 * @internal
7726 */
7727 notifyAll: function () {
7728 var callbacks = this._callbacks;
7729 var contexts = this._contexts;
7730 if (callbacks) {
7731 !(callbacks.length === contexts.length) ? (undefined) !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
7732 this._callbacks = null;
7733 this._contexts = null;
7734 for (var i = 0; i < callbacks.length; i++) {
7735 callbacks[i].call(contexts[i]);
7736 }
7737 callbacks.length = 0;
7738 contexts.length = 0;
7739 }
7740 },
7741
7742 checkpoint: function () {
7743 return this._callbacks ? this._callbacks.length : 0;
7744 },
7745
7746 rollback: function (len) {
7747 if (this._callbacks) {
7748 this._callbacks.length = len;
7749 this._contexts.length = len;
7750 }
7751 },
7752
7753 /**
7754 * Resets the internal queue.
7755 *
7756 * @internal
7757 */
7758 reset: function () {
7759 this._callbacks = null;
7760 this._contexts = null;
7761 },
7762
7763 /**
7764 * `PooledClass` looks for this.
7765 */
7766 destructor: function () {
7767 this.reset();
7768 }
7769
7770 });
7771
7772 PooledClass.addPoolingTo(CallbackQueue);
7773
7774 module.exports = CallbackQueue;
7775
7776/***/ },
7777/* 146 */
7778/***/ function(module, exports) {
7779
7780 /**
7781 * Copyright 2013-present, Facebook, Inc.
7782 * All rights reserved.
7783 *
7784 * This source code is licensed under the BSD-style license found in the
7785 * LICENSE file in the root directory of this source tree. An additional grant
7786 * of patent rights can be found in the PATENTS file in the same directory.
7787 *
7788 * @providesModule ReactFeatureFlags
7789 *
7790 */
7791
7792 'use strict';
7793
7794 var ReactFeatureFlags = {
7795 // When true, call console.time() before and .timeEnd() after each top-level
7796 // render (both initial renders and updates). Useful when looking at prod-mode
7797 // timeline profiles in Chrome, for example.
7798 logTopLevelRenders: false
7799 };
7800
7801 module.exports = ReactFeatureFlags;
7802
7803/***/ },
7804/* 147 */
7805/***/ function(module, exports, __webpack_require__) {
7806
7807 /**
7808 * Copyright 2013-present, Facebook, Inc.
7809 * All rights reserved.
7810 *
7811 * This source code is licensed under the BSD-style license found in the
7812 * LICENSE file in the root directory of this source tree. An additional grant
7813 * of patent rights can be found in the PATENTS file in the same directory.
7814 *
7815 * @providesModule ReactReconciler
7816 */
7817
7818 'use strict';
7819
7820 var ReactRef = __webpack_require__(148);
7821 var ReactInstrumentation = __webpack_require__(150);
7822
7823 var warning = __webpack_require__(98);
7824
7825 /**
7826 * Helper to call ReactRef.attachRefs with this composite component, split out
7827 * to avoid allocations in the transaction mount-ready queue.
7828 */
7829 function attachRefs() {
7830 ReactRef.attachRefs(this, this._currentElement);
7831 }
7832
7833 var ReactReconciler = {
7834
7835 /**
7836 * Initializes the component, renders markup, and registers event listeners.
7837 *
7838 * @param {ReactComponent} internalInstance
7839 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
7840 * @param {?object} the containing host component instance
7841 * @param {?object} info about the host container
7842 * @return {?string} Rendered markup to be inserted into the DOM.
7843 * @final
7844 * @internal
7845 */
7846 mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots
7847 ) {
7848 if ((undefined) !== 'production') {
7849 if (internalInstance._debugID !== 0) {
7850 ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID);
7851 }
7852 }
7853 var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID);
7854 if (internalInstance._currentElement && internalInstance._currentElement.ref != null) {
7855 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
7856 }
7857 if ((undefined) !== 'production') {
7858 if (internalInstance._debugID !== 0) {
7859 ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID);
7860 }
7861 }
7862 return markup;
7863 },
7864
7865 /**
7866 * Returns a value that can be passed to
7867 * ReactComponentEnvironment.replaceNodeWithMarkup.
7868 */
7869 getHostNode: function (internalInstance) {
7870 return internalInstance.getHostNode();
7871 },
7872
7873 /**
7874 * Releases any resources allocated by `mountComponent`.
7875 *
7876 * @final
7877 * @internal
7878 */
7879 unmountComponent: function (internalInstance, safely) {
7880 if ((undefined) !== 'production') {
7881 if (internalInstance._debugID !== 0) {
7882 ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID);
7883 }
7884 }
7885 ReactRef.detachRefs(internalInstance, internalInstance._currentElement);
7886 internalInstance.unmountComponent(safely);
7887 if ((undefined) !== 'production') {
7888 if (internalInstance._debugID !== 0) {
7889 ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID);
7890 }
7891 }
7892 },
7893
7894 /**
7895 * Update a component using a new element.
7896 *
7897 * @param {ReactComponent} internalInstance
7898 * @param {ReactElement} nextElement
7899 * @param {ReactReconcileTransaction} transaction
7900 * @param {object} context
7901 * @internal
7902 */
7903 receiveComponent: function (internalInstance, nextElement, transaction, context) {
7904 var prevElement = internalInstance._currentElement;
7905
7906 if (nextElement === prevElement && context === internalInstance._context) {
7907 // Since elements are immutable after the owner is rendered,
7908 // we can do a cheap identity compare here to determine if this is a
7909 // superfluous reconcile. It's possible for state to be mutable but such
7910 // change should trigger an update of the owner which would recreate
7911 // the element. We explicitly check for the existence of an owner since
7912 // it's possible for an element created outside a composite to be
7913 // deeply mutated and reused.
7914
7915 // TODO: Bailing out early is just a perf optimization right?
7916 // TODO: Removing the return statement should affect correctness?
7917 return;
7918 }
7919
7920 if ((undefined) !== 'production') {
7921 if (internalInstance._debugID !== 0) {
7922 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement);
7923 }
7924 }
7925
7926 var refsChanged = ReactRef.shouldUpdateRefs(prevElement, nextElement);
7927
7928 if (refsChanged) {
7929 ReactRef.detachRefs(internalInstance, prevElement);
7930 }
7931
7932 internalInstance.receiveComponent(nextElement, transaction, context);
7933
7934 if (refsChanged && internalInstance._currentElement && internalInstance._currentElement.ref != null) {
7935 transaction.getReactMountReady().enqueue(attachRefs, internalInstance);
7936 }
7937
7938 if ((undefined) !== 'production') {
7939 if (internalInstance._debugID !== 0) {
7940 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
7941 }
7942 }
7943 },
7944
7945 /**
7946 * Flush any dirty changes in a component.
7947 *
7948 * @param {ReactComponent} internalInstance
7949 * @param {ReactReconcileTransaction} transaction
7950 * @internal
7951 */
7952 performUpdateIfNecessary: function (internalInstance, transaction, updateBatchNumber) {
7953 if (internalInstance._updateBatchNumber !== updateBatchNumber) {
7954 // The component's enqueued batch number should always be the current
7955 // batch or the following one.
7956 (undefined) !== 'production' ? warning(internalInstance._updateBatchNumber == null || internalInstance._updateBatchNumber === updateBatchNumber + 1, 'performUpdateIfNecessary: Unexpected batch number (current %s, ' + 'pending %s)', updateBatchNumber, internalInstance._updateBatchNumber) : void 0;
7957 return;
7958 }
7959 if ((undefined) !== 'production') {
7960 if (internalInstance._debugID !== 0) {
7961 ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement);
7962 }
7963 }
7964 internalInstance.performUpdateIfNecessary(transaction);
7965 if ((undefined) !== 'production') {
7966 if (internalInstance._debugID !== 0) {
7967 ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID);
7968 }
7969 }
7970 }
7971
7972 };
7973
7974 module.exports = ReactReconciler;
7975
7976/***/ },
7977/* 148 */
7978/***/ function(module, exports, __webpack_require__) {
7979
7980 /**
7981 * Copyright 2013-present, Facebook, Inc.
7982 * All rights reserved.
7983 *
7984 * This source code is licensed under the BSD-style license found in the
7985 * LICENSE file in the root directory of this source tree. An additional grant
7986 * of patent rights can be found in the PATENTS file in the same directory.
7987 *
7988 * @providesModule ReactRef
7989 */
7990
7991 'use strict';
7992
7993 var ReactOwner = __webpack_require__(149);
7994
7995 var ReactRef = {};
7996
7997 function attachRef(ref, component, owner) {
7998 if (typeof ref === 'function') {
7999 ref(component.getPublicInstance());
8000 } else {
8001 // Legacy ref
8002 ReactOwner.addComponentAsRefTo(component, ref, owner);
8003 }
8004 }
8005
8006 function detachRef(ref, component, owner) {
8007 if (typeof ref === 'function') {
8008 ref(null);
8009 } else {
8010 // Legacy ref
8011 ReactOwner.removeComponentAsRefFrom(component, ref, owner);
8012 }
8013 }
8014
8015 ReactRef.attachRefs = function (instance, element) {
8016 if (element === null || element === false) {
8017 return;
8018 }
8019 var ref = element.ref;
8020 if (ref != null) {
8021 attachRef(ref, instance, element._owner);
8022 }
8023 };
8024
8025 ReactRef.shouldUpdateRefs = function (prevElement, nextElement) {
8026 // If either the owner or a `ref` has changed, make sure the newest owner
8027 // has stored a reference to `this`, and the previous owner (if different)
8028 // has forgotten the reference to `this`. We use the element instead
8029 // of the public this.props because the post processing cannot determine
8030 // a ref. The ref conceptually lives on the element.
8031
8032 // TODO: Should this even be possible? The owner cannot change because
8033 // it's forbidden by shouldUpdateReactComponent. The ref can change
8034 // if you swap the keys of but not the refs. Reconsider where this check
8035 // is made. It probably belongs where the key checking and
8036 // instantiateReactComponent is done.
8037
8038 var prevEmpty = prevElement === null || prevElement === false;
8039 var nextEmpty = nextElement === null || nextElement === false;
8040
8041 return (
8042 // This has a few false positives w/r/t empty components.
8043 prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref ||
8044 // If owner changes but we have an unchanged function ref, don't update refs
8045 typeof nextElement.ref === 'string' && nextElement._owner !== prevElement._owner
8046 );
8047 };
8048
8049 ReactRef.detachRefs = function (instance, element) {
8050 if (element === null || element === false) {
8051 return;
8052 }
8053 var ref = element.ref;
8054 if (ref != null) {
8055 detachRef(ref, instance, element._owner);
8056 }
8057 };
8058
8059 module.exports = ReactRef;
8060
8061/***/ },
8062/* 149 */
8063/***/ function(module, exports, __webpack_require__) {
8064
8065 /**
8066 * Copyright 2013-present, Facebook, Inc.
8067 * All rights reserved.
8068 *
8069 * This source code is licensed under the BSD-style license found in the
8070 * LICENSE file in the root directory of this source tree. An additional grant
8071 * of patent rights can be found in the PATENTS file in the same directory.
8072 *
8073 * @providesModule ReactOwner
8074 */
8075
8076 'use strict';
8077
8078 var _prodInvariant = __webpack_require__(94);
8079
8080 var invariant = __webpack_require__(95);
8081
8082 /**
8083 * ReactOwners are capable of storing references to owned components.
8084 *
8085 * All components are capable of //being// referenced by owner components, but
8086 * only ReactOwner components are capable of //referencing// owned components.
8087 * The named reference is known as a "ref".
8088 *
8089 * Refs are available when mounted and updated during reconciliation.
8090 *
8091 * var MyComponent = React.createClass({
8092 * render: function() {
8093 * return (
8094 * <div onClick={this.handleClick}>
8095 * <CustomComponent ref="custom" />
8096 * </div>
8097 * );
8098 * },
8099 * handleClick: function() {
8100 * this.refs.custom.handleClick();
8101 * },
8102 * componentDidMount: function() {
8103 * this.refs.custom.initialize();
8104 * }
8105 * });
8106 *
8107 * Refs should rarely be used. When refs are used, they should only be done to
8108 * control data that is not handled by React's data flow.
8109 *
8110 * @class ReactOwner
8111 */
8112 var ReactOwner = {
8113
8114 /**
8115 * @param {?object} object
8116 * @return {boolean} True if `object` is a valid owner.
8117 * @final
8118 */
8119 isValidOwner: function (object) {
8120 return !!(object && typeof object.attachRef === 'function' && typeof object.detachRef === 'function');
8121 },
8122
8123 /**
8124 * Adds a component by ref to an owner component.
8125 *
8126 * @param {ReactComponent} component Component to reference.
8127 * @param {string} ref Name by which to refer to the component.
8128 * @param {ReactOwner} owner Component on which to record the ref.
8129 * @final
8130 * @internal
8131 */
8132 addComponentAsRefTo: function (component, ref, owner) {
8133 !ReactOwner.isValidOwner(owner) ? (undefined) !== '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;
8134 owner.attachRef(ref, component);
8135 },
8136
8137 /**
8138 * Removes a component by ref from an owner component.
8139 *
8140 * @param {ReactComponent} component Component to dereference.
8141 * @param {string} ref Name of the ref to remove.
8142 * @param {ReactOwner} owner Component on which the ref is recorded.
8143 * @final
8144 * @internal
8145 */
8146 removeComponentAsRefFrom: function (component, ref, owner) {
8147 !ReactOwner.isValidOwner(owner) ? (undefined) !== '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;
8148 var ownerPublicInstance = owner.getPublicInstance();
8149 // Check that `component`'s owner is still alive and that `component` is still the current ref
8150 // because we do not want to detach the ref if another component stole it.
8151 if (ownerPublicInstance && ownerPublicInstance.refs[ref] === component.getPublicInstance()) {
8152 owner.detachRef(ref);
8153 }
8154 }
8155
8156 };
8157
8158 module.exports = ReactOwner;
8159
8160/***/ },
8161/* 150 */
8162/***/ function(module, exports, __webpack_require__) {
8163
8164 /**
8165 * Copyright 2016-present, Facebook, Inc.
8166 * All rights reserved.
8167 *
8168 * This source code is licensed under the BSD-style license found in the
8169 * LICENSE file in the root directory of this source tree. An additional grant
8170 * of patent rights can be found in the PATENTS file in the same directory.
8171 *
8172 * @providesModule ReactInstrumentation
8173 */
8174
8175 'use strict';
8176
8177 var debugTool = null;
8178
8179 if ((undefined) !== 'production') {
8180 var ReactDebugTool = __webpack_require__(151);
8181 debugTool = ReactDebugTool;
8182 }
8183
8184 module.exports = { debugTool: debugTool };
8185
8186/***/ },
8187/* 151 */
8188/***/ function(module, exports, __webpack_require__) {
8189
8190 /**
8191 * Copyright 2016-present, Facebook, Inc.
8192 * All rights reserved.
8193 *
8194 * This source code is licensed under the BSD-style license found in the
8195 * LICENSE file in the root directory of this source tree. An additional grant
8196 * of patent rights can be found in the PATENTS file in the same directory.
8197 *
8198 * @providesModule ReactDebugTool
8199 */
8200
8201 'use strict';
8202
8203 var ReactInvalidSetStateWarningHook = __webpack_require__(152);
8204 var ReactHostOperationHistoryHook = __webpack_require__(153);
8205 var ReactComponentTreeHook = __webpack_require__(115);
8206 var ReactChildrenMutationWarningHook = __webpack_require__(154);
8207 var ExecutionEnvironment = __webpack_require__(137);
8208
8209 var performanceNow = __webpack_require__(155);
8210 var warning = __webpack_require__(98);
8211
8212 var hooks = [];
8213 var didHookThrowForEvent = {};
8214
8215 function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
8216 try {
8217 fn.call(context, arg1, arg2, arg3, arg4, arg5);
8218 } catch (e) {
8219 (undefined) !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0;
8220 didHookThrowForEvent[event] = true;
8221 }
8222 }
8223
8224 function emitEvent(event, arg1, arg2, arg3, arg4, arg5) {
8225 for (var i = 0; i < hooks.length; i++) {
8226 var hook = hooks[i];
8227 var fn = hook[event];
8228 if (fn) {
8229 callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
8230 }
8231 }
8232 }
8233
8234 var isProfiling = false;
8235 var flushHistory = [];
8236 var lifeCycleTimerStack = [];
8237 var currentFlushNesting = 0;
8238 var currentFlushMeasurements = null;
8239 var currentFlushStartTime = null;
8240 var currentTimerDebugID = null;
8241 var currentTimerStartTime = null;
8242 var currentTimerNestedFlushDuration = null;
8243 var currentTimerType = null;
8244
8245 var lifeCycleTimerHasWarned = false;
8246
8247 function clearHistory() {
8248 ReactComponentTreeHook.purgeUnmountedComponents();
8249 ReactHostOperationHistoryHook.clearHistory();
8250 }
8251
8252 function getTreeSnapshot(registeredIDs) {
8253 return registeredIDs.reduce(function (tree, id) {
8254 var ownerID = ReactComponentTreeHook.getOwnerID(id);
8255 var parentID = ReactComponentTreeHook.getParentID(id);
8256 tree[id] = {
8257 displayName: ReactComponentTreeHook.getDisplayName(id),
8258 text: ReactComponentTreeHook.getText(id),
8259 updateCount: ReactComponentTreeHook.getUpdateCount(id),
8260 childIDs: ReactComponentTreeHook.getChildIDs(id),
8261 // Text nodes don't have owners but this is close enough.
8262 ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID),
8263 parentID: parentID
8264 };
8265 return tree;
8266 }, {});
8267 }
8268
8269 function resetMeasurements() {
8270 var previousStartTime = currentFlushStartTime;
8271 var previousMeasurements = currentFlushMeasurements || [];
8272 var previousOperations = ReactHostOperationHistoryHook.getHistory();
8273
8274 if (currentFlushNesting === 0) {
8275 currentFlushStartTime = null;
8276 currentFlushMeasurements = null;
8277 clearHistory();
8278 return;
8279 }
8280
8281 if (previousMeasurements.length || previousOperations.length) {
8282 var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
8283 flushHistory.push({
8284 duration: performanceNow() - previousStartTime,
8285 measurements: previousMeasurements || [],
8286 operations: previousOperations || [],
8287 treeSnapshot: getTreeSnapshot(registeredIDs)
8288 });
8289 }
8290
8291 clearHistory();
8292 currentFlushStartTime = performanceNow();
8293 currentFlushMeasurements = [];
8294 }
8295
8296 function checkDebugID(debugID) {
8297 var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
8298
8299 if (allowRoot && debugID === 0) {
8300 return;
8301 }
8302 if (!debugID) {
8303 (undefined) !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0;
8304 }
8305 }
8306
8307 function beginLifeCycleTimer(debugID, timerType) {
8308 if (currentFlushNesting === 0) {
8309 return;
8310 }
8311 if (currentTimerType && !lifeCycleTimerHasWarned) {
8312 (undefined) !== '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;
8313 lifeCycleTimerHasWarned = true;
8314 }
8315 currentTimerStartTime = performanceNow();
8316 currentTimerNestedFlushDuration = 0;
8317 currentTimerDebugID = debugID;
8318 currentTimerType = timerType;
8319 }
8320
8321 function endLifeCycleTimer(debugID, timerType) {
8322 if (currentFlushNesting === 0) {
8323 return;
8324 }
8325 if (currentTimerType !== timerType && !lifeCycleTimerHasWarned) {
8326 (undefined) !== '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;
8327 lifeCycleTimerHasWarned = true;
8328 }
8329 if (isProfiling) {
8330 currentFlushMeasurements.push({
8331 timerType: timerType,
8332 instanceID: debugID,
8333 duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
8334 });
8335 }
8336 currentTimerStartTime = null;
8337 currentTimerNestedFlushDuration = null;
8338 currentTimerDebugID = null;
8339 currentTimerType = null;
8340 }
8341
8342 function pauseCurrentLifeCycleTimer() {
8343 var currentTimer = {
8344 startTime: currentTimerStartTime,
8345 nestedFlushStartTime: performanceNow(),
8346 debugID: currentTimerDebugID,
8347 timerType: currentTimerType
8348 };
8349 lifeCycleTimerStack.push(currentTimer);
8350 currentTimerStartTime = null;
8351 currentTimerNestedFlushDuration = null;
8352 currentTimerDebugID = null;
8353 currentTimerType = null;
8354 }
8355
8356 function resumeCurrentLifeCycleTimer() {
8357 var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop();
8358
8359 var startTime = _lifeCycleTimerStack$.startTime;
8360 var nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime;
8361 var debugID = _lifeCycleTimerStack$.debugID;
8362 var timerType = _lifeCycleTimerStack$.timerType;
8363
8364 var nestedFlushDuration = performanceNow() - nestedFlushStartTime;
8365 currentTimerStartTime = startTime;
8366 currentTimerNestedFlushDuration += nestedFlushDuration;
8367 currentTimerDebugID = debugID;
8368 currentTimerType = timerType;
8369 }
8370
8371 var ReactDebugTool = {
8372 addHook: function (hook) {
8373 hooks.push(hook);
8374 },
8375 removeHook: function (hook) {
8376 for (var i = 0; i < hooks.length; i++) {
8377 if (hooks[i] === hook) {
8378 hooks.splice(i, 1);
8379 i--;
8380 }
8381 }
8382 },
8383 isProfiling: function () {
8384 return isProfiling;
8385 },
8386 beginProfiling: function () {
8387 if (isProfiling) {
8388 return;
8389 }
8390
8391 isProfiling = true;
8392 flushHistory.length = 0;
8393 resetMeasurements();
8394 ReactDebugTool.addHook(ReactHostOperationHistoryHook);
8395 },
8396 endProfiling: function () {
8397 if (!isProfiling) {
8398 return;
8399 }
8400
8401 isProfiling = false;
8402 resetMeasurements();
8403 ReactDebugTool.removeHook(ReactHostOperationHistoryHook);
8404 },
8405 getFlushHistory: function () {
8406 return flushHistory;
8407 },
8408 onBeginFlush: function () {
8409 currentFlushNesting++;
8410 resetMeasurements();
8411 pauseCurrentLifeCycleTimer();
8412 emitEvent('onBeginFlush');
8413 },
8414 onEndFlush: function () {
8415 resetMeasurements();
8416 currentFlushNesting--;
8417 resumeCurrentLifeCycleTimer();
8418 emitEvent('onEndFlush');
8419 },
8420 onBeginLifeCycleTimer: function (debugID, timerType) {
8421 checkDebugID(debugID);
8422 emitEvent('onBeginLifeCycleTimer', debugID, timerType);
8423 beginLifeCycleTimer(debugID, timerType);
8424 },
8425 onEndLifeCycleTimer: function (debugID, timerType) {
8426 checkDebugID(debugID);
8427 endLifeCycleTimer(debugID, timerType);
8428 emitEvent('onEndLifeCycleTimer', debugID, timerType);
8429 },
8430 onBeginProcessingChildContext: function () {
8431 emitEvent('onBeginProcessingChildContext');
8432 },
8433 onEndProcessingChildContext: function () {
8434 emitEvent('onEndProcessingChildContext');
8435 },
8436 onHostOperation: function (debugID, type, payload) {
8437 checkDebugID(debugID);
8438 emitEvent('onHostOperation', debugID, type, payload);
8439 },
8440 onSetState: function () {
8441 emitEvent('onSetState');
8442 },
8443 onSetChildren: function (debugID, childDebugIDs) {
8444 checkDebugID(debugID);
8445 childDebugIDs.forEach(checkDebugID);
8446 emitEvent('onSetChildren', debugID, childDebugIDs);
8447 },
8448 onBeforeMountComponent: function (debugID, element, parentDebugID) {
8449 checkDebugID(debugID);
8450 checkDebugID(parentDebugID, true);
8451 emitEvent('onBeforeMountComponent', debugID, element, parentDebugID);
8452 },
8453 onMountComponent: function (debugID) {
8454 checkDebugID(debugID);
8455 emitEvent('onMountComponent', debugID);
8456 },
8457 onBeforeUpdateComponent: function (debugID, element) {
8458 checkDebugID(debugID);
8459 emitEvent('onBeforeUpdateComponent', debugID, element);
8460 },
8461 onUpdateComponent: function (debugID) {
8462 checkDebugID(debugID);
8463 emitEvent('onUpdateComponent', debugID);
8464 },
8465 onBeforeUnmountComponent: function (debugID) {
8466 checkDebugID(debugID);
8467 emitEvent('onBeforeUnmountComponent', debugID);
8468 },
8469 onUnmountComponent: function (debugID) {
8470 checkDebugID(debugID);
8471 emitEvent('onUnmountComponent', debugID);
8472 },
8473 onTestEvent: function () {
8474 emitEvent('onTestEvent');
8475 }
8476 };
8477
8478 // TODO remove these when RN/www gets updated
8479 ReactDebugTool.addDevtool = ReactDebugTool.addHook;
8480 ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
8481
8482 ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
8483 ReactDebugTool.addHook(ReactComponentTreeHook);
8484 ReactDebugTool.addHook(ReactChildrenMutationWarningHook);
8485 var url = ExecutionEnvironment.canUseDOM && window.location.href || '';
8486 if (/[?&]react_perf\b/.test(url)) {
8487 ReactDebugTool.beginProfiling();
8488 }
8489
8490 module.exports = ReactDebugTool;
8491
8492/***/ },
8493/* 152 */
8494/***/ function(module, exports, __webpack_require__) {
8495
8496 /**
8497 * Copyright 2016-present, Facebook, Inc.
8498 * All rights reserved.
8499 *
8500 * This source code is licensed under the BSD-style license found in the
8501 * LICENSE file in the root directory of this source tree. An additional grant
8502 * of patent rights can be found in the PATENTS file in the same directory.
8503 *
8504 * @providesModule ReactInvalidSetStateWarningHook
8505 */
8506
8507 'use strict';
8508
8509 var warning = __webpack_require__(98);
8510
8511 if ((undefined) !== 'production') {
8512 var processingChildContext = false;
8513
8514 var warnInvalidSetState = function () {
8515 (undefined) !== 'production' ? warning(!processingChildContext, 'setState(...): Cannot call setState() inside getChildContext()') : void 0;
8516 };
8517 }
8518
8519 var ReactInvalidSetStateWarningHook = {
8520 onBeginProcessingChildContext: function () {
8521 processingChildContext = true;
8522 },
8523 onEndProcessingChildContext: function () {
8524 processingChildContext = false;
8525 },
8526 onSetState: function () {
8527 warnInvalidSetState();
8528 }
8529 };
8530
8531 module.exports = ReactInvalidSetStateWarningHook;
8532
8533/***/ },
8534/* 153 */
8535/***/ function(module, exports) {
8536
8537 /**
8538 * Copyright 2016-present, Facebook, Inc.
8539 * All rights reserved.
8540 *
8541 * This source code is licensed under the BSD-style license found in the
8542 * LICENSE file in the root directory of this source tree. An additional grant
8543 * of patent rights can be found in the PATENTS file in the same directory.
8544 *
8545 * @providesModule ReactHostOperationHistoryHook
8546 */
8547
8548 'use strict';
8549
8550 var history = [];
8551
8552 var ReactHostOperationHistoryHook = {
8553 onHostOperation: function (debugID, type, payload) {
8554 history.push({
8555 instanceID: debugID,
8556 type: type,
8557 payload: payload
8558 });
8559 },
8560 clearHistory: function () {
8561 if (ReactHostOperationHistoryHook._preventClearing) {
8562 // Should only be used for tests.
8563 return;
8564 }
8565
8566 history = [];
8567 },
8568 getHistory: function () {
8569 return history;
8570 }
8571 };
8572
8573 module.exports = ReactHostOperationHistoryHook;
8574
8575/***/ },
8576/* 154 */
8577/***/ function(module, exports, __webpack_require__) {
8578
8579 /**
8580 * Copyright 2013-present, Facebook, Inc.
8581 * All rights reserved.
8582 *
8583 * This source code is licensed under the BSD-style license found in the
8584 * LICENSE file in the root directory of this source tree. An additional grant
8585 * of patent rights can be found in the PATENTS file in the same directory.
8586 *
8587 * @providesModule ReactChildrenMutationWarningHook
8588 */
8589
8590 'use strict';
8591
8592 var ReactComponentTreeHook = __webpack_require__(115);
8593
8594 var warning = __webpack_require__(98);
8595
8596 function handleElement(debugID, element) {
8597 if (element == null) {
8598 return;
8599 }
8600 if (element._shadowChildren === undefined) {
8601 return;
8602 }
8603 if (element._shadowChildren === element.props.children) {
8604 return;
8605 }
8606 var isMutated = false;
8607 if (Array.isArray(element._shadowChildren)) {
8608 if (element._shadowChildren.length === element.props.children.length) {
8609 for (var i = 0; i < element._shadowChildren.length; i++) {
8610 if (element._shadowChildren[i] !== element.props.children[i]) {
8611 isMutated = true;
8612 }
8613 }
8614 } else {
8615 isMutated = true;
8616 }
8617 }
8618 if (!Array.isArray(element._shadowChildren) || isMutated) {
8619 (undefined) !== 'production' ? warning(false, 'Component\'s children should not be mutated.%s', ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
8620 }
8621 }
8622
8623 var ReactChildrenMutationWarningHook = {
8624 onMountComponent: function (debugID) {
8625 handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
8626 },
8627 onUpdateComponent: function (debugID) {
8628 handleElement(debugID, ReactComponentTreeHook.getElement(debugID));
8629 }
8630 };
8631
8632 module.exports = ReactChildrenMutationWarningHook;
8633
8634/***/ },
8635/* 155 */
8636/***/ function(module, exports, __webpack_require__) {
8637
8638 'use strict';
8639
8640 /**
8641 * Copyright (c) 2013-present, Facebook, Inc.
8642 * All rights reserved.
8643 *
8644 * This source code is licensed under the BSD-style license found in the
8645 * LICENSE file in the root directory of this source tree. An additional grant
8646 * of patent rights can be found in the PATENTS file in the same directory.
8647 *
8648 * @typechecks
8649 */
8650
8651 var performance = __webpack_require__(156);
8652
8653 var performanceNow;
8654
8655 /**
8656 * Detect if we can use `window.performance.now()` and gracefully fallback to
8657 * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now
8658 * because of Facebook's testing infrastructure.
8659 */
8660 if (performance.now) {
8661 performanceNow = function performanceNow() {
8662 return performance.now();
8663 };
8664 } else {
8665 performanceNow = function performanceNow() {
8666 return Date.now();
8667 };
8668 }
8669
8670 module.exports = performanceNow;
8671
8672/***/ },
8673/* 156 */
8674/***/ function(module, exports, __webpack_require__) {
8675
8676 /**
8677 * Copyright (c) 2013-present, Facebook, Inc.
8678 * All rights reserved.
8679 *
8680 * This source code is licensed under the BSD-style license found in the
8681 * LICENSE file in the root directory of this source tree. An additional grant
8682 * of patent rights can be found in the PATENTS file in the same directory.
8683 *
8684 * @typechecks
8685 */
8686
8687 'use strict';
8688
8689 var ExecutionEnvironment = __webpack_require__(137);
8690
8691 var performance;
8692
8693 if (ExecutionEnvironment.canUseDOM) {
8694 performance = window.performance || window.msPerformance || window.webkitPerformance;
8695 }
8696
8697 module.exports = performance || {};
8698
8699/***/ },
8700/* 157 */
8701/***/ function(module, exports, __webpack_require__) {
8702
8703 /**
8704 * Copyright 2013-present, Facebook, Inc.
8705 * All rights reserved.
8706 *
8707 * This source code is licensed under the BSD-style license found in the
8708 * LICENSE file in the root directory of this source tree. An additional grant
8709 * of patent rights can be found in the PATENTS file in the same directory.
8710 *
8711 * @providesModule Transaction
8712 */
8713
8714 'use strict';
8715
8716 var _prodInvariant = __webpack_require__(94);
8717
8718 var invariant = __webpack_require__(95);
8719
8720 /**
8721 * `Transaction` creates a black box that is able to wrap any method such that
8722 * certain invariants are maintained before and after the method is invoked
8723 * (Even if an exception is thrown while invoking the wrapped method). Whoever
8724 * instantiates a transaction can provide enforcers of the invariants at
8725 * creation time. The `Transaction` class itself will supply one additional
8726 * automatic invariant for you - the invariant that any transaction instance
8727 * should not be run while it is already being run. You would typically create a
8728 * single instance of a `Transaction` for reuse multiple times, that potentially
8729 * is used to wrap several different methods. Wrappers are extremely simple -
8730 * they only require implementing two methods.
8731 *
8732 * <pre>
8733 * wrappers (injected at creation time)
8734 * + +
8735 * | |
8736 * +-----------------|--------|--------------+
8737 * | v | |
8738 * | +---------------+ | |
8739 * | +--| wrapper1 |---|----+ |
8740 * | | +---------------+ v | |
8741 * | | +-------------+ | |
8742 * | | +----| wrapper2 |--------+ |
8743 * | | | +-------------+ | | |
8744 * | | | | | |
8745 * | v v v v | wrapper
8746 * | +---+ +---+ +---------+ +---+ +---+ | invariants
8747 * perform(anyMethod) | | | | | | | | | | | | maintained
8748 * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|-------->
8749 * | | | | | | | | | | | |
8750 * | | | | | | | | | | | |
8751 * | | | | | | | | | | | |
8752 * | +---+ +---+ +---------+ +---+ +---+ |
8753 * | initialize close |
8754 * +-----------------------------------------+
8755 * </pre>
8756 *
8757 * Use cases:
8758 * - Preserving the input selection ranges before/after reconciliation.
8759 * Restoring selection even in the event of an unexpected error.
8760 * - Deactivating events while rearranging the DOM, preventing blurs/focuses,
8761 * while guaranteeing that afterwards, the event system is reactivated.
8762 * - Flushing a queue of collected DOM mutations to the main UI thread after a
8763 * reconciliation takes place in a worker thread.
8764 * - Invoking any collected `componentDidUpdate` callbacks after rendering new
8765 * content.
8766 * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue
8767 * to preserve the `scrollTop` (an automatic scroll aware DOM).
8768 * - (Future use case): Layout calculations before and after DOM updates.
8769 *
8770 * Transactional plugin API:
8771 * - A module that has an `initialize` method that returns any precomputation.
8772 * - and a `close` method that accepts the precomputation. `close` is invoked
8773 * when the wrapped process is completed, or has failed.
8774 *
8775 * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules
8776 * that implement `initialize` and `close`.
8777 * @return {Transaction} Single transaction for reuse in thread.
8778 *
8779 * @class Transaction
8780 */
8781 var Mixin = {
8782 /**
8783 * Sets up this instance so that it is prepared for collecting metrics. Does
8784 * so such that this setup method may be used on an instance that is already
8785 * initialized, in a way that does not consume additional memory upon reuse.
8786 * That can be useful if you decide to make your subclass of this mixin a
8787 * "PooledClass".
8788 */
8789 reinitializeTransaction: function () {
8790 this.transactionWrappers = this.getTransactionWrappers();
8791 if (this.wrapperInitData) {
8792 this.wrapperInitData.length = 0;
8793 } else {
8794 this.wrapperInitData = [];
8795 }
8796 this._isInTransaction = false;
8797 },
8798
8799 _isInTransaction: false,
8800
8801 /**
8802 * @abstract
8803 * @return {Array<TransactionWrapper>} Array of transaction wrappers.
8804 */
8805 getTransactionWrappers: null,
8806
8807 isInTransaction: function () {
8808 return !!this._isInTransaction;
8809 },
8810
8811 /**
8812 * Executes the function within a safety window. Use this for the top level
8813 * methods that result in large amounts of computation/mutations that would
8814 * need to be safety checked. The optional arguments helps prevent the need
8815 * to bind in many cases.
8816 *
8817 * @param {function} method Member of scope to call.
8818 * @param {Object} scope Scope to invoke from.
8819 * @param {Object?=} a Argument to pass to the method.
8820 * @param {Object?=} b Argument to pass to the method.
8821 * @param {Object?=} c Argument to pass to the method.
8822 * @param {Object?=} d Argument to pass to the method.
8823 * @param {Object?=} e Argument to pass to the method.
8824 * @param {Object?=} f Argument to pass to the method.
8825 *
8826 * @return {*} Return value from `method`.
8827 */
8828 perform: function (method, scope, a, b, c, d, e, f) {
8829 !!this.isInTransaction() ? (undefined) !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction.') : _prodInvariant('27') : void 0;
8830 var errorThrown;
8831 var ret;
8832 try {
8833 this._isInTransaction = true;
8834 // Catching errors makes debugging more difficult, so we start with
8835 // errorThrown set to true before setting it to false after calling
8836 // close -- if it's still set to true in the finally block, it means
8837 // one of these calls threw.
8838 errorThrown = true;
8839 this.initializeAll(0);
8840 ret = method.call(scope, a, b, c, d, e, f);
8841 errorThrown = false;
8842 } finally {
8843 try {
8844 if (errorThrown) {
8845 // If `method` throws, prefer to show that stack trace over any thrown
8846 // by invoking `closeAll`.
8847 try {
8848 this.closeAll(0);
8849 } catch (err) {}
8850 } else {
8851 // Since `method` didn't throw, we don't want to silence the exception
8852 // here.
8853 this.closeAll(0);
8854 }
8855 } finally {
8856 this._isInTransaction = false;
8857 }
8858 }
8859 return ret;
8860 },
8861
8862 initializeAll: function (startIndex) {
8863 var transactionWrappers = this.transactionWrappers;
8864 for (var i = startIndex; i < transactionWrappers.length; i++) {
8865 var wrapper = transactionWrappers[i];
8866 try {
8867 // Catching errors makes debugging more difficult, so we start with the
8868 // OBSERVED_ERROR state before overwriting it with the real return value
8869 // of initialize -- if it's still set to OBSERVED_ERROR in the finally
8870 // block, it means wrapper.initialize threw.
8871 this.wrapperInitData[i] = Transaction.OBSERVED_ERROR;
8872 this.wrapperInitData[i] = wrapper.initialize ? wrapper.initialize.call(this) : null;
8873 } finally {
8874 if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) {
8875 // The initializer for wrapper i threw an error; initialize the
8876 // remaining wrappers but silence any exceptions from them to ensure
8877 // that the first error is the one to bubble up.
8878 try {
8879 this.initializeAll(i + 1);
8880 } catch (err) {}
8881 }
8882 }
8883 }
8884 },
8885
8886 /**
8887 * Invokes each of `this.transactionWrappers.close[i]` functions, passing into
8888 * them the respective return values of `this.transactionWrappers.init[i]`
8889 * (`close`rs that correspond to initializers that failed will not be
8890 * invoked).
8891 */
8892 closeAll: function (startIndex) {
8893 !this.isInTransaction() ? (undefined) !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : _prodInvariant('28') : void 0;
8894 var transactionWrappers = this.transactionWrappers;
8895 for (var i = startIndex; i < transactionWrappers.length; i++) {
8896 var wrapper = transactionWrappers[i];
8897 var initData = this.wrapperInitData[i];
8898 var errorThrown;
8899 try {
8900 // Catching errors makes debugging more difficult, so we start with
8901 // errorThrown set to true before setting it to false after calling
8902 // close -- if it's still set to true in the finally block, it means
8903 // wrapper.close threw.
8904 errorThrown = true;
8905 if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) {
8906 wrapper.close.call(this, initData);
8907 }
8908 errorThrown = false;
8909 } finally {
8910 if (errorThrown) {
8911 // The closer for wrapper i threw an error; close the remaining
8912 // wrappers but silence any exceptions from them to ensure that the
8913 // first error is the one to bubble up.
8914 try {
8915 this.closeAll(i + 1);
8916 } catch (e) {}
8917 }
8918 }
8919 }
8920 this.wrapperInitData.length = 0;
8921 }
8922 };
8923
8924 var Transaction = {
8925
8926 Mixin: Mixin,
8927
8928 /**
8929 * Token to look for to determine if an error occurred.
8930 */
8931 OBSERVED_ERROR: {}
8932
8933 };
8934
8935 module.exports = Transaction;
8936
8937/***/ },
8938/* 158 */
8939/***/ function(module, exports) {
8940
8941 /**
8942 * Copyright 2013-present, Facebook, Inc.
8943 * All rights reserved.
8944 *
8945 * This source code is licensed under the BSD-style license found in the
8946 * LICENSE file in the root directory of this source tree. An additional grant
8947 * of patent rights can be found in the PATENTS file in the same directory.
8948 *
8949 * @providesModule getEventTarget
8950 */
8951
8952 'use strict';
8953
8954 /**
8955 * Gets the target node from a native browser event by accounting for
8956 * inconsistencies in browser DOM APIs.
8957 *
8958 * @param {object} nativeEvent Native browser event.
8959 * @return {DOMEventTarget} Target node.
8960 */
8961
8962 function getEventTarget(nativeEvent) {
8963 var target = nativeEvent.target || nativeEvent.srcElement || window;
8964
8965 // Normalize SVG <use> element events #4963
8966 if (target.correspondingUseElement) {
8967 target = target.correspondingUseElement;
8968 }
8969
8970 // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
8971 // @see http://www.quirksmode.org/js/events_properties.html
8972 return target.nodeType === 3 ? target.parentNode : target;
8973 }
8974
8975 module.exports = getEventTarget;
8976
8977/***/ },
8978/* 159 */
8979/***/ function(module, exports, __webpack_require__) {
8980
8981 /**
8982 * Copyright 2013-present, Facebook, Inc.
8983 * All rights reserved.
8984 *
8985 * This source code is licensed under the BSD-style license found in the
8986 * LICENSE file in the root directory of this source tree. An additional grant
8987 * of patent rights can be found in the PATENTS file in the same directory.
8988 *
8989 * @providesModule isEventSupported
8990 */
8991
8992 'use strict';
8993
8994 var ExecutionEnvironment = __webpack_require__(137);
8995
8996 var useHasFeature;
8997 if (ExecutionEnvironment.canUseDOM) {
8998 useHasFeature = document.implementation && document.implementation.hasFeature &&
8999 // always returns true in newer browsers as per the standard.
9000 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature
9001 document.implementation.hasFeature('', '') !== true;
9002 }
9003
9004 /**
9005 * Checks if an event is supported in the current execution environment.
9006 *
9007 * NOTE: This will not work correctly for non-generic events such as `change`,
9008 * `reset`, `load`, `error`, and `select`.
9009 *
9010 * Borrows from Modernizr.
9011 *
9012 * @param {string} eventNameSuffix Event name, e.g. "click".
9013 * @param {?boolean} capture Check if the capture phase is supported.
9014 * @return {boolean} True if the event is supported.
9015 * @internal
9016 * @license Modernizr 3.0.0pre (Custom Build) | MIT
9017 */
9018 function isEventSupported(eventNameSuffix, capture) {
9019 if (!ExecutionEnvironment.canUseDOM || capture && !('addEventListener' in document)) {
9020 return false;
9021 }
9022
9023 var eventName = 'on' + eventNameSuffix;
9024 var isSupported = eventName in document;
9025
9026 if (!isSupported) {
9027 var element = document.createElement('div');
9028 element.setAttribute(eventName, 'return;');
9029 isSupported = typeof element[eventName] === 'function';
9030 }
9031
9032 if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {
9033 // This is the only way to test support for the `wheel` event in IE9+.
9034 isSupported = document.implementation.hasFeature('Events.wheel', '3.0');
9035 }
9036
9037 return isSupported;
9038 }
9039
9040 module.exports = isEventSupported;
9041
9042/***/ },
9043/* 160 */
9044/***/ function(module, exports) {
9045
9046 /**
9047 * Copyright 2013-present, Facebook, Inc.
9048 * All rights reserved.
9049 *
9050 * This source code is licensed under the BSD-style license found in the
9051 * LICENSE file in the root directory of this source tree. An additional grant
9052 * of patent rights can be found in the PATENTS file in the same directory.
9053 *
9054 * @providesModule isTextInputElement
9055 *
9056 */
9057
9058 'use strict';
9059
9060 /**
9061 * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
9062 */
9063
9064 var supportedInputTypes = {
9065 'color': true,
9066 'date': true,
9067 'datetime': true,
9068 'datetime-local': true,
9069 'email': true,
9070 'month': true,
9071 'number': true,
9072 'password': true,
9073 'range': true,
9074 'search': true,
9075 'tel': true,
9076 'text': true,
9077 'time': true,
9078 'url': true,
9079 'week': true
9080 };
9081
9082 function isTextInputElement(elem) {
9083 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
9084
9085 if (nodeName === 'input') {
9086 return !!supportedInputTypes[elem.type];
9087 }
9088
9089 if (nodeName === 'textarea') {
9090 return true;
9091 }
9092
9093 return false;
9094 }
9095
9096 module.exports = isTextInputElement;
9097
9098/***/ },
9099/* 161 */
9100/***/ function(module, exports, __webpack_require__) {
9101
9102 /**
9103 * Copyright 2013-present, Facebook, Inc.
9104 * All rights reserved.
9105 *
9106 * This source code is licensed under the BSD-style license found in the
9107 * LICENSE file in the root directory of this source tree. An additional grant
9108 * of patent rights can be found in the PATENTS file in the same directory.
9109 *
9110 * @providesModule DefaultEventPluginOrder
9111 */
9112
9113 'use strict';
9114
9115 var keyOf = __webpack_require__(112);
9116
9117 /**
9118 * Module that is injectable into `EventPluginHub`, that specifies a
9119 * deterministic ordering of `EventPlugin`s. A convenient way to reason about
9120 * plugins, without having to package every one of them. This is better than
9121 * having plugins be ordered in the same order that they are injected because
9122 * that ordering would be influenced by the packaging order.
9123 * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that
9124 * preventing default on events is convenient in `SimpleEventPlugin` handlers.
9125 */
9126 var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
9127
9128 module.exports = DefaultEventPluginOrder;
9129
9130/***/ },
9131/* 162 */
9132/***/ function(module, exports, __webpack_require__) {
9133
9134 /**
9135 * Copyright 2013-present, Facebook, Inc.
9136 * All rights reserved.
9137 *
9138 * This source code is licensed under the BSD-style license found in the
9139 * LICENSE file in the root directory of this source tree. An additional grant
9140 * of patent rights can be found in the PATENTS file in the same directory.
9141 *
9142 * @providesModule EnterLeaveEventPlugin
9143 */
9144
9145 'use strict';
9146
9147 var EventConstants = __webpack_require__(129);
9148 var EventPropagators = __webpack_require__(130);
9149 var ReactDOMComponentTree = __webpack_require__(124);
9150 var SyntheticMouseEvent = __webpack_require__(163);
9151
9152 var keyOf = __webpack_require__(112);
9153
9154 var topLevelTypes = EventConstants.topLevelTypes;
9155
9156 var eventTypes = {
9157 mouseEnter: {
9158 registrationName: keyOf({ onMouseEnter: null }),
9159 dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
9160 },
9161 mouseLeave: {
9162 registrationName: keyOf({ onMouseLeave: null }),
9163 dependencies: [topLevelTypes.topMouseOut, topLevelTypes.topMouseOver]
9164 }
9165 };
9166
9167 var EnterLeaveEventPlugin = {
9168
9169 eventTypes: eventTypes,
9170
9171 /**
9172 * For almost every interaction we care about, there will be both a top-level
9173 * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
9174 * we do not extract duplicate events. However, moving the mouse into the
9175 * browser from outside will not fire a `mouseout` event. In this case, we use
9176 * the `mouseover` top-level event.
9177 */
9178 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
9179 if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
9180 return null;
9181 }
9182 if (topLevelType !== topLevelTypes.topMouseOut && topLevelType !== topLevelTypes.topMouseOver) {
9183 // Must not be a mouse in or mouse out - ignoring.
9184 return null;
9185 }
9186
9187 var win;
9188 if (nativeEventTarget.window === nativeEventTarget) {
9189 // `nativeEventTarget` is probably a window object.
9190 win = nativeEventTarget;
9191 } else {
9192 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
9193 var doc = nativeEventTarget.ownerDocument;
9194 if (doc) {
9195 win = doc.defaultView || doc.parentWindow;
9196 } else {
9197 win = window;
9198 }
9199 }
9200
9201 var from;
9202 var to;
9203 if (topLevelType === topLevelTypes.topMouseOut) {
9204 from = targetInst;
9205 var related = nativeEvent.relatedTarget || nativeEvent.toElement;
9206 to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
9207 } else {
9208 // Moving to a node from outside the window.
9209 from = null;
9210 to = targetInst;
9211 }
9212
9213 if (from === to) {
9214 // Nothing pertains to our managed components.
9215 return null;
9216 }
9217
9218 var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
9219 var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
9220
9221 var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
9222 leave.type = 'mouseleave';
9223 leave.target = fromNode;
9224 leave.relatedTarget = toNode;
9225
9226 var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
9227 enter.type = 'mouseenter';
9228 enter.target = toNode;
9229 enter.relatedTarget = fromNode;
9230
9231 EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
9232
9233 return [leave, enter];
9234 }
9235
9236 };
9237
9238 module.exports = EnterLeaveEventPlugin;
9239
9240/***/ },
9241/* 163 */
9242/***/ function(module, exports, __webpack_require__) {
9243
9244 /**
9245 * Copyright 2013-present, Facebook, Inc.
9246 * All rights reserved.
9247 *
9248 * This source code is licensed under the BSD-style license found in the
9249 * LICENSE file in the root directory of this source tree. An additional grant
9250 * of patent rights can be found in the PATENTS file in the same directory.
9251 *
9252 * @providesModule SyntheticMouseEvent
9253 */
9254
9255 'use strict';
9256
9257 var SyntheticUIEvent = __webpack_require__(164);
9258 var ViewportMetrics = __webpack_require__(165);
9259
9260 var getEventModifierState = __webpack_require__(166);
9261
9262 /**
9263 * @interface MouseEvent
9264 * @see http://www.w3.org/TR/DOM-Level-3-Events/
9265 */
9266 var MouseEventInterface = {
9267 screenX: null,
9268 screenY: null,
9269 clientX: null,
9270 clientY: null,
9271 ctrlKey: null,
9272 shiftKey: null,
9273 altKey: null,
9274 metaKey: null,
9275 getModifierState: getEventModifierState,
9276 button: function (event) {
9277 // Webkit, Firefox, IE9+
9278 // which: 1 2 3
9279 // button: 0 1 2 (standard)
9280 var button = event.button;
9281 if ('which' in event) {
9282 return button;
9283 }
9284 // IE<9
9285 // which: undefined
9286 // button: 0 0 0
9287 // button: 1 4 2 (onmouseup)
9288 return button === 2 ? 2 : button === 4 ? 1 : 0;
9289 },
9290 buttons: null,
9291 relatedTarget: function (event) {
9292 return event.relatedTarget || (event.fromElement === event.srcElement ? event.toElement : event.fromElement);
9293 },
9294 // "Proprietary" Interface.
9295 pageX: function (event) {
9296 return 'pageX' in event ? event.pageX : event.clientX + ViewportMetrics.currentScrollLeft;
9297 },
9298 pageY: function (event) {
9299 return 'pageY' in event ? event.pageY : event.clientY + ViewportMetrics.currentScrollTop;
9300 }
9301 };
9302
9303 /**
9304 * @param {object} dispatchConfig Configuration used to dispatch this event.
9305 * @param {string} dispatchMarker Marker identifying the event target.
9306 * @param {object} nativeEvent Native browser event.
9307 * @extends {SyntheticUIEvent}
9308 */
9309 function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
9310 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
9311 }
9312
9313 SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface);
9314
9315 module.exports = SyntheticMouseEvent;
9316
9317/***/ },
9318/* 164 */
9319/***/ function(module, exports, __webpack_require__) {
9320
9321 /**
9322 * Copyright 2013-present, Facebook, Inc.
9323 * All rights reserved.
9324 *
9325 * This source code is licensed under the BSD-style license found in the
9326 * LICENSE file in the root directory of this source tree. An additional grant
9327 * of patent rights can be found in the PATENTS file in the same directory.
9328 *
9329 * @providesModule SyntheticUIEvent
9330 */
9331
9332 'use strict';
9333
9334 var SyntheticEvent = __webpack_require__(141);
9335
9336 var getEventTarget = __webpack_require__(158);
9337
9338 /**
9339 * @interface UIEvent
9340 * @see http://www.w3.org/TR/DOM-Level-3-Events/
9341 */
9342 var UIEventInterface = {
9343 view: function (event) {
9344 if (event.view) {
9345 return event.view;
9346 }
9347
9348 var target = getEventTarget(event);
9349 if (target.window === target) {
9350 // target is a window object
9351 return target;
9352 }
9353
9354 var doc = target.ownerDocument;
9355 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
9356 if (doc) {
9357 return doc.defaultView || doc.parentWindow;
9358 } else {
9359 return window;
9360 }
9361 },
9362 detail: function (event) {
9363 return event.detail || 0;
9364 }
9365 };
9366
9367 /**
9368 * @param {object} dispatchConfig Configuration used to dispatch this event.
9369 * @param {string} dispatchMarker Marker identifying the event target.
9370 * @param {object} nativeEvent Native browser event.
9371 * @extends {SyntheticEvent}
9372 */
9373 function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
9374 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
9375 }
9376
9377 SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface);
9378
9379 module.exports = SyntheticUIEvent;
9380
9381/***/ },
9382/* 165 */
9383/***/ function(module, exports) {
9384
9385 /**
9386 * Copyright 2013-present, Facebook, Inc.
9387 * All rights reserved.
9388 *
9389 * This source code is licensed under the BSD-style license found in the
9390 * LICENSE file in the root directory of this source tree. An additional grant
9391 * of patent rights can be found in the PATENTS file in the same directory.
9392 *
9393 * @providesModule ViewportMetrics
9394 */
9395
9396 'use strict';
9397
9398 var ViewportMetrics = {
9399
9400 currentScrollLeft: 0,
9401
9402 currentScrollTop: 0,
9403
9404 refreshScrollValues: function (scrollPosition) {
9405 ViewportMetrics.currentScrollLeft = scrollPosition.x;
9406 ViewportMetrics.currentScrollTop = scrollPosition.y;
9407 }
9408
9409 };
9410
9411 module.exports = ViewportMetrics;
9412
9413/***/ },
9414/* 166 */
9415/***/ function(module, exports) {
9416
9417 /**
9418 * Copyright 2013-present, Facebook, Inc.
9419 * All rights reserved.
9420 *
9421 * This source code is licensed under the BSD-style license found in the
9422 * LICENSE file in the root directory of this source tree. An additional grant
9423 * of patent rights can be found in the PATENTS file in the same directory.
9424 *
9425 * @providesModule getEventModifierState
9426 */
9427
9428 'use strict';
9429
9430 /**
9431 * Translation from modifier key to the associated property in the event.
9432 * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
9433 */
9434
9435 var modifierKeyToProp = {
9436 'Alt': 'altKey',
9437 'Control': 'ctrlKey',
9438 'Meta': 'metaKey',
9439 'Shift': 'shiftKey'
9440 };
9441
9442 // IE8 does not implement getModifierState so we simply map it to the only
9443 // modifier keys exposed by the event itself, does not support Lock-keys.
9444 // Currently, all major browsers except Chrome seems to support Lock-keys.
9445 function modifierStateGetter(keyArg) {
9446 var syntheticEvent = this;
9447 var nativeEvent = syntheticEvent.nativeEvent;
9448 if (nativeEvent.getModifierState) {
9449 return nativeEvent.getModifierState(keyArg);
9450 }
9451 var keyProp = modifierKeyToProp[keyArg];
9452 return keyProp ? !!nativeEvent[keyProp] : false;
9453 }
9454
9455 function getEventModifierState(nativeEvent) {
9456 return modifierStateGetter;
9457 }
9458
9459 module.exports = getEventModifierState;
9460
9461/***/ },
9462/* 167 */
9463/***/ function(module, exports, __webpack_require__) {
9464
9465 /**
9466 * Copyright 2013-present, Facebook, Inc.
9467 * All rights reserved.
9468 *
9469 * This source code is licensed under the BSD-style license found in the
9470 * LICENSE file in the root directory of this source tree. An additional grant
9471 * of patent rights can be found in the PATENTS file in the same directory.
9472 *
9473 * @providesModule HTMLDOMPropertyConfig
9474 */
9475
9476 'use strict';
9477
9478 var DOMProperty = __webpack_require__(125);
9479
9480 var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
9481 var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
9482 var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
9483 var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
9484 var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
9485
9486 var HTMLDOMPropertyConfig = {
9487 isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
9488 Properties: {
9489 /**
9490 * Standard Properties
9491 */
9492 accept: 0,
9493 acceptCharset: 0,
9494 accessKey: 0,
9495 action: 0,
9496 allowFullScreen: HAS_BOOLEAN_VALUE,
9497 allowTransparency: 0,
9498 alt: 0,
9499 // specifies target context for links with `preload` type
9500 as: 0,
9501 async: HAS_BOOLEAN_VALUE,
9502 autoComplete: 0,
9503 // autoFocus is polyfilled/normalized by AutoFocusUtils
9504 // autoFocus: HAS_BOOLEAN_VALUE,
9505 autoPlay: HAS_BOOLEAN_VALUE,
9506 capture: HAS_BOOLEAN_VALUE,
9507 cellPadding: 0,
9508 cellSpacing: 0,
9509 charSet: 0,
9510 challenge: 0,
9511 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
9512 cite: 0,
9513 classID: 0,
9514 className: 0,
9515 cols: HAS_POSITIVE_NUMERIC_VALUE,
9516 colSpan: 0,
9517 content: 0,
9518 contentEditable: 0,
9519 contextMenu: 0,
9520 controls: HAS_BOOLEAN_VALUE,
9521 coords: 0,
9522 crossOrigin: 0,
9523 data: 0, // For `<object />` acts as `src`.
9524 dateTime: 0,
9525 'default': HAS_BOOLEAN_VALUE,
9526 defer: HAS_BOOLEAN_VALUE,
9527 dir: 0,
9528 disabled: HAS_BOOLEAN_VALUE,
9529 download: HAS_OVERLOADED_BOOLEAN_VALUE,
9530 draggable: 0,
9531 encType: 0,
9532 form: 0,
9533 formAction: 0,
9534 formEncType: 0,
9535 formMethod: 0,
9536 formNoValidate: HAS_BOOLEAN_VALUE,
9537 formTarget: 0,
9538 frameBorder: 0,
9539 headers: 0,
9540 height: 0,
9541 hidden: HAS_BOOLEAN_VALUE,
9542 high: 0,
9543 href: 0,
9544 hrefLang: 0,
9545 htmlFor: 0,
9546 httpEquiv: 0,
9547 icon: 0,
9548 id: 0,
9549 inputMode: 0,
9550 integrity: 0,
9551 is: 0,
9552 keyParams: 0,
9553 keyType: 0,
9554 kind: 0,
9555 label: 0,
9556 lang: 0,
9557 list: 0,
9558 loop: HAS_BOOLEAN_VALUE,
9559 low: 0,
9560 manifest: 0,
9561 marginHeight: 0,
9562 marginWidth: 0,
9563 max: 0,
9564 maxLength: 0,
9565 media: 0,
9566 mediaGroup: 0,
9567 method: 0,
9568 min: 0,
9569 minLength: 0,
9570 // Caution; `option.selected` is not updated if `select.multiple` is
9571 // disabled with `removeAttribute`.
9572 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
9573 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
9574 name: 0,
9575 nonce: 0,
9576 noValidate: HAS_BOOLEAN_VALUE,
9577 open: HAS_BOOLEAN_VALUE,
9578 optimum: 0,
9579 pattern: 0,
9580 placeholder: 0,
9581 playsInline: HAS_BOOLEAN_VALUE,
9582 poster: 0,
9583 preload: 0,
9584 profile: 0,
9585 radioGroup: 0,
9586 readOnly: HAS_BOOLEAN_VALUE,
9587 referrerPolicy: 0,
9588 rel: 0,
9589 required: HAS_BOOLEAN_VALUE,
9590 reversed: HAS_BOOLEAN_VALUE,
9591 role: 0,
9592 rows: HAS_POSITIVE_NUMERIC_VALUE,
9593 rowSpan: HAS_NUMERIC_VALUE,
9594 sandbox: 0,
9595 scope: 0,
9596 scoped: HAS_BOOLEAN_VALUE,
9597 scrolling: 0,
9598 seamless: HAS_BOOLEAN_VALUE,
9599 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
9600 shape: 0,
9601 size: HAS_POSITIVE_NUMERIC_VALUE,
9602 sizes: 0,
9603 span: HAS_POSITIVE_NUMERIC_VALUE,
9604 spellCheck: 0,
9605 src: 0,
9606 srcDoc: 0,
9607 srcLang: 0,
9608 srcSet: 0,
9609 start: HAS_NUMERIC_VALUE,
9610 step: 0,
9611 style: 0,
9612 summary: 0,
9613 tabIndex: 0,
9614 target: 0,
9615 title: 0,
9616 // Setting .type throws on non-<input> tags
9617 type: 0,
9618 useMap: 0,
9619 value: 0,
9620 width: 0,
9621 wmode: 0,
9622 wrap: 0,
9623
9624 /**
9625 * RDFa Properties
9626 */
9627 about: 0,
9628 datatype: 0,
9629 inlist: 0,
9630 prefix: 0,
9631 // property is also supported for OpenGraph in meta tags.
9632 property: 0,
9633 resource: 0,
9634 'typeof': 0,
9635 vocab: 0,
9636
9637 /**
9638 * Non-standard Properties
9639 */
9640 // autoCapitalize and autoCorrect are supported in Mobile Safari for
9641 // keyboard hints.
9642 autoCapitalize: 0,
9643 autoCorrect: 0,
9644 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
9645 autoSave: 0,
9646 // color is for Safari mask-icon link
9647 color: 0,
9648 // itemProp, itemScope, itemType are for
9649 // Microdata support. See http://schema.org/docs/gs.html
9650 itemProp: 0,
9651 itemScope: HAS_BOOLEAN_VALUE,
9652 itemType: 0,
9653 // itemID and itemRef are for Microdata support as well but
9654 // only specified in the WHATWG spec document. See
9655 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
9656 itemID: 0,
9657 itemRef: 0,
9658 // results show looking glass icon and recent searches on input
9659 // search fields in WebKit/Blink
9660 results: 0,
9661 // IE-only attribute that specifies security restrictions on an iframe
9662 // as an alternative to the sandbox attribute on IE<10
9663 security: 0,
9664 // IE-only attribute that controls focus behavior
9665 unselectable: 0
9666 },
9667 DOMAttributeNames: {
9668 acceptCharset: 'accept-charset',
9669 className: 'class',
9670 htmlFor: 'for',
9671 httpEquiv: 'http-equiv'
9672 },
9673 DOMPropertyNames: {}
9674 };
9675
9676 module.exports = HTMLDOMPropertyConfig;
9677
9678/***/ },
9679/* 168 */
9680/***/ function(module, exports, __webpack_require__) {
9681
9682 /**
9683 * Copyright 2013-present, Facebook, Inc.
9684 * All rights reserved.
9685 *
9686 * This source code is licensed under the BSD-style license found in the
9687 * LICENSE file in the root directory of this source tree. An additional grant
9688 * of patent rights can be found in the PATENTS file in the same directory.
9689 *
9690 * @providesModule ReactComponentBrowserEnvironment
9691 */
9692
9693 'use strict';
9694
9695 var DOMChildrenOperations = __webpack_require__(169);
9696 var ReactDOMIDOperations = __webpack_require__(181);
9697
9698 /**
9699 * Abstracts away all functionality of the reconciler that requires knowledge of
9700 * the browser context. TODO: These callers should be refactored to avoid the
9701 * need for this injection.
9702 */
9703 var ReactComponentBrowserEnvironment = {
9704
9705 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
9706
9707 replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
9708
9709 };
9710
9711 module.exports = ReactComponentBrowserEnvironment;
9712
9713/***/ },
9714/* 169 */
9715/***/ function(module, exports, __webpack_require__) {
9716
9717 /**
9718 * Copyright 2013-present, Facebook, Inc.
9719 * All rights reserved.
9720 *
9721 * This source code is licensed under the BSD-style license found in the
9722 * LICENSE file in the root directory of this source tree. An additional grant
9723 * of patent rights can be found in the PATENTS file in the same directory.
9724 *
9725 * @providesModule DOMChildrenOperations
9726 */
9727
9728 'use strict';
9729
9730 var DOMLazyTree = __webpack_require__(170);
9731 var Danger = __webpack_require__(176);
9732 var ReactMultiChildUpdateTypes = __webpack_require__(180);
9733 var ReactDOMComponentTree = __webpack_require__(124);
9734 var ReactInstrumentation = __webpack_require__(150);
9735
9736 var createMicrosoftUnsafeLocalFunction = __webpack_require__(173);
9737 var setInnerHTML = __webpack_require__(172);
9738 var setTextContent = __webpack_require__(174);
9739
9740 function getNodeAfter(parentNode, node) {
9741 // Special case for text components, which return [open, close] comments
9742 // from getHostNode.
9743 if (Array.isArray(node)) {
9744 node = node[1];
9745 }
9746 return node ? node.nextSibling : parentNode.firstChild;
9747 }
9748
9749 /**
9750 * Inserts `childNode` as a child of `parentNode` at the `index`.
9751 *
9752 * @param {DOMElement} parentNode Parent node in which to insert.
9753 * @param {DOMElement} childNode Child node to insert.
9754 * @param {number} index Index at which to insert the child.
9755 * @internal
9756 */
9757 var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
9758 // We rely exclusively on `insertBefore(node, null)` instead of also using
9759 // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
9760 // we are careful to use `null`.)
9761 parentNode.insertBefore(childNode, referenceNode);
9762 });
9763
9764 function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
9765 DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
9766 }
9767
9768 function moveChild(parentNode, childNode, referenceNode) {
9769 if (Array.isArray(childNode)) {
9770 moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
9771 } else {
9772 insertChildAt(parentNode, childNode, referenceNode);
9773 }
9774 }
9775
9776 function removeChild(parentNode, childNode) {
9777 if (Array.isArray(childNode)) {
9778 var closingComment = childNode[1];
9779 childNode = childNode[0];
9780 removeDelimitedText(parentNode, childNode, closingComment);
9781 parentNode.removeChild(closingComment);
9782 }
9783 parentNode.removeChild(childNode);
9784 }
9785
9786 function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
9787 var node = openingComment;
9788 while (true) {
9789 var nextNode = node.nextSibling;
9790 insertChildAt(parentNode, node, referenceNode);
9791 if (node === closingComment) {
9792 break;
9793 }
9794 node = nextNode;
9795 }
9796 }
9797
9798 function removeDelimitedText(parentNode, startNode, closingComment) {
9799 while (true) {
9800 var node = startNode.nextSibling;
9801 if (node === closingComment) {
9802 // The closing comment is removed by ReactMultiChild.
9803 break;
9804 } else {
9805 parentNode.removeChild(node);
9806 }
9807 }
9808 }
9809
9810 function replaceDelimitedText(openingComment, closingComment, stringText) {
9811 var parentNode = openingComment.parentNode;
9812 var nodeAfterComment = openingComment.nextSibling;
9813 if (nodeAfterComment === closingComment) {
9814 // There are no text nodes between the opening and closing comments; insert
9815 // a new one if stringText isn't empty.
9816 if (stringText) {
9817 insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
9818 }
9819 } else {
9820 if (stringText) {
9821 // Set the text content of the first node after the opening comment, and
9822 // remove all following nodes up until the closing comment.
9823 setTextContent(nodeAfterComment, stringText);
9824 removeDelimitedText(parentNode, nodeAfterComment, closingComment);
9825 } else {
9826 removeDelimitedText(parentNode, openingComment, closingComment);
9827 }
9828 }
9829
9830 if ((undefined) !== 'production') {
9831 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(openingComment)._debugID, 'replace text', stringText);
9832 }
9833 }
9834
9835 var dangerouslyReplaceNodeWithMarkup = Danger.dangerouslyReplaceNodeWithMarkup;
9836 if ((undefined) !== 'production') {
9837 dangerouslyReplaceNodeWithMarkup = function (oldChild, markup, prevInstance) {
9838 Danger.dangerouslyReplaceNodeWithMarkup(oldChild, markup);
9839 if (prevInstance._debugID !== 0) {
9840 ReactInstrumentation.debugTool.onHostOperation(prevInstance._debugID, 'replace with', markup.toString());
9841 } else {
9842 var nextInstance = ReactDOMComponentTree.getInstanceFromNode(markup.node);
9843 if (nextInstance._debugID !== 0) {
9844 ReactInstrumentation.debugTool.onHostOperation(nextInstance._debugID, 'mount', markup.toString());
9845 }
9846 }
9847 };
9848 }
9849
9850 /**
9851 * Operations for updating with DOM children.
9852 */
9853 var DOMChildrenOperations = {
9854
9855 dangerouslyReplaceNodeWithMarkup: dangerouslyReplaceNodeWithMarkup,
9856
9857 replaceDelimitedText: replaceDelimitedText,
9858
9859 /**
9860 * Updates a component's children by processing a series of updates. The
9861 * update configurations are each expected to have a `parentNode` property.
9862 *
9863 * @param {array<object>} updates List of update configurations.
9864 * @internal
9865 */
9866 processUpdates: function (parentNode, updates) {
9867 if ((undefined) !== 'production') {
9868 var parentNodeDebugID = ReactDOMComponentTree.getInstanceFromNode(parentNode)._debugID;
9869 }
9870
9871 for (var k = 0; k < updates.length; k++) {
9872 var update = updates[k];
9873 switch (update.type) {
9874 case ReactMultiChildUpdateTypes.INSERT_MARKUP:
9875 insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
9876 if ((undefined) !== 'production') {
9877 ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'insert child', { toIndex: update.toIndex, content: update.content.toString() });
9878 }
9879 break;
9880 case ReactMultiChildUpdateTypes.MOVE_EXISTING:
9881 moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
9882 if ((undefined) !== 'production') {
9883 ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'move child', { fromIndex: update.fromIndex, toIndex: update.toIndex });
9884 }
9885 break;
9886 case ReactMultiChildUpdateTypes.SET_MARKUP:
9887 setInnerHTML(parentNode, update.content);
9888 if ((undefined) !== 'production') {
9889 ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace children', update.content.toString());
9890 }
9891 break;
9892 case ReactMultiChildUpdateTypes.TEXT_CONTENT:
9893 setTextContent(parentNode, update.content);
9894 if ((undefined) !== 'production') {
9895 ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'replace text', update.content.toString());
9896 }
9897 break;
9898 case ReactMultiChildUpdateTypes.REMOVE_NODE:
9899 removeChild(parentNode, update.fromNode);
9900 if ((undefined) !== 'production') {
9901 ReactInstrumentation.debugTool.onHostOperation(parentNodeDebugID, 'remove child', { fromIndex: update.fromIndex });
9902 }
9903 break;
9904 }
9905 }
9906 }
9907
9908 };
9909
9910 module.exports = DOMChildrenOperations;
9911
9912/***/ },
9913/* 170 */
9914/***/ function(module, exports, __webpack_require__) {
9915
9916 /**
9917 * Copyright 2015-present, Facebook, Inc.
9918 * All rights reserved.
9919 *
9920 * This source code is licensed under the BSD-style license found in the
9921 * LICENSE file in the root directory of this source tree. An additional grant
9922 * of patent rights can be found in the PATENTS file in the same directory.
9923 *
9924 * @providesModule DOMLazyTree
9925 */
9926
9927 'use strict';
9928
9929 var DOMNamespaces = __webpack_require__(171);
9930 var setInnerHTML = __webpack_require__(172);
9931
9932 var createMicrosoftUnsafeLocalFunction = __webpack_require__(173);
9933 var setTextContent = __webpack_require__(174);
9934
9935 var ELEMENT_NODE_TYPE = 1;
9936 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
9937
9938 /**
9939 * In IE (8-11) and Edge, appending nodes with no children is dramatically
9940 * faster than appending a full subtree, so we essentially queue up the
9941 * .appendChild calls here and apply them so each node is added to its parent
9942 * before any children are added.
9943 *
9944 * In other browsers, doing so is slower or neutral compared to the other order
9945 * (in Firefox, twice as slow) so we only do this inversion in IE.
9946 *
9947 * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
9948 */
9949 var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
9950
9951 function insertTreeChildren(tree) {
9952 if (!enableLazy) {
9953 return;
9954 }
9955 var node = tree.node;
9956 var children = tree.children;
9957 if (children.length) {
9958 for (var i = 0; i < children.length; i++) {
9959 insertTreeBefore(node, children[i], null);
9960 }
9961 } else if (tree.html != null) {
9962 setInnerHTML(node, tree.html);
9963 } else if (tree.text != null) {
9964 setTextContent(node, tree.text);
9965 }
9966 }
9967
9968 var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
9969 // DocumentFragments aren't actually part of the DOM after insertion so
9970 // appending children won't update the DOM. We need to ensure the fragment
9971 // is properly populated first, breaking out of our lazy approach for just
9972 // this level. Also, some <object> plugins (like Flash Player) will read
9973 // <param> nodes immediately upon insertion into the DOM, so <object>
9974 // must also be populated prior to insertion into the DOM.
9975 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)) {
9976 insertTreeChildren(tree);
9977 parentNode.insertBefore(tree.node, referenceNode);
9978 } else {
9979 parentNode.insertBefore(tree.node, referenceNode);
9980 insertTreeChildren(tree);
9981 }
9982 });
9983
9984 function replaceChildWithTree(oldNode, newTree) {
9985 oldNode.parentNode.replaceChild(newTree.node, oldNode);
9986 insertTreeChildren(newTree);
9987 }
9988
9989 function queueChild(parentTree, childTree) {
9990 if (enableLazy) {
9991 parentTree.children.push(childTree);
9992 } else {
9993 parentTree.node.appendChild(childTree.node);
9994 }
9995 }
9996
9997 function queueHTML(tree, html) {
9998 if (enableLazy) {
9999 tree.html = html;
10000 } else {
10001 setInnerHTML(tree.node, html);
10002 }
10003 }
10004
10005 function queueText(tree, text) {
10006 if (enableLazy) {
10007 tree.text = text;
10008 } else {
10009 setTextContent(tree.node, text);
10010 }
10011 }
10012
10013 function toString() {
10014 return this.node.nodeName;
10015 }
10016
10017 function DOMLazyTree(node) {
10018 return {
10019 node: node,
10020 children: [],
10021 html: null,
10022 text: null,
10023 toString: toString
10024 };
10025 }
10026
10027 DOMLazyTree.insertTreeBefore = insertTreeBefore;
10028 DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
10029 DOMLazyTree.queueChild = queueChild;
10030 DOMLazyTree.queueHTML = queueHTML;
10031 DOMLazyTree.queueText = queueText;
10032
10033 module.exports = DOMLazyTree;
10034
10035/***/ },
10036/* 171 */
10037/***/ function(module, exports) {
10038
10039 /**
10040 * Copyright 2013-present, Facebook, Inc.
10041 * All rights reserved.
10042 *
10043 * This source code is licensed under the BSD-style license found in the
10044 * LICENSE file in the root directory of this source tree. An additional grant
10045 * of patent rights can be found in the PATENTS file in the same directory.
10046 *
10047 * @providesModule DOMNamespaces
10048 */
10049
10050 'use strict';
10051
10052 var DOMNamespaces = {
10053 html: 'http://www.w3.org/1999/xhtml',
10054 mathml: 'http://www.w3.org/1998/Math/MathML',
10055 svg: 'http://www.w3.org/2000/svg'
10056 };
10057
10058 module.exports = DOMNamespaces;
10059
10060/***/ },
10061/* 172 */
10062/***/ function(module, exports, __webpack_require__) {
10063
10064 /**
10065 * Copyright 2013-present, Facebook, Inc.
10066 * All rights reserved.
10067 *
10068 * This source code is licensed under the BSD-style license found in the
10069 * LICENSE file in the root directory of this source tree. An additional grant
10070 * of patent rights can be found in the PATENTS file in the same directory.
10071 *
10072 * @providesModule setInnerHTML
10073 */
10074
10075 'use strict';
10076
10077 var ExecutionEnvironment = __webpack_require__(137);
10078 var DOMNamespaces = __webpack_require__(171);
10079
10080 var WHITESPACE_TEST = /^[ \r\n\t\f]/;
10081 var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;
10082
10083 var createMicrosoftUnsafeLocalFunction = __webpack_require__(173);
10084
10085 // SVG temp container for IE lacking innerHTML
10086 var reusableSVGContainer;
10087
10088 /**
10089 * Set the innerHTML property of a node, ensuring that whitespace is preserved
10090 * even in IE8.
10091 *
10092 * @param {DOMElement} node
10093 * @param {string} html
10094 * @internal
10095 */
10096 var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
10097 // IE does not have innerHTML for SVG nodes, so instead we inject the
10098 // new markup in a temp node and then move the child nodes across into
10099 // the target node
10100 if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
10101 reusableSVGContainer = reusableSVGContainer || document.createElement('div');
10102 reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
10103 var svgNode = reusableSVGContainer.firstChild;
10104 while (svgNode.firstChild) {
10105 node.appendChild(svgNode.firstChild);
10106 }
10107 } else {
10108 node.innerHTML = html;
10109 }
10110 });
10111
10112 if (ExecutionEnvironment.canUseDOM) {
10113 // IE8: When updating a just created node with innerHTML only leading
10114 // whitespace is removed. When updating an existing node with innerHTML
10115 // whitespace in root TextNodes is also collapsed.
10116 // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
10117
10118 // Feature detection; only IE8 is known to behave improperly like this.
10119 var testElement = document.createElement('div');
10120 testElement.innerHTML = ' ';
10121 if (testElement.innerHTML === '') {
10122 setInnerHTML = function (node, html) {
10123 // Magic theory: IE8 supposedly differentiates between added and updated
10124 // nodes when processing innerHTML, innerHTML on updated nodes suffers
10125 // from worse whitespace behavior. Re-adding a node like this triggers
10126 // the initial and more favorable whitespace behavior.
10127 // TODO: What to do on a detached node?
10128 if (node.parentNode) {
10129 node.parentNode.replaceChild(node, node);
10130 }
10131
10132 // We also implement a workaround for non-visible tags disappearing into
10133 // thin air on IE8, this only happens if there is no visible text
10134 // in-front of the non-visible tags. Piggyback on the whitespace fix
10135 // and simply check if any non-visible tags appear in the source.
10136 if (WHITESPACE_TEST.test(html) || html[0] === '<' && NONVISIBLE_TEST.test(html)) {
10137 // Recover leading whitespace by temporarily prepending any character.
10138 // \uFEFF has the potential advantage of being zero-width/invisible.
10139 // UglifyJS drops U+FEFF chars when parsing, so use String.fromCharCode
10140 // in hopes that this is preserved even if "\uFEFF" is transformed to
10141 // the actual Unicode character (by Babel, for example).
10142 // https://github.com/mishoo/UglifyJS2/blob/v2.4.20/lib/parse.js#L216
10143 node.innerHTML = String.fromCharCode(0xFEFF) + html;
10144
10145 // deleteData leaves an empty `TextNode` which offsets the index of all
10146 // children. Definitely want to avoid this.
10147 var textNode = node.firstChild;
10148 if (textNode.data.length === 1) {
10149 node.removeChild(textNode);
10150 } else {
10151 textNode.deleteData(0, 1);
10152 }
10153 } else {
10154 node.innerHTML = html;
10155 }
10156 };
10157 }
10158 testElement = null;
10159 }
10160
10161 module.exports = setInnerHTML;
10162
10163/***/ },
10164/* 173 */
10165/***/ function(module, exports) {
10166
10167 /**
10168 * Copyright 2013-present, Facebook, Inc.
10169 * All rights reserved.
10170 *
10171 * This source code is licensed under the BSD-style license found in the
10172 * LICENSE file in the root directory of this source tree. An additional grant
10173 * of patent rights can be found in the PATENTS file in the same directory.
10174 *
10175 * @providesModule createMicrosoftUnsafeLocalFunction
10176 */
10177
10178 /* globals MSApp */
10179
10180 'use strict';
10181
10182 /**
10183 * Create a function which has 'unsafe' privileges (required by windows8 apps)
10184 */
10185
10186 var createMicrosoftUnsafeLocalFunction = function (func) {
10187 if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
10188 return function (arg0, arg1, arg2, arg3) {
10189 MSApp.execUnsafeLocalFunction(function () {
10190 return func(arg0, arg1, arg2, arg3);
10191 });
10192 };
10193 } else {
10194 return func;
10195 }
10196 };
10197
10198 module.exports = createMicrosoftUnsafeLocalFunction;
10199
10200/***/ },
10201/* 174 */
10202/***/ function(module, exports, __webpack_require__) {
10203
10204 /**
10205 * Copyright 2013-present, Facebook, Inc.
10206 * All rights reserved.
10207 *
10208 * This source code is licensed under the BSD-style license found in the
10209 * LICENSE file in the root directory of this source tree. An additional grant
10210 * of patent rights can be found in the PATENTS file in the same directory.
10211 *
10212 * @providesModule setTextContent
10213 */
10214
10215 'use strict';
10216
10217 var ExecutionEnvironment = __webpack_require__(137);
10218 var escapeTextContentForBrowser = __webpack_require__(175);
10219 var setInnerHTML = __webpack_require__(172);
10220
10221 /**
10222 * Set the textContent property of a node, ensuring that whitespace is preserved
10223 * even in IE8. innerText is a poor substitute for textContent and, among many
10224 * issues, inserts <br> instead of the literal newline chars. innerHTML behaves
10225 * as it should.
10226 *
10227 * @param {DOMElement} node
10228 * @param {string} text
10229 * @internal
10230 */
10231 var setTextContent = function (node, text) {
10232 if (text) {
10233 var firstChild = node.firstChild;
10234
10235 if (firstChild && firstChild === node.lastChild && firstChild.nodeType === 3) {
10236 firstChild.nodeValue = text;
10237 return;
10238 }
10239 }
10240 node.textContent = text;
10241 };
10242
10243 if (ExecutionEnvironment.canUseDOM) {
10244 if (!('textContent' in document.documentElement)) {
10245 setTextContent = function (node, text) {
10246 setInnerHTML(node, escapeTextContentForBrowser(text));
10247 };
10248 }
10249 }
10250
10251 module.exports = setTextContent;
10252
10253/***/ },
10254/* 175 */
10255/***/ function(module, exports) {
10256
10257 /**
10258 * Copyright 2016-present, Facebook, Inc.
10259 * All rights reserved.
10260 *
10261 * This source code is licensed under the BSD-style license found in the
10262 * LICENSE file in the root directory of this source tree. An additional grant
10263 * of patent rights can be found in the PATENTS file in the same directory.
10264 *
10265 * Based on the escape-html library, which is used under the MIT License below:
10266 *
10267 * Copyright (c) 2012-2013 TJ Holowaychuk
10268 * Copyright (c) 2015 Andreas Lubbe
10269 * Copyright (c) 2015 Tiancheng "Timothy" Gu
10270 *
10271 * Permission is hereby granted, free of charge, to any person obtaining
10272 * a copy of this software and associated documentation files (the
10273 * 'Software'), to deal in the Software without restriction, including
10274 * without limitation the rights to use, copy, modify, merge, publish,
10275 * distribute, sublicense, and/or sell copies of the Software, and to
10276 * permit persons to whom the Software is furnished to do so, subject to
10277 * the following conditions:
10278 *
10279 * The above copyright notice and this permission notice shall be
10280 * included in all copies or substantial portions of the Software.
10281 *
10282 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
10283 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10284 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10285 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
10286 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
10287 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
10288 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10289 *
10290 * @providesModule escapeTextContentForBrowser
10291 */
10292
10293 'use strict';
10294
10295 // code copied and modified from escape-html
10296 /**
10297 * Module variables.
10298 * @private
10299 */
10300
10301 var matchHtmlRegExp = /["'&<>]/;
10302
10303 /**
10304 * Escape special characters in the given string of html.
10305 *
10306 * @param {string} string The string to escape for inserting into HTML
10307 * @return {string}
10308 * @public
10309 */
10310
10311 function escapeHtml(string) {
10312 var str = '' + string;
10313 var match = matchHtmlRegExp.exec(str);
10314
10315 if (!match) {
10316 return str;
10317 }
10318
10319 var escape;
10320 var html = '';
10321 var index = 0;
10322 var lastIndex = 0;
10323
10324 for (index = match.index; index < str.length; index++) {
10325 switch (str.charCodeAt(index)) {
10326 case 34:
10327 // "
10328 escape = '&quot;';
10329 break;
10330 case 38:
10331 // &
10332 escape = '&amp;';
10333 break;
10334 case 39:
10335 // '
10336 escape = '&#x27;'; // modified from escape-html; used to be '&#39'
10337 break;
10338 case 60:
10339 // <
10340 escape = '&lt;';
10341 break;
10342 case 62:
10343 // >
10344 escape = '&gt;';
10345 break;
10346 default:
10347 continue;
10348 }
10349
10350 if (lastIndex !== index) {
10351 html += str.substring(lastIndex, index);
10352 }
10353
10354 lastIndex = index + 1;
10355 html += escape;
10356 }
10357
10358 return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
10359 }
10360 // end code copied and modified from escape-html
10361
10362
10363 /**
10364 * Escapes text to prevent scripting attacks.
10365 *
10366 * @param {*} text Text value to escape.
10367 * @return {string} An escaped string.
10368 */
10369 function escapeTextContentForBrowser(text) {
10370 if (typeof text === 'boolean' || typeof text === 'number') {
10371 // this shortcircuit helps perf for types that we know will never have
10372 // special characters, especially given that this function is used often
10373 // for numeric dom ids.
10374 return '' + text;
10375 }
10376 return escapeHtml(text);
10377 }
10378
10379 module.exports = escapeTextContentForBrowser;
10380
10381/***/ },
10382/* 176 */
10383/***/ function(module, exports, __webpack_require__) {
10384
10385 /**
10386 * Copyright 2013-present, Facebook, Inc.
10387 * All rights reserved.
10388 *
10389 * This source code is licensed under the BSD-style license found in the
10390 * LICENSE file in the root directory of this source tree. An additional grant
10391 * of patent rights can be found in the PATENTS file in the same directory.
10392 *
10393 * @providesModule Danger
10394 */
10395
10396 'use strict';
10397
10398 var _prodInvariant = __webpack_require__(94);
10399
10400 var DOMLazyTree = __webpack_require__(170);
10401 var ExecutionEnvironment = __webpack_require__(137);
10402
10403 var createNodesFromMarkup = __webpack_require__(177);
10404 var emptyFunction = __webpack_require__(99);
10405 var invariant = __webpack_require__(95);
10406
10407 var Danger = {
10408
10409 /**
10410 * Replaces a node with a string of markup at its current position within its
10411 * parent. The markup must render into a single root node.
10412 *
10413 * @param {DOMElement} oldChild Child node to replace.
10414 * @param {string} markup Markup to render in place of the child node.
10415 * @internal
10416 */
10417 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
10418 !ExecutionEnvironment.canUseDOM ? (undefined) !== '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;
10419 !markup ? (undefined) !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : _prodInvariant('57') : void 0;
10420 !(oldChild.nodeName !== 'HTML') ? (undefined) !== '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;
10421
10422 if (typeof markup === 'string') {
10423 var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
10424 oldChild.parentNode.replaceChild(newChild, oldChild);
10425 } else {
10426 DOMLazyTree.replaceChildWithTree(oldChild, markup);
10427 }
10428 }
10429
10430 };
10431
10432 module.exports = Danger;
10433
10434/***/ },
10435/* 177 */
10436/***/ function(module, exports, __webpack_require__) {
10437
10438 'use strict';
10439
10440 /**
10441 * Copyright (c) 2013-present, Facebook, Inc.
10442 * All rights reserved.
10443 *
10444 * This source code is licensed under the BSD-style license found in the
10445 * LICENSE file in the root directory of this source tree. An additional grant
10446 * of patent rights can be found in the PATENTS file in the same directory.
10447 *
10448 * @typechecks
10449 */
10450
10451 /*eslint-disable fb-www/unsafe-html*/
10452
10453 var ExecutionEnvironment = __webpack_require__(137);
10454
10455 var createArrayFromMixed = __webpack_require__(178);
10456 var getMarkupWrap = __webpack_require__(179);
10457 var invariant = __webpack_require__(95);
10458
10459 /**
10460 * Dummy container used to render all markup.
10461 */
10462 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
10463
10464 /**
10465 * Pattern used by `getNodeName`.
10466 */
10467 var nodeNamePattern = /^\s*<(\w+)/;
10468
10469 /**
10470 * Extracts the `nodeName` of the first element in a string of markup.
10471 *
10472 * @param {string} markup String of markup.
10473 * @return {?string} Node name of the supplied markup.
10474 */
10475 function getNodeName(markup) {
10476 var nodeNameMatch = markup.match(nodeNamePattern);
10477 return nodeNameMatch && nodeNameMatch[1].toLowerCase();
10478 }
10479
10480 /**
10481 * Creates an array containing the nodes rendered from the supplied markup. The
10482 * optionally supplied `handleScript` function will be invoked once for each
10483 * <script> element that is rendered. If no `handleScript` function is supplied,
10484 * an exception is thrown if any <script> elements are rendered.
10485 *
10486 * @param {string} markup A string of valid HTML markup.
10487 * @param {?function} handleScript Invoked once for each rendered <script>.
10488 * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes.
10489 */
10490 function createNodesFromMarkup(markup, handleScript) {
10491 var node = dummyNode;
10492 !!!dummyNode ? (undefined) !== 'production' ? invariant(false, 'createNodesFromMarkup dummy not initialized') : invariant(false) : void 0;
10493 var nodeName = getNodeName(markup);
10494
10495 var wrap = nodeName && getMarkupWrap(nodeName);
10496 if (wrap) {
10497 node.innerHTML = wrap[1] + markup + wrap[2];
10498
10499 var wrapDepth = wrap[0];
10500 while (wrapDepth--) {
10501 node = node.lastChild;
10502 }
10503 } else {
10504 node.innerHTML = markup;
10505 }
10506
10507 var scripts = node.getElementsByTagName('script');
10508 if (scripts.length) {
10509 !handleScript ? (undefined) !== 'production' ? invariant(false, 'createNodesFromMarkup(...): Unexpected <script> element rendered.') : invariant(false) : void 0;
10510 createArrayFromMixed(scripts).forEach(handleScript);
10511 }
10512
10513 var nodes = Array.from(node.childNodes);
10514 while (node.lastChild) {
10515 node.removeChild(node.lastChild);
10516 }
10517 return nodes;
10518 }
10519
10520 module.exports = createNodesFromMarkup;
10521
10522/***/ },
10523/* 178 */
10524/***/ function(module, exports, __webpack_require__) {
10525
10526 'use strict';
10527
10528 /**
10529 * Copyright (c) 2013-present, Facebook, Inc.
10530 * All rights reserved.
10531 *
10532 * This source code is licensed under the BSD-style license found in the
10533 * LICENSE file in the root directory of this source tree. An additional grant
10534 * of patent rights can be found in the PATENTS file in the same directory.
10535 *
10536 * @typechecks
10537 */
10538
10539 var invariant = __webpack_require__(95);
10540
10541 /**
10542 * Convert array-like objects to arrays.
10543 *
10544 * This API assumes the caller knows the contents of the data type. For less
10545 * well defined inputs use createArrayFromMixed.
10546 *
10547 * @param {object|function|filelist} obj
10548 * @return {array}
10549 */
10550 function toArray(obj) {
10551 var length = obj.length;
10552
10553 // Some browsers builtin objects can report typeof 'function' (e.g. NodeList
10554 // in old versions of Safari).
10555 !(!Array.isArray(obj) && (typeof obj === 'object' || typeof obj === 'function')) ? (undefined) !== 'production' ? invariant(false, 'toArray: Array-like object expected') : invariant(false) : void 0;
10556
10557 !(typeof length === 'number') ? (undefined) !== 'production' ? invariant(false, 'toArray: Object needs a length property') : invariant(false) : void 0;
10558
10559 !(length === 0 || length - 1 in obj) ? (undefined) !== 'production' ? invariant(false, 'toArray: Object should have keys for indices') : invariant(false) : void 0;
10560
10561 !(typeof obj.callee !== 'function') ? (undefined) !== 'production' ? invariant(false, 'toArray: Object can\'t be `arguments`. Use rest params ' + '(function(...args) {}) or Array.from() instead.') : invariant(false) : void 0;
10562
10563 // Old IE doesn't give collections access to hasOwnProperty. Assume inputs
10564 // without method will throw during the slice call and skip straight to the
10565 // fallback.
10566 if (obj.hasOwnProperty) {
10567 try {
10568 return Array.prototype.slice.call(obj);
10569 } catch (e) {
10570 // IE < 9 does not support Array#slice on collections objects
10571 }
10572 }
10573
10574 // Fall back to copying key by key. This assumes all keys have a value,
10575 // so will not preserve sparsely populated inputs.
10576 var ret = Array(length);
10577 for (var ii = 0; ii < length; ii++) {
10578 ret[ii] = obj[ii];
10579 }
10580 return ret;
10581 }
10582
10583 /**
10584 * Perform a heuristic test to determine if an object is "array-like".
10585 *
10586 * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?"
10587 * Joshu replied: "Mu."
10588 *
10589 * This function determines if its argument has "array nature": it returns
10590 * true if the argument is an actual array, an `arguments' object, or an
10591 * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()).
10592 *
10593 * It will return false for other array-like objects like Filelist.
10594 *
10595 * @param {*} obj
10596 * @return {boolean}
10597 */
10598 function hasArrayNature(obj) {
10599 return (
10600 // not null/false
10601 !!obj && (
10602 // arrays are objects, NodeLists are functions in Safari
10603 typeof obj == 'object' || typeof obj == 'function') &&
10604 // quacks like an array
10605 'length' in obj &&
10606 // not window
10607 !('setInterval' in obj) &&
10608 // no DOM node should be considered an array-like
10609 // a 'select' element has 'length' and 'item' properties on IE8
10610 typeof obj.nodeType != 'number' && (
10611 // a real array
10612 Array.isArray(obj) ||
10613 // arguments
10614 'callee' in obj ||
10615 // HTMLCollection/NodeList
10616 'item' in obj)
10617 );
10618 }
10619
10620 /**
10621 * Ensure that the argument is an array by wrapping it in an array if it is not.
10622 * Creates a copy of the argument if it is already an array.
10623 *
10624 * This is mostly useful idiomatically:
10625 *
10626 * var createArrayFromMixed = require('createArrayFromMixed');
10627 *
10628 * function takesOneOrMoreThings(things) {
10629 * things = createArrayFromMixed(things);
10630 * ...
10631 * }
10632 *
10633 * This allows you to treat `things' as an array, but accept scalars in the API.
10634 *
10635 * If you need to convert an array-like object, like `arguments`, into an array
10636 * use toArray instead.
10637 *
10638 * @param {*} obj
10639 * @return {array}
10640 */
10641 function createArrayFromMixed(obj) {
10642 if (!hasArrayNature(obj)) {
10643 return [obj];
10644 } else if (Array.isArray(obj)) {
10645 return obj.slice();
10646 } else {
10647 return toArray(obj);
10648 }
10649 }
10650
10651 module.exports = createArrayFromMixed;
10652
10653/***/ },
10654/* 179 */
10655/***/ function(module, exports, __webpack_require__) {
10656
10657 'use strict';
10658
10659 /**
10660 * Copyright (c) 2013-present, Facebook, Inc.
10661 * All rights reserved.
10662 *
10663 * This source code is licensed under the BSD-style license found in the
10664 * LICENSE file in the root directory of this source tree. An additional grant
10665 * of patent rights can be found in the PATENTS file in the same directory.
10666 *
10667 */
10668
10669 /*eslint-disable fb-www/unsafe-html */
10670
10671 var ExecutionEnvironment = __webpack_require__(137);
10672
10673 var invariant = __webpack_require__(95);
10674
10675 /**
10676 * Dummy container used to detect which wraps are necessary.
10677 */
10678 var dummyNode = ExecutionEnvironment.canUseDOM ? document.createElement('div') : null;
10679
10680 /**
10681 * Some browsers cannot use `innerHTML` to render certain elements standalone,
10682 * so we wrap them, render the wrapped nodes, then extract the desired node.
10683 *
10684 * In IE8, certain elements cannot render alone, so wrap all elements ('*').
10685 */
10686
10687 var shouldWrap = {};
10688
10689 var selectWrap = [1, '<select multiple="true">', '</select>'];
10690 var tableWrap = [1, '<table>', '</table>'];
10691 var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>'];
10692
10693 var svgWrap = [1, '<svg xmlns="http://www.w3.org/2000/svg">', '</svg>'];
10694
10695 var markupWrap = {
10696 '*': [1, '?<div>', '</div>'],
10697
10698 'area': [1, '<map>', '</map>'],
10699 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'],
10700 'legend': [1, '<fieldset>', '</fieldset>'],
10701 'param': [1, '<object>', '</object>'],
10702 'tr': [2, '<table><tbody>', '</tbody></table>'],
10703
10704 'optgroup': selectWrap,
10705 'option': selectWrap,
10706
10707 'caption': tableWrap,
10708 'colgroup': tableWrap,
10709 'tbody': tableWrap,
10710 'tfoot': tableWrap,
10711 'thead': tableWrap,
10712
10713 'td': trWrap,
10714 'th': trWrap
10715 };
10716
10717 // Initialize the SVG elements since we know they'll always need to be wrapped
10718 // consistently. If they are created inside a <div> they will be initialized in
10719 // the wrong namespace (and will not display).
10720 var svgElements = ['circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'text', 'tspan'];
10721 svgElements.forEach(function (nodeName) {
10722 markupWrap[nodeName] = svgWrap;
10723 shouldWrap[nodeName] = true;
10724 });
10725
10726 /**
10727 * Gets the markup wrap configuration for the supplied `nodeName`.
10728 *
10729 * NOTE: This lazily detects which wraps are necessary for the current browser.
10730 *
10731 * @param {string} nodeName Lowercase `nodeName`.
10732 * @return {?array} Markup wrap configuration, if applicable.
10733 */
10734 function getMarkupWrap(nodeName) {
10735 !!!dummyNode ? (undefined) !== 'production' ? invariant(false, 'Markup wrapping node not initialized') : invariant(false) : void 0;
10736 if (!markupWrap.hasOwnProperty(nodeName)) {
10737 nodeName = '*';
10738 }
10739 if (!shouldWrap.hasOwnProperty(nodeName)) {
10740 if (nodeName === '*') {
10741 dummyNode.innerHTML = '<link />';
10742 } else {
10743 dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>';
10744 }
10745 shouldWrap[nodeName] = !dummyNode.firstChild;
10746 }
10747 return shouldWrap[nodeName] ? markupWrap[nodeName] : null;
10748 }
10749
10750 module.exports = getMarkupWrap;
10751
10752/***/ },
10753/* 180 */
10754/***/ function(module, exports, __webpack_require__) {
10755
10756 /**
10757 * Copyright 2013-present, Facebook, Inc.
10758 * All rights reserved.
10759 *
10760 * This source code is licensed under the BSD-style license found in the
10761 * LICENSE file in the root directory of this source tree. An additional grant
10762 * of patent rights can be found in the PATENTS file in the same directory.
10763 *
10764 * @providesModule ReactMultiChildUpdateTypes
10765 */
10766
10767 'use strict';
10768
10769 var keyMirror = __webpack_require__(110);
10770
10771 /**
10772 * When a component's children are updated, a series of update configuration
10773 * objects are created in order to batch and serialize the required changes.
10774 *
10775 * Enumerates all the possible types of update configurations.
10776 *
10777 * @internal
10778 */
10779 var ReactMultiChildUpdateTypes = keyMirror({
10780 INSERT_MARKUP: null,
10781 MOVE_EXISTING: null,
10782 REMOVE_NODE: null,
10783 SET_MARKUP: null,
10784 TEXT_CONTENT: null
10785 });
10786
10787 module.exports = ReactMultiChildUpdateTypes;
10788
10789/***/ },
10790/* 181 */
10791/***/ function(module, exports, __webpack_require__) {
10792
10793 /**
10794 * Copyright 2013-present, Facebook, Inc.
10795 * All rights reserved.
10796 *
10797 * This source code is licensed under the BSD-style license found in the
10798 * LICENSE file in the root directory of this source tree. An additional grant
10799 * of patent rights can be found in the PATENTS file in the same directory.
10800 *
10801 * @providesModule ReactDOMIDOperations
10802 */
10803
10804 'use strict';
10805
10806 var DOMChildrenOperations = __webpack_require__(169);
10807 var ReactDOMComponentTree = __webpack_require__(124);
10808
10809 /**
10810 * Operations used to process updates to DOM nodes.
10811 */
10812 var ReactDOMIDOperations = {
10813
10814 /**
10815 * Updates a component's children by processing a series of updates.
10816 *
10817 * @param {array<object>} updates List of update configurations.
10818 * @internal
10819 */
10820 dangerouslyProcessChildrenUpdates: function (parentInst, updates) {
10821 var node = ReactDOMComponentTree.getNodeFromInstance(parentInst);
10822 DOMChildrenOperations.processUpdates(node, updates);
10823 }
10824 };
10825
10826 module.exports = ReactDOMIDOperations;
10827
10828/***/ },
10829/* 182 */
10830/***/ function(module, exports, __webpack_require__) {
10831
10832 /**
10833 * Copyright 2013-present, Facebook, Inc.
10834 * All rights reserved.
10835 *
10836 * This source code is licensed under the BSD-style license found in the
10837 * LICENSE file in the root directory of this source tree. An additional grant
10838 * of patent rights can be found in the PATENTS file in the same directory.
10839 *
10840 * @providesModule ReactDOMComponent
10841 */
10842
10843 /* global hasOwnProperty:true */
10844
10845 'use strict';
10846
10847 var _prodInvariant = __webpack_require__(94),
10848 _assign = __webpack_require__(91);
10849
10850 var AutoFocusUtils = __webpack_require__(183);
10851 var CSSPropertyOperations = __webpack_require__(185);
10852 var DOMLazyTree = __webpack_require__(170);
10853 var DOMNamespaces = __webpack_require__(171);
10854 var DOMProperty = __webpack_require__(125);
10855 var DOMPropertyOperations = __webpack_require__(193);
10856 var EventConstants = __webpack_require__(129);
10857 var EventPluginHub = __webpack_require__(131);
10858 var EventPluginRegistry = __webpack_require__(132);
10859 var ReactBrowserEventEmitter = __webpack_require__(195);
10860 var ReactDOMButton = __webpack_require__(198);
10861 var ReactDOMComponentFlags = __webpack_require__(126);
10862 var ReactDOMComponentTree = __webpack_require__(124);
10863 var ReactDOMInput = __webpack_require__(200);
10864 var ReactDOMOption = __webpack_require__(202);
10865 var ReactDOMSelect = __webpack_require__(203);
10866 var ReactDOMTextarea = __webpack_require__(204);
10867 var ReactInstrumentation = __webpack_require__(150);
10868 var ReactMultiChild = __webpack_require__(205);
10869 var ReactServerRenderingTransaction = __webpack_require__(217);
10870
10871 var emptyFunction = __webpack_require__(99);
10872 var escapeTextContentForBrowser = __webpack_require__(175);
10873 var invariant = __webpack_require__(95);
10874 var isEventSupported = __webpack_require__(159);
10875 var keyOf = __webpack_require__(112);
10876 var shallowEqual = __webpack_require__(212);
10877 var validateDOMNesting = __webpack_require__(220);
10878 var warning = __webpack_require__(98);
10879
10880 var Flags = ReactDOMComponentFlags;
10881 var deleteListener = EventPluginHub.deleteListener;
10882 var getNode = ReactDOMComponentTree.getNodeFromInstance;
10883 var listenTo = ReactBrowserEventEmitter.listenTo;
10884 var registrationNameModules = EventPluginRegistry.registrationNameModules;
10885
10886 // For quickly matching children type, to test if can be treated as content.
10887 var CONTENT_TYPES = { 'string': true, 'number': true };
10888
10889 var STYLE = keyOf({ style: null });
10890 var HTML = keyOf({ __html: null });
10891 var RESERVED_PROPS = {
10892 children: null,
10893 dangerouslySetInnerHTML: null,
10894 suppressContentEditableWarning: null
10895 };
10896
10897 // Node type for document fragments (Node.DOCUMENT_FRAGMENT_NODE).
10898 var DOC_FRAGMENT_TYPE = 11;
10899
10900 function getDeclarationErrorAddendum(internalInstance) {
10901 if (internalInstance) {
10902 var owner = internalInstance._currentElement._owner || null;
10903 if (owner) {
10904 var name = owner.getName();
10905 if (name) {
10906 return ' This DOM node was rendered by `' + name + '`.';
10907 }
10908 }
10909 }
10910 return '';
10911 }
10912
10913 function friendlyStringify(obj) {
10914 if (typeof obj === 'object') {
10915 if (Array.isArray(obj)) {
10916 return '[' + obj.map(friendlyStringify).join(', ') + ']';
10917 } else {
10918 var pairs = [];
10919 for (var key in obj) {
10920 if (Object.prototype.hasOwnProperty.call(obj, key)) {
10921 var keyEscaped = /^[a-z$_][\w$_]*$/i.test(key) ? key : JSON.stringify(key);
10922 pairs.push(keyEscaped + ': ' + friendlyStringify(obj[key]));
10923 }
10924 }
10925 return '{' + pairs.join(', ') + '}';
10926 }
10927 } else if (typeof obj === 'string') {
10928 return JSON.stringify(obj);
10929 } else if (typeof obj === 'function') {
10930 return '[function object]';
10931 }
10932 // Differs from JSON.stringify in that undefined because undefined and that
10933 // inf and nan don't become null
10934 return String(obj);
10935 }
10936
10937 var styleMutationWarning = {};
10938
10939 function checkAndWarnForMutatedStyle(style1, style2, component) {
10940 if (style1 == null || style2 == null) {
10941 return;
10942 }
10943 if (shallowEqual(style1, style2)) {
10944 return;
10945 }
10946
10947 var componentName = component._tag;
10948 var owner = component._currentElement._owner;
10949 var ownerName;
10950 if (owner) {
10951 ownerName = owner.getName();
10952 }
10953
10954 var hash = ownerName + '|' + componentName;
10955
10956 if (styleMutationWarning.hasOwnProperty(hash)) {
10957 return;
10958 }
10959
10960 styleMutationWarning[hash] = true;
10961
10962 (undefined) !== '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;
10963 }
10964
10965 /**
10966 * @param {object} component
10967 * @param {?object} props
10968 */
10969 function assertValidProps(component, props) {
10970 if (!props) {
10971 return;
10972 }
10973 // Note the use of `==` which checks for null or undefined.
10974 if (voidElementTags[component._tag]) {
10975 !(props.children == null && props.dangerouslySetInnerHTML == null) ? (undefined) !== '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;
10976 }
10977 if (props.dangerouslySetInnerHTML != null) {
10978 !(props.children == null) ? (undefined) !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : _prodInvariant('60') : void 0;
10979 !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? (undefined) !== '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;
10980 }
10981 if ((undefined) !== 'production') {
10982 (undefined) !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
10983 (undefined) !== '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;
10984 (undefined) !== '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;
10985 }
10986 !(props.style == null || typeof props.style === 'object') ? (undefined) !== '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;
10987 }
10988
10989 function enqueuePutListener(inst, registrationName, listener, transaction) {
10990 if (transaction instanceof ReactServerRenderingTransaction) {
10991 return;
10992 }
10993 if ((undefined) !== 'production') {
10994 // IE8 has no API for event capturing and the `onScroll` event doesn't
10995 // bubble.
10996 (undefined) !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
10997 }
10998 var containerInfo = inst._hostContainerInfo;
10999 var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
11000 var doc = isDocumentFragment ? containerInfo._node : containerInfo._ownerDocument;
11001 listenTo(registrationName, doc);
11002 transaction.getReactMountReady().enqueue(putListener, {
11003 inst: inst,
11004 registrationName: registrationName,
11005 listener: listener
11006 });
11007 }
11008
11009 function putListener() {
11010 var listenerToPut = this;
11011 EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
11012 }
11013
11014 function inputPostMount() {
11015 var inst = this;
11016 ReactDOMInput.postMountWrapper(inst);
11017 }
11018
11019 function textareaPostMount() {
11020 var inst = this;
11021 ReactDOMTextarea.postMountWrapper(inst);
11022 }
11023
11024 function optionPostMount() {
11025 var inst = this;
11026 ReactDOMOption.postMountWrapper(inst);
11027 }
11028
11029 var setAndValidateContentChildDev = emptyFunction;
11030 if ((undefined) !== 'production') {
11031 setAndValidateContentChildDev = function (content) {
11032 var hasExistingContent = this._contentDebugID != null;
11033 var debugID = this._debugID;
11034 // This ID represents the inlined child that has no backing instance:
11035 var contentDebugID = -debugID;
11036
11037 if (content == null) {
11038 if (hasExistingContent) {
11039 ReactInstrumentation.debugTool.onUnmountComponent(this._contentDebugID);
11040 }
11041 this._contentDebugID = null;
11042 return;
11043 }
11044
11045 validateDOMNesting(null, String(content), this, this._ancestorInfo);
11046 this._contentDebugID = contentDebugID;
11047 if (hasExistingContent) {
11048 ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
11049 ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID);
11050 } else {
11051 ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID);
11052 ReactInstrumentation.debugTool.onMountComponent(contentDebugID);
11053 ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]);
11054 }
11055 };
11056 }
11057
11058 // There are so many media events, it makes sense to just
11059 // maintain a list rather than create a `trapBubbledEvent` for each
11060 var mediaEvents = {
11061 topAbort: 'abort',
11062 topCanPlay: 'canplay',
11063 topCanPlayThrough: 'canplaythrough',
11064 topDurationChange: 'durationchange',
11065 topEmptied: 'emptied',
11066 topEncrypted: 'encrypted',
11067 topEnded: 'ended',
11068 topError: 'error',
11069 topLoadedData: 'loadeddata',
11070 topLoadedMetadata: 'loadedmetadata',
11071 topLoadStart: 'loadstart',
11072 topPause: 'pause',
11073 topPlay: 'play',
11074 topPlaying: 'playing',
11075 topProgress: 'progress',
11076 topRateChange: 'ratechange',
11077 topSeeked: 'seeked',
11078 topSeeking: 'seeking',
11079 topStalled: 'stalled',
11080 topSuspend: 'suspend',
11081 topTimeUpdate: 'timeupdate',
11082 topVolumeChange: 'volumechange',
11083 topWaiting: 'waiting'
11084 };
11085
11086 function trapBubbledEventsLocal() {
11087 var inst = this;
11088 // If a component renders to null or if another component fatals and causes
11089 // the state of the tree to be corrupted, `node` here can be null.
11090 !inst._rootNodeID ? (undefined) !== 'production' ? invariant(false, 'Must be mounted to trap events') : _prodInvariant('63') : void 0;
11091 var node = getNode(inst);
11092 !node ? (undefined) !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : _prodInvariant('64') : void 0;
11093
11094 switch (inst._tag) {
11095 case 'iframe':
11096 case 'object':
11097 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
11098 break;
11099 case 'video':
11100 case 'audio':
11101
11102 inst._wrapperState.listeners = [];
11103 // Create listener for each media event
11104 for (var event in mediaEvents) {
11105 if (mediaEvents.hasOwnProperty(event)) {
11106 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
11107 }
11108 }
11109 break;
11110 case 'source':
11111 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node)];
11112 break;
11113 case 'img':
11114 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
11115 break;
11116 case 'form':
11117 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
11118 break;
11119 case 'input':
11120 case 'select':
11121 case 'textarea':
11122 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topInvalid, 'invalid', node)];
11123 break;
11124 }
11125 }
11126
11127 function postUpdateSelectWrapper() {
11128 ReactDOMSelect.postUpdateWrapper(this);
11129 }
11130
11131 // For HTML, certain tags should omit their close tag. We keep a whitelist for
11132 // those special-case tags.
11133
11134 var omittedCloseTags = {
11135 'area': true,
11136 'base': true,
11137 'br': true,
11138 'col': true,
11139 'embed': true,
11140 'hr': true,
11141 'img': true,
11142 'input': true,
11143 'keygen': true,
11144 'link': true,
11145 'meta': true,
11146 'param': true,
11147 'source': true,
11148 'track': true,
11149 'wbr': true
11150 };
11151
11152 // NOTE: menuitem's close tag should be omitted, but that causes problems.
11153 var newlineEatingTags = {
11154 'listing': true,
11155 'pre': true,
11156 'textarea': true
11157 };
11158
11159 // For HTML, certain tags cannot have children. This has the same purpose as
11160 // `omittedCloseTags` except that `menuitem` should still have its closing tag.
11161
11162 var voidElementTags = _assign({
11163 'menuitem': true
11164 }, omittedCloseTags);
11165
11166 // We accept any tag to be rendered but since this gets injected into arbitrary
11167 // HTML, we want to make sure that it's a safe tag.
11168 // http://www.w3.org/TR/REC-xml/#NT-Name
11169
11170 var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
11171 var validatedTagCache = {};
11172 var hasOwnProperty = {}.hasOwnProperty;
11173
11174 function validateDangerousTag(tag) {
11175 if (!hasOwnProperty.call(validatedTagCache, tag)) {
11176 !VALID_TAG_REGEX.test(tag) ? (undefined) !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : _prodInvariant('65', tag) : void 0;
11177 validatedTagCache[tag] = true;
11178 }
11179 }
11180
11181 function isCustomComponent(tagName, props) {
11182 return tagName.indexOf('-') >= 0 || props.is != null;
11183 }
11184
11185 var globalIdCounter = 1;
11186
11187 /**
11188 * Creates a new React class that is idempotent and capable of containing other
11189 * React components. It accepts event listeners and DOM properties that are
11190 * valid according to `DOMProperty`.
11191 *
11192 * - Event listeners: `onClick`, `onMouseDown`, etc.
11193 * - DOM properties: `className`, `name`, `title`, etc.
11194 *
11195 * The `style` property functions differently from the DOM API. It accepts an
11196 * object mapping of style properties to values.
11197 *
11198 * @constructor ReactDOMComponent
11199 * @extends ReactMultiChild
11200 */
11201 function ReactDOMComponent(element) {
11202 var tag = element.type;
11203 validateDangerousTag(tag);
11204 this._currentElement = element;
11205 this._tag = tag.toLowerCase();
11206 this._namespaceURI = null;
11207 this._renderedChildren = null;
11208 this._previousStyle = null;
11209 this._previousStyleCopy = null;
11210 this._hostNode = null;
11211 this._hostParent = null;
11212 this._rootNodeID = 0;
11213 this._domID = 0;
11214 this._hostContainerInfo = null;
11215 this._wrapperState = null;
11216 this._topLevelWrapper = null;
11217 this._flags = 0;
11218 if ((undefined) !== 'production') {
11219 this._ancestorInfo = null;
11220 setAndValidateContentChildDev.call(this, null);
11221 }
11222 }
11223
11224 ReactDOMComponent.displayName = 'ReactDOMComponent';
11225
11226 ReactDOMComponent.Mixin = {
11227
11228 /**
11229 * Generates root tag markup then recurses. This method has side effects and
11230 * is not idempotent.
11231 *
11232 * @internal
11233 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11234 * @param {?ReactDOMComponent} the parent component instance
11235 * @param {?object} info about the host container
11236 * @param {object} context
11237 * @return {string} The computed markup.
11238 */
11239 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
11240 this._rootNodeID = globalIdCounter++;
11241 this._domID = hostContainerInfo._idCounter++;
11242 this._hostParent = hostParent;
11243 this._hostContainerInfo = hostContainerInfo;
11244
11245 var props = this._currentElement.props;
11246
11247 switch (this._tag) {
11248 case 'audio':
11249 case 'form':
11250 case 'iframe':
11251 case 'img':
11252 case 'link':
11253 case 'object':
11254 case 'source':
11255 case 'video':
11256 this._wrapperState = {
11257 listeners: null
11258 };
11259 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
11260 break;
11261 case 'button':
11262 props = ReactDOMButton.getHostProps(this, props, hostParent);
11263 break;
11264 case 'input':
11265 ReactDOMInput.mountWrapper(this, props, hostParent);
11266 props = ReactDOMInput.getHostProps(this, props);
11267 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
11268 break;
11269 case 'option':
11270 ReactDOMOption.mountWrapper(this, props, hostParent);
11271 props = ReactDOMOption.getHostProps(this, props);
11272 break;
11273 case 'select':
11274 ReactDOMSelect.mountWrapper(this, props, hostParent);
11275 props = ReactDOMSelect.getHostProps(this, props);
11276 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
11277 break;
11278 case 'textarea':
11279 ReactDOMTextarea.mountWrapper(this, props, hostParent);
11280 props = ReactDOMTextarea.getHostProps(this, props);
11281 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
11282 break;
11283 }
11284
11285 assertValidProps(this, props);
11286
11287 // We create tags in the namespace of their parent container, except HTML
11288 // tags get no namespace.
11289 var namespaceURI;
11290 var parentTag;
11291 if (hostParent != null) {
11292 namespaceURI = hostParent._namespaceURI;
11293 parentTag = hostParent._tag;
11294 } else if (hostContainerInfo._tag) {
11295 namespaceURI = hostContainerInfo._namespaceURI;
11296 parentTag = hostContainerInfo._tag;
11297 }
11298 if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
11299 namespaceURI = DOMNamespaces.html;
11300 }
11301 if (namespaceURI === DOMNamespaces.html) {
11302 if (this._tag === 'svg') {
11303 namespaceURI = DOMNamespaces.svg;
11304 } else if (this._tag === 'math') {
11305 namespaceURI = DOMNamespaces.mathml;
11306 }
11307 }
11308 this._namespaceURI = namespaceURI;
11309
11310 if ((undefined) !== 'production') {
11311 var parentInfo;
11312 if (hostParent != null) {
11313 parentInfo = hostParent._ancestorInfo;
11314 } else if (hostContainerInfo._tag) {
11315 parentInfo = hostContainerInfo._ancestorInfo;
11316 }
11317 if (parentInfo) {
11318 // parentInfo should always be present except for the top-level
11319 // component when server rendering
11320 validateDOMNesting(this._tag, null, this, parentInfo);
11321 }
11322 this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
11323 }
11324
11325 var mountImage;
11326 if (transaction.useCreateElement) {
11327 var ownerDocument = hostContainerInfo._ownerDocument;
11328 var el;
11329 if (namespaceURI === DOMNamespaces.html) {
11330 if (this._tag === 'script') {
11331 // Create the script via .innerHTML so its "parser-inserted" flag is
11332 // set to true and it does not execute
11333 var div = ownerDocument.createElement('div');
11334 var type = this._currentElement.type;
11335 div.innerHTML = '<' + type + '></' + type + '>';
11336 el = div.removeChild(div.firstChild);
11337 } else if (props.is) {
11338 el = ownerDocument.createElement(this._currentElement.type, props.is);
11339 } else {
11340 // Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
11341 // See discussion in https://github.com/facebook/react/pull/6896
11342 // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
11343 el = ownerDocument.createElement(this._currentElement.type);
11344 }
11345 } else {
11346 el = ownerDocument.createElementNS(namespaceURI, this._currentElement.type);
11347 }
11348 ReactDOMComponentTree.precacheNode(this, el);
11349 this._flags |= Flags.hasCachedChildNodes;
11350 if (!this._hostParent) {
11351 DOMPropertyOperations.setAttributeForRoot(el);
11352 }
11353 this._updateDOMProperties(null, props, transaction);
11354 var lazyTree = DOMLazyTree(el);
11355 this._createInitialChildren(transaction, props, context, lazyTree);
11356 mountImage = lazyTree;
11357 } else {
11358 var tagOpen = this._createOpenTagMarkupAndPutListeners(transaction, props);
11359 var tagContent = this._createContentMarkup(transaction, props, context);
11360 if (!tagContent && omittedCloseTags[this._tag]) {
11361 mountImage = tagOpen + '/>';
11362 } else {
11363 mountImage = tagOpen + '>' + tagContent + '</' + this._currentElement.type + '>';
11364 }
11365 }
11366
11367 switch (this._tag) {
11368 case 'input':
11369 transaction.getReactMountReady().enqueue(inputPostMount, this);
11370 if (props.autoFocus) {
11371 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
11372 }
11373 break;
11374 case 'textarea':
11375 transaction.getReactMountReady().enqueue(textareaPostMount, this);
11376 if (props.autoFocus) {
11377 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
11378 }
11379 break;
11380 case 'select':
11381 if (props.autoFocus) {
11382 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
11383 }
11384 break;
11385 case 'button':
11386 if (props.autoFocus) {
11387 transaction.getReactMountReady().enqueue(AutoFocusUtils.focusDOMComponent, this);
11388 }
11389 break;
11390 case 'option':
11391 transaction.getReactMountReady().enqueue(optionPostMount, this);
11392 break;
11393 }
11394
11395 return mountImage;
11396 },
11397
11398 /**
11399 * Creates markup for the open tag and all attributes.
11400 *
11401 * This method has side effects because events get registered.
11402 *
11403 * Iterating over object properties is faster than iterating over arrays.
11404 * @see http://jsperf.com/obj-vs-arr-iteration
11405 *
11406 * @private
11407 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11408 * @param {object} props
11409 * @return {string} Markup of opening tag.
11410 */
11411 _createOpenTagMarkupAndPutListeners: function (transaction, props) {
11412 var ret = '<' + this._currentElement.type;
11413
11414 for (var propKey in props) {
11415 if (!props.hasOwnProperty(propKey)) {
11416 continue;
11417 }
11418 var propValue = props[propKey];
11419 if (propValue == null) {
11420 continue;
11421 }
11422 if (registrationNameModules.hasOwnProperty(propKey)) {
11423 if (propValue) {
11424 enqueuePutListener(this, propKey, propValue, transaction);
11425 }
11426 } else {
11427 if (propKey === STYLE) {
11428 if (propValue) {
11429 if ((undefined) !== 'production') {
11430 // See `_updateDOMProperties`. style block
11431 this._previousStyle = propValue;
11432 }
11433 propValue = this._previousStyleCopy = _assign({}, props.style);
11434 }
11435 propValue = CSSPropertyOperations.createMarkupForStyles(propValue, this);
11436 }
11437 var markup = null;
11438 if (this._tag != null && isCustomComponent(this._tag, props)) {
11439 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
11440 markup = DOMPropertyOperations.createMarkupForCustomAttribute(propKey, propValue);
11441 }
11442 } else {
11443 markup = DOMPropertyOperations.createMarkupForProperty(propKey, propValue);
11444 }
11445 if (markup) {
11446 ret += ' ' + markup;
11447 }
11448 }
11449 }
11450
11451 // For static pages, no need to put React ID and checksum. Saves lots of
11452 // bytes.
11453 if (transaction.renderToStaticMarkup) {
11454 return ret;
11455 }
11456
11457 if (!this._hostParent) {
11458 ret += ' ' + DOMPropertyOperations.createMarkupForRoot();
11459 }
11460 ret += ' ' + DOMPropertyOperations.createMarkupForID(this._domID);
11461 return ret;
11462 },
11463
11464 /**
11465 * Creates markup for the content between the tags.
11466 *
11467 * @private
11468 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11469 * @param {object} props
11470 * @param {object} context
11471 * @return {string} Content markup.
11472 */
11473 _createContentMarkup: function (transaction, props, context) {
11474 var ret = '';
11475
11476 // Intentional use of != to avoid catching zero/false.
11477 var innerHTML = props.dangerouslySetInnerHTML;
11478 if (innerHTML != null) {
11479 if (innerHTML.__html != null) {
11480 ret = innerHTML.__html;
11481 }
11482 } else {
11483 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11484 var childrenToUse = contentToUse != null ? null : props.children;
11485 if (contentToUse != null) {
11486 // TODO: Validate that text is allowed as a child of this node
11487 ret = escapeTextContentForBrowser(contentToUse);
11488 if ((undefined) !== 'production') {
11489 setAndValidateContentChildDev.call(this, contentToUse);
11490 }
11491 } else if (childrenToUse != null) {
11492 var mountImages = this.mountChildren(childrenToUse, transaction, context);
11493 ret = mountImages.join('');
11494 }
11495 }
11496 if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
11497 // text/html ignores the first character in these tags if it's a newline
11498 // Prefer to break application/xml over text/html (for now) by adding
11499 // a newline specifically to get eaten by the parser. (Alternately for
11500 // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
11501 // \r is normalized out by HTMLTextAreaElement#value.)
11502 // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
11503 // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
11504 // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
11505 // See: Parsing of "textarea" "listing" and "pre" elements
11506 // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
11507 return '\n' + ret;
11508 } else {
11509 return ret;
11510 }
11511 },
11512
11513 _createInitialChildren: function (transaction, props, context, lazyTree) {
11514 // Intentional use of != to avoid catching zero/false.
11515 var innerHTML = props.dangerouslySetInnerHTML;
11516 if (innerHTML != null) {
11517 if (innerHTML.__html != null) {
11518 DOMLazyTree.queueHTML(lazyTree, innerHTML.__html);
11519 }
11520 } else {
11521 var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
11522 var childrenToUse = contentToUse != null ? null : props.children;
11523 if (contentToUse != null) {
11524 // TODO: Validate that text is allowed as a child of this node
11525 if ((undefined) !== 'production') {
11526 setAndValidateContentChildDev.call(this, contentToUse);
11527 }
11528 DOMLazyTree.queueText(lazyTree, contentToUse);
11529 } else if (childrenToUse != null) {
11530 var mountImages = this.mountChildren(childrenToUse, transaction, context);
11531 for (var i = 0; i < mountImages.length; i++) {
11532 DOMLazyTree.queueChild(lazyTree, mountImages[i]);
11533 }
11534 }
11535 }
11536 },
11537
11538 /**
11539 * Receives a next element and updates the component.
11540 *
11541 * @internal
11542 * @param {ReactElement} nextElement
11543 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
11544 * @param {object} context
11545 */
11546 receiveComponent: function (nextElement, transaction, context) {
11547 var prevElement = this._currentElement;
11548 this._currentElement = nextElement;
11549 this.updateComponent(transaction, prevElement, nextElement, context);
11550 },
11551
11552 /**
11553 * Updates a DOM component after it has already been allocated and
11554 * attached to the DOM. Reconciles the root DOM node, then recurses.
11555 *
11556 * @param {ReactReconcileTransaction} transaction
11557 * @param {ReactElement} prevElement
11558 * @param {ReactElement} nextElement
11559 * @internal
11560 * @overridable
11561 */
11562 updateComponent: function (transaction, prevElement, nextElement, context) {
11563 var lastProps = prevElement.props;
11564 var nextProps = this._currentElement.props;
11565
11566 switch (this._tag) {
11567 case 'button':
11568 lastProps = ReactDOMButton.getHostProps(this, lastProps);
11569 nextProps = ReactDOMButton.getHostProps(this, nextProps);
11570 break;
11571 case 'input':
11572 lastProps = ReactDOMInput.getHostProps(this, lastProps);
11573 nextProps = ReactDOMInput.getHostProps(this, nextProps);
11574 break;
11575 case 'option':
11576 lastProps = ReactDOMOption.getHostProps(this, lastProps);
11577 nextProps = ReactDOMOption.getHostProps(this, nextProps);
11578 break;
11579 case 'select':
11580 lastProps = ReactDOMSelect.getHostProps(this, lastProps);
11581 nextProps = ReactDOMSelect.getHostProps(this, nextProps);
11582 break;
11583 case 'textarea':
11584 lastProps = ReactDOMTextarea.getHostProps(this, lastProps);
11585 nextProps = ReactDOMTextarea.getHostProps(this, nextProps);
11586 break;
11587 }
11588
11589 assertValidProps(this, nextProps);
11590 this._updateDOMProperties(lastProps, nextProps, transaction);
11591 this._updateDOMChildren(lastProps, nextProps, transaction, context);
11592
11593 switch (this._tag) {
11594 case 'input':
11595 // Update the wrapper around inputs *after* updating props. This has to
11596 // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
11597 // raise warnings and prevent the new value from being assigned.
11598 ReactDOMInput.updateWrapper(this);
11599 break;
11600 case 'textarea':
11601 ReactDOMTextarea.updateWrapper(this);
11602 break;
11603 case 'select':
11604 // <select> value update needs to occur after <option> children
11605 // reconciliation
11606 transaction.getReactMountReady().enqueue(postUpdateSelectWrapper, this);
11607 break;
11608 }
11609 },
11610
11611 /**
11612 * Reconciles the properties by detecting differences in property values and
11613 * updating the DOM as necessary. This function is probably the single most
11614 * critical path for performance optimization.
11615 *
11616 * TODO: Benchmark whether checking for changed values in memory actually
11617 * improves performance (especially statically positioned elements).
11618 * TODO: Benchmark the effects of putting this at the top since 99% of props
11619 * do not change for a given reconciliation.
11620 * TODO: Benchmark areas that can be improved with caching.
11621 *
11622 * @private
11623 * @param {object} lastProps
11624 * @param {object} nextProps
11625 * @param {?DOMElement} node
11626 */
11627 _updateDOMProperties: function (lastProps, nextProps, transaction) {
11628 var propKey;
11629 var styleName;
11630 var styleUpdates;
11631 for (propKey in lastProps) {
11632 if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
11633 continue;
11634 }
11635 if (propKey === STYLE) {
11636 var lastStyle = this._previousStyleCopy;
11637 for (styleName in lastStyle) {
11638 if (lastStyle.hasOwnProperty(styleName)) {
11639 styleUpdates = styleUpdates || {};
11640 styleUpdates[styleName] = '';
11641 }
11642 }
11643 this._previousStyleCopy = null;
11644 } else if (registrationNameModules.hasOwnProperty(propKey)) {
11645 if (lastProps[propKey]) {
11646 // Only call deleteListener if there was a listener previously or
11647 // else willDeleteListener gets called when there wasn't actually a
11648 // listener (e.g., onClick={null})
11649 deleteListener(this, propKey);
11650 }
11651 } else if (isCustomComponent(this._tag, lastProps)) {
11652 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
11653 DOMPropertyOperations.deleteValueForAttribute(getNode(this), propKey);
11654 }
11655 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
11656 DOMPropertyOperations.deleteValueForProperty(getNode(this), propKey);
11657 }
11658 }
11659 for (propKey in nextProps) {
11660 var nextProp = nextProps[propKey];
11661 var lastProp = propKey === STYLE ? this._previousStyleCopy : lastProps != null ? lastProps[propKey] : undefined;
11662 if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
11663 continue;
11664 }
11665 if (propKey === STYLE) {
11666 if (nextProp) {
11667 if ((undefined) !== 'production') {
11668 checkAndWarnForMutatedStyle(this._previousStyleCopy, this._previousStyle, this);
11669 this._previousStyle = nextProp;
11670 }
11671 nextProp = this._previousStyleCopy = _assign({}, nextProp);
11672 } else {
11673 this._previousStyleCopy = null;
11674 }
11675 if (lastProp) {
11676 // Unset styles on `lastProp` but not on `nextProp`.
11677 for (styleName in lastProp) {
11678 if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
11679 styleUpdates = styleUpdates || {};
11680 styleUpdates[styleName] = '';
11681 }
11682 }
11683 // Update styles that changed since `lastProp`.
11684 for (styleName in nextProp) {
11685 if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
11686 styleUpdates = styleUpdates || {};
11687 styleUpdates[styleName] = nextProp[styleName];
11688 }
11689 }
11690 } else {
11691 // Relies on `updateStylesByID` not mutating `styleUpdates`.
11692 styleUpdates = nextProp;
11693 }
11694 } else if (registrationNameModules.hasOwnProperty(propKey)) {
11695 if (nextProp) {
11696 enqueuePutListener(this, propKey, nextProp, transaction);
11697 } else if (lastProp) {
11698 deleteListener(this, propKey);
11699 }
11700 } else if (isCustomComponent(this._tag, nextProps)) {
11701 if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
11702 DOMPropertyOperations.setValueForAttribute(getNode(this), propKey, nextProp);
11703 }
11704 } else if (DOMProperty.properties[propKey] || DOMProperty.isCustomAttribute(propKey)) {
11705 var node = getNode(this);
11706 // If we're updating to null or undefined, we should remove the property
11707 // from the DOM node instead of inadvertently setting to a string. This
11708 // brings us in line with the same behavior we have on initial render.
11709 if (nextProp != null) {
11710 DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
11711 } else {
11712 DOMPropertyOperations.deleteValueForProperty(node, propKey);
11713 }
11714 }
11715 }
11716 if (styleUpdates) {
11717 CSSPropertyOperations.setValueForStyles(getNode(this), styleUpdates, this);
11718 }
11719 },
11720
11721 /**
11722 * Reconciles the children with the various properties that affect the
11723 * children content.
11724 *
11725 * @param {object} lastProps
11726 * @param {object} nextProps
11727 * @param {ReactReconcileTransaction} transaction
11728 * @param {object} context
11729 */
11730 _updateDOMChildren: function (lastProps, nextProps, transaction, context) {
11731 var lastContent = CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null;
11732 var nextContent = CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null;
11733
11734 var lastHtml = lastProps.dangerouslySetInnerHTML && lastProps.dangerouslySetInnerHTML.__html;
11735 var nextHtml = nextProps.dangerouslySetInnerHTML && nextProps.dangerouslySetInnerHTML.__html;
11736
11737 // Note the use of `!=` which checks for null or undefined.
11738 var lastChildren = lastContent != null ? null : lastProps.children;
11739 var nextChildren = nextContent != null ? null : nextProps.children;
11740
11741 // If we're switching from children to content/html or vice versa, remove
11742 // the old content
11743 var lastHasContentOrHtml = lastContent != null || lastHtml != null;
11744 var nextHasContentOrHtml = nextContent != null || nextHtml != null;
11745 if (lastChildren != null && nextChildren == null) {
11746 this.updateChildren(null, transaction, context);
11747 } else if (lastHasContentOrHtml && !nextHasContentOrHtml) {
11748 this.updateTextContent('');
11749 if ((undefined) !== 'production') {
11750 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
11751 }
11752 }
11753
11754 if (nextContent != null) {
11755 if (lastContent !== nextContent) {
11756 this.updateTextContent('' + nextContent);
11757 if ((undefined) !== 'production') {
11758 setAndValidateContentChildDev.call(this, nextContent);
11759 }
11760 }
11761 } else if (nextHtml != null) {
11762 if (lastHtml !== nextHtml) {
11763 this.updateMarkup('' + nextHtml);
11764 }
11765 if ((undefined) !== 'production') {
11766 ReactInstrumentation.debugTool.onSetChildren(this._debugID, []);
11767 }
11768 } else if (nextChildren != null) {
11769 if ((undefined) !== 'production') {
11770 setAndValidateContentChildDev.call(this, null);
11771 }
11772
11773 this.updateChildren(nextChildren, transaction, context);
11774 }
11775 },
11776
11777 getHostNode: function () {
11778 return getNode(this);
11779 },
11780
11781 /**
11782 * Destroys all event registrations for this instance. Does not remove from
11783 * the DOM. That must be done by the parent.
11784 *
11785 * @internal
11786 */
11787 unmountComponent: function (safely) {
11788 switch (this._tag) {
11789 case 'audio':
11790 case 'form':
11791 case 'iframe':
11792 case 'img':
11793 case 'link':
11794 case 'object':
11795 case 'source':
11796 case 'video':
11797 var listeners = this._wrapperState.listeners;
11798 if (listeners) {
11799 for (var i = 0; i < listeners.length; i++) {
11800 listeners[i].remove();
11801 }
11802 }
11803 break;
11804 case 'html':
11805 case 'head':
11806 case 'body':
11807 /**
11808 * Components like <html> <head> and <body> can't be removed or added
11809 * easily in a cross-browser way, however it's valuable to be able to
11810 * take advantage of React's reconciliation for styling and <title>
11811 * management. So we just document it and throw in dangerous cases.
11812 */
11813 true ? (undefined) !== '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;
11814 break;
11815 }
11816
11817 this.unmountChildren(safely);
11818 ReactDOMComponentTree.uncacheNode(this);
11819 EventPluginHub.deleteAllListeners(this);
11820 this._rootNodeID = 0;
11821 this._domID = 0;
11822 this._wrapperState = null;
11823
11824 if ((undefined) !== 'production') {
11825 setAndValidateContentChildDev.call(this, null);
11826 }
11827 },
11828
11829 getPublicInstance: function () {
11830 return getNode(this);
11831 }
11832
11833 };
11834
11835 _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
11836
11837 module.exports = ReactDOMComponent;
11838
11839/***/ },
11840/* 183 */
11841/***/ function(module, exports, __webpack_require__) {
11842
11843 /**
11844 * Copyright 2013-present, Facebook, Inc.
11845 * All rights reserved.
11846 *
11847 * This source code is licensed under the BSD-style license found in the
11848 * LICENSE file in the root directory of this source tree. An additional grant
11849 * of patent rights can be found in the PATENTS file in the same directory.
11850 *
11851 * @providesModule AutoFocusUtils
11852 */
11853
11854 'use strict';
11855
11856 var ReactDOMComponentTree = __webpack_require__(124);
11857
11858 var focusNode = __webpack_require__(184);
11859
11860 var AutoFocusUtils = {
11861 focusDOMComponent: function () {
11862 focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
11863 }
11864 };
11865
11866 module.exports = AutoFocusUtils;
11867
11868/***/ },
11869/* 184 */
11870/***/ function(module, exports) {
11871
11872 /**
11873 * Copyright (c) 2013-present, Facebook, Inc.
11874 * All rights reserved.
11875 *
11876 * This source code is licensed under the BSD-style license found in the
11877 * LICENSE file in the root directory of this source tree. An additional grant
11878 * of patent rights can be found in the PATENTS file in the same directory.
11879 *
11880 */
11881
11882 'use strict';
11883
11884 /**
11885 * @param {DOMElement} node input/textarea to focus
11886 */
11887
11888 function focusNode(node) {
11889 // IE8 can throw "Can't move focus to the control because it is invisible,
11890 // not enabled, or of a type that does not accept the focus." for all kinds of
11891 // reasons that are too expensive and fragile to test.
11892 try {
11893 node.focus();
11894 } catch (e) {}
11895 }
11896
11897 module.exports = focusNode;
11898
11899/***/ },
11900/* 185 */
11901/***/ function(module, exports, __webpack_require__) {
11902
11903 /**
11904 * Copyright 2013-present, Facebook, Inc.
11905 * All rights reserved.
11906 *
11907 * This source code is licensed under the BSD-style license found in the
11908 * LICENSE file in the root directory of this source tree. An additional grant
11909 * of patent rights can be found in the PATENTS file in the same directory.
11910 *
11911 * @providesModule CSSPropertyOperations
11912 */
11913
11914 'use strict';
11915
11916 var CSSProperty = __webpack_require__(186);
11917 var ExecutionEnvironment = __webpack_require__(137);
11918 var ReactInstrumentation = __webpack_require__(150);
11919
11920 var camelizeStyleName = __webpack_require__(187);
11921 var dangerousStyleValue = __webpack_require__(189);
11922 var hyphenateStyleName = __webpack_require__(190);
11923 var memoizeStringOnly = __webpack_require__(192);
11924 var warning = __webpack_require__(98);
11925
11926 var processStyleName = memoizeStringOnly(function (styleName) {
11927 return hyphenateStyleName(styleName);
11928 });
11929
11930 var hasShorthandPropertyBug = false;
11931 var styleFloatAccessor = 'cssFloat';
11932 if (ExecutionEnvironment.canUseDOM) {
11933 var tempStyle = document.createElement('div').style;
11934 try {
11935 // IE8 throws "Invalid argument." if resetting shorthand style properties.
11936 tempStyle.font = '';
11937 } catch (e) {
11938 hasShorthandPropertyBug = true;
11939 }
11940 // IE8 only supports accessing cssFloat (standard) as styleFloat
11941 if (document.documentElement.style.cssFloat === undefined) {
11942 styleFloatAccessor = 'styleFloat';
11943 }
11944 }
11945
11946 if ((undefined) !== 'production') {
11947 // 'msTransform' is correct, but the other prefixes should be capitalized
11948 var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
11949
11950 // style values shouldn't contain a semicolon
11951 var badStyleValueWithSemicolonPattern = /;\s*$/;
11952
11953 var warnedStyleNames = {};
11954 var warnedStyleValues = {};
11955 var warnedForNaNValue = false;
11956
11957 var warnHyphenatedStyleName = function (name, owner) {
11958 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
11959 return;
11960 }
11961
11962 warnedStyleNames[name] = true;
11963 (undefined) !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
11964 };
11965
11966 var warnBadVendoredStyleName = function (name, owner) {
11967 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
11968 return;
11969 }
11970
11971 warnedStyleNames[name] = true;
11972 (undefined) !== '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;
11973 };
11974
11975 var warnStyleValueWithSemicolon = function (name, value, owner) {
11976 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
11977 return;
11978 }
11979
11980 warnedStyleValues[value] = true;
11981 (undefined) !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
11982 };
11983
11984 var warnStyleValueIsNaN = function (name, value, owner) {
11985 if (warnedForNaNValue) {
11986 return;
11987 }
11988
11989 warnedForNaNValue = true;
11990 (undefined) !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
11991 };
11992
11993 var checkRenderMessage = function (owner) {
11994 if (owner) {
11995 var name = owner.getName();
11996 if (name) {
11997 return ' Check the render method of `' + name + '`.';
11998 }
11999 }
12000 return '';
12001 };
12002
12003 /**
12004 * @param {string} name
12005 * @param {*} value
12006 * @param {ReactDOMComponent} component
12007 */
12008 var warnValidStyle = function (name, value, component) {
12009 var owner;
12010 if (component) {
12011 owner = component._currentElement._owner;
12012 }
12013 if (name.indexOf('-') > -1) {
12014 warnHyphenatedStyleName(name, owner);
12015 } else if (badVendoredStyleNamePattern.test(name)) {
12016 warnBadVendoredStyleName(name, owner);
12017 } else if (badStyleValueWithSemicolonPattern.test(value)) {
12018 warnStyleValueWithSemicolon(name, value, owner);
12019 }
12020
12021 if (typeof value === 'number' && isNaN(value)) {
12022 warnStyleValueIsNaN(name, value, owner);
12023 }
12024 };
12025 }
12026
12027 /**
12028 * Operations for dealing with CSS properties.
12029 */
12030 var CSSPropertyOperations = {
12031
12032 /**
12033 * Serializes a mapping of style properties for use as inline styles:
12034 *
12035 * > createMarkupForStyles({width: '200px', height: 0})
12036 * "width:200px;height:0;"
12037 *
12038 * Undefined values are ignored so that declarative programming is easier.
12039 * The result should be HTML-escaped before insertion into the DOM.
12040 *
12041 * @param {object} styles
12042 * @param {ReactDOMComponent} component
12043 * @return {?string}
12044 */
12045 createMarkupForStyles: function (styles, component) {
12046 var serialized = '';
12047 for (var styleName in styles) {
12048 if (!styles.hasOwnProperty(styleName)) {
12049 continue;
12050 }
12051 var styleValue = styles[styleName];
12052 if ((undefined) !== 'production') {
12053 warnValidStyle(styleName, styleValue, component);
12054 }
12055 if (styleValue != null) {
12056 serialized += processStyleName(styleName) + ':';
12057 serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
12058 }
12059 }
12060 return serialized || null;
12061 },
12062
12063 /**
12064 * Sets the value for multiple styles on a node. If a value is specified as
12065 * '' (empty string), the corresponding style property will be unset.
12066 *
12067 * @param {DOMElement} node
12068 * @param {object} styles
12069 * @param {ReactDOMComponent} component
12070 */
12071 setValueForStyles: function (node, styles, component) {
12072 if ((undefined) !== 'production') {
12073 ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles);
12074 }
12075
12076 var style = node.style;
12077 for (var styleName in styles) {
12078 if (!styles.hasOwnProperty(styleName)) {
12079 continue;
12080 }
12081 if ((undefined) !== 'production') {
12082 warnValidStyle(styleName, styles[styleName], component);
12083 }
12084 var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
12085 if (styleName === 'float' || styleName === 'cssFloat') {
12086 styleName = styleFloatAccessor;
12087 }
12088 if (styleValue) {
12089 style[styleName] = styleValue;
12090 } else {
12091 var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
12092 if (expansion) {
12093 // Shorthand property that IE8 won't like unsetting, so unset each
12094 // component to placate it
12095 for (var individualStyleName in expansion) {
12096 style[individualStyleName] = '';
12097 }
12098 } else {
12099 style[styleName] = '';
12100 }
12101 }
12102 }
12103 }
12104
12105 };
12106
12107 module.exports = CSSPropertyOperations;
12108
12109/***/ },
12110/* 186 */
12111/***/ function(module, exports) {
12112
12113 /**
12114 * Copyright 2013-present, Facebook, Inc.
12115 * All rights reserved.
12116 *
12117 * This source code is licensed under the BSD-style license found in the
12118 * LICENSE file in the root directory of this source tree. An additional grant
12119 * of patent rights can be found in the PATENTS file in the same directory.
12120 *
12121 * @providesModule CSSProperty
12122 */
12123
12124 'use strict';
12125
12126 /**
12127 * CSS properties which accept numbers but are not in units of "px".
12128 */
12129
12130 var isUnitlessNumber = {
12131 animationIterationCount: true,
12132 borderImageOutset: true,
12133 borderImageSlice: true,
12134 borderImageWidth: true,
12135 boxFlex: true,
12136 boxFlexGroup: true,
12137 boxOrdinalGroup: true,
12138 columnCount: true,
12139 flex: true,
12140 flexGrow: true,
12141 flexPositive: true,
12142 flexShrink: true,
12143 flexNegative: true,
12144 flexOrder: true,
12145 gridRow: true,
12146 gridColumn: true,
12147 fontWeight: true,
12148 lineClamp: true,
12149 lineHeight: true,
12150 opacity: true,
12151 order: true,
12152 orphans: true,
12153 tabSize: true,
12154 widows: true,
12155 zIndex: true,
12156 zoom: true,
12157
12158 // SVG-related properties
12159 fillOpacity: true,
12160 floodOpacity: true,
12161 stopOpacity: true,
12162 strokeDasharray: true,
12163 strokeDashoffset: true,
12164 strokeMiterlimit: true,
12165 strokeOpacity: true,
12166 strokeWidth: true
12167 };
12168
12169 /**
12170 * @param {string} prefix vendor-specific prefix, eg: Webkit
12171 * @param {string} key style name, eg: transitionDuration
12172 * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
12173 * WebkitTransitionDuration
12174 */
12175 function prefixKey(prefix, key) {
12176 return prefix + key.charAt(0).toUpperCase() + key.substring(1);
12177 }
12178
12179 /**
12180 * Support style names that may come passed in prefixed by adding permutations
12181 * of vendor prefixes.
12182 */
12183 var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
12184
12185 // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
12186 // infinite loop, because it iterates over the newly added props too.
12187 Object.keys(isUnitlessNumber).forEach(function (prop) {
12188 prefixes.forEach(function (prefix) {
12189 isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
12190 });
12191 });
12192
12193 /**
12194 * Most style properties can be unset by doing .style[prop] = '' but IE8
12195 * doesn't like doing that with shorthand properties so for the properties that
12196 * IE8 breaks on, which are listed here, we instead unset each of the
12197 * individual properties. See http://bugs.jquery.com/ticket/12385.
12198 * The 4-value 'clock' properties like margin, padding, border-width seem to
12199 * behave without any problems. Curiously, list-style works too without any
12200 * special prodding.
12201 */
12202 var shorthandPropertyExpansions = {
12203 background: {
12204 backgroundAttachment: true,
12205 backgroundColor: true,
12206 backgroundImage: true,
12207 backgroundPositionX: true,
12208 backgroundPositionY: true,
12209 backgroundRepeat: true
12210 },
12211 backgroundPosition: {
12212 backgroundPositionX: true,
12213 backgroundPositionY: true
12214 },
12215 border: {
12216 borderWidth: true,
12217 borderStyle: true,
12218 borderColor: true
12219 },
12220 borderBottom: {
12221 borderBottomWidth: true,
12222 borderBottomStyle: true,
12223 borderBottomColor: true
12224 },
12225 borderLeft: {
12226 borderLeftWidth: true,
12227 borderLeftStyle: true,
12228 borderLeftColor: true
12229 },
12230 borderRight: {
12231 borderRightWidth: true,
12232 borderRightStyle: true,
12233 borderRightColor: true
12234 },
12235 borderTop: {
12236 borderTopWidth: true,
12237 borderTopStyle: true,
12238 borderTopColor: true
12239 },
12240 font: {
12241 fontStyle: true,
12242 fontVariant: true,
12243 fontWeight: true,
12244 fontSize: true,
12245 lineHeight: true,
12246 fontFamily: true
12247 },
12248 outline: {
12249 outlineWidth: true,
12250 outlineStyle: true,
12251 outlineColor: true
12252 }
12253 };
12254
12255 var CSSProperty = {
12256 isUnitlessNumber: isUnitlessNumber,
12257 shorthandPropertyExpansions: shorthandPropertyExpansions
12258 };
12259
12260 module.exports = CSSProperty;
12261
12262/***/ },
12263/* 187 */
12264/***/ function(module, exports, __webpack_require__) {
12265
12266 /**
12267 * Copyright (c) 2013-present, Facebook, Inc.
12268 * All rights reserved.
12269 *
12270 * This source code is licensed under the BSD-style license found in the
12271 * LICENSE file in the root directory of this source tree. An additional grant
12272 * of patent rights can be found in the PATENTS file in the same directory.
12273 *
12274 * @typechecks
12275 */
12276
12277 'use strict';
12278
12279 var camelize = __webpack_require__(188);
12280
12281 var msPattern = /^-ms-/;
12282
12283 /**
12284 * Camelcases a hyphenated CSS property name, for example:
12285 *
12286 * > camelizeStyleName('background-color')
12287 * < "backgroundColor"
12288 * > camelizeStyleName('-moz-transition')
12289 * < "MozTransition"
12290 * > camelizeStyleName('-ms-transition')
12291 * < "msTransition"
12292 *
12293 * As Andi Smith suggests
12294 * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
12295 * is converted to lowercase `ms`.
12296 *
12297 * @param {string} string
12298 * @return {string}
12299 */
12300 function camelizeStyleName(string) {
12301 return camelize(string.replace(msPattern, 'ms-'));
12302 }
12303
12304 module.exports = camelizeStyleName;
12305
12306/***/ },
12307/* 188 */
12308/***/ function(module, exports) {
12309
12310 "use strict";
12311
12312 /**
12313 * Copyright (c) 2013-present, Facebook, Inc.
12314 * All rights reserved.
12315 *
12316 * This source code is licensed under the BSD-style license found in the
12317 * LICENSE file in the root directory of this source tree. An additional grant
12318 * of patent rights can be found in the PATENTS file in the same directory.
12319 *
12320 * @typechecks
12321 */
12322
12323 var _hyphenPattern = /-(.)/g;
12324
12325 /**
12326 * Camelcases a hyphenated string, for example:
12327 *
12328 * > camelize('background-color')
12329 * < "backgroundColor"
12330 *
12331 * @param {string} string
12332 * @return {string}
12333 */
12334 function camelize(string) {
12335 return string.replace(_hyphenPattern, function (_, character) {
12336 return character.toUpperCase();
12337 });
12338 }
12339
12340 module.exports = camelize;
12341
12342/***/ },
12343/* 189 */
12344/***/ function(module, exports, __webpack_require__) {
12345
12346 /**
12347 * Copyright 2013-present, Facebook, Inc.
12348 * All rights reserved.
12349 *
12350 * This source code is licensed under the BSD-style license found in the
12351 * LICENSE file in the root directory of this source tree. An additional grant
12352 * of patent rights can be found in the PATENTS file in the same directory.
12353 *
12354 * @providesModule dangerousStyleValue
12355 */
12356
12357 'use strict';
12358
12359 var CSSProperty = __webpack_require__(186);
12360 var warning = __webpack_require__(98);
12361
12362 var isUnitlessNumber = CSSProperty.isUnitlessNumber;
12363 var styleWarnings = {};
12364
12365 /**
12366 * Convert a value into the proper css writable value. The style name `name`
12367 * should be logical (no hyphens), as specified
12368 * in `CSSProperty.isUnitlessNumber`.
12369 *
12370 * @param {string} name CSS property name such as `topMargin`.
12371 * @param {*} value CSS property value such as `10px`.
12372 * @param {ReactDOMComponent} component
12373 * @return {string} Normalized style value with dimensions applied.
12374 */
12375 function dangerousStyleValue(name, value, component) {
12376 // Note that we've removed escapeTextForBrowser() calls here since the
12377 // whole string will be escaped when the attribute is injected into
12378 // the markup. If you provide unsafe user data here they can inject
12379 // arbitrary CSS which may be problematic (I couldn't repro this):
12380 // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
12381 // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
12382 // This is not an XSS hole but instead a potential CSS injection issue
12383 // which has lead to a greater discussion about how we're going to
12384 // trust URLs moving forward. See #2115901
12385
12386 var isEmpty = value == null || typeof value === 'boolean' || value === '';
12387 if (isEmpty) {
12388 return '';
12389 }
12390
12391 var isNonNumeric = isNaN(value);
12392 if (isNonNumeric || value === 0 || isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) {
12393 return '' + value; // cast to string
12394 }
12395
12396 if (typeof value === 'string') {
12397 if ((undefined) !== 'production') {
12398 // Allow '0' to pass through without warning. 0 is already special and
12399 // doesn't require units, so we don't need to warn about it.
12400 if (component && value !== '0') {
12401 var owner = component._currentElement._owner;
12402 var ownerName = owner ? owner.getName() : null;
12403 if (ownerName && !styleWarnings[ownerName]) {
12404 styleWarnings[ownerName] = {};
12405 }
12406 var warned = false;
12407 if (ownerName) {
12408 var warnings = styleWarnings[ownerName];
12409 warned = warnings[name];
12410 if (!warned) {
12411 warnings[name] = true;
12412 }
12413 }
12414 if (!warned) {
12415 (undefined) !== '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;
12416 }
12417 }
12418 }
12419 value = value.trim();
12420 }
12421 return value + 'px';
12422 }
12423
12424 module.exports = dangerousStyleValue;
12425
12426/***/ },
12427/* 190 */
12428/***/ function(module, exports, __webpack_require__) {
12429
12430 /**
12431 * Copyright (c) 2013-present, Facebook, Inc.
12432 * All rights reserved.
12433 *
12434 * This source code is licensed under the BSD-style license found in the
12435 * LICENSE file in the root directory of this source tree. An additional grant
12436 * of patent rights can be found in the PATENTS file in the same directory.
12437 *
12438 * @typechecks
12439 */
12440
12441 'use strict';
12442
12443 var hyphenate = __webpack_require__(191);
12444
12445 var msPattern = /^ms-/;
12446
12447 /**
12448 * Hyphenates a camelcased CSS property name, for example:
12449 *
12450 * > hyphenateStyleName('backgroundColor')
12451 * < "background-color"
12452 * > hyphenateStyleName('MozTransition')
12453 * < "-moz-transition"
12454 * > hyphenateStyleName('msTransition')
12455 * < "-ms-transition"
12456 *
12457 * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
12458 * is converted to `-ms-`.
12459 *
12460 * @param {string} string
12461 * @return {string}
12462 */
12463 function hyphenateStyleName(string) {
12464 return hyphenate(string).replace(msPattern, '-ms-');
12465 }
12466
12467 module.exports = hyphenateStyleName;
12468
12469/***/ },
12470/* 191 */
12471/***/ function(module, exports) {
12472
12473 'use strict';
12474
12475 /**
12476 * Copyright (c) 2013-present, Facebook, Inc.
12477 * All rights reserved.
12478 *
12479 * This source code is licensed under the BSD-style license found in the
12480 * LICENSE file in the root directory of this source tree. An additional grant
12481 * of patent rights can be found in the PATENTS file in the same directory.
12482 *
12483 * @typechecks
12484 */
12485
12486 var _uppercasePattern = /([A-Z])/g;
12487
12488 /**
12489 * Hyphenates a camelcased string, for example:
12490 *
12491 * > hyphenate('backgroundColor')
12492 * < "background-color"
12493 *
12494 * For CSS style names, use `hyphenateStyleName` instead which works properly
12495 * with all vendor prefixes, including `ms`.
12496 *
12497 * @param {string} string
12498 * @return {string}
12499 */
12500 function hyphenate(string) {
12501 return string.replace(_uppercasePattern, '-$1').toLowerCase();
12502 }
12503
12504 module.exports = hyphenate;
12505
12506/***/ },
12507/* 192 */
12508/***/ function(module, exports) {
12509
12510 /**
12511 * Copyright (c) 2013-present, Facebook, Inc.
12512 * All rights reserved.
12513 *
12514 * This source code is licensed under the BSD-style license found in the
12515 * LICENSE file in the root directory of this source tree. An additional grant
12516 * of patent rights can be found in the PATENTS file in the same directory.
12517 *
12518 *
12519 * @typechecks static-only
12520 */
12521
12522 'use strict';
12523
12524 /**
12525 * Memoizes the return value of a function that accepts one string argument.
12526 */
12527
12528 function memoizeStringOnly(callback) {
12529 var cache = {};
12530 return function (string) {
12531 if (!cache.hasOwnProperty(string)) {
12532 cache[string] = callback.call(this, string);
12533 }
12534 return cache[string];
12535 };
12536 }
12537
12538 module.exports = memoizeStringOnly;
12539
12540/***/ },
12541/* 193 */
12542/***/ function(module, exports, __webpack_require__) {
12543
12544 /**
12545 * Copyright 2013-present, Facebook, Inc.
12546 * All rights reserved.
12547 *
12548 * This source code is licensed under the BSD-style license found in the
12549 * LICENSE file in the root directory of this source tree. An additional grant
12550 * of patent rights can be found in the PATENTS file in the same directory.
12551 *
12552 * @providesModule DOMPropertyOperations
12553 */
12554
12555 'use strict';
12556
12557 var DOMProperty = __webpack_require__(125);
12558 var ReactDOMComponentTree = __webpack_require__(124);
12559 var ReactInstrumentation = __webpack_require__(150);
12560
12561 var quoteAttributeValueForBrowser = __webpack_require__(194);
12562 var warning = __webpack_require__(98);
12563
12564 var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
12565 var illegalAttributeNameCache = {};
12566 var validatedAttributeNameCache = {};
12567
12568 function isAttributeNameSafe(attributeName) {
12569 if (validatedAttributeNameCache.hasOwnProperty(attributeName)) {
12570 return true;
12571 }
12572 if (illegalAttributeNameCache.hasOwnProperty(attributeName)) {
12573 return false;
12574 }
12575 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
12576 validatedAttributeNameCache[attributeName] = true;
12577 return true;
12578 }
12579 illegalAttributeNameCache[attributeName] = true;
12580 (undefined) !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
12581 return false;
12582 }
12583
12584 function shouldIgnoreValue(propertyInfo, value) {
12585 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
12586 }
12587
12588 /**
12589 * Operations for dealing with DOM properties.
12590 */
12591 var DOMPropertyOperations = {
12592
12593 /**
12594 * Creates markup for the ID property.
12595 *
12596 * @param {string} id Unescaped ID.
12597 * @return {string} Markup string.
12598 */
12599 createMarkupForID: function (id) {
12600 return DOMProperty.ID_ATTRIBUTE_NAME + '=' + quoteAttributeValueForBrowser(id);
12601 },
12602
12603 setAttributeForID: function (node, id) {
12604 node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
12605 },
12606
12607 createMarkupForRoot: function () {
12608 return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
12609 },
12610
12611 setAttributeForRoot: function (node) {
12612 node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
12613 },
12614
12615 /**
12616 * Creates markup for a property.
12617 *
12618 * @param {string} name
12619 * @param {*} value
12620 * @return {?string} Markup string, or null if the property was invalid.
12621 */
12622 createMarkupForProperty: function (name, value) {
12623 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
12624 if (propertyInfo) {
12625 if (shouldIgnoreValue(propertyInfo, value)) {
12626 return '';
12627 }
12628 var attributeName = propertyInfo.attributeName;
12629 if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
12630 return attributeName + '=""';
12631 }
12632 return attributeName + '=' + quoteAttributeValueForBrowser(value);
12633 } else if (DOMProperty.isCustomAttribute(name)) {
12634 if (value == null) {
12635 return '';
12636 }
12637 return name + '=' + quoteAttributeValueForBrowser(value);
12638 }
12639 return null;
12640 },
12641
12642 /**
12643 * Creates markup for a custom property.
12644 *
12645 * @param {string} name
12646 * @param {*} value
12647 * @return {string} Markup string, or empty string if the property was invalid.
12648 */
12649 createMarkupForCustomAttribute: function (name, value) {
12650 if (!isAttributeNameSafe(name) || value == null) {
12651 return '';
12652 }
12653 return name + '=' + quoteAttributeValueForBrowser(value);
12654 },
12655
12656 /**
12657 * Sets the value for a property on a node.
12658 *
12659 * @param {DOMElement} node
12660 * @param {string} name
12661 * @param {*} value
12662 */
12663 setValueForProperty: function (node, name, value) {
12664 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
12665 if (propertyInfo) {
12666 var mutationMethod = propertyInfo.mutationMethod;
12667 if (mutationMethod) {
12668 mutationMethod(node, value);
12669 } else if (shouldIgnoreValue(propertyInfo, value)) {
12670 this.deleteValueForProperty(node, name);
12671 return;
12672 } else if (propertyInfo.mustUseProperty) {
12673 // Contrary to `setAttribute`, object properties are properly
12674 // `toString`ed by IE8/9.
12675 node[propertyInfo.propertyName] = value;
12676 } else {
12677 var attributeName = propertyInfo.attributeName;
12678 var namespace = propertyInfo.attributeNamespace;
12679 // `setAttribute` with objects becomes only `[object]` in IE8/9,
12680 // ('' + value) makes it output the correct toString()-value.
12681 if (namespace) {
12682 node.setAttributeNS(namespace, attributeName, '' + value);
12683 } else if (propertyInfo.hasBooleanValue || propertyInfo.hasOverloadedBooleanValue && value === true) {
12684 node.setAttribute(attributeName, '');
12685 } else {
12686 node.setAttribute(attributeName, '' + value);
12687 }
12688 }
12689 } else if (DOMProperty.isCustomAttribute(name)) {
12690 DOMPropertyOperations.setValueForAttribute(node, name, value);
12691 return;
12692 }
12693
12694 if ((undefined) !== 'production') {
12695 var payload = {};
12696 payload[name] = value;
12697 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
12698 }
12699 },
12700
12701 setValueForAttribute: function (node, name, value) {
12702 if (!isAttributeNameSafe(name)) {
12703 return;
12704 }
12705 if (value == null) {
12706 node.removeAttribute(name);
12707 } else {
12708 node.setAttribute(name, '' + value);
12709 }
12710
12711 if ((undefined) !== 'production') {
12712 var payload = {};
12713 payload[name] = value;
12714 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'update attribute', payload);
12715 }
12716 },
12717
12718 /**
12719 * Deletes an attributes from a node.
12720 *
12721 * @param {DOMElement} node
12722 * @param {string} name
12723 */
12724 deleteValueForAttribute: function (node, name) {
12725 node.removeAttribute(name);
12726 if ((undefined) !== 'production') {
12727 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
12728 }
12729 },
12730
12731 /**
12732 * Deletes the value for a property on a node.
12733 *
12734 * @param {DOMElement} node
12735 * @param {string} name
12736 */
12737 deleteValueForProperty: function (node, name) {
12738 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
12739 if (propertyInfo) {
12740 var mutationMethod = propertyInfo.mutationMethod;
12741 if (mutationMethod) {
12742 mutationMethod(node, undefined);
12743 } else if (propertyInfo.mustUseProperty) {
12744 var propName = propertyInfo.propertyName;
12745 if (propertyInfo.hasBooleanValue) {
12746 node[propName] = false;
12747 } else {
12748 node[propName] = '';
12749 }
12750 } else {
12751 node.removeAttribute(propertyInfo.attributeName);
12752 }
12753 } else if (DOMProperty.isCustomAttribute(name)) {
12754 node.removeAttribute(name);
12755 }
12756
12757 if ((undefined) !== 'production') {
12758 ReactInstrumentation.debugTool.onHostOperation(ReactDOMComponentTree.getInstanceFromNode(node)._debugID, 'remove attribute', name);
12759 }
12760 }
12761
12762 };
12763
12764 module.exports = DOMPropertyOperations;
12765
12766/***/ },
12767/* 194 */
12768/***/ function(module, exports, __webpack_require__) {
12769
12770 /**
12771 * Copyright 2013-present, Facebook, Inc.
12772 * All rights reserved.
12773 *
12774 * This source code is licensed under the BSD-style license found in the
12775 * LICENSE file in the root directory of this source tree. An additional grant
12776 * of patent rights can be found in the PATENTS file in the same directory.
12777 *
12778 * @providesModule quoteAttributeValueForBrowser
12779 */
12780
12781 'use strict';
12782
12783 var escapeTextContentForBrowser = __webpack_require__(175);
12784
12785 /**
12786 * Escapes attribute value to prevent scripting attacks.
12787 *
12788 * @param {*} value Value to escape.
12789 * @return {string} An escaped string.
12790 */
12791 function quoteAttributeValueForBrowser(value) {
12792 return '"' + escapeTextContentForBrowser(value) + '"';
12793 }
12794
12795 module.exports = quoteAttributeValueForBrowser;
12796
12797/***/ },
12798/* 195 */
12799/***/ function(module, exports, __webpack_require__) {
12800
12801 /**
12802 * Copyright 2013-present, Facebook, Inc.
12803 * All rights reserved.
12804 *
12805 * This source code is licensed under the BSD-style license found in the
12806 * LICENSE file in the root directory of this source tree. An additional grant
12807 * of patent rights can be found in the PATENTS file in the same directory.
12808 *
12809 * @providesModule ReactBrowserEventEmitter
12810 */
12811
12812 'use strict';
12813
12814 var _assign = __webpack_require__(91);
12815
12816 var EventConstants = __webpack_require__(129);
12817 var EventPluginRegistry = __webpack_require__(132);
12818 var ReactEventEmitterMixin = __webpack_require__(196);
12819 var ViewportMetrics = __webpack_require__(165);
12820
12821 var getVendorPrefixedEventName = __webpack_require__(197);
12822 var isEventSupported = __webpack_require__(159);
12823
12824 /**
12825 * Summary of `ReactBrowserEventEmitter` event handling:
12826 *
12827 * - Top-level delegation is used to trap most native browser events. This
12828 * may only occur in the main thread and is the responsibility of
12829 * ReactEventListener, which is injected and can therefore support pluggable
12830 * event sources. This is the only work that occurs in the main thread.
12831 *
12832 * - We normalize and de-duplicate events to account for browser quirks. This
12833 * may be done in the worker thread.
12834 *
12835 * - Forward these native events (with the associated top-level type used to
12836 * trap it) to `EventPluginHub`, which in turn will ask plugins if they want
12837 * to extract any synthetic events.
12838 *
12839 * - The `EventPluginHub` will then process each event by annotating them with
12840 * "dispatches", a sequence of listeners and IDs that care about that event.
12841 *
12842 * - The `EventPluginHub` then dispatches the events.
12843 *
12844 * Overview of React and the event system:
12845 *
12846 * +------------+ .
12847 * | DOM | .
12848 * +------------+ .
12849 * | .
12850 * v .
12851 * +------------+ .
12852 * | ReactEvent | .
12853 * | Listener | .
12854 * +------------+ . +-----------+
12855 * | . +--------+|SimpleEvent|
12856 * | . | |Plugin |
12857 * +-----|------+ . v +-----------+
12858 * | | | . +--------------+ +------------+
12859 * | +-----------.--->|EventPluginHub| | Event |
12860 * | | . | | +-----------+ | Propagators|
12861 * | ReactEvent | . | | |TapEvent | |------------|
12862 * | Emitter | . | |<---+|Plugin | |other plugin|
12863 * | | . | | +-----------+ | utilities |
12864 * | +-----------.--->| | +------------+
12865 * | | | . +--------------+
12866 * +-----|------+ . ^ +-----------+
12867 * | . | |Enter/Leave|
12868 * + . +-------+|Plugin |
12869 * +-------------+ . +-----------+
12870 * | application | .
12871 * |-------------| .
12872 * | | .
12873 * | | .
12874 * +-------------+ .
12875 * .
12876 * React Core . General Purpose Event Plugin System
12877 */
12878
12879 var hasEventPageXY;
12880 var alreadyListeningTo = {};
12881 var isMonitoringScrollValue = false;
12882 var reactTopListenersCounter = 0;
12883
12884 // For events like 'submit' which don't consistently bubble (which we trap at a
12885 // lower node than `document`), binding at `document` would cause duplicate
12886 // events so we don't include them here
12887 var topEventMapping = {
12888 topAbort: 'abort',
12889 topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
12890 topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
12891 topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
12892 topBlur: 'blur',
12893 topCanPlay: 'canplay',
12894 topCanPlayThrough: 'canplaythrough',
12895 topChange: 'change',
12896 topClick: 'click',
12897 topCompositionEnd: 'compositionend',
12898 topCompositionStart: 'compositionstart',
12899 topCompositionUpdate: 'compositionupdate',
12900 topContextMenu: 'contextmenu',
12901 topCopy: 'copy',
12902 topCut: 'cut',
12903 topDoubleClick: 'dblclick',
12904 topDrag: 'drag',
12905 topDragEnd: 'dragend',
12906 topDragEnter: 'dragenter',
12907 topDragExit: 'dragexit',
12908 topDragLeave: 'dragleave',
12909 topDragOver: 'dragover',
12910 topDragStart: 'dragstart',
12911 topDrop: 'drop',
12912 topDurationChange: 'durationchange',
12913 topEmptied: 'emptied',
12914 topEncrypted: 'encrypted',
12915 topEnded: 'ended',
12916 topError: 'error',
12917 topFocus: 'focus',
12918 topInput: 'input',
12919 topKeyDown: 'keydown',
12920 topKeyPress: 'keypress',
12921 topKeyUp: 'keyup',
12922 topLoadedData: 'loadeddata',
12923 topLoadedMetadata: 'loadedmetadata',
12924 topLoadStart: 'loadstart',
12925 topMouseDown: 'mousedown',
12926 topMouseMove: 'mousemove',
12927 topMouseOut: 'mouseout',
12928 topMouseOver: 'mouseover',
12929 topMouseUp: 'mouseup',
12930 topPaste: 'paste',
12931 topPause: 'pause',
12932 topPlay: 'play',
12933 topPlaying: 'playing',
12934 topProgress: 'progress',
12935 topRateChange: 'ratechange',
12936 topScroll: 'scroll',
12937 topSeeked: 'seeked',
12938 topSeeking: 'seeking',
12939 topSelectionChange: 'selectionchange',
12940 topStalled: 'stalled',
12941 topSuspend: 'suspend',
12942 topTextInput: 'textInput',
12943 topTimeUpdate: 'timeupdate',
12944 topTouchCancel: 'touchcancel',
12945 topTouchEnd: 'touchend',
12946 topTouchMove: 'touchmove',
12947 topTouchStart: 'touchstart',
12948 topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
12949 topVolumeChange: 'volumechange',
12950 topWaiting: 'waiting',
12951 topWheel: 'wheel'
12952 };
12953
12954 /**
12955 * To ensure no conflicts with other potential React instances on the page
12956 */
12957 var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2);
12958
12959 function getListeningForDocument(mountAt) {
12960 // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty`
12961 // directly.
12962 if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) {
12963 mountAt[topListenersIDKey] = reactTopListenersCounter++;
12964 alreadyListeningTo[mountAt[topListenersIDKey]] = {};
12965 }
12966 return alreadyListeningTo[mountAt[topListenersIDKey]];
12967 }
12968
12969 /**
12970 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
12971 * example:
12972 *
12973 * EventPluginHub.putListener('myID', 'onClick', myFunction);
12974 *
12975 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
12976 *
12977 * @internal
12978 */
12979 var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
12980
12981 /**
12982 * Injectable event backend
12983 */
12984 ReactEventListener: null,
12985
12986 injection: {
12987 /**
12988 * @param {object} ReactEventListener
12989 */
12990 injectReactEventListener: function (ReactEventListener) {
12991 ReactEventListener.setHandleTopLevel(ReactBrowserEventEmitter.handleTopLevel);
12992 ReactBrowserEventEmitter.ReactEventListener = ReactEventListener;
12993 }
12994 },
12995
12996 /**
12997 * Sets whether or not any created callbacks should be enabled.
12998 *
12999 * @param {boolean} enabled True if callbacks should be enabled.
13000 */
13001 setEnabled: function (enabled) {
13002 if (ReactBrowserEventEmitter.ReactEventListener) {
13003 ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled);
13004 }
13005 },
13006
13007 /**
13008 * @return {boolean} True if callbacks are enabled.
13009 */
13010 isEnabled: function () {
13011 return !!(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled());
13012 },
13013
13014 /**
13015 * We listen for bubbled touch events on the document object.
13016 *
13017 * Firefox v8.01 (and possibly others) exhibited strange behavior when
13018 * mounting `onmousemove` events at some node that was not the document
13019 * element. The symptoms were that if your mouse is not moving over something
13020 * contained within that mount point (for example on the background) the
13021 * top-level listeners for `onmousemove` won't be called. However, if you
13022 * register the `mousemove` on the document object, then it will of course
13023 * catch all `mousemove`s. This along with iOS quirks, justifies restricting
13024 * top-level listeners to the document object only, at least for these
13025 * movement types of events and possibly all events.
13026 *
13027 * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
13028 *
13029 * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but
13030 * they bubble to document.
13031 *
13032 * @param {string} registrationName Name of listener (e.g. `onClick`).
13033 * @param {object} contentDocumentHandle Document which owns the container
13034 */
13035 listenTo: function (registrationName, contentDocumentHandle) {
13036 var mountAt = contentDocumentHandle;
13037 var isListening = getListeningForDocument(mountAt);
13038 var dependencies = EventPluginRegistry.registrationNameDependencies[registrationName];
13039
13040 var topLevelTypes = EventConstants.topLevelTypes;
13041 for (var i = 0; i < dependencies.length; i++) {
13042 var dependency = dependencies[i];
13043 if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
13044 if (dependency === topLevelTypes.topWheel) {
13045 if (isEventSupported('wheel')) {
13046 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'wheel', mountAt);
13047 } else if (isEventSupported('mousewheel')) {
13048 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'mousewheel', mountAt);
13049 } else {
13050 // Firefox needs to capture a different mouse scroll event.
13051 // @see http://www.quirksmode.org/dom/events/tests/scroll.html
13052 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topWheel, 'DOMMouseScroll', mountAt);
13053 }
13054 } else if (dependency === topLevelTypes.topScroll) {
13055
13056 if (isEventSupported('scroll', true)) {
13057 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topScroll, 'scroll', mountAt);
13058 } else {
13059 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topScroll, 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
13060 }
13061 } else if (dependency === topLevelTypes.topFocus || dependency === topLevelTypes.topBlur) {
13062
13063 if (isEventSupported('focus', true)) {
13064 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topFocus, 'focus', mountAt);
13065 ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelTypes.topBlur, 'blur', mountAt);
13066 } else if (isEventSupported('focusin')) {
13067 // IE has `focusin` and `focusout` events which bubble.
13068 // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html
13069 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topFocus, 'focusin', mountAt);
13070 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelTypes.topBlur, 'focusout', mountAt);
13071 }
13072
13073 // to make sure blur and focus event listeners are only attached once
13074 isListening[topLevelTypes.topBlur] = true;
13075 isListening[topLevelTypes.topFocus] = true;
13076 } else if (topEventMapping.hasOwnProperty(dependency)) {
13077 ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(dependency, topEventMapping[dependency], mountAt);
13078 }
13079
13080 isListening[dependency] = true;
13081 }
13082 }
13083 },
13084
13085 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
13086 return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent(topLevelType, handlerBaseName, handle);
13087 },
13088
13089 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
13090 return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
13091 },
13092
13093 /**
13094 * Protect against document.createEvent() returning null
13095 * Some popup blocker extensions appear to do this:
13096 * https://github.com/facebook/react/issues/6887
13097 */
13098 supportsEventPageXY: function () {
13099 if (!document.createEvent) {
13100 return false;
13101 }
13102 var ev = document.createEvent('MouseEvent');
13103 return ev != null && 'pageX' in ev;
13104 },
13105
13106 /**
13107 * Listens to window scroll and resize events. We cache scroll values so that
13108 * application code can access them without triggering reflows.
13109 *
13110 * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
13111 * pageX/pageY isn't supported (legacy browsers).
13112 *
13113 * NOTE: Scroll events do not bubble.
13114 *
13115 * @see http://www.quirksmode.org/dom/events/scroll.html
13116 */
13117 ensureScrollValueMonitoring: function () {
13118 if (hasEventPageXY === undefined) {
13119 hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
13120 }
13121 if (!hasEventPageXY && !isMonitoringScrollValue) {
13122 var refresh = ViewportMetrics.refreshScrollValues;
13123 ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
13124 isMonitoringScrollValue = true;
13125 }
13126 }
13127
13128 });
13129
13130 module.exports = ReactBrowserEventEmitter;
13131
13132/***/ },
13133/* 196 */
13134/***/ function(module, exports, __webpack_require__) {
13135
13136 /**
13137 * Copyright 2013-present, Facebook, Inc.
13138 * All rights reserved.
13139 *
13140 * This source code is licensed under the BSD-style license found in the
13141 * LICENSE file in the root directory of this source tree. An additional grant
13142 * of patent rights can be found in the PATENTS file in the same directory.
13143 *
13144 * @providesModule ReactEventEmitterMixin
13145 */
13146
13147 'use strict';
13148
13149 var EventPluginHub = __webpack_require__(131);
13150
13151 function runEventQueueInBatch(events) {
13152 EventPluginHub.enqueueEvents(events);
13153 EventPluginHub.processEventQueue(false);
13154 }
13155
13156 var ReactEventEmitterMixin = {
13157
13158 /**
13159 * Streams a fired top-level event to `EventPluginHub` where plugins have the
13160 * opportunity to create `ReactEvent`s to be dispatched.
13161 */
13162 handleTopLevel: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
13163 var events = EventPluginHub.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
13164 runEventQueueInBatch(events);
13165 }
13166 };
13167
13168 module.exports = ReactEventEmitterMixin;
13169
13170/***/ },
13171/* 197 */
13172/***/ function(module, exports, __webpack_require__) {
13173
13174 /**
13175 * Copyright 2013-present, Facebook, Inc.
13176 * All rights reserved.
13177 *
13178 * This source code is licensed under the BSD-style license found in the
13179 * LICENSE file in the root directory of this source tree. An additional grant
13180 * of patent rights can be found in the PATENTS file in the same directory.
13181 *
13182 * @providesModule getVendorPrefixedEventName
13183 */
13184
13185 'use strict';
13186
13187 var ExecutionEnvironment = __webpack_require__(137);
13188
13189 /**
13190 * Generate a mapping of standard vendor prefixes using the defined style property and event name.
13191 *
13192 * @param {string} styleProp
13193 * @param {string} eventName
13194 * @returns {object}
13195 */
13196 function makePrefixMap(styleProp, eventName) {
13197 var prefixes = {};
13198
13199 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
13200 prefixes['Webkit' + styleProp] = 'webkit' + eventName;
13201 prefixes['Moz' + styleProp] = 'moz' + eventName;
13202 prefixes['ms' + styleProp] = 'MS' + eventName;
13203 prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();
13204
13205 return prefixes;
13206 }
13207
13208 /**
13209 * A list of event names to a configurable list of vendor prefixes.
13210 */
13211 var vendorPrefixes = {
13212 animationend: makePrefixMap('Animation', 'AnimationEnd'),
13213 animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
13214 animationstart: makePrefixMap('Animation', 'AnimationStart'),
13215 transitionend: makePrefixMap('Transition', 'TransitionEnd')
13216 };
13217
13218 /**
13219 * Event names that have already been detected and prefixed (if applicable).
13220 */
13221 var prefixedEventNames = {};
13222
13223 /**
13224 * Element to check for prefixes on.
13225 */
13226 var style = {};
13227
13228 /**
13229 * Bootstrap if a DOM exists.
13230 */
13231 if (ExecutionEnvironment.canUseDOM) {
13232 style = document.createElement('div').style;
13233
13234 // On some platforms, in particular some releases of Android 4.x,
13235 // the un-prefixed "animation" and "transition" properties are defined on the
13236 // style object but the events that fire will still be prefixed, so we need
13237 // to check if the un-prefixed events are usable, and if not remove them from the map.
13238 if (!('AnimationEvent' in window)) {
13239 delete vendorPrefixes.animationend.animation;
13240 delete vendorPrefixes.animationiteration.animation;
13241 delete vendorPrefixes.animationstart.animation;
13242 }
13243
13244 // Same as above
13245 if (!('TransitionEvent' in window)) {
13246 delete vendorPrefixes.transitionend.transition;
13247 }
13248 }
13249
13250 /**
13251 * Attempts to determine the correct vendor prefixed event name.
13252 *
13253 * @param {string} eventName
13254 * @returns {string}
13255 */
13256 function getVendorPrefixedEventName(eventName) {
13257 if (prefixedEventNames[eventName]) {
13258 return prefixedEventNames[eventName];
13259 } else if (!vendorPrefixes[eventName]) {
13260 return eventName;
13261 }
13262
13263 var prefixMap = vendorPrefixes[eventName];
13264
13265 for (var styleProp in prefixMap) {
13266 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
13267 return prefixedEventNames[eventName] = prefixMap[styleProp];
13268 }
13269 }
13270
13271 return '';
13272 }
13273
13274 module.exports = getVendorPrefixedEventName;
13275
13276/***/ },
13277/* 198 */
13278/***/ function(module, exports, __webpack_require__) {
13279
13280 /**
13281 * Copyright 2013-present, Facebook, Inc.
13282 * All rights reserved.
13283 *
13284 * This source code is licensed under the BSD-style license found in the
13285 * LICENSE file in the root directory of this source tree. An additional grant
13286 * of patent rights can be found in the PATENTS file in the same directory.
13287 *
13288 * @providesModule ReactDOMButton
13289 */
13290
13291 'use strict';
13292
13293 var DisabledInputUtils = __webpack_require__(199);
13294
13295 /**
13296 * Implements a <button> host component that does not receive mouse events
13297 * when `disabled` is set.
13298 */
13299 var ReactDOMButton = {
13300 getHostProps: DisabledInputUtils.getHostProps
13301 };
13302
13303 module.exports = ReactDOMButton;
13304
13305/***/ },
13306/* 199 */
13307/***/ function(module, exports) {
13308
13309 /**
13310 * Copyright 2013-present, Facebook, Inc.
13311 * All rights reserved.
13312 *
13313 * This source code is licensed under the BSD-style license found in the
13314 * LICENSE file in the root directory of this source tree. An additional grant
13315 * of patent rights can be found in the PATENTS file in the same directory.
13316 *
13317 * @providesModule DisabledInputUtils
13318 */
13319
13320 'use strict';
13321
13322 var disableableMouseListenerNames = {
13323 onClick: true,
13324 onDoubleClick: true,
13325 onMouseDown: true,
13326 onMouseMove: true,
13327 onMouseUp: true,
13328
13329 onClickCapture: true,
13330 onDoubleClickCapture: true,
13331 onMouseDownCapture: true,
13332 onMouseMoveCapture: true,
13333 onMouseUpCapture: true
13334 };
13335
13336 /**
13337 * Implements a host component that does not receive mouse events
13338 * when `disabled` is set.
13339 */
13340 var DisabledInputUtils = {
13341 getHostProps: function (inst, props) {
13342 if (!props.disabled) {
13343 return props;
13344 }
13345
13346 // Copy the props, except the mouse listeners
13347 var hostProps = {};
13348 for (var key in props) {
13349 if (!disableableMouseListenerNames[key] && props.hasOwnProperty(key)) {
13350 hostProps[key] = props[key];
13351 }
13352 }
13353
13354 return hostProps;
13355 }
13356 };
13357
13358 module.exports = DisabledInputUtils;
13359
13360/***/ },
13361/* 200 */
13362/***/ function(module, exports, __webpack_require__) {
13363
13364 /**
13365 * Copyright 2013-present, Facebook, Inc.
13366 * All rights reserved.
13367 *
13368 * This source code is licensed under the BSD-style license found in the
13369 * LICENSE file in the root directory of this source tree. An additional grant
13370 * of patent rights can be found in the PATENTS file in the same directory.
13371 *
13372 * @providesModule ReactDOMInput
13373 */
13374
13375 'use strict';
13376
13377 var _prodInvariant = __webpack_require__(94),
13378 _assign = __webpack_require__(91);
13379
13380 var DisabledInputUtils = __webpack_require__(199);
13381 var DOMPropertyOperations = __webpack_require__(193);
13382 var LinkedValueUtils = __webpack_require__(201);
13383 var ReactDOMComponentTree = __webpack_require__(124);
13384 var ReactUpdates = __webpack_require__(144);
13385
13386 var invariant = __webpack_require__(95);
13387 var warning = __webpack_require__(98);
13388
13389 var didWarnValueLink = false;
13390 var didWarnCheckedLink = false;
13391 var didWarnValueDefaultValue = false;
13392 var didWarnCheckedDefaultChecked = false;
13393 var didWarnControlledToUncontrolled = false;
13394 var didWarnUncontrolledToControlled = false;
13395
13396 function forceUpdateIfMounted() {
13397 if (this._rootNodeID) {
13398 // DOM component is still mounted; update
13399 ReactDOMInput.updateWrapper(this);
13400 }
13401 }
13402
13403 function isControlled(props) {
13404 var usesChecked = props.type === 'checkbox' || props.type === 'radio';
13405 return usesChecked ? props.checked != null : props.value != null;
13406 }
13407
13408 /**
13409 * Implements an <input> host component that allows setting these optional
13410 * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
13411 *
13412 * If `checked` or `value` are not supplied (or null/undefined), user actions
13413 * that affect the checked state or value will trigger updates to the element.
13414 *
13415 * If they are supplied (and not null/undefined), the rendered element will not
13416 * trigger updates to the element. Instead, the props must change in order for
13417 * the rendered element to be updated.
13418 *
13419 * The rendered element will be initialized as unchecked (or `defaultChecked`)
13420 * with an empty value (or `defaultValue`).
13421 *
13422 * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
13423 */
13424 var ReactDOMInput = {
13425 getHostProps: function (inst, props) {
13426 var value = LinkedValueUtils.getValue(props);
13427 var checked = LinkedValueUtils.getChecked(props);
13428
13429 var hostProps = _assign({
13430 // Make sure we set .type before any other properties (setting .value
13431 // before .type means .value is lost in IE11 and below)
13432 type: undefined,
13433 // Make sure we set .step before .value (setting .value before .step
13434 // means .value is rounded on mount, based upon step precision)
13435 step: undefined,
13436 // Make sure we set .min & .max before .value (to ensure proper order
13437 // in corner cases such as min or max deriving from value, e.g. Issue #7170)
13438 min: undefined,
13439 max: undefined
13440 }, DisabledInputUtils.getHostProps(inst, props), {
13441 defaultChecked: undefined,
13442 defaultValue: undefined,
13443 value: value != null ? value : inst._wrapperState.initialValue,
13444 checked: checked != null ? checked : inst._wrapperState.initialChecked,
13445 onChange: inst._wrapperState.onChange
13446 });
13447
13448 return hostProps;
13449 },
13450
13451 mountWrapper: function (inst, props) {
13452 if ((undefined) !== 'production') {
13453 LinkedValueUtils.checkPropTypes('input', props, inst._currentElement._owner);
13454
13455 var owner = inst._currentElement._owner;
13456
13457 if (props.valueLink !== undefined && !didWarnValueLink) {
13458 (undefined) !== 'production' ? warning(false, '`valueLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
13459 didWarnValueLink = true;
13460 }
13461 if (props.checkedLink !== undefined && !didWarnCheckedLink) {
13462 (undefined) !== 'production' ? warning(false, '`checkedLink` prop on `input` is deprecated; set `value` and `onChange` instead.') : void 0;
13463 didWarnCheckedLink = true;
13464 }
13465 if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
13466 (undefined) !== '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;
13467 didWarnCheckedDefaultChecked = true;
13468 }
13469 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
13470 (undefined) !== '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;
13471 didWarnValueDefaultValue = true;
13472 }
13473 }
13474
13475 var defaultValue = props.defaultValue;
13476 inst._wrapperState = {
13477 initialChecked: props.checked != null ? props.checked : props.defaultChecked,
13478 initialValue: props.value != null ? props.value : defaultValue,
13479 listeners: null,
13480 onChange: _handleChange.bind(inst)
13481 };
13482
13483 if ((undefined) !== 'production') {
13484 inst._wrapperState.controlled = isControlled(props);
13485 }
13486 },
13487
13488 updateWrapper: function (inst) {
13489 var props = inst._currentElement.props;
13490
13491 if ((undefined) !== 'production') {
13492 var controlled = isControlled(props);
13493 var owner = inst._currentElement._owner;
13494
13495 if (!inst._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
13496 (undefined) !== '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;
13497 didWarnUncontrolledToControlled = true;
13498 }
13499 if (inst._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
13500 (undefined) !== '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;
13501 didWarnControlledToUncontrolled = true;
13502 }
13503 }
13504
13505 // TODO: Shouldn't this be getChecked(props)?
13506 var checked = props.checked;
13507 if (checked != null) {
13508 DOMPropertyOperations.setValueForProperty(ReactDOMComponentTree.getNodeFromInstance(inst), 'checked', checked || false);
13509 }
13510
13511 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
13512 var value = LinkedValueUtils.getValue(props);
13513 if (value != null) {
13514
13515 // Cast `value` to a string to ensure the value is set correctly. While
13516 // browsers typically do this as necessary, jsdom doesn't.
13517 var newValue = '' + value;
13518
13519 // To avoid side effects (such as losing text selection), only set value if changed
13520 if (newValue !== node.value) {
13521 node.value = newValue;
13522 }
13523 } else {
13524 if (props.value == null && props.defaultValue != null) {
13525 node.defaultValue = '' + props.defaultValue;
13526 }
13527 if (props.checked == null && props.defaultChecked != null) {
13528 node.defaultChecked = !!props.defaultChecked;
13529 }
13530 }
13531 },
13532
13533 postMountWrapper: function (inst) {
13534 var props = inst._currentElement.props;
13535
13536 // This is in postMount because we need access to the DOM node, which is not
13537 // available until after the component has mounted.
13538 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
13539
13540 // Detach value from defaultValue. We won't do anything if we're working on
13541 // submit or reset inputs as those values & defaultValues are linked. They
13542 // are not resetable nodes so this operation doesn't matter and actually
13543 // removes browser-default values (eg "Submit Query") when no value is
13544 // provided.
13545
13546 switch (props.type) {
13547 case 'submit':
13548 case 'reset':
13549 break;
13550 case 'color':
13551 case 'date':
13552 case 'datetime':
13553 case 'datetime-local':
13554 case 'month':
13555 case 'time':
13556 case 'week':
13557 // This fixes the no-show issue on iOS Safari and Android Chrome:
13558 // https://github.com/facebook/react/issues/7233
13559 node.value = '';
13560 node.value = node.defaultValue;
13561 break;
13562 default:
13563 node.value = node.value;
13564 break;
13565 }
13566
13567 // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
13568 // this is needed to work around a chrome bug where setting defaultChecked
13569 // will sometimes influence the value of checked (even after detachment).
13570 // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
13571 // We need to temporarily unset name to avoid disrupting radio button groups.
13572 var name = node.name;
13573 if (name !== '') {
13574 node.name = '';
13575 }
13576 node.defaultChecked = !node.defaultChecked;
13577 node.defaultChecked = !node.defaultChecked;
13578 if (name !== '') {
13579 node.name = name;
13580 }
13581 }
13582 };
13583
13584 function _handleChange(event) {
13585 var props = this._currentElement.props;
13586
13587 var returnValue = LinkedValueUtils.executeOnChange(props, event);
13588
13589 // Here we use asap to wait until all updates have propagated, which
13590 // is important when using controlled components within layers:
13591 // https://github.com/facebook/react/issues/1698
13592 ReactUpdates.asap(forceUpdateIfMounted, this);
13593
13594 var name = props.name;
13595 if (props.type === 'radio' && name != null) {
13596 var rootNode = ReactDOMComponentTree.getNodeFromInstance(this);
13597 var queryRoot = rootNode;
13598
13599 while (queryRoot.parentNode) {
13600 queryRoot = queryRoot.parentNode;
13601 }
13602
13603 // If `rootNode.form` was non-null, then we could try `form.elements`,
13604 // but that sometimes behaves strangely in IE8. We could also try using
13605 // `form.getElementsByName`, but that will only return direct children
13606 // and won't include inputs that use the HTML5 `form=` attribute. Since
13607 // the input might not even be in a form, let's just use the global
13608 // `querySelectorAll` to ensure we don't miss anything.
13609 var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
13610
13611 for (var i = 0; i < group.length; i++) {
13612 var otherNode = group[i];
13613 if (otherNode === rootNode || otherNode.form !== rootNode.form) {
13614 continue;
13615 }
13616 // This will throw if radio buttons rendered by different copies of React
13617 // and the same name are rendered into the same form (same as #1939).
13618 // That's probably okay; we don't support it just as we don't support
13619 // mixing React radio buttons with non-React ones.
13620 var otherInstance = ReactDOMComponentTree.getInstanceFromNode(otherNode);
13621 !otherInstance ? (undefined) !== 'production' ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : _prodInvariant('90') : void 0;
13622 // If this is a controlled radio button group, forcing the input that
13623 // was previously checked to update will cause it to be come re-checked
13624 // as appropriate.
13625 ReactUpdates.asap(forceUpdateIfMounted, otherInstance);
13626 }
13627 }
13628
13629 return returnValue;
13630 }
13631
13632 module.exports = ReactDOMInput;
13633
13634/***/ },
13635/* 201 */
13636/***/ function(module, exports, __webpack_require__) {
13637
13638 /**
13639 * Copyright 2013-present, Facebook, Inc.
13640 * All rights reserved.
13641 *
13642 * This source code is licensed under the BSD-style license found in the
13643 * LICENSE file in the root directory of this source tree. An additional grant
13644 * of patent rights can be found in the PATENTS file in the same directory.
13645 *
13646 * @providesModule LinkedValueUtils
13647 */
13648
13649 'use strict';
13650
13651 var _prodInvariant = __webpack_require__(94);
13652
13653 var ReactPropTypes = __webpack_require__(119);
13654 var ReactPropTypeLocations = __webpack_require__(109);
13655 var ReactPropTypesSecret = __webpack_require__(118);
13656
13657 var invariant = __webpack_require__(95);
13658 var warning = __webpack_require__(98);
13659
13660 var hasReadOnlyValue = {
13661 'button': true,
13662 'checkbox': true,
13663 'image': true,
13664 'hidden': true,
13665 'radio': true,
13666 'reset': true,
13667 'submit': true
13668 };
13669
13670 function _assertSingleLink(inputProps) {
13671 !(inputProps.checkedLink == null || inputProps.valueLink == null) ? (undefined) !== '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;
13672 }
13673 function _assertValueLink(inputProps) {
13674 _assertSingleLink(inputProps);
13675 !(inputProps.value == null && inputProps.onChange == null) ? (undefined) !== '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;
13676 }
13677
13678 function _assertCheckedLink(inputProps) {
13679 _assertSingleLink(inputProps);
13680 !(inputProps.checked == null && inputProps.onChange == null) ? (undefined) !== '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;
13681 }
13682
13683 var propTypes = {
13684 value: function (props, propName, componentName) {
13685 if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
13686 return null;
13687 }
13688 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`.');
13689 },
13690 checked: function (props, propName, componentName) {
13691 if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
13692 return null;
13693 }
13694 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`.');
13695 },
13696 onChange: ReactPropTypes.func
13697 };
13698
13699 var loggedTypeFailures = {};
13700 function getDeclarationErrorAddendum(owner) {
13701 if (owner) {
13702 var name = owner.getName();
13703 if (name) {
13704 return ' Check the render method of `' + name + '`.';
13705 }
13706 }
13707 return '';
13708 }
13709
13710 /**
13711 * Provide a linked `value` attribute for controlled forms. You should not use
13712 * this outside of the ReactDOM controlled form components.
13713 */
13714 var LinkedValueUtils = {
13715 checkPropTypes: function (tagName, props, owner) {
13716 for (var propName in propTypes) {
13717 if (propTypes.hasOwnProperty(propName)) {
13718 var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop, null, ReactPropTypesSecret);
13719 }
13720 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
13721 // Only monitor this failure once because there tends to be a lot of the
13722 // same error.
13723 loggedTypeFailures[error.message] = true;
13724
13725 var addendum = getDeclarationErrorAddendum(owner);
13726 (undefined) !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
13727 }
13728 }
13729 },
13730
13731 /**
13732 * @param {object} inputProps Props for form component
13733 * @return {*} current value of the input either from value prop or link.
13734 */
13735 getValue: function (inputProps) {
13736 if (inputProps.valueLink) {
13737 _assertValueLink(inputProps);
13738 return inputProps.valueLink.value;
13739 }
13740 return inputProps.value;
13741 },
13742
13743 /**
13744 * @param {object} inputProps Props for form component
13745 * @return {*} current checked status of the input either from checked prop
13746 * or link.
13747 */
13748 getChecked: function (inputProps) {
13749 if (inputProps.checkedLink) {
13750 _assertCheckedLink(inputProps);
13751 return inputProps.checkedLink.value;
13752 }
13753 return inputProps.checked;
13754 },
13755
13756 /**
13757 * @param {object} inputProps Props for form component
13758 * @param {SyntheticEvent} event change event to handle
13759 */
13760 executeOnChange: function (inputProps, event) {
13761 if (inputProps.valueLink) {
13762 _assertValueLink(inputProps);
13763 return inputProps.valueLink.requestChange(event.target.value);
13764 } else if (inputProps.checkedLink) {
13765 _assertCheckedLink(inputProps);
13766 return inputProps.checkedLink.requestChange(event.target.checked);
13767 } else if (inputProps.onChange) {
13768 return inputProps.onChange.call(undefined, event);
13769 }
13770 }
13771 };
13772
13773 module.exports = LinkedValueUtils;
13774
13775/***/ },
13776/* 202 */
13777/***/ function(module, exports, __webpack_require__) {
13778
13779 /**
13780 * Copyright 2013-present, Facebook, Inc.
13781 * All rights reserved.
13782 *
13783 * This source code is licensed under the BSD-style license found in the
13784 * LICENSE file in the root directory of this source tree. An additional grant
13785 * of patent rights can be found in the PATENTS file in the same directory.
13786 *
13787 * @providesModule ReactDOMOption
13788 */
13789
13790 'use strict';
13791
13792 var _assign = __webpack_require__(91);
13793
13794 var ReactChildren = __webpack_require__(92);
13795 var ReactDOMComponentTree = __webpack_require__(124);
13796 var ReactDOMSelect = __webpack_require__(203);
13797
13798 var warning = __webpack_require__(98);
13799 var didWarnInvalidOptionChildren = false;
13800
13801 function flattenChildren(children) {
13802 var content = '';
13803
13804 // Flatten children and warn if they aren't strings or numbers;
13805 // invalid types are ignored.
13806 ReactChildren.forEach(children, function (child) {
13807 if (child == null) {
13808 return;
13809 }
13810 if (typeof child === 'string' || typeof child === 'number') {
13811 content += child;
13812 } else if (!didWarnInvalidOptionChildren) {
13813 didWarnInvalidOptionChildren = true;
13814 (undefined) !== 'production' ? warning(false, 'Only strings and numbers are supported as <option> children.') : void 0;
13815 }
13816 });
13817
13818 return content;
13819 }
13820
13821 /**
13822 * Implements an <option> host component that warns when `selected` is set.
13823 */
13824 var ReactDOMOption = {
13825 mountWrapper: function (inst, props, hostParent) {
13826 // TODO (yungsters): Remove support for `selected` in <option>.
13827 if ((undefined) !== 'production') {
13828 (undefined) !== 'production' ? warning(props.selected == null, 'Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.') : void 0;
13829 }
13830
13831 // Look up whether this option is 'selected'
13832 var selectValue = null;
13833 if (hostParent != null) {
13834 var selectParent = hostParent;
13835
13836 if (selectParent._tag === 'optgroup') {
13837 selectParent = selectParent._hostParent;
13838 }
13839
13840 if (selectParent != null && selectParent._tag === 'select') {
13841 selectValue = ReactDOMSelect.getSelectValueContext(selectParent);
13842 }
13843 }
13844
13845 // If the value is null (e.g., no specified value or after initial mount)
13846 // or missing (e.g., for <datalist>), we don't change props.selected
13847 var selected = null;
13848 if (selectValue != null) {
13849 var value;
13850 if (props.value != null) {
13851 value = props.value + '';
13852 } else {
13853 value = flattenChildren(props.children);
13854 }
13855 selected = false;
13856 if (Array.isArray(selectValue)) {
13857 // multiple
13858 for (var i = 0; i < selectValue.length; i++) {
13859 if ('' + selectValue[i] === value) {
13860 selected = true;
13861 break;
13862 }
13863 }
13864 } else {
13865 selected = '' + selectValue === value;
13866 }
13867 }
13868
13869 inst._wrapperState = { selected: selected };
13870 },
13871
13872 postMountWrapper: function (inst) {
13873 // value="" should make a value attribute (#6219)
13874 var props = inst._currentElement.props;
13875 if (props.value != null) {
13876 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
13877 node.setAttribute('value', props.value);
13878 }
13879 },
13880
13881 getHostProps: function (inst, props) {
13882 var hostProps = _assign({ selected: undefined, children: undefined }, props);
13883
13884 // Read state only from initial mount because <select> updates value
13885 // manually; we need the initial state only for server rendering
13886 if (inst._wrapperState.selected != null) {
13887 hostProps.selected = inst._wrapperState.selected;
13888 }
13889
13890 var content = flattenChildren(props.children);
13891
13892 if (content) {
13893 hostProps.children = content;
13894 }
13895
13896 return hostProps;
13897 }
13898
13899 };
13900
13901 module.exports = ReactDOMOption;
13902
13903/***/ },
13904/* 203 */
13905/***/ function(module, exports, __webpack_require__) {
13906
13907 /**
13908 * Copyright 2013-present, Facebook, Inc.
13909 * All rights reserved.
13910 *
13911 * This source code is licensed under the BSD-style license found in the
13912 * LICENSE file in the root directory of this source tree. An additional grant
13913 * of patent rights can be found in the PATENTS file in the same directory.
13914 *
13915 * @providesModule ReactDOMSelect
13916 */
13917
13918 'use strict';
13919
13920 var _assign = __webpack_require__(91);
13921
13922 var DisabledInputUtils = __webpack_require__(199);
13923 var LinkedValueUtils = __webpack_require__(201);
13924 var ReactDOMComponentTree = __webpack_require__(124);
13925 var ReactUpdates = __webpack_require__(144);
13926
13927 var warning = __webpack_require__(98);
13928
13929 var didWarnValueLink = false;
13930 var didWarnValueDefaultValue = false;
13931
13932 function updateOptionsIfPendingUpdateAndMounted() {
13933 if (this._rootNodeID && this._wrapperState.pendingUpdate) {
13934 this._wrapperState.pendingUpdate = false;
13935
13936 var props = this._currentElement.props;
13937 var value = LinkedValueUtils.getValue(props);
13938
13939 if (value != null) {
13940 updateOptions(this, Boolean(props.multiple), value);
13941 }
13942 }
13943 }
13944
13945 function getDeclarationErrorAddendum(owner) {
13946 if (owner) {
13947 var name = owner.getName();
13948 if (name) {
13949 return ' Check the render method of `' + name + '`.';
13950 }
13951 }
13952 return '';
13953 }
13954
13955 var valuePropNames = ['value', 'defaultValue'];
13956
13957 /**
13958 * Validation function for `value` and `defaultValue`.
13959 * @private
13960 */
13961 function checkSelectPropTypes(inst, props) {
13962 var owner = inst._currentElement._owner;
13963 LinkedValueUtils.checkPropTypes('select', props, owner);
13964
13965 if (props.valueLink !== undefined && !didWarnValueLink) {
13966 (undefined) !== 'production' ? warning(false, '`valueLink` prop on `select` is deprecated; set `value` and `onChange` instead.') : void 0;
13967 didWarnValueLink = true;
13968 }
13969
13970 for (var i = 0; i < valuePropNames.length; i++) {
13971 var propName = valuePropNames[i];
13972 if (props[propName] == null) {
13973 continue;
13974 }
13975 var isArray = Array.isArray(props[propName]);
13976 if (props.multiple && !isArray) {
13977 (undefined) !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
13978 } else if (!props.multiple && isArray) {
13979 (undefined) !== 'production' ? warning(false, 'The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum(owner)) : void 0;
13980 }
13981 }
13982 }
13983
13984 /**
13985 * @param {ReactDOMComponent} inst
13986 * @param {boolean} multiple
13987 * @param {*} propValue A stringable (with `multiple`, a list of stringables).
13988 * @private
13989 */
13990 function updateOptions(inst, multiple, propValue) {
13991 var selectedValue, i;
13992 var options = ReactDOMComponentTree.getNodeFromInstance(inst).options;
13993
13994 if (multiple) {
13995 selectedValue = {};
13996 for (i = 0; i < propValue.length; i++) {
13997 selectedValue['' + propValue[i]] = true;
13998 }
13999 for (i = 0; i < options.length; i++) {
14000 var selected = selectedValue.hasOwnProperty(options[i].value);
14001 if (options[i].selected !== selected) {
14002 options[i].selected = selected;
14003 }
14004 }
14005 } else {
14006 // Do not set `select.value` as exact behavior isn't consistent across all
14007 // browsers for all cases.
14008 selectedValue = '' + propValue;
14009 for (i = 0; i < options.length; i++) {
14010 if (options[i].value === selectedValue) {
14011 options[i].selected = true;
14012 return;
14013 }
14014 }
14015 if (options.length) {
14016 options[0].selected = true;
14017 }
14018 }
14019 }
14020
14021 /**
14022 * Implements a <select> host component that allows optionally setting the
14023 * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
14024 * stringable. If `multiple` is true, the prop must be an array of stringables.
14025 *
14026 * If `value` is not supplied (or null/undefined), user actions that change the
14027 * selected option will trigger updates to the rendered options.
14028 *
14029 * If it is supplied (and not null/undefined), the rendered options will not
14030 * update in response to user actions. Instead, the `value` prop must change in
14031 * order for the rendered options to update.
14032 *
14033 * If `defaultValue` is provided, any options with the supplied values will be
14034 * selected.
14035 */
14036 var ReactDOMSelect = {
14037 getHostProps: function (inst, props) {
14038 return _assign({}, DisabledInputUtils.getHostProps(inst, props), {
14039 onChange: inst._wrapperState.onChange,
14040 value: undefined
14041 });
14042 },
14043
14044 mountWrapper: function (inst, props) {
14045 if ((undefined) !== 'production') {
14046 checkSelectPropTypes(inst, props);
14047 }
14048
14049 var value = LinkedValueUtils.getValue(props);
14050 inst._wrapperState = {
14051 pendingUpdate: false,
14052 initialValue: value != null ? value : props.defaultValue,
14053 listeners: null,
14054 onChange: _handleChange.bind(inst),
14055 wasMultiple: Boolean(props.multiple)
14056 };
14057
14058 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
14059 (undefined) !== '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;
14060 didWarnValueDefaultValue = true;
14061 }
14062 },
14063
14064 getSelectValueContext: function (inst) {
14065 // ReactDOMOption looks at this initial value so the initial generated
14066 // markup has correct `selected` attributes
14067 return inst._wrapperState.initialValue;
14068 },
14069
14070 postUpdateWrapper: function (inst) {
14071 var props = inst._currentElement.props;
14072
14073 // After the initial mount, we control selected-ness manually so don't pass
14074 // this value down
14075 inst._wrapperState.initialValue = undefined;
14076
14077 var wasMultiple = inst._wrapperState.wasMultiple;
14078 inst._wrapperState.wasMultiple = Boolean(props.multiple);
14079
14080 var value = LinkedValueUtils.getValue(props);
14081 if (value != null) {
14082 inst._wrapperState.pendingUpdate = false;
14083 updateOptions(inst, Boolean(props.multiple), value);
14084 } else if (wasMultiple !== Boolean(props.multiple)) {
14085 // For simplicity, reapply `defaultValue` if `multiple` is toggled.
14086 if (props.defaultValue != null) {
14087 updateOptions(inst, Boolean(props.multiple), props.defaultValue);
14088 } else {
14089 // Revert the select back to its default unselected state.
14090 updateOptions(inst, Boolean(props.multiple), props.multiple ? [] : '');
14091 }
14092 }
14093 }
14094 };
14095
14096 function _handleChange(event) {
14097 var props = this._currentElement.props;
14098 var returnValue = LinkedValueUtils.executeOnChange(props, event);
14099
14100 if (this._rootNodeID) {
14101 this._wrapperState.pendingUpdate = true;
14102 }
14103 ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this);
14104 return returnValue;
14105 }
14106
14107 module.exports = ReactDOMSelect;
14108
14109/***/ },
14110/* 204 */
14111/***/ function(module, exports, __webpack_require__) {
14112
14113 /**
14114 * Copyright 2013-present, Facebook, Inc.
14115 * All rights reserved.
14116 *
14117 * This source code is licensed under the BSD-style license found in the
14118 * LICENSE file in the root directory of this source tree. An additional grant
14119 * of patent rights can be found in the PATENTS file in the same directory.
14120 *
14121 * @providesModule ReactDOMTextarea
14122 */
14123
14124 'use strict';
14125
14126 var _prodInvariant = __webpack_require__(94),
14127 _assign = __webpack_require__(91);
14128
14129 var DisabledInputUtils = __webpack_require__(199);
14130 var LinkedValueUtils = __webpack_require__(201);
14131 var ReactDOMComponentTree = __webpack_require__(124);
14132 var ReactUpdates = __webpack_require__(144);
14133
14134 var invariant = __webpack_require__(95);
14135 var warning = __webpack_require__(98);
14136
14137 var didWarnValueLink = false;
14138 var didWarnValDefaultVal = false;
14139
14140 function forceUpdateIfMounted() {
14141 if (this._rootNodeID) {
14142 // DOM component is still mounted; update
14143 ReactDOMTextarea.updateWrapper(this);
14144 }
14145 }
14146
14147 /**
14148 * Implements a <textarea> host component that allows setting `value`, and
14149 * `defaultValue`. This differs from the traditional DOM API because value is
14150 * usually set as PCDATA children.
14151 *
14152 * If `value` is not supplied (or null/undefined), user actions that affect the
14153 * value will trigger updates to the element.
14154 *
14155 * If `value` is supplied (and not null/undefined), the rendered element will
14156 * not trigger updates to the element. Instead, the `value` prop must change in
14157 * order for the rendered element to be updated.
14158 *
14159 * The rendered element will be initialized with an empty value, the prop
14160 * `defaultValue` if specified, or the children content (deprecated).
14161 */
14162 var ReactDOMTextarea = {
14163 getHostProps: function (inst, props) {
14164 !(props.dangerouslySetInnerHTML == null) ? (undefined) !== 'production' ? invariant(false, '`dangerouslySetInnerHTML` does not make sense on <textarea>.') : _prodInvariant('91') : void 0;
14165
14166 // Always set children to the same thing. In IE9, the selection range will
14167 // get reset if `textContent` is mutated. We could add a check in setTextContent
14168 // to only set the value if/when the value differs from the node value (which would
14169 // completely solve this IE9 bug), but Sebastian+Ben seemed to like this solution.
14170 // The value can be a boolean or object so that's why it's forced to be a string.
14171 var hostProps = _assign({}, DisabledInputUtils.getHostProps(inst, props), {
14172 value: undefined,
14173 defaultValue: undefined,
14174 children: '' + inst._wrapperState.initialValue,
14175 onChange: inst._wrapperState.onChange
14176 });
14177
14178 return hostProps;
14179 },
14180
14181 mountWrapper: function (inst, props) {
14182 if ((undefined) !== 'production') {
14183 LinkedValueUtils.checkPropTypes('textarea', props, inst._currentElement._owner);
14184 if (props.valueLink !== undefined && !didWarnValueLink) {
14185 (undefined) !== 'production' ? warning(false, '`valueLink` prop on `textarea` is deprecated; set `value` and `onChange` instead.') : void 0;
14186 didWarnValueLink = true;
14187 }
14188 if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
14189 (undefined) !== '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;
14190 didWarnValDefaultVal = true;
14191 }
14192 }
14193
14194 var value = LinkedValueUtils.getValue(props);
14195 var initialValue = value;
14196
14197 // Only bother fetching default value if we're going to use it
14198 if (value == null) {
14199 var defaultValue = props.defaultValue;
14200 // TODO (yungsters): Remove support for children content in <textarea>.
14201 var children = props.children;
14202 if (children != null) {
14203 if ((undefined) !== 'production') {
14204 (undefined) !== 'production' ? warning(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.') : void 0;
14205 }
14206 !(defaultValue == null) ? (undefined) !== 'production' ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : _prodInvariant('92') : void 0;
14207 if (Array.isArray(children)) {
14208 !(children.length <= 1) ? (undefined) !== 'production' ? invariant(false, '<textarea> can only have at most one child.') : _prodInvariant('93') : void 0;
14209 children = children[0];
14210 }
14211
14212 defaultValue = '' + children;
14213 }
14214 if (defaultValue == null) {
14215 defaultValue = '';
14216 }
14217 initialValue = defaultValue;
14218 }
14219
14220 inst._wrapperState = {
14221 initialValue: '' + initialValue,
14222 listeners: null,
14223 onChange: _handleChange.bind(inst)
14224 };
14225 },
14226
14227 updateWrapper: function (inst) {
14228 var props = inst._currentElement.props;
14229
14230 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
14231 var value = LinkedValueUtils.getValue(props);
14232 if (value != null) {
14233 // Cast `value` to a string to ensure the value is set correctly. While
14234 // browsers typically do this as necessary, jsdom doesn't.
14235 var newValue = '' + value;
14236
14237 // To avoid side effects (such as losing text selection), only set value if changed
14238 if (newValue !== node.value) {
14239 node.value = newValue;
14240 }
14241 if (props.defaultValue == null) {
14242 node.defaultValue = newValue;
14243 }
14244 }
14245 if (props.defaultValue != null) {
14246 node.defaultValue = props.defaultValue;
14247 }
14248 },
14249
14250 postMountWrapper: function (inst) {
14251 // This is in postMount because we need access to the DOM node, which is not
14252 // available until after the component has mounted.
14253 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
14254
14255 // Warning: node.value may be the empty string at this point (IE11) if placeholder is set.
14256 node.value = node.textContent; // Detach value from defaultValue
14257 }
14258 };
14259
14260 function _handleChange(event) {
14261 var props = this._currentElement.props;
14262 var returnValue = LinkedValueUtils.executeOnChange(props, event);
14263 ReactUpdates.asap(forceUpdateIfMounted, this);
14264 return returnValue;
14265 }
14266
14267 module.exports = ReactDOMTextarea;
14268
14269/***/ },
14270/* 205 */
14271/***/ function(module, exports, __webpack_require__) {
14272
14273 /**
14274 * Copyright 2013-present, Facebook, Inc.
14275 * All rights reserved.
14276 *
14277 * This source code is licensed under the BSD-style license found in the
14278 * LICENSE file in the root directory of this source tree. An additional grant
14279 * of patent rights can be found in the PATENTS file in the same directory.
14280 *
14281 * @providesModule ReactMultiChild
14282 */
14283
14284 'use strict';
14285
14286 var _prodInvariant = __webpack_require__(94);
14287
14288 var ReactComponentEnvironment = __webpack_require__(206);
14289 var ReactInstanceMap = __webpack_require__(207);
14290 var ReactInstrumentation = __webpack_require__(150);
14291 var ReactMultiChildUpdateTypes = __webpack_require__(180);
14292
14293 var ReactCurrentOwner = __webpack_require__(97);
14294 var ReactReconciler = __webpack_require__(147);
14295 var ReactChildReconciler = __webpack_require__(208);
14296
14297 var emptyFunction = __webpack_require__(99);
14298 var flattenChildren = __webpack_require__(216);
14299 var invariant = __webpack_require__(95);
14300
14301 /**
14302 * Make an update for markup to be rendered and inserted at a supplied index.
14303 *
14304 * @param {string} markup Markup that renders into an element.
14305 * @param {number} toIndex Destination index.
14306 * @private
14307 */
14308 function makeInsertMarkup(markup, afterNode, toIndex) {
14309 // NOTE: Null values reduce hidden classes.
14310 return {
14311 type: ReactMultiChildUpdateTypes.INSERT_MARKUP,
14312 content: markup,
14313 fromIndex: null,
14314 fromNode: null,
14315 toIndex: toIndex,
14316 afterNode: afterNode
14317 };
14318 }
14319
14320 /**
14321 * Make an update for moving an existing element to another index.
14322 *
14323 * @param {number} fromIndex Source index of the existing element.
14324 * @param {number} toIndex Destination index of the element.
14325 * @private
14326 */
14327 function makeMove(child, afterNode, toIndex) {
14328 // NOTE: Null values reduce hidden classes.
14329 return {
14330 type: ReactMultiChildUpdateTypes.MOVE_EXISTING,
14331 content: null,
14332 fromIndex: child._mountIndex,
14333 fromNode: ReactReconciler.getHostNode(child),
14334 toIndex: toIndex,
14335 afterNode: afterNode
14336 };
14337 }
14338
14339 /**
14340 * Make an update for removing an element at an index.
14341 *
14342 * @param {number} fromIndex Index of the element to remove.
14343 * @private
14344 */
14345 function makeRemove(child, node) {
14346 // NOTE: Null values reduce hidden classes.
14347 return {
14348 type: ReactMultiChildUpdateTypes.REMOVE_NODE,
14349 content: null,
14350 fromIndex: child._mountIndex,
14351 fromNode: node,
14352 toIndex: null,
14353 afterNode: null
14354 };
14355 }
14356
14357 /**
14358 * Make an update for setting the markup of a node.
14359 *
14360 * @param {string} markup Markup that renders into an element.
14361 * @private
14362 */
14363 function makeSetMarkup(markup) {
14364 // NOTE: Null values reduce hidden classes.
14365 return {
14366 type: ReactMultiChildUpdateTypes.SET_MARKUP,
14367 content: markup,
14368 fromIndex: null,
14369 fromNode: null,
14370 toIndex: null,
14371 afterNode: null
14372 };
14373 }
14374
14375 /**
14376 * Make an update for setting the text content.
14377 *
14378 * @param {string} textContent Text content to set.
14379 * @private
14380 */
14381 function makeTextContent(textContent) {
14382 // NOTE: Null values reduce hidden classes.
14383 return {
14384 type: ReactMultiChildUpdateTypes.TEXT_CONTENT,
14385 content: textContent,
14386 fromIndex: null,
14387 fromNode: null,
14388 toIndex: null,
14389 afterNode: null
14390 };
14391 }
14392
14393 /**
14394 * Push an update, if any, onto the queue. Creates a new queue if none is
14395 * passed and always returns the queue. Mutative.
14396 */
14397 function enqueue(queue, update) {
14398 if (update) {
14399 queue = queue || [];
14400 queue.push(update);
14401 }
14402 return queue;
14403 }
14404
14405 /**
14406 * Processes any enqueued updates.
14407 *
14408 * @private
14409 */
14410 function processQueue(inst, updateQueue) {
14411 ReactComponentEnvironment.processChildrenUpdates(inst, updateQueue);
14412 }
14413
14414 var setChildrenForInstrumentation = emptyFunction;
14415 if ((undefined) !== 'production') {
14416 var getDebugID = function (inst) {
14417 if (!inst._debugID) {
14418 // Check for ART-like instances. TODO: This is silly/gross.
14419 var internal;
14420 if (internal = ReactInstanceMap.get(inst)) {
14421 inst = internal;
14422 }
14423 }
14424 return inst._debugID;
14425 };
14426 setChildrenForInstrumentation = function (children) {
14427 var debugID = getDebugID(this);
14428 // TODO: React Native empty components are also multichild.
14429 // This means they still get into this method but don't have _debugID.
14430 if (debugID !== 0) {
14431 ReactInstrumentation.debugTool.onSetChildren(debugID, children ? Object.keys(children).map(function (key) {
14432 return children[key]._debugID;
14433 }) : []);
14434 }
14435 };
14436 }
14437
14438 /**
14439 * ReactMultiChild are capable of reconciling multiple children.
14440 *
14441 * @class ReactMultiChild
14442 * @internal
14443 */
14444 var ReactMultiChild = {
14445
14446 /**
14447 * Provides common functionality for components that must reconcile multiple
14448 * children. This is used by `ReactDOMComponent` to mount, update, and
14449 * unmount child components.
14450 *
14451 * @lends {ReactMultiChild.prototype}
14452 */
14453 Mixin: {
14454
14455 _reconcilerInstantiateChildren: function (nestedChildren, transaction, context) {
14456 if ((undefined) !== 'production') {
14457 var selfDebugID = getDebugID(this);
14458 if (this._currentElement) {
14459 try {
14460 ReactCurrentOwner.current = this._currentElement._owner;
14461 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context, selfDebugID);
14462 } finally {
14463 ReactCurrentOwner.current = null;
14464 }
14465 }
14466 }
14467 return ReactChildReconciler.instantiateChildren(nestedChildren, transaction, context);
14468 },
14469
14470 _reconcilerUpdateChildren: function (prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context) {
14471 var nextChildren;
14472 var selfDebugID = 0;
14473 if ((undefined) !== 'production') {
14474 selfDebugID = getDebugID(this);
14475 if (this._currentElement) {
14476 try {
14477 ReactCurrentOwner.current = this._currentElement._owner;
14478 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
14479 } finally {
14480 ReactCurrentOwner.current = null;
14481 }
14482 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
14483 return nextChildren;
14484 }
14485 }
14486 nextChildren = flattenChildren(nextNestedChildrenElements, selfDebugID);
14487 ReactChildReconciler.updateChildren(prevChildren, nextChildren, mountImages, removedNodes, transaction, this, this._hostContainerInfo, context, selfDebugID);
14488 return nextChildren;
14489 },
14490
14491 /**
14492 * Generates a "mount image" for each of the supplied children. In the case
14493 * of `ReactDOMComponent`, a mount image is a string of markup.
14494 *
14495 * @param {?object} nestedChildren Nested child maps.
14496 * @return {array} An array of mounted representations.
14497 * @internal
14498 */
14499 mountChildren: function (nestedChildren, transaction, context) {
14500 var children = this._reconcilerInstantiateChildren(nestedChildren, transaction, context);
14501 this._renderedChildren = children;
14502
14503 var mountImages = [];
14504 var index = 0;
14505 for (var name in children) {
14506 if (children.hasOwnProperty(name)) {
14507 var child = children[name];
14508 var selfDebugID = 0;
14509 if ((undefined) !== 'production') {
14510 selfDebugID = getDebugID(this);
14511 }
14512 var mountImage = ReactReconciler.mountComponent(child, transaction, this, this._hostContainerInfo, context, selfDebugID);
14513 child._mountIndex = index++;
14514 mountImages.push(mountImage);
14515 }
14516 }
14517
14518 if ((undefined) !== 'production') {
14519 setChildrenForInstrumentation.call(this, children);
14520 }
14521
14522 return mountImages;
14523 },
14524
14525 /**
14526 * Replaces any rendered children with a text content string.
14527 *
14528 * @param {string} nextContent String of content.
14529 * @internal
14530 */
14531 updateTextContent: function (nextContent) {
14532 var prevChildren = this._renderedChildren;
14533 // Remove any rendered children.
14534 ReactChildReconciler.unmountChildren(prevChildren, false);
14535 for (var name in prevChildren) {
14536 if (prevChildren.hasOwnProperty(name)) {
14537 true ? (undefined) !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
14538 }
14539 }
14540 // Set new text content.
14541 var updates = [makeTextContent(nextContent)];
14542 processQueue(this, updates);
14543 },
14544
14545 /**
14546 * Replaces any rendered children with a markup string.
14547 *
14548 * @param {string} nextMarkup String of markup.
14549 * @internal
14550 */
14551 updateMarkup: function (nextMarkup) {
14552 var prevChildren = this._renderedChildren;
14553 // Remove any rendered children.
14554 ReactChildReconciler.unmountChildren(prevChildren, false);
14555 for (var name in prevChildren) {
14556 if (prevChildren.hasOwnProperty(name)) {
14557 true ? (undefined) !== 'production' ? invariant(false, 'updateTextContent called on non-empty component.') : _prodInvariant('118') : void 0;
14558 }
14559 }
14560 var updates = [makeSetMarkup(nextMarkup)];
14561 processQueue(this, updates);
14562 },
14563
14564 /**
14565 * Updates the rendered children with new children.
14566 *
14567 * @param {?object} nextNestedChildrenElements Nested child element maps.
14568 * @param {ReactReconcileTransaction} transaction
14569 * @internal
14570 */
14571 updateChildren: function (nextNestedChildrenElements, transaction, context) {
14572 // Hook used by React ART
14573 this._updateChildren(nextNestedChildrenElements, transaction, context);
14574 },
14575
14576 /**
14577 * @param {?object} nextNestedChildrenElements Nested child element maps.
14578 * @param {ReactReconcileTransaction} transaction
14579 * @final
14580 * @protected
14581 */
14582 _updateChildren: function (nextNestedChildrenElements, transaction, context) {
14583 var prevChildren = this._renderedChildren;
14584 var removedNodes = {};
14585 var mountImages = [];
14586 var nextChildren = this._reconcilerUpdateChildren(prevChildren, nextNestedChildrenElements, mountImages, removedNodes, transaction, context);
14587 if (!nextChildren && !prevChildren) {
14588 return;
14589 }
14590 var updates = null;
14591 var name;
14592 // `nextIndex` will increment for each child in `nextChildren`, but
14593 // `lastIndex` will be the last index visited in `prevChildren`.
14594 var nextIndex = 0;
14595 var lastIndex = 0;
14596 // `nextMountIndex` will increment for each newly mounted child.
14597 var nextMountIndex = 0;
14598 var lastPlacedNode = null;
14599 for (name in nextChildren) {
14600 if (!nextChildren.hasOwnProperty(name)) {
14601 continue;
14602 }
14603 var prevChild = prevChildren && prevChildren[name];
14604 var nextChild = nextChildren[name];
14605 if (prevChild === nextChild) {
14606 updates = enqueue(updates, this.moveChild(prevChild, lastPlacedNode, nextIndex, lastIndex));
14607 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
14608 prevChild._mountIndex = nextIndex;
14609 } else {
14610 if (prevChild) {
14611 // Update `lastIndex` before `_mountIndex` gets unset by unmounting.
14612 lastIndex = Math.max(prevChild._mountIndex, lastIndex);
14613 // The `removedNodes` loop below will actually remove the child.
14614 }
14615 // The child must be instantiated before it's mounted.
14616 updates = enqueue(updates, this._mountChildAtIndex(nextChild, mountImages[nextMountIndex], lastPlacedNode, nextIndex, transaction, context));
14617 nextMountIndex++;
14618 }
14619 nextIndex++;
14620 lastPlacedNode = ReactReconciler.getHostNode(nextChild);
14621 }
14622 // Remove children that are no longer present.
14623 for (name in removedNodes) {
14624 if (removedNodes.hasOwnProperty(name)) {
14625 updates = enqueue(updates, this._unmountChild(prevChildren[name], removedNodes[name]));
14626 }
14627 }
14628 if (updates) {
14629 processQueue(this, updates);
14630 }
14631 this._renderedChildren = nextChildren;
14632
14633 if ((undefined) !== 'production') {
14634 setChildrenForInstrumentation.call(this, nextChildren);
14635 }
14636 },
14637
14638 /**
14639 * Unmounts all rendered children. This should be used to clean up children
14640 * when this component is unmounted. It does not actually perform any
14641 * backend operations.
14642 *
14643 * @internal
14644 */
14645 unmountChildren: function (safely) {
14646 var renderedChildren = this._renderedChildren;
14647 ReactChildReconciler.unmountChildren(renderedChildren, safely);
14648 this._renderedChildren = null;
14649 },
14650
14651 /**
14652 * Moves a child component to the supplied index.
14653 *
14654 * @param {ReactComponent} child Component to move.
14655 * @param {number} toIndex Destination index of the element.
14656 * @param {number} lastIndex Last index visited of the siblings of `child`.
14657 * @protected
14658 */
14659 moveChild: function (child, afterNode, toIndex, lastIndex) {
14660 // If the index of `child` is less than `lastIndex`, then it needs to
14661 // be moved. Otherwise, we do not need to move it because a child will be
14662 // inserted or moved before `child`.
14663 if (child._mountIndex < lastIndex) {
14664 return makeMove(child, afterNode, toIndex);
14665 }
14666 },
14667
14668 /**
14669 * Creates a child component.
14670 *
14671 * @param {ReactComponent} child Component to create.
14672 * @param {string} mountImage Markup to insert.
14673 * @protected
14674 */
14675 createChild: function (child, afterNode, mountImage) {
14676 return makeInsertMarkup(mountImage, afterNode, child._mountIndex);
14677 },
14678
14679 /**
14680 * Removes a child component.
14681 *
14682 * @param {ReactComponent} child Child to remove.
14683 * @protected
14684 */
14685 removeChild: function (child, node) {
14686 return makeRemove(child, node);
14687 },
14688
14689 /**
14690 * Mounts a child with the supplied name.
14691 *
14692 * NOTE: This is part of `updateChildren` and is here for readability.
14693 *
14694 * @param {ReactComponent} child Component to mount.
14695 * @param {string} name Name of the child.
14696 * @param {number} index Index at which to insert the child.
14697 * @param {ReactReconcileTransaction} transaction
14698 * @private
14699 */
14700 _mountChildAtIndex: function (child, mountImage, afterNode, index, transaction, context) {
14701 child._mountIndex = index;
14702 return this.createChild(child, afterNode, mountImage);
14703 },
14704
14705 /**
14706 * Unmounts a rendered child.
14707 *
14708 * NOTE: This is part of `updateChildren` and is here for readability.
14709 *
14710 * @param {ReactComponent} child Component to unmount.
14711 * @private
14712 */
14713 _unmountChild: function (child, node) {
14714 var update = this.removeChild(child, node);
14715 child._mountIndex = null;
14716 return update;
14717 }
14718
14719 }
14720
14721 };
14722
14723 module.exports = ReactMultiChild;
14724
14725/***/ },
14726/* 206 */
14727/***/ function(module, exports, __webpack_require__) {
14728
14729 /**
14730 * Copyright 2014-present, Facebook, Inc.
14731 * All rights reserved.
14732 *
14733 * This source code is licensed under the BSD-style license found in the
14734 * LICENSE file in the root directory of this source tree. An additional grant
14735 * of patent rights can be found in the PATENTS file in the same directory.
14736 *
14737 * @providesModule ReactComponentEnvironment
14738 */
14739
14740 'use strict';
14741
14742 var _prodInvariant = __webpack_require__(94);
14743
14744 var invariant = __webpack_require__(95);
14745
14746 var injected = false;
14747
14748 var ReactComponentEnvironment = {
14749
14750 /**
14751 * Optionally injectable hook for swapping out mount images in the middle of
14752 * the tree.
14753 */
14754 replaceNodeWithMarkup: null,
14755
14756 /**
14757 * Optionally injectable hook for processing a queue of child updates. Will
14758 * later move into MultiChildComponents.
14759 */
14760 processChildrenUpdates: null,
14761
14762 injection: {
14763 injectEnvironment: function (environment) {
14764 !!injected ? (undefined) !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : _prodInvariant('104') : void 0;
14765 ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
14766 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
14767 injected = true;
14768 }
14769 }
14770
14771 };
14772
14773 module.exports = ReactComponentEnvironment;
14774
14775/***/ },
14776/* 207 */
14777/***/ function(module, exports) {
14778
14779 /**
14780 * Copyright 2013-present, Facebook, Inc.
14781 * All rights reserved.
14782 *
14783 * This source code is licensed under the BSD-style license found in the
14784 * LICENSE file in the root directory of this source tree. An additional grant
14785 * of patent rights can be found in the PATENTS file in the same directory.
14786 *
14787 * @providesModule ReactInstanceMap
14788 */
14789
14790 'use strict';
14791
14792 /**
14793 * `ReactInstanceMap` maintains a mapping from a public facing stateful
14794 * instance (key) and the internal representation (value). This allows public
14795 * methods to accept the user facing instance as an argument and map them back
14796 * to internal methods.
14797 */
14798
14799 // TODO: Replace this with ES6: var ReactInstanceMap = new Map();
14800
14801 var ReactInstanceMap = {
14802
14803 /**
14804 * This API should be called `delete` but we'd have to make sure to always
14805 * transform these to strings for IE support. When this transform is fully
14806 * supported we can rename it.
14807 */
14808 remove: function (key) {
14809 key._reactInternalInstance = undefined;
14810 },
14811
14812 get: function (key) {
14813 return key._reactInternalInstance;
14814 },
14815
14816 has: function (key) {
14817 return key._reactInternalInstance !== undefined;
14818 },
14819
14820 set: function (key, value) {
14821 key._reactInternalInstance = value;
14822 }
14823
14824 };
14825
14826 module.exports = ReactInstanceMap;
14827
14828/***/ },
14829/* 208 */
14830/***/ function(module, exports, __webpack_require__) {
14831
14832 /* WEBPACK VAR INJECTION */(function(process) {/**
14833 * Copyright 2014-present, Facebook, Inc.
14834 * All rights reserved.
14835 *
14836 * This source code is licensed under the BSD-style license found in the
14837 * LICENSE file in the root directory of this source tree. An additional grant
14838 * of patent rights can be found in the PATENTS file in the same directory.
14839 *
14840 * @providesModule ReactChildReconciler
14841 */
14842
14843 'use strict';
14844
14845 var ReactReconciler = __webpack_require__(147);
14846
14847 var instantiateReactComponent = __webpack_require__(209);
14848 var KeyEscapeUtils = __webpack_require__(103);
14849 var shouldUpdateReactComponent = __webpack_require__(213);
14850 var traverseAllChildren = __webpack_require__(101);
14851 var warning = __webpack_require__(98);
14852
14853 var ReactComponentTreeHook;
14854
14855 if (typeof process !== 'undefined' && ({"NODE_ENV":undefined}) && (undefined) === 'test') {
14856 // Temporary hack.
14857 // Inline requires don't work well with Jest:
14858 // https://github.com/facebook/react/issues/7240
14859 // Remove the inline requires when we don't need them anymore:
14860 // https://github.com/facebook/react/pull/7178
14861 ReactComponentTreeHook = __webpack_require__(115);
14862 }
14863
14864 function instantiateChild(childInstances, child, name, selfDebugID) {
14865 // We found a component instance.
14866 var keyUnique = childInstances[name] === undefined;
14867 if ((undefined) !== 'production') {
14868 if (!ReactComponentTreeHook) {
14869 ReactComponentTreeHook = __webpack_require__(115);
14870 }
14871 if (!keyUnique) {
14872 (undefined) !== '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;
14873 }
14874 }
14875 if (child != null && keyUnique) {
14876 childInstances[name] = instantiateReactComponent(child, true);
14877 }
14878 }
14879
14880 /**
14881 * ReactChildReconciler provides helpers for initializing or updating a set of
14882 * children. Its output is suitable for passing it onto ReactMultiChild which
14883 * does diffed reordering and insertion.
14884 */
14885 var ReactChildReconciler = {
14886 /**
14887 * Generates a "mount image" for each of the supplied children. In the case
14888 * of `ReactDOMComponent`, a mount image is a string of markup.
14889 *
14890 * @param {?object} nestedChildNodes Nested child maps.
14891 * @return {?object} A set of child instances.
14892 * @internal
14893 */
14894 instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
14895 ) {
14896 if (nestedChildNodes == null) {
14897 return null;
14898 }
14899 var childInstances = {};
14900
14901 if ((undefined) !== 'production') {
14902 traverseAllChildren(nestedChildNodes, function (childInsts, child, name) {
14903 return instantiateChild(childInsts, child, name, selfDebugID);
14904 }, childInstances);
14905 } else {
14906 traverseAllChildren(nestedChildNodes, instantiateChild, childInstances);
14907 }
14908 return childInstances;
14909 },
14910
14911 /**
14912 * Updates the rendered children and returns a new set of children.
14913 *
14914 * @param {?object} prevChildren Previously initialized set of children.
14915 * @param {?object} nextChildren Flat child element maps.
14916 * @param {ReactReconcileTransaction} transaction
14917 * @param {object} context
14918 * @return {?object} A new set of child instances.
14919 * @internal
14920 */
14921 updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
14922 ) {
14923 // We currently don't have a way to track moves here but if we use iterators
14924 // instead of for..in we can zip the iterators and check if an item has
14925 // moved.
14926 // TODO: If nothing has changed, return the prevChildren object so that we
14927 // can quickly bailout if nothing has changed.
14928 if (!nextChildren && !prevChildren) {
14929 return;
14930 }
14931 var name;
14932 var prevChild;
14933 for (name in nextChildren) {
14934 if (!nextChildren.hasOwnProperty(name)) {
14935 continue;
14936 }
14937 prevChild = prevChildren && prevChildren[name];
14938 var prevElement = prevChild && prevChild._currentElement;
14939 var nextElement = nextChildren[name];
14940 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
14941 ReactReconciler.receiveComponent(prevChild, nextElement, transaction, context);
14942 nextChildren[name] = prevChild;
14943 } else {
14944 if (prevChild) {
14945 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14946 ReactReconciler.unmountComponent(prevChild, false);
14947 }
14948 // The child must be instantiated before it's mounted.
14949 var nextChildInstance = instantiateReactComponent(nextElement, true);
14950 nextChildren[name] = nextChildInstance;
14951 // Creating mount image now ensures refs are resolved in right order
14952 // (see https://github.com/facebook/react/pull/7101 for explanation).
14953 var nextChildMountImage = ReactReconciler.mountComponent(nextChildInstance, transaction, hostParent, hostContainerInfo, context, selfDebugID);
14954 mountImages.push(nextChildMountImage);
14955 }
14956 }
14957 // Unmount children that are no longer present.
14958 for (name in prevChildren) {
14959 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
14960 prevChild = prevChildren[name];
14961 removedNodes[name] = ReactReconciler.getHostNode(prevChild);
14962 ReactReconciler.unmountComponent(prevChild, false);
14963 }
14964 }
14965 },
14966
14967 /**
14968 * Unmounts all rendered children. This should be used to clean up children
14969 * when this component is unmounted.
14970 *
14971 * @param {?object} renderedChildren Previously initialized set of children.
14972 * @internal
14973 */
14974 unmountChildren: function (renderedChildren, safely) {
14975 for (var name in renderedChildren) {
14976 if (renderedChildren.hasOwnProperty(name)) {
14977 var renderedChild = renderedChildren[name];
14978 ReactReconciler.unmountComponent(renderedChild, safely);
14979 }
14980 }
14981 }
14982
14983 };
14984
14985 module.exports = ReactChildReconciler;
14986 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117)))
14987
14988/***/ },
14989/* 209 */
14990/***/ function(module, exports, __webpack_require__) {
14991
14992 /**
14993 * Copyright 2013-present, Facebook, Inc.
14994 * All rights reserved.
14995 *
14996 * This source code is licensed under the BSD-style license found in the
14997 * LICENSE file in the root directory of this source tree. An additional grant
14998 * of patent rights can be found in the PATENTS file in the same directory.
14999 *
15000 * @providesModule instantiateReactComponent
15001 */
15002
15003 'use strict';
15004
15005 var _prodInvariant = __webpack_require__(94),
15006 _assign = __webpack_require__(91);
15007
15008 var ReactCompositeComponent = __webpack_require__(210);
15009 var ReactEmptyComponent = __webpack_require__(214);
15010 var ReactHostComponent = __webpack_require__(215);
15011
15012 var invariant = __webpack_require__(95);
15013 var warning = __webpack_require__(98);
15014
15015 // To avoid a cyclic dependency, we create the final class in this module
15016 var ReactCompositeComponentWrapper = function (element) {
15017 this.construct(element);
15018 };
15019 _assign(ReactCompositeComponentWrapper.prototype, ReactCompositeComponent.Mixin, {
15020 _instantiateReactComponent: instantiateReactComponent
15021 });
15022
15023 function getDeclarationErrorAddendum(owner) {
15024 if (owner) {
15025 var name = owner.getName();
15026 if (name) {
15027 return ' Check the render method of `' + name + '`.';
15028 }
15029 }
15030 return '';
15031 }
15032
15033 /**
15034 * Check if the type reference is a known internal type. I.e. not a user
15035 * provided composite type.
15036 *
15037 * @param {function} type
15038 * @return {boolean} Returns true if this is a valid internal type.
15039 */
15040 function isInternalComponentType(type) {
15041 return typeof type === 'function' && typeof type.prototype !== 'undefined' && typeof type.prototype.mountComponent === 'function' && typeof type.prototype.receiveComponent === 'function';
15042 }
15043
15044 var nextDebugID = 1;
15045
15046 /**
15047 * Given a ReactNode, create an instance that will actually be mounted.
15048 *
15049 * @param {ReactNode} node
15050 * @param {boolean} shouldHaveDebugID
15051 * @return {object} A new instance of the element's constructor.
15052 * @protected
15053 */
15054 function instantiateReactComponent(node, shouldHaveDebugID) {
15055 var instance;
15056
15057 if (node === null || node === false) {
15058 instance = ReactEmptyComponent.create(instantiateReactComponent);
15059 } else if (typeof node === 'object') {
15060 var element = node;
15061 !(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? (undefined) !== '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', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
15062
15063 // Special case string values
15064 if (typeof element.type === 'string') {
15065 instance = ReactHostComponent.createInternalComponent(element);
15066 } else if (isInternalComponentType(element.type)) {
15067 // This is temporarily available for custom components that are not string
15068 // representations. I.e. ART. Once those are updated to use the string
15069 // representation, we can drop this code path.
15070 instance = new element.type(element);
15071
15072 // We renamed this. Allow the old name for compat. :(
15073 if (!instance.getHostNode) {
15074 instance.getHostNode = instance.getNativeNode;
15075 }
15076 } else {
15077 instance = new ReactCompositeComponentWrapper(element);
15078 }
15079 } else if (typeof node === 'string' || typeof node === 'number') {
15080 instance = ReactHostComponent.createInstanceForText(node);
15081 } else {
15082 true ? (undefined) !== 'production' ? invariant(false, 'Encountered invalid React node of type %s', typeof node) : _prodInvariant('131', typeof node) : void 0;
15083 }
15084
15085 if ((undefined) !== 'production') {
15086 (undefined) !== '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;
15087 }
15088
15089 // These two fields are used by the DOM and ART diffing algorithms
15090 // respectively. Instead of using expandos on components, we should be
15091 // storing the state needed by the diffing algorithms elsewhere.
15092 instance._mountIndex = 0;
15093 instance._mountImage = null;
15094
15095 if ((undefined) !== 'production') {
15096 instance._debugID = shouldHaveDebugID ? nextDebugID++ : 0;
15097 }
15098
15099 // Internal instances should fully constructed at this point, so they should
15100 // not get any new fields added to them at this point.
15101 if ((undefined) !== 'production') {
15102 if (Object.preventExtensions) {
15103 Object.preventExtensions(instance);
15104 }
15105 }
15106
15107 return instance;
15108 }
15109
15110 module.exports = instantiateReactComponent;
15111
15112/***/ },
15113/* 210 */
15114/***/ function(module, exports, __webpack_require__) {
15115
15116 /**
15117 * Copyright 2013-present, Facebook, Inc.
15118 * All rights reserved.
15119 *
15120 * This source code is licensed under the BSD-style license found in the
15121 * LICENSE file in the root directory of this source tree. An additional grant
15122 * of patent rights can be found in the PATENTS file in the same directory.
15123 *
15124 * @providesModule ReactCompositeComponent
15125 */
15126
15127 'use strict';
15128
15129 var _prodInvariant = __webpack_require__(94),
15130 _assign = __webpack_require__(91);
15131
15132 var ReactComponentEnvironment = __webpack_require__(206);
15133 var ReactCurrentOwner = __webpack_require__(97);
15134 var ReactElement = __webpack_require__(96);
15135 var ReactErrorUtils = __webpack_require__(134);
15136 var ReactInstanceMap = __webpack_require__(207);
15137 var ReactInstrumentation = __webpack_require__(150);
15138 var ReactNodeTypes = __webpack_require__(211);
15139 var ReactPropTypeLocations = __webpack_require__(109);
15140 var ReactReconciler = __webpack_require__(147);
15141
15142 var checkReactTypeSpec = __webpack_require__(116);
15143 var emptyObject = __webpack_require__(106);
15144 var invariant = __webpack_require__(95);
15145 var shallowEqual = __webpack_require__(212);
15146 var shouldUpdateReactComponent = __webpack_require__(213);
15147 var warning = __webpack_require__(98);
15148
15149 var CompositeTypes = {
15150 ImpureClass: 0,
15151 PureClass: 1,
15152 StatelessFunctional: 2
15153 };
15154
15155 function StatelessComponent(Component) {}
15156 StatelessComponent.prototype.render = function () {
15157 var Component = ReactInstanceMap.get(this)._currentElement.type;
15158 var element = Component(this.props, this.context, this.updater);
15159 warnIfInvalidElement(Component, element);
15160 return element;
15161 };
15162
15163 function warnIfInvalidElement(Component, element) {
15164 if ((undefined) !== 'production') {
15165 (undefined) !== 'production' ? warning(element === null || element === false || ReactElement.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;
15166 (undefined) !== 'production' ? warning(!Component.childContextTypes, '%s(...): childContextTypes cannot be defined on a functional component.', Component.displayName || Component.name || 'Component') : void 0;
15167 }
15168 }
15169
15170 function shouldConstruct(Component) {
15171 return !!(Component.prototype && Component.prototype.isReactComponent);
15172 }
15173
15174 function isPureComponent(Component) {
15175 return !!(Component.prototype && Component.prototype.isPureReactComponent);
15176 }
15177
15178 // Separated into a function to contain deoptimizations caused by try/finally.
15179 function measureLifeCyclePerf(fn, debugID, timerType) {
15180 if (debugID === 0) {
15181 // Top-level wrappers (see ReactMount) and empty components (see
15182 // ReactDOMEmptyComponent) are invisible to hooks and devtools.
15183 // Both are implementation details that should go away in the future.
15184 return fn();
15185 }
15186
15187 ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
15188 try {
15189 return fn();
15190 } finally {
15191 ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
15192 }
15193 }
15194
15195 /**
15196 * ------------------ The Life-Cycle of a Composite Component ------------------
15197 *
15198 * - constructor: Initialization of state. The instance is now retained.
15199 * - componentWillMount
15200 * - render
15201 * - [children's constructors]
15202 * - [children's componentWillMount and render]
15203 * - [children's componentDidMount]
15204 * - componentDidMount
15205 *
15206 * Update Phases:
15207 * - componentWillReceiveProps (only called if parent updated)
15208 * - shouldComponentUpdate
15209 * - componentWillUpdate
15210 * - render
15211 * - [children's constructors or receive props phases]
15212 * - componentDidUpdate
15213 *
15214 * - componentWillUnmount
15215 * - [children's componentWillUnmount]
15216 * - [children destroyed]
15217 * - (destroyed): The instance is now blank, released by React and ready for GC.
15218 *
15219 * -----------------------------------------------------------------------------
15220 */
15221
15222 /**
15223 * An incrementing ID assigned to each component when it is mounted. This is
15224 * used to enforce the order in which `ReactUpdates` updates dirty components.
15225 *
15226 * @private
15227 */
15228 var nextMountID = 1;
15229
15230 /**
15231 * @lends {ReactCompositeComponent.prototype}
15232 */
15233 var ReactCompositeComponentMixin = {
15234
15235 /**
15236 * Base constructor for all composite component.
15237 *
15238 * @param {ReactElement} element
15239 * @final
15240 * @internal
15241 */
15242 construct: function (element) {
15243 this._currentElement = element;
15244 this._rootNodeID = 0;
15245 this._compositeType = null;
15246 this._instance = null;
15247 this._hostParent = null;
15248 this._hostContainerInfo = null;
15249
15250 // See ReactUpdateQueue
15251 this._updateBatchNumber = null;
15252 this._pendingElement = null;
15253 this._pendingStateQueue = null;
15254 this._pendingReplaceState = false;
15255 this._pendingForceUpdate = false;
15256
15257 this._renderedNodeType = null;
15258 this._renderedComponent = null;
15259 this._context = null;
15260 this._mountOrder = 0;
15261 this._topLevelWrapper = null;
15262
15263 // See ReactUpdates and ReactUpdateQueue.
15264 this._pendingCallbacks = null;
15265
15266 // ComponentWillUnmount shall only be called once
15267 this._calledComponentWillUnmount = false;
15268
15269 if ((undefined) !== 'production') {
15270 this._warnedAboutRefsInRender = false;
15271 }
15272 },
15273
15274 /**
15275 * Initializes the component, renders markup, and registers event listeners.
15276 *
15277 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
15278 * @param {?object} hostParent
15279 * @param {?object} hostContainerInfo
15280 * @param {?object} context
15281 * @return {?string} Rendered markup to be inserted into the DOM.
15282 * @final
15283 * @internal
15284 */
15285 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
15286 var _this = this;
15287
15288 this._context = context;
15289 this._mountOrder = nextMountID++;
15290 this._hostParent = hostParent;
15291 this._hostContainerInfo = hostContainerInfo;
15292
15293 var publicProps = this._currentElement.props;
15294 var publicContext = this._processContext(context);
15295
15296 var Component = this._currentElement.type;
15297
15298 var updateQueue = transaction.getUpdateQueue();
15299
15300 // Initialize the public class
15301 var doConstruct = shouldConstruct(Component);
15302 var inst = this._constructComponent(doConstruct, publicProps, publicContext, updateQueue);
15303 var renderedElement;
15304
15305 // Support functional components
15306 if (!doConstruct && (inst == null || inst.render == null)) {
15307 renderedElement = inst;
15308 warnIfInvalidElement(Component, renderedElement);
15309 !(inst === null || inst === false || ReactElement.isValidElement(inst)) ? (undefined) !== '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;
15310 inst = new StatelessComponent(Component);
15311 this._compositeType = CompositeTypes.StatelessFunctional;
15312 } else {
15313 if (isPureComponent(Component)) {
15314 this._compositeType = CompositeTypes.PureClass;
15315 } else {
15316 this._compositeType = CompositeTypes.ImpureClass;
15317 }
15318 }
15319
15320 if ((undefined) !== 'production') {
15321 // This will throw later in _renderValidatedComponent, but add an early
15322 // warning now to help debugging
15323 if (inst.render == null) {
15324 (undefined) !== '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;
15325 }
15326
15327 var propsMutated = inst.props !== publicProps;
15328 var componentName = Component.displayName || Component.name || 'Component';
15329
15330 (undefined) !== '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;
15331 }
15332
15333 // These should be set up in the constructor, but as a convenience for
15334 // simpler class abstractions, we set them up after the fact.
15335 inst.props = publicProps;
15336 inst.context = publicContext;
15337 inst.refs = emptyObject;
15338 inst.updater = updateQueue;
15339
15340 this._instance = inst;
15341
15342 // Store a reference from the instance back to the internal representation
15343 ReactInstanceMap.set(inst, this);
15344
15345 if ((undefined) !== 'production') {
15346 // Since plain JS classes are defined without any special initialization
15347 // logic, we can not catch common errors early. Therefore, we have to
15348 // catch them here, at initialization time, instead.
15349 (undefined) !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, '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;
15350 (undefined) !== '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;
15351 (undefined) !== '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;
15352 (undefined) !== '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;
15353 (undefined) !== '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;
15354 (undefined) !== '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;
15355 (undefined) !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
15356 }
15357
15358 var initialState = inst.state;
15359 if (initialState === undefined) {
15360 inst.state = initialState = null;
15361 }
15362 !(typeof initialState === 'object' && !Array.isArray(initialState)) ? (undefined) !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : _prodInvariant('106', this.getName() || 'ReactCompositeComponent') : void 0;
15363
15364 this._pendingStateQueue = null;
15365 this._pendingReplaceState = false;
15366 this._pendingForceUpdate = false;
15367
15368 var markup;
15369 if (inst.unstable_handleError) {
15370 markup = this.performInitialMountWithErrorHandling(renderedElement, hostParent, hostContainerInfo, transaction, context);
15371 } else {
15372 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15373 }
15374
15375 if (inst.componentDidMount) {
15376 if ((undefined) !== 'production') {
15377 transaction.getReactMountReady().enqueue(function () {
15378 measureLifeCyclePerf(function () {
15379 return inst.componentDidMount();
15380 }, _this._debugID, 'componentDidMount');
15381 });
15382 } else {
15383 transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
15384 }
15385 }
15386
15387 return markup;
15388 },
15389
15390 _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
15391 if ((undefined) !== 'production') {
15392 ReactCurrentOwner.current = this;
15393 try {
15394 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
15395 } finally {
15396 ReactCurrentOwner.current = null;
15397 }
15398 } else {
15399 return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
15400 }
15401 },
15402
15403 _constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
15404 var Component = this._currentElement.type;
15405
15406 if (doConstruct) {
15407 if ((undefined) !== 'production') {
15408 return measureLifeCyclePerf(function () {
15409 return new Component(publicProps, publicContext, updateQueue);
15410 }, this._debugID, 'ctor');
15411 } else {
15412 return new Component(publicProps, publicContext, updateQueue);
15413 }
15414 }
15415
15416 // This can still be an instance in case of factory components
15417 // but we'll count this as time spent rendering as the more common case.
15418 if ((undefined) !== 'production') {
15419 return measureLifeCyclePerf(function () {
15420 return Component(publicProps, publicContext, updateQueue);
15421 }, this._debugID, 'render');
15422 } else {
15423 return Component(publicProps, publicContext, updateQueue);
15424 }
15425 },
15426
15427 performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
15428 var markup;
15429 var checkpoint = transaction.checkpoint();
15430 try {
15431 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15432 } catch (e) {
15433 // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
15434 transaction.rollback(checkpoint);
15435 this._instance.unstable_handleError(e);
15436 if (this._pendingStateQueue) {
15437 this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
15438 }
15439 checkpoint = transaction.checkpoint();
15440
15441 this._renderedComponent.unmountComponent(true);
15442 transaction.rollback(checkpoint);
15443
15444 // Try again - we've informed the component about the error, so they can render an error message this time.
15445 // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
15446 markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
15447 }
15448 return markup;
15449 },
15450
15451 performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
15452 var inst = this._instance;
15453
15454 var debugID = 0;
15455 if ((undefined) !== 'production') {
15456 debugID = this._debugID;
15457 }
15458
15459 if (inst.componentWillMount) {
15460 if ((undefined) !== 'production') {
15461 measureLifeCyclePerf(function () {
15462 return inst.componentWillMount();
15463 }, debugID, 'componentWillMount');
15464 } else {
15465 inst.componentWillMount();
15466 }
15467 // When mounting, calls to `setState` by `componentWillMount` will set
15468 // `this._pendingStateQueue` without triggering a re-render.
15469 if (this._pendingStateQueue) {
15470 inst.state = this._processPendingState(inst.props, inst.context);
15471 }
15472 }
15473
15474 // If not a stateless component, we now render
15475 if (renderedElement === undefined) {
15476 renderedElement = this._renderValidatedComponent();
15477 }
15478
15479 var nodeType = ReactNodeTypes.getType(renderedElement);
15480 this._renderedNodeType = nodeType;
15481 var child = this._instantiateReactComponent(renderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15482 );
15483 this._renderedComponent = child;
15484
15485 var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
15486
15487 if ((undefined) !== 'production') {
15488 if (debugID !== 0) {
15489 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15490 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15491 }
15492 }
15493
15494 return markup;
15495 },
15496
15497 getHostNode: function () {
15498 return ReactReconciler.getHostNode(this._renderedComponent);
15499 },
15500
15501 /**
15502 * Releases any resources allocated by `mountComponent`.
15503 *
15504 * @final
15505 * @internal
15506 */
15507 unmountComponent: function (safely) {
15508 if (!this._renderedComponent) {
15509 return;
15510 }
15511
15512 var inst = this._instance;
15513
15514 if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
15515 inst._calledComponentWillUnmount = true;
15516
15517 if (safely) {
15518 var name = this.getName() + '.componentWillUnmount()';
15519 ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
15520 } else {
15521 if ((undefined) !== 'production') {
15522 measureLifeCyclePerf(function () {
15523 return inst.componentWillUnmount();
15524 }, this._debugID, 'componentWillUnmount');
15525 } else {
15526 inst.componentWillUnmount();
15527 }
15528 }
15529 }
15530
15531 if (this._renderedComponent) {
15532 ReactReconciler.unmountComponent(this._renderedComponent, safely);
15533 this._renderedNodeType = null;
15534 this._renderedComponent = null;
15535 this._instance = null;
15536 }
15537
15538 // Reset pending fields
15539 // Even if this component is scheduled for another update in ReactUpdates,
15540 // it would still be ignored because these fields are reset.
15541 this._pendingStateQueue = null;
15542 this._pendingReplaceState = false;
15543 this._pendingForceUpdate = false;
15544 this._pendingCallbacks = null;
15545 this._pendingElement = null;
15546
15547 // These fields do not really need to be reset since this object is no
15548 // longer accessible.
15549 this._context = null;
15550 this._rootNodeID = 0;
15551 this._topLevelWrapper = null;
15552
15553 // Delete the reference from the instance to this internal representation
15554 // which allow the internals to be properly cleaned up even if the user
15555 // leaks a reference to the public instance.
15556 ReactInstanceMap.remove(inst);
15557
15558 // Some existing components rely on inst.props even after they've been
15559 // destroyed (in event handlers).
15560 // TODO: inst.props = null;
15561 // TODO: inst.state = null;
15562 // TODO: inst.context = null;
15563 },
15564
15565 /**
15566 * Filters the context object to only contain keys specified in
15567 * `contextTypes`
15568 *
15569 * @param {object} context
15570 * @return {?object}
15571 * @private
15572 */
15573 _maskContext: function (context) {
15574 var Component = this._currentElement.type;
15575 var contextTypes = Component.contextTypes;
15576 if (!contextTypes) {
15577 return emptyObject;
15578 }
15579 var maskedContext = {};
15580 for (var contextName in contextTypes) {
15581 maskedContext[contextName] = context[contextName];
15582 }
15583 return maskedContext;
15584 },
15585
15586 /**
15587 * Filters the context object to only contain keys specified in
15588 * `contextTypes`, and asserts that they are valid.
15589 *
15590 * @param {object} context
15591 * @return {?object}
15592 * @private
15593 */
15594 _processContext: function (context) {
15595 var maskedContext = this._maskContext(context);
15596 if ((undefined) !== 'production') {
15597 var Component = this._currentElement.type;
15598 if (Component.contextTypes) {
15599 this._checkContextTypes(Component.contextTypes, maskedContext, ReactPropTypeLocations.context);
15600 }
15601 }
15602 return maskedContext;
15603 },
15604
15605 /**
15606 * @param {object} currentContext
15607 * @return {object}
15608 * @private
15609 */
15610 _processChildContext: function (currentContext) {
15611 var Component = this._currentElement.type;
15612 var inst = this._instance;
15613 var childContext;
15614
15615 if (inst.getChildContext) {
15616 if ((undefined) !== 'production') {
15617 ReactInstrumentation.debugTool.onBeginProcessingChildContext();
15618 try {
15619 childContext = inst.getChildContext();
15620 } finally {
15621 ReactInstrumentation.debugTool.onEndProcessingChildContext();
15622 }
15623 } else {
15624 childContext = inst.getChildContext();
15625 }
15626 }
15627
15628 if (childContext) {
15629 !(typeof Component.childContextTypes === 'object') ? (undefined) !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().', this.getName() || 'ReactCompositeComponent') : _prodInvariant('107', this.getName() || 'ReactCompositeComponent') : void 0;
15630 if ((undefined) !== 'production') {
15631 this._checkContextTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext);
15632 }
15633 for (var name in childContext) {
15634 !(name in Component.childContextTypes) ? (undefined) !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : _prodInvariant('108', this.getName() || 'ReactCompositeComponent', name) : void 0;
15635 }
15636 return _assign({}, currentContext, childContext);
15637 }
15638 return currentContext;
15639 },
15640
15641 /**
15642 * Assert that the context types are valid
15643 *
15644 * @param {object} typeSpecs Map of context field to a ReactPropType
15645 * @param {object} values Runtime values that need to be type-checked
15646 * @param {string} location e.g. "prop", "context", "child context"
15647 * @private
15648 */
15649 _checkContextTypes: function (typeSpecs, values, location) {
15650 checkReactTypeSpec(typeSpecs, values, location, this.getName(), null, this._debugID);
15651 },
15652
15653 receiveComponent: function (nextElement, transaction, nextContext) {
15654 var prevElement = this._currentElement;
15655 var prevContext = this._context;
15656
15657 this._pendingElement = null;
15658
15659 this.updateComponent(transaction, prevElement, nextElement, prevContext, nextContext);
15660 },
15661
15662 /**
15663 * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate`
15664 * is set, update the component.
15665 *
15666 * @param {ReactReconcileTransaction} transaction
15667 * @internal
15668 */
15669 performUpdateIfNecessary: function (transaction) {
15670 if (this._pendingElement != null) {
15671 ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
15672 } else if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
15673 this.updateComponent(transaction, this._currentElement, this._currentElement, this._context, this._context);
15674 } else {
15675 this._updateBatchNumber = null;
15676 }
15677 },
15678
15679 /**
15680 * Perform an update to a mounted component. The componentWillReceiveProps and
15681 * shouldComponentUpdate methods are called, then (assuming the update isn't
15682 * skipped) the remaining update lifecycle methods are called and the DOM
15683 * representation is updated.
15684 *
15685 * By default, this implements React's rendering and reconciliation algorithm.
15686 * Sophisticated clients may wish to override this.
15687 *
15688 * @param {ReactReconcileTransaction} transaction
15689 * @param {ReactElement} prevParentElement
15690 * @param {ReactElement} nextParentElement
15691 * @internal
15692 * @overridable
15693 */
15694 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
15695 var inst = this._instance;
15696 !(inst != null) ? (undefined) !== '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;
15697
15698 var willReceive = false;
15699 var nextContext;
15700
15701 // Determine if the context has changed or not
15702 if (this._context === nextUnmaskedContext) {
15703 nextContext = inst.context;
15704 } else {
15705 nextContext = this._processContext(nextUnmaskedContext);
15706 willReceive = true;
15707 }
15708
15709 var prevProps = prevParentElement.props;
15710 var nextProps = nextParentElement.props;
15711
15712 // Not a simple state update but a props update
15713 if (prevParentElement !== nextParentElement) {
15714 willReceive = true;
15715 }
15716
15717 // An update here will schedule an update but immediately set
15718 // _pendingStateQueue which will ensure that any state updates gets
15719 // immediately reconciled instead of waiting for the next batch.
15720 if (willReceive && inst.componentWillReceiveProps) {
15721 if ((undefined) !== 'production') {
15722 measureLifeCyclePerf(function () {
15723 return inst.componentWillReceiveProps(nextProps, nextContext);
15724 }, this._debugID, 'componentWillReceiveProps');
15725 } else {
15726 inst.componentWillReceiveProps(nextProps, nextContext);
15727 }
15728 }
15729
15730 var nextState = this._processPendingState(nextProps, nextContext);
15731 var shouldUpdate = true;
15732
15733 if (!this._pendingForceUpdate) {
15734 if (inst.shouldComponentUpdate) {
15735 if ((undefined) !== 'production') {
15736 shouldUpdate = measureLifeCyclePerf(function () {
15737 return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15738 }, this._debugID, 'shouldComponentUpdate');
15739 } else {
15740 shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
15741 }
15742 } else {
15743 if (this._compositeType === CompositeTypes.PureClass) {
15744 shouldUpdate = !shallowEqual(prevProps, nextProps) || !shallowEqual(inst.state, nextState);
15745 }
15746 }
15747 }
15748
15749 if ((undefined) !== 'production') {
15750 (undefined) !== '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;
15751 }
15752
15753 this._updateBatchNumber = null;
15754 if (shouldUpdate) {
15755 this._pendingForceUpdate = false;
15756 // Will set `this.props`, `this.state` and `this.context`.
15757 this._performComponentUpdate(nextParentElement, nextProps, nextState, nextContext, transaction, nextUnmaskedContext);
15758 } else {
15759 // If it's determined that a component should not update, we still want
15760 // to set props and state but we shortcut the rest of the update.
15761 this._currentElement = nextParentElement;
15762 this._context = nextUnmaskedContext;
15763 inst.props = nextProps;
15764 inst.state = nextState;
15765 inst.context = nextContext;
15766 }
15767 },
15768
15769 _processPendingState: function (props, context) {
15770 var inst = this._instance;
15771 var queue = this._pendingStateQueue;
15772 var replace = this._pendingReplaceState;
15773 this._pendingReplaceState = false;
15774 this._pendingStateQueue = null;
15775
15776 if (!queue) {
15777 return inst.state;
15778 }
15779
15780 if (replace && queue.length === 1) {
15781 return queue[0];
15782 }
15783
15784 var nextState = _assign({}, replace ? queue[0] : inst.state);
15785 for (var i = replace ? 1 : 0; i < queue.length; i++) {
15786 var partial = queue[i];
15787 _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
15788 }
15789
15790 return nextState;
15791 },
15792
15793 /**
15794 * Merges new props and state, notifies delegate methods of update and
15795 * performs update.
15796 *
15797 * @param {ReactElement} nextElement Next element
15798 * @param {object} nextProps Next public object to set as properties.
15799 * @param {?object} nextState Next object to set as state.
15800 * @param {?object} nextContext Next public object to set as context.
15801 * @param {ReactReconcileTransaction} transaction
15802 * @param {?object} unmaskedContext
15803 * @private
15804 */
15805 _performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
15806 var _this2 = this;
15807
15808 var inst = this._instance;
15809
15810 var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
15811 var prevProps;
15812 var prevState;
15813 var prevContext;
15814 if (hasComponentDidUpdate) {
15815 prevProps = inst.props;
15816 prevState = inst.state;
15817 prevContext = inst.context;
15818 }
15819
15820 if (inst.componentWillUpdate) {
15821 if ((undefined) !== 'production') {
15822 measureLifeCyclePerf(function () {
15823 return inst.componentWillUpdate(nextProps, nextState, nextContext);
15824 }, this._debugID, 'componentWillUpdate');
15825 } else {
15826 inst.componentWillUpdate(nextProps, nextState, nextContext);
15827 }
15828 }
15829
15830 this._currentElement = nextElement;
15831 this._context = unmaskedContext;
15832 inst.props = nextProps;
15833 inst.state = nextState;
15834 inst.context = nextContext;
15835
15836 this._updateRenderedComponent(transaction, unmaskedContext);
15837
15838 if (hasComponentDidUpdate) {
15839 if ((undefined) !== 'production') {
15840 transaction.getReactMountReady().enqueue(function () {
15841 measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
15842 });
15843 } else {
15844 transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
15845 }
15846 }
15847 },
15848
15849 /**
15850 * Call the component's `render` method and update the DOM accordingly.
15851 *
15852 * @param {ReactReconcileTransaction} transaction
15853 * @internal
15854 */
15855 _updateRenderedComponent: function (transaction, context) {
15856 var prevComponentInstance = this._renderedComponent;
15857 var prevRenderedElement = prevComponentInstance._currentElement;
15858 var nextRenderedElement = this._renderValidatedComponent();
15859
15860 var debugID = 0;
15861 if ((undefined) !== 'production') {
15862 debugID = this._debugID;
15863 }
15864
15865 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
15866 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
15867 } else {
15868 var oldHostNode = ReactReconciler.getHostNode(prevComponentInstance);
15869 ReactReconciler.unmountComponent(prevComponentInstance, false);
15870
15871 var nodeType = ReactNodeTypes.getType(nextRenderedElement);
15872 this._renderedNodeType = nodeType;
15873 var child = this._instantiateReactComponent(nextRenderedElement, nodeType !== ReactNodeTypes.EMPTY /* shouldHaveDebugID */
15874 );
15875 this._renderedComponent = child;
15876
15877 var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
15878
15879 if ((undefined) !== 'production') {
15880 if (debugID !== 0) {
15881 var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
15882 ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
15883 }
15884 }
15885
15886 this._replaceNodeWithMarkup(oldHostNode, nextMarkup, prevComponentInstance);
15887 }
15888 },
15889
15890 /**
15891 * Overridden in shallow rendering.
15892 *
15893 * @protected
15894 */
15895 _replaceNodeWithMarkup: function (oldHostNode, nextMarkup, prevInstance) {
15896 ReactComponentEnvironment.replaceNodeWithMarkup(oldHostNode, nextMarkup, prevInstance);
15897 },
15898
15899 /**
15900 * @protected
15901 */
15902 _renderValidatedComponentWithoutOwnerOrContext: function () {
15903 var inst = this._instance;
15904 var renderedComponent;
15905
15906 if ((undefined) !== 'production') {
15907 renderedComponent = measureLifeCyclePerf(function () {
15908 return inst.render();
15909 }, this._debugID, 'render');
15910 } else {
15911 renderedComponent = inst.render();
15912 }
15913
15914 if ((undefined) !== 'production') {
15915 // We allow auto-mocks to proceed as if they're returning null.
15916 if (renderedComponent === undefined && inst.render._isMockFunction) {
15917 // This is probably bad practice. Consider warning here and
15918 // deprecating this convenience.
15919 renderedComponent = null;
15920 }
15921 }
15922
15923 return renderedComponent;
15924 },
15925
15926 /**
15927 * @private
15928 */
15929 _renderValidatedComponent: function () {
15930 var renderedComponent;
15931 if ((undefined) !== 'production' || this._compositeType !== CompositeTypes.StatelessFunctional) {
15932 ReactCurrentOwner.current = this;
15933 try {
15934 renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
15935 } finally {
15936 ReactCurrentOwner.current = null;
15937 }
15938 } else {
15939 renderedComponent = this._renderValidatedComponentWithoutOwnerOrContext();
15940 }
15941 !(
15942 // TODO: An `isValidNode` function would probably be more appropriate
15943 renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? (undefined) !== '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;
15944
15945 return renderedComponent;
15946 },
15947
15948 /**
15949 * Lazily allocates the refs object and stores `component` as `ref`.
15950 *
15951 * @param {string} ref Reference name.
15952 * @param {component} component Component to store as `ref`.
15953 * @final
15954 * @private
15955 */
15956 attachRef: function (ref, component) {
15957 var inst = this.getPublicInstance();
15958 !(inst != null) ? (undefined) !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : _prodInvariant('110') : void 0;
15959 var publicComponentInstance = component.getPublicInstance();
15960 if ((undefined) !== 'production') {
15961 var componentName = component && component.getName ? component.getName() : 'a component';
15962 (undefined) !== '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;
15963 }
15964 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
15965 refs[ref] = publicComponentInstance;
15966 },
15967
15968 /**
15969 * Detaches a reference name.
15970 *
15971 * @param {string} ref Name to dereference.
15972 * @final
15973 * @private
15974 */
15975 detachRef: function (ref) {
15976 var refs = this.getPublicInstance().refs;
15977 delete refs[ref];
15978 },
15979
15980 /**
15981 * Get a text description of the component that can be used to identify it
15982 * in error messages.
15983 * @return {string} The name or null.
15984 * @internal
15985 */
15986 getName: function () {
15987 var type = this._currentElement.type;
15988 var constructor = this._instance && this._instance.constructor;
15989 return type.displayName || constructor && constructor.displayName || type.name || constructor && constructor.name || null;
15990 },
15991
15992 /**
15993 * Get the publicly accessible representation of this component - i.e. what
15994 * is exposed by refs and returned by render. Can be null for stateless
15995 * components.
15996 *
15997 * @return {ReactComponent} the public component instance.
15998 * @internal
15999 */
16000 getPublicInstance: function () {
16001 var inst = this._instance;
16002 if (this._compositeType === CompositeTypes.StatelessFunctional) {
16003 return null;
16004 }
16005 return inst;
16006 },
16007
16008 // Stub
16009 _instantiateReactComponent: null
16010
16011 };
16012
16013 var ReactCompositeComponent = {
16014
16015 Mixin: ReactCompositeComponentMixin
16016
16017 };
16018
16019 module.exports = ReactCompositeComponent;
16020
16021/***/ },
16022/* 211 */
16023/***/ function(module, exports, __webpack_require__) {
16024
16025 /**
16026 * Copyright 2013-present, Facebook, Inc.
16027 * All rights reserved.
16028 *
16029 * This source code is licensed under the BSD-style license found in the
16030 * LICENSE file in the root directory of this source tree. An additional grant
16031 * of patent rights can be found in the PATENTS file in the same directory.
16032 *
16033 * @providesModule ReactNodeTypes
16034 *
16035 */
16036
16037 'use strict';
16038
16039 var _prodInvariant = __webpack_require__(94);
16040
16041 var ReactElement = __webpack_require__(96);
16042
16043 var invariant = __webpack_require__(95);
16044
16045 var ReactNodeTypes = {
16046 HOST: 0,
16047 COMPOSITE: 1,
16048 EMPTY: 2,
16049
16050 getType: function (node) {
16051 if (node === null || node === false) {
16052 return ReactNodeTypes.EMPTY;
16053 } else if (ReactElement.isValidElement(node)) {
16054 if (typeof node.type === 'function') {
16055 return ReactNodeTypes.COMPOSITE;
16056 } else {
16057 return ReactNodeTypes.HOST;
16058 }
16059 }
16060 true ? (undefined) !== 'production' ? invariant(false, 'Unexpected node: %s', node) : _prodInvariant('26', node) : void 0;
16061 }
16062 };
16063
16064 module.exports = ReactNodeTypes;
16065
16066/***/ },
16067/* 212 */
16068/***/ function(module, exports) {
16069
16070 /**
16071 * Copyright (c) 2013-present, Facebook, Inc.
16072 * All rights reserved.
16073 *
16074 * This source code is licensed under the BSD-style license found in the
16075 * LICENSE file in the root directory of this source tree. An additional grant
16076 * of patent rights can be found in the PATENTS file in the same directory.
16077 *
16078 * @typechecks
16079 *
16080 */
16081
16082 /*eslint-disable no-self-compare */
16083
16084 'use strict';
16085
16086 var hasOwnProperty = Object.prototype.hasOwnProperty;
16087
16088 /**
16089 * inlined Object.is polyfill to avoid requiring consumers ship their own
16090 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
16091 */
16092 function is(x, y) {
16093 // SameValue algorithm
16094 if (x === y) {
16095 // Steps 1-5, 7-10
16096 // Steps 6.b-6.e: +0 != -0
16097 // Added the nonzero y check to make Flow happy, but it is redundant
16098 return x !== 0 || y !== 0 || 1 / x === 1 / y;
16099 } else {
16100 // Step 6.a: NaN == NaN
16101 return x !== x && y !== y;
16102 }
16103 }
16104
16105 /**
16106 * Performs equality by iterating through keys on an object and returning false
16107 * when any key has values which are not strictly equal between the arguments.
16108 * Returns true when the values of all keys are strictly equal.
16109 */
16110 function shallowEqual(objA, objB) {
16111 if (is(objA, objB)) {
16112 return true;
16113 }
16114
16115 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
16116 return false;
16117 }
16118
16119 var keysA = Object.keys(objA);
16120 var keysB = Object.keys(objB);
16121
16122 if (keysA.length !== keysB.length) {
16123 return false;
16124 }
16125
16126 // Test for A's keys different from B.
16127 for (var i = 0; i < keysA.length; i++) {
16128 if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
16129 return false;
16130 }
16131 }
16132
16133 return true;
16134 }
16135
16136 module.exports = shallowEqual;
16137
16138/***/ },
16139/* 213 */
16140/***/ function(module, exports) {
16141
16142 /**
16143 * Copyright 2013-present, Facebook, Inc.
16144 * All rights reserved.
16145 *
16146 * This source code is licensed under the BSD-style license found in the
16147 * LICENSE file in the root directory of this source tree. An additional grant
16148 * of patent rights can be found in the PATENTS file in the same directory.
16149 *
16150 * @providesModule shouldUpdateReactComponent
16151 */
16152
16153 'use strict';
16154
16155 /**
16156 * Given a `prevElement` and `nextElement`, determines if the existing
16157 * instance should be updated as opposed to being destroyed or replaced by a new
16158 * instance. Both arguments are elements. This ensures that this logic can
16159 * operate on stateless trees without any backing instance.
16160 *
16161 * @param {?object} prevElement
16162 * @param {?object} nextElement
16163 * @return {boolean} True if the existing instance should be updated.
16164 * @protected
16165 */
16166
16167 function shouldUpdateReactComponent(prevElement, nextElement) {
16168 var prevEmpty = prevElement === null || prevElement === false;
16169 var nextEmpty = nextElement === null || nextElement === false;
16170 if (prevEmpty || nextEmpty) {
16171 return prevEmpty === nextEmpty;
16172 }
16173
16174 var prevType = typeof prevElement;
16175 var nextType = typeof nextElement;
16176 if (prevType === 'string' || prevType === 'number') {
16177 return nextType === 'string' || nextType === 'number';
16178 } else {
16179 return nextType === 'object' && prevElement.type === nextElement.type && prevElement.key === nextElement.key;
16180 }
16181 }
16182
16183 module.exports = shouldUpdateReactComponent;
16184
16185/***/ },
16186/* 214 */
16187/***/ function(module, exports) {
16188
16189 /**
16190 * Copyright 2014-present, Facebook, Inc.
16191 * All rights reserved.
16192 *
16193 * This source code is licensed under the BSD-style license found in the
16194 * LICENSE file in the root directory of this source tree. An additional grant
16195 * of patent rights can be found in the PATENTS file in the same directory.
16196 *
16197 * @providesModule ReactEmptyComponent
16198 */
16199
16200 'use strict';
16201
16202 var emptyComponentFactory;
16203
16204 var ReactEmptyComponentInjection = {
16205 injectEmptyComponentFactory: function (factory) {
16206 emptyComponentFactory = factory;
16207 }
16208 };
16209
16210 var ReactEmptyComponent = {
16211 create: function (instantiate) {
16212 return emptyComponentFactory(instantiate);
16213 }
16214 };
16215
16216 ReactEmptyComponent.injection = ReactEmptyComponentInjection;
16217
16218 module.exports = ReactEmptyComponent;
16219
16220/***/ },
16221/* 215 */
16222/***/ function(module, exports, __webpack_require__) {
16223
16224 /**
16225 * Copyright 2014-present, Facebook, Inc.
16226 * All rights reserved.
16227 *
16228 * This source code is licensed under the BSD-style license found in the
16229 * LICENSE file in the root directory of this source tree. An additional grant
16230 * of patent rights can be found in the PATENTS file in the same directory.
16231 *
16232 * @providesModule ReactHostComponent
16233 */
16234
16235 'use strict';
16236
16237 var _prodInvariant = __webpack_require__(94),
16238 _assign = __webpack_require__(91);
16239
16240 var invariant = __webpack_require__(95);
16241
16242 var genericComponentClass = null;
16243 // This registry keeps track of wrapper classes around host tags.
16244 var tagToComponentClass = {};
16245 var textComponentClass = null;
16246
16247 var ReactHostComponentInjection = {
16248 // This accepts a class that receives the tag string. This is a catch all
16249 // that can render any kind of tag.
16250 injectGenericComponentClass: function (componentClass) {
16251 genericComponentClass = componentClass;
16252 },
16253 // This accepts a text component class that takes the text string to be
16254 // rendered as props.
16255 injectTextComponentClass: function (componentClass) {
16256 textComponentClass = componentClass;
16257 },
16258 // This accepts a keyed object with classes as values. Each key represents a
16259 // tag. That particular tag will use this class instead of the generic one.
16260 injectComponentClasses: function (componentClasses) {
16261 _assign(tagToComponentClass, componentClasses);
16262 }
16263 };
16264
16265 /**
16266 * Get a host internal component class for a specific tag.
16267 *
16268 * @param {ReactElement} element The element to create.
16269 * @return {function} The internal class constructor function.
16270 */
16271 function createInternalComponent(element) {
16272 !genericComponentClass ? (undefined) !== 'production' ? invariant(false, 'There is no registered component for the tag %s', element.type) : _prodInvariant('111', element.type) : void 0;
16273 return new genericComponentClass(element);
16274 }
16275
16276 /**
16277 * @param {ReactText} text
16278 * @return {ReactComponent}
16279 */
16280 function createInstanceForText(text) {
16281 return new textComponentClass(text);
16282 }
16283
16284 /**
16285 * @param {ReactComponent} component
16286 * @return {boolean}
16287 */
16288 function isTextComponent(component) {
16289 return component instanceof textComponentClass;
16290 }
16291
16292 var ReactHostComponent = {
16293 createInternalComponent: createInternalComponent,
16294 createInstanceForText: createInstanceForText,
16295 isTextComponent: isTextComponent,
16296 injection: ReactHostComponentInjection
16297 };
16298
16299 module.exports = ReactHostComponent;
16300
16301/***/ },
16302/* 216 */
16303/***/ function(module, exports, __webpack_require__) {
16304
16305 /* WEBPACK VAR INJECTION */(function(process) {/**
16306 * Copyright 2013-present, Facebook, Inc.
16307 * All rights reserved.
16308 *
16309 * This source code is licensed under the BSD-style license found in the
16310 * LICENSE file in the root directory of this source tree. An additional grant
16311 * of patent rights can be found in the PATENTS file in the same directory.
16312 *
16313 * @providesModule flattenChildren
16314 *
16315 */
16316
16317 'use strict';
16318
16319 var KeyEscapeUtils = __webpack_require__(103);
16320 var traverseAllChildren = __webpack_require__(101);
16321 var warning = __webpack_require__(98);
16322
16323 var ReactComponentTreeHook;
16324
16325 if (typeof process !== 'undefined' && ({"NODE_ENV":undefined}) && (undefined) === 'test') {
16326 // Temporary hack.
16327 // Inline requires don't work well with Jest:
16328 // https://github.com/facebook/react/issues/7240
16329 // Remove the inline requires when we don't need them anymore:
16330 // https://github.com/facebook/react/pull/7178
16331 ReactComponentTreeHook = __webpack_require__(115);
16332 }
16333
16334 /**
16335 * @param {function} traverseContext Context passed through traversal.
16336 * @param {?ReactComponent} child React child component.
16337 * @param {!string} name String name of key path to child.
16338 * @param {number=} selfDebugID Optional debugID of the current internal instance.
16339 */
16340 function flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID) {
16341 // We found a component instance.
16342 if (traverseContext && typeof traverseContext === 'object') {
16343 var result = traverseContext;
16344 var keyUnique = result[name] === undefined;
16345 if ((undefined) !== 'production') {
16346 if (!ReactComponentTreeHook) {
16347 ReactComponentTreeHook = __webpack_require__(115);
16348 }
16349 if (!keyUnique) {
16350 (undefined) !== '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;
16351 }
16352 }
16353 if (keyUnique && child != null) {
16354 result[name] = child;
16355 }
16356 }
16357 }
16358
16359 /**
16360 * Flattens children that are typically specified as `props.children`. Any null
16361 * children will not be included in the resulting object.
16362 * @return {!object} flattened children keyed by name.
16363 */
16364 function flattenChildren(children, selfDebugID) {
16365 if (children == null) {
16366 return children;
16367 }
16368 var result = {};
16369
16370 if ((undefined) !== 'production') {
16371 traverseAllChildren(children, function (traverseContext, child, name) {
16372 return flattenSingleChildIntoContext(traverseContext, child, name, selfDebugID);
16373 }, result);
16374 } else {
16375 traverseAllChildren(children, flattenSingleChildIntoContext, result);
16376 }
16377 return result;
16378 }
16379
16380 module.exports = flattenChildren;
16381 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(117)))
16382
16383/***/ },
16384/* 217 */
16385/***/ function(module, exports, __webpack_require__) {
16386
16387 /**
16388 * Copyright 2014-present, Facebook, Inc.
16389 * All rights reserved.
16390 *
16391 * This source code is licensed under the BSD-style license found in the
16392 * LICENSE file in the root directory of this source tree. An additional grant
16393 * of patent rights can be found in the PATENTS file in the same directory.
16394 *
16395 * @providesModule ReactServerRenderingTransaction
16396 */
16397
16398 'use strict';
16399
16400 var _assign = __webpack_require__(91);
16401
16402 var PooledClass = __webpack_require__(93);
16403 var Transaction = __webpack_require__(157);
16404 var ReactInstrumentation = __webpack_require__(150);
16405 var ReactServerUpdateQueue = __webpack_require__(218);
16406
16407 /**
16408 * Executed within the scope of the `Transaction` instance. Consider these as
16409 * being member methods, but with an implied ordering while being isolated from
16410 * each other.
16411 */
16412 var TRANSACTION_WRAPPERS = [];
16413
16414 if ((undefined) !== 'production') {
16415 TRANSACTION_WRAPPERS.push({
16416 initialize: ReactInstrumentation.debugTool.onBeginFlush,
16417 close: ReactInstrumentation.debugTool.onEndFlush
16418 });
16419 }
16420
16421 var noopCallbackQueue = {
16422 enqueue: function () {}
16423 };
16424
16425 /**
16426 * @class ReactServerRenderingTransaction
16427 * @param {boolean} renderToStaticMarkup
16428 */
16429 function ReactServerRenderingTransaction(renderToStaticMarkup) {
16430 this.reinitializeTransaction();
16431 this.renderToStaticMarkup = renderToStaticMarkup;
16432 this.useCreateElement = false;
16433 this.updateQueue = new ReactServerUpdateQueue(this);
16434 }
16435
16436 var Mixin = {
16437 /**
16438 * @see Transaction
16439 * @abstract
16440 * @final
16441 * @return {array} Empty list of operation wrap procedures.
16442 */
16443 getTransactionWrappers: function () {
16444 return TRANSACTION_WRAPPERS;
16445 },
16446
16447 /**
16448 * @return {object} The queue to collect `onDOMReady` callbacks with.
16449 */
16450 getReactMountReady: function () {
16451 return noopCallbackQueue;
16452 },
16453
16454 /**
16455 * @return {object} The queue to collect React async events.
16456 */
16457 getUpdateQueue: function () {
16458 return this.updateQueue;
16459 },
16460
16461 /**
16462 * `PooledClass` looks for this, and will invoke this before allowing this
16463 * instance to be reused.
16464 */
16465 destructor: function () {},
16466
16467 checkpoint: function () {},
16468
16469 rollback: function () {}
16470 };
16471
16472 _assign(ReactServerRenderingTransaction.prototype, Transaction.Mixin, Mixin);
16473
16474 PooledClass.addPoolingTo(ReactServerRenderingTransaction);
16475
16476 module.exports = ReactServerRenderingTransaction;
16477
16478/***/ },
16479/* 218 */
16480/***/ function(module, exports, __webpack_require__) {
16481
16482 /**
16483 * Copyright 2015-present, Facebook, Inc.
16484 * All rights reserved.
16485 *
16486 * This source code is licensed under the BSD-style license found in the
16487 * LICENSE file in the root directory of this source tree. An additional grant
16488 * of patent rights can be found in the PATENTS file in the same directory.
16489 *
16490 * @providesModule ReactServerUpdateQueue
16491 *
16492 */
16493
16494 'use strict';
16495
16496 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16497
16498 var ReactUpdateQueue = __webpack_require__(219);
16499 var Transaction = __webpack_require__(157);
16500 var warning = __webpack_require__(98);
16501
16502 function warnNoop(publicInstance, callerName) {
16503 if ((undefined) !== 'production') {
16504 var constructor = publicInstance.constructor;
16505 (undefined) !== '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;
16506 }
16507 }
16508
16509 /**
16510 * This is the update queue used for server rendering.
16511 * It delegates to ReactUpdateQueue while server rendering is in progress and
16512 * switches to ReactNoopUpdateQueue after the transaction has completed.
16513 * @class ReactServerUpdateQueue
16514 * @param {Transaction} transaction
16515 */
16516
16517 var ReactServerUpdateQueue = function () {
16518 /* :: transaction: Transaction; */
16519
16520 function ReactServerUpdateQueue(transaction) {
16521 _classCallCheck(this, ReactServerUpdateQueue);
16522
16523 this.transaction = transaction;
16524 }
16525
16526 /**
16527 * Checks whether or not this composite component is mounted.
16528 * @param {ReactClass} publicInstance The instance we want to test.
16529 * @return {boolean} True if mounted, false otherwise.
16530 * @protected
16531 * @final
16532 */
16533
16534
16535 ReactServerUpdateQueue.prototype.isMounted = function isMounted(publicInstance) {
16536 return false;
16537 };
16538
16539 /**
16540 * Enqueue a callback that will be executed after all the pending updates
16541 * have processed.
16542 *
16543 * @param {ReactClass} publicInstance The instance to use as `this` context.
16544 * @param {?function} callback Called after state is updated.
16545 * @internal
16546 */
16547
16548
16549 ReactServerUpdateQueue.prototype.enqueueCallback = function enqueueCallback(publicInstance, callback, callerName) {
16550 if (this.transaction.isInTransaction()) {
16551 ReactUpdateQueue.enqueueCallback(publicInstance, callback, callerName);
16552 }
16553 };
16554
16555 /**
16556 * Forces an update. This should only be invoked when it is known with
16557 * certainty that we are **not** in a DOM transaction.
16558 *
16559 * You may want to call this when you know that some deeper aspect of the
16560 * component's state has changed but `setState` was not called.
16561 *
16562 * This will not invoke `shouldComponentUpdate`, but it will invoke
16563 * `componentWillUpdate` and `componentDidUpdate`.
16564 *
16565 * @param {ReactClass} publicInstance The instance that should rerender.
16566 * @internal
16567 */
16568
16569
16570 ReactServerUpdateQueue.prototype.enqueueForceUpdate = function enqueueForceUpdate(publicInstance) {
16571 if (this.transaction.isInTransaction()) {
16572 ReactUpdateQueue.enqueueForceUpdate(publicInstance);
16573 } else {
16574 warnNoop(publicInstance, 'forceUpdate');
16575 }
16576 };
16577
16578 /**
16579 * Replaces all of the state. Always use this or `setState` to mutate state.
16580 * You should treat `this.state` as immutable.
16581 *
16582 * There is no guarantee that `this.state` will be immediately updated, so
16583 * accessing `this.state` after calling this method may return the old value.
16584 *
16585 * @param {ReactClass} publicInstance The instance that should rerender.
16586 * @param {object|function} completeState Next state.
16587 * @internal
16588 */
16589
16590
16591 ReactServerUpdateQueue.prototype.enqueueReplaceState = function enqueueReplaceState(publicInstance, completeState) {
16592 if (this.transaction.isInTransaction()) {
16593 ReactUpdateQueue.enqueueReplaceState(publicInstance, completeState);
16594 } else {
16595 warnNoop(publicInstance, 'replaceState');
16596 }
16597 };
16598
16599 /**
16600 * Sets a subset of the state. This only exists because _pendingState is
16601 * internal. This provides a merging strategy that is not available to deep
16602 * properties which is confusing. TODO: Expose pendingState or don't use it
16603 * during the merge.
16604 *
16605 * @param {ReactClass} publicInstance The instance that should rerender.
16606 * @param {object|function} partialState Next partial state to be merged with state.
16607 * @internal
16608 */
16609
16610
16611 ReactServerUpdateQueue.prototype.enqueueSetState = function enqueueSetState(publicInstance, partialState) {
16612 if (this.transaction.isInTransaction()) {
16613 ReactUpdateQueue.enqueueSetState(publicInstance, partialState);
16614 } else {
16615 warnNoop(publicInstance, 'setState');
16616 }
16617 };
16618
16619 return ReactServerUpdateQueue;
16620 }();
16621
16622 module.exports = ReactServerUpdateQueue;
16623
16624/***/ },
16625/* 219 */
16626/***/ function(module, exports, __webpack_require__) {
16627
16628 /**
16629 * Copyright 2015-present, Facebook, Inc.
16630 * All rights reserved.
16631 *
16632 * This source code is licensed under the BSD-style license found in the
16633 * LICENSE file in the root directory of this source tree. An additional grant
16634 * of patent rights can be found in the PATENTS file in the same directory.
16635 *
16636 * @providesModule ReactUpdateQueue
16637 */
16638
16639 'use strict';
16640
16641 var _prodInvariant = __webpack_require__(94);
16642
16643 var ReactCurrentOwner = __webpack_require__(97);
16644 var ReactInstanceMap = __webpack_require__(207);
16645 var ReactInstrumentation = __webpack_require__(150);
16646 var ReactUpdates = __webpack_require__(144);
16647
16648 var invariant = __webpack_require__(95);
16649 var warning = __webpack_require__(98);
16650
16651 function enqueueUpdate(internalInstance) {
16652 ReactUpdates.enqueueUpdate(internalInstance);
16653 }
16654
16655 function formatUnexpectedArgument(arg) {
16656 var type = typeof arg;
16657 if (type !== 'object') {
16658 return type;
16659 }
16660 var displayName = arg.constructor && arg.constructor.name || type;
16661 var keys = Object.keys(arg);
16662 if (keys.length > 0 && keys.length < 20) {
16663 return displayName + ' (keys: ' + keys.join(', ') + ')';
16664 }
16665 return displayName;
16666 }
16667
16668 function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
16669 var internalInstance = ReactInstanceMap.get(publicInstance);
16670 if (!internalInstance) {
16671 if ((undefined) !== 'production') {
16672 var ctor = publicInstance.constructor;
16673 // Only warn when we have a callerName. Otherwise we should be silent.
16674 // We're probably calling from enqueueCallback. We don't want to warn
16675 // there because we already warned for the corresponding lifecycle method.
16676 (undefined) !== '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;
16677 }
16678 return null;
16679 }
16680
16681 if ((undefined) !== 'production') {
16682 (undefined) !== '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;
16683 }
16684
16685 return internalInstance;
16686 }
16687
16688 /**
16689 * ReactUpdateQueue allows for state updates to be scheduled into a later
16690 * reconciliation step.
16691 */
16692 var ReactUpdateQueue = {
16693
16694 /**
16695 * Checks whether or not this composite component is mounted.
16696 * @param {ReactClass} publicInstance The instance we want to test.
16697 * @return {boolean} True if mounted, false otherwise.
16698 * @protected
16699 * @final
16700 */
16701 isMounted: function (publicInstance) {
16702 if ((undefined) !== 'production') {
16703 var owner = ReactCurrentOwner.current;
16704 if (owner !== null) {
16705 (undefined) !== '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;
16706 owner._warnedAboutRefsInRender = true;
16707 }
16708 }
16709 var internalInstance = ReactInstanceMap.get(publicInstance);
16710 if (internalInstance) {
16711 // During componentWillMount and render this will still be null but after
16712 // that will always render to something. At least for now. So we can use
16713 // this hack.
16714 return !!internalInstance._renderedComponent;
16715 } else {
16716 return false;
16717 }
16718 },
16719
16720 /**
16721 * Enqueue a callback that will be executed after all the pending updates
16722 * have processed.
16723 *
16724 * @param {ReactClass} publicInstance The instance to use as `this` context.
16725 * @param {?function} callback Called after state is updated.
16726 * @param {string} callerName Name of the calling function in the public API.
16727 * @internal
16728 */
16729 enqueueCallback: function (publicInstance, callback, callerName) {
16730 ReactUpdateQueue.validateCallback(callback, callerName);
16731 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
16732
16733 // Previously we would throw an error if we didn't have an internal
16734 // instance. Since we want to make it a no-op instead, we mirror the same
16735 // behavior we have in other enqueue* methods.
16736 // We also need to ignore callbacks in componentWillMount. See
16737 // enqueueUpdates.
16738 if (!internalInstance) {
16739 return null;
16740 }
16741
16742 if (internalInstance._pendingCallbacks) {
16743 internalInstance._pendingCallbacks.push(callback);
16744 } else {
16745 internalInstance._pendingCallbacks = [callback];
16746 }
16747 // TODO: The callback here is ignored when setState is called from
16748 // componentWillMount. Either fix it or disallow doing so completely in
16749 // favor of getInitialState. Alternatively, we can disallow
16750 // componentWillMount during server-side rendering.
16751 enqueueUpdate(internalInstance);
16752 },
16753
16754 enqueueCallbackInternal: function (internalInstance, callback) {
16755 if (internalInstance._pendingCallbacks) {
16756 internalInstance._pendingCallbacks.push(callback);
16757 } else {
16758 internalInstance._pendingCallbacks = [callback];
16759 }
16760 enqueueUpdate(internalInstance);
16761 },
16762
16763 /**
16764 * Forces an update. This should only be invoked when it is known with
16765 * certainty that we are **not** in a DOM transaction.
16766 *
16767 * You may want to call this when you know that some deeper aspect of the
16768 * component's state has changed but `setState` was not called.
16769 *
16770 * This will not invoke `shouldComponentUpdate`, but it will invoke
16771 * `componentWillUpdate` and `componentDidUpdate`.
16772 *
16773 * @param {ReactClass} publicInstance The instance that should rerender.
16774 * @internal
16775 */
16776 enqueueForceUpdate: function (publicInstance) {
16777 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'forceUpdate');
16778
16779 if (!internalInstance) {
16780 return;
16781 }
16782
16783 internalInstance._pendingForceUpdate = true;
16784
16785 enqueueUpdate(internalInstance);
16786 },
16787
16788 /**
16789 * Replaces all of the state. Always use this or `setState` to mutate state.
16790 * You should treat `this.state` as immutable.
16791 *
16792 * There is no guarantee that `this.state` will be immediately updated, so
16793 * accessing `this.state` after calling this method may return the old value.
16794 *
16795 * @param {ReactClass} publicInstance The instance that should rerender.
16796 * @param {object} completeState Next state.
16797 * @internal
16798 */
16799 enqueueReplaceState: function (publicInstance, completeState) {
16800 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'replaceState');
16801
16802 if (!internalInstance) {
16803 return;
16804 }
16805
16806 internalInstance._pendingStateQueue = [completeState];
16807 internalInstance._pendingReplaceState = true;
16808
16809 enqueueUpdate(internalInstance);
16810 },
16811
16812 /**
16813 * Sets a subset of the state. This only exists because _pendingState is
16814 * internal. This provides a merging strategy that is not available to deep
16815 * properties which is confusing. TODO: Expose pendingState or don't use it
16816 * during the merge.
16817 *
16818 * @param {ReactClass} publicInstance The instance that should rerender.
16819 * @param {object} partialState Next partial state to be merged with state.
16820 * @internal
16821 */
16822 enqueueSetState: function (publicInstance, partialState) {
16823 if ((undefined) !== 'production') {
16824 ReactInstrumentation.debugTool.onSetState();
16825 (undefined) !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
16826 }
16827
16828 var internalInstance = getInternalInstanceReadyForUpdate(publicInstance, 'setState');
16829
16830 if (!internalInstance) {
16831 return;
16832 }
16833
16834 var queue = internalInstance._pendingStateQueue || (internalInstance._pendingStateQueue = []);
16835 queue.push(partialState);
16836
16837 enqueueUpdate(internalInstance);
16838 },
16839
16840 enqueueElementInternal: function (internalInstance, nextElement, nextContext) {
16841 internalInstance._pendingElement = nextElement;
16842 // TODO: introduce _pendingContext instead of setting it directly.
16843 internalInstance._context = nextContext;
16844 enqueueUpdate(internalInstance);
16845 },
16846
16847 validateCallback: function (callback, callerName) {
16848 !(!callback || typeof callback === 'function') ? (undefined) !== '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;
16849 }
16850
16851 };
16852
16853 module.exports = ReactUpdateQueue;
16854
16855/***/ },
16856/* 220 */
16857/***/ function(module, exports, __webpack_require__) {
16858
16859 /**
16860 * Copyright 2015-present, Facebook, Inc.
16861 * All rights reserved.
16862 *
16863 * This source code is licensed under the BSD-style license found in the
16864 * LICENSE file in the root directory of this source tree. An additional grant
16865 * of patent rights can be found in the PATENTS file in the same directory.
16866 *
16867 * @providesModule validateDOMNesting
16868 */
16869
16870 'use strict';
16871
16872 var _assign = __webpack_require__(91);
16873
16874 var emptyFunction = __webpack_require__(99);
16875 var warning = __webpack_require__(98);
16876
16877 var validateDOMNesting = emptyFunction;
16878
16879 if ((undefined) !== 'production') {
16880 // This validation code was written based on the HTML5 parsing spec:
16881 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
16882 //
16883 // Note: this does not catch all invalid nesting, nor does it try to (as it's
16884 // not clear what practical benefit doing so provides); instead, we warn only
16885 // for cases where the parser will give a parse tree differing from what React
16886 // intended. For example, <b><div></div></b> is invalid but we don't warn
16887 // because it still parses correctly; we do warn for other cases like nested
16888 // <p> tags where the beginning of the second element implicitly closes the
16889 // first, causing a confusing mess.
16890
16891 // https://html.spec.whatwg.org/multipage/syntax.html#special
16892 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'];
16893
16894 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
16895 var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template',
16896
16897 // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
16898 // TODO: Distinguish by namespace here -- for <title>, including it here
16899 // errs on the side of fewer warnings
16900 'foreignObject', 'desc', 'title'];
16901
16902 // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
16903 var buttonScopeTags = inScopeTags.concat(['button']);
16904
16905 // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
16906 var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
16907
16908 var emptyAncestorInfo = {
16909 current: null,
16910
16911 formTag: null,
16912 aTagInScope: null,
16913 buttonTagInScope: null,
16914 nobrTagInScope: null,
16915 pTagInButtonScope: null,
16916
16917 listItemTagAutoclosing: null,
16918 dlItemTagAutoclosing: null
16919 };
16920
16921 var updatedAncestorInfo = function (oldInfo, tag, instance) {
16922 var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
16923 var info = { tag: tag, instance: instance };
16924
16925 if (inScopeTags.indexOf(tag) !== -1) {
16926 ancestorInfo.aTagInScope = null;
16927 ancestorInfo.buttonTagInScope = null;
16928 ancestorInfo.nobrTagInScope = null;
16929 }
16930 if (buttonScopeTags.indexOf(tag) !== -1) {
16931 ancestorInfo.pTagInButtonScope = null;
16932 }
16933
16934 // See rules for 'li', 'dd', 'dt' start tags in
16935 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
16936 if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
16937 ancestorInfo.listItemTagAutoclosing = null;
16938 ancestorInfo.dlItemTagAutoclosing = null;
16939 }
16940
16941 ancestorInfo.current = info;
16942
16943 if (tag === 'form') {
16944 ancestorInfo.formTag = info;
16945 }
16946 if (tag === 'a') {
16947 ancestorInfo.aTagInScope = info;
16948 }
16949 if (tag === 'button') {
16950 ancestorInfo.buttonTagInScope = info;
16951 }
16952 if (tag === 'nobr') {
16953 ancestorInfo.nobrTagInScope = info;
16954 }
16955 if (tag === 'p') {
16956 ancestorInfo.pTagInButtonScope = info;
16957 }
16958 if (tag === 'li') {
16959 ancestorInfo.listItemTagAutoclosing = info;
16960 }
16961 if (tag === 'dd' || tag === 'dt') {
16962 ancestorInfo.dlItemTagAutoclosing = info;
16963 }
16964
16965 return ancestorInfo;
16966 };
16967
16968 /**
16969 * Returns whether
16970 */
16971 var isTagValidWithParent = function (tag, parentTag) {
16972 // First, let's check if we're in an unusual parsing mode...
16973 switch (parentTag) {
16974 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
16975 case 'select':
16976 return tag === 'option' || tag === 'optgroup' || tag === '#text';
16977 case 'optgroup':
16978 return tag === 'option' || tag === '#text';
16979 // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
16980 // but
16981 case 'option':
16982 return tag === '#text';
16983
16984 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
16985 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
16986 // No special behavior since these rules fall back to "in body" mode for
16987 // all except special table nodes which cause bad parsing behavior anyway.
16988
16989 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
16990 case 'tr':
16991 return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
16992
16993 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
16994 case 'tbody':
16995 case 'thead':
16996 case 'tfoot':
16997 return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
16998
16999 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
17000 case 'colgroup':
17001 return tag === 'col' || tag === 'template';
17002
17003 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
17004 case 'table':
17005 return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
17006
17007 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
17008 case 'head':
17009 return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
17010
17011 // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
17012 case 'html':
17013 return tag === 'head' || tag === 'body';
17014 case '#document':
17015 return tag === 'html';
17016 }
17017
17018 // Probably in the "in body" parsing mode, so we outlaw only tag combos
17019 // where the parsing rules cause implicit opens or closes to be added.
17020 // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
17021 switch (tag) {
17022 case 'h1':
17023 case 'h2':
17024 case 'h3':
17025 case 'h4':
17026 case 'h5':
17027 case 'h6':
17028 return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
17029
17030 case 'rp':
17031 case 'rt':
17032 return impliedEndTags.indexOf(parentTag) === -1;
17033
17034 case 'body':
17035 case 'caption':
17036 case 'col':
17037 case 'colgroup':
17038 case 'frame':
17039 case 'head':
17040 case 'html':
17041 case 'tbody':
17042 case 'td':
17043 case 'tfoot':
17044 case 'th':
17045 case 'thead':
17046 case 'tr':
17047 // These tags are only valid with a few parents that have special child
17048 // parsing rules -- if we're down here, then none of those matched and
17049 // so we allow it only if we don't know what the parent is, as all other
17050 // cases are invalid.
17051 return parentTag == null;
17052 }
17053
17054 return true;
17055 };
17056
17057 /**
17058 * Returns whether
17059 */
17060 var findInvalidAncestorForTag = function (tag, ancestorInfo) {
17061 switch (tag) {
17062 case 'address':
17063 case 'article':
17064 case 'aside':
17065 case 'blockquote':
17066 case 'center':
17067 case 'details':
17068 case 'dialog':
17069 case 'dir':
17070 case 'div':
17071 case 'dl':
17072 case 'fieldset':
17073 case 'figcaption':
17074 case 'figure':
17075 case 'footer':
17076 case 'header':
17077 case 'hgroup':
17078 case 'main':
17079 case 'menu':
17080 case 'nav':
17081 case 'ol':
17082 case 'p':
17083 case 'section':
17084 case 'summary':
17085 case 'ul':
17086
17087 case 'pre':
17088 case 'listing':
17089
17090 case 'table':
17091
17092 case 'hr':
17093
17094 case 'xmp':
17095
17096 case 'h1':
17097 case 'h2':
17098 case 'h3':
17099 case 'h4':
17100 case 'h5':
17101 case 'h6':
17102 return ancestorInfo.pTagInButtonScope;
17103
17104 case 'form':
17105 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
17106
17107 case 'li':
17108 return ancestorInfo.listItemTagAutoclosing;
17109
17110 case 'dd':
17111 case 'dt':
17112 return ancestorInfo.dlItemTagAutoclosing;
17113
17114 case 'button':
17115 return ancestorInfo.buttonTagInScope;
17116
17117 case 'a':
17118 // Spec says something about storing a list of markers, but it sounds
17119 // equivalent to this check.
17120 return ancestorInfo.aTagInScope;
17121
17122 case 'nobr':
17123 return ancestorInfo.nobrTagInScope;
17124 }
17125
17126 return null;
17127 };
17128
17129 /**
17130 * Given a ReactCompositeComponent instance, return a list of its recursive
17131 * owners, starting at the root and ending with the instance itself.
17132 */
17133 var findOwnerStack = function (instance) {
17134 if (!instance) {
17135 return [];
17136 }
17137
17138 var stack = [];
17139 do {
17140 stack.push(instance);
17141 } while (instance = instance._currentElement._owner);
17142 stack.reverse();
17143 return stack;
17144 };
17145
17146 var didWarn = {};
17147
17148 validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
17149 ancestorInfo = ancestorInfo || emptyAncestorInfo;
17150 var parentInfo = ancestorInfo.current;
17151 var parentTag = parentInfo && parentInfo.tag;
17152
17153 if (childText != null) {
17154 (undefined) !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
17155 childTag = '#text';
17156 }
17157
17158 var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
17159 var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
17160 var problematic = invalidParent || invalidAncestor;
17161
17162 if (problematic) {
17163 var ancestorTag = problematic.tag;
17164 var ancestorInstance = problematic.instance;
17165
17166 var childOwner = childInstance && childInstance._currentElement._owner;
17167 var ancestorOwner = ancestorInstance && ancestorInstance._currentElement._owner;
17168
17169 var childOwners = findOwnerStack(childOwner);
17170 var ancestorOwners = findOwnerStack(ancestorOwner);
17171
17172 var minStackLen = Math.min(childOwners.length, ancestorOwners.length);
17173 var i;
17174
17175 var deepestCommon = -1;
17176 for (i = 0; i < minStackLen; i++) {
17177 if (childOwners[i] === ancestorOwners[i]) {
17178 deepestCommon = i;
17179 } else {
17180 break;
17181 }
17182 }
17183
17184 var UNKNOWN = '(unknown)';
17185 var childOwnerNames = childOwners.slice(deepestCommon + 1).map(function (inst) {
17186 return inst.getName() || UNKNOWN;
17187 });
17188 var ancestorOwnerNames = ancestorOwners.slice(deepestCommon + 1).map(function (inst) {
17189 return inst.getName() || UNKNOWN;
17190 });
17191 var ownerInfo = [].concat(
17192 // If the parent and child instances have a common owner ancestor, start
17193 // with that -- otherwise we just start with the parent's owners.
17194 deepestCommon !== -1 ? childOwners[deepestCommon].getName() || UNKNOWN : [], ancestorOwnerNames, ancestorTag,
17195 // If we're warning about an invalid (non-parent) ancestry, add '...'
17196 invalidAncestor ? ['...'] : [], childOwnerNames, childTag).join(' > ');
17197
17198 var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag + '|' + ownerInfo;
17199 if (didWarn[warnKey]) {
17200 return;
17201 }
17202 didWarn[warnKey] = true;
17203
17204 var tagDisplayName = childTag;
17205 var whitespaceInfo = '';
17206 if (childTag === '#text') {
17207 if (/\S/.test(childText)) {
17208 tagDisplayName = 'Text nodes';
17209 } else {
17210 tagDisplayName = 'Whitespace text nodes';
17211 whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
17212 }
17213 } else {
17214 tagDisplayName = '<' + childTag + '>';
17215 }
17216
17217 if (invalidParent) {
17218 var info = '';
17219 if (ancestorTag === 'table' && childTag === 'tr') {
17220 info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
17221 }
17222 (undefined) !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
17223 } else {
17224 (undefined) !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
17225 }
17226 }
17227 };
17228
17229 validateDOMNesting.updatedAncestorInfo = updatedAncestorInfo;
17230
17231 // For testing
17232 validateDOMNesting.isTagValidInContext = function (tag, ancestorInfo) {
17233 ancestorInfo = ancestorInfo || emptyAncestorInfo;
17234 var parentInfo = ancestorInfo.current;
17235 var parentTag = parentInfo && parentInfo.tag;
17236 return isTagValidWithParent(tag, parentTag) && !findInvalidAncestorForTag(tag, ancestorInfo);
17237 };
17238 }
17239
17240 module.exports = validateDOMNesting;
17241
17242/***/ },
17243/* 221 */
17244/***/ function(module, exports, __webpack_require__) {
17245
17246 /**
17247 * Copyright 2014-present, Facebook, Inc.
17248 * All rights reserved.
17249 *
17250 * This source code is licensed under the BSD-style license found in the
17251 * LICENSE file in the root directory of this source tree. An additional grant
17252 * of patent rights can be found in the PATENTS file in the same directory.
17253 *
17254 * @providesModule ReactDOMEmptyComponent
17255 */
17256
17257 'use strict';
17258
17259 var _assign = __webpack_require__(91);
17260
17261 var DOMLazyTree = __webpack_require__(170);
17262 var ReactDOMComponentTree = __webpack_require__(124);
17263
17264 var ReactDOMEmptyComponent = function (instantiate) {
17265 // ReactCompositeComponent uses this:
17266 this._currentElement = null;
17267 // ReactDOMComponentTree uses these:
17268 this._hostNode = null;
17269 this._hostParent = null;
17270 this._hostContainerInfo = null;
17271 this._domID = 0;
17272 };
17273 _assign(ReactDOMEmptyComponent.prototype, {
17274 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
17275 var domID = hostContainerInfo._idCounter++;
17276 this._domID = domID;
17277 this._hostParent = hostParent;
17278 this._hostContainerInfo = hostContainerInfo;
17279
17280 var nodeValue = ' react-empty: ' + this._domID + ' ';
17281 if (transaction.useCreateElement) {
17282 var ownerDocument = hostContainerInfo._ownerDocument;
17283 var node = ownerDocument.createComment(nodeValue);
17284 ReactDOMComponentTree.precacheNode(this, node);
17285 return DOMLazyTree(node);
17286 } else {
17287 if (transaction.renderToStaticMarkup) {
17288 // Normally we'd insert a comment node, but since this is a situation
17289 // where React won't take over (static pages), we can simply return
17290 // nothing.
17291 return '';
17292 }
17293 return '<!--' + nodeValue + '-->';
17294 }
17295 },
17296 receiveComponent: function () {},
17297 getHostNode: function () {
17298 return ReactDOMComponentTree.getNodeFromInstance(this);
17299 },
17300 unmountComponent: function () {
17301 ReactDOMComponentTree.uncacheNode(this);
17302 }
17303 });
17304
17305 module.exports = ReactDOMEmptyComponent;
17306
17307/***/ },
17308/* 222 */
17309/***/ function(module, exports, __webpack_require__) {
17310
17311 /**
17312 * Copyright 2015-present, Facebook, Inc.
17313 * All rights reserved.
17314 *
17315 * This source code is licensed under the BSD-style license found in the
17316 * LICENSE file in the root directory of this source tree. An additional grant
17317 * of patent rights can be found in the PATENTS file in the same directory.
17318 *
17319 * @providesModule ReactDOMTreeTraversal
17320 */
17321
17322 'use strict';
17323
17324 var _prodInvariant = __webpack_require__(94);
17325
17326 var invariant = __webpack_require__(95);
17327
17328 /**
17329 * Return the lowest common ancestor of A and B, or null if they are in
17330 * different trees.
17331 */
17332 function getLowestCommonAncestor(instA, instB) {
17333 !('_hostNode' in instA) ? (undefined) !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17334 !('_hostNode' in instB) ? (undefined) !== 'production' ? invariant(false, 'getNodeFromInstance: Invalid argument.') : _prodInvariant('33') : void 0;
17335
17336 var depthA = 0;
17337 for (var tempA = instA; tempA; tempA = tempA._hostParent) {
17338 depthA++;
17339 }
17340 var depthB = 0;
17341 for (var tempB = instB; tempB; tempB = tempB._hostParent) {
17342 depthB++;
17343 }
17344
17345 // If A is deeper, crawl up.
17346 while (depthA - depthB > 0) {
17347 instA = instA._hostParent;
17348 depthA--;
17349 }
17350
17351 // If B is deeper, crawl up.
17352 while (depthB - depthA > 0) {
17353 instB = instB._hostParent;
17354 depthB--;
17355 }
17356
17357 // Walk in lockstep until we find a match.
17358 var depth = depthA;
17359 while (depth--) {
17360 if (instA === instB) {
17361 return instA;
17362 }
17363 instA = instA._hostParent;
17364 instB = instB._hostParent;
17365 }
17366 return null;
17367 }
17368
17369 /**
17370 * Return if A is an ancestor of B.
17371 */
17372 function isAncestor(instA, instB) {
17373 !('_hostNode' in instA) ? (undefined) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17374 !('_hostNode' in instB) ? (undefined) !== 'production' ? invariant(false, 'isAncestor: Invalid argument.') : _prodInvariant('35') : void 0;
17375
17376 while (instB) {
17377 if (instB === instA) {
17378 return true;
17379 }
17380 instB = instB._hostParent;
17381 }
17382 return false;
17383 }
17384
17385 /**
17386 * Return the parent instance of the passed-in instance.
17387 */
17388 function getParentInstance(inst) {
17389 !('_hostNode' in inst) ? (undefined) !== 'production' ? invariant(false, 'getParentInstance: Invalid argument.') : _prodInvariant('36') : void 0;
17390
17391 return inst._hostParent;
17392 }
17393
17394 /**
17395 * Simulates the traversal of a two-phase, capture/bubble event dispatch.
17396 */
17397 function traverseTwoPhase(inst, fn, arg) {
17398 var path = [];
17399 while (inst) {
17400 path.push(inst);
17401 inst = inst._hostParent;
17402 }
17403 var i;
17404 for (i = path.length; i-- > 0;) {
17405 fn(path[i], false, arg);
17406 }
17407 for (i = 0; i < path.length; i++) {
17408 fn(path[i], true, arg);
17409 }
17410 }
17411
17412 /**
17413 * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that
17414 * should would receive a `mouseEnter` or `mouseLeave` event.
17415 *
17416 * Does not invoke the callback on the nearest common ancestor because nothing
17417 * "entered" or "left" that element.
17418 */
17419 function traverseEnterLeave(from, to, fn, argFrom, argTo) {
17420 var common = from && to ? getLowestCommonAncestor(from, to) : null;
17421 var pathFrom = [];
17422 while (from && from !== common) {
17423 pathFrom.push(from);
17424 from = from._hostParent;
17425 }
17426 var pathTo = [];
17427 while (to && to !== common) {
17428 pathTo.push(to);
17429 to = to._hostParent;
17430 }
17431 var i;
17432 for (i = 0; i < pathFrom.length; i++) {
17433 fn(pathFrom[i], true, argFrom);
17434 }
17435 for (i = pathTo.length; i-- > 0;) {
17436 fn(pathTo[i], false, argTo);
17437 }
17438 }
17439
17440 module.exports = {
17441 isAncestor: isAncestor,
17442 getLowestCommonAncestor: getLowestCommonAncestor,
17443 getParentInstance: getParentInstance,
17444 traverseTwoPhase: traverseTwoPhase,
17445 traverseEnterLeave: traverseEnterLeave
17446 };
17447
17448/***/ },
17449/* 223 */
17450/***/ function(module, exports, __webpack_require__) {
17451
17452 /**
17453 * Copyright 2013-present, Facebook, Inc.
17454 * All rights reserved.
17455 *
17456 * This source code is licensed under the BSD-style license found in the
17457 * LICENSE file in the root directory of this source tree. An additional grant
17458 * of patent rights can be found in the PATENTS file in the same directory.
17459 *
17460 * @providesModule ReactDOMTextComponent
17461 */
17462
17463 'use strict';
17464
17465 var _prodInvariant = __webpack_require__(94),
17466 _assign = __webpack_require__(91);
17467
17468 var DOMChildrenOperations = __webpack_require__(169);
17469 var DOMLazyTree = __webpack_require__(170);
17470 var ReactDOMComponentTree = __webpack_require__(124);
17471
17472 var escapeTextContentForBrowser = __webpack_require__(175);
17473 var invariant = __webpack_require__(95);
17474 var validateDOMNesting = __webpack_require__(220);
17475
17476 /**
17477 * Text nodes violate a couple assumptions that React makes about components:
17478 *
17479 * - When mounting text into the DOM, adjacent text nodes are merged.
17480 * - Text nodes cannot be assigned a React root ID.
17481 *
17482 * This component is used to wrap strings between comment nodes so that they
17483 * can undergo the same reconciliation that is applied to elements.
17484 *
17485 * TODO: Investigate representing React components in the DOM with text nodes.
17486 *
17487 * @class ReactDOMTextComponent
17488 * @extends ReactComponent
17489 * @internal
17490 */
17491 var ReactDOMTextComponent = function (text) {
17492 // TODO: This is really a ReactText (ReactNode), not a ReactElement
17493 this._currentElement = text;
17494 this._stringText = '' + text;
17495 // ReactDOMComponentTree uses these:
17496 this._hostNode = null;
17497 this._hostParent = null;
17498
17499 // Properties
17500 this._domID = 0;
17501 this._mountIndex = 0;
17502 this._closingComment = null;
17503 this._commentNodes = null;
17504 };
17505
17506 _assign(ReactDOMTextComponent.prototype, {
17507
17508 /**
17509 * Creates the markup for this text node. This node is not intended to have
17510 * any features besides containing text content.
17511 *
17512 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
17513 * @return {string} Markup for this text node.
17514 * @internal
17515 */
17516 mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
17517 if ((undefined) !== 'production') {
17518 var parentInfo;
17519 if (hostParent != null) {
17520 parentInfo = hostParent._ancestorInfo;
17521 } else if (hostContainerInfo != null) {
17522 parentInfo = hostContainerInfo._ancestorInfo;
17523 }
17524 if (parentInfo) {
17525 // parentInfo should always be present except for the top-level
17526 // component when server rendering
17527 validateDOMNesting(null, this._stringText, this, parentInfo);
17528 }
17529 }
17530
17531 var domID = hostContainerInfo._idCounter++;
17532 var openingValue = ' react-text: ' + domID + ' ';
17533 var closingValue = ' /react-text ';
17534 this._domID = domID;
17535 this._hostParent = hostParent;
17536 if (transaction.useCreateElement) {
17537 var ownerDocument = hostContainerInfo._ownerDocument;
17538 var openingComment = ownerDocument.createComment(openingValue);
17539 var closingComment = ownerDocument.createComment(closingValue);
17540 var lazyTree = DOMLazyTree(ownerDocument.createDocumentFragment());
17541 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(openingComment));
17542 if (this._stringText) {
17543 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(ownerDocument.createTextNode(this._stringText)));
17544 }
17545 DOMLazyTree.queueChild(lazyTree, DOMLazyTree(closingComment));
17546 ReactDOMComponentTree.precacheNode(this, openingComment);
17547 this._closingComment = closingComment;
17548 return lazyTree;
17549 } else {
17550 var escapedText = escapeTextContentForBrowser(this._stringText);
17551
17552 if (transaction.renderToStaticMarkup) {
17553 // Normally we'd wrap this between comment nodes for the reasons stated
17554 // above, but since this is a situation where React won't take over
17555 // (static pages), we can simply return the text as it is.
17556 return escapedText;
17557 }
17558
17559 return '<!--' + openingValue + '-->' + escapedText + '<!--' + closingValue + '-->';
17560 }
17561 },
17562
17563 /**
17564 * Updates this component by updating the text content.
17565 *
17566 * @param {ReactText} nextText The next text content
17567 * @param {ReactReconcileTransaction} transaction
17568 * @internal
17569 */
17570 receiveComponent: function (nextText, transaction) {
17571 if (nextText !== this._currentElement) {
17572 this._currentElement = nextText;
17573 var nextStringText = '' + nextText;
17574 if (nextStringText !== this._stringText) {
17575 // TODO: Save this as pending props and use performUpdateIfNecessary
17576 // and/or updateComponent to do the actual update for consistency with
17577 // other component types?
17578 this._stringText = nextStringText;
17579 var commentNodes = this.getHostNode();
17580 DOMChildrenOperations.replaceDelimitedText(commentNodes[0], commentNodes[1], nextStringText);
17581 }
17582 }
17583 },
17584
17585 getHostNode: function () {
17586 var hostNode = this._commentNodes;
17587 if (hostNode) {
17588 return hostNode;
17589 }
17590 if (!this._closingComment) {
17591 var openingComment = ReactDOMComponentTree.getNodeFromInstance(this);
17592 var node = openingComment.nextSibling;
17593 while (true) {
17594 !(node != null) ? (undefined) !== 'production' ? invariant(false, 'Missing closing comment for text component %s', this._domID) : _prodInvariant('67', this._domID) : void 0;
17595 if (node.nodeType === 8 && node.nodeValue === ' /react-text ') {
17596 this._closingComment = node;
17597 break;
17598 }
17599 node = node.nextSibling;
17600 }
17601 }
17602 hostNode = [this._hostNode, this._closingComment];
17603 this._commentNodes = hostNode;
17604 return hostNode;
17605 },
17606
17607 unmountComponent: function () {
17608 this._closingComment = null;
17609 this._commentNodes = null;
17610 ReactDOMComponentTree.uncacheNode(this);
17611 }
17612
17613 });
17614
17615 module.exports = ReactDOMTextComponent;
17616
17617/***/ },
17618/* 224 */
17619/***/ function(module, exports, __webpack_require__) {
17620
17621 /**
17622 * Copyright 2013-present, Facebook, Inc.
17623 * All rights reserved.
17624 *
17625 * This source code is licensed under the BSD-style license found in the
17626 * LICENSE file in the root directory of this source tree. An additional grant
17627 * of patent rights can be found in the PATENTS file in the same directory.
17628 *
17629 * @providesModule ReactDefaultBatchingStrategy
17630 */
17631
17632 'use strict';
17633
17634 var _assign = __webpack_require__(91);
17635
17636 var ReactUpdates = __webpack_require__(144);
17637 var Transaction = __webpack_require__(157);
17638
17639 var emptyFunction = __webpack_require__(99);
17640
17641 var RESET_BATCHED_UPDATES = {
17642 initialize: emptyFunction,
17643 close: function () {
17644 ReactDefaultBatchingStrategy.isBatchingUpdates = false;
17645 }
17646 };
17647
17648 var FLUSH_BATCHED_UPDATES = {
17649 initialize: emptyFunction,
17650 close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates)
17651 };
17652
17653 var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES];
17654
17655 function ReactDefaultBatchingStrategyTransaction() {
17656 this.reinitializeTransaction();
17657 }
17658
17659 _assign(ReactDefaultBatchingStrategyTransaction.prototype, Transaction.Mixin, {
17660 getTransactionWrappers: function () {
17661 return TRANSACTION_WRAPPERS;
17662 }
17663 });
17664
17665 var transaction = new ReactDefaultBatchingStrategyTransaction();
17666
17667 var ReactDefaultBatchingStrategy = {
17668 isBatchingUpdates: false,
17669
17670 /**
17671 * Call the provided function in a context within which calls to `setState`
17672 * and friends are batched such that components aren't updated unnecessarily.
17673 */
17674 batchedUpdates: function (callback, a, b, c, d, e) {
17675 var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates;
17676
17677 ReactDefaultBatchingStrategy.isBatchingUpdates = true;
17678
17679 // The code is written this way to avoid extra allocations
17680 if (alreadyBatchingUpdates) {
17681 callback(a, b, c, d, e);
17682 } else {
17683 transaction.perform(callback, null, a, b, c, d, e);
17684 }
17685 }
17686 };
17687
17688 module.exports = ReactDefaultBatchingStrategy;
17689
17690/***/ },
17691/* 225 */
17692/***/ function(module, exports, __webpack_require__) {
17693
17694 /**
17695 * Copyright 2013-present, Facebook, Inc.
17696 * All rights reserved.
17697 *
17698 * This source code is licensed under the BSD-style license found in the
17699 * LICENSE file in the root directory of this source tree. An additional grant
17700 * of patent rights can be found in the PATENTS file in the same directory.
17701 *
17702 * @providesModule ReactEventListener
17703 */
17704
17705 'use strict';
17706
17707 var _assign = __webpack_require__(91);
17708
17709 var EventListener = __webpack_require__(226);
17710 var ExecutionEnvironment = __webpack_require__(137);
17711 var PooledClass = __webpack_require__(93);
17712 var ReactDOMComponentTree = __webpack_require__(124);
17713 var ReactUpdates = __webpack_require__(144);
17714
17715 var getEventTarget = __webpack_require__(158);
17716 var getUnboundedScrollPosition = __webpack_require__(227);
17717
17718 /**
17719 * Find the deepest React component completely containing the root of the
17720 * passed-in instance (for use when entire React trees are nested within each
17721 * other). If React trees are not nested, returns null.
17722 */
17723 function findParent(inst) {
17724 // TODO: It may be a good idea to cache this to prevent unnecessary DOM
17725 // traversal, but caching is difficult to do correctly without using a
17726 // mutation observer to listen for all DOM changes.
17727 while (inst._hostParent) {
17728 inst = inst._hostParent;
17729 }
17730 var rootNode = ReactDOMComponentTree.getNodeFromInstance(inst);
17731 var container = rootNode.parentNode;
17732 return ReactDOMComponentTree.getClosestInstanceFromNode(container);
17733 }
17734
17735 // Used to store ancestor hierarchy in top level callback
17736 function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) {
17737 this.topLevelType = topLevelType;
17738 this.nativeEvent = nativeEvent;
17739 this.ancestors = [];
17740 }
17741 _assign(TopLevelCallbackBookKeeping.prototype, {
17742 destructor: function () {
17743 this.topLevelType = null;
17744 this.nativeEvent = null;
17745 this.ancestors.length = 0;
17746 }
17747 });
17748 PooledClass.addPoolingTo(TopLevelCallbackBookKeeping, PooledClass.twoArgumentPooler);
17749
17750 function handleTopLevelImpl(bookKeeping) {
17751 var nativeEventTarget = getEventTarget(bookKeeping.nativeEvent);
17752 var targetInst = ReactDOMComponentTree.getClosestInstanceFromNode(nativeEventTarget);
17753
17754 // Loop through the hierarchy, in case there's any nested components.
17755 // It's important that we build the array of ancestors before calling any
17756 // event handlers, because event handlers can modify the DOM, leading to
17757 // inconsistencies with ReactMount's node cache. See #1105.
17758 var ancestor = targetInst;
17759 do {
17760 bookKeeping.ancestors.push(ancestor);
17761 ancestor = ancestor && findParent(ancestor);
17762 } while (ancestor);
17763
17764 for (var i = 0; i < bookKeeping.ancestors.length; i++) {
17765 targetInst = bookKeeping.ancestors[i];
17766 ReactEventListener._handleTopLevel(bookKeeping.topLevelType, targetInst, bookKeeping.nativeEvent, getEventTarget(bookKeeping.nativeEvent));
17767 }
17768 }
17769
17770 function scrollValueMonitor(cb) {
17771 var scrollPosition = getUnboundedScrollPosition(window);
17772 cb(scrollPosition);
17773 }
17774
17775 var ReactEventListener = {
17776 _enabled: true,
17777 _handleTopLevel: null,
17778
17779 WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null,
17780
17781 setHandleTopLevel: function (handleTopLevel) {
17782 ReactEventListener._handleTopLevel = handleTopLevel;
17783 },
17784
17785 setEnabled: function (enabled) {
17786 ReactEventListener._enabled = !!enabled;
17787 },
17788
17789 isEnabled: function () {
17790 return ReactEventListener._enabled;
17791 },
17792
17793 /**
17794 * Traps top-level events by using event bubbling.
17795 *
17796 * @param {string} topLevelType Record from `EventConstants`.
17797 * @param {string} handlerBaseName Event name (e.g. "click").
17798 * @param {object} handle Element on which to attach listener.
17799 * @return {?object} An object with a remove function which will forcefully
17800 * remove the listener.
17801 * @internal
17802 */
17803 trapBubbledEvent: function (topLevelType, handlerBaseName, handle) {
17804 var element = handle;
17805 if (!element) {
17806 return null;
17807 }
17808 return EventListener.listen(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
17809 },
17810
17811 /**
17812 * Traps a top-level event by using event capturing.
17813 *
17814 * @param {string} topLevelType Record from `EventConstants`.
17815 * @param {string} handlerBaseName Event name (e.g. "click").
17816 * @param {object} handle Element on which to attach listener.
17817 * @return {?object} An object with a remove function which will forcefully
17818 * remove the listener.
17819 * @internal
17820 */
17821 trapCapturedEvent: function (topLevelType, handlerBaseName, handle) {
17822 var element = handle;
17823 if (!element) {
17824 return null;
17825 }
17826 return EventListener.capture(element, handlerBaseName, ReactEventListener.dispatchEvent.bind(null, topLevelType));
17827 },
17828
17829 monitorScrollValue: function (refresh) {
17830 var callback = scrollValueMonitor.bind(null, refresh);
17831 EventListener.listen(window, 'scroll', callback);
17832 },
17833
17834 dispatchEvent: function (topLevelType, nativeEvent) {
17835 if (!ReactEventListener._enabled) {
17836 return;
17837 }
17838
17839 var bookKeeping = TopLevelCallbackBookKeeping.getPooled(topLevelType, nativeEvent);
17840 try {
17841 // Event queue being processed in the same cycle allows
17842 // `preventDefault`.
17843 ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping);
17844 } finally {
17845 TopLevelCallbackBookKeeping.release(bookKeeping);
17846 }
17847 }
17848 };
17849
17850 module.exports = ReactEventListener;
17851
17852/***/ },
17853/* 226 */
17854/***/ function(module, exports, __webpack_require__) {
17855
17856 'use strict';
17857
17858 /**
17859 * Copyright (c) 2013-present, Facebook, Inc.
17860 *
17861 * Licensed under the Apache License, Version 2.0 (the "License");
17862 * you may not use this file except in compliance with the License.
17863 * You may obtain a copy of the License at
17864 *
17865 * http://www.apache.org/licenses/LICENSE-2.0
17866 *
17867 * Unless required by applicable law or agreed to in writing, software
17868 * distributed under the License is distributed on an "AS IS" BASIS,
17869 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17870 * See the License for the specific language governing permissions and
17871 * limitations under the License.
17872 *
17873 * @typechecks
17874 */
17875
17876 var emptyFunction = __webpack_require__(99);
17877
17878 /**
17879 * Upstream version of event listener. Does not take into account specific
17880 * nature of platform.
17881 */
17882 var EventListener = {
17883 /**
17884 * Listen to DOM events during the bubble phase.
17885 *
17886 * @param {DOMEventTarget} target DOM element to register listener on.
17887 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
17888 * @param {function} callback Callback function.
17889 * @return {object} Object with a `remove` method.
17890 */
17891 listen: function listen(target, eventType, callback) {
17892 if (target.addEventListener) {
17893 target.addEventListener(eventType, callback, false);
17894 return {
17895 remove: function remove() {
17896 target.removeEventListener(eventType, callback, false);
17897 }
17898 };
17899 } else if (target.attachEvent) {
17900 target.attachEvent('on' + eventType, callback);
17901 return {
17902 remove: function remove() {
17903 target.detachEvent('on' + eventType, callback);
17904 }
17905 };
17906 }
17907 },
17908
17909 /**
17910 * Listen to DOM events during the capture phase.
17911 *
17912 * @param {DOMEventTarget} target DOM element to register listener on.
17913 * @param {string} eventType Event type, e.g. 'click' or 'mouseover'.
17914 * @param {function} callback Callback function.
17915 * @return {object} Object with a `remove` method.
17916 */
17917 capture: function capture(target, eventType, callback) {
17918 if (target.addEventListener) {
17919 target.addEventListener(eventType, callback, true);
17920 return {
17921 remove: function remove() {
17922 target.removeEventListener(eventType, callback, true);
17923 }
17924 };
17925 } else {
17926 if ((undefined) !== 'production') {
17927 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.');
17928 }
17929 return {
17930 remove: emptyFunction
17931 };
17932 }
17933 },
17934
17935 registerDefault: function registerDefault() {}
17936 };
17937
17938 module.exports = EventListener;
17939
17940/***/ },
17941/* 227 */
17942/***/ function(module, exports) {
17943
17944 /**
17945 * Copyright (c) 2013-present, Facebook, Inc.
17946 * All rights reserved.
17947 *
17948 * This source code is licensed under the BSD-style license found in the
17949 * LICENSE file in the root directory of this source tree. An additional grant
17950 * of patent rights can be found in the PATENTS file in the same directory.
17951 *
17952 * @typechecks
17953 */
17954
17955 'use strict';
17956
17957 /**
17958 * Gets the scroll position of the supplied element or window.
17959 *
17960 * The return values are unbounded, unlike `getScrollPosition`. This means they
17961 * may be negative or exceed the element boundaries (which is possible using
17962 * inertial scrolling).
17963 *
17964 * @param {DOMWindow|DOMElement} scrollable
17965 * @return {object} Map with `x` and `y` keys.
17966 */
17967
17968 function getUnboundedScrollPosition(scrollable) {
17969 if (scrollable === window) {
17970 return {
17971 x: window.pageXOffset || document.documentElement.scrollLeft,
17972 y: window.pageYOffset || document.documentElement.scrollTop
17973 };
17974 }
17975 return {
17976 x: scrollable.scrollLeft,
17977 y: scrollable.scrollTop
17978 };
17979 }
17980
17981 module.exports = getUnboundedScrollPosition;
17982
17983/***/ },
17984/* 228 */
17985/***/ function(module, exports, __webpack_require__) {
17986
17987 /**
17988 * Copyright 2013-present, Facebook, Inc.
17989 * All rights reserved.
17990 *
17991 * This source code is licensed under the BSD-style license found in the
17992 * LICENSE file in the root directory of this source tree. An additional grant
17993 * of patent rights can be found in the PATENTS file in the same directory.
17994 *
17995 * @providesModule ReactInjection
17996 */
17997
17998 'use strict';
17999
18000 var DOMProperty = __webpack_require__(125);
18001 var EventPluginHub = __webpack_require__(131);
18002 var EventPluginUtils = __webpack_require__(133);
18003 var ReactComponentEnvironment = __webpack_require__(206);
18004 var ReactClass = __webpack_require__(108);
18005 var ReactEmptyComponent = __webpack_require__(214);
18006 var ReactBrowserEventEmitter = __webpack_require__(195);
18007 var ReactHostComponent = __webpack_require__(215);
18008 var ReactUpdates = __webpack_require__(144);
18009
18010 var ReactInjection = {
18011 Component: ReactComponentEnvironment.injection,
18012 Class: ReactClass.injection,
18013 DOMProperty: DOMProperty.injection,
18014 EmptyComponent: ReactEmptyComponent.injection,
18015 EventPluginHub: EventPluginHub.injection,
18016 EventPluginUtils: EventPluginUtils.injection,
18017 EventEmitter: ReactBrowserEventEmitter.injection,
18018 HostComponent: ReactHostComponent.injection,
18019 Updates: ReactUpdates.injection
18020 };
18021
18022 module.exports = ReactInjection;
18023
18024/***/ },
18025/* 229 */
18026/***/ function(module, exports, __webpack_require__) {
18027
18028 /**
18029 * Copyright 2013-present, Facebook, Inc.
18030 * All rights reserved.
18031 *
18032 * This source code is licensed under the BSD-style license found in the
18033 * LICENSE file in the root directory of this source tree. An additional grant
18034 * of patent rights can be found in the PATENTS file in the same directory.
18035 *
18036 * @providesModule ReactReconcileTransaction
18037 */
18038
18039 'use strict';
18040
18041 var _assign = __webpack_require__(91);
18042
18043 var CallbackQueue = __webpack_require__(145);
18044 var PooledClass = __webpack_require__(93);
18045 var ReactBrowserEventEmitter = __webpack_require__(195);
18046 var ReactInputSelection = __webpack_require__(230);
18047 var ReactInstrumentation = __webpack_require__(150);
18048 var Transaction = __webpack_require__(157);
18049 var ReactUpdateQueue = __webpack_require__(219);
18050
18051 /**
18052 * Ensures that, when possible, the selection range (currently selected text
18053 * input) is not disturbed by performing the transaction.
18054 */
18055 var SELECTION_RESTORATION = {
18056 /**
18057 * @return {Selection} Selection information.
18058 */
18059 initialize: ReactInputSelection.getSelectionInformation,
18060 /**
18061 * @param {Selection} sel Selection information returned from `initialize`.
18062 */
18063 close: ReactInputSelection.restoreSelection
18064 };
18065
18066 /**
18067 * Suppresses events (blur/focus) that could be inadvertently dispatched due to
18068 * high level DOM manipulations (like temporarily removing a text input from the
18069 * DOM).
18070 */
18071 var EVENT_SUPPRESSION = {
18072 /**
18073 * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before
18074 * the reconciliation.
18075 */
18076 initialize: function () {
18077 var currentlyEnabled = ReactBrowserEventEmitter.isEnabled();
18078 ReactBrowserEventEmitter.setEnabled(false);
18079 return currentlyEnabled;
18080 },
18081
18082 /**
18083 * @param {boolean} previouslyEnabled Enabled status of
18084 * `ReactBrowserEventEmitter` before the reconciliation occurred. `close`
18085 * restores the previous value.
18086 */
18087 close: function (previouslyEnabled) {
18088 ReactBrowserEventEmitter.setEnabled(previouslyEnabled);
18089 }
18090 };
18091
18092 /**
18093 * Provides a queue for collecting `componentDidMount` and
18094 * `componentDidUpdate` callbacks during the transaction.
18095 */
18096 var ON_DOM_READY_QUEUEING = {
18097 /**
18098 * Initializes the internal `onDOMReady` queue.
18099 */
18100 initialize: function () {
18101 this.reactMountReady.reset();
18102 },
18103
18104 /**
18105 * After DOM is flushed, invoke all registered `onDOMReady` callbacks.
18106 */
18107 close: function () {
18108 this.reactMountReady.notifyAll();
18109 }
18110 };
18111
18112 /**
18113 * Executed within the scope of the `Transaction` instance. Consider these as
18114 * being member methods, but with an implied ordering while being isolated from
18115 * each other.
18116 */
18117 var TRANSACTION_WRAPPERS = [SELECTION_RESTORATION, EVENT_SUPPRESSION, ON_DOM_READY_QUEUEING];
18118
18119 if ((undefined) !== 'production') {
18120 TRANSACTION_WRAPPERS.push({
18121 initialize: ReactInstrumentation.debugTool.onBeginFlush,
18122 close: ReactInstrumentation.debugTool.onEndFlush
18123 });
18124 }
18125
18126 /**
18127 * Currently:
18128 * - The order that these are listed in the transaction is critical:
18129 * - Suppresses events.
18130 * - Restores selection range.
18131 *
18132 * Future:
18133 * - Restore document/overflow scroll positions that were unintentionally
18134 * modified via DOM insertions above the top viewport boundary.
18135 * - Implement/integrate with customized constraint based layout system and keep
18136 * track of which dimensions must be remeasured.
18137 *
18138 * @class ReactReconcileTransaction
18139 */
18140 function ReactReconcileTransaction(useCreateElement) {
18141 this.reinitializeTransaction();
18142 // Only server-side rendering really needs this option (see
18143 // `ReactServerRendering`), but server-side uses
18144 // `ReactServerRenderingTransaction` instead. This option is here so that it's
18145 // accessible and defaults to false when `ReactDOMComponent` and
18146 // `ReactDOMTextComponent` checks it in `mountComponent`.`
18147 this.renderToStaticMarkup = false;
18148 this.reactMountReady = CallbackQueue.getPooled(null);
18149 this.useCreateElement = useCreateElement;
18150 }
18151
18152 var Mixin = {
18153 /**
18154 * @see Transaction
18155 * @abstract
18156 * @final
18157 * @return {array<object>} List of operation wrap procedures.
18158 * TODO: convert to array<TransactionWrapper>
18159 */
18160 getTransactionWrappers: function () {
18161 return TRANSACTION_WRAPPERS;
18162 },
18163
18164 /**
18165 * @return {object} The queue to collect `onDOMReady` callbacks with.
18166 */
18167 getReactMountReady: function () {
18168 return this.reactMountReady;
18169 },
18170
18171 /**
18172 * @return {object} The queue to collect React async events.
18173 */
18174 getUpdateQueue: function () {
18175 return ReactUpdateQueue;
18176 },
18177
18178 /**
18179 * Save current transaction state -- if the return value from this method is
18180 * passed to `rollback`, the transaction will be reset to that state.
18181 */
18182 checkpoint: function () {
18183 // reactMountReady is the our only stateful wrapper
18184 return this.reactMountReady.checkpoint();
18185 },
18186
18187 rollback: function (checkpoint) {
18188 this.reactMountReady.rollback(checkpoint);
18189 },
18190
18191 /**
18192 * `PooledClass` looks for this, and will invoke this before allowing this
18193 * instance to be reused.
18194 */
18195 destructor: function () {
18196 CallbackQueue.release(this.reactMountReady);
18197 this.reactMountReady = null;
18198 }
18199 };
18200
18201 _assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin);
18202
18203 PooledClass.addPoolingTo(ReactReconcileTransaction);
18204
18205 module.exports = ReactReconcileTransaction;
18206
18207/***/ },
18208/* 230 */
18209/***/ function(module, exports, __webpack_require__) {
18210
18211 /**
18212 * Copyright 2013-present, Facebook, Inc.
18213 * All rights reserved.
18214 *
18215 * This source code is licensed under the BSD-style license found in the
18216 * LICENSE file in the root directory of this source tree. An additional grant
18217 * of patent rights can be found in the PATENTS file in the same directory.
18218 *
18219 * @providesModule ReactInputSelection
18220 */
18221
18222 'use strict';
18223
18224 var ReactDOMSelection = __webpack_require__(231);
18225
18226 var containsNode = __webpack_require__(233);
18227 var focusNode = __webpack_require__(184);
18228 var getActiveElement = __webpack_require__(236);
18229
18230 function isInDocument(node) {
18231 return containsNode(document.documentElement, node);
18232 }
18233
18234 /**
18235 * @ReactInputSelection: React input selection module. Based on Selection.js,
18236 * but modified to be suitable for react and has a couple of bug fixes (doesn't
18237 * assume buttons have range selections allowed).
18238 * Input selection module for React.
18239 */
18240 var ReactInputSelection = {
18241
18242 hasSelectionCapabilities: function (elem) {
18243 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
18244 return nodeName && (nodeName === 'input' && elem.type === 'text' || nodeName === 'textarea' || elem.contentEditable === 'true');
18245 },
18246
18247 getSelectionInformation: function () {
18248 var focusedElem = getActiveElement();
18249 return {
18250 focusedElem: focusedElem,
18251 selectionRange: ReactInputSelection.hasSelectionCapabilities(focusedElem) ? ReactInputSelection.getSelection(focusedElem) : null
18252 };
18253 },
18254
18255 /**
18256 * @restoreSelection: If any selection information was potentially lost,
18257 * restore it. This is useful when performing operations that could remove dom
18258 * nodes and place them back in, resulting in focus being lost.
18259 */
18260 restoreSelection: function (priorSelectionInformation) {
18261 var curFocusedElem = getActiveElement();
18262 var priorFocusedElem = priorSelectionInformation.focusedElem;
18263 var priorSelectionRange = priorSelectionInformation.selectionRange;
18264 if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
18265 if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
18266 ReactInputSelection.setSelection(priorFocusedElem, priorSelectionRange);
18267 }
18268 focusNode(priorFocusedElem);
18269 }
18270 },
18271
18272 /**
18273 * @getSelection: Gets the selection bounds of a focused textarea, input or
18274 * contentEditable node.
18275 * -@input: Look up selection bounds of this input
18276 * -@return {start: selectionStart, end: selectionEnd}
18277 */
18278 getSelection: function (input) {
18279 var selection;
18280
18281 if ('selectionStart' in input) {
18282 // Modern browser with input or textarea.
18283 selection = {
18284 start: input.selectionStart,
18285 end: input.selectionEnd
18286 };
18287 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
18288 // IE8 input.
18289 var range = document.selection.createRange();
18290 // There can only be one selection per document in IE, so it must
18291 // be in our element.
18292 if (range.parentElement() === input) {
18293 selection = {
18294 start: -range.moveStart('character', -input.value.length),
18295 end: -range.moveEnd('character', -input.value.length)
18296 };
18297 }
18298 } else {
18299 // Content editable or old IE textarea.
18300 selection = ReactDOMSelection.getOffsets(input);
18301 }
18302
18303 return selection || { start: 0, end: 0 };
18304 },
18305
18306 /**
18307 * @setSelection: Sets the selection bounds of a textarea or input and focuses
18308 * the input.
18309 * -@input Set selection bounds of this input or textarea
18310 * -@offsets Object of same form that is returned from get*
18311 */
18312 setSelection: function (input, offsets) {
18313 var start = offsets.start;
18314 var end = offsets.end;
18315 if (end === undefined) {
18316 end = start;
18317 }
18318
18319 if ('selectionStart' in input) {
18320 input.selectionStart = start;
18321 input.selectionEnd = Math.min(end, input.value.length);
18322 } else if (document.selection && input.nodeName && input.nodeName.toLowerCase() === 'input') {
18323 var range = input.createTextRange();
18324 range.collapse(true);
18325 range.moveStart('character', start);
18326 range.moveEnd('character', end - start);
18327 range.select();
18328 } else {
18329 ReactDOMSelection.setOffsets(input, offsets);
18330 }
18331 }
18332 };
18333
18334 module.exports = ReactInputSelection;
18335
18336/***/ },
18337/* 231 */
18338/***/ function(module, exports, __webpack_require__) {
18339
18340 /**
18341 * Copyright 2013-present, Facebook, Inc.
18342 * All rights reserved.
18343 *
18344 * This source code is licensed under the BSD-style license found in the
18345 * LICENSE file in the root directory of this source tree. An additional grant
18346 * of patent rights can be found in the PATENTS file in the same directory.
18347 *
18348 * @providesModule ReactDOMSelection
18349 */
18350
18351 'use strict';
18352
18353 var ExecutionEnvironment = __webpack_require__(137);
18354
18355 var getNodeForCharacterOffset = __webpack_require__(232);
18356 var getTextContentAccessor = __webpack_require__(139);
18357
18358 /**
18359 * While `isCollapsed` is available on the Selection object and `collapsed`
18360 * is available on the Range object, IE11 sometimes gets them wrong.
18361 * If the anchor/focus nodes and offsets are the same, the range is collapsed.
18362 */
18363 function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) {
18364 return anchorNode === focusNode && anchorOffset === focusOffset;
18365 }
18366
18367 /**
18368 * Get the appropriate anchor and focus node/offset pairs for IE.
18369 *
18370 * The catch here is that IE's selection API doesn't provide information
18371 * about whether the selection is forward or backward, so we have to
18372 * behave as though it's always forward.
18373 *
18374 * IE text differs from modern selection in that it behaves as though
18375 * block elements end with a new line. This means character offsets will
18376 * differ between the two APIs.
18377 *
18378 * @param {DOMElement} node
18379 * @return {object}
18380 */
18381 function getIEOffsets(node) {
18382 var selection = document.selection;
18383 var selectedRange = selection.createRange();
18384 var selectedLength = selectedRange.text.length;
18385
18386 // Duplicate selection so we can move range without breaking user selection.
18387 var fromStart = selectedRange.duplicate();
18388 fromStart.moveToElementText(node);
18389 fromStart.setEndPoint('EndToStart', selectedRange);
18390
18391 var startOffset = fromStart.text.length;
18392 var endOffset = startOffset + selectedLength;
18393
18394 return {
18395 start: startOffset,
18396 end: endOffset
18397 };
18398 }
18399
18400 /**
18401 * @param {DOMElement} node
18402 * @return {?object}
18403 */
18404 function getModernOffsets(node) {
18405 var selection = window.getSelection && window.getSelection();
18406
18407 if (!selection || selection.rangeCount === 0) {
18408 return null;
18409 }
18410
18411 var anchorNode = selection.anchorNode;
18412 var anchorOffset = selection.anchorOffset;
18413 var focusNode = selection.focusNode;
18414 var focusOffset = selection.focusOffset;
18415
18416 var currentRange = selection.getRangeAt(0);
18417
18418 // In Firefox, range.startContainer and range.endContainer can be "anonymous
18419 // divs", e.g. the up/down buttons on an <input type="number">. Anonymous
18420 // divs do not seem to expose properties, triggering a "Permission denied
18421 // error" if any of its properties are accessed. The only seemingly possible
18422 // way to avoid erroring is to access a property that typically works for
18423 // non-anonymous divs and catch any error that may otherwise arise. See
18424 // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
18425 try {
18426 /* eslint-disable no-unused-expressions */
18427 currentRange.startContainer.nodeType;
18428 currentRange.endContainer.nodeType;
18429 /* eslint-enable no-unused-expressions */
18430 } catch (e) {
18431 return null;
18432 }
18433
18434 // If the node and offset values are the same, the selection is collapsed.
18435 // `Selection.isCollapsed` is available natively, but IE sometimes gets
18436 // this value wrong.
18437 var isSelectionCollapsed = isCollapsed(selection.anchorNode, selection.anchorOffset, selection.focusNode, selection.focusOffset);
18438
18439 var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length;
18440
18441 var tempRange = currentRange.cloneRange();
18442 tempRange.selectNodeContents(node);
18443 tempRange.setEnd(currentRange.startContainer, currentRange.startOffset);
18444
18445 var isTempRangeCollapsed = isCollapsed(tempRange.startContainer, tempRange.startOffset, tempRange.endContainer, tempRange.endOffset);
18446
18447 var start = isTempRangeCollapsed ? 0 : tempRange.toString().length;
18448 var end = start + rangeLength;
18449
18450 // Detect whether the selection is backward.
18451 var detectionRange = document.createRange();
18452 detectionRange.setStart(anchorNode, anchorOffset);
18453 detectionRange.setEnd(focusNode, focusOffset);
18454 var isBackward = detectionRange.collapsed;
18455
18456 return {
18457 start: isBackward ? end : start,
18458 end: isBackward ? start : end
18459 };
18460 }
18461
18462 /**
18463 * @param {DOMElement|DOMTextNode} node
18464 * @param {object} offsets
18465 */
18466 function setIEOffsets(node, offsets) {
18467 var range = document.selection.createRange().duplicate();
18468 var start, end;
18469
18470 if (offsets.end === undefined) {
18471 start = offsets.start;
18472 end = start;
18473 } else if (offsets.start > offsets.end) {
18474 start = offsets.end;
18475 end = offsets.start;
18476 } else {
18477 start = offsets.start;
18478 end = offsets.end;
18479 }
18480
18481 range.moveToElementText(node);
18482 range.moveStart('character', start);
18483 range.setEndPoint('EndToStart', range);
18484 range.moveEnd('character', end - start);
18485 range.select();
18486 }
18487
18488 /**
18489 * In modern non-IE browsers, we can support both forward and backward
18490 * selections.
18491 *
18492 * Note: IE10+ supports the Selection object, but it does not support
18493 * the `extend` method, which means that even in modern IE, it's not possible
18494 * to programmatically create a backward selection. Thus, for all IE
18495 * versions, we use the old IE API to create our selections.
18496 *
18497 * @param {DOMElement|DOMTextNode} node
18498 * @param {object} offsets
18499 */
18500 function setModernOffsets(node, offsets) {
18501 if (!window.getSelection) {
18502 return;
18503 }
18504
18505 var selection = window.getSelection();
18506 var length = node[getTextContentAccessor()].length;
18507 var start = Math.min(offsets.start, length);
18508 var end = offsets.end === undefined ? start : Math.min(offsets.end, length);
18509
18510 // IE 11 uses modern selection, but doesn't support the extend method.
18511 // Flip backward selections, so we can set with a single range.
18512 if (!selection.extend && start > end) {
18513 var temp = end;
18514 end = start;
18515 start = temp;
18516 }
18517
18518 var startMarker = getNodeForCharacterOffset(node, start);
18519 var endMarker = getNodeForCharacterOffset(node, end);
18520
18521 if (startMarker && endMarker) {
18522 var range = document.createRange();
18523 range.setStart(startMarker.node, startMarker.offset);
18524 selection.removeAllRanges();
18525
18526 if (start > end) {
18527 selection.addRange(range);
18528 selection.extend(endMarker.node, endMarker.offset);
18529 } else {
18530 range.setEnd(endMarker.node, endMarker.offset);
18531 selection.addRange(range);
18532 }
18533 }
18534 }
18535
18536 var useIEOffsets = ExecutionEnvironment.canUseDOM && 'selection' in document && !('getSelection' in window);
18537
18538 var ReactDOMSelection = {
18539 /**
18540 * @param {DOMElement} node
18541 */
18542 getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets,
18543
18544 /**
18545 * @param {DOMElement|DOMTextNode} node
18546 * @param {object} offsets
18547 */
18548 setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets
18549 };
18550
18551 module.exports = ReactDOMSelection;
18552
18553/***/ },
18554/* 232 */
18555/***/ function(module, exports) {
18556
18557 /**
18558 * Copyright 2013-present, Facebook, Inc.
18559 * All rights reserved.
18560 *
18561 * This source code is licensed under the BSD-style license found in the
18562 * LICENSE file in the root directory of this source tree. An additional grant
18563 * of patent rights can be found in the PATENTS file in the same directory.
18564 *
18565 * @providesModule getNodeForCharacterOffset
18566 */
18567
18568 'use strict';
18569
18570 /**
18571 * Given any node return the first leaf node without children.
18572 *
18573 * @param {DOMElement|DOMTextNode} node
18574 * @return {DOMElement|DOMTextNode}
18575 */
18576
18577 function getLeafNode(node) {
18578 while (node && node.firstChild) {
18579 node = node.firstChild;
18580 }
18581 return node;
18582 }
18583
18584 /**
18585 * Get the next sibling within a container. This will walk up the
18586 * DOM if a node's siblings have been exhausted.
18587 *
18588 * @param {DOMElement|DOMTextNode} node
18589 * @return {?DOMElement|DOMTextNode}
18590 */
18591 function getSiblingNode(node) {
18592 while (node) {
18593 if (node.nextSibling) {
18594 return node.nextSibling;
18595 }
18596 node = node.parentNode;
18597 }
18598 }
18599
18600 /**
18601 * Get object describing the nodes which contain characters at offset.
18602 *
18603 * @param {DOMElement|DOMTextNode} root
18604 * @param {number} offset
18605 * @return {?object}
18606 */
18607 function getNodeForCharacterOffset(root, offset) {
18608 var node = getLeafNode(root);
18609 var nodeStart = 0;
18610 var nodeEnd = 0;
18611
18612 while (node) {
18613 if (node.nodeType === 3) {
18614 nodeEnd = nodeStart + node.textContent.length;
18615
18616 if (nodeStart <= offset && nodeEnd >= offset) {
18617 return {
18618 node: node,
18619 offset: offset - nodeStart
18620 };
18621 }
18622
18623 nodeStart = nodeEnd;
18624 }
18625
18626 node = getLeafNode(getSiblingNode(node));
18627 }
18628 }
18629
18630 module.exports = getNodeForCharacterOffset;
18631
18632/***/ },
18633/* 233 */
18634/***/ function(module, exports, __webpack_require__) {
18635
18636 'use strict';
18637
18638 /**
18639 * Copyright (c) 2013-present, Facebook, Inc.
18640 * All rights reserved.
18641 *
18642 * This source code is licensed under the BSD-style license found in the
18643 * LICENSE file in the root directory of this source tree. An additional grant
18644 * of patent rights can be found in the PATENTS file in the same directory.
18645 *
18646 *
18647 */
18648
18649 var isTextNode = __webpack_require__(234);
18650
18651 /*eslint-disable no-bitwise */
18652
18653 /**
18654 * Checks if a given DOM node contains or is another DOM node.
18655 */
18656 function containsNode(outerNode, innerNode) {
18657 if (!outerNode || !innerNode) {
18658 return false;
18659 } else if (outerNode === innerNode) {
18660 return true;
18661 } else if (isTextNode(outerNode)) {
18662 return false;
18663 } else if (isTextNode(innerNode)) {
18664 return containsNode(outerNode, innerNode.parentNode);
18665 } else if ('contains' in outerNode) {
18666 return outerNode.contains(innerNode);
18667 } else if (outerNode.compareDocumentPosition) {
18668 return !!(outerNode.compareDocumentPosition(innerNode) & 16);
18669 } else {
18670 return false;
18671 }
18672 }
18673
18674 module.exports = containsNode;
18675
18676/***/ },
18677/* 234 */
18678/***/ function(module, exports, __webpack_require__) {
18679
18680 'use strict';
18681
18682 /**
18683 * Copyright (c) 2013-present, Facebook, Inc.
18684 * All rights reserved.
18685 *
18686 * This source code is licensed under the BSD-style license found in the
18687 * LICENSE file in the root directory of this source tree. An additional grant
18688 * of patent rights can be found in the PATENTS file in the same directory.
18689 *
18690 * @typechecks
18691 */
18692
18693 var isNode = __webpack_require__(235);
18694
18695 /**
18696 * @param {*} object The object to check.
18697 * @return {boolean} Whether or not the object is a DOM text node.
18698 */
18699 function isTextNode(object) {
18700 return isNode(object) && object.nodeType == 3;
18701 }
18702
18703 module.exports = isTextNode;
18704
18705/***/ },
18706/* 235 */
18707/***/ function(module, exports) {
18708
18709 'use strict';
18710
18711 /**
18712 * Copyright (c) 2013-present, Facebook, Inc.
18713 * All rights reserved.
18714 *
18715 * This source code is licensed under the BSD-style license found in the
18716 * LICENSE file in the root directory of this source tree. An additional grant
18717 * of patent rights can be found in the PATENTS file in the same directory.
18718 *
18719 * @typechecks
18720 */
18721
18722 /**
18723 * @param {*} object The object to check.
18724 * @return {boolean} Whether or not the object is a DOM node.
18725 */
18726 function isNode(object) {
18727 return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
18728 }
18729
18730 module.exports = isNode;
18731
18732/***/ },
18733/* 236 */
18734/***/ function(module, exports) {
18735
18736 'use strict';
18737
18738 /**
18739 * Copyright (c) 2013-present, Facebook, Inc.
18740 * All rights reserved.
18741 *
18742 * This source code is licensed under the BSD-style license found in the
18743 * LICENSE file in the root directory of this source tree. An additional grant
18744 * of patent rights can be found in the PATENTS file in the same directory.
18745 *
18746 * @typechecks
18747 */
18748
18749 /* eslint-disable fb-www/typeof-undefined */
18750
18751 /**
18752 * Same as document.activeElement but wraps in a try-catch block. In IE it is
18753 * not safe to call document.activeElement if there is nothing focused.
18754 *
18755 * The activeElement will be null only if the document or document body is not
18756 * yet defined.
18757 */
18758 function getActiveElement() /*?DOMElement*/{
18759 if (typeof document === 'undefined') {
18760 return null;
18761 }
18762 try {
18763 return document.activeElement || document.body;
18764 } catch (e) {
18765 return document.body;
18766 }
18767 }
18768
18769 module.exports = getActiveElement;
18770
18771/***/ },
18772/* 237 */
18773/***/ function(module, exports) {
18774
18775 /**
18776 * Copyright 2013-present, Facebook, Inc.
18777 * All rights reserved.
18778 *
18779 * This source code is licensed under the BSD-style license found in the
18780 * LICENSE file in the root directory of this source tree. An additional grant
18781 * of patent rights can be found in the PATENTS file in the same directory.
18782 *
18783 * @providesModule SVGDOMPropertyConfig
18784 */
18785
18786 'use strict';
18787
18788 var NS = {
18789 xlink: 'http://www.w3.org/1999/xlink',
18790 xml: 'http://www.w3.org/XML/1998/namespace'
18791 };
18792
18793 // We use attributes for everything SVG so let's avoid some duplication and run
18794 // code instead.
18795 // The following are all specified in the HTML config already so we exclude here.
18796 // - class (as className)
18797 // - color
18798 // - height
18799 // - id
18800 // - lang
18801 // - max
18802 // - media
18803 // - method
18804 // - min
18805 // - name
18806 // - style
18807 // - target
18808 // - type
18809 // - width
18810 var ATTRS = {
18811 accentHeight: 'accent-height',
18812 accumulate: 0,
18813 additive: 0,
18814 alignmentBaseline: 'alignment-baseline',
18815 allowReorder: 'allowReorder',
18816 alphabetic: 0,
18817 amplitude: 0,
18818 arabicForm: 'arabic-form',
18819 ascent: 0,
18820 attributeName: 'attributeName',
18821 attributeType: 'attributeType',
18822 autoReverse: 'autoReverse',
18823 azimuth: 0,
18824 baseFrequency: 'baseFrequency',
18825 baseProfile: 'baseProfile',
18826 baselineShift: 'baseline-shift',
18827 bbox: 0,
18828 begin: 0,
18829 bias: 0,
18830 by: 0,
18831 calcMode: 'calcMode',
18832 capHeight: 'cap-height',
18833 clip: 0,
18834 clipPath: 'clip-path',
18835 clipRule: 'clip-rule',
18836 clipPathUnits: 'clipPathUnits',
18837 colorInterpolation: 'color-interpolation',
18838 colorInterpolationFilters: 'color-interpolation-filters',
18839 colorProfile: 'color-profile',
18840 colorRendering: 'color-rendering',
18841 contentScriptType: 'contentScriptType',
18842 contentStyleType: 'contentStyleType',
18843 cursor: 0,
18844 cx: 0,
18845 cy: 0,
18846 d: 0,
18847 decelerate: 0,
18848 descent: 0,
18849 diffuseConstant: 'diffuseConstant',
18850 direction: 0,
18851 display: 0,
18852 divisor: 0,
18853 dominantBaseline: 'dominant-baseline',
18854 dur: 0,
18855 dx: 0,
18856 dy: 0,
18857 edgeMode: 'edgeMode',
18858 elevation: 0,
18859 enableBackground: 'enable-background',
18860 end: 0,
18861 exponent: 0,
18862 externalResourcesRequired: 'externalResourcesRequired',
18863 fill: 0,
18864 fillOpacity: 'fill-opacity',
18865 fillRule: 'fill-rule',
18866 filter: 0,
18867 filterRes: 'filterRes',
18868 filterUnits: 'filterUnits',
18869 floodColor: 'flood-color',
18870 floodOpacity: 'flood-opacity',
18871 focusable: 0,
18872 fontFamily: 'font-family',
18873 fontSize: 'font-size',
18874 fontSizeAdjust: 'font-size-adjust',
18875 fontStretch: 'font-stretch',
18876 fontStyle: 'font-style',
18877 fontVariant: 'font-variant',
18878 fontWeight: 'font-weight',
18879 format: 0,
18880 from: 0,
18881 fx: 0,
18882 fy: 0,
18883 g1: 0,
18884 g2: 0,
18885 glyphName: 'glyph-name',
18886 glyphOrientationHorizontal: 'glyph-orientation-horizontal',
18887 glyphOrientationVertical: 'glyph-orientation-vertical',
18888 glyphRef: 'glyphRef',
18889 gradientTransform: 'gradientTransform',
18890 gradientUnits: 'gradientUnits',
18891 hanging: 0,
18892 horizAdvX: 'horiz-adv-x',
18893 horizOriginX: 'horiz-origin-x',
18894 ideographic: 0,
18895 imageRendering: 'image-rendering',
18896 'in': 0,
18897 in2: 0,
18898 intercept: 0,
18899 k: 0,
18900 k1: 0,
18901 k2: 0,
18902 k3: 0,
18903 k4: 0,
18904 kernelMatrix: 'kernelMatrix',
18905 kernelUnitLength: 'kernelUnitLength',
18906 kerning: 0,
18907 keyPoints: 'keyPoints',
18908 keySplines: 'keySplines',
18909 keyTimes: 'keyTimes',
18910 lengthAdjust: 'lengthAdjust',
18911 letterSpacing: 'letter-spacing',
18912 lightingColor: 'lighting-color',
18913 limitingConeAngle: 'limitingConeAngle',
18914 local: 0,
18915 markerEnd: 'marker-end',
18916 markerMid: 'marker-mid',
18917 markerStart: 'marker-start',
18918 markerHeight: 'markerHeight',
18919 markerUnits: 'markerUnits',
18920 markerWidth: 'markerWidth',
18921 mask: 0,
18922 maskContentUnits: 'maskContentUnits',
18923 maskUnits: 'maskUnits',
18924 mathematical: 0,
18925 mode: 0,
18926 numOctaves: 'numOctaves',
18927 offset: 0,
18928 opacity: 0,
18929 operator: 0,
18930 order: 0,
18931 orient: 0,
18932 orientation: 0,
18933 origin: 0,
18934 overflow: 0,
18935 overlinePosition: 'overline-position',
18936 overlineThickness: 'overline-thickness',
18937 paintOrder: 'paint-order',
18938 panose1: 'panose-1',
18939 pathLength: 'pathLength',
18940 patternContentUnits: 'patternContentUnits',
18941 patternTransform: 'patternTransform',
18942 patternUnits: 'patternUnits',
18943 pointerEvents: 'pointer-events',
18944 points: 0,
18945 pointsAtX: 'pointsAtX',
18946 pointsAtY: 'pointsAtY',
18947 pointsAtZ: 'pointsAtZ',
18948 preserveAlpha: 'preserveAlpha',
18949 preserveAspectRatio: 'preserveAspectRatio',
18950 primitiveUnits: 'primitiveUnits',
18951 r: 0,
18952 radius: 0,
18953 refX: 'refX',
18954 refY: 'refY',
18955 renderingIntent: 'rendering-intent',
18956 repeatCount: 'repeatCount',
18957 repeatDur: 'repeatDur',
18958 requiredExtensions: 'requiredExtensions',
18959 requiredFeatures: 'requiredFeatures',
18960 restart: 0,
18961 result: 0,
18962 rotate: 0,
18963 rx: 0,
18964 ry: 0,
18965 scale: 0,
18966 seed: 0,
18967 shapeRendering: 'shape-rendering',
18968 slope: 0,
18969 spacing: 0,
18970 specularConstant: 'specularConstant',
18971 specularExponent: 'specularExponent',
18972 speed: 0,
18973 spreadMethod: 'spreadMethod',
18974 startOffset: 'startOffset',
18975 stdDeviation: 'stdDeviation',
18976 stemh: 0,
18977 stemv: 0,
18978 stitchTiles: 'stitchTiles',
18979 stopColor: 'stop-color',
18980 stopOpacity: 'stop-opacity',
18981 strikethroughPosition: 'strikethrough-position',
18982 strikethroughThickness: 'strikethrough-thickness',
18983 string: 0,
18984 stroke: 0,
18985 strokeDasharray: 'stroke-dasharray',
18986 strokeDashoffset: 'stroke-dashoffset',
18987 strokeLinecap: 'stroke-linecap',
18988 strokeLinejoin: 'stroke-linejoin',
18989 strokeMiterlimit: 'stroke-miterlimit',
18990 strokeOpacity: 'stroke-opacity',
18991 strokeWidth: 'stroke-width',
18992 surfaceScale: 'surfaceScale',
18993 systemLanguage: 'systemLanguage',
18994 tableValues: 'tableValues',
18995 targetX: 'targetX',
18996 targetY: 'targetY',
18997 textAnchor: 'text-anchor',
18998 textDecoration: 'text-decoration',
18999 textRendering: 'text-rendering',
19000 textLength: 'textLength',
19001 to: 0,
19002 transform: 0,
19003 u1: 0,
19004 u2: 0,
19005 underlinePosition: 'underline-position',
19006 underlineThickness: 'underline-thickness',
19007 unicode: 0,
19008 unicodeBidi: 'unicode-bidi',
19009 unicodeRange: 'unicode-range',
19010 unitsPerEm: 'units-per-em',
19011 vAlphabetic: 'v-alphabetic',
19012 vHanging: 'v-hanging',
19013 vIdeographic: 'v-ideographic',
19014 vMathematical: 'v-mathematical',
19015 values: 0,
19016 vectorEffect: 'vector-effect',
19017 version: 0,
19018 vertAdvY: 'vert-adv-y',
19019 vertOriginX: 'vert-origin-x',
19020 vertOriginY: 'vert-origin-y',
19021 viewBox: 'viewBox',
19022 viewTarget: 'viewTarget',
19023 visibility: 0,
19024 widths: 0,
19025 wordSpacing: 'word-spacing',
19026 writingMode: 'writing-mode',
19027 x: 0,
19028 xHeight: 'x-height',
19029 x1: 0,
19030 x2: 0,
19031 xChannelSelector: 'xChannelSelector',
19032 xlinkActuate: 'xlink:actuate',
19033 xlinkArcrole: 'xlink:arcrole',
19034 xlinkHref: 'xlink:href',
19035 xlinkRole: 'xlink:role',
19036 xlinkShow: 'xlink:show',
19037 xlinkTitle: 'xlink:title',
19038 xlinkType: 'xlink:type',
19039 xmlBase: 'xml:base',
19040 xmlns: 0,
19041 xmlnsXlink: 'xmlns:xlink',
19042 xmlLang: 'xml:lang',
19043 xmlSpace: 'xml:space',
19044 y: 0,
19045 y1: 0,
19046 y2: 0,
19047 yChannelSelector: 'yChannelSelector',
19048 z: 0,
19049 zoomAndPan: 'zoomAndPan'
19050 };
19051
19052 var SVGDOMPropertyConfig = {
19053 Properties: {},
19054 DOMAttributeNamespaces: {
19055 xlinkActuate: NS.xlink,
19056 xlinkArcrole: NS.xlink,
19057 xlinkHref: NS.xlink,
19058 xlinkRole: NS.xlink,
19059 xlinkShow: NS.xlink,
19060 xlinkTitle: NS.xlink,
19061 xlinkType: NS.xlink,
19062 xmlBase: NS.xml,
19063 xmlLang: NS.xml,
19064 xmlSpace: NS.xml
19065 },
19066 DOMAttributeNames: {}
19067 };
19068
19069 Object.keys(ATTRS).forEach(function (key) {
19070 SVGDOMPropertyConfig.Properties[key] = 0;
19071 if (ATTRS[key]) {
19072 SVGDOMPropertyConfig.DOMAttributeNames[key] = ATTRS[key];
19073 }
19074 });
19075
19076 module.exports = SVGDOMPropertyConfig;
19077
19078/***/ },
19079/* 238 */
19080/***/ function(module, exports, __webpack_require__) {
19081
19082 /**
19083 * Copyright 2013-present, Facebook, Inc.
19084 * All rights reserved.
19085 *
19086 * This source code is licensed under the BSD-style license found in the
19087 * LICENSE file in the root directory of this source tree. An additional grant
19088 * of patent rights can be found in the PATENTS file in the same directory.
19089 *
19090 * @providesModule SelectEventPlugin
19091 */
19092
19093 'use strict';
19094
19095 var EventConstants = __webpack_require__(129);
19096 var EventPropagators = __webpack_require__(130);
19097 var ExecutionEnvironment = __webpack_require__(137);
19098 var ReactDOMComponentTree = __webpack_require__(124);
19099 var ReactInputSelection = __webpack_require__(230);
19100 var SyntheticEvent = __webpack_require__(141);
19101
19102 var getActiveElement = __webpack_require__(236);
19103 var isTextInputElement = __webpack_require__(160);
19104 var keyOf = __webpack_require__(112);
19105 var shallowEqual = __webpack_require__(212);
19106
19107 var topLevelTypes = EventConstants.topLevelTypes;
19108
19109 var skipSelectionChangeEvent = ExecutionEnvironment.canUseDOM && 'documentMode' in document && document.documentMode <= 11;
19110
19111 var eventTypes = {
19112 select: {
19113 phasedRegistrationNames: {
19114 bubbled: keyOf({ onSelect: null }),
19115 captured: keyOf({ onSelectCapture: null })
19116 },
19117 dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
19118 }
19119 };
19120
19121 var activeElement = null;
19122 var activeElementInst = null;
19123 var lastSelection = null;
19124 var mouseDown = false;
19125
19126 // Track whether a listener exists for this plugin. If none exist, we do
19127 // not extract events. See #3639.
19128 var hasListener = false;
19129 var ON_SELECT_KEY = keyOf({ onSelect: null });
19130
19131 /**
19132 * Get an object which is a unique representation of the current selection.
19133 *
19134 * The return value will not be consistent across nodes or browsers, but
19135 * two identical selections on the same node will return identical objects.
19136 *
19137 * @param {DOMElement} node
19138 * @return {object}
19139 */
19140 function getSelection(node) {
19141 if ('selectionStart' in node && ReactInputSelection.hasSelectionCapabilities(node)) {
19142 return {
19143 start: node.selectionStart,
19144 end: node.selectionEnd
19145 };
19146 } else if (window.getSelection) {
19147 var selection = window.getSelection();
19148 return {
19149 anchorNode: selection.anchorNode,
19150 anchorOffset: selection.anchorOffset,
19151 focusNode: selection.focusNode,
19152 focusOffset: selection.focusOffset
19153 };
19154 } else if (document.selection) {
19155 var range = document.selection.createRange();
19156 return {
19157 parentElement: range.parentElement(),
19158 text: range.text,
19159 top: range.boundingTop,
19160 left: range.boundingLeft
19161 };
19162 }
19163 }
19164
19165 /**
19166 * Poll selection to see whether it's changed.
19167 *
19168 * @param {object} nativeEvent
19169 * @return {?SyntheticEvent}
19170 */
19171 function constructSelectEvent(nativeEvent, nativeEventTarget) {
19172 // Ensure we have the right element, and that the user is not dragging a
19173 // selection (this matches native `select` event behavior). In HTML5, select
19174 // fires only on input and textarea thus if there's no focused element we
19175 // won't dispatch.
19176 if (mouseDown || activeElement == null || activeElement !== getActiveElement()) {
19177 return null;
19178 }
19179
19180 // Only fire when selection has actually changed.
19181 var currentSelection = getSelection(activeElement);
19182 if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
19183 lastSelection = currentSelection;
19184
19185 var syntheticEvent = SyntheticEvent.getPooled(eventTypes.select, activeElementInst, nativeEvent, nativeEventTarget);
19186
19187 syntheticEvent.type = 'select';
19188 syntheticEvent.target = activeElement;
19189
19190 EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent);
19191
19192 return syntheticEvent;
19193 }
19194
19195 return null;
19196 }
19197
19198 /**
19199 * This plugin creates an `onSelect` event that normalizes select events
19200 * across form elements.
19201 *
19202 * Supported elements are:
19203 * - input (see `isTextInputElement`)
19204 * - textarea
19205 * - contentEditable
19206 *
19207 * This differs from native browser implementations in the following ways:
19208 * - Fires on contentEditable fields as well as inputs.
19209 * - Fires for collapsed selection.
19210 * - Fires after user input.
19211 */
19212 var SelectEventPlugin = {
19213
19214 eventTypes: eventTypes,
19215
19216 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
19217 if (!hasListener) {
19218 return null;
19219 }
19220
19221 var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
19222
19223 switch (topLevelType) {
19224 // Track the input node that has focus.
19225 case topLevelTypes.topFocus:
19226 if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
19227 activeElement = targetNode;
19228 activeElementInst = targetInst;
19229 lastSelection = null;
19230 }
19231 break;
19232 case topLevelTypes.topBlur:
19233 activeElement = null;
19234 activeElementInst = null;
19235 lastSelection = null;
19236 break;
19237
19238 // Don't fire the event while the user is dragging. This matches the
19239 // semantics of the native select event.
19240 case topLevelTypes.topMouseDown:
19241 mouseDown = true;
19242 break;
19243 case topLevelTypes.topContextMenu:
19244 case topLevelTypes.topMouseUp:
19245 mouseDown = false;
19246 return constructSelectEvent(nativeEvent, nativeEventTarget);
19247
19248 // Chrome and IE fire non-standard event when selection is changed (and
19249 // sometimes when it hasn't). IE's event fires out of order with respect
19250 // to key and input events on deletion, so we discard it.
19251 //
19252 // Firefox doesn't support selectionchange, so check selection status
19253 // after each key entry. The selection changes after keydown and before
19254 // keyup, but we check on keydown as well in the case of holding down a
19255 // key, when multiple keydown events are fired but only one keyup is.
19256 // This is also our approach for IE handling, for the reason above.
19257 case topLevelTypes.topSelectionChange:
19258 if (skipSelectionChangeEvent) {
19259 break;
19260 }
19261 // falls through
19262 case topLevelTypes.topKeyDown:
19263 case topLevelTypes.topKeyUp:
19264 return constructSelectEvent(nativeEvent, nativeEventTarget);
19265 }
19266
19267 return null;
19268 },
19269
19270 didPutListener: function (inst, registrationName, listener) {
19271 if (registrationName === ON_SELECT_KEY) {
19272 hasListener = true;
19273 }
19274 }
19275 };
19276
19277 module.exports = SelectEventPlugin;
19278
19279/***/ },
19280/* 239 */
19281/***/ function(module, exports, __webpack_require__) {
19282
19283 /**
19284 * Copyright 2013-present, Facebook, Inc.
19285 * All rights reserved.
19286 *
19287 * This source code is licensed under the BSD-style license found in the
19288 * LICENSE file in the root directory of this source tree. An additional grant
19289 * of patent rights can be found in the PATENTS file in the same directory.
19290 *
19291 * @providesModule SimpleEventPlugin
19292 */
19293
19294 'use strict';
19295
19296 var _prodInvariant = __webpack_require__(94);
19297
19298 var EventConstants = __webpack_require__(129);
19299 var EventListener = __webpack_require__(226);
19300 var EventPropagators = __webpack_require__(130);
19301 var ReactDOMComponentTree = __webpack_require__(124);
19302 var SyntheticAnimationEvent = __webpack_require__(240);
19303 var SyntheticClipboardEvent = __webpack_require__(241);
19304 var SyntheticEvent = __webpack_require__(141);
19305 var SyntheticFocusEvent = __webpack_require__(242);
19306 var SyntheticKeyboardEvent = __webpack_require__(243);
19307 var SyntheticMouseEvent = __webpack_require__(163);
19308 var SyntheticDragEvent = __webpack_require__(246);
19309 var SyntheticTouchEvent = __webpack_require__(247);
19310 var SyntheticTransitionEvent = __webpack_require__(248);
19311 var SyntheticUIEvent = __webpack_require__(164);
19312 var SyntheticWheelEvent = __webpack_require__(249);
19313
19314 var emptyFunction = __webpack_require__(99);
19315 var getEventCharCode = __webpack_require__(244);
19316 var invariant = __webpack_require__(95);
19317 var keyOf = __webpack_require__(112);
19318
19319 var topLevelTypes = EventConstants.topLevelTypes;
19320
19321 var eventTypes = {
19322 abort: {
19323 phasedRegistrationNames: {
19324 bubbled: keyOf({ onAbort: true }),
19325 captured: keyOf({ onAbortCapture: true })
19326 }
19327 },
19328 animationEnd: {
19329 phasedRegistrationNames: {
19330 bubbled: keyOf({ onAnimationEnd: true }),
19331 captured: keyOf({ onAnimationEndCapture: true })
19332 }
19333 },
19334 animationIteration: {
19335 phasedRegistrationNames: {
19336 bubbled: keyOf({ onAnimationIteration: true }),
19337 captured: keyOf({ onAnimationIterationCapture: true })
19338 }
19339 },
19340 animationStart: {
19341 phasedRegistrationNames: {
19342 bubbled: keyOf({ onAnimationStart: true }),
19343 captured: keyOf({ onAnimationStartCapture: true })
19344 }
19345 },
19346 blur: {
19347 phasedRegistrationNames: {
19348 bubbled: keyOf({ onBlur: true }),
19349 captured: keyOf({ onBlurCapture: true })
19350 }
19351 },
19352 canPlay: {
19353 phasedRegistrationNames: {
19354 bubbled: keyOf({ onCanPlay: true }),
19355 captured: keyOf({ onCanPlayCapture: true })
19356 }
19357 },
19358 canPlayThrough: {
19359 phasedRegistrationNames: {
19360 bubbled: keyOf({ onCanPlayThrough: true }),
19361 captured: keyOf({ onCanPlayThroughCapture: true })
19362 }
19363 },
19364 click: {
19365 phasedRegistrationNames: {
19366 bubbled: keyOf({ onClick: true }),
19367 captured: keyOf({ onClickCapture: true })
19368 }
19369 },
19370 contextMenu: {
19371 phasedRegistrationNames: {
19372 bubbled: keyOf({ onContextMenu: true }),
19373 captured: keyOf({ onContextMenuCapture: true })
19374 }
19375 },
19376 copy: {
19377 phasedRegistrationNames: {
19378 bubbled: keyOf({ onCopy: true }),
19379 captured: keyOf({ onCopyCapture: true })
19380 }
19381 },
19382 cut: {
19383 phasedRegistrationNames: {
19384 bubbled: keyOf({ onCut: true }),
19385 captured: keyOf({ onCutCapture: true })
19386 }
19387 },
19388 doubleClick: {
19389 phasedRegistrationNames: {
19390 bubbled: keyOf({ onDoubleClick: true }),
19391 captured: keyOf({ onDoubleClickCapture: true })
19392 }
19393 },
19394 drag: {
19395 phasedRegistrationNames: {
19396 bubbled: keyOf({ onDrag: true }),
19397 captured: keyOf({ onDragCapture: true })
19398 }
19399 },
19400 dragEnd: {
19401 phasedRegistrationNames: {
19402 bubbled: keyOf({ onDragEnd: true }),
19403 captured: keyOf({ onDragEndCapture: true })
19404 }
19405 },
19406 dragEnter: {
19407 phasedRegistrationNames: {
19408 bubbled: keyOf({ onDragEnter: true }),
19409 captured: keyOf({ onDragEnterCapture: true })
19410 }
19411 },
19412 dragExit: {
19413 phasedRegistrationNames: {
19414 bubbled: keyOf({ onDragExit: true }),
19415 captured: keyOf({ onDragExitCapture: true })
19416 }
19417 },
19418 dragLeave: {
19419 phasedRegistrationNames: {
19420 bubbled: keyOf({ onDragLeave: true }),
19421 captured: keyOf({ onDragLeaveCapture: true })
19422 }
19423 },
19424 dragOver: {
19425 phasedRegistrationNames: {
19426 bubbled: keyOf({ onDragOver: true }),
19427 captured: keyOf({ onDragOverCapture: true })
19428 }
19429 },
19430 dragStart: {
19431 phasedRegistrationNames: {
19432 bubbled: keyOf({ onDragStart: true }),
19433 captured: keyOf({ onDragStartCapture: true })
19434 }
19435 },
19436 drop: {
19437 phasedRegistrationNames: {
19438 bubbled: keyOf({ onDrop: true }),
19439 captured: keyOf({ onDropCapture: true })
19440 }
19441 },
19442 durationChange: {
19443 phasedRegistrationNames: {
19444 bubbled: keyOf({ onDurationChange: true }),
19445 captured: keyOf({ onDurationChangeCapture: true })
19446 }
19447 },
19448 emptied: {
19449 phasedRegistrationNames: {
19450 bubbled: keyOf({ onEmptied: true }),
19451 captured: keyOf({ onEmptiedCapture: true })
19452 }
19453 },
19454 encrypted: {
19455 phasedRegistrationNames: {
19456 bubbled: keyOf({ onEncrypted: true }),
19457 captured: keyOf({ onEncryptedCapture: true })
19458 }
19459 },
19460 ended: {
19461 phasedRegistrationNames: {
19462 bubbled: keyOf({ onEnded: true }),
19463 captured: keyOf({ onEndedCapture: true })
19464 }
19465 },
19466 error: {
19467 phasedRegistrationNames: {
19468 bubbled: keyOf({ onError: true }),
19469 captured: keyOf({ onErrorCapture: true })
19470 }
19471 },
19472 focus: {
19473 phasedRegistrationNames: {
19474 bubbled: keyOf({ onFocus: true }),
19475 captured: keyOf({ onFocusCapture: true })
19476 }
19477 },
19478 input: {
19479 phasedRegistrationNames: {
19480 bubbled: keyOf({ onInput: true }),
19481 captured: keyOf({ onInputCapture: true })
19482 }
19483 },
19484 invalid: {
19485 phasedRegistrationNames: {
19486 bubbled: keyOf({ onInvalid: true }),
19487 captured: keyOf({ onInvalidCapture: true })
19488 }
19489 },
19490 keyDown: {
19491 phasedRegistrationNames: {
19492 bubbled: keyOf({ onKeyDown: true }),
19493 captured: keyOf({ onKeyDownCapture: true })
19494 }
19495 },
19496 keyPress: {
19497 phasedRegistrationNames: {
19498 bubbled: keyOf({ onKeyPress: true }),
19499 captured: keyOf({ onKeyPressCapture: true })
19500 }
19501 },
19502 keyUp: {
19503 phasedRegistrationNames: {
19504 bubbled: keyOf({ onKeyUp: true }),
19505 captured: keyOf({ onKeyUpCapture: true })
19506 }
19507 },
19508 load: {
19509 phasedRegistrationNames: {
19510 bubbled: keyOf({ onLoad: true }),
19511 captured: keyOf({ onLoadCapture: true })
19512 }
19513 },
19514 loadedData: {
19515 phasedRegistrationNames: {
19516 bubbled: keyOf({ onLoadedData: true }),
19517 captured: keyOf({ onLoadedDataCapture: true })
19518 }
19519 },
19520 loadedMetadata: {
19521 phasedRegistrationNames: {
19522 bubbled: keyOf({ onLoadedMetadata: true }),
19523 captured: keyOf({ onLoadedMetadataCapture: true })
19524 }
19525 },
19526 loadStart: {
19527 phasedRegistrationNames: {
19528 bubbled: keyOf({ onLoadStart: true }),
19529 captured: keyOf({ onLoadStartCapture: true })
19530 }
19531 },
19532 // Note: We do not allow listening to mouseOver events. Instead, use the
19533 // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`.
19534 mouseDown: {
19535 phasedRegistrationNames: {
19536 bubbled: keyOf({ onMouseDown: true }),
19537 captured: keyOf({ onMouseDownCapture: true })
19538 }
19539 },
19540 mouseMove: {
19541 phasedRegistrationNames: {
19542 bubbled: keyOf({ onMouseMove: true }),
19543 captured: keyOf({ onMouseMoveCapture: true })
19544 }
19545 },
19546 mouseOut: {
19547 phasedRegistrationNames: {
19548 bubbled: keyOf({ onMouseOut: true }),
19549 captured: keyOf({ onMouseOutCapture: true })
19550 }
19551 },
19552 mouseOver: {
19553 phasedRegistrationNames: {
19554 bubbled: keyOf({ onMouseOver: true }),
19555 captured: keyOf({ onMouseOverCapture: true })
19556 }
19557 },
19558 mouseUp: {
19559 phasedRegistrationNames: {
19560 bubbled: keyOf({ onMouseUp: true }),
19561 captured: keyOf({ onMouseUpCapture: true })
19562 }
19563 },
19564 paste: {
19565 phasedRegistrationNames: {
19566 bubbled: keyOf({ onPaste: true }),
19567 captured: keyOf({ onPasteCapture: true })
19568 }
19569 },
19570 pause: {
19571 phasedRegistrationNames: {
19572 bubbled: keyOf({ onPause: true }),
19573 captured: keyOf({ onPauseCapture: true })
19574 }
19575 },
19576 play: {
19577 phasedRegistrationNames: {
19578 bubbled: keyOf({ onPlay: true }),
19579 captured: keyOf({ onPlayCapture: true })
19580 }
19581 },
19582 playing: {
19583 phasedRegistrationNames: {
19584 bubbled: keyOf({ onPlaying: true }),
19585 captured: keyOf({ onPlayingCapture: true })
19586 }
19587 },
19588 progress: {
19589 phasedRegistrationNames: {
19590 bubbled: keyOf({ onProgress: true }),
19591 captured: keyOf({ onProgressCapture: true })
19592 }
19593 },
19594 rateChange: {
19595 phasedRegistrationNames: {
19596 bubbled: keyOf({ onRateChange: true }),
19597 captured: keyOf({ onRateChangeCapture: true })
19598 }
19599 },
19600 reset: {
19601 phasedRegistrationNames: {
19602 bubbled: keyOf({ onReset: true }),
19603 captured: keyOf({ onResetCapture: true })
19604 }
19605 },
19606 scroll: {
19607 phasedRegistrationNames: {
19608 bubbled: keyOf({ onScroll: true }),
19609 captured: keyOf({ onScrollCapture: true })
19610 }
19611 },
19612 seeked: {
19613 phasedRegistrationNames: {
19614 bubbled: keyOf({ onSeeked: true }),
19615 captured: keyOf({ onSeekedCapture: true })
19616 }
19617 },
19618 seeking: {
19619 phasedRegistrationNames: {
19620 bubbled: keyOf({ onSeeking: true }),
19621 captured: keyOf({ onSeekingCapture: true })
19622 }
19623 },
19624 stalled: {
19625 phasedRegistrationNames: {
19626 bubbled: keyOf({ onStalled: true }),
19627 captured: keyOf({ onStalledCapture: true })
19628 }
19629 },
19630 submit: {
19631 phasedRegistrationNames: {
19632 bubbled: keyOf({ onSubmit: true }),
19633 captured: keyOf({ onSubmitCapture: true })
19634 }
19635 },
19636 suspend: {
19637 phasedRegistrationNames: {
19638 bubbled: keyOf({ onSuspend: true }),
19639 captured: keyOf({ onSuspendCapture: true })
19640 }
19641 },
19642 timeUpdate: {
19643 phasedRegistrationNames: {
19644 bubbled: keyOf({ onTimeUpdate: true }),
19645 captured: keyOf({ onTimeUpdateCapture: true })
19646 }
19647 },
19648 touchCancel: {
19649 phasedRegistrationNames: {
19650 bubbled: keyOf({ onTouchCancel: true }),
19651 captured: keyOf({ onTouchCancelCapture: true })
19652 }
19653 },
19654 touchEnd: {
19655 phasedRegistrationNames: {
19656 bubbled: keyOf({ onTouchEnd: true }),
19657 captured: keyOf({ onTouchEndCapture: true })
19658 }
19659 },
19660 touchMove: {
19661 phasedRegistrationNames: {
19662 bubbled: keyOf({ onTouchMove: true }),
19663 captured: keyOf({ onTouchMoveCapture: true })
19664 }
19665 },
19666 touchStart: {
19667 phasedRegistrationNames: {
19668 bubbled: keyOf({ onTouchStart: true }),
19669 captured: keyOf({ onTouchStartCapture: true })
19670 }
19671 },
19672 transitionEnd: {
19673 phasedRegistrationNames: {
19674 bubbled: keyOf({ onTransitionEnd: true }),
19675 captured: keyOf({ onTransitionEndCapture: true })
19676 }
19677 },
19678 volumeChange: {
19679 phasedRegistrationNames: {
19680 bubbled: keyOf({ onVolumeChange: true }),
19681 captured: keyOf({ onVolumeChangeCapture: true })
19682 }
19683 },
19684 waiting: {
19685 phasedRegistrationNames: {
19686 bubbled: keyOf({ onWaiting: true }),
19687 captured: keyOf({ onWaitingCapture: true })
19688 }
19689 },
19690 wheel: {
19691 phasedRegistrationNames: {
19692 bubbled: keyOf({ onWheel: true }),
19693 captured: keyOf({ onWheelCapture: true })
19694 }
19695 }
19696 };
19697
19698 var topLevelEventsToDispatchConfig = {
19699 topAbort: eventTypes.abort,
19700 topAnimationEnd: eventTypes.animationEnd,
19701 topAnimationIteration: eventTypes.animationIteration,
19702 topAnimationStart: eventTypes.animationStart,
19703 topBlur: eventTypes.blur,
19704 topCanPlay: eventTypes.canPlay,
19705 topCanPlayThrough: eventTypes.canPlayThrough,
19706 topClick: eventTypes.click,
19707 topContextMenu: eventTypes.contextMenu,
19708 topCopy: eventTypes.copy,
19709 topCut: eventTypes.cut,
19710 topDoubleClick: eventTypes.doubleClick,
19711 topDrag: eventTypes.drag,
19712 topDragEnd: eventTypes.dragEnd,
19713 topDragEnter: eventTypes.dragEnter,
19714 topDragExit: eventTypes.dragExit,
19715 topDragLeave: eventTypes.dragLeave,
19716 topDragOver: eventTypes.dragOver,
19717 topDragStart: eventTypes.dragStart,
19718 topDrop: eventTypes.drop,
19719 topDurationChange: eventTypes.durationChange,
19720 topEmptied: eventTypes.emptied,
19721 topEncrypted: eventTypes.encrypted,
19722 topEnded: eventTypes.ended,
19723 topError: eventTypes.error,
19724 topFocus: eventTypes.focus,
19725 topInput: eventTypes.input,
19726 topInvalid: eventTypes.invalid,
19727 topKeyDown: eventTypes.keyDown,
19728 topKeyPress: eventTypes.keyPress,
19729 topKeyUp: eventTypes.keyUp,
19730 topLoad: eventTypes.load,
19731 topLoadedData: eventTypes.loadedData,
19732 topLoadedMetadata: eventTypes.loadedMetadata,
19733 topLoadStart: eventTypes.loadStart,
19734 topMouseDown: eventTypes.mouseDown,
19735 topMouseMove: eventTypes.mouseMove,
19736 topMouseOut: eventTypes.mouseOut,
19737 topMouseOver: eventTypes.mouseOver,
19738 topMouseUp: eventTypes.mouseUp,
19739 topPaste: eventTypes.paste,
19740 topPause: eventTypes.pause,
19741 topPlay: eventTypes.play,
19742 topPlaying: eventTypes.playing,
19743 topProgress: eventTypes.progress,
19744 topRateChange: eventTypes.rateChange,
19745 topReset: eventTypes.reset,
19746 topScroll: eventTypes.scroll,
19747 topSeeked: eventTypes.seeked,
19748 topSeeking: eventTypes.seeking,
19749 topStalled: eventTypes.stalled,
19750 topSubmit: eventTypes.submit,
19751 topSuspend: eventTypes.suspend,
19752 topTimeUpdate: eventTypes.timeUpdate,
19753 topTouchCancel: eventTypes.touchCancel,
19754 topTouchEnd: eventTypes.touchEnd,
19755 topTouchMove: eventTypes.touchMove,
19756 topTouchStart: eventTypes.touchStart,
19757 topTransitionEnd: eventTypes.transitionEnd,
19758 topVolumeChange: eventTypes.volumeChange,
19759 topWaiting: eventTypes.waiting,
19760 topWheel: eventTypes.wheel
19761 };
19762
19763 for (var type in topLevelEventsToDispatchConfig) {
19764 topLevelEventsToDispatchConfig[type].dependencies = [type];
19765 }
19766
19767 var ON_CLICK_KEY = keyOf({ onClick: null });
19768 var onClickListeners = {};
19769
19770 function getDictionaryKey(inst) {
19771 // Prevents V8 performance issue:
19772 // https://github.com/facebook/react/pull/7232
19773 return '.' + inst._rootNodeID;
19774 }
19775
19776 var SimpleEventPlugin = {
19777
19778 eventTypes: eventTypes,
19779
19780 extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
19781 var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType];
19782 if (!dispatchConfig) {
19783 return null;
19784 }
19785 var EventConstructor;
19786 switch (topLevelType) {
19787 case topLevelTypes.topAbort:
19788 case topLevelTypes.topCanPlay:
19789 case topLevelTypes.topCanPlayThrough:
19790 case topLevelTypes.topDurationChange:
19791 case topLevelTypes.topEmptied:
19792 case topLevelTypes.topEncrypted:
19793 case topLevelTypes.topEnded:
19794 case topLevelTypes.topError:
19795 case topLevelTypes.topInput:
19796 case topLevelTypes.topInvalid:
19797 case topLevelTypes.topLoad:
19798 case topLevelTypes.topLoadedData:
19799 case topLevelTypes.topLoadedMetadata:
19800 case topLevelTypes.topLoadStart:
19801 case topLevelTypes.topPause:
19802 case topLevelTypes.topPlay:
19803 case topLevelTypes.topPlaying:
19804 case topLevelTypes.topProgress:
19805 case topLevelTypes.topRateChange:
19806 case topLevelTypes.topReset:
19807 case topLevelTypes.topSeeked:
19808 case topLevelTypes.topSeeking:
19809 case topLevelTypes.topStalled:
19810 case topLevelTypes.topSubmit:
19811 case topLevelTypes.topSuspend:
19812 case topLevelTypes.topTimeUpdate:
19813 case topLevelTypes.topVolumeChange:
19814 case topLevelTypes.topWaiting:
19815 // HTML Events
19816 // @see http://www.w3.org/TR/html5/index.html#events-0
19817 EventConstructor = SyntheticEvent;
19818 break;
19819 case topLevelTypes.topKeyPress:
19820 // Firefox creates a keypress event for function keys too. This removes
19821 // the unwanted keypress events. Enter is however both printable and
19822 // non-printable. One would expect Tab to be as well (but it isn't).
19823 if (getEventCharCode(nativeEvent) === 0) {
19824 return null;
19825 }
19826 /* falls through */
19827 case topLevelTypes.topKeyDown:
19828 case topLevelTypes.topKeyUp:
19829 EventConstructor = SyntheticKeyboardEvent;
19830 break;
19831 case topLevelTypes.topBlur:
19832 case topLevelTypes.topFocus:
19833 EventConstructor = SyntheticFocusEvent;
19834 break;
19835 case topLevelTypes.topClick:
19836 // Firefox creates a click event on right mouse clicks. This removes the
19837 // unwanted click events.
19838 if (nativeEvent.button === 2) {
19839 return null;
19840 }
19841 /* falls through */
19842 case topLevelTypes.topContextMenu:
19843 case topLevelTypes.topDoubleClick:
19844 case topLevelTypes.topMouseDown:
19845 case topLevelTypes.topMouseMove:
19846 case topLevelTypes.topMouseOut:
19847 case topLevelTypes.topMouseOver:
19848 case topLevelTypes.topMouseUp:
19849 EventConstructor = SyntheticMouseEvent;
19850 break;
19851 case topLevelTypes.topDrag:
19852 case topLevelTypes.topDragEnd:
19853 case topLevelTypes.topDragEnter:
19854 case topLevelTypes.topDragExit:
19855 case topLevelTypes.topDragLeave:
19856 case topLevelTypes.topDragOver:
19857 case topLevelTypes.topDragStart:
19858 case topLevelTypes.topDrop:
19859 EventConstructor = SyntheticDragEvent;
19860 break;
19861 case topLevelTypes.topTouchCancel:
19862 case topLevelTypes.topTouchEnd:
19863 case topLevelTypes.topTouchMove:
19864 case topLevelTypes.topTouchStart:
19865 EventConstructor = SyntheticTouchEvent;
19866 break;
19867 case topLevelTypes.topAnimationEnd:
19868 case topLevelTypes.topAnimationIteration:
19869 case topLevelTypes.topAnimationStart:
19870 EventConstructor = SyntheticAnimationEvent;
19871 break;
19872 case topLevelTypes.topTransitionEnd:
19873 EventConstructor = SyntheticTransitionEvent;
19874 break;
19875 case topLevelTypes.topScroll:
19876 EventConstructor = SyntheticUIEvent;
19877 break;
19878 case topLevelTypes.topWheel:
19879 EventConstructor = SyntheticWheelEvent;
19880 break;
19881 case topLevelTypes.topCopy:
19882 case topLevelTypes.topCut:
19883 case topLevelTypes.topPaste:
19884 EventConstructor = SyntheticClipboardEvent;
19885 break;
19886 }
19887 !EventConstructor ? (undefined) !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : _prodInvariant('86', topLevelType) : void 0;
19888 var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
19889 EventPropagators.accumulateTwoPhaseDispatches(event);
19890 return event;
19891 },
19892
19893 didPutListener: function (inst, registrationName, listener) {
19894 // Mobile Safari does not fire properly bubble click events on
19895 // non-interactive elements, which means delegated click listeners do not
19896 // fire. The workaround for this bug involves attaching an empty click
19897 // listener on the target node.
19898 if (registrationName === ON_CLICK_KEY) {
19899 var key = getDictionaryKey(inst);
19900 var node = ReactDOMComponentTree.getNodeFromInstance(inst);
19901 if (!onClickListeners[key]) {
19902 onClickListeners[key] = EventListener.listen(node, 'click', emptyFunction);
19903 }
19904 }
19905 },
19906
19907 willDeleteListener: function (inst, registrationName) {
19908 if (registrationName === ON_CLICK_KEY) {
19909 var key = getDictionaryKey(inst);
19910 onClickListeners[key].remove();
19911 delete onClickListeners[key];
19912 }
19913 }
19914
19915 };
19916
19917 module.exports = SimpleEventPlugin;
19918
19919/***/ },
19920/* 240 */
19921/***/ function(module, exports, __webpack_require__) {
19922
19923 /**
19924 * Copyright 2013-present, Facebook, Inc.
19925 * All rights reserved.
19926 *
19927 * This source code is licensed under the BSD-style license found in the
19928 * LICENSE file in the root directory of this source tree. An additional grant
19929 * of patent rights can be found in the PATENTS file in the same directory.
19930 *
19931 * @providesModule SyntheticAnimationEvent
19932 */
19933
19934 'use strict';
19935
19936 var SyntheticEvent = __webpack_require__(141);
19937
19938 /**
19939 * @interface Event
19940 * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
19941 * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
19942 */
19943 var AnimationEventInterface = {
19944 animationName: null,
19945 elapsedTime: null,
19946 pseudoElement: null
19947 };
19948
19949 /**
19950 * @param {object} dispatchConfig Configuration used to dispatch this event.
19951 * @param {string} dispatchMarker Marker identifying the event target.
19952 * @param {object} nativeEvent Native browser event.
19953 * @extends {SyntheticEvent}
19954 */
19955 function SyntheticAnimationEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19956 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
19957 }
19958
19959 SyntheticEvent.augmentClass(SyntheticAnimationEvent, AnimationEventInterface);
19960
19961 module.exports = SyntheticAnimationEvent;
19962
19963/***/ },
19964/* 241 */
19965/***/ function(module, exports, __webpack_require__) {
19966
19967 /**
19968 * Copyright 2013-present, Facebook, Inc.
19969 * All rights reserved.
19970 *
19971 * This source code is licensed under the BSD-style license found in the
19972 * LICENSE file in the root directory of this source tree. An additional grant
19973 * of patent rights can be found in the PATENTS file in the same directory.
19974 *
19975 * @providesModule SyntheticClipboardEvent
19976 */
19977
19978 'use strict';
19979
19980 var SyntheticEvent = __webpack_require__(141);
19981
19982 /**
19983 * @interface Event
19984 * @see http://www.w3.org/TR/clipboard-apis/
19985 */
19986 var ClipboardEventInterface = {
19987 clipboardData: function (event) {
19988 return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
19989 }
19990 };
19991
19992 /**
19993 * @param {object} dispatchConfig Configuration used to dispatch this event.
19994 * @param {string} dispatchMarker Marker identifying the event target.
19995 * @param {object} nativeEvent Native browser event.
19996 * @extends {SyntheticUIEvent}
19997 */
19998 function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
19999 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20000 }
20001
20002 SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface);
20003
20004 module.exports = SyntheticClipboardEvent;
20005
20006/***/ },
20007/* 242 */
20008/***/ function(module, exports, __webpack_require__) {
20009
20010 /**
20011 * Copyright 2013-present, Facebook, Inc.
20012 * All rights reserved.
20013 *
20014 * This source code is licensed under the BSD-style license found in the
20015 * LICENSE file in the root directory of this source tree. An additional grant
20016 * of patent rights can be found in the PATENTS file in the same directory.
20017 *
20018 * @providesModule SyntheticFocusEvent
20019 */
20020
20021 'use strict';
20022
20023 var SyntheticUIEvent = __webpack_require__(164);
20024
20025 /**
20026 * @interface FocusEvent
20027 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20028 */
20029 var FocusEventInterface = {
20030 relatedTarget: null
20031 };
20032
20033 /**
20034 * @param {object} dispatchConfig Configuration used to dispatch this event.
20035 * @param {string} dispatchMarker Marker identifying the event target.
20036 * @param {object} nativeEvent Native browser event.
20037 * @extends {SyntheticUIEvent}
20038 */
20039 function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20040 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20041 }
20042
20043 SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface);
20044
20045 module.exports = SyntheticFocusEvent;
20046
20047/***/ },
20048/* 243 */
20049/***/ function(module, exports, __webpack_require__) {
20050
20051 /**
20052 * Copyright 2013-present, Facebook, Inc.
20053 * All rights reserved.
20054 *
20055 * This source code is licensed under the BSD-style license found in the
20056 * LICENSE file in the root directory of this source tree. An additional grant
20057 * of patent rights can be found in the PATENTS file in the same directory.
20058 *
20059 * @providesModule SyntheticKeyboardEvent
20060 */
20061
20062 'use strict';
20063
20064 var SyntheticUIEvent = __webpack_require__(164);
20065
20066 var getEventCharCode = __webpack_require__(244);
20067 var getEventKey = __webpack_require__(245);
20068 var getEventModifierState = __webpack_require__(166);
20069
20070 /**
20071 * @interface KeyboardEvent
20072 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20073 */
20074 var KeyboardEventInterface = {
20075 key: getEventKey,
20076 location: null,
20077 ctrlKey: null,
20078 shiftKey: null,
20079 altKey: null,
20080 metaKey: null,
20081 repeat: null,
20082 locale: null,
20083 getModifierState: getEventModifierState,
20084 // Legacy Interface
20085 charCode: function (event) {
20086 // `charCode` is the result of a KeyPress event and represents the value of
20087 // the actual printable character.
20088
20089 // KeyPress is deprecated, but its replacement is not yet final and not
20090 // implemented in any major browser. Only KeyPress has charCode.
20091 if (event.type === 'keypress') {
20092 return getEventCharCode(event);
20093 }
20094 return 0;
20095 },
20096 keyCode: function (event) {
20097 // `keyCode` is the result of a KeyDown/Up event and represents the value of
20098 // physical keyboard key.
20099
20100 // The actual meaning of the value depends on the users' keyboard layout
20101 // which cannot be detected. Assuming that it is a US keyboard layout
20102 // provides a surprisingly accurate mapping for US and European users.
20103 // Due to this, it is left to the user to implement at this time.
20104 if (event.type === 'keydown' || event.type === 'keyup') {
20105 return event.keyCode;
20106 }
20107 return 0;
20108 },
20109 which: function (event) {
20110 // `which` is an alias for either `keyCode` or `charCode` depending on the
20111 // type of the event.
20112 if (event.type === 'keypress') {
20113 return getEventCharCode(event);
20114 }
20115 if (event.type === 'keydown' || event.type === 'keyup') {
20116 return event.keyCode;
20117 }
20118 return 0;
20119 }
20120 };
20121
20122 /**
20123 * @param {object} dispatchConfig Configuration used to dispatch this event.
20124 * @param {string} dispatchMarker Marker identifying the event target.
20125 * @param {object} nativeEvent Native browser event.
20126 * @extends {SyntheticUIEvent}
20127 */
20128 function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20129 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20130 }
20131
20132 SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface);
20133
20134 module.exports = SyntheticKeyboardEvent;
20135
20136/***/ },
20137/* 244 */
20138/***/ function(module, exports) {
20139
20140 /**
20141 * Copyright 2013-present, Facebook, Inc.
20142 * All rights reserved.
20143 *
20144 * This source code is licensed under the BSD-style license found in the
20145 * LICENSE file in the root directory of this source tree. An additional grant
20146 * of patent rights can be found in the PATENTS file in the same directory.
20147 *
20148 * @providesModule getEventCharCode
20149 */
20150
20151 'use strict';
20152
20153 /**
20154 * `charCode` represents the actual "character code" and is safe to use with
20155 * `String.fromCharCode`. As such, only keys that correspond to printable
20156 * characters produce a valid `charCode`, the only exception to this is Enter.
20157 * The Tab-key is considered non-printable and does not have a `charCode`,
20158 * presumably because it does not produce a tab-character in browsers.
20159 *
20160 * @param {object} nativeEvent Native browser event.
20161 * @return {number} Normalized `charCode` property.
20162 */
20163
20164 function getEventCharCode(nativeEvent) {
20165 var charCode;
20166 var keyCode = nativeEvent.keyCode;
20167
20168 if ('charCode' in nativeEvent) {
20169 charCode = nativeEvent.charCode;
20170
20171 // FF does not set `charCode` for the Enter-key, check against `keyCode`.
20172 if (charCode === 0 && keyCode === 13) {
20173 charCode = 13;
20174 }
20175 } else {
20176 // IE8 does not implement `charCode`, but `keyCode` has the correct value.
20177 charCode = keyCode;
20178 }
20179
20180 // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
20181 // Must not discard the (non-)printable Enter-key.
20182 if (charCode >= 32 || charCode === 13) {
20183 return charCode;
20184 }
20185
20186 return 0;
20187 }
20188
20189 module.exports = getEventCharCode;
20190
20191/***/ },
20192/* 245 */
20193/***/ function(module, exports, __webpack_require__) {
20194
20195 /**
20196 * Copyright 2013-present, Facebook, Inc.
20197 * All rights reserved.
20198 *
20199 * This source code is licensed under the BSD-style license found in the
20200 * LICENSE file in the root directory of this source tree. An additional grant
20201 * of patent rights can be found in the PATENTS file in the same directory.
20202 *
20203 * @providesModule getEventKey
20204 */
20205
20206 'use strict';
20207
20208 var getEventCharCode = __webpack_require__(244);
20209
20210 /**
20211 * Normalization of deprecated HTML5 `key` values
20212 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
20213 */
20214 var normalizeKey = {
20215 'Esc': 'Escape',
20216 'Spacebar': ' ',
20217 'Left': 'ArrowLeft',
20218 'Up': 'ArrowUp',
20219 'Right': 'ArrowRight',
20220 'Down': 'ArrowDown',
20221 'Del': 'Delete',
20222 'Win': 'OS',
20223 'Menu': 'ContextMenu',
20224 'Apps': 'ContextMenu',
20225 'Scroll': 'ScrollLock',
20226 'MozPrintableKey': 'Unidentified'
20227 };
20228
20229 /**
20230 * Translation from legacy `keyCode` to HTML5 `key`
20231 * Only special keys supported, all others depend on keyboard layout or browser
20232 * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
20233 */
20234 var translateToKey = {
20235 8: 'Backspace',
20236 9: 'Tab',
20237 12: 'Clear',
20238 13: 'Enter',
20239 16: 'Shift',
20240 17: 'Control',
20241 18: 'Alt',
20242 19: 'Pause',
20243 20: 'CapsLock',
20244 27: 'Escape',
20245 32: ' ',
20246 33: 'PageUp',
20247 34: 'PageDown',
20248 35: 'End',
20249 36: 'Home',
20250 37: 'ArrowLeft',
20251 38: 'ArrowUp',
20252 39: 'ArrowRight',
20253 40: 'ArrowDown',
20254 45: 'Insert',
20255 46: 'Delete',
20256 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6',
20257 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12',
20258 144: 'NumLock',
20259 145: 'ScrollLock',
20260 224: 'Meta'
20261 };
20262
20263 /**
20264 * @param {object} nativeEvent Native browser event.
20265 * @return {string} Normalized `key` property.
20266 */
20267 function getEventKey(nativeEvent) {
20268 if (nativeEvent.key) {
20269 // Normalize inconsistent values reported by browsers due to
20270 // implementations of a working draft specification.
20271
20272 // FireFox implements `key` but returns `MozPrintableKey` for all
20273 // printable characters (normalized to `Unidentified`), ignore it.
20274 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
20275 if (key !== 'Unidentified') {
20276 return key;
20277 }
20278 }
20279
20280 // Browser does not implement `key`, polyfill as much of it as we can.
20281 if (nativeEvent.type === 'keypress') {
20282 var charCode = getEventCharCode(nativeEvent);
20283
20284 // The enter-key is technically both printable and non-printable and can
20285 // thus be captured by `keypress`, no other non-printable key should.
20286 return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
20287 }
20288 if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
20289 // While user keyboard layout determines the actual meaning of each
20290 // `keyCode` value, almost all function keys have a universal value.
20291 return translateToKey[nativeEvent.keyCode] || 'Unidentified';
20292 }
20293 return '';
20294 }
20295
20296 module.exports = getEventKey;
20297
20298/***/ },
20299/* 246 */
20300/***/ function(module, exports, __webpack_require__) {
20301
20302 /**
20303 * Copyright 2013-present, Facebook, Inc.
20304 * All rights reserved.
20305 *
20306 * This source code is licensed under the BSD-style license found in the
20307 * LICENSE file in the root directory of this source tree. An additional grant
20308 * of patent rights can be found in the PATENTS file in the same directory.
20309 *
20310 * @providesModule SyntheticDragEvent
20311 */
20312
20313 'use strict';
20314
20315 var SyntheticMouseEvent = __webpack_require__(163);
20316
20317 /**
20318 * @interface DragEvent
20319 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20320 */
20321 var DragEventInterface = {
20322 dataTransfer: null
20323 };
20324
20325 /**
20326 * @param {object} dispatchConfig Configuration used to dispatch this event.
20327 * @param {string} dispatchMarker Marker identifying the event target.
20328 * @param {object} nativeEvent Native browser event.
20329 * @extends {SyntheticUIEvent}
20330 */
20331 function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20332 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20333 }
20334
20335 SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface);
20336
20337 module.exports = SyntheticDragEvent;
20338
20339/***/ },
20340/* 247 */
20341/***/ function(module, exports, __webpack_require__) {
20342
20343 /**
20344 * Copyright 2013-present, Facebook, Inc.
20345 * All rights reserved.
20346 *
20347 * This source code is licensed under the BSD-style license found in the
20348 * LICENSE file in the root directory of this source tree. An additional grant
20349 * of patent rights can be found in the PATENTS file in the same directory.
20350 *
20351 * @providesModule SyntheticTouchEvent
20352 */
20353
20354 'use strict';
20355
20356 var SyntheticUIEvent = __webpack_require__(164);
20357
20358 var getEventModifierState = __webpack_require__(166);
20359
20360 /**
20361 * @interface TouchEvent
20362 * @see http://www.w3.org/TR/touch-events/
20363 */
20364 var TouchEventInterface = {
20365 touches: null,
20366 targetTouches: null,
20367 changedTouches: null,
20368 altKey: null,
20369 metaKey: null,
20370 ctrlKey: null,
20371 shiftKey: null,
20372 getModifierState: getEventModifierState
20373 };
20374
20375 /**
20376 * @param {object} dispatchConfig Configuration used to dispatch this event.
20377 * @param {string} dispatchMarker Marker identifying the event target.
20378 * @param {object} nativeEvent Native browser event.
20379 * @extends {SyntheticUIEvent}
20380 */
20381 function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20382 return SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20383 }
20384
20385 SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface);
20386
20387 module.exports = SyntheticTouchEvent;
20388
20389/***/ },
20390/* 248 */
20391/***/ function(module, exports, __webpack_require__) {
20392
20393 /**
20394 * Copyright 2013-present, Facebook, Inc.
20395 * All rights reserved.
20396 *
20397 * This source code is licensed under the BSD-style license found in the
20398 * LICENSE file in the root directory of this source tree. An additional grant
20399 * of patent rights can be found in the PATENTS file in the same directory.
20400 *
20401 * @providesModule SyntheticTransitionEvent
20402 */
20403
20404 'use strict';
20405
20406 var SyntheticEvent = __webpack_require__(141);
20407
20408 /**
20409 * @interface Event
20410 * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
20411 * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
20412 */
20413 var TransitionEventInterface = {
20414 propertyName: null,
20415 elapsedTime: null,
20416 pseudoElement: null
20417 };
20418
20419 /**
20420 * @param {object} dispatchConfig Configuration used to dispatch this event.
20421 * @param {string} dispatchMarker Marker identifying the event target.
20422 * @param {object} nativeEvent Native browser event.
20423 * @extends {SyntheticEvent}
20424 */
20425 function SyntheticTransitionEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20426 return SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20427 }
20428
20429 SyntheticEvent.augmentClass(SyntheticTransitionEvent, TransitionEventInterface);
20430
20431 module.exports = SyntheticTransitionEvent;
20432
20433/***/ },
20434/* 249 */
20435/***/ function(module, exports, __webpack_require__) {
20436
20437 /**
20438 * Copyright 2013-present, Facebook, Inc.
20439 * All rights reserved.
20440 *
20441 * This source code is licensed under the BSD-style license found in the
20442 * LICENSE file in the root directory of this source tree. An additional grant
20443 * of patent rights can be found in the PATENTS file in the same directory.
20444 *
20445 * @providesModule SyntheticWheelEvent
20446 */
20447
20448 'use strict';
20449
20450 var SyntheticMouseEvent = __webpack_require__(163);
20451
20452 /**
20453 * @interface WheelEvent
20454 * @see http://www.w3.org/TR/DOM-Level-3-Events/
20455 */
20456 var WheelEventInterface = {
20457 deltaX: function (event) {
20458 return 'deltaX' in event ? event.deltaX :
20459 // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
20460 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
20461 },
20462 deltaY: function (event) {
20463 return 'deltaY' in event ? event.deltaY :
20464 // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
20465 'wheelDeltaY' in event ? -event.wheelDeltaY :
20466 // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
20467 'wheelDelta' in event ? -event.wheelDelta : 0;
20468 },
20469 deltaZ: null,
20470
20471 // Browsers without "deltaMode" is reporting in raw wheel delta where one
20472 // notch on the scroll is always +/- 120, roughly equivalent to pixels.
20473 // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
20474 // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
20475 deltaMode: null
20476 };
20477
20478 /**
20479 * @param {object} dispatchConfig Configuration used to dispatch this event.
20480 * @param {string} dispatchMarker Marker identifying the event target.
20481 * @param {object} nativeEvent Native browser event.
20482 * @extends {SyntheticMouseEvent}
20483 */
20484 function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget) {
20485 return SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);
20486 }
20487
20488 SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface);
20489
20490 module.exports = SyntheticWheelEvent;
20491
20492/***/ },
20493/* 250 */
20494/***/ function(module, exports, __webpack_require__) {
20495
20496 /**
20497 * Copyright 2013-present, Facebook, Inc.
20498 * All rights reserved.
20499 *
20500 * This source code is licensed under the BSD-style license found in the
20501 * LICENSE file in the root directory of this source tree. An additional grant
20502 * of patent rights can be found in the PATENTS file in the same directory.
20503 *
20504 * @providesModule ReactMount
20505 */
20506
20507 'use strict';
20508
20509 var _prodInvariant = __webpack_require__(94);
20510
20511 var DOMLazyTree = __webpack_require__(170);
20512 var DOMProperty = __webpack_require__(125);
20513 var ReactBrowserEventEmitter = __webpack_require__(195);
20514 var ReactCurrentOwner = __webpack_require__(97);
20515 var ReactDOMComponentTree = __webpack_require__(124);
20516 var ReactDOMContainerInfo = __webpack_require__(251);
20517 var ReactDOMFeatureFlags = __webpack_require__(252);
20518 var ReactElement = __webpack_require__(96);
20519 var ReactFeatureFlags = __webpack_require__(146);
20520 var ReactInstanceMap = __webpack_require__(207);
20521 var ReactInstrumentation = __webpack_require__(150);
20522 var ReactMarkupChecksum = __webpack_require__(253);
20523 var ReactReconciler = __webpack_require__(147);
20524 var ReactUpdateQueue = __webpack_require__(219);
20525 var ReactUpdates = __webpack_require__(144);
20526
20527 var emptyObject = __webpack_require__(106);
20528 var instantiateReactComponent = __webpack_require__(209);
20529 var invariant = __webpack_require__(95);
20530 var setInnerHTML = __webpack_require__(172);
20531 var shouldUpdateReactComponent = __webpack_require__(213);
20532 var warning = __webpack_require__(98);
20533
20534 var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
20535 var ROOT_ATTR_NAME = DOMProperty.ROOT_ATTRIBUTE_NAME;
20536
20537 var ELEMENT_NODE_TYPE = 1;
20538 var DOC_NODE_TYPE = 9;
20539 var DOCUMENT_FRAGMENT_NODE_TYPE = 11;
20540
20541 var instancesByReactRootID = {};
20542
20543 /**
20544 * Finds the index of the first character
20545 * that's not common between the two given strings.
20546 *
20547 * @return {number} the index of the character where the strings diverge
20548 */
20549 function firstDifferenceIndex(string1, string2) {
20550 var minLen = Math.min(string1.length, string2.length);
20551 for (var i = 0; i < minLen; i++) {
20552 if (string1.charAt(i) !== string2.charAt(i)) {
20553 return i;
20554 }
20555 }
20556 return string1.length === string2.length ? -1 : minLen;
20557 }
20558
20559 /**
20560 * @param {DOMElement|DOMDocument} container DOM element that may contain
20561 * a React component
20562 * @return {?*} DOM element that may have the reactRoot ID, or null.
20563 */
20564 function getReactRootElementInContainer(container) {
20565 if (!container) {
20566 return null;
20567 }
20568
20569 if (container.nodeType === DOC_NODE_TYPE) {
20570 return container.documentElement;
20571 } else {
20572 return container.firstChild;
20573 }
20574 }
20575
20576 function internalGetID(node) {
20577 // If node is something like a window, document, or text node, none of
20578 // which support attributes or a .getAttribute method, gracefully return
20579 // the empty string, as if the attribute were missing.
20580 return node.getAttribute && node.getAttribute(ATTR_NAME) || '';
20581 }
20582
20583 /**
20584 * Mounts this component and inserts it into the DOM.
20585 *
20586 * @param {ReactComponent} componentInstance The instance to mount.
20587 * @param {DOMElement} container DOM element to mount into.
20588 * @param {ReactReconcileTransaction} transaction
20589 * @param {boolean} shouldReuseMarkup If true, do not insert markup
20590 */
20591 function mountComponentIntoNode(wrapperInstance, container, transaction, shouldReuseMarkup, context) {
20592 var markerName;
20593 if (ReactFeatureFlags.logTopLevelRenders) {
20594 var wrappedElement = wrapperInstance._currentElement.props;
20595 var type = wrappedElement.type;
20596 markerName = 'React mount: ' + (typeof type === 'string' ? type : type.displayName || type.name);
20597 console.time(markerName);
20598 }
20599
20600 var markup = ReactReconciler.mountComponent(wrapperInstance, transaction, null, ReactDOMContainerInfo(wrapperInstance, container), context, 0 /* parentDebugID */
20601 );
20602
20603 if (markerName) {
20604 console.timeEnd(markerName);
20605 }
20606
20607 wrapperInstance._renderedComponent._topLevelWrapper = wrapperInstance;
20608 ReactMount._mountImageIntoNode(markup, container, wrapperInstance, shouldReuseMarkup, transaction);
20609 }
20610
20611 /**
20612 * Batched mount.
20613 *
20614 * @param {ReactComponent} componentInstance The instance to mount.
20615 * @param {DOMElement} container DOM element to mount into.
20616 * @param {boolean} shouldReuseMarkup If true, do not insert markup
20617 */
20618 function batchedMountComponentIntoNode(componentInstance, container, shouldReuseMarkup, context) {
20619 var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(
20620 /* useCreateElement */
20621 !shouldReuseMarkup && ReactDOMFeatureFlags.useCreateElement);
20622 transaction.perform(mountComponentIntoNode, null, componentInstance, container, transaction, shouldReuseMarkup, context);
20623 ReactUpdates.ReactReconcileTransaction.release(transaction);
20624 }
20625
20626 /**
20627 * Unmounts a component and removes it from the DOM.
20628 *
20629 * @param {ReactComponent} instance React component instance.
20630 * @param {DOMElement} container DOM element to unmount from.
20631 * @final
20632 * @internal
20633 * @see {ReactMount.unmountComponentAtNode}
20634 */
20635 function unmountComponentFromNode(instance, container, safely) {
20636 if ((undefined) !== 'production') {
20637 ReactInstrumentation.debugTool.onBeginFlush();
20638 }
20639 ReactReconciler.unmountComponent(instance, safely);
20640 if ((undefined) !== 'production') {
20641 ReactInstrumentation.debugTool.onEndFlush();
20642 }
20643
20644 if (container.nodeType === DOC_NODE_TYPE) {
20645 container = container.documentElement;
20646 }
20647
20648 // http://jsperf.com/emptying-a-node
20649 while (container.lastChild) {
20650 container.removeChild(container.lastChild);
20651 }
20652 }
20653
20654 /**
20655 * True if the supplied DOM node has a direct React-rendered child that is
20656 * not a React root element. Useful for warning in `render`,
20657 * `unmountComponentAtNode`, etc.
20658 *
20659 * @param {?DOMElement} node The candidate DOM node.
20660 * @return {boolean} True if the DOM element contains a direct child that was
20661 * rendered by React but is not a root element.
20662 * @internal
20663 */
20664 function hasNonRootReactChild(container) {
20665 var rootEl = getReactRootElementInContainer(container);
20666 if (rootEl) {
20667 var inst = ReactDOMComponentTree.getInstanceFromNode(rootEl);
20668 return !!(inst && inst._hostParent);
20669 }
20670 }
20671
20672 /**
20673 * True if the supplied DOM node is a React DOM element and
20674 * it has been rendered by another copy of React.
20675 *
20676 * @param {?DOMElement} node The candidate DOM node.
20677 * @return {boolean} True if the DOM has been rendered by another copy of React
20678 * @internal
20679 */
20680 function nodeIsRenderedByOtherInstance(container) {
20681 var rootEl = getReactRootElementInContainer(container);
20682 return !!(rootEl && isReactNode(rootEl) && !ReactDOMComponentTree.getInstanceFromNode(rootEl));
20683 }
20684
20685 /**
20686 * True if the supplied DOM node is a valid node element.
20687 *
20688 * @param {?DOMElement} node The candidate DOM node.
20689 * @return {boolean} True if the DOM is a valid DOM node.
20690 * @internal
20691 */
20692 function isValidContainer(node) {
20693 return !!(node && (node.nodeType === ELEMENT_NODE_TYPE || node.nodeType === DOC_NODE_TYPE || node.nodeType === DOCUMENT_FRAGMENT_NODE_TYPE));
20694 }
20695
20696 /**
20697 * True if the supplied DOM node is a valid React node element.
20698 *
20699 * @param {?DOMElement} node The candidate DOM node.
20700 * @return {boolean} True if the DOM is a valid React DOM node.
20701 * @internal
20702 */
20703 function isReactNode(node) {
20704 return isValidContainer(node) && (node.hasAttribute(ROOT_ATTR_NAME) || node.hasAttribute(ATTR_NAME));
20705 }
20706
20707 function getHostRootInstanceInContainer(container) {
20708 var rootEl = getReactRootElementInContainer(container);
20709 var prevHostInstance = rootEl && ReactDOMComponentTree.getInstanceFromNode(rootEl);
20710 return prevHostInstance && !prevHostInstance._hostParent ? prevHostInstance : null;
20711 }
20712
20713 function getTopLevelWrapperInContainer(container) {
20714 var root = getHostRootInstanceInContainer(container);
20715 return root ? root._hostContainerInfo._topLevelWrapper : null;
20716 }
20717
20718 /**
20719 * Temporary (?) hack so that we can store all top-level pending updates on
20720 * composites instead of having to worry about different types of components
20721 * here.
20722 */
20723 var topLevelRootCounter = 1;
20724 var TopLevelWrapper = function () {
20725 this.rootID = topLevelRootCounter++;
20726 };
20727 TopLevelWrapper.prototype.isReactComponent = {};
20728 if ((undefined) !== 'production') {
20729 TopLevelWrapper.displayName = 'TopLevelWrapper';
20730 }
20731 TopLevelWrapper.prototype.render = function () {
20732 // this.props is actually a ReactElement
20733 return this.props;
20734 };
20735
20736 /**
20737 * Mounting is the process of initializing a React component by creating its
20738 * representative DOM elements and inserting them into a supplied `container`.
20739 * Any prior content inside `container` is destroyed in the process.
20740 *
20741 * ReactMount.render(
20742 * component,
20743 * document.getElementById('container')
20744 * );
20745 *
20746 * <div id="container"> <-- Supplied `container`.
20747 * <div data-reactid=".3"> <-- Rendered reactRoot of React
20748 * // ... component.
20749 * </div>
20750 * </div>
20751 *
20752 * Inside of `container`, the first element rendered is the "reactRoot".
20753 */
20754 var ReactMount = {
20755
20756 TopLevelWrapper: TopLevelWrapper,
20757
20758 /**
20759 * Used by devtools. The keys are not important.
20760 */
20761 _instancesByReactRootID: instancesByReactRootID,
20762
20763 /**
20764 * This is a hook provided to support rendering React components while
20765 * ensuring that the apparent scroll position of its `container` does not
20766 * change.
20767 *
20768 * @param {DOMElement} container The `container` being rendered into.
20769 * @param {function} renderCallback This must be called once to do the render.
20770 */
20771 scrollMonitor: function (container, renderCallback) {
20772 renderCallback();
20773 },
20774
20775 /**
20776 * Take a component that's already mounted into the DOM and replace its props
20777 * @param {ReactComponent} prevComponent component instance already in the DOM
20778 * @param {ReactElement} nextElement component instance to render
20779 * @param {DOMElement} container container to render into
20780 * @param {?function} callback function triggered on completion
20781 */
20782 _updateRootComponent: function (prevComponent, nextElement, nextContext, container, callback) {
20783 ReactMount.scrollMonitor(container, function () {
20784 ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement, nextContext);
20785 if (callback) {
20786 ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback);
20787 }
20788 });
20789
20790 return prevComponent;
20791 },
20792
20793 /**
20794 * Render a new component into the DOM. Hooked by hooks!
20795 *
20796 * @param {ReactElement} nextElement element to render
20797 * @param {DOMElement} container container to render into
20798 * @param {boolean} shouldReuseMarkup if we should skip the markup insertion
20799 * @return {ReactComponent} nextComponent
20800 */
20801 _renderNewRootComponent: function (nextElement, container, shouldReuseMarkup, context) {
20802 // Various parts of our code (such as ReactCompositeComponent's
20803 // _renderValidatedComponent) assume that calls to render aren't nested;
20804 // verify that that's the case.
20805 (undefined) !== '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;
20806
20807 !isValidContainer(container) ? (undefined) !== 'production' ? invariant(false, '_registerComponent(...): Target container is not a DOM element.') : _prodInvariant('37') : void 0;
20808
20809 ReactBrowserEventEmitter.ensureScrollValueMonitoring();
20810 var componentInstance = instantiateReactComponent(nextElement, false);
20811
20812 // The initial render is synchronous but any updates that happen during
20813 // rendering, in componentWillMount or componentDidMount, will be batched
20814 // according to the current batching strategy.
20815
20816 ReactUpdates.batchedUpdates(batchedMountComponentIntoNode, componentInstance, container, shouldReuseMarkup, context);
20817
20818 var wrapperID = componentInstance._instance.rootID;
20819 instancesByReactRootID[wrapperID] = componentInstance;
20820
20821 return componentInstance;
20822 },
20823
20824 /**
20825 * Renders a React component into the DOM in the supplied `container`.
20826 *
20827 * If the React component was previously rendered into `container`, this will
20828 * perform an update on it and only mutate the DOM as necessary to reflect the
20829 * latest React component.
20830 *
20831 * @param {ReactComponent} parentComponent The conceptual parent of this render tree.
20832 * @param {ReactElement} nextElement Component element to render.
20833 * @param {DOMElement} container DOM element to render into.
20834 * @param {?function} callback function triggered on completion
20835 * @return {ReactComponent} Component instance rendered in `container`.
20836 */
20837 renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
20838 !(parentComponent != null && ReactInstanceMap.has(parentComponent)) ? (undefined) !== 'production' ? invariant(false, 'parentComponent must be a valid React Component') : _prodInvariant('38') : void 0;
20839 return ReactMount._renderSubtreeIntoContainer(parentComponent, nextElement, container, callback);
20840 },
20841
20842 _renderSubtreeIntoContainer: function (parentComponent, nextElement, container, callback) {
20843 ReactUpdateQueue.validateCallback(callback, 'ReactDOM.render');
20844 !ReactElement.isValidElement(nextElement) ? (undefined) !== '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 />.' :
20845 // Check if it quacks like an element
20846 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;
20847
20848 (undefined) !== '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;
20849
20850 var nextWrappedElement = ReactElement(TopLevelWrapper, null, null, null, null, null, nextElement);
20851
20852 var nextContext;
20853 if (parentComponent) {
20854 var parentInst = ReactInstanceMap.get(parentComponent);
20855 nextContext = parentInst._processChildContext(parentInst._context);
20856 } else {
20857 nextContext = emptyObject;
20858 }
20859
20860 var prevComponent = getTopLevelWrapperInContainer(container);
20861
20862 if (prevComponent) {
20863 var prevWrappedElement = prevComponent._currentElement;
20864 var prevElement = prevWrappedElement.props;
20865 if (shouldUpdateReactComponent(prevElement, nextElement)) {
20866 var publicInst = prevComponent._renderedComponent.getPublicInstance();
20867 var updatedCallback = callback && function () {
20868 callback.call(publicInst);
20869 };
20870 ReactMount._updateRootComponent(prevComponent, nextWrappedElement, nextContext, container, updatedCallback);
20871 return publicInst;
20872 } else {
20873 ReactMount.unmountComponentAtNode(container);
20874 }
20875 }
20876
20877 var reactRootElement = getReactRootElementInContainer(container);
20878 var containerHasReactMarkup = reactRootElement && !!internalGetID(reactRootElement);
20879 var containerHasNonRootReactChild = hasNonRootReactChild(container);
20880
20881 if ((undefined) !== 'production') {
20882 (undefined) !== '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;
20883
20884 if (!containerHasReactMarkup || reactRootElement.nextSibling) {
20885 var rootElementSibling = reactRootElement;
20886 while (rootElementSibling) {
20887 if (internalGetID(rootElementSibling)) {
20888 (undefined) !== '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;
20889 break;
20890 }
20891 rootElementSibling = rootElementSibling.nextSibling;
20892 }
20893 }
20894 }
20895
20896 var shouldReuseMarkup = containerHasReactMarkup && !prevComponent && !containerHasNonRootReactChild;
20897 var component = ReactMount._renderNewRootComponent(nextWrappedElement, container, shouldReuseMarkup, nextContext)._renderedComponent.getPublicInstance();
20898 if (callback) {
20899 callback.call(component);
20900 }
20901 return component;
20902 },
20903
20904 /**
20905 * Renders a React component into the DOM in the supplied `container`.
20906 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.render
20907 *
20908 * If the React component was previously rendered into `container`, this will
20909 * perform an update on it and only mutate the DOM as necessary to reflect the
20910 * latest React component.
20911 *
20912 * @param {ReactElement} nextElement Component element to render.
20913 * @param {DOMElement} container DOM element to render into.
20914 * @param {?function} callback function triggered on completion
20915 * @return {ReactComponent} Component instance rendered in `container`.
20916 */
20917 render: function (nextElement, container, callback) {
20918 return ReactMount._renderSubtreeIntoContainer(null, nextElement, container, callback);
20919 },
20920
20921 /**
20922 * Unmounts and destroys the React component rendered in the `container`.
20923 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.unmountcomponentatnode
20924 *
20925 * @param {DOMElement} container DOM element containing a React component.
20926 * @return {boolean} True if a component was found in and unmounted from
20927 * `container`
20928 */
20929 unmountComponentAtNode: function (container) {
20930 // Various parts of our code (such as ReactCompositeComponent's
20931 // _renderValidatedComponent) assume that calls to render aren't nested;
20932 // verify that that's the case. (Strictly speaking, unmounting won't cause a
20933 // render but we still don't expect to be in a render call here.)
20934 (undefined) !== '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;
20935
20936 !isValidContainer(container) ? (undefined) !== 'production' ? invariant(false, 'unmountComponentAtNode(...): Target container is not a DOM element.') : _prodInvariant('40') : void 0;
20937
20938 if ((undefined) !== 'production') {
20939 (undefined) !== 'production' ? warning(!nodeIsRenderedByOtherInstance(container), 'unmountComponentAtNode(): The node you\'re attempting to unmount ' + 'was rendered by another copy of React.') : void 0;
20940 }
20941
20942 var prevComponent = getTopLevelWrapperInContainer(container);
20943 if (!prevComponent) {
20944 // Check if the node being unmounted was rendered by React, but isn't a
20945 // root node.
20946 var containerHasNonRootReactChild = hasNonRootReactChild(container);
20947
20948 // Check if the container itself is a React root node.
20949 var isContainerReactRoot = container.nodeType === 1 && container.hasAttribute(ROOT_ATTR_NAME);
20950
20951 if ((undefined) !== 'production') {
20952 (undefined) !== '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;
20953 }
20954
20955 return false;
20956 }
20957 delete instancesByReactRootID[prevComponent._instance.rootID];
20958 ReactUpdates.batchedUpdates(unmountComponentFromNode, prevComponent, container, false);
20959 return true;
20960 },
20961
20962 _mountImageIntoNode: function (markup, container, instance, shouldReuseMarkup, transaction) {
20963 !isValidContainer(container) ? (undefined) !== 'production' ? invariant(false, 'mountComponentIntoNode(...): Target container is not valid.') : _prodInvariant('41') : void 0;
20964
20965 if (shouldReuseMarkup) {
20966 var rootElement = getReactRootElementInContainer(container);
20967 if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) {
20968 ReactDOMComponentTree.precacheNode(instance, rootElement);
20969 return;
20970 } else {
20971 var checksum = rootElement.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
20972 rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
20973
20974 var rootMarkup = rootElement.outerHTML;
20975 rootElement.setAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME, checksum);
20976
20977 var normalizedMarkup = markup;
20978 if ((undefined) !== 'production') {
20979 // because rootMarkup is retrieved from the DOM, various normalizations
20980 // will have occurred which will not be present in `markup`. Here,
20981 // insert markup into a <div> or <iframe> depending on the container
20982 // type to perform the same normalizations before comparing.
20983 var normalizer;
20984 if (container.nodeType === ELEMENT_NODE_TYPE) {
20985 normalizer = document.createElement('div');
20986 normalizer.innerHTML = markup;
20987 normalizedMarkup = normalizer.innerHTML;
20988 } else {
20989 normalizer = document.createElement('iframe');
20990 document.body.appendChild(normalizer);
20991 normalizer.contentDocument.write(markup);
20992 normalizedMarkup = normalizer.contentDocument.documentElement.outerHTML;
20993 document.body.removeChild(normalizer);
20994 }
20995 }
20996
20997 var diffIndex = firstDifferenceIndex(normalizedMarkup, rootMarkup);
20998 var difference = ' (client) ' + normalizedMarkup.substring(diffIndex - 20, diffIndex + 20) + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20);
20999
21000 !(container.nodeType !== DOC_NODE_TYPE) ? (undefined) !== '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;
21001
21002 if ((undefined) !== 'production') {
21003 (undefined) !== '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;
21004 }
21005 }
21006 }
21007
21008 !(container.nodeType !== DOC_NODE_TYPE) ? (undefined) !== '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;
21009
21010 if (transaction.useCreateElement) {
21011 while (container.lastChild) {
21012 container.removeChild(container.lastChild);
21013 }
21014 DOMLazyTree.insertTreeBefore(container, markup, null);
21015 } else {
21016 setInnerHTML(container, markup);
21017 ReactDOMComponentTree.precacheNode(instance, container.firstChild);
21018 }
21019
21020 if ((undefined) !== 'production') {
21021 var hostNode = ReactDOMComponentTree.getInstanceFromNode(container.firstChild);
21022 if (hostNode._debugID !== 0) {
21023 ReactInstrumentation.debugTool.onHostOperation(hostNode._debugID, 'mount', markup.toString());
21024 }
21025 }
21026 }
21027 };
21028
21029 module.exports = ReactMount;
21030
21031/***/ },
21032/* 251 */
21033/***/ function(module, exports, __webpack_require__) {
21034
21035 /**
21036 * Copyright 2013-present, Facebook, Inc.
21037 * All rights reserved.
21038 *
21039 * This source code is licensed under the BSD-style license found in the
21040 * LICENSE file in the root directory of this source tree. An additional grant
21041 * of patent rights can be found in the PATENTS file in the same directory.
21042 *
21043 * @providesModule ReactDOMContainerInfo
21044 */
21045
21046 'use strict';
21047
21048 var validateDOMNesting = __webpack_require__(220);
21049
21050 var DOC_NODE_TYPE = 9;
21051
21052 function ReactDOMContainerInfo(topLevelWrapper, node) {
21053 var info = {
21054 _topLevelWrapper: topLevelWrapper,
21055 _idCounter: 1,
21056 _ownerDocument: node ? node.nodeType === DOC_NODE_TYPE ? node : node.ownerDocument : null,
21057 _node: node,
21058 _tag: node ? node.nodeName.toLowerCase() : null,
21059 _namespaceURI: node ? node.namespaceURI : null
21060 };
21061 if ((undefined) !== 'production') {
21062 info._ancestorInfo = node ? validateDOMNesting.updatedAncestorInfo(null, info._tag, null) : null;
21063 }
21064 return info;
21065 }
21066
21067 module.exports = ReactDOMContainerInfo;
21068
21069/***/ },
21070/* 252 */
21071/***/ function(module, exports) {
21072
21073 /**
21074 * Copyright 2013-present, Facebook, Inc.
21075 * All rights reserved.
21076 *
21077 * This source code is licensed under the BSD-style license found in the
21078 * LICENSE file in the root directory of this source tree. An additional grant
21079 * of patent rights can be found in the PATENTS file in the same directory.
21080 *
21081 * @providesModule ReactDOMFeatureFlags
21082 */
21083
21084 'use strict';
21085
21086 var ReactDOMFeatureFlags = {
21087 useCreateElement: true
21088 };
21089
21090 module.exports = ReactDOMFeatureFlags;
21091
21092/***/ },
21093/* 253 */
21094/***/ function(module, exports, __webpack_require__) {
21095
21096 /**
21097 * Copyright 2013-present, Facebook, Inc.
21098 * All rights reserved.
21099 *
21100 * This source code is licensed under the BSD-style license found in the
21101 * LICENSE file in the root directory of this source tree. An additional grant
21102 * of patent rights can be found in the PATENTS file in the same directory.
21103 *
21104 * @providesModule ReactMarkupChecksum
21105 */
21106
21107 'use strict';
21108
21109 var adler32 = __webpack_require__(254);
21110
21111 var TAG_END = /\/?>/;
21112 var COMMENT_START = /^<\!\-\-/;
21113
21114 var ReactMarkupChecksum = {
21115 CHECKSUM_ATTR_NAME: 'data-react-checksum',
21116
21117 /**
21118 * @param {string} markup Markup string
21119 * @return {string} Markup string with checksum attribute attached
21120 */
21121 addChecksumToMarkup: function (markup) {
21122 var checksum = adler32(markup);
21123
21124 // Add checksum (handle both parent tags, comments and self-closing tags)
21125 if (COMMENT_START.test(markup)) {
21126 return markup;
21127 } else {
21128 return markup.replace(TAG_END, ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '"$&');
21129 }
21130 },
21131
21132 /**
21133 * @param {string} markup to use
21134 * @param {DOMElement} element root React element
21135 * @returns {boolean} whether or not the markup is the same
21136 */
21137 canReuseMarkup: function (markup, element) {
21138 var existingChecksum = element.getAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME);
21139 existingChecksum = existingChecksum && parseInt(existingChecksum, 10);
21140 var markupChecksum = adler32(markup);
21141 return markupChecksum === existingChecksum;
21142 }
21143 };
21144
21145 module.exports = ReactMarkupChecksum;
21146
21147/***/ },
21148/* 254 */
21149/***/ function(module, exports) {
21150
21151 /**
21152 * Copyright 2013-present, Facebook, Inc.
21153 * All rights reserved.
21154 *
21155 * This source code is licensed under the BSD-style license found in the
21156 * LICENSE file in the root directory of this source tree. An additional grant
21157 * of patent rights can be found in the PATENTS file in the same directory.
21158 *
21159 * @providesModule adler32
21160 *
21161 */
21162
21163 'use strict';
21164
21165 var MOD = 65521;
21166
21167 // adler32 is not cryptographically strong, and is only used to sanity check that
21168 // markup generated on the server matches the markup generated on the client.
21169 // This implementation (a modified version of the SheetJS version) has been optimized
21170 // for our use case, at the expense of conforming to the adler32 specification
21171 // for non-ascii inputs.
21172 function adler32(data) {
21173 var a = 1;
21174 var b = 0;
21175 var i = 0;
21176 var l = data.length;
21177 var m = l & ~0x3;
21178 while (i < m) {
21179 var n = Math.min(i + 4096, m);
21180 for (; i < n; i += 4) {
21181 b += (a += data.charCodeAt(i)) + (a += data.charCodeAt(i + 1)) + (a += data.charCodeAt(i + 2)) + (a += data.charCodeAt(i + 3));
21182 }
21183 a %= MOD;
21184 b %= MOD;
21185 }
21186 for (; i < l; i++) {
21187 b += a += data.charCodeAt(i);
21188 }
21189 a %= MOD;
21190 b %= MOD;
21191 return a | b << 16;
21192 }
21193
21194 module.exports = adler32;
21195
21196/***/ },
21197/* 255 */
21198/***/ function(module, exports, __webpack_require__) {
21199
21200 /**
21201 * Copyright 2013-present, Facebook, Inc.
21202 * All rights reserved.
21203 *
21204 * This source code is licensed under the BSD-style license found in the
21205 * LICENSE file in the root directory of this source tree. An additional grant
21206 * of patent rights can be found in the PATENTS file in the same directory.
21207 *
21208 * @providesModule findDOMNode
21209 */
21210
21211 'use strict';
21212
21213 var _prodInvariant = __webpack_require__(94);
21214
21215 var ReactCurrentOwner = __webpack_require__(97);
21216 var ReactDOMComponentTree = __webpack_require__(124);
21217 var ReactInstanceMap = __webpack_require__(207);
21218
21219 var getHostComponentFromComposite = __webpack_require__(256);
21220 var invariant = __webpack_require__(95);
21221 var warning = __webpack_require__(98);
21222
21223 /**
21224 * Returns the DOM node rendered by this element.
21225 *
21226 * See https://facebook.github.io/react/docs/top-level-api.html#reactdom.finddomnode
21227 *
21228 * @param {ReactComponent|DOMElement} componentOrElement
21229 * @return {?DOMElement} The root node of this element.
21230 */
21231 function findDOMNode(componentOrElement) {
21232 if ((undefined) !== 'production') {
21233 var owner = ReactCurrentOwner.current;
21234 if (owner !== null) {
21235 (undefined) !== '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;
21236 owner._warnedAboutRefsInRender = true;
21237 }
21238 }
21239 if (componentOrElement == null) {
21240 return null;
21241 }
21242 if (componentOrElement.nodeType === 1) {
21243 return componentOrElement;
21244 }
21245
21246 var inst = ReactInstanceMap.get(componentOrElement);
21247 if (inst) {
21248 inst = getHostComponentFromComposite(inst);
21249 return inst ? ReactDOMComponentTree.getNodeFromInstance(inst) : null;
21250 }
21251
21252 if (typeof componentOrElement.render === 'function') {
21253 true ? (undefined) !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : _prodInvariant('44') : void 0;
21254 } else {
21255 true ? (undefined) !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : _prodInvariant('45', Object.keys(componentOrElement)) : void 0;
21256 }
21257 }
21258
21259 module.exports = findDOMNode;
21260
21261/***/ },
21262/* 256 */
21263/***/ function(module, exports, __webpack_require__) {
21264
21265 /**
21266 * Copyright 2013-present, Facebook, Inc.
21267 * All rights reserved.
21268 *
21269 * This source code is licensed under the BSD-style license found in the
21270 * LICENSE file in the root directory of this source tree. An additional grant
21271 * of patent rights can be found in the PATENTS file in the same directory.
21272 *
21273 * @providesModule getHostComponentFromComposite
21274 */
21275
21276 'use strict';
21277
21278 var ReactNodeTypes = __webpack_require__(211);
21279
21280 function getHostComponentFromComposite(inst) {
21281 var type;
21282
21283 while ((type = inst._renderedNodeType) === ReactNodeTypes.COMPOSITE) {
21284 inst = inst._renderedComponent;
21285 }
21286
21287 if (type === ReactNodeTypes.HOST) {
21288 return inst._renderedComponent;
21289 } else if (type === ReactNodeTypes.EMPTY) {
21290 return null;
21291 }
21292 }
21293
21294 module.exports = getHostComponentFromComposite;
21295
21296/***/ },
21297/* 257 */
21298/***/ function(module, exports, __webpack_require__) {
21299
21300 /**
21301 * Copyright 2013-present, Facebook, Inc.
21302 * All rights reserved.
21303 *
21304 * This source code is licensed under the BSD-style license found in the
21305 * LICENSE file in the root directory of this source tree. An additional grant
21306 * of patent rights can be found in the PATENTS file in the same directory.
21307 *
21308 * @providesModule renderSubtreeIntoContainer
21309 */
21310
21311 'use strict';
21312
21313 var ReactMount = __webpack_require__(250);
21314
21315 module.exports = ReactMount.renderSubtreeIntoContainer;
21316
21317/***/ },
21318/* 258 */
21319/***/ function(module, exports, __webpack_require__) {
21320
21321 /**
21322 * Copyright 2013-present, Facebook, Inc.
21323 * All rights reserved.
21324 *
21325 * This source code is licensed under the BSD-style license found in the
21326 * LICENSE file in the root directory of this source tree. An additional grant
21327 * of patent rights can be found in the PATENTS file in the same directory.
21328 *
21329 * @providesModule ReactDOMUnknownPropertyHook
21330 */
21331
21332 'use strict';
21333
21334 var DOMProperty = __webpack_require__(125);
21335 var EventPluginRegistry = __webpack_require__(132);
21336 var ReactComponentTreeHook = __webpack_require__(115);
21337
21338 var warning = __webpack_require__(98);
21339
21340 if ((undefined) !== 'production') {
21341 var reactProps = {
21342 children: true,
21343 dangerouslySetInnerHTML: true,
21344 key: true,
21345 ref: true,
21346
21347 autoFocus: true,
21348 defaultValue: true,
21349 valueLink: true,
21350 defaultChecked: true,
21351 checkedLink: true,
21352 innerHTML: true,
21353 suppressContentEditableWarning: true,
21354 onFocusIn: true,
21355 onFocusOut: true
21356 };
21357 var warnedProperties = {};
21358
21359 var validateProperty = function (tagName, name, debugID) {
21360 if (DOMProperty.properties.hasOwnProperty(name) || DOMProperty.isCustomAttribute(name)) {
21361 return true;
21362 }
21363 if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
21364 return true;
21365 }
21366 if (EventPluginRegistry.registrationNameModules.hasOwnProperty(name)) {
21367 return true;
21368 }
21369 warnedProperties[name] = true;
21370 var lowerCasedName = name.toLowerCase();
21371
21372 // data-* attributes should be lowercase; suggest the lowercase version
21373 var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
21374
21375 var registrationName = EventPluginRegistry.possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? EventPluginRegistry.possibleRegistrationNames[lowerCasedName] : null;
21376
21377 if (standardName != null) {
21378 (undefined) !== 'production' ? warning(false, 'Unknown DOM property %s. Did you mean %s?%s', name, standardName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21379 return true;
21380 } else if (registrationName != null) {
21381 (undefined) !== 'production' ? warning(false, 'Unknown event handler property %s. Did you mean `%s`?%s', name, registrationName, ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0;
21382 return true;
21383 } else {
21384 // We were unable to guess which prop the user intended.
21385 // It is likely that the user was just blindly spreading/forwarding props
21386 // Components should be careful to only render valid props/attributes.
21387 // Warning will be invoked in warnUnknownProperties to allow grouping.
21388 return false;
21389 }
21390 };
21391 }
21392
21393 var warnUnknownProperties = function (debugID, element) {
21394 var unknownProps = [];
21395 for (var key in element.props) {
21396 var isValid = validateProperty(element.type, key, debugID);
21397 if (!isValid) {
21398 unknownProps.push(key);
21399 }
21400 }
21401
21402 var unknownPropString = unknownProps.map(function (prop) {
21403 return '`' + prop + '`';
21404 }).join(', ');
21405
21406 if (unknownProps.length === 1) {
21407 (undefined) !== '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;
21408 } else if (unknownProps.length > 1) {
21409 (undefined) !== '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;
21410 }
21411 };
21412
21413 function handleElement(debugID, element) {
21414 if (element == null || typeof element.type !== 'string') {
21415 return;
21416 }
21417 if (element.type.indexOf('-') >= 0 || element.props.is) {
21418 return;
21419 }
21420 warnUnknownProperties(debugID, element);
21421 }
21422
21423 var ReactDOMUnknownPropertyHook = {
21424 onBeforeMountComponent: function (debugID, element) {
21425 handleElement(debugID, element);
21426 },
21427 onBeforeUpdateComponent: function (debugID, element) {
21428 handleElement(debugID, element);
21429 }
21430 };
21431
21432 module.exports = ReactDOMUnknownPropertyHook;
21433
21434/***/ },
21435/* 259 */
21436/***/ function(module, exports, __webpack_require__) {
21437
21438 /**
21439 * Copyright 2013-present, Facebook, Inc.
21440 * All rights reserved.
21441 *
21442 * This source code is licensed under the BSD-style license found in the
21443 * LICENSE file in the root directory of this source tree. An additional grant
21444 * of patent rights can be found in the PATENTS file in the same directory.
21445 *
21446 * @providesModule ReactDOMNullInputValuePropHook
21447 */
21448
21449 'use strict';
21450
21451 var ReactComponentTreeHook = __webpack_require__(115);
21452
21453 var warning = __webpack_require__(98);
21454
21455 var didWarnValueNull = false;
21456
21457 function handleElement(debugID, element) {
21458 if (element == null) {
21459 return;
21460 }
21461 if (element.type !== 'input' && element.type !== 'textarea' && element.type !== 'select') {
21462 return;
21463 }
21464 if (element.props != null && element.props.value === null && !didWarnValueNull) {
21465 (undefined) !== '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;
21466
21467 didWarnValueNull = true;
21468 }
21469 }
21470
21471 var ReactDOMNullInputValuePropHook = {
21472 onBeforeMountComponent: function (debugID, element) {
21473 handleElement(debugID, element);
21474 },
21475 onBeforeUpdateComponent: function (debugID, element) {
21476 handleElement(debugID, element);
21477 }
21478 };
21479
21480 module.exports = ReactDOMNullInputValuePropHook;
21481
21482/***/ },
21483/* 260 */
21484/***/ function(module, exports, __webpack_require__) {
21485
21486 'use strict';
21487
21488 exports.__esModule = true;
21489 exports.createMemoryHistory = exports.hashHistory = exports.browserHistory = exports.applyRouterMiddleware = exports.formatPattern = exports.useRouterHistory = exports.match = exports.routerShape = exports.locationShape = exports.PropTypes = exports.RoutingContext = exports.RouterContext = exports.createRoutes = exports.useRoutes = exports.RouteContext = exports.Lifecycle = exports.History = exports.Route = exports.Redirect = exports.IndexRoute = exports.IndexRedirect = exports.withRouter = exports.IndexLink = exports.Link = exports.Router = undefined;
21490
21491 var _RouteUtils = __webpack_require__(261);
21492
21493 Object.defineProperty(exports, 'createRoutes', {
21494 enumerable: true,
21495 get: function get() {
21496 return _RouteUtils.createRoutes;
21497 }
21498 });
21499
21500 var _PropTypes2 = __webpack_require__(262);
21501
21502 Object.defineProperty(exports, 'locationShape', {
21503 enumerable: true,
21504 get: function get() {
21505 return _PropTypes2.locationShape;
21506 }
21507 });
21508 Object.defineProperty(exports, 'routerShape', {
21509 enumerable: true,
21510 get: function get() {
21511 return _PropTypes2.routerShape;
21512 }
21513 });
21514
21515 var _PatternUtils = __webpack_require__(267);
21516
21517 Object.defineProperty(exports, 'formatPattern', {
21518 enumerable: true,
21519 get: function get() {
21520 return _PatternUtils.formatPattern;
21521 }
21522 });
21523
21524 var _Router2 = __webpack_require__(269);
21525
21526 var _Router3 = _interopRequireDefault(_Router2);
21527
21528 var _Link2 = __webpack_require__(300);
21529
21530 var _Link3 = _interopRequireDefault(_Link2);
21531
21532 var _IndexLink2 = __webpack_require__(301);
21533
21534 var _IndexLink3 = _interopRequireDefault(_IndexLink2);
21535
21536 var _withRouter2 = __webpack_require__(302);
21537
21538 var _withRouter3 = _interopRequireDefault(_withRouter2);
21539
21540 var _IndexRedirect2 = __webpack_require__(304);
21541
21542 var _IndexRedirect3 = _interopRequireDefault(_IndexRedirect2);
21543
21544 var _IndexRoute2 = __webpack_require__(306);
21545
21546 var _IndexRoute3 = _interopRequireDefault(_IndexRoute2);
21547
21548 var _Redirect2 = __webpack_require__(305);
21549
21550 var _Redirect3 = _interopRequireDefault(_Redirect2);
21551
21552 var _Route2 = __webpack_require__(307);
21553
21554 var _Route3 = _interopRequireDefault(_Route2);
21555
21556 var _History2 = __webpack_require__(308);
21557
21558 var _History3 = _interopRequireDefault(_History2);
21559
21560 var _Lifecycle2 = __webpack_require__(309);
21561
21562 var _Lifecycle3 = _interopRequireDefault(_Lifecycle2);
21563
21564 var _RouteContext2 = __webpack_require__(310);
21565
21566 var _RouteContext3 = _interopRequireDefault(_RouteContext2);
21567
21568 var _useRoutes2 = __webpack_require__(311);
21569
21570 var _useRoutes3 = _interopRequireDefault(_useRoutes2);
21571
21572 var _RouterContext2 = __webpack_require__(297);
21573
21574 var _RouterContext3 = _interopRequireDefault(_RouterContext2);
21575
21576 var _RoutingContext2 = __webpack_require__(312);
21577
21578 var _RoutingContext3 = _interopRequireDefault(_RoutingContext2);
21579
21580 var _PropTypes3 = _interopRequireDefault(_PropTypes2);
21581
21582 var _match2 = __webpack_require__(313);
21583
21584 var _match3 = _interopRequireDefault(_match2);
21585
21586 var _useRouterHistory2 = __webpack_require__(317);
21587
21588 var _useRouterHistory3 = _interopRequireDefault(_useRouterHistory2);
21589
21590 var _applyRouterMiddleware2 = __webpack_require__(318);
21591
21592 var _applyRouterMiddleware3 = _interopRequireDefault(_applyRouterMiddleware2);
21593
21594 var _browserHistory2 = __webpack_require__(319);
21595
21596 var _browserHistory3 = _interopRequireDefault(_browserHistory2);
21597
21598 var _hashHistory2 = __webpack_require__(322);
21599
21600 var _hashHistory3 = _interopRequireDefault(_hashHistory2);
21601
21602 var _createMemoryHistory2 = __webpack_require__(314);
21603
21604 var _createMemoryHistory3 = _interopRequireDefault(_createMemoryHistory2);
21605
21606 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21607
21608 exports.Router = _Router3.default; /* components */
21609
21610 exports.Link = _Link3.default;
21611 exports.IndexLink = _IndexLink3.default;
21612 exports.withRouter = _withRouter3.default;
21613
21614 /* components (configuration) */
21615
21616 exports.IndexRedirect = _IndexRedirect3.default;
21617 exports.IndexRoute = _IndexRoute3.default;
21618 exports.Redirect = _Redirect3.default;
21619 exports.Route = _Route3.default;
21620
21621 /* mixins */
21622
21623 exports.History = _History3.default;
21624 exports.Lifecycle = _Lifecycle3.default;
21625 exports.RouteContext = _RouteContext3.default;
21626
21627 /* utils */
21628
21629 exports.useRoutes = _useRoutes3.default;
21630 exports.RouterContext = _RouterContext3.default;
21631 exports.RoutingContext = _RoutingContext3.default;
21632 exports.PropTypes = _PropTypes3.default;
21633 exports.match = _match3.default;
21634 exports.useRouterHistory = _useRouterHistory3.default;
21635 exports.applyRouterMiddleware = _applyRouterMiddleware3.default;
21636
21637 /* histories */
21638
21639 exports.browserHistory = _browserHistory3.default;
21640 exports.hashHistory = _hashHistory3.default;
21641 exports.createMemoryHistory = _createMemoryHistory3.default;
21642
21643/***/ },
21644/* 261 */
21645/***/ function(module, exports, __webpack_require__) {
21646
21647 'use strict';
21648
21649 exports.__esModule = true;
21650
21651 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
21652
21653 exports.isReactChildren = isReactChildren;
21654 exports.createRouteFromReactElement = createRouteFromReactElement;
21655 exports.createRoutesFromReactChildren = createRoutesFromReactChildren;
21656 exports.createRoutes = createRoutes;
21657
21658 var _react = __webpack_require__(89);
21659
21660 var _react2 = _interopRequireDefault(_react);
21661
21662 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21663
21664 function isValidChild(object) {
21665 return object == null || _react2.default.isValidElement(object);
21666 }
21667
21668 function isReactChildren(object) {
21669 return isValidChild(object) || Array.isArray(object) && object.every(isValidChild);
21670 }
21671
21672 function createRoute(defaultProps, props) {
21673 return _extends({}, defaultProps, props);
21674 }
21675
21676 function createRouteFromReactElement(element) {
21677 var type = element.type;
21678 var route = createRoute(type.defaultProps, element.props);
21679
21680 if (route.children) {
21681 var childRoutes = createRoutesFromReactChildren(route.children, route);
21682
21683 if (childRoutes.length) route.childRoutes = childRoutes;
21684
21685 delete route.children;
21686 }
21687
21688 return route;
21689 }
21690
21691 /**
21692 * Creates and returns a routes object from the given ReactChildren. JSX
21693 * provides a convenient way to visualize how routes in the hierarchy are
21694 * nested.
21695 *
21696 * import { Route, createRoutesFromReactChildren } from 'react-router'
21697 *
21698 * const routes = createRoutesFromReactChildren(
21699 * <Route component={App}>
21700 * <Route path="home" component={Dashboard}/>
21701 * <Route path="news" component={NewsFeed}/>
21702 * </Route>
21703 * )
21704 *
21705 * Note: This method is automatically used when you provide <Route> children
21706 * to a <Router> component.
21707 */
21708 function createRoutesFromReactChildren(children, parentRoute) {
21709 var routes = [];
21710
21711 _react2.default.Children.forEach(children, function (element) {
21712 if (_react2.default.isValidElement(element)) {
21713 // Component classes may have a static create* method.
21714 if (element.type.createRouteFromReactElement) {
21715 var route = element.type.createRouteFromReactElement(element, parentRoute);
21716
21717 if (route) routes.push(route);
21718 } else {
21719 routes.push(createRouteFromReactElement(element));
21720 }
21721 }
21722 });
21723
21724 return routes;
21725 }
21726
21727 /**
21728 * Creates and returns an array of routes from the given object which
21729 * may be a JSX route, a plain object route, or an array of either.
21730 */
21731 function createRoutes(routes) {
21732 if (isReactChildren(routes)) {
21733 routes = createRoutesFromReactChildren(routes);
21734 } else if (routes && !Array.isArray(routes)) {
21735 routes = [routes];
21736 }
21737
21738 return routes;
21739 }
21740
21741/***/ },
21742/* 262 */
21743/***/ function(module, exports, __webpack_require__) {
21744
21745 'use strict';
21746
21747 exports.__esModule = true;
21748 exports.router = exports.routes = exports.route = exports.components = exports.component = exports.location = exports.history = exports.falsy = exports.locationShape = exports.routerShape = undefined;
21749
21750 var _react = __webpack_require__(89);
21751
21752 var _deprecateObjectProperties = __webpack_require__(263);
21753
21754 var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties);
21755
21756 var _InternalPropTypes = __webpack_require__(266);
21757
21758 var InternalPropTypes = _interopRequireWildcard(_InternalPropTypes);
21759
21760 var _routerWarning = __webpack_require__(264);
21761
21762 var _routerWarning2 = _interopRequireDefault(_routerWarning);
21763
21764 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
21765
21766 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21767
21768 var func = _react.PropTypes.func;
21769 var object = _react.PropTypes.object;
21770 var shape = _react.PropTypes.shape;
21771 var string = _react.PropTypes.string;
21772 var routerShape = exports.routerShape = shape({
21773 push: func.isRequired,
21774 replace: func.isRequired,
21775 go: func.isRequired,
21776 goBack: func.isRequired,
21777 goForward: func.isRequired,
21778 setRouteLeaveHook: func.isRequired,
21779 isActive: func.isRequired
21780 });
21781
21782 var locationShape = exports.locationShape = shape({
21783 pathname: string.isRequired,
21784 search: string.isRequired,
21785 state: object,
21786 action: string.isRequired,
21787 key: string
21788 });
21789
21790 // Deprecated stuff below:
21791
21792 var falsy = exports.falsy = InternalPropTypes.falsy;
21793 var history = exports.history = InternalPropTypes.history;
21794 var location = exports.location = locationShape;
21795 var component = exports.component = InternalPropTypes.component;
21796 var components = exports.components = InternalPropTypes.components;
21797 var route = exports.route = InternalPropTypes.route;
21798 var routes = exports.routes = InternalPropTypes.routes;
21799 var router = exports.router = routerShape;
21800
21801 if ((undefined) !== 'production') {
21802 (function () {
21803 var deprecatePropType = function deprecatePropType(propType, message) {
21804 return function () {
21805 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, message) : void 0;
21806 return propType.apply(undefined, arguments);
21807 };
21808 };
21809
21810 var deprecateInternalPropType = function deprecateInternalPropType(propType) {
21811 return deprecatePropType(propType, 'This prop type is not intended for external use, and was previously exported by mistake. These internal prop types are deprecated for external use, and will be removed in a later version.');
21812 };
21813
21814 var deprecateRenamedPropType = function deprecateRenamedPropType(propType, name) {
21815 return deprecatePropType(propType, 'The `' + name + '` prop type is now exported as `' + name + 'Shape` to avoid name conflicts. This export is deprecated and will be removed in a later version.');
21816 };
21817
21818 exports.falsy = falsy = deprecateInternalPropType(falsy);
21819 exports.history = history = deprecateInternalPropType(history);
21820 exports.component = component = deprecateInternalPropType(component);
21821 exports.components = components = deprecateInternalPropType(components);
21822 exports.route = route = deprecateInternalPropType(route);
21823 exports.routes = routes = deprecateInternalPropType(routes);
21824
21825 exports.location = location = deprecateRenamedPropType(location, 'location');
21826 exports.router = router = deprecateRenamedPropType(router, 'router');
21827 })();
21828 }
21829
21830 var defaultExport = {
21831 falsy: falsy,
21832 history: history,
21833 location: location,
21834 component: component,
21835 components: components,
21836 route: route,
21837 // For some reason, routes was never here.
21838 router: router
21839 };
21840
21841 if ((undefined) !== 'production') {
21842 defaultExport = (0, _deprecateObjectProperties2.default)(defaultExport, 'The default export from `react-router/lib/PropTypes` is deprecated. Please use the named exports instead.');
21843 }
21844
21845 exports.default = defaultExport;
21846
21847/***/ },
21848/* 263 */
21849/***/ function(module, exports, __webpack_require__) {
21850
21851 'use strict';
21852
21853 exports.__esModule = true;
21854 exports.canUseMembrane = undefined;
21855
21856 var _routerWarning = __webpack_require__(264);
21857
21858 var _routerWarning2 = _interopRequireDefault(_routerWarning);
21859
21860 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21861
21862 var canUseMembrane = exports.canUseMembrane = false;
21863
21864 // No-op by default.
21865 var deprecateObjectProperties = function deprecateObjectProperties(object) {
21866 return object;
21867 };
21868
21869 if ((undefined) !== 'production') {
21870 try {
21871 if (Object.defineProperty({}, 'x', {
21872 get: function get() {
21873 return true;
21874 }
21875 }).x) {
21876 exports.canUseMembrane = canUseMembrane = true;
21877 }
21878 /* eslint-disable no-empty */
21879 } catch (e) {}
21880 /* eslint-enable no-empty */
21881
21882 if (canUseMembrane) {
21883 deprecateObjectProperties = function deprecateObjectProperties(object, message) {
21884 // Wrap the deprecated object in a membrane to warn on property access.
21885 var membrane = {};
21886
21887 var _loop = function _loop(prop) {
21888 if (!Object.prototype.hasOwnProperty.call(object, prop)) {
21889 return 'continue';
21890 }
21891
21892 if (typeof object[prop] === 'function') {
21893 // Can't use fat arrow here because of use of arguments below.
21894 membrane[prop] = function () {
21895 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, message) : void 0;
21896 return object[prop].apply(object, arguments);
21897 };
21898 return 'continue';
21899 }
21900
21901 // These properties are non-enumerable to prevent React dev tools from
21902 // seeing them and causing spurious warnings when accessing them. In
21903 // principle this could be done with a proxy, but support for the
21904 // ownKeys trap on proxies is not universal, even among browsers that
21905 // otherwise support proxies.
21906 Object.defineProperty(membrane, prop, {
21907 get: function get() {
21908 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, message) : void 0;
21909 return object[prop];
21910 }
21911 });
21912 };
21913
21914 for (var prop in object) {
21915 var _ret = _loop(prop);
21916
21917 if (_ret === 'continue') continue;
21918 }
21919
21920 return membrane;
21921 };
21922 }
21923 }
21924
21925 exports.default = deprecateObjectProperties;
21926
21927/***/ },
21928/* 264 */
21929/***/ function(module, exports, __webpack_require__) {
21930
21931 'use strict';
21932
21933 exports.__esModule = true;
21934 exports.default = routerWarning;
21935 exports._resetWarned = _resetWarned;
21936
21937 var _warning = __webpack_require__(265);
21938
21939 var _warning2 = _interopRequireDefault(_warning);
21940
21941 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21942
21943 var warned = {};
21944
21945 function routerWarning(falseToWarn, message) {
21946 // Only issue deprecation warnings once.
21947 if (message.indexOf('deprecated') !== -1) {
21948 if (warned[message]) {
21949 return;
21950 }
21951
21952 warned[message] = true;
21953 }
21954
21955 message = '[react-router] ' + message;
21956
21957 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
21958 args[_key - 2] = arguments[_key];
21959 }
21960
21961 _warning2.default.apply(undefined, [falseToWarn, message].concat(args));
21962 }
21963
21964 function _resetWarned() {
21965 warned = {};
21966 }
21967
21968/***/ },
21969/* 265 */
21970/***/ function(module, exports, __webpack_require__) {
21971
21972 /**
21973 * Copyright 2014-2015, Facebook, Inc.
21974 * All rights reserved.
21975 *
21976 * This source code is licensed under the BSD-style license found in the
21977 * LICENSE file in the root directory of this source tree. An additional grant
21978 * of patent rights can be found in the PATENTS file in the same directory.
21979 */
21980
21981 'use strict';
21982
21983 /**
21984 * Similar to invariant but only logs a warning if the condition is not met.
21985 * This can be used to log issues in development environments in critical
21986 * paths. Removing the logging code for production environments will keep the
21987 * same logic and follow the same code paths.
21988 */
21989
21990 var warning = function() {};
21991
21992 if ((undefined) !== 'production') {
21993 warning = function(condition, format, args) {
21994 var len = arguments.length;
21995 args = new Array(len > 2 ? len - 2 : 0);
21996 for (var key = 2; key < len; key++) {
21997 args[key - 2] = arguments[key];
21998 }
21999 if (format === undefined) {
22000 throw new Error(
22001 '`warning(condition, format, ...args)` requires a warning ' +
22002 'message argument'
22003 );
22004 }
22005
22006 if (format.length < 10 || (/^[s\W]*$/).test(format)) {
22007 throw new Error(
22008 'The warning format should be able to uniquely identify this ' +
22009 'warning. Please, use a more descriptive format than: ' + format
22010 );
22011 }
22012
22013 if (!condition) {
22014 var argIndex = 0;
22015 var message = 'Warning: ' +
22016 format.replace(/%s/g, function() {
22017 return args[argIndex++];
22018 });
22019 if (typeof console !== 'undefined') {
22020 console.error(message);
22021 }
22022 try {
22023 // This error was thrown as a convenience so that you can use this stack
22024 // to find the callsite that caused this warning to fire.
22025 throw new Error(message);
22026 } catch(x) {}
22027 }
22028 };
22029 }
22030
22031 module.exports = warning;
22032
22033
22034/***/ },
22035/* 266 */
22036/***/ function(module, exports, __webpack_require__) {
22037
22038 'use strict';
22039
22040 exports.__esModule = true;
22041 exports.routes = exports.route = exports.components = exports.component = exports.history = undefined;
22042 exports.falsy = falsy;
22043
22044 var _react = __webpack_require__(89);
22045
22046 var func = _react.PropTypes.func;
22047 var object = _react.PropTypes.object;
22048 var arrayOf = _react.PropTypes.arrayOf;
22049 var oneOfType = _react.PropTypes.oneOfType;
22050 var element = _react.PropTypes.element;
22051 var shape = _react.PropTypes.shape;
22052 var string = _react.PropTypes.string;
22053 function falsy(props, propName, componentName) {
22054 if (props[propName]) return new Error('<' + componentName + '> should not have a "' + propName + '" prop');
22055 }
22056
22057 var history = exports.history = shape({
22058 listen: func.isRequired,
22059 push: func.isRequired,
22060 replace: func.isRequired,
22061 go: func.isRequired,
22062 goBack: func.isRequired,
22063 goForward: func.isRequired
22064 });
22065
22066 var component = exports.component = oneOfType([func, string]);
22067 var components = exports.components = oneOfType([component, object]);
22068 var route = exports.route = oneOfType([object, element]);
22069 var routes = exports.routes = oneOfType([route, arrayOf(route)]);
22070
22071/***/ },
22072/* 267 */
22073/***/ function(module, exports, __webpack_require__) {
22074
22075 'use strict';
22076
22077 exports.__esModule = true;
22078 exports.compilePattern = compilePattern;
22079 exports.matchPattern = matchPattern;
22080 exports.getParamNames = getParamNames;
22081 exports.getParams = getParams;
22082 exports.formatPattern = formatPattern;
22083
22084 var _invariant = __webpack_require__(268);
22085
22086 var _invariant2 = _interopRequireDefault(_invariant);
22087
22088 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22089
22090 function escapeRegExp(string) {
22091 return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
22092 }
22093
22094 function _compilePattern(pattern) {
22095 var regexpSource = '';
22096 var paramNames = [];
22097 var tokens = [];
22098
22099 var match = void 0,
22100 lastIndex = 0,
22101 matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;
22102 while (match = matcher.exec(pattern)) {
22103 if (match.index !== lastIndex) {
22104 tokens.push(pattern.slice(lastIndex, match.index));
22105 regexpSource += escapeRegExp(pattern.slice(lastIndex, match.index));
22106 }
22107
22108 if (match[1]) {
22109 regexpSource += '([^/]+)';
22110 paramNames.push(match[1]);
22111 } else if (match[0] === '**') {
22112 regexpSource += '(.*)';
22113 paramNames.push('splat');
22114 } else if (match[0] === '*') {
22115 regexpSource += '(.*?)';
22116 paramNames.push('splat');
22117 } else if (match[0] === '(') {
22118 regexpSource += '(?:';
22119 } else if (match[0] === ')') {
22120 regexpSource += ')?';
22121 }
22122
22123 tokens.push(match[0]);
22124
22125 lastIndex = matcher.lastIndex;
22126 }
22127
22128 if (lastIndex !== pattern.length) {
22129 tokens.push(pattern.slice(lastIndex, pattern.length));
22130 regexpSource += escapeRegExp(pattern.slice(lastIndex, pattern.length));
22131 }
22132
22133 return {
22134 pattern: pattern,
22135 regexpSource: regexpSource,
22136 paramNames: paramNames,
22137 tokens: tokens
22138 };
22139 }
22140
22141 var CompiledPatternsCache = Object.create(null);
22142
22143 function compilePattern(pattern) {
22144 if (!CompiledPatternsCache[pattern]) CompiledPatternsCache[pattern] = _compilePattern(pattern);
22145
22146 return CompiledPatternsCache[pattern];
22147 }
22148
22149 /**
22150 * Attempts to match a pattern on the given pathname. Patterns may use
22151 * the following special characters:
22152 *
22153 * - :paramName Matches a URL segment up to the next /, ?, or #. The
22154 * captured string is considered a "param"
22155 * - () Wraps a segment of the URL that is optional
22156 * - * Consumes (non-greedy) all characters up to the next
22157 * character in the pattern, or to the end of the URL if
22158 * there is none
22159 * - ** Consumes (greedy) all characters up to the next character
22160 * in the pattern, or to the end of the URL if there is none
22161 *
22162 * The function calls callback(error, matched) when finished.
22163 * The return value is an object with the following properties:
22164 *
22165 * - remainingPathname
22166 * - paramNames
22167 * - paramValues
22168 */
22169 function matchPattern(pattern, pathname) {
22170 // Ensure pattern starts with leading slash for consistency with pathname.
22171 if (pattern.charAt(0) !== '/') {
22172 pattern = '/' + pattern;
22173 }
22174
22175 var _compilePattern2 = compilePattern(pattern);
22176
22177 var regexpSource = _compilePattern2.regexpSource;
22178 var paramNames = _compilePattern2.paramNames;
22179 var tokens = _compilePattern2.tokens;
22180
22181
22182 if (pattern.charAt(pattern.length - 1) !== '/') {
22183 regexpSource += '/?'; // Allow optional path separator at end.
22184 }
22185
22186 // Special-case patterns like '*' for catch-all routes.
22187 if (tokens[tokens.length - 1] === '*') {
22188 regexpSource += '$';
22189 }
22190
22191 var match = pathname.match(new RegExp('^' + regexpSource, 'i'));
22192 if (match == null) {
22193 return null;
22194 }
22195
22196 var matchedPath = match[0];
22197 var remainingPathname = pathname.substr(matchedPath.length);
22198
22199 if (remainingPathname) {
22200 // Require that the match ends at a path separator, if we didn't match
22201 // the full path, so any remaining pathname is a new path segment.
22202 if (matchedPath.charAt(matchedPath.length - 1) !== '/') {
22203 return null;
22204 }
22205
22206 // If there is a remaining pathname, treat the path separator as part of
22207 // the remaining pathname for properly continuing the match.
22208 remainingPathname = '/' + remainingPathname;
22209 }
22210
22211 return {
22212 remainingPathname: remainingPathname,
22213 paramNames: paramNames,
22214 paramValues: match.slice(1).map(function (v) {
22215 return v && decodeURIComponent(v);
22216 })
22217 };
22218 }
22219
22220 function getParamNames(pattern) {
22221 return compilePattern(pattern).paramNames;
22222 }
22223
22224 function getParams(pattern, pathname) {
22225 var match = matchPattern(pattern, pathname);
22226 if (!match) {
22227 return null;
22228 }
22229
22230 var paramNames = match.paramNames;
22231 var paramValues = match.paramValues;
22232
22233 var params = {};
22234
22235 paramNames.forEach(function (paramName, index) {
22236 params[paramName] = paramValues[index];
22237 });
22238
22239 return params;
22240 }
22241
22242 /**
22243 * Returns a version of the given pattern with params interpolated. Throws
22244 * if there is a dynamic segment of the pattern for which there is no param.
22245 */
22246 function formatPattern(pattern, params) {
22247 params = params || {};
22248
22249 var _compilePattern3 = compilePattern(pattern);
22250
22251 var tokens = _compilePattern3.tokens;
22252
22253 var parenCount = 0,
22254 pathname = '',
22255 splatIndex = 0;
22256
22257 var token = void 0,
22258 paramName = void 0,
22259 paramValue = void 0;
22260 for (var i = 0, len = tokens.length; i < len; ++i) {
22261 token = tokens[i];
22262
22263 if (token === '*' || token === '**') {
22264 paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
22265
22266 !(paramValue != null || parenCount > 0) ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : (0, _invariant2.default)(false) : void 0;
22267
22268 if (paramValue != null) pathname += encodeURI(paramValue);
22269 } else if (token === '(') {
22270 parenCount += 1;
22271 } else if (token === ')') {
22272 parenCount -= 1;
22273 } else if (token.charAt(0) === ':') {
22274 paramName = token.substring(1);
22275 paramValue = params[paramName];
22276
22277 !(paramValue != null || parenCount > 0) ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : (0, _invariant2.default)(false) : void 0;
22278
22279 if (paramValue != null) pathname += encodeURIComponent(paramValue);
22280 } else {
22281 pathname += token;
22282 }
22283 }
22284
22285 return pathname.replace(/\/+/g, '/');
22286 }
22287
22288/***/ },
22289/* 268 */
22290/***/ function(module, exports, __webpack_require__) {
22291
22292 /**
22293 * Copyright 2013-2015, Facebook, Inc.
22294 * All rights reserved.
22295 *
22296 * This source code is licensed under the BSD-style license found in the
22297 * LICENSE file in the root directory of this source tree. An additional grant
22298 * of patent rights can be found in the PATENTS file in the same directory.
22299 */
22300
22301 'use strict';
22302
22303 /**
22304 * Use invariant() to assert state which your program assumes to be true.
22305 *
22306 * Provide sprintf-style format (only %s is supported) and arguments
22307 * to provide information about what broke and what you were
22308 * expecting.
22309 *
22310 * The invariant message will be stripped in production, but the invariant
22311 * will remain to ensure logic does not differ in production.
22312 */
22313
22314 var invariant = function(condition, format, a, b, c, d, e, f) {
22315 if ((undefined) !== 'production') {
22316 if (format === undefined) {
22317 throw new Error('invariant requires an error message argument');
22318 }
22319 }
22320
22321 if (!condition) {
22322 var error;
22323 if (format === undefined) {
22324 error = new Error(
22325 'Minified exception occurred; use the non-minified dev environment ' +
22326 'for the full error message and additional helpful warnings.'
22327 );
22328 } else {
22329 var args = [a, b, c, d, e, f];
22330 var argIndex = 0;
22331 error = new Error(
22332 format.replace(/%s/g, function() { return args[argIndex++]; })
22333 );
22334 error.name = 'Invariant Violation';
22335 }
22336
22337 error.framesToPop = 1; // we don't care about invariant's own frame
22338 throw error;
22339 }
22340 };
22341
22342 module.exports = invariant;
22343
22344
22345/***/ },
22346/* 269 */
22347/***/ function(module, exports, __webpack_require__) {
22348
22349 'use strict';
22350
22351 exports.__esModule = true;
22352
22353 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
22354
22355 var _createHashHistory = __webpack_require__(270);
22356
22357 var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
22358
22359 var _useQueries = __webpack_require__(286);
22360
22361 var _useQueries2 = _interopRequireDefault(_useQueries);
22362
22363 var _invariant = __webpack_require__(268);
22364
22365 var _invariant2 = _interopRequireDefault(_invariant);
22366
22367 var _react = __webpack_require__(89);
22368
22369 var _react2 = _interopRequireDefault(_react);
22370
22371 var _createTransitionManager = __webpack_require__(289);
22372
22373 var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
22374
22375 var _InternalPropTypes = __webpack_require__(266);
22376
22377 var _RouterContext = __webpack_require__(297);
22378
22379 var _RouterContext2 = _interopRequireDefault(_RouterContext);
22380
22381 var _RouteUtils = __webpack_require__(261);
22382
22383 var _RouterUtils = __webpack_require__(299);
22384
22385 var _routerWarning = __webpack_require__(264);
22386
22387 var _routerWarning2 = _interopRequireDefault(_routerWarning);
22388
22389 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22390
22391 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
22392
22393 function isDeprecatedHistory(history) {
22394 return !history || !history.__v2_compatible__;
22395 }
22396
22397 /* istanbul ignore next: sanity check */
22398 function isUnsupportedHistory(history) {
22399 // v3 histories expose getCurrentLocation, but aren't currently supported.
22400 return history && history.getCurrentLocation;
22401 }
22402
22403 var _React$PropTypes = _react2.default.PropTypes;
22404 var func = _React$PropTypes.func;
22405 var object = _React$PropTypes.object;
22406
22407 /**
22408 * A <Router> is a high-level API for automatically setting up
22409 * a router that renders a <RouterContext> with all the props
22410 * it needs each time the URL changes.
22411 */
22412
22413 var Router = _react2.default.createClass({
22414 displayName: 'Router',
22415
22416
22417 propTypes: {
22418 history: object,
22419 children: _InternalPropTypes.routes,
22420 routes: _InternalPropTypes.routes, // alias for children
22421 render: func,
22422 createElement: func,
22423 onError: func,
22424 onUpdate: func,
22425
22426 // Deprecated:
22427 parseQueryString: func,
22428 stringifyQuery: func,
22429
22430 // PRIVATE: For client-side rehydration of server match.
22431 matchContext: object
22432 },
22433
22434 getDefaultProps: function getDefaultProps() {
22435 return {
22436 render: function render(props) {
22437 return _react2.default.createElement(_RouterContext2.default, props);
22438 }
22439 };
22440 },
22441 getInitialState: function getInitialState() {
22442 return {
22443 location: null,
22444 routes: null,
22445 params: null,
22446 components: null
22447 };
22448 },
22449 handleError: function handleError(error) {
22450 if (this.props.onError) {
22451 this.props.onError.call(this, error);
22452 } else {
22453 // Throw errors by default so we don't silently swallow them!
22454 throw error; // This error probably occurred in getChildRoutes or getComponents.
22455 }
22456 },
22457 componentWillMount: function componentWillMount() {
22458 var _this = this;
22459
22460 var _props = this.props;
22461 var parseQueryString = _props.parseQueryString;
22462 var stringifyQuery = _props.stringifyQuery;
22463
22464 (undefined) !== 'production' ? (0, _routerWarning2.default)(!(parseQueryString || stringifyQuery), '`parseQueryString` and `stringifyQuery` are deprecated. Please create a custom history. http://tiny.cc/router-customquerystring') : void 0;
22465
22466 var _createRouterObjects = this.createRouterObjects();
22467
22468 var history = _createRouterObjects.history;
22469 var transitionManager = _createRouterObjects.transitionManager;
22470 var router = _createRouterObjects.router;
22471
22472
22473 this._unlisten = transitionManager.listen(function (error, state) {
22474 if (error) {
22475 _this.handleError(error);
22476 } else {
22477 _this.setState(state, _this.props.onUpdate);
22478 }
22479 });
22480
22481 this.history = history;
22482 this.router = router;
22483 },
22484 createRouterObjects: function createRouterObjects() {
22485 var matchContext = this.props.matchContext;
22486
22487 if (matchContext) {
22488 return matchContext;
22489 }
22490
22491 var history = this.props.history;
22492 var _props2 = this.props;
22493 var routes = _props2.routes;
22494 var children = _props2.children;
22495
22496
22497 !!isUnsupportedHistory(history) ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'You have provided a history object created with history v3.x. ' + 'This version of React Router is not compatible with v3 history ' + 'objects. Please use history v2.x instead.') : (0, _invariant2.default)(false) : void 0;
22498
22499 if (isDeprecatedHistory(history)) {
22500 history = this.wrapDeprecatedHistory(history);
22501 }
22502
22503 var transitionManager = (0, _createTransitionManager2.default)(history, (0, _RouteUtils.createRoutes)(routes || children));
22504 var router = (0, _RouterUtils.createRouterObject)(history, transitionManager);
22505 var routingHistory = (0, _RouterUtils.createRoutingHistory)(history, transitionManager);
22506
22507 return { history: routingHistory, transitionManager: transitionManager, router: router };
22508 },
22509 wrapDeprecatedHistory: function wrapDeprecatedHistory(history) {
22510 var _props3 = this.props;
22511 var parseQueryString = _props3.parseQueryString;
22512 var stringifyQuery = _props3.stringifyQuery;
22513
22514
22515 var createHistory = void 0;
22516 if (history) {
22517 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'It appears you have provided a deprecated history object to `<Router/>`, please use a history provided by ' + 'React Router with `import { browserHistory } from \'react-router\'` or `import { hashHistory } from \'react-router\'`. ' + 'If you are using a custom history please create it with `useRouterHistory`, see http://tiny.cc/router-usinghistory for details.') : void 0;
22518 createHistory = function createHistory() {
22519 return history;
22520 };
22521 } else {
22522 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead. http://tiny.cc/router-defaulthistory') : void 0;
22523 createHistory = _createHashHistory2.default;
22524 }
22525
22526 return (0, _useQueries2.default)(createHistory)({ parseQueryString: parseQueryString, stringifyQuery: stringifyQuery });
22527 },
22528
22529
22530 /* istanbul ignore next: sanity check */
22531 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
22532 (undefined) !== 'production' ? (0, _routerWarning2.default)(nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : void 0;
22533
22534 (undefined) !== 'production' ? (0, _routerWarning2.default)((nextProps.routes || nextProps.children) === (this.props.routes || this.props.children), 'You cannot change <Router routes>; it will be ignored') : void 0;
22535 },
22536 componentWillUnmount: function componentWillUnmount() {
22537 if (this._unlisten) this._unlisten();
22538 },
22539 render: function render() {
22540 var _state = this.state;
22541 var location = _state.location;
22542 var routes = _state.routes;
22543 var params = _state.params;
22544 var components = _state.components;
22545 var _props4 = this.props;
22546 var createElement = _props4.createElement;
22547 var render = _props4.render;
22548
22549 var props = _objectWithoutProperties(_props4, ['createElement', 'render']);
22550
22551 if (location == null) return null; // Async match
22552
22553 // Only forward non-Router-specific props to routing context, as those are
22554 // the only ones that might be custom routing context props.
22555 Object.keys(Router.propTypes).forEach(function (propType) {
22556 return delete props[propType];
22557 });
22558
22559 return render(_extends({}, props, {
22560 history: this.history,
22561 router: this.router,
22562 location: location,
22563 routes: routes,
22564 params: params,
22565 components: components,
22566 createElement: createElement
22567 }));
22568 }
22569 });
22570
22571 exports.default = Router;
22572 module.exports = exports['default'];
22573
22574/***/ },
22575/* 270 */
22576/***/ function(module, exports, __webpack_require__) {
22577
22578 'use strict';
22579
22580 exports.__esModule = true;
22581
22582 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
22583
22584 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22585
22586 var _warning = __webpack_require__(271);
22587
22588 var _warning2 = _interopRequireDefault(_warning);
22589
22590 var _invariant = __webpack_require__(268);
22591
22592 var _invariant2 = _interopRequireDefault(_invariant);
22593
22594 var _Actions = __webpack_require__(272);
22595
22596 var _PathUtils = __webpack_require__(273);
22597
22598 var _ExecutionEnvironment = __webpack_require__(274);
22599
22600 var _DOMUtils = __webpack_require__(275);
22601
22602 var _DOMStateStorage = __webpack_require__(276);
22603
22604 var _createDOMHistory = __webpack_require__(277);
22605
22606 var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory);
22607
22608 function isAbsolutePath(path) {
22609 return typeof path === 'string' && path.charAt(0) === '/';
22610 }
22611
22612 function ensureSlash() {
22613 var path = _DOMUtils.getHashPath();
22614
22615 if (isAbsolutePath(path)) return true;
22616
22617 _DOMUtils.replaceHashPath('/' + path);
22618
22619 return false;
22620 }
22621
22622 function addQueryStringValueToPath(path, key, value) {
22623 return path + (path.indexOf('?') === -1 ? '?' : '&') + (key + '=' + value);
22624 }
22625
22626 function stripQueryStringValueFromPath(path, key) {
22627 return path.replace(new RegExp('[?&]?' + key + '=[a-zA-Z0-9]+'), '');
22628 }
22629
22630 function getQueryStringValueFromPath(path, key) {
22631 var match = path.match(new RegExp('\\?.*?\\b' + key + '=(.+?)\\b'));
22632 return match && match[1];
22633 }
22634
22635 var DefaultQueryKey = '_k';
22636
22637 function createHashHistory() {
22638 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
22639
22640 !_ExecutionEnvironment.canUseDOM ? (undefined) !== 'production' ? _invariant2['default'](false, 'Hash history needs a DOM') : _invariant2['default'](false) : undefined;
22641
22642 var queryKey = options.queryKey;
22643
22644 if (queryKey === undefined || !!queryKey) queryKey = typeof queryKey === 'string' ? queryKey : DefaultQueryKey;
22645
22646 function getCurrentLocation() {
22647 var path = _DOMUtils.getHashPath();
22648
22649 var key = undefined,
22650 state = undefined;
22651 if (queryKey) {
22652 key = getQueryStringValueFromPath(path, queryKey);
22653 path = stripQueryStringValueFromPath(path, queryKey);
22654
22655 if (key) {
22656 state = _DOMStateStorage.readState(key);
22657 } else {
22658 state = null;
22659 key = history.createKey();
22660 _DOMUtils.replaceHashPath(addQueryStringValueToPath(path, queryKey, key));
22661 }
22662 } else {
22663 key = state = null;
22664 }
22665
22666 var location = _PathUtils.parsePath(path);
22667
22668 return history.createLocation(_extends({}, location, { state: state }), undefined, key);
22669 }
22670
22671 function startHashChangeListener(_ref) {
22672 var transitionTo = _ref.transitionTo;
22673
22674 function hashChangeListener() {
22675 if (!ensureSlash()) return; // Always make sure hashes are preceeded with a /.
22676
22677 transitionTo(getCurrentLocation());
22678 }
22679
22680 ensureSlash();
22681 _DOMUtils.addEventListener(window, 'hashchange', hashChangeListener);
22682
22683 return function () {
22684 _DOMUtils.removeEventListener(window, 'hashchange', hashChangeListener);
22685 };
22686 }
22687
22688 function finishTransition(location) {
22689 var basename = location.basename;
22690 var pathname = location.pathname;
22691 var search = location.search;
22692 var state = location.state;
22693 var action = location.action;
22694 var key = location.key;
22695
22696 if (action === _Actions.POP) return; // Nothing to do.
22697
22698 var path = (basename || '') + pathname + search;
22699
22700 if (queryKey) {
22701 path = addQueryStringValueToPath(path, queryKey, key);
22702 _DOMStateStorage.saveState(key, state);
22703 } else {
22704 // Drop key and state.
22705 location.key = location.state = null;
22706 }
22707
22708 var currentHash = _DOMUtils.getHashPath();
22709
22710 if (action === _Actions.PUSH) {
22711 if (currentHash !== path) {
22712 window.location.hash = path;
22713 } else {
22714 (undefined) !== 'production' ? _warning2['default'](false, 'You cannot PUSH the same path using hash history') : undefined;
22715 }
22716 } else if (currentHash !== path) {
22717 // REPLACE
22718 _DOMUtils.replaceHashPath(path);
22719 }
22720 }
22721
22722 var history = _createDOMHistory2['default'](_extends({}, options, {
22723 getCurrentLocation: getCurrentLocation,
22724 finishTransition: finishTransition,
22725 saveState: _DOMStateStorage.saveState
22726 }));
22727
22728 var listenerCount = 0,
22729 stopHashChangeListener = undefined;
22730
22731 function listenBefore(listener) {
22732 if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history);
22733
22734 var unlisten = history.listenBefore(listener);
22735
22736 return function () {
22737 unlisten();
22738
22739 if (--listenerCount === 0) stopHashChangeListener();
22740 };
22741 }
22742
22743 function listen(listener) {
22744 if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history);
22745
22746 var unlisten = history.listen(listener);
22747
22748 return function () {
22749 unlisten();
22750
22751 if (--listenerCount === 0) stopHashChangeListener();
22752 };
22753 }
22754
22755 function push(location) {
22756 (undefined) !== 'production' ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined;
22757
22758 history.push(location);
22759 }
22760
22761 function replace(location) {
22762 (undefined) !== 'production' ? _warning2['default'](queryKey || location.state == null, 'You cannot use state without a queryKey it will be dropped') : undefined;
22763
22764 history.replace(location);
22765 }
22766
22767 var goIsSupportedWithoutReload = _DOMUtils.supportsGoWithoutReloadUsingHash();
22768
22769 function go(n) {
22770 (undefined) !== 'production' ? _warning2['default'](goIsSupportedWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : undefined;
22771
22772 history.go(n);
22773 }
22774
22775 function createHref(path) {
22776 return '#' + history.createHref(path);
22777 }
22778
22779 // deprecated
22780 function registerTransitionHook(hook) {
22781 if (++listenerCount === 1) stopHashChangeListener = startHashChangeListener(history);
22782
22783 history.registerTransitionHook(hook);
22784 }
22785
22786 // deprecated
22787 function unregisterTransitionHook(hook) {
22788 history.unregisterTransitionHook(hook);
22789
22790 if (--listenerCount === 0) stopHashChangeListener();
22791 }
22792
22793 // deprecated
22794 function pushState(state, path) {
22795 (undefined) !== 'production' ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined;
22796
22797 history.pushState(state, path);
22798 }
22799
22800 // deprecated
22801 function replaceState(state, path) {
22802 (undefined) !== 'production' ? _warning2['default'](queryKey || state == null, 'You cannot use state without a queryKey it will be dropped') : undefined;
22803
22804 history.replaceState(state, path);
22805 }
22806
22807 return _extends({}, history, {
22808 listenBefore: listenBefore,
22809 listen: listen,
22810 push: push,
22811 replace: replace,
22812 go: go,
22813 createHref: createHref,
22814
22815 registerTransitionHook: registerTransitionHook, // deprecated - warning is in createHistory
22816 unregisterTransitionHook: unregisterTransitionHook, // deprecated - warning is in createHistory
22817 pushState: pushState, // deprecated - warning is in createHistory
22818 replaceState: replaceState // deprecated - warning is in createHistory
22819 });
22820 }
22821
22822 exports['default'] = createHashHistory;
22823 module.exports = exports['default'];
22824
22825/***/ },
22826/* 271 */
22827/***/ function(module, exports, __webpack_require__) {
22828
22829 /**
22830 * Copyright 2014-2015, Facebook, Inc.
22831 * All rights reserved.
22832 *
22833 * This source code is licensed under the BSD-style license found in the
22834 * LICENSE file in the root directory of this source tree. An additional grant
22835 * of patent rights can be found in the PATENTS file in the same directory.
22836 */
22837
22838 'use strict';
22839
22840 /**
22841 * Similar to invariant but only logs a warning if the condition is not met.
22842 * This can be used to log issues in development environments in critical
22843 * paths. Removing the logging code for production environments will keep the
22844 * same logic and follow the same code paths.
22845 */
22846
22847 var warning = function() {};
22848
22849 if ((undefined) !== 'production') {
22850 warning = function(condition, format, args) {
22851 var len = arguments.length;
22852 args = new Array(len > 2 ? len - 2 : 0);
22853 for (var key = 2; key < len; key++) {
22854 args[key - 2] = arguments[key];
22855 }
22856 if (format === undefined) {
22857 throw new Error(
22858 '`warning(condition, format, ...args)` requires a warning ' +
22859 'message argument'
22860 );
22861 }
22862
22863 if (format.length < 10 || (/^[s\W]*$/).test(format)) {
22864 throw new Error(
22865 'The warning format should be able to uniquely identify this ' +
22866 'warning. Please, use a more descriptive format than: ' + format
22867 );
22868 }
22869
22870 if (!condition) {
22871 var argIndex = 0;
22872 var message = 'Warning: ' +
22873 format.replace(/%s/g, function() {
22874 return args[argIndex++];
22875 });
22876 if (typeof console !== 'undefined') {
22877 console.error(message);
22878 }
22879 try {
22880 // This error was thrown as a convenience so that you can use this stack
22881 // to find the callsite that caused this warning to fire.
22882 throw new Error(message);
22883 } catch(x) {}
22884 }
22885 };
22886 }
22887
22888 module.exports = warning;
22889
22890
22891/***/ },
22892/* 272 */
22893/***/ function(module, exports) {
22894
22895 /**
22896 * Indicates that navigation was caused by a call to history.push.
22897 */
22898 'use strict';
22899
22900 exports.__esModule = true;
22901 var PUSH = 'PUSH';
22902
22903 exports.PUSH = PUSH;
22904 /**
22905 * Indicates that navigation was caused by a call to history.replace.
22906 */
22907 var REPLACE = 'REPLACE';
22908
22909 exports.REPLACE = REPLACE;
22910 /**
22911 * Indicates that navigation was caused by some other action such
22912 * as using a browser's back/forward buttons and/or manually manipulating
22913 * the URL in a browser's location bar. This is the default.
22914 *
22915 * See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onpopstate
22916 * for more information.
22917 */
22918 var POP = 'POP';
22919
22920 exports.POP = POP;
22921 exports['default'] = {
22922 PUSH: PUSH,
22923 REPLACE: REPLACE,
22924 POP: POP
22925 };
22926
22927/***/ },
22928/* 273 */
22929/***/ function(module, exports, __webpack_require__) {
22930
22931 'use strict';
22932
22933 exports.__esModule = true;
22934 exports.extractPath = extractPath;
22935 exports.parsePath = parsePath;
22936
22937 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
22938
22939 var _warning = __webpack_require__(271);
22940
22941 var _warning2 = _interopRequireDefault(_warning);
22942
22943 function extractPath(string) {
22944 var match = string.match(/^https?:\/\/[^\/]*/);
22945
22946 if (match == null) return string;
22947
22948 return string.substring(match[0].length);
22949 }
22950
22951 function parsePath(path) {
22952 var pathname = extractPath(path);
22953 var search = '';
22954 var hash = '';
22955
22956 (undefined) !== 'production' ? _warning2['default'](path === pathname, 'A path must be pathname + search + hash only, not a fully qualified URL like "%s"', path) : undefined;
22957
22958 var hashIndex = pathname.indexOf('#');
22959 if (hashIndex !== -1) {
22960 hash = pathname.substring(hashIndex);
22961 pathname = pathname.substring(0, hashIndex);
22962 }
22963
22964 var searchIndex = pathname.indexOf('?');
22965 if (searchIndex !== -1) {
22966 search = pathname.substring(searchIndex);
22967 pathname = pathname.substring(0, searchIndex);
22968 }
22969
22970 if (pathname === '') pathname = '/';
22971
22972 return {
22973 pathname: pathname,
22974 search: search,
22975 hash: hash
22976 };
22977 }
22978
22979/***/ },
22980/* 274 */
22981/***/ function(module, exports) {
22982
22983 'use strict';
22984
22985 exports.__esModule = true;
22986 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
22987 exports.canUseDOM = canUseDOM;
22988
22989/***/ },
22990/* 275 */
22991/***/ function(module, exports) {
22992
22993 'use strict';
22994
22995 exports.__esModule = true;
22996 exports.addEventListener = addEventListener;
22997 exports.removeEventListener = removeEventListener;
22998 exports.getHashPath = getHashPath;
22999 exports.replaceHashPath = replaceHashPath;
23000 exports.getWindowPath = getWindowPath;
23001 exports.go = go;
23002 exports.getUserConfirmation = getUserConfirmation;
23003 exports.supportsHistory = supportsHistory;
23004 exports.supportsGoWithoutReloadUsingHash = supportsGoWithoutReloadUsingHash;
23005
23006 function addEventListener(node, event, listener) {
23007 if (node.addEventListener) {
23008 node.addEventListener(event, listener, false);
23009 } else {
23010 node.attachEvent('on' + event, listener);
23011 }
23012 }
23013
23014 function removeEventListener(node, event, listener) {
23015 if (node.removeEventListener) {
23016 node.removeEventListener(event, listener, false);
23017 } else {
23018 node.detachEvent('on' + event, listener);
23019 }
23020 }
23021
23022 function getHashPath() {
23023 // We can't use window.location.hash here because it's not
23024 // consistent across browsers - Firefox will pre-decode it!
23025 return window.location.href.split('#')[1] || '';
23026 }
23027
23028 function replaceHashPath(path) {
23029 window.location.replace(window.location.pathname + window.location.search + '#' + path);
23030 }
23031
23032 function getWindowPath() {
23033 return window.location.pathname + window.location.search + window.location.hash;
23034 }
23035
23036 function go(n) {
23037 if (n) window.history.go(n);
23038 }
23039
23040 function getUserConfirmation(message, callback) {
23041 callback(window.confirm(message));
23042 }
23043
23044 /**
23045 * Returns true if the HTML5 history API is supported. Taken from Modernizr.
23046 *
23047 * https://github.com/Modernizr/Modernizr/blob/master/LICENSE
23048 * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
23049 * changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
23050 */
23051
23052 function supportsHistory() {
23053 var ua = navigator.userAgent;
23054 if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {
23055 return false;
23056 }
23057 return window.history && 'pushState' in window.history;
23058 }
23059
23060 /**
23061 * Returns false if using go(n) with hash history causes a full page reload.
23062 */
23063
23064 function supportsGoWithoutReloadUsingHash() {
23065 var ua = navigator.userAgent;
23066 return ua.indexOf('Firefox') === -1;
23067 }
23068
23069/***/ },
23070/* 276 */
23071/***/ function(module, exports, __webpack_require__) {
23072
23073 /*eslint-disable no-empty */
23074 'use strict';
23075
23076 exports.__esModule = true;
23077 exports.saveState = saveState;
23078 exports.readState = readState;
23079
23080 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23081
23082 var _warning = __webpack_require__(271);
23083
23084 var _warning2 = _interopRequireDefault(_warning);
23085
23086 var KeyPrefix = '@@History/';
23087 var QuotaExceededErrors = ['QuotaExceededError', 'QUOTA_EXCEEDED_ERR'];
23088
23089 var SecurityError = 'SecurityError';
23090
23091 function createKey(key) {
23092 return KeyPrefix + key;
23093 }
23094
23095 function saveState(key, state) {
23096 try {
23097 if (state == null) {
23098 window.sessionStorage.removeItem(createKey(key));
23099 } else {
23100 window.sessionStorage.setItem(createKey(key), JSON.stringify(state));
23101 }
23102 } catch (error) {
23103 if (error.name === SecurityError) {
23104 // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any
23105 // attempt to access window.sessionStorage.
23106 (undefined) !== 'production' ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available due to security settings') : undefined;
23107
23108 return;
23109 }
23110
23111 if (QuotaExceededErrors.indexOf(error.name) >= 0 && window.sessionStorage.length === 0) {
23112 // Safari "private mode" throws QuotaExceededError.
23113 (undefined) !== 'production' ? _warning2['default'](false, '[history] Unable to save state; sessionStorage is not available in Safari private mode') : undefined;
23114
23115 return;
23116 }
23117
23118 throw error;
23119 }
23120 }
23121
23122 function readState(key) {
23123 var json = undefined;
23124 try {
23125 json = window.sessionStorage.getItem(createKey(key));
23126 } catch (error) {
23127 if (error.name === SecurityError) {
23128 // Blocking cookies in Chrome/Firefox/Safari throws SecurityError on any
23129 // attempt to access window.sessionStorage.
23130 (undefined) !== 'production' ? _warning2['default'](false, '[history] Unable to read state; sessionStorage is not available due to security settings') : undefined;
23131
23132 return null;
23133 }
23134 }
23135
23136 if (json) {
23137 try {
23138 return JSON.parse(json);
23139 } catch (error) {
23140 // Ignore invalid JSON.
23141 }
23142 }
23143
23144 return null;
23145 }
23146
23147/***/ },
23148/* 277 */
23149/***/ function(module, exports, __webpack_require__) {
23150
23151 'use strict';
23152
23153 exports.__esModule = true;
23154
23155 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23156
23157 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23158
23159 var _invariant = __webpack_require__(268);
23160
23161 var _invariant2 = _interopRequireDefault(_invariant);
23162
23163 var _ExecutionEnvironment = __webpack_require__(274);
23164
23165 var _DOMUtils = __webpack_require__(275);
23166
23167 var _createHistory = __webpack_require__(278);
23168
23169 var _createHistory2 = _interopRequireDefault(_createHistory);
23170
23171 function createDOMHistory(options) {
23172 var history = _createHistory2['default'](_extends({
23173 getUserConfirmation: _DOMUtils.getUserConfirmation
23174 }, options, {
23175 go: _DOMUtils.go
23176 }));
23177
23178 function listen(listener) {
23179 !_ExecutionEnvironment.canUseDOM ? (undefined) !== 'production' ? _invariant2['default'](false, 'DOM history needs a DOM') : _invariant2['default'](false) : undefined;
23180
23181 return history.listen(listener);
23182 }
23183
23184 return _extends({}, history, {
23185 listen: listen
23186 });
23187 }
23188
23189 exports['default'] = createDOMHistory;
23190 module.exports = exports['default'];
23191
23192/***/ },
23193/* 278 */
23194/***/ function(module, exports, __webpack_require__) {
23195
23196 'use strict';
23197
23198 exports.__esModule = true;
23199
23200 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23201
23202 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23203
23204 var _warning = __webpack_require__(271);
23205
23206 var _warning2 = _interopRequireDefault(_warning);
23207
23208 var _deepEqual = __webpack_require__(279);
23209
23210 var _deepEqual2 = _interopRequireDefault(_deepEqual);
23211
23212 var _PathUtils = __webpack_require__(273);
23213
23214 var _AsyncUtils = __webpack_require__(282);
23215
23216 var _Actions = __webpack_require__(272);
23217
23218 var _createLocation2 = __webpack_require__(283);
23219
23220 var _createLocation3 = _interopRequireDefault(_createLocation2);
23221
23222 var _runTransitionHook = __webpack_require__(284);
23223
23224 var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
23225
23226 var _deprecate = __webpack_require__(285);
23227
23228 var _deprecate2 = _interopRequireDefault(_deprecate);
23229
23230 function createRandomKey(length) {
23231 return Math.random().toString(36).substr(2, length);
23232 }
23233
23234 function locationsAreEqual(a, b) {
23235 return a.pathname === b.pathname && a.search === b.search &&
23236 //a.action === b.action && // Different action !== location change.
23237 a.key === b.key && _deepEqual2['default'](a.state, b.state);
23238 }
23239
23240 var DefaultKeyLength = 6;
23241
23242 function createHistory() {
23243 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
23244 var getCurrentLocation = options.getCurrentLocation;
23245 var finishTransition = options.finishTransition;
23246 var saveState = options.saveState;
23247 var go = options.go;
23248 var getUserConfirmation = options.getUserConfirmation;
23249 var keyLength = options.keyLength;
23250
23251 if (typeof keyLength !== 'number') keyLength = DefaultKeyLength;
23252
23253 var transitionHooks = [];
23254
23255 function listenBefore(hook) {
23256 transitionHooks.push(hook);
23257
23258 return function () {
23259 transitionHooks = transitionHooks.filter(function (item) {
23260 return item !== hook;
23261 });
23262 };
23263 }
23264
23265 var allKeys = [];
23266 var changeListeners = [];
23267 var location = undefined;
23268
23269 function getCurrent() {
23270 if (pendingLocation && pendingLocation.action === _Actions.POP) {
23271 return allKeys.indexOf(pendingLocation.key);
23272 } else if (location) {
23273 return allKeys.indexOf(location.key);
23274 } else {
23275 return -1;
23276 }
23277 }
23278
23279 function updateLocation(newLocation) {
23280 var current = getCurrent();
23281
23282 location = newLocation;
23283
23284 if (location.action === _Actions.PUSH) {
23285 allKeys = [].concat(allKeys.slice(0, current + 1), [location.key]);
23286 } else if (location.action === _Actions.REPLACE) {
23287 allKeys[current] = location.key;
23288 }
23289
23290 changeListeners.forEach(function (listener) {
23291 listener(location);
23292 });
23293 }
23294
23295 function listen(listener) {
23296 changeListeners.push(listener);
23297
23298 if (location) {
23299 listener(location);
23300 } else {
23301 var _location = getCurrentLocation();
23302 allKeys = [_location.key];
23303 updateLocation(_location);
23304 }
23305
23306 return function () {
23307 changeListeners = changeListeners.filter(function (item) {
23308 return item !== listener;
23309 });
23310 };
23311 }
23312
23313 function confirmTransitionTo(location, callback) {
23314 _AsyncUtils.loopAsync(transitionHooks.length, function (index, next, done) {
23315 _runTransitionHook2['default'](transitionHooks[index], location, function (result) {
23316 if (result != null) {
23317 done(result);
23318 } else {
23319 next();
23320 }
23321 });
23322 }, function (message) {
23323 if (getUserConfirmation && typeof message === 'string') {
23324 getUserConfirmation(message, function (ok) {
23325 callback(ok !== false);
23326 });
23327 } else {
23328 callback(message !== false);
23329 }
23330 });
23331 }
23332
23333 var pendingLocation = undefined;
23334
23335 function transitionTo(nextLocation) {
23336 if (location && locationsAreEqual(location, nextLocation)) return; // Nothing to do.
23337
23338 pendingLocation = nextLocation;
23339
23340 confirmTransitionTo(nextLocation, function (ok) {
23341 if (pendingLocation !== nextLocation) return; // Transition was interrupted.
23342
23343 if (ok) {
23344 // treat PUSH to current path like REPLACE to be consistent with browsers
23345 if (nextLocation.action === _Actions.PUSH) {
23346 var prevPath = createPath(location);
23347 var nextPath = createPath(nextLocation);
23348
23349 if (nextPath === prevPath && _deepEqual2['default'](location.state, nextLocation.state)) nextLocation.action = _Actions.REPLACE;
23350 }
23351
23352 if (finishTransition(nextLocation) !== false) updateLocation(nextLocation);
23353 } else if (location && nextLocation.action === _Actions.POP) {
23354 var prevIndex = allKeys.indexOf(location.key);
23355 var nextIndex = allKeys.indexOf(nextLocation.key);
23356
23357 if (prevIndex !== -1 && nextIndex !== -1) go(prevIndex - nextIndex); // Restore the URL.
23358 }
23359 });
23360 }
23361
23362 function push(location) {
23363 transitionTo(createLocation(location, _Actions.PUSH, createKey()));
23364 }
23365
23366 function replace(location) {
23367 transitionTo(createLocation(location, _Actions.REPLACE, createKey()));
23368 }
23369
23370 function goBack() {
23371 go(-1);
23372 }
23373
23374 function goForward() {
23375 go(1);
23376 }
23377
23378 function createKey() {
23379 return createRandomKey(keyLength);
23380 }
23381
23382 function createPath(location) {
23383 if (location == null || typeof location === 'string') return location;
23384
23385 var pathname = location.pathname;
23386 var search = location.search;
23387 var hash = location.hash;
23388
23389 var result = pathname;
23390
23391 if (search) result += search;
23392
23393 if (hash) result += hash;
23394
23395 return result;
23396 }
23397
23398 function createHref(location) {
23399 return createPath(location);
23400 }
23401
23402 function createLocation(location, action) {
23403 var key = arguments.length <= 2 || arguments[2] === undefined ? createKey() : arguments[2];
23404
23405 if (typeof action === 'object') {
23406 (undefined) !== 'production' ? _warning2['default'](false, 'The state (2nd) argument to history.createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;
23407
23408 if (typeof location === 'string') location = _PathUtils.parsePath(location);
23409
23410 location = _extends({}, location, { state: action });
23411
23412 action = key;
23413 key = arguments[3] || createKey();
23414 }
23415
23416 return _createLocation3['default'](location, action, key);
23417 }
23418
23419 // deprecated
23420 function setState(state) {
23421 if (location) {
23422 updateLocationState(location, state);
23423 updateLocation(location);
23424 } else {
23425 updateLocationState(getCurrentLocation(), state);
23426 }
23427 }
23428
23429 function updateLocationState(location, state) {
23430 location.state = _extends({}, location.state, state);
23431 saveState(location.key, location.state);
23432 }
23433
23434 // deprecated
23435 function registerTransitionHook(hook) {
23436 if (transitionHooks.indexOf(hook) === -1) transitionHooks.push(hook);
23437 }
23438
23439 // deprecated
23440 function unregisterTransitionHook(hook) {
23441 transitionHooks = transitionHooks.filter(function (item) {
23442 return item !== hook;
23443 });
23444 }
23445
23446 // deprecated
23447 function pushState(state, path) {
23448 if (typeof path === 'string') path = _PathUtils.parsePath(path);
23449
23450 push(_extends({ state: state }, path));
23451 }
23452
23453 // deprecated
23454 function replaceState(state, path) {
23455 if (typeof path === 'string') path = _PathUtils.parsePath(path);
23456
23457 replace(_extends({ state: state }, path));
23458 }
23459
23460 return {
23461 listenBefore: listenBefore,
23462 listen: listen,
23463 transitionTo: transitionTo,
23464 push: push,
23465 replace: replace,
23466 go: go,
23467 goBack: goBack,
23468 goForward: goForward,
23469 createKey: createKey,
23470 createPath: createPath,
23471 createHref: createHref,
23472 createLocation: createLocation,
23473
23474 setState: _deprecate2['default'](setState, 'setState is deprecated; use location.key to save state instead'),
23475 registerTransitionHook: _deprecate2['default'](registerTransitionHook, 'registerTransitionHook is deprecated; use listenBefore instead'),
23476 unregisterTransitionHook: _deprecate2['default'](unregisterTransitionHook, 'unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead'),
23477 pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),
23478 replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')
23479 };
23480 }
23481
23482 exports['default'] = createHistory;
23483 module.exports = exports['default'];
23484
23485/***/ },
23486/* 279 */
23487/***/ function(module, exports, __webpack_require__) {
23488
23489 var pSlice = Array.prototype.slice;
23490 var objectKeys = __webpack_require__(280);
23491 var isArguments = __webpack_require__(281);
23492
23493 var deepEqual = module.exports = function (actual, expected, opts) {
23494 if (!opts) opts = {};
23495 // 7.1. All identical values are equivalent, as determined by ===.
23496 if (actual === expected) {
23497 return true;
23498
23499 } else if (actual instanceof Date && expected instanceof Date) {
23500 return actual.getTime() === expected.getTime();
23501
23502 // 7.3. Other pairs that do not both pass typeof value == 'object',
23503 // equivalence is determined by ==.
23504 } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') {
23505 return opts.strict ? actual === expected : actual == expected;
23506
23507 // 7.4. For all other Object pairs, including Array objects, equivalence is
23508 // determined by having the same number of owned properties (as verified
23509 // with Object.prototype.hasOwnProperty.call), the same set of keys
23510 // (although not necessarily the same order), equivalent values for every
23511 // corresponding key, and an identical 'prototype' property. Note: this
23512 // accounts for both named and indexed properties on Arrays.
23513 } else {
23514 return objEquiv(actual, expected, opts);
23515 }
23516 }
23517
23518 function isUndefinedOrNull(value) {
23519 return value === null || value === undefined;
23520 }
23521
23522 function isBuffer (x) {
23523 if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false;
23524 if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
23525 return false;
23526 }
23527 if (x.length > 0 && typeof x[0] !== 'number') return false;
23528 return true;
23529 }
23530
23531 function objEquiv(a, b, opts) {
23532 var i, key;
23533 if (isUndefinedOrNull(a) || isUndefinedOrNull(b))
23534 return false;
23535 // an identical 'prototype' property.
23536 if (a.prototype !== b.prototype) return false;
23537 //~~~I've managed to break Object.keys through screwy arguments passing.
23538 // Converting to array solves the problem.
23539 if (isArguments(a)) {
23540 if (!isArguments(b)) {
23541 return false;
23542 }
23543 a = pSlice.call(a);
23544 b = pSlice.call(b);
23545 return deepEqual(a, b, opts);
23546 }
23547 if (isBuffer(a)) {
23548 if (!isBuffer(b)) {
23549 return false;
23550 }
23551 if (a.length !== b.length) return false;
23552 for (i = 0; i < a.length; i++) {
23553 if (a[i] !== b[i]) return false;
23554 }
23555 return true;
23556 }
23557 try {
23558 var ka = objectKeys(a),
23559 kb = objectKeys(b);
23560 } catch (e) {//happens when one is a string literal and the other isn't
23561 return false;
23562 }
23563 // having the same number of owned properties (keys incorporates
23564 // hasOwnProperty)
23565 if (ka.length != kb.length)
23566 return false;
23567 //the same set of keys (although not necessarily the same order),
23568 ka.sort();
23569 kb.sort();
23570 //~~~cheap key test
23571 for (i = ka.length - 1; i >= 0; i--) {
23572 if (ka[i] != kb[i])
23573 return false;
23574 }
23575 //equivalent values for every corresponding key, and
23576 //~~~possibly expensive deep test
23577 for (i = ka.length - 1; i >= 0; i--) {
23578 key = ka[i];
23579 if (!deepEqual(a[key], b[key], opts)) return false;
23580 }
23581 return typeof a === typeof b;
23582 }
23583
23584
23585/***/ },
23586/* 280 */
23587/***/ function(module, exports) {
23588
23589 exports = module.exports = typeof Object.keys === 'function'
23590 ? Object.keys : shim;
23591
23592 exports.shim = shim;
23593 function shim (obj) {
23594 var keys = [];
23595 for (var key in obj) keys.push(key);
23596 return keys;
23597 }
23598
23599
23600/***/ },
23601/* 281 */
23602/***/ function(module, exports) {
23603
23604 var supportsArgumentsClass = (function(){
23605 return Object.prototype.toString.call(arguments)
23606 })() == '[object Arguments]';
23607
23608 exports = module.exports = supportsArgumentsClass ? supported : unsupported;
23609
23610 exports.supported = supported;
23611 function supported(object) {
23612 return Object.prototype.toString.call(object) == '[object Arguments]';
23613 };
23614
23615 exports.unsupported = unsupported;
23616 function unsupported(object){
23617 return object &&
23618 typeof object == 'object' &&
23619 typeof object.length == 'number' &&
23620 Object.prototype.hasOwnProperty.call(object, 'callee') &&
23621 !Object.prototype.propertyIsEnumerable.call(object, 'callee') ||
23622 false;
23623 };
23624
23625
23626/***/ },
23627/* 282 */
23628/***/ function(module, exports) {
23629
23630 "use strict";
23631
23632 exports.__esModule = true;
23633 var _slice = Array.prototype.slice;
23634 exports.loopAsync = loopAsync;
23635
23636 function loopAsync(turns, work, callback) {
23637 var currentTurn = 0,
23638 isDone = false;
23639 var sync = false,
23640 hasNext = false,
23641 doneArgs = undefined;
23642
23643 function done() {
23644 isDone = true;
23645 if (sync) {
23646 // Iterate instead of recursing if possible.
23647 doneArgs = [].concat(_slice.call(arguments));
23648 return;
23649 }
23650
23651 callback.apply(this, arguments);
23652 }
23653
23654 function next() {
23655 if (isDone) {
23656 return;
23657 }
23658
23659 hasNext = true;
23660 if (sync) {
23661 // Iterate instead of recursing if possible.
23662 return;
23663 }
23664
23665 sync = true;
23666
23667 while (!isDone && currentTurn < turns && hasNext) {
23668 hasNext = false;
23669 work.call(this, currentTurn++, next, done);
23670 }
23671
23672 sync = false;
23673
23674 if (isDone) {
23675 // This means the loop finished synchronously.
23676 callback.apply(this, doneArgs);
23677 return;
23678 }
23679
23680 if (currentTurn >= turns && hasNext) {
23681 isDone = true;
23682 callback();
23683 }
23684 }
23685
23686 next();
23687 }
23688
23689/***/ },
23690/* 283 */
23691/***/ function(module, exports, __webpack_require__) {
23692
23693 'use strict';
23694
23695 exports.__esModule = true;
23696
23697 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23698
23699 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23700
23701 var _warning = __webpack_require__(271);
23702
23703 var _warning2 = _interopRequireDefault(_warning);
23704
23705 var _Actions = __webpack_require__(272);
23706
23707 var _PathUtils = __webpack_require__(273);
23708
23709 function createLocation() {
23710 var location = arguments.length <= 0 || arguments[0] === undefined ? '/' : arguments[0];
23711 var action = arguments.length <= 1 || arguments[1] === undefined ? _Actions.POP : arguments[1];
23712 var key = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
23713
23714 var _fourthArg = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3];
23715
23716 if (typeof location === 'string') location = _PathUtils.parsePath(location);
23717
23718 if (typeof action === 'object') {
23719 (undefined) !== 'production' ? _warning2['default'](false, 'The state (2nd) argument to createLocation is deprecated; use a ' + 'location descriptor instead') : undefined;
23720
23721 location = _extends({}, location, { state: action });
23722
23723 action = key || _Actions.POP;
23724 key = _fourthArg;
23725 }
23726
23727 var pathname = location.pathname || '/';
23728 var search = location.search || '';
23729 var hash = location.hash || '';
23730 var state = location.state || null;
23731
23732 return {
23733 pathname: pathname,
23734 search: search,
23735 hash: hash,
23736 state: state,
23737 action: action,
23738 key: key
23739 };
23740 }
23741
23742 exports['default'] = createLocation;
23743 module.exports = exports['default'];
23744
23745/***/ },
23746/* 284 */
23747/***/ function(module, exports, __webpack_require__) {
23748
23749 'use strict';
23750
23751 exports.__esModule = true;
23752
23753 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23754
23755 var _warning = __webpack_require__(271);
23756
23757 var _warning2 = _interopRequireDefault(_warning);
23758
23759 function runTransitionHook(hook, location, callback) {
23760 var result = hook(location, callback);
23761
23762 if (hook.length < 2) {
23763 // Assume the hook runs synchronously and automatically
23764 // call the callback with the return value.
23765 callback(result);
23766 } else {
23767 (undefined) !== 'production' ? _warning2['default'](result === undefined, 'You should not "return" in a transition hook with a callback argument; call the callback instead') : undefined;
23768 }
23769 }
23770
23771 exports['default'] = runTransitionHook;
23772 module.exports = exports['default'];
23773
23774/***/ },
23775/* 285 */
23776/***/ function(module, exports, __webpack_require__) {
23777
23778 'use strict';
23779
23780 exports.__esModule = true;
23781
23782 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23783
23784 var _warning = __webpack_require__(271);
23785
23786 var _warning2 = _interopRequireDefault(_warning);
23787
23788 function deprecate(fn, message) {
23789 return function () {
23790 (undefined) !== 'production' ? _warning2['default'](false, '[history] ' + message) : undefined;
23791 return fn.apply(this, arguments);
23792 };
23793 }
23794
23795 exports['default'] = deprecate;
23796 module.exports = exports['default'];
23797
23798/***/ },
23799/* 286 */
23800/***/ function(module, exports, __webpack_require__) {
23801
23802 'use strict';
23803
23804 exports.__esModule = true;
23805
23806 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23807
23808 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
23809
23810 var _warning = __webpack_require__(271);
23811
23812 var _warning2 = _interopRequireDefault(_warning);
23813
23814 var _queryString = __webpack_require__(287);
23815
23816 var _runTransitionHook = __webpack_require__(284);
23817
23818 var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
23819
23820 var _PathUtils = __webpack_require__(273);
23821
23822 var _deprecate = __webpack_require__(285);
23823
23824 var _deprecate2 = _interopRequireDefault(_deprecate);
23825
23826 var SEARCH_BASE_KEY = '$searchBase';
23827
23828 function defaultStringifyQuery(query) {
23829 return _queryString.stringify(query).replace(/%20/g, '+');
23830 }
23831
23832 var defaultParseQueryString = _queryString.parse;
23833
23834 function isNestedObject(object) {
23835 for (var p in object) {
23836 if (Object.prototype.hasOwnProperty.call(object, p) && typeof object[p] === 'object' && !Array.isArray(object[p]) && object[p] !== null) return true;
23837 }return false;
23838 }
23839
23840 /**
23841 * Returns a new createHistory function that may be used to create
23842 * history objects that know how to handle URL queries.
23843 */
23844 function useQueries(createHistory) {
23845 return function () {
23846 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
23847
23848 var history = createHistory(options);
23849
23850 var stringifyQuery = options.stringifyQuery;
23851 var parseQueryString = options.parseQueryString;
23852
23853 if (typeof stringifyQuery !== 'function') stringifyQuery = defaultStringifyQuery;
23854
23855 if (typeof parseQueryString !== 'function') parseQueryString = defaultParseQueryString;
23856
23857 function addQuery(location) {
23858 if (location.query == null) {
23859 var search = location.search;
23860
23861 location.query = parseQueryString(search.substring(1));
23862 location[SEARCH_BASE_KEY] = { search: search, searchBase: '' };
23863 }
23864
23865 // TODO: Instead of all the book-keeping here, this should just strip the
23866 // stringified query from the search.
23867
23868 return location;
23869 }
23870
23871 function appendQuery(location, query) {
23872 var _extends2;
23873
23874 var searchBaseSpec = location[SEARCH_BASE_KEY];
23875 var queryString = query ? stringifyQuery(query) : '';
23876 if (!searchBaseSpec && !queryString) {
23877 return location;
23878 }
23879
23880 (undefined) !== 'production' ? _warning2['default'](stringifyQuery !== defaultStringifyQuery || !isNestedObject(query), 'useQueries does not stringify nested query objects by default; ' + 'use a custom stringifyQuery function') : undefined;
23881
23882 if (typeof location === 'string') location = _PathUtils.parsePath(location);
23883
23884 var searchBase = undefined;
23885 if (searchBaseSpec && location.search === searchBaseSpec.search) {
23886 searchBase = searchBaseSpec.searchBase;
23887 } else {
23888 searchBase = location.search || '';
23889 }
23890
23891 var search = searchBase;
23892 if (queryString) {
23893 search += (search ? '&' : '?') + queryString;
23894 }
23895
23896 return _extends({}, location, (_extends2 = {
23897 search: search
23898 }, _extends2[SEARCH_BASE_KEY] = { search: search, searchBase: searchBase }, _extends2));
23899 }
23900
23901 // Override all read methods with query-aware versions.
23902 function listenBefore(hook) {
23903 return history.listenBefore(function (location, callback) {
23904 _runTransitionHook2['default'](hook, addQuery(location), callback);
23905 });
23906 }
23907
23908 function listen(listener) {
23909 return history.listen(function (location) {
23910 listener(addQuery(location));
23911 });
23912 }
23913
23914 // Override all write methods with query-aware versions.
23915 function push(location) {
23916 history.push(appendQuery(location, location.query));
23917 }
23918
23919 function replace(location) {
23920 history.replace(appendQuery(location, location.query));
23921 }
23922
23923 function createPath(location, query) {
23924 (undefined) !== 'production' ? _warning2['default'](!query, 'the query argument to createPath is deprecated; use a location descriptor instead') : undefined;
23925
23926 return history.createPath(appendQuery(location, query || location.query));
23927 }
23928
23929 function createHref(location, query) {
23930 (undefined) !== 'production' ? _warning2['default'](!query, 'the query argument to createHref is deprecated; use a location descriptor instead') : undefined;
23931
23932 return history.createHref(appendQuery(location, query || location.query));
23933 }
23934
23935 function createLocation(location) {
23936 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
23937 args[_key - 1] = arguments[_key];
23938 }
23939
23940 var fullLocation = history.createLocation.apply(history, [appendQuery(location, location.query)].concat(args));
23941 if (location.query) {
23942 fullLocation.query = location.query;
23943 }
23944 return addQuery(fullLocation);
23945 }
23946
23947 // deprecated
23948 function pushState(state, path, query) {
23949 if (typeof path === 'string') path = _PathUtils.parsePath(path);
23950
23951 push(_extends({ state: state }, path, { query: query }));
23952 }
23953
23954 // deprecated
23955 function replaceState(state, path, query) {
23956 if (typeof path === 'string') path = _PathUtils.parsePath(path);
23957
23958 replace(_extends({ state: state }, path, { query: query }));
23959 }
23960
23961 return _extends({}, history, {
23962 listenBefore: listenBefore,
23963 listen: listen,
23964 push: push,
23965 replace: replace,
23966 createPath: createPath,
23967 createHref: createHref,
23968 createLocation: createLocation,
23969
23970 pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),
23971 replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')
23972 });
23973 };
23974 }
23975
23976 exports['default'] = useQueries;
23977 module.exports = exports['default'];
23978
23979/***/ },
23980/* 287 */
23981/***/ function(module, exports, __webpack_require__) {
23982
23983 'use strict';
23984 var strictUriEncode = __webpack_require__(288);
23985
23986 exports.extract = function (str) {
23987 return str.split('?')[1] || '';
23988 };
23989
23990 exports.parse = function (str) {
23991 if (typeof str !== 'string') {
23992 return {};
23993 }
23994
23995 str = str.trim().replace(/^(\?|#|&)/, '');
23996
23997 if (!str) {
23998 return {};
23999 }
24000
24001 return str.split('&').reduce(function (ret, param) {
24002 var parts = param.replace(/\+/g, ' ').split('=');
24003 // Firefox (pre 40) decodes `%3D` to `=`
24004 // https://github.com/sindresorhus/query-string/pull/37
24005 var key = parts.shift();
24006 var val = parts.length > 0 ? parts.join('=') : undefined;
24007
24008 key = decodeURIComponent(key);
24009
24010 // missing `=` should be `null`:
24011 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
24012 val = val === undefined ? null : decodeURIComponent(val);
24013
24014 if (!ret.hasOwnProperty(key)) {
24015 ret[key] = val;
24016 } else if (Array.isArray(ret[key])) {
24017 ret[key].push(val);
24018 } else {
24019 ret[key] = [ret[key], val];
24020 }
24021
24022 return ret;
24023 }, {});
24024 };
24025
24026 exports.stringify = function (obj) {
24027 return obj ? Object.keys(obj).sort().map(function (key) {
24028 var val = obj[key];
24029
24030 if (val === undefined) {
24031 return '';
24032 }
24033
24034 if (val === null) {
24035 return key;
24036 }
24037
24038 if (Array.isArray(val)) {
24039 return val.slice().sort().map(function (val2) {
24040 return strictUriEncode(key) + '=' + strictUriEncode(val2);
24041 }).join('&');
24042 }
24043
24044 return strictUriEncode(key) + '=' + strictUriEncode(val);
24045 }).filter(function (x) {
24046 return x.length > 0;
24047 }).join('&') : '';
24048 };
24049
24050
24051/***/ },
24052/* 288 */
24053/***/ function(module, exports) {
24054
24055 'use strict';
24056 module.exports = function (str) {
24057 return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
24058 return '%' + c.charCodeAt(0).toString(16).toUpperCase();
24059 });
24060 };
24061
24062
24063/***/ },
24064/* 289 */
24065/***/ function(module, exports, __webpack_require__) {
24066
24067 'use strict';
24068
24069 exports.__esModule = true;
24070
24071 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24072
24073 exports.default = createTransitionManager;
24074
24075 var _routerWarning = __webpack_require__(264);
24076
24077 var _routerWarning2 = _interopRequireDefault(_routerWarning);
24078
24079 var _computeChangedRoutes2 = __webpack_require__(290);
24080
24081 var _computeChangedRoutes3 = _interopRequireDefault(_computeChangedRoutes2);
24082
24083 var _TransitionUtils = __webpack_require__(291);
24084
24085 var _isActive2 = __webpack_require__(293);
24086
24087 var _isActive3 = _interopRequireDefault(_isActive2);
24088
24089 var _getComponents = __webpack_require__(294);
24090
24091 var _getComponents2 = _interopRequireDefault(_getComponents);
24092
24093 var _matchRoutes = __webpack_require__(296);
24094
24095 var _matchRoutes2 = _interopRequireDefault(_matchRoutes);
24096
24097 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24098
24099 function hasAnyProperties(object) {
24100 for (var p in object) {
24101 if (Object.prototype.hasOwnProperty.call(object, p)) return true;
24102 }return false;
24103 }
24104
24105 function createTransitionManager(history, routes) {
24106 var state = {};
24107
24108 // Signature should be (location, indexOnly), but needs to support (path,
24109 // query, indexOnly)
24110 function isActive(location) {
24111 var indexOnlyOrDeprecatedQuery = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
24112 var deprecatedIndexOnly = arguments.length <= 2 || arguments[2] === undefined ? null : arguments[2];
24113
24114 var indexOnly = void 0;
24115 if (indexOnlyOrDeprecatedQuery && indexOnlyOrDeprecatedQuery !== true || deprecatedIndexOnly !== null) {
24116 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : void 0;
24117 location = { pathname: location, query: indexOnlyOrDeprecatedQuery };
24118 indexOnly = deprecatedIndexOnly || false;
24119 } else {
24120 location = history.createLocation(location);
24121 indexOnly = indexOnlyOrDeprecatedQuery;
24122 }
24123
24124 return (0, _isActive3.default)(location, indexOnly, state.location, state.routes, state.params);
24125 }
24126
24127 var partialNextState = void 0;
24128
24129 function match(location, callback) {
24130 if (partialNextState && partialNextState.location === location) {
24131 // Continue from where we left off.
24132 finishMatch(partialNextState, callback);
24133 } else {
24134 (0, _matchRoutes2.default)(routes, location, function (error, nextState) {
24135 if (error) {
24136 callback(error);
24137 } else if (nextState) {
24138 finishMatch(_extends({}, nextState, { location: location }), callback);
24139 } else {
24140 callback();
24141 }
24142 });
24143 }
24144 }
24145
24146 function finishMatch(nextState, callback) {
24147 var _computeChangedRoutes = (0, _computeChangedRoutes3.default)(state, nextState);
24148
24149 var leaveRoutes = _computeChangedRoutes.leaveRoutes;
24150 var changeRoutes = _computeChangedRoutes.changeRoutes;
24151 var enterRoutes = _computeChangedRoutes.enterRoutes;
24152
24153
24154 (0, _TransitionUtils.runLeaveHooks)(leaveRoutes, state);
24155
24156 // Tear down confirmation hooks for left routes
24157 leaveRoutes.filter(function (route) {
24158 return enterRoutes.indexOf(route) === -1;
24159 }).forEach(removeListenBeforeHooksForRoute);
24160
24161 // change and enter hooks are run in series
24162 (0, _TransitionUtils.runChangeHooks)(changeRoutes, state, nextState, function (error, redirectInfo) {
24163 if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
24164
24165 (0, _TransitionUtils.runEnterHooks)(enterRoutes, nextState, finishEnterHooks);
24166 });
24167
24168 function finishEnterHooks(error, redirectInfo) {
24169 if (error || redirectInfo) return handleErrorOrRedirect(error, redirectInfo);
24170
24171 // TODO: Fetch components after state is updated.
24172 (0, _getComponents2.default)(nextState, function (error, components) {
24173 if (error) {
24174 callback(error);
24175 } else {
24176 // TODO: Make match a pure function and have some other API
24177 // for "match and update state".
24178 callback(null, null, state = _extends({}, nextState, { components: components }));
24179 }
24180 });
24181 }
24182
24183 function handleErrorOrRedirect(error, redirectInfo) {
24184 if (error) callback(error);else callback(null, redirectInfo);
24185 }
24186 }
24187
24188 var RouteGuid = 1;
24189
24190 function getRouteID(route) {
24191 var create = arguments.length <= 1 || arguments[1] === undefined ? true : arguments[1];
24192
24193 return route.__id__ || create && (route.__id__ = RouteGuid++);
24194 }
24195
24196 var RouteHooks = Object.create(null);
24197
24198 function getRouteHooksForRoutes(routes) {
24199 return routes.reduce(function (hooks, route) {
24200 hooks.push.apply(hooks, RouteHooks[getRouteID(route)]);
24201 return hooks;
24202 }, []);
24203 }
24204
24205 function transitionHook(location, callback) {
24206 (0, _matchRoutes2.default)(routes, location, function (error, nextState) {
24207 if (nextState == null) {
24208 // TODO: We didn't actually match anything, but hang
24209 // onto error/nextState so we don't have to matchRoutes
24210 // again in the listen callback.
24211 callback();
24212 return;
24213 }
24214
24215 // Cache some state here so we don't have to
24216 // matchRoutes() again in the listen callback.
24217 partialNextState = _extends({}, nextState, { location: location });
24218
24219 var hooks = getRouteHooksForRoutes((0, _computeChangedRoutes3.default)(state, partialNextState).leaveRoutes);
24220
24221 var result = void 0;
24222 for (var i = 0, len = hooks.length; result == null && i < len; ++i) {
24223 // Passing the location arg here indicates to
24224 // the user that this is a transition hook.
24225 result = hooks[i](location);
24226 }
24227
24228 callback(result);
24229 });
24230 }
24231
24232 /* istanbul ignore next: untestable with Karma */
24233 function beforeUnloadHook() {
24234 // Synchronously check to see if any route hooks want
24235 // to prevent the current window/tab from closing.
24236 if (state.routes) {
24237 var hooks = getRouteHooksForRoutes(state.routes);
24238
24239 var message = void 0;
24240 for (var i = 0, len = hooks.length; typeof message !== 'string' && i < len; ++i) {
24241 // Passing no args indicates to the user that this is a
24242 // beforeunload hook. We don't know the next location.
24243 message = hooks[i]();
24244 }
24245
24246 return message;
24247 }
24248 }
24249
24250 var unlistenBefore = void 0,
24251 unlistenBeforeUnload = void 0;
24252
24253 function removeListenBeforeHooksForRoute(route) {
24254 var routeID = getRouteID(route, false);
24255 if (!routeID) {
24256 return;
24257 }
24258
24259 delete RouteHooks[routeID];
24260
24261 if (!hasAnyProperties(RouteHooks)) {
24262 // teardown transition & beforeunload hooks
24263 if (unlistenBefore) {
24264 unlistenBefore();
24265 unlistenBefore = null;
24266 }
24267
24268 if (unlistenBeforeUnload) {
24269 unlistenBeforeUnload();
24270 unlistenBeforeUnload = null;
24271 }
24272 }
24273 }
24274
24275 /**
24276 * Registers the given hook function to run before leaving the given route.
24277 *
24278 * During a normal transition, the hook function receives the next location
24279 * as its only argument and can return either a prompt message (string) to show the user,
24280 * to make sure they want to leave the page; or `false`, to prevent the transition.
24281 * Any other return value will have no effect.
24282 *
24283 * During the beforeunload event (in browsers) the hook receives no arguments.
24284 * In this case it must return a prompt message to prevent the transition.
24285 *
24286 * Returns a function that may be used to unbind the listener.
24287 */
24288 function listenBeforeLeavingRoute(route, hook) {
24289 // TODO: Warn if they register for a route that isn't currently
24290 // active. They're probably doing something wrong, like re-creating
24291 // route objects on every location change.
24292 var routeID = getRouteID(route);
24293 var hooks = RouteHooks[routeID];
24294
24295 if (!hooks) {
24296 var thereWereNoRouteHooks = !hasAnyProperties(RouteHooks);
24297
24298 RouteHooks[routeID] = [hook];
24299
24300 if (thereWereNoRouteHooks) {
24301 // setup transition & beforeunload hooks
24302 unlistenBefore = history.listenBefore(transitionHook);
24303
24304 if (history.listenBeforeUnload) unlistenBeforeUnload = history.listenBeforeUnload(beforeUnloadHook);
24305 }
24306 } else {
24307 if (hooks.indexOf(hook) === -1) {
24308 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'adding multiple leave hooks for the same route is deprecated; manage multiple confirmations in your own code instead') : void 0;
24309
24310 hooks.push(hook);
24311 }
24312 }
24313
24314 return function () {
24315 var hooks = RouteHooks[routeID];
24316
24317 if (hooks) {
24318 var newHooks = hooks.filter(function (item) {
24319 return item !== hook;
24320 });
24321
24322 if (newHooks.length === 0) {
24323 removeListenBeforeHooksForRoute(route);
24324 } else {
24325 RouteHooks[routeID] = newHooks;
24326 }
24327 }
24328 };
24329 }
24330
24331 /**
24332 * This is the API for stateful environments. As the location
24333 * changes, we update state and call the listener. We can also
24334 * gracefully handle errors and redirects.
24335 */
24336 function listen(listener) {
24337 // TODO: Only use a single history listener. Otherwise we'll
24338 // end up with multiple concurrent calls to match.
24339 return history.listen(function (location) {
24340 if (state.location === location) {
24341 listener(null, state);
24342 } else {
24343 match(location, function (error, redirectLocation, nextState) {
24344 if (error) {
24345 listener(error);
24346 } else if (redirectLocation) {
24347 history.replace(redirectLocation);
24348 } else if (nextState) {
24349 listener(null, nextState);
24350 } else {
24351 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : void 0;
24352 }
24353 });
24354 }
24355 });
24356 }
24357
24358 return {
24359 isActive: isActive,
24360 match: match,
24361 listenBeforeLeavingRoute: listenBeforeLeavingRoute,
24362 listen: listen
24363 };
24364 }
24365
24366 //export default useRoutes
24367
24368 module.exports = exports['default'];
24369
24370/***/ },
24371/* 290 */
24372/***/ function(module, exports, __webpack_require__) {
24373
24374 'use strict';
24375
24376 exports.__esModule = true;
24377
24378 var _PatternUtils = __webpack_require__(267);
24379
24380 function routeParamsChanged(route, prevState, nextState) {
24381 if (!route.path) return false;
24382
24383 var paramNames = (0, _PatternUtils.getParamNames)(route.path);
24384
24385 return paramNames.some(function (paramName) {
24386 return prevState.params[paramName] !== nextState.params[paramName];
24387 });
24388 }
24389
24390 /**
24391 * Returns an object of { leaveRoutes, changeRoutes, enterRoutes } determined by
24392 * the change from prevState to nextState. We leave routes if either
24393 * 1) they are not in the next state or 2) they are in the next state
24394 * but their params have changed (i.e. /users/123 => /users/456).
24395 *
24396 * leaveRoutes are ordered starting at the leaf route of the tree
24397 * we're leaving up to the common parent route. enterRoutes are ordered
24398 * from the top of the tree we're entering down to the leaf route.
24399 *
24400 * changeRoutes are any routes that didn't leave or enter during
24401 * the transition.
24402 */
24403 function computeChangedRoutes(prevState, nextState) {
24404 var prevRoutes = prevState && prevState.routes;
24405 var nextRoutes = nextState.routes;
24406
24407 var leaveRoutes = void 0,
24408 changeRoutes = void 0,
24409 enterRoutes = void 0;
24410 if (prevRoutes) {
24411 (function () {
24412 var parentIsLeaving = false;
24413 leaveRoutes = prevRoutes.filter(function (route) {
24414 if (parentIsLeaving) {
24415 return true;
24416 } else {
24417 var isLeaving = nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
24418 if (isLeaving) parentIsLeaving = true;
24419 return isLeaving;
24420 }
24421 });
24422
24423 // onLeave hooks start at the leaf route.
24424 leaveRoutes.reverse();
24425
24426 enterRoutes = [];
24427 changeRoutes = [];
24428
24429 nextRoutes.forEach(function (route) {
24430 var isNew = prevRoutes.indexOf(route) === -1;
24431 var paramsChanged = leaveRoutes.indexOf(route) !== -1;
24432
24433 if (isNew || paramsChanged) enterRoutes.push(route);else changeRoutes.push(route);
24434 });
24435 })();
24436 } else {
24437 leaveRoutes = [];
24438 changeRoutes = [];
24439 enterRoutes = nextRoutes;
24440 }
24441
24442 return {
24443 leaveRoutes: leaveRoutes,
24444 changeRoutes: changeRoutes,
24445 enterRoutes: enterRoutes
24446 };
24447 }
24448
24449 exports.default = computeChangedRoutes;
24450 module.exports = exports['default'];
24451
24452/***/ },
24453/* 291 */
24454/***/ function(module, exports, __webpack_require__) {
24455
24456 'use strict';
24457
24458 exports.__esModule = true;
24459 exports.runEnterHooks = runEnterHooks;
24460 exports.runChangeHooks = runChangeHooks;
24461 exports.runLeaveHooks = runLeaveHooks;
24462
24463 var _AsyncUtils = __webpack_require__(292);
24464
24465 var _routerWarning = __webpack_require__(264);
24466
24467 var _routerWarning2 = _interopRequireDefault(_routerWarning);
24468
24469 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24470
24471 function createTransitionHook(hook, route, asyncArity) {
24472 return function () {
24473 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
24474 args[_key] = arguments[_key];
24475 }
24476
24477 hook.apply(route, args);
24478
24479 if (hook.length < asyncArity) {
24480 var callback = args[args.length - 1];
24481 // Assume hook executes synchronously and
24482 // automatically call the callback.
24483 callback();
24484 }
24485 };
24486 }
24487
24488 function getEnterHooks(routes) {
24489 return routes.reduce(function (hooks, route) {
24490 if (route.onEnter) hooks.push(createTransitionHook(route.onEnter, route, 3));
24491
24492 return hooks;
24493 }, []);
24494 }
24495
24496 function getChangeHooks(routes) {
24497 return routes.reduce(function (hooks, route) {
24498 if (route.onChange) hooks.push(createTransitionHook(route.onChange, route, 4));
24499 return hooks;
24500 }, []);
24501 }
24502
24503 function runTransitionHooks(length, iter, callback) {
24504 if (!length) {
24505 callback();
24506 return;
24507 }
24508
24509 var redirectInfo = void 0;
24510 function replace(location, deprecatedPathname, deprecatedQuery) {
24511 if (deprecatedPathname) {
24512 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`replaceState(state, pathname, query) is deprecated; use `replace(location)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated') : void 0;
24513 redirectInfo = {
24514 pathname: deprecatedPathname,
24515 query: deprecatedQuery,
24516 state: location
24517 };
24518
24519 return;
24520 }
24521
24522 redirectInfo = location;
24523 }
24524
24525 (0, _AsyncUtils.loopAsync)(length, function (index, next, done) {
24526 iter(index, replace, function (error) {
24527 if (error || redirectInfo) {
24528 done(error, redirectInfo); // No need to continue.
24529 } else {
24530 next();
24531 }
24532 });
24533 }, callback);
24534 }
24535
24536 /**
24537 * Runs all onEnter hooks in the given array of routes in order
24538 * with onEnter(nextState, replace, callback) and calls
24539 * callback(error, redirectInfo) when finished. The first hook
24540 * to use replace short-circuits the loop.
24541 *
24542 * If a hook needs to run asynchronously, it may use the callback
24543 * function. However, doing so will cause the transition to pause,
24544 * which could lead to a non-responsive UI if the hook is slow.
24545 */
24546 function runEnterHooks(routes, nextState, callback) {
24547 var hooks = getEnterHooks(routes);
24548 return runTransitionHooks(hooks.length, function (index, replace, next) {
24549 hooks[index](nextState, replace, next);
24550 }, callback);
24551 }
24552
24553 /**
24554 * Runs all onChange hooks in the given array of routes in order
24555 * with onChange(prevState, nextState, replace, callback) and calls
24556 * callback(error, redirectInfo) when finished. The first hook
24557 * to use replace short-circuits the loop.
24558 *
24559 * If a hook needs to run asynchronously, it may use the callback
24560 * function. However, doing so will cause the transition to pause,
24561 * which could lead to a non-responsive UI if the hook is slow.
24562 */
24563 function runChangeHooks(routes, state, nextState, callback) {
24564 var hooks = getChangeHooks(routes);
24565 return runTransitionHooks(hooks.length, function (index, replace, next) {
24566 hooks[index](state, nextState, replace, next);
24567 }, callback);
24568 }
24569
24570 /**
24571 * Runs all onLeave hooks in the given array of routes in order.
24572 */
24573 function runLeaveHooks(routes, prevState) {
24574 for (var i = 0, len = routes.length; i < len; ++i) {
24575 if (routes[i].onLeave) routes[i].onLeave.call(routes[i], prevState);
24576 }
24577 }
24578
24579/***/ },
24580/* 292 */
24581/***/ function(module, exports) {
24582
24583 "use strict";
24584
24585 exports.__esModule = true;
24586 exports.loopAsync = loopAsync;
24587 exports.mapAsync = mapAsync;
24588 function loopAsync(turns, work, callback) {
24589 var currentTurn = 0,
24590 isDone = false;
24591 var sync = false,
24592 hasNext = false,
24593 doneArgs = void 0;
24594
24595 function done() {
24596 isDone = true;
24597 if (sync) {
24598 // Iterate instead of recursing if possible.
24599 doneArgs = [].concat(Array.prototype.slice.call(arguments));
24600 return;
24601 }
24602
24603 callback.apply(this, arguments);
24604 }
24605
24606 function next() {
24607 if (isDone) {
24608 return;
24609 }
24610
24611 hasNext = true;
24612 if (sync) {
24613 // Iterate instead of recursing if possible.
24614 return;
24615 }
24616
24617 sync = true;
24618
24619 while (!isDone && currentTurn < turns && hasNext) {
24620 hasNext = false;
24621 work.call(this, currentTurn++, next, done);
24622 }
24623
24624 sync = false;
24625
24626 if (isDone) {
24627 // This means the loop finished synchronously.
24628 callback.apply(this, doneArgs);
24629 return;
24630 }
24631
24632 if (currentTurn >= turns && hasNext) {
24633 isDone = true;
24634 callback();
24635 }
24636 }
24637
24638 next();
24639 }
24640
24641 function mapAsync(array, work, callback) {
24642 var length = array.length;
24643 var values = [];
24644
24645 if (length === 0) return callback(null, values);
24646
24647 var isDone = false,
24648 doneCount = 0;
24649
24650 function done(index, error, value) {
24651 if (isDone) return;
24652
24653 if (error) {
24654 isDone = true;
24655 callback(error);
24656 } else {
24657 values[index] = value;
24658
24659 isDone = ++doneCount === length;
24660
24661 if (isDone) callback(null, values);
24662 }
24663 }
24664
24665 array.forEach(function (item, index) {
24666 work(item, index, function (error, value) {
24667 done(index, error, value);
24668 });
24669 });
24670 }
24671
24672/***/ },
24673/* 293 */
24674/***/ function(module, exports, __webpack_require__) {
24675
24676 'use strict';
24677
24678 exports.__esModule = true;
24679
24680 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
24681
24682 exports.default = isActive;
24683
24684 var _PatternUtils = __webpack_require__(267);
24685
24686 function deepEqual(a, b) {
24687 if (a == b) return true;
24688
24689 if (a == null || b == null) return false;
24690
24691 if (Array.isArray(a)) {
24692 return Array.isArray(b) && a.length === b.length && a.every(function (item, index) {
24693 return deepEqual(item, b[index]);
24694 });
24695 }
24696
24697 if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object') {
24698 for (var p in a) {
24699 if (!Object.prototype.hasOwnProperty.call(a, p)) {
24700 continue;
24701 }
24702
24703 if (a[p] === undefined) {
24704 if (b[p] !== undefined) {
24705 return false;
24706 }
24707 } else if (!Object.prototype.hasOwnProperty.call(b, p)) {
24708 return false;
24709 } else if (!deepEqual(a[p], b[p])) {
24710 return false;
24711 }
24712 }
24713
24714 return true;
24715 }
24716
24717 return String(a) === String(b);
24718 }
24719
24720 /**
24721 * Returns true if the current pathname matches the supplied one, net of
24722 * leading and trailing slash normalization. This is sufficient for an
24723 * indexOnly route match.
24724 */
24725 function pathIsActive(pathname, currentPathname) {
24726 // Normalize leading slash for consistency. Leading slash on pathname has
24727 // already been normalized in isActive. See caveat there.
24728 if (currentPathname.charAt(0) !== '/') {
24729 currentPathname = '/' + currentPathname;
24730 }
24731
24732 // Normalize the end of both path names too. Maybe `/foo/` shouldn't show
24733 // `/foo` as active, but in this case, we would already have failed the
24734 // match.
24735 if (pathname.charAt(pathname.length - 1) !== '/') {
24736 pathname += '/';
24737 }
24738 if (currentPathname.charAt(currentPathname.length - 1) !== '/') {
24739 currentPathname += '/';
24740 }
24741
24742 return currentPathname === pathname;
24743 }
24744
24745 /**
24746 * Returns true if the given pathname matches the active routes and params.
24747 */
24748 function routeIsActive(pathname, routes, params) {
24749 var remainingPathname = pathname,
24750 paramNames = [],
24751 paramValues = [];
24752
24753 // for...of would work here but it's probably slower post-transpilation.
24754 for (var i = 0, len = routes.length; i < len; ++i) {
24755 var route = routes[i];
24756 var pattern = route.path || '';
24757
24758 if (pattern.charAt(0) === '/') {
24759 remainingPathname = pathname;
24760 paramNames = [];
24761 paramValues = [];
24762 }
24763
24764 if (remainingPathname !== null && pattern) {
24765 var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
24766 if (matched) {
24767 remainingPathname = matched.remainingPathname;
24768 paramNames = [].concat(paramNames, matched.paramNames);
24769 paramValues = [].concat(paramValues, matched.paramValues);
24770 } else {
24771 remainingPathname = null;
24772 }
24773
24774 if (remainingPathname === '') {
24775 // We have an exact match on the route. Just check that all the params
24776 // match.
24777 // FIXME: This doesn't work on repeated params.
24778 return paramNames.every(function (paramName, index) {
24779 return String(paramValues[index]) === String(params[paramName]);
24780 });
24781 }
24782 }
24783 }
24784
24785 return false;
24786 }
24787
24788 /**
24789 * Returns true if all key/value pairs in the given query are
24790 * currently active.
24791 */
24792 function queryIsActive(query, activeQuery) {
24793 if (activeQuery == null) return query == null;
24794
24795 if (query == null) return true;
24796
24797 return deepEqual(query, activeQuery);
24798 }
24799
24800 /**
24801 * Returns true if a <Link> to the given pathname/query combination is
24802 * currently active.
24803 */
24804 function isActive(_ref, indexOnly, currentLocation, routes, params) {
24805 var pathname = _ref.pathname;
24806 var query = _ref.query;
24807
24808 if (currentLocation == null) return false;
24809
24810 // TODO: This is a bit ugly. It keeps around support for treating pathnames
24811 // without preceding slashes as absolute paths, but possibly also works
24812 // around the same quirks with basenames as in matchRoutes.
24813 if (pathname.charAt(0) !== '/') {
24814 pathname = '/' + pathname;
24815 }
24816
24817 if (!pathIsActive(pathname, currentLocation.pathname)) {
24818 // The path check is necessary and sufficient for indexOnly, but otherwise
24819 // we still need to check the routes.
24820 if (indexOnly || !routeIsActive(pathname, routes, params)) {
24821 return false;
24822 }
24823 }
24824
24825 return queryIsActive(query, currentLocation.query);
24826 }
24827 module.exports = exports['default'];
24828
24829/***/ },
24830/* 294 */
24831/***/ function(module, exports, __webpack_require__) {
24832
24833 'use strict';
24834
24835 exports.__esModule = true;
24836
24837 var _AsyncUtils = __webpack_require__(292);
24838
24839 var _makeStateWithLocation = __webpack_require__(295);
24840
24841 var _makeStateWithLocation2 = _interopRequireDefault(_makeStateWithLocation);
24842
24843 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24844
24845 function getComponentsForRoute(nextState, route, callback) {
24846 if (route.component || route.components) {
24847 callback(null, route.component || route.components);
24848 return;
24849 }
24850
24851 var getComponent = route.getComponent || route.getComponents;
24852 if (!getComponent) {
24853 callback();
24854 return;
24855 }
24856
24857 var location = nextState.location;
24858
24859 var nextStateWithLocation = (0, _makeStateWithLocation2.default)(nextState, location);
24860
24861 getComponent.call(route, nextStateWithLocation, callback);
24862 }
24863
24864 /**
24865 * Asynchronously fetches all components needed for the given router
24866 * state and calls callback(error, components) when finished.
24867 *
24868 * Note: This operation may finish synchronously if no routes have an
24869 * asynchronous getComponents method.
24870 */
24871 function getComponents(nextState, callback) {
24872 (0, _AsyncUtils.mapAsync)(nextState.routes, function (route, index, callback) {
24873 getComponentsForRoute(nextState, route, callback);
24874 }, callback);
24875 }
24876
24877 exports.default = getComponents;
24878 module.exports = exports['default'];
24879
24880/***/ },
24881/* 295 */
24882/***/ function(module, exports, __webpack_require__) {
24883
24884 'use strict';
24885
24886 exports.__esModule = true;
24887
24888 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24889
24890 exports.default = makeStateWithLocation;
24891
24892 var _deprecateObjectProperties = __webpack_require__(263);
24893
24894 var _routerWarning = __webpack_require__(264);
24895
24896 var _routerWarning2 = _interopRequireDefault(_routerWarning);
24897
24898 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24899
24900 function makeStateWithLocation(state, location) {
24901 if ((undefined) !== 'production' && _deprecateObjectProperties.canUseMembrane) {
24902 var stateWithLocation = _extends({}, state);
24903
24904 // I don't use deprecateObjectProperties here because I want to keep the
24905 // same code path between development and production, in that we just
24906 // assign extra properties to the copy of the state object in both cases.
24907
24908 var _loop = function _loop(prop) {
24909 if (!Object.prototype.hasOwnProperty.call(location, prop)) {
24910 return 'continue';
24911 }
24912
24913 Object.defineProperty(stateWithLocation, prop, {
24914 get: function get() {
24915 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'Accessing location properties directly from the first argument to `getComponent`, `getComponents`, `getChildRoutes`, and `getIndexRoute` is deprecated. That argument is now the router state (`nextState` or `partialNextState`) rather than the location. To access the location, use `nextState.location` or `partialNextState.location`.') : void 0;
24916 return location[prop];
24917 }
24918 });
24919 };
24920
24921 for (var prop in location) {
24922 var _ret = _loop(prop);
24923
24924 if (_ret === 'continue') continue;
24925 }
24926
24927 return stateWithLocation;
24928 }
24929
24930 return _extends({}, state, location);
24931 }
24932 module.exports = exports['default'];
24933
24934/***/ },
24935/* 296 */
24936/***/ function(module, exports, __webpack_require__) {
24937
24938 'use strict';
24939
24940 exports.__esModule = true;
24941
24942 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
24943
24944 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
24945
24946 exports.default = matchRoutes;
24947
24948 var _AsyncUtils = __webpack_require__(292);
24949
24950 var _makeStateWithLocation = __webpack_require__(295);
24951
24952 var _makeStateWithLocation2 = _interopRequireDefault(_makeStateWithLocation);
24953
24954 var _PatternUtils = __webpack_require__(267);
24955
24956 var _routerWarning = __webpack_require__(264);
24957
24958 var _routerWarning2 = _interopRequireDefault(_routerWarning);
24959
24960 var _RouteUtils = __webpack_require__(261);
24961
24962 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24963
24964 function getChildRoutes(route, location, paramNames, paramValues, callback) {
24965 if (route.childRoutes) {
24966 return [null, route.childRoutes];
24967 }
24968 if (!route.getChildRoutes) {
24969 return [];
24970 }
24971
24972 var sync = true,
24973 result = void 0;
24974
24975 var partialNextState = {
24976 location: location,
24977 params: createParams(paramNames, paramValues)
24978 };
24979
24980 var partialNextStateWithLocation = (0, _makeStateWithLocation2.default)(partialNextState, location);
24981
24982 route.getChildRoutes(partialNextStateWithLocation, function (error, childRoutes) {
24983 childRoutes = !error && (0, _RouteUtils.createRoutes)(childRoutes);
24984 if (sync) {
24985 result = [error, childRoutes];
24986 return;
24987 }
24988
24989 callback(error, childRoutes);
24990 });
24991
24992 sync = false;
24993 return result; // Might be undefined.
24994 }
24995
24996 function getIndexRoute(route, location, paramNames, paramValues, callback) {
24997 if (route.indexRoute) {
24998 callback(null, route.indexRoute);
24999 } else if (route.getIndexRoute) {
25000 var partialNextState = {
25001 location: location,
25002 params: createParams(paramNames, paramValues)
25003 };
25004
25005 var partialNextStateWithLocation = (0, _makeStateWithLocation2.default)(partialNextState, location);
25006
25007 route.getIndexRoute(partialNextStateWithLocation, function (error, indexRoute) {
25008 callback(error, !error && (0, _RouteUtils.createRoutes)(indexRoute)[0]);
25009 });
25010 } else if (route.childRoutes) {
25011 (function () {
25012 var pathless = route.childRoutes.filter(function (childRoute) {
25013 return !childRoute.path;
25014 });
25015
25016 (0, _AsyncUtils.loopAsync)(pathless.length, function (index, next, done) {
25017 getIndexRoute(pathless[index], location, paramNames, paramValues, function (error, indexRoute) {
25018 if (error || indexRoute) {
25019 var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);
25020 done(error, routes);
25021 } else {
25022 next();
25023 }
25024 });
25025 }, function (err, routes) {
25026 callback(null, routes);
25027 });
25028 })();
25029 } else {
25030 callback();
25031 }
25032 }
25033
25034 function assignParams(params, paramNames, paramValues) {
25035 return paramNames.reduce(function (params, paramName, index) {
25036 var paramValue = paramValues && paramValues[index];
25037
25038 if (Array.isArray(params[paramName])) {
25039 params[paramName].push(paramValue);
25040 } else if (paramName in params) {
25041 params[paramName] = [params[paramName], paramValue];
25042 } else {
25043 params[paramName] = paramValue;
25044 }
25045
25046 return params;
25047 }, params);
25048 }
25049
25050 function createParams(paramNames, paramValues) {
25051 return assignParams({}, paramNames, paramValues);
25052 }
25053
25054 function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {
25055 var pattern = route.path || '';
25056
25057 if (pattern.charAt(0) === '/') {
25058 remainingPathname = location.pathname;
25059 paramNames = [];
25060 paramValues = [];
25061 }
25062
25063 // Only try to match the path if the route actually has a pattern, and if
25064 // we're not just searching for potential nested absolute paths.
25065 if (remainingPathname !== null && pattern) {
25066 try {
25067 var matched = (0, _PatternUtils.matchPattern)(pattern, remainingPathname);
25068 if (matched) {
25069 remainingPathname = matched.remainingPathname;
25070 paramNames = [].concat(paramNames, matched.paramNames);
25071 paramValues = [].concat(paramValues, matched.paramValues);
25072 } else {
25073 remainingPathname = null;
25074 }
25075 } catch (error) {
25076 callback(error);
25077 }
25078
25079 // By assumption, pattern is non-empty here, which is the prerequisite for
25080 // actually terminating a match.
25081 if (remainingPathname === '') {
25082 var _ret2 = function () {
25083 var match = {
25084 routes: [route],
25085 params: createParams(paramNames, paramValues)
25086 };
25087
25088 getIndexRoute(route, location, paramNames, paramValues, function (error, indexRoute) {
25089 if (error) {
25090 callback(error);
25091 } else {
25092 if (Array.isArray(indexRoute)) {
25093 var _match$routes;
25094
25095 (undefined) !== 'production' ? (0, _routerWarning2.default)(indexRoute.every(function (route) {
25096 return !route.path;
25097 }), 'Index routes should not have paths') : void 0;
25098 (_match$routes = match.routes).push.apply(_match$routes, indexRoute);
25099 } else if (indexRoute) {
25100 (undefined) !== 'production' ? (0, _routerWarning2.default)(!indexRoute.path, 'Index routes should not have paths') : void 0;
25101 match.routes.push(indexRoute);
25102 }
25103
25104 callback(null, match);
25105 }
25106 });
25107
25108 return {
25109 v: void 0
25110 };
25111 }();
25112
25113 if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
25114 }
25115 }
25116
25117 if (remainingPathname != null || route.childRoutes) {
25118 // Either a) this route matched at least some of the path or b)
25119 // we don't have to load this route's children asynchronously. In
25120 // either case continue checking for matches in the subtree.
25121 var onChildRoutes = function onChildRoutes(error, childRoutes) {
25122 if (error) {
25123 callback(error);
25124 } else if (childRoutes) {
25125 // Check the child routes to see if any of them match.
25126 matchRoutes(childRoutes, location, function (error, match) {
25127 if (error) {
25128 callback(error);
25129 } else if (match) {
25130 // A child route matched! Augment the match and pass it up the stack.
25131 match.routes.unshift(route);
25132 callback(null, match);
25133 } else {
25134 callback();
25135 }
25136 }, remainingPathname, paramNames, paramValues);
25137 } else {
25138 callback();
25139 }
25140 };
25141
25142 var result = getChildRoutes(route, location, paramNames, paramValues, onChildRoutes);
25143 if (result) {
25144 onChildRoutes.apply(undefined, result);
25145 }
25146 } else {
25147 callback();
25148 }
25149 }
25150
25151 /**
25152 * Asynchronously matches the given location to a set of routes and calls
25153 * callback(error, state) when finished. The state object will have the
25154 * following properties:
25155 *
25156 * - routes An array of routes that matched, in hierarchical order
25157 * - params An object of URL parameters
25158 *
25159 * Note: This operation may finish synchronously if no routes have an
25160 * asynchronous getChildRoutes method.
25161 */
25162 function matchRoutes(routes, location, callback, remainingPathname) {
25163 var paramNames = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4];
25164 var paramValues = arguments.length <= 5 || arguments[5] === undefined ? [] : arguments[5];
25165
25166 if (remainingPathname === undefined) {
25167 // TODO: This is a little bit ugly, but it works around a quirk in history
25168 // that strips the leading slash from pathnames when using basenames with
25169 // trailing slashes.
25170 if (location.pathname.charAt(0) !== '/') {
25171 location = _extends({}, location, {
25172 pathname: '/' + location.pathname
25173 });
25174 }
25175 remainingPathname = location.pathname;
25176 }
25177
25178 (0, _AsyncUtils.loopAsync)(routes.length, function (index, next, done) {
25179 matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {
25180 if (error || match) {
25181 done(error, match);
25182 } else {
25183 next();
25184 }
25185 });
25186 }, callback);
25187 }
25188 module.exports = exports['default'];
25189
25190/***/ },
25191/* 297 */
25192/***/ function(module, exports, __webpack_require__) {
25193
25194 'use strict';
25195
25196 exports.__esModule = true;
25197
25198 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
25199
25200 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25201
25202 var _invariant = __webpack_require__(268);
25203
25204 var _invariant2 = _interopRequireDefault(_invariant);
25205
25206 var _react = __webpack_require__(89);
25207
25208 var _react2 = _interopRequireDefault(_react);
25209
25210 var _deprecateObjectProperties = __webpack_require__(263);
25211
25212 var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties);
25213
25214 var _getRouteParams = __webpack_require__(298);
25215
25216 var _getRouteParams2 = _interopRequireDefault(_getRouteParams);
25217
25218 var _RouteUtils = __webpack_require__(261);
25219
25220 var _routerWarning = __webpack_require__(264);
25221
25222 var _routerWarning2 = _interopRequireDefault(_routerWarning);
25223
25224 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25225
25226 var _React$PropTypes = _react2.default.PropTypes;
25227 var array = _React$PropTypes.array;
25228 var func = _React$PropTypes.func;
25229 var object = _React$PropTypes.object;
25230
25231 /**
25232 * A <RouterContext> renders the component tree for a given router state
25233 * and sets the history object and the current location in context.
25234 */
25235
25236 var RouterContext = _react2.default.createClass({
25237 displayName: 'RouterContext',
25238
25239
25240 propTypes: {
25241 history: object,
25242 router: object.isRequired,
25243 location: object.isRequired,
25244 routes: array.isRequired,
25245 params: object.isRequired,
25246 components: array.isRequired,
25247 createElement: func.isRequired
25248 },
25249
25250 getDefaultProps: function getDefaultProps() {
25251 return {
25252 createElement: _react2.default.createElement
25253 };
25254 },
25255
25256
25257 childContextTypes: {
25258 history: object,
25259 location: object.isRequired,
25260 router: object.isRequired
25261 },
25262
25263 getChildContext: function getChildContext() {
25264 var _props = this.props;
25265 var router = _props.router;
25266 var history = _props.history;
25267 var location = _props.location;
25268
25269 if (!router) {
25270 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`<RouterContext>` expects a `router` rather than a `history`') : void 0;
25271
25272 router = _extends({}, history, {
25273 setRouteLeaveHook: history.listenBeforeLeavingRoute
25274 });
25275 delete router.listenBeforeLeavingRoute;
25276 }
25277
25278 if ((undefined) !== 'production') {
25279 location = (0, _deprecateObjectProperties2.default)(location, '`context.location` is deprecated, please use a route component\'s `props.location` instead. http://tiny.cc/router-accessinglocation');
25280 }
25281
25282 return { history: history, location: location, router: router };
25283 },
25284 createElement: function createElement(component, props) {
25285 return component == null ? null : this.props.createElement(component, props);
25286 },
25287 render: function render() {
25288 var _this = this;
25289
25290 var _props2 = this.props;
25291 var history = _props2.history;
25292 var location = _props2.location;
25293 var routes = _props2.routes;
25294 var params = _props2.params;
25295 var components = _props2.components;
25296
25297 var element = null;
25298
25299 if (components) {
25300 element = components.reduceRight(function (element, components, index) {
25301 if (components == null) return element; // Don't create new children; use the grandchildren.
25302
25303 var route = routes[index];
25304 var routeParams = (0, _getRouteParams2.default)(route, params);
25305 var props = {
25306 history: history,
25307 location: location,
25308 params: params,
25309 route: route,
25310 routeParams: routeParams,
25311 routes: routes
25312 };
25313
25314 if ((0, _RouteUtils.isReactChildren)(element)) {
25315 props.children = element;
25316 } else if (element) {
25317 for (var prop in element) {
25318 if (Object.prototype.hasOwnProperty.call(element, prop)) props[prop] = element[prop];
25319 }
25320 }
25321
25322 if ((typeof components === 'undefined' ? 'undefined' : _typeof(components)) === 'object') {
25323 var elements = {};
25324
25325 for (var key in components) {
25326 if (Object.prototype.hasOwnProperty.call(components, key)) {
25327 // Pass through the key as a prop to createElement to allow
25328 // custom createElement functions to know which named component
25329 // they're rendering, for e.g. matching up to fetched data.
25330 elements[key] = _this.createElement(components[key], _extends({
25331 key: key }, props));
25332 }
25333 }
25334
25335 return elements;
25336 }
25337
25338 return _this.createElement(components, props);
25339 }, element);
25340 }
25341
25342 !(element === null || element === false || _react2.default.isValidElement(element)) ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'The root route must render a single element') : (0, _invariant2.default)(false) : void 0;
25343
25344 return element;
25345 }
25346 });
25347
25348 exports.default = RouterContext;
25349 module.exports = exports['default'];
25350
25351/***/ },
25352/* 298 */
25353/***/ function(module, exports, __webpack_require__) {
25354
25355 'use strict';
25356
25357 exports.__esModule = true;
25358
25359 var _PatternUtils = __webpack_require__(267);
25360
25361 /**
25362 * Extracts an object of params the given route cares about from
25363 * the given params object.
25364 */
25365 function getRouteParams(route, params) {
25366 var routeParams = {};
25367
25368 if (!route.path) return routeParams;
25369
25370 (0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {
25371 if (Object.prototype.hasOwnProperty.call(params, p)) {
25372 routeParams[p] = params[p];
25373 }
25374 });
25375
25376 return routeParams;
25377 }
25378
25379 exports.default = getRouteParams;
25380 module.exports = exports['default'];
25381
25382/***/ },
25383/* 299 */
25384/***/ function(module, exports, __webpack_require__) {
25385
25386 'use strict';
25387
25388 exports.__esModule = true;
25389
25390 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25391
25392 exports.createRouterObject = createRouterObject;
25393 exports.createRoutingHistory = createRoutingHistory;
25394
25395 var _deprecateObjectProperties = __webpack_require__(263);
25396
25397 var _deprecateObjectProperties2 = _interopRequireDefault(_deprecateObjectProperties);
25398
25399 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25400
25401 function createRouterObject(history, transitionManager) {
25402 return _extends({}, history, {
25403 setRouteLeaveHook: transitionManager.listenBeforeLeavingRoute,
25404 isActive: transitionManager.isActive
25405 });
25406 }
25407
25408 // deprecated
25409 function createRoutingHistory(history, transitionManager) {
25410 history = _extends({}, history, transitionManager);
25411
25412 if ((undefined) !== 'production') {
25413 history = (0, _deprecateObjectProperties2.default)(history, '`props.history` and `context.history` are deprecated. Please use `context.router`. http://tiny.cc/router-contextchanges');
25414 }
25415
25416 return history;
25417 }
25418
25419/***/ },
25420/* 300 */
25421/***/ function(module, exports, __webpack_require__) {
25422
25423 'use strict';
25424
25425 exports.__esModule = true;
25426
25427 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25428
25429 var _react = __webpack_require__(89);
25430
25431 var _react2 = _interopRequireDefault(_react);
25432
25433 var _routerWarning = __webpack_require__(264);
25434
25435 var _routerWarning2 = _interopRequireDefault(_routerWarning);
25436
25437 var _invariant = __webpack_require__(268);
25438
25439 var _invariant2 = _interopRequireDefault(_invariant);
25440
25441 var _PropTypes = __webpack_require__(262);
25442
25443 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25444
25445 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
25446
25447 var _React$PropTypes = _react2.default.PropTypes;
25448 var bool = _React$PropTypes.bool;
25449 var object = _React$PropTypes.object;
25450 var string = _React$PropTypes.string;
25451 var func = _React$PropTypes.func;
25452 var oneOfType = _React$PropTypes.oneOfType;
25453
25454
25455 function isLeftClickEvent(event) {
25456 return event.button === 0;
25457 }
25458
25459 function isModifiedEvent(event) {
25460 return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
25461 }
25462
25463 // TODO: De-duplicate against hasAnyProperties in createTransitionManager.
25464 function isEmptyObject(object) {
25465 for (var p in object) {
25466 if (Object.prototype.hasOwnProperty.call(object, p)) return false;
25467 }return true;
25468 }
25469
25470 function createLocationDescriptor(to, _ref) {
25471 var query = _ref.query;
25472 var hash = _ref.hash;
25473 var state = _ref.state;
25474
25475 if (query || hash || state) {
25476 return { pathname: to, query: query, hash: hash, state: state };
25477 }
25478
25479 return to;
25480 }
25481
25482 /**
25483 * A <Link> is used to create an <a> element that links to a route.
25484 * When that route is active, the link gets the value of its
25485 * activeClassName prop.
25486 *
25487 * For example, assuming you have the following route:
25488 *
25489 * <Route path="/posts/:postID" component={Post} />
25490 *
25491 * You could use the following component to link to that route:
25492 *
25493 * <Link to={`/posts/${post.id}`} />
25494 *
25495 * Links may pass along location state and/or query string parameters
25496 * in the state/query props, respectively.
25497 *
25498 * <Link ... query={{ show: true }} state={{ the: 'state' }} />
25499 */
25500 var Link = _react2.default.createClass({
25501 displayName: 'Link',
25502
25503
25504 contextTypes: {
25505 router: _PropTypes.routerShape
25506 },
25507
25508 propTypes: {
25509 to: oneOfType([string, object]),
25510 query: object,
25511 hash: string,
25512 state: object,
25513 activeStyle: object,
25514 activeClassName: string,
25515 onlyActiveOnIndex: bool.isRequired,
25516 onClick: func,
25517 target: string
25518 },
25519
25520 getDefaultProps: function getDefaultProps() {
25521 return {
25522 onlyActiveOnIndex: false,
25523 style: {}
25524 };
25525 },
25526 handleClick: function handleClick(event) {
25527 if (this.props.onClick) this.props.onClick(event);
25528
25529 if (event.defaultPrevented) return;
25530
25531 !this.context.router ? (undefined) !== 'production' ? (0, _invariant2.default)(false, '<Link>s rendered outside of a router context cannot navigate.') : (0, _invariant2.default)(false) : void 0;
25532
25533 if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;
25534
25535 // If target prop is set (e.g. to "_blank"), let browser handle link.
25536 /* istanbul ignore if: untestable with Karma */
25537 if (this.props.target) return;
25538
25539 event.preventDefault();
25540
25541 var _props = this.props;
25542 var to = _props.to;
25543 var query = _props.query;
25544 var hash = _props.hash;
25545 var state = _props.state;
25546
25547 var location = createLocationDescriptor(to, { query: query, hash: hash, state: state });
25548
25549 this.context.router.push(location);
25550 },
25551 render: function render() {
25552 var _props2 = this.props;
25553 var to = _props2.to;
25554 var query = _props2.query;
25555 var hash = _props2.hash;
25556 var state = _props2.state;
25557 var activeClassName = _props2.activeClassName;
25558 var activeStyle = _props2.activeStyle;
25559 var onlyActiveOnIndex = _props2.onlyActiveOnIndex;
25560
25561 var props = _objectWithoutProperties(_props2, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']);
25562
25563 (undefined) !== 'production' ? (0, _routerWarning2.default)(!(query || hash || state), 'the `query`, `hash`, and `state` props on `<Link>` are deprecated, use `<Link to={{ pathname, query, hash, state }}/>. http://tiny.cc/router-isActivedeprecated') : void 0;
25564
25565 // Ignore if rendered outside the context of router, simplifies unit testing.
25566 var router = this.context.router;
25567
25568
25569 if (router) {
25570 // If user does not specify a `to` prop, return an empty anchor tag.
25571 if (to == null) {
25572 return _react2.default.createElement('a', props);
25573 }
25574
25575 var location = createLocationDescriptor(to, { query: query, hash: hash, state: state });
25576 props.href = router.createHref(location);
25577
25578 if (activeClassName || activeStyle != null && !isEmptyObject(activeStyle)) {
25579 if (router.isActive(location, onlyActiveOnIndex)) {
25580 if (activeClassName) {
25581 if (props.className) {
25582 props.className += ' ' + activeClassName;
25583 } else {
25584 props.className = activeClassName;
25585 }
25586 }
25587
25588 if (activeStyle) props.style = _extends({}, props.style, activeStyle);
25589 }
25590 }
25591 }
25592
25593 return _react2.default.createElement('a', _extends({}, props, { onClick: this.handleClick }));
25594 }
25595 });
25596
25597 exports.default = Link;
25598 module.exports = exports['default'];
25599
25600/***/ },
25601/* 301 */
25602/***/ function(module, exports, __webpack_require__) {
25603
25604 'use strict';
25605
25606 exports.__esModule = true;
25607
25608 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25609
25610 var _react = __webpack_require__(89);
25611
25612 var _react2 = _interopRequireDefault(_react);
25613
25614 var _Link = __webpack_require__(300);
25615
25616 var _Link2 = _interopRequireDefault(_Link);
25617
25618 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25619
25620 /**
25621 * An <IndexLink> is used to link to an <IndexRoute>.
25622 */
25623 var IndexLink = _react2.default.createClass({
25624 displayName: 'IndexLink',
25625 render: function render() {
25626 return _react2.default.createElement(_Link2.default, _extends({}, this.props, { onlyActiveOnIndex: true }));
25627 }
25628 });
25629
25630 exports.default = IndexLink;
25631 module.exports = exports['default'];
25632
25633/***/ },
25634/* 302 */
25635/***/ function(module, exports, __webpack_require__) {
25636
25637 'use strict';
25638
25639 exports.__esModule = true;
25640
25641 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
25642
25643 exports.default = withRouter;
25644
25645 var _invariant = __webpack_require__(268);
25646
25647 var _invariant2 = _interopRequireDefault(_invariant);
25648
25649 var _react = __webpack_require__(89);
25650
25651 var _react2 = _interopRequireDefault(_react);
25652
25653 var _hoistNonReactStatics = __webpack_require__(303);
25654
25655 var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
25656
25657 var _PropTypes = __webpack_require__(262);
25658
25659 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25660
25661 function getDisplayName(WrappedComponent) {
25662 return WrappedComponent.displayName || WrappedComponent.name || 'Component';
25663 }
25664
25665 function withRouter(WrappedComponent, options) {
25666 var withRef = options && options.withRef;
25667
25668 var WithRouter = _react2.default.createClass({
25669 displayName: 'WithRouter',
25670
25671 contextTypes: { router: _PropTypes.routerShape },
25672 propTypes: { router: _PropTypes.routerShape },
25673
25674 getWrappedInstance: function getWrappedInstance() {
25675 !withRef ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'To access the wrapped instance, you need to specify ' + '`{ withRef: true }` as the second argument of the withRouter() call.') : (0, _invariant2.default)(false) : void 0;
25676
25677 return this.wrappedInstance;
25678 },
25679 render: function render() {
25680 var _this = this;
25681
25682 var router = this.props.router || this.context.router;
25683 var props = _extends({}, this.props, { router: router });
25684
25685 if (withRef) {
25686 props.ref = function (c) {
25687 _this.wrappedInstance = c;
25688 };
25689 }
25690
25691 return _react2.default.createElement(WrappedComponent, props);
25692 }
25693 });
25694
25695 WithRouter.displayName = 'withRouter(' + getDisplayName(WrappedComponent) + ')';
25696 WithRouter.WrappedComponent = WrappedComponent;
25697
25698 return (0, _hoistNonReactStatics2.default)(WithRouter, WrappedComponent);
25699 }
25700 module.exports = exports['default'];
25701
25702/***/ },
25703/* 303 */
25704/***/ function(module, exports) {
25705
25706 /**
25707 * Copyright 2015, Yahoo! Inc.
25708 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
25709 */
25710 'use strict';
25711
25712 var REACT_STATICS = {
25713 childContextTypes: true,
25714 contextTypes: true,
25715 defaultProps: true,
25716 displayName: true,
25717 getDefaultProps: true,
25718 mixins: true,
25719 propTypes: true,
25720 type: true
25721 };
25722
25723 var KNOWN_STATICS = {
25724 name: true,
25725 length: true,
25726 prototype: true,
25727 caller: true,
25728 arguments: true,
25729 arity: true
25730 };
25731
25732 var isGetOwnPropertySymbolsAvailable = typeof Object.getOwnPropertySymbols === 'function';
25733
25734 module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, customStatics) {
25735 if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
25736 var keys = Object.getOwnPropertyNames(sourceComponent);
25737
25738 /* istanbul ignore else */
25739 if (isGetOwnPropertySymbolsAvailable) {
25740 keys = keys.concat(Object.getOwnPropertySymbols(sourceComponent));
25741 }
25742
25743 for (var i = 0; i < keys.length; ++i) {
25744 if (!REACT_STATICS[keys[i]] && !KNOWN_STATICS[keys[i]] && (!customStatics || !customStatics[keys[i]])) {
25745 try {
25746 targetComponent[keys[i]] = sourceComponent[keys[i]];
25747 } catch (error) {
25748
25749 }
25750 }
25751 }
25752 }
25753
25754 return targetComponent;
25755 };
25756
25757
25758/***/ },
25759/* 304 */
25760/***/ function(module, exports, __webpack_require__) {
25761
25762 'use strict';
25763
25764 exports.__esModule = true;
25765
25766 var _react = __webpack_require__(89);
25767
25768 var _react2 = _interopRequireDefault(_react);
25769
25770 var _routerWarning = __webpack_require__(264);
25771
25772 var _routerWarning2 = _interopRequireDefault(_routerWarning);
25773
25774 var _invariant = __webpack_require__(268);
25775
25776 var _invariant2 = _interopRequireDefault(_invariant);
25777
25778 var _Redirect = __webpack_require__(305);
25779
25780 var _Redirect2 = _interopRequireDefault(_Redirect);
25781
25782 var _InternalPropTypes = __webpack_require__(266);
25783
25784 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25785
25786 var _React$PropTypes = _react2.default.PropTypes;
25787 var string = _React$PropTypes.string;
25788 var object = _React$PropTypes.object;
25789
25790 /**
25791 * An <IndexRedirect> is used to redirect from an indexRoute.
25792 */
25793
25794 var IndexRedirect = _react2.default.createClass({
25795 displayName: 'IndexRedirect',
25796
25797
25798 statics: {
25799 createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
25800 /* istanbul ignore else: sanity check */
25801 if (parentRoute) {
25802 parentRoute.indexRoute = _Redirect2.default.createRouteFromReactElement(element);
25803 } else {
25804 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'An <IndexRedirect> does not make sense at the root of your route config') : void 0;
25805 }
25806 }
25807 },
25808
25809 propTypes: {
25810 to: string.isRequired,
25811 query: object,
25812 state: object,
25813 onEnter: _InternalPropTypes.falsy,
25814 children: _InternalPropTypes.falsy
25815 },
25816
25817 /* istanbul ignore next: sanity check */
25818 render: function render() {
25819 true ? (undefined) !== 'production' ? (0, _invariant2.default)(false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
25820 }
25821 });
25822
25823 exports.default = IndexRedirect;
25824 module.exports = exports['default'];
25825
25826/***/ },
25827/* 305 */
25828/***/ function(module, exports, __webpack_require__) {
25829
25830 'use strict';
25831
25832 exports.__esModule = true;
25833
25834 var _react = __webpack_require__(89);
25835
25836 var _react2 = _interopRequireDefault(_react);
25837
25838 var _invariant = __webpack_require__(268);
25839
25840 var _invariant2 = _interopRequireDefault(_invariant);
25841
25842 var _RouteUtils = __webpack_require__(261);
25843
25844 var _PatternUtils = __webpack_require__(267);
25845
25846 var _InternalPropTypes = __webpack_require__(266);
25847
25848 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25849
25850 var _React$PropTypes = _react2.default.PropTypes;
25851 var string = _React$PropTypes.string;
25852 var object = _React$PropTypes.object;
25853
25854 /**
25855 * A <Redirect> is used to declare another URL path a client should
25856 * be sent to when they request a given URL.
25857 *
25858 * Redirects are placed alongside routes in the route configuration
25859 * and are traversed in the same manner.
25860 */
25861
25862 var Redirect = _react2.default.createClass({
25863 displayName: 'Redirect',
25864
25865
25866 statics: {
25867 createRouteFromReactElement: function createRouteFromReactElement(element) {
25868 var route = (0, _RouteUtils.createRouteFromReactElement)(element);
25869
25870 if (route.from) route.path = route.from;
25871
25872 route.onEnter = function (nextState, replace) {
25873 var location = nextState.location;
25874 var params = nextState.params;
25875
25876
25877 var pathname = void 0;
25878 if (route.to.charAt(0) === '/') {
25879 pathname = (0, _PatternUtils.formatPattern)(route.to, params);
25880 } else if (!route.to) {
25881 pathname = location.pathname;
25882 } else {
25883 var routeIndex = nextState.routes.indexOf(route);
25884 var parentPattern = Redirect.getRoutePattern(nextState.routes, routeIndex - 1);
25885 var pattern = parentPattern.replace(/\/*$/, '/') + route.to;
25886 pathname = (0, _PatternUtils.formatPattern)(pattern, params);
25887 }
25888
25889 replace({
25890 pathname: pathname,
25891 query: route.query || location.query,
25892 state: route.state || location.state
25893 });
25894 };
25895
25896 return route;
25897 },
25898 getRoutePattern: function getRoutePattern(routes, routeIndex) {
25899 var parentPattern = '';
25900
25901 for (var i = routeIndex; i >= 0; i--) {
25902 var route = routes[i];
25903 var pattern = route.path || '';
25904
25905 parentPattern = pattern.replace(/\/*$/, '/') + parentPattern;
25906
25907 if (pattern.indexOf('/') === 0) break;
25908 }
25909
25910 return '/' + parentPattern;
25911 }
25912 },
25913
25914 propTypes: {
25915 path: string,
25916 from: string, // Alias for path
25917 to: string.isRequired,
25918 query: object,
25919 state: object,
25920 onEnter: _InternalPropTypes.falsy,
25921 children: _InternalPropTypes.falsy
25922 },
25923
25924 /* istanbul ignore next: sanity check */
25925 render: function render() {
25926 true ? (undefined) !== 'production' ? (0, _invariant2.default)(false, '<Redirect> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
25927 }
25928 });
25929
25930 exports.default = Redirect;
25931 module.exports = exports['default'];
25932
25933/***/ },
25934/* 306 */
25935/***/ function(module, exports, __webpack_require__) {
25936
25937 'use strict';
25938
25939 exports.__esModule = true;
25940
25941 var _react = __webpack_require__(89);
25942
25943 var _react2 = _interopRequireDefault(_react);
25944
25945 var _routerWarning = __webpack_require__(264);
25946
25947 var _routerWarning2 = _interopRequireDefault(_routerWarning);
25948
25949 var _invariant = __webpack_require__(268);
25950
25951 var _invariant2 = _interopRequireDefault(_invariant);
25952
25953 var _RouteUtils = __webpack_require__(261);
25954
25955 var _InternalPropTypes = __webpack_require__(266);
25956
25957 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25958
25959 var func = _react2.default.PropTypes.func;
25960
25961 /**
25962 * An <IndexRoute> is used to specify its parent's <Route indexRoute> in
25963 * a JSX route config.
25964 */
25965
25966 var IndexRoute = _react2.default.createClass({
25967 displayName: 'IndexRoute',
25968
25969
25970 statics: {
25971 createRouteFromReactElement: function createRouteFromReactElement(element, parentRoute) {
25972 /* istanbul ignore else: sanity check */
25973 if (parentRoute) {
25974 parentRoute.indexRoute = (0, _RouteUtils.createRouteFromReactElement)(element);
25975 } else {
25976 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'An <IndexRoute> does not make sense at the root of your route config') : void 0;
25977 }
25978 }
25979 },
25980
25981 propTypes: {
25982 path: _InternalPropTypes.falsy,
25983 component: _InternalPropTypes.component,
25984 components: _InternalPropTypes.components,
25985 getComponent: func,
25986 getComponents: func
25987 },
25988
25989 /* istanbul ignore next: sanity check */
25990 render: function render() {
25991 true ? (undefined) !== 'production' ? (0, _invariant2.default)(false, '<IndexRoute> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
25992 }
25993 });
25994
25995 exports.default = IndexRoute;
25996 module.exports = exports['default'];
25997
25998/***/ },
25999/* 307 */
26000/***/ function(module, exports, __webpack_require__) {
26001
26002 'use strict';
26003
26004 exports.__esModule = true;
26005
26006 var _react = __webpack_require__(89);
26007
26008 var _react2 = _interopRequireDefault(_react);
26009
26010 var _invariant = __webpack_require__(268);
26011
26012 var _invariant2 = _interopRequireDefault(_invariant);
26013
26014 var _RouteUtils = __webpack_require__(261);
26015
26016 var _InternalPropTypes = __webpack_require__(266);
26017
26018 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26019
26020 var _React$PropTypes = _react2.default.PropTypes;
26021 var string = _React$PropTypes.string;
26022 var func = _React$PropTypes.func;
26023
26024 /**
26025 * A <Route> is used to declare which components are rendered to the
26026 * page when the URL matches a given pattern.
26027 *
26028 * Routes are arranged in a nested tree structure. When a new URL is
26029 * requested, the tree is searched depth-first to find a route whose
26030 * path matches the URL. When one is found, all routes in the tree
26031 * that lead to it are considered "active" and their components are
26032 * rendered into the DOM, nested in the same order as in the tree.
26033 */
26034
26035 var Route = _react2.default.createClass({
26036 displayName: 'Route',
26037
26038
26039 statics: {
26040 createRouteFromReactElement: _RouteUtils.createRouteFromReactElement
26041 },
26042
26043 propTypes: {
26044 path: string,
26045 component: _InternalPropTypes.component,
26046 components: _InternalPropTypes.components,
26047 getComponent: func,
26048 getComponents: func
26049 },
26050
26051 /* istanbul ignore next: sanity check */
26052 render: function render() {
26053 true ? (undefined) !== 'production' ? (0, _invariant2.default)(false, '<Route> elements are for router configuration only and should not be rendered') : (0, _invariant2.default)(false) : void 0;
26054 }
26055 });
26056
26057 exports.default = Route;
26058 module.exports = exports['default'];
26059
26060/***/ },
26061/* 308 */
26062/***/ function(module, exports, __webpack_require__) {
26063
26064 'use strict';
26065
26066 exports.__esModule = true;
26067
26068 var _routerWarning = __webpack_require__(264);
26069
26070 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26071
26072 var _InternalPropTypes = __webpack_require__(266);
26073
26074 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26075
26076 /**
26077 * A mixin that adds the "history" instance variable to components.
26078 */
26079 var History = {
26080
26081 contextTypes: {
26082 history: _InternalPropTypes.history
26083 },
26084
26085 componentWillMount: function componentWillMount() {
26086 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://tiny.cc/router-historymixin') : void 0;
26087 this.history = this.context.history;
26088 }
26089 };
26090
26091 exports.default = History;
26092 module.exports = exports['default'];
26093
26094/***/ },
26095/* 309 */
26096/***/ function(module, exports, __webpack_require__) {
26097
26098 'use strict';
26099
26100 exports.__esModule = true;
26101
26102 var _routerWarning = __webpack_require__(264);
26103
26104 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26105
26106 var _react = __webpack_require__(89);
26107
26108 var _react2 = _interopRequireDefault(_react);
26109
26110 var _invariant = __webpack_require__(268);
26111
26112 var _invariant2 = _interopRequireDefault(_invariant);
26113
26114 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26115
26116 var object = _react2.default.PropTypes.object;
26117
26118 /**
26119 * The Lifecycle mixin adds the routerWillLeave lifecycle method to a
26120 * component that may be used to cancel a transition or prompt the user
26121 * for confirmation.
26122 *
26123 * On standard transitions, routerWillLeave receives a single argument: the
26124 * location we're transitioning to. To cancel the transition, return false.
26125 * To prompt the user for confirmation, return a prompt message (string).
26126 *
26127 * During the beforeunload event (assuming you're using the useBeforeUnload
26128 * history enhancer), routerWillLeave does not receive a location object
26129 * because it isn't possible for us to know the location we're transitioning
26130 * to. In this case routerWillLeave must return a prompt message to prevent
26131 * the user from closing the window/tab.
26132 */
26133
26134 var Lifecycle = {
26135
26136 contextTypes: {
26137 history: object.isRequired,
26138 // Nested children receive the route as context, either
26139 // set by the route component using the RouteContext mixin
26140 // or by some other ancestor.
26141 route: object
26142 },
26143
26144 propTypes: {
26145 // Route components receive the route object as a prop.
26146 route: object
26147 },
26148
26149 componentDidMount: function componentDidMount() {
26150 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`. http://tiny.cc/router-lifecyclemixin') : void 0;
26151 !this.routerWillLeave ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'The Lifecycle mixin requires you to define a routerWillLeave method') : (0, _invariant2.default)(false) : void 0;
26152
26153 var route = this.props.route || this.context.route;
26154
26155 !route ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'The Lifecycle mixin must be used on either a) a <Route component> or ' + 'b) a descendant of a <Route component> that uses the RouteContext mixin') : (0, _invariant2.default)(false) : void 0;
26156
26157 this._unlistenBeforeLeavingRoute = this.context.history.listenBeforeLeavingRoute(route, this.routerWillLeave);
26158 },
26159 componentWillUnmount: function componentWillUnmount() {
26160 if (this._unlistenBeforeLeavingRoute) this._unlistenBeforeLeavingRoute();
26161 }
26162 };
26163
26164 exports.default = Lifecycle;
26165 module.exports = exports['default'];
26166
26167/***/ },
26168/* 310 */
26169/***/ function(module, exports, __webpack_require__) {
26170
26171 'use strict';
26172
26173 exports.__esModule = true;
26174
26175 var _routerWarning = __webpack_require__(264);
26176
26177 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26178
26179 var _react = __webpack_require__(89);
26180
26181 var _react2 = _interopRequireDefault(_react);
26182
26183 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26184
26185 var object = _react2.default.PropTypes.object;
26186
26187 /**
26188 * The RouteContext mixin provides a convenient way for route
26189 * components to set the route in context. This is needed for
26190 * routes that render elements that want to use the Lifecycle
26191 * mixin to prevent transitions.
26192 */
26193
26194 var RouteContext = {
26195
26196 propTypes: {
26197 route: object.isRequired
26198 },
26199
26200 childContextTypes: {
26201 route: object.isRequired
26202 },
26203
26204 getChildContext: function getChildContext() {
26205 return {
26206 route: this.props.route
26207 };
26208 },
26209 componentWillMount: function componentWillMount() {
26210 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, 'The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. http://tiny.cc/router-routecontextmixin') : void 0;
26211 }
26212 };
26213
26214 exports.default = RouteContext;
26215 module.exports = exports['default'];
26216
26217/***/ },
26218/* 311 */
26219/***/ function(module, exports, __webpack_require__) {
26220
26221 'use strict';
26222
26223 exports.__esModule = true;
26224
26225 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26226
26227 var _useQueries = __webpack_require__(286);
26228
26229 var _useQueries2 = _interopRequireDefault(_useQueries);
26230
26231 var _createTransitionManager = __webpack_require__(289);
26232
26233 var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
26234
26235 var _routerWarning = __webpack_require__(264);
26236
26237 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26238
26239 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26240
26241 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
26242
26243 /**
26244 * Returns a new createHistory function that may be used to create
26245 * history objects that know about routing.
26246 *
26247 * Enhances history objects with the following methods:
26248 *
26249 * - listen((error, nextState) => {})
26250 * - listenBeforeLeavingRoute(route, (nextLocation) => {})
26251 * - match(location, (error, redirectLocation, nextState) => {})
26252 * - isActive(pathname, query, indexOnly=false)
26253 */
26254 function useRoutes(createHistory) {
26255 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`useRoutes` is deprecated. Please use `createTransitionManager` instead.') : void 0;
26256
26257 return function () {
26258 var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
26259
26260 var routes = _ref.routes;
26261
26262 var options = _objectWithoutProperties(_ref, ['routes']);
26263
26264 var history = (0, _useQueries2.default)(createHistory)(options);
26265 var transitionManager = (0, _createTransitionManager2.default)(history, routes);
26266 return _extends({}, history, transitionManager);
26267 };
26268 }
26269
26270 exports.default = useRoutes;
26271 module.exports = exports['default'];
26272
26273/***/ },
26274/* 312 */
26275/***/ function(module, exports, __webpack_require__) {
26276
26277 'use strict';
26278
26279 exports.__esModule = true;
26280
26281 var _react = __webpack_require__(89);
26282
26283 var _react2 = _interopRequireDefault(_react);
26284
26285 var _RouterContext = __webpack_require__(297);
26286
26287 var _RouterContext2 = _interopRequireDefault(_RouterContext);
26288
26289 var _routerWarning = __webpack_require__(264);
26290
26291 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26292
26293 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26294
26295 var RoutingContext = _react2.default.createClass({
26296 displayName: 'RoutingContext',
26297 componentWillMount: function componentWillMount() {
26298 (undefined) !== 'production' ? (0, _routerWarning2.default)(false, '`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from \'react-router\'`. http://tiny.cc/router-routercontext') : void 0;
26299 },
26300 render: function render() {
26301 return _react2.default.createElement(_RouterContext2.default, this.props);
26302 }
26303 });
26304
26305 exports.default = RoutingContext;
26306 module.exports = exports['default'];
26307
26308/***/ },
26309/* 313 */
26310/***/ function(module, exports, __webpack_require__) {
26311
26312 'use strict';
26313
26314 exports.__esModule = true;
26315
26316 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26317
26318 var _Actions = __webpack_require__(272);
26319
26320 var _invariant = __webpack_require__(268);
26321
26322 var _invariant2 = _interopRequireDefault(_invariant);
26323
26324 var _createMemoryHistory = __webpack_require__(314);
26325
26326 var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
26327
26328 var _createTransitionManager = __webpack_require__(289);
26329
26330 var _createTransitionManager2 = _interopRequireDefault(_createTransitionManager);
26331
26332 var _RouteUtils = __webpack_require__(261);
26333
26334 var _RouterUtils = __webpack_require__(299);
26335
26336 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26337
26338 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
26339
26340 /**
26341 * A high-level API to be used for server-side rendering.
26342 *
26343 * This function matches a location to a set of routes and calls
26344 * callback(error, redirectLocation, renderProps) when finished.
26345 *
26346 * Note: You probably don't want to use this in a browser unless you're using
26347 * server-side rendering with async routes.
26348 */
26349 function match(_ref, callback) {
26350 var history = _ref.history;
26351 var routes = _ref.routes;
26352 var location = _ref.location;
26353
26354 var options = _objectWithoutProperties(_ref, ['history', 'routes', 'location']);
26355
26356 !(history || location) ? (undefined) !== 'production' ? (0, _invariant2.default)(false, 'match needs a history or a location') : (0, _invariant2.default)(false) : void 0;
26357
26358 history = history ? history : (0, _createMemoryHistory2.default)(options);
26359 var transitionManager = (0, _createTransitionManager2.default)(history, (0, _RouteUtils.createRoutes)(routes));
26360
26361 var unlisten = void 0;
26362
26363 if (location) {
26364 // Allow match({ location: '/the/path', ... })
26365 location = history.createLocation(location);
26366 } else {
26367 // Pick up the location from the history via synchronous history.listen
26368 // call if needed.
26369 unlisten = history.listen(function (historyLocation) {
26370 location = historyLocation;
26371 });
26372 }
26373
26374 var router = (0, _RouterUtils.createRouterObject)(history, transitionManager);
26375 history = (0, _RouterUtils.createRoutingHistory)(history, transitionManager);
26376
26377 transitionManager.match(location, function (error, redirectLocation, nextState) {
26378 callback(error, redirectLocation && router.createLocation(redirectLocation, _Actions.REPLACE), nextState && _extends({}, nextState, {
26379 history: history,
26380 router: router,
26381 matchContext: { history: history, transitionManager: transitionManager, router: router }
26382 }));
26383
26384 // Defer removing the listener to here to prevent DOM histories from having
26385 // to unwind DOM event listeners unnecessarily, in case callback renders a
26386 // <Router> and attaches another history listener.
26387 if (unlisten) {
26388 unlisten();
26389 }
26390 });
26391 }
26392
26393 exports.default = match;
26394 module.exports = exports['default'];
26395
26396/***/ },
26397/* 314 */
26398/***/ function(module, exports, __webpack_require__) {
26399
26400 'use strict';
26401
26402 exports.__esModule = true;
26403 exports.default = createMemoryHistory;
26404
26405 var _useQueries = __webpack_require__(286);
26406
26407 var _useQueries2 = _interopRequireDefault(_useQueries);
26408
26409 var _useBasename = __webpack_require__(315);
26410
26411 var _useBasename2 = _interopRequireDefault(_useBasename);
26412
26413 var _createMemoryHistory = __webpack_require__(316);
26414
26415 var _createMemoryHistory2 = _interopRequireDefault(_createMemoryHistory);
26416
26417 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26418
26419 function createMemoryHistory(options) {
26420 // signatures and type checking differ between `useRoutes` and
26421 // `createMemoryHistory`, have to create `memoryHistory` first because
26422 // `useQueries` doesn't understand the signature
26423 var memoryHistory = (0, _createMemoryHistory2.default)(options);
26424 var createHistory = function createHistory() {
26425 return memoryHistory;
26426 };
26427 var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);
26428 history.__v2_compatible__ = true;
26429 return history;
26430 }
26431 module.exports = exports['default'];
26432
26433/***/ },
26434/* 315 */
26435/***/ function(module, exports, __webpack_require__) {
26436
26437 'use strict';
26438
26439 exports.__esModule = true;
26440
26441 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26442
26443 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26444
26445 var _warning = __webpack_require__(271);
26446
26447 var _warning2 = _interopRequireDefault(_warning);
26448
26449 var _ExecutionEnvironment = __webpack_require__(274);
26450
26451 var _PathUtils = __webpack_require__(273);
26452
26453 var _runTransitionHook = __webpack_require__(284);
26454
26455 var _runTransitionHook2 = _interopRequireDefault(_runTransitionHook);
26456
26457 var _deprecate = __webpack_require__(285);
26458
26459 var _deprecate2 = _interopRequireDefault(_deprecate);
26460
26461 function useBasename(createHistory) {
26462 return function () {
26463 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
26464
26465 var history = createHistory(options);
26466
26467 var basename = options.basename;
26468
26469 var checkedBaseHref = false;
26470
26471 function checkBaseHref() {
26472 if (checkedBaseHref) {
26473 return;
26474 }
26475
26476 // Automatically use the value of <base href> in HTML
26477 // documents as basename if it's not explicitly given.
26478 if (basename == null && _ExecutionEnvironment.canUseDOM) {
26479 var base = document.getElementsByTagName('base')[0];
26480 var baseHref = base && base.getAttribute('href');
26481
26482 if (baseHref != null) {
26483 basename = baseHref;
26484
26485 (undefined) !== 'production' ? _warning2['default'](false, 'Automatically setting basename using <base href> is deprecated and will ' + 'be removed in the next major release. The semantics of <base href> are ' + 'subtly different from basename. Please pass the basename explicitly in ' + 'the options to createHistory') : undefined;
26486 }
26487 }
26488
26489 checkedBaseHref = true;
26490 }
26491
26492 function addBasename(location) {
26493 checkBaseHref();
26494
26495 if (basename && location.basename == null) {
26496 if (location.pathname.indexOf(basename) === 0) {
26497 location.pathname = location.pathname.substring(basename.length);
26498 location.basename = basename;
26499
26500 if (location.pathname === '') location.pathname = '/';
26501 } else {
26502 location.basename = '';
26503 }
26504 }
26505
26506 return location;
26507 }
26508
26509 function prependBasename(location) {
26510 checkBaseHref();
26511
26512 if (!basename) return location;
26513
26514 if (typeof location === 'string') location = _PathUtils.parsePath(location);
26515
26516 var pname = location.pathname;
26517 var normalizedBasename = basename.slice(-1) === '/' ? basename : basename + '/';
26518 var normalizedPathname = pname.charAt(0) === '/' ? pname.slice(1) : pname;
26519 var pathname = normalizedBasename + normalizedPathname;
26520
26521 return _extends({}, location, {
26522 pathname: pathname
26523 });
26524 }
26525
26526 // Override all read methods with basename-aware versions.
26527 function listenBefore(hook) {
26528 return history.listenBefore(function (location, callback) {
26529 _runTransitionHook2['default'](hook, addBasename(location), callback);
26530 });
26531 }
26532
26533 function listen(listener) {
26534 return history.listen(function (location) {
26535 listener(addBasename(location));
26536 });
26537 }
26538
26539 // Override all write methods with basename-aware versions.
26540 function push(location) {
26541 history.push(prependBasename(location));
26542 }
26543
26544 function replace(location) {
26545 history.replace(prependBasename(location));
26546 }
26547
26548 function createPath(location) {
26549 return history.createPath(prependBasename(location));
26550 }
26551
26552 function createHref(location) {
26553 return history.createHref(prependBasename(location));
26554 }
26555
26556 function createLocation(location) {
26557 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
26558 args[_key - 1] = arguments[_key];
26559 }
26560
26561 return addBasename(history.createLocation.apply(history, [prependBasename(location)].concat(args)));
26562 }
26563
26564 // deprecated
26565 function pushState(state, path) {
26566 if (typeof path === 'string') path = _PathUtils.parsePath(path);
26567
26568 push(_extends({ state: state }, path));
26569 }
26570
26571 // deprecated
26572 function replaceState(state, path) {
26573 if (typeof path === 'string') path = _PathUtils.parsePath(path);
26574
26575 replace(_extends({ state: state }, path));
26576 }
26577
26578 return _extends({}, history, {
26579 listenBefore: listenBefore,
26580 listen: listen,
26581 push: push,
26582 replace: replace,
26583 createPath: createPath,
26584 createHref: createHref,
26585 createLocation: createLocation,
26586
26587 pushState: _deprecate2['default'](pushState, 'pushState is deprecated; use push instead'),
26588 replaceState: _deprecate2['default'](replaceState, 'replaceState is deprecated; use replace instead')
26589 });
26590 };
26591 }
26592
26593 exports['default'] = useBasename;
26594 module.exports = exports['default'];
26595
26596/***/ },
26597/* 316 */
26598/***/ function(module, exports, __webpack_require__) {
26599
26600 'use strict';
26601
26602 exports.__esModule = true;
26603
26604 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26605
26606 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26607
26608 var _warning = __webpack_require__(271);
26609
26610 var _warning2 = _interopRequireDefault(_warning);
26611
26612 var _invariant = __webpack_require__(268);
26613
26614 var _invariant2 = _interopRequireDefault(_invariant);
26615
26616 var _PathUtils = __webpack_require__(273);
26617
26618 var _Actions = __webpack_require__(272);
26619
26620 var _createHistory = __webpack_require__(278);
26621
26622 var _createHistory2 = _interopRequireDefault(_createHistory);
26623
26624 function createStateStorage(entries) {
26625 return entries.filter(function (entry) {
26626 return entry.state;
26627 }).reduce(function (memo, entry) {
26628 memo[entry.key] = entry.state;
26629 return memo;
26630 }, {});
26631 }
26632
26633 function createMemoryHistory() {
26634 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
26635
26636 if (Array.isArray(options)) {
26637 options = { entries: options };
26638 } else if (typeof options === 'string') {
26639 options = { entries: [options] };
26640 }
26641
26642 var history = _createHistory2['default'](_extends({}, options, {
26643 getCurrentLocation: getCurrentLocation,
26644 finishTransition: finishTransition,
26645 saveState: saveState,
26646 go: go
26647 }));
26648
26649 var _options = options;
26650 var entries = _options.entries;
26651 var current = _options.current;
26652
26653 if (typeof entries === 'string') {
26654 entries = [entries];
26655 } else if (!Array.isArray(entries)) {
26656 entries = ['/'];
26657 }
26658
26659 entries = entries.map(function (entry) {
26660 var key = history.createKey();
26661
26662 if (typeof entry === 'string') return { pathname: entry, key: key };
26663
26664 if (typeof entry === 'object' && entry) return _extends({}, entry, { key: key });
26665
26666 true ? (undefined) !== 'production' ? _invariant2['default'](false, 'Unable to create history entry from %s', entry) : _invariant2['default'](false) : undefined;
26667 });
26668
26669 if (current == null) {
26670 current = entries.length - 1;
26671 } else {
26672 !(current >= 0 && current < entries.length) ? (undefined) !== 'production' ? _invariant2['default'](false, 'Current index must be >= 0 and < %s, was %s', entries.length, current) : _invariant2['default'](false) : undefined;
26673 }
26674
26675 var storage = createStateStorage(entries);
26676
26677 function saveState(key, state) {
26678 storage[key] = state;
26679 }
26680
26681 function readState(key) {
26682 return storage[key];
26683 }
26684
26685 function getCurrentLocation() {
26686 var entry = entries[current];
26687 var basename = entry.basename;
26688 var pathname = entry.pathname;
26689 var search = entry.search;
26690
26691 var path = (basename || '') + pathname + (search || '');
26692
26693 var key = undefined,
26694 state = undefined;
26695 if (entry.key) {
26696 key = entry.key;
26697 state = readState(key);
26698 } else {
26699 key = history.createKey();
26700 state = null;
26701 entry.key = key;
26702 }
26703
26704 var location = _PathUtils.parsePath(path);
26705
26706 return history.createLocation(_extends({}, location, { state: state }), undefined, key);
26707 }
26708
26709 function canGo(n) {
26710 var index = current + n;
26711 return index >= 0 && index < entries.length;
26712 }
26713
26714 function go(n) {
26715 if (n) {
26716 if (!canGo(n)) {
26717 (undefined) !== 'production' ? _warning2['default'](false, 'Cannot go(%s) there is not enough history', n) : undefined;
26718 return;
26719 }
26720
26721 current += n;
26722
26723 var currentLocation = getCurrentLocation();
26724
26725 // change action to POP
26726 history.transitionTo(_extends({}, currentLocation, { action: _Actions.POP }));
26727 }
26728 }
26729
26730 function finishTransition(location) {
26731 switch (location.action) {
26732 case _Actions.PUSH:
26733 current += 1;
26734
26735 // if we are not on the top of stack
26736 // remove rest and push new
26737 if (current < entries.length) entries.splice(current);
26738
26739 entries.push(location);
26740 saveState(location.key, location.state);
26741 break;
26742 case _Actions.REPLACE:
26743 entries[current] = location;
26744 saveState(location.key, location.state);
26745 break;
26746 }
26747 }
26748
26749 return history;
26750 }
26751
26752 exports['default'] = createMemoryHistory;
26753 module.exports = exports['default'];
26754
26755/***/ },
26756/* 317 */
26757/***/ function(module, exports, __webpack_require__) {
26758
26759 'use strict';
26760
26761 exports.__esModule = true;
26762 exports.default = useRouterHistory;
26763
26764 var _useQueries = __webpack_require__(286);
26765
26766 var _useQueries2 = _interopRequireDefault(_useQueries);
26767
26768 var _useBasename = __webpack_require__(315);
26769
26770 var _useBasename2 = _interopRequireDefault(_useBasename);
26771
26772 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26773
26774 function useRouterHistory(createHistory) {
26775 return function (options) {
26776 var history = (0, _useQueries2.default)((0, _useBasename2.default)(createHistory))(options);
26777 history.__v2_compatible__ = true;
26778 return history;
26779 };
26780 }
26781 module.exports = exports['default'];
26782
26783/***/ },
26784/* 318 */
26785/***/ function(module, exports, __webpack_require__) {
26786
26787 'use strict';
26788
26789 exports.__esModule = true;
26790
26791 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26792
26793 var _react = __webpack_require__(89);
26794
26795 var _react2 = _interopRequireDefault(_react);
26796
26797 var _RouterContext = __webpack_require__(297);
26798
26799 var _RouterContext2 = _interopRequireDefault(_RouterContext);
26800
26801 var _routerWarning = __webpack_require__(264);
26802
26803 var _routerWarning2 = _interopRequireDefault(_routerWarning);
26804
26805 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26806
26807 exports.default = function () {
26808 for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
26809 middlewares[_key] = arguments[_key];
26810 }
26811
26812 if ((undefined) !== 'production') {
26813 middlewares.forEach(function (middleware, index) {
26814 (undefined) !== 'production' ? (0, _routerWarning2.default)(middleware.renderRouterContext || middleware.renderRouteComponent, 'The middleware specified at index ' + index + ' does not appear to be ' + 'a valid React Router middleware.') : void 0;
26815 });
26816 }
26817
26818 var withContext = middlewares.map(function (middleware) {
26819 return middleware.renderRouterContext;
26820 }).filter(Boolean);
26821 var withComponent = middlewares.map(function (middleware) {
26822 return middleware.renderRouteComponent;
26823 }).filter(Boolean);
26824
26825 var makeCreateElement = function makeCreateElement() {
26826 var baseCreateElement = arguments.length <= 0 || arguments[0] === undefined ? _react.createElement : arguments[0];
26827 return function (Component, props) {
26828 return withComponent.reduceRight(function (previous, renderRouteComponent) {
26829 return renderRouteComponent(previous, props);
26830 }, baseCreateElement(Component, props));
26831 };
26832 };
26833
26834 return function (renderProps) {
26835 return withContext.reduceRight(function (previous, renderRouterContext) {
26836 return renderRouterContext(previous, renderProps);
26837 }, _react2.default.createElement(_RouterContext2.default, _extends({}, renderProps, {
26838 createElement: makeCreateElement(renderProps.createElement)
26839 })));
26840 };
26841 };
26842
26843 module.exports = exports['default'];
26844
26845/***/ },
26846/* 319 */
26847/***/ function(module, exports, __webpack_require__) {
26848
26849 'use strict';
26850
26851 exports.__esModule = true;
26852
26853 var _createBrowserHistory = __webpack_require__(320);
26854
26855 var _createBrowserHistory2 = _interopRequireDefault(_createBrowserHistory);
26856
26857 var _createRouterHistory = __webpack_require__(321);
26858
26859 var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
26860
26861 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26862
26863 exports.default = (0, _createRouterHistory2.default)(_createBrowserHistory2.default);
26864 module.exports = exports['default'];
26865
26866/***/ },
26867/* 320 */
26868/***/ function(module, exports, __webpack_require__) {
26869
26870 'use strict';
26871
26872 exports.__esModule = true;
26873
26874 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
26875
26876 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
26877
26878 var _invariant = __webpack_require__(268);
26879
26880 var _invariant2 = _interopRequireDefault(_invariant);
26881
26882 var _Actions = __webpack_require__(272);
26883
26884 var _PathUtils = __webpack_require__(273);
26885
26886 var _ExecutionEnvironment = __webpack_require__(274);
26887
26888 var _DOMUtils = __webpack_require__(275);
26889
26890 var _DOMStateStorage = __webpack_require__(276);
26891
26892 var _createDOMHistory = __webpack_require__(277);
26893
26894 var _createDOMHistory2 = _interopRequireDefault(_createDOMHistory);
26895
26896 /**
26897 * Creates and returns a history object that uses HTML5's history API
26898 * (pushState, replaceState, and the popstate event) to manage history.
26899 * This is the recommended method of managing history in browsers because
26900 * it provides the cleanest URLs.
26901 *
26902 * Note: In browsers that do not support the HTML5 history API full
26903 * page reloads will be used to preserve URLs.
26904 */
26905 function createBrowserHistory() {
26906 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
26907
26908 !_ExecutionEnvironment.canUseDOM ? (undefined) !== 'production' ? _invariant2['default'](false, 'Browser history needs a DOM') : _invariant2['default'](false) : undefined;
26909
26910 var forceRefresh = options.forceRefresh;
26911
26912 var isSupported = _DOMUtils.supportsHistory();
26913 var useRefresh = !isSupported || forceRefresh;
26914
26915 function getCurrentLocation(historyState) {
26916 try {
26917 historyState = historyState || window.history.state || {};
26918 } catch (e) {
26919 historyState = {};
26920 }
26921
26922 var path = _DOMUtils.getWindowPath();
26923 var _historyState = historyState;
26924 var key = _historyState.key;
26925
26926 var state = undefined;
26927 if (key) {
26928 state = _DOMStateStorage.readState(key);
26929 } else {
26930 state = null;
26931 key = history.createKey();
26932
26933 if (isSupported) window.history.replaceState(_extends({}, historyState, { key: key }), null);
26934 }
26935
26936 var location = _PathUtils.parsePath(path);
26937
26938 return history.createLocation(_extends({}, location, { state: state }), undefined, key);
26939 }
26940
26941 function startPopStateListener(_ref) {
26942 var transitionTo = _ref.transitionTo;
26943
26944 function popStateListener(event) {
26945 if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.
26946
26947 transitionTo(getCurrentLocation(event.state));
26948 }
26949
26950 _DOMUtils.addEventListener(window, 'popstate', popStateListener);
26951
26952 return function () {
26953 _DOMUtils.removeEventListener(window, 'popstate', popStateListener);
26954 };
26955 }
26956
26957 function finishTransition(location) {
26958 var basename = location.basename;
26959 var pathname = location.pathname;
26960 var search = location.search;
26961 var hash = location.hash;
26962 var state = location.state;
26963 var action = location.action;
26964 var key = location.key;
26965
26966 if (action === _Actions.POP) return; // Nothing to do.
26967
26968 _DOMStateStorage.saveState(key, state);
26969
26970 var path = (basename || '') + pathname + search + hash;
26971 var historyState = {
26972 key: key
26973 };
26974
26975 if (action === _Actions.PUSH) {
26976 if (useRefresh) {
26977 window.location.href = path;
26978 return false; // Prevent location update.
26979 } else {
26980 window.history.pushState(historyState, null, path);
26981 }
26982 } else {
26983 // REPLACE
26984 if (useRefresh) {
26985 window.location.replace(path);
26986 return false; // Prevent location update.
26987 } else {
26988 window.history.replaceState(historyState, null, path);
26989 }
26990 }
26991 }
26992
26993 var history = _createDOMHistory2['default'](_extends({}, options, {
26994 getCurrentLocation: getCurrentLocation,
26995 finishTransition: finishTransition,
26996 saveState: _DOMStateStorage.saveState
26997 }));
26998
26999 var listenerCount = 0,
27000 stopPopStateListener = undefined;
27001
27002 function listenBefore(listener) {
27003 if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);
27004
27005 var unlisten = history.listenBefore(listener);
27006
27007 return function () {
27008 unlisten();
27009
27010 if (--listenerCount === 0) stopPopStateListener();
27011 };
27012 }
27013
27014 function listen(listener) {
27015 if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);
27016
27017 var unlisten = history.listen(listener);
27018
27019 return function () {
27020 unlisten();
27021
27022 if (--listenerCount === 0) stopPopStateListener();
27023 };
27024 }
27025
27026 // deprecated
27027 function registerTransitionHook(hook) {
27028 if (++listenerCount === 1) stopPopStateListener = startPopStateListener(history);
27029
27030 history.registerTransitionHook(hook);
27031 }
27032
27033 // deprecated
27034 function unregisterTransitionHook(hook) {
27035 history.unregisterTransitionHook(hook);
27036
27037 if (--listenerCount === 0) stopPopStateListener();
27038 }
27039
27040 return _extends({}, history, {
27041 listenBefore: listenBefore,
27042 listen: listen,
27043 registerTransitionHook: registerTransitionHook,
27044 unregisterTransitionHook: unregisterTransitionHook
27045 });
27046 }
27047
27048 exports['default'] = createBrowserHistory;
27049 module.exports = exports['default'];
27050
27051/***/ },
27052/* 321 */
27053/***/ function(module, exports, __webpack_require__) {
27054
27055 'use strict';
27056
27057 exports.__esModule = true;
27058
27059 exports.default = function (createHistory) {
27060 var history = void 0;
27061 if (canUseDOM) history = (0, _useRouterHistory2.default)(createHistory)();
27062 return history;
27063 };
27064
27065 var _useRouterHistory = __webpack_require__(317);
27066
27067 var _useRouterHistory2 = _interopRequireDefault(_useRouterHistory);
27068
27069 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27070
27071 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
27072
27073 module.exports = exports['default'];
27074
27075/***/ },
27076/* 322 */
27077/***/ function(module, exports, __webpack_require__) {
27078
27079 'use strict';
27080
27081 exports.__esModule = true;
27082
27083 var _createHashHistory = __webpack_require__(270);
27084
27085 var _createHashHistory2 = _interopRequireDefault(_createHashHistory);
27086
27087 var _createRouterHistory = __webpack_require__(321);
27088
27089 var _createRouterHistory2 = _interopRequireDefault(_createRouterHistory);
27090
27091 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27092
27093 exports.default = (0, _createRouterHistory2.default)(_createHashHistory2.default);
27094 module.exports = exports['default'];
27095
27096/***/ },
27097/* 323 */,
27098/* 324 */,
27099/* 325 */
27100/***/ function(module, exports, __webpack_require__) {
27101
27102 'use strict';
27103
27104 Object.defineProperty(exports, "__esModule", {
27105 value: true
27106 });
27107
27108 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; }; }();
27109
27110 var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
27111
27112 var _baseClient = __webpack_require__(326);
27113
27114 var _baseClient2 = _interopRequireDefault(_baseClient);
27115
27116 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27117
27118 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27119
27120 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; }
27121
27122 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; } /**
27123 * @author pmeijer / https://github.com/pmeijer
27124 * @author patrickkerrypei / https://github.com/patrickkerrypei
27125 */
27126
27127 /* eslint-env node, browser */
27128
27129 /**
27130 * Class for logging in and registering user. Note that these post requests do not require
27131 * the user to be authenticated.
27132 * @class
27133 */
27134 var LoginClient = function (_BaseClient) {
27135 _inherits(LoginClient, _BaseClient);
27136
27137 function LoginClient() {
27138 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
27139
27140 _classCallCheck(this, LoginClient);
27141
27142 return _possibleConstructorReturn(this, (LoginClient.__proto__ || Object.getPrototypeOf(LoginClient)).call(this, baseUrl));
27143 }
27144
27145 /**
27146 * Post request for logging in as userId.
27147 * If successful client will be redirected to the path given in query parameter
27148 * @param {string} userId - id of user
27149 * @param {string} password - password of user
27150 * @return {Promise} resolves if successfully logged in.
27151 */
27152
27153
27154 _createClass(LoginClient, [{
27155 key: 'login',
27156 value: function login(userId, password) {
27157 var data = {
27158 userId: userId,
27159 password: password
27160 };
27161
27162 return _get(LoginClient.prototype.__proto__ || Object.getPrototypeOf(LoginClient.prototype), 'post', this).call(this, ['/login'], data);
27163 }
27164
27165 /**
27166 * Post request for registering a new user.
27167 * @param {string} userId - Id of new user
27168 * @param {string} password - Password for user
27169 * @param {string} [email=''] - optional email address.
27170 * @return {Promise} - resolves if successfully added user, rejects otherwise.
27171 */
27172
27173 }, {
27174 key: 'register',
27175 value: function register(userId, password, email) {
27176 var data = {
27177 userId: userId,
27178 password: password,
27179 email: email || ''
27180 };
27181
27182 return _get(LoginClient.prototype.__proto__ || Object.getPrototypeOf(LoginClient.prototype), 'post', this).call(this, ['/api', 'register'], data);
27183 }
27184 }, {
27185 key: 'getGmeConfig',
27186 value: function getGmeConfig() {
27187 return _get(LoginClient.prototype.__proto__ || Object.getPrototypeOf(LoginClient.prototype), 'get', this).call(this, ['/gmeConfig.json']);
27188 }
27189 }]);
27190
27191 return LoginClient;
27192 }(_baseClient2.default);
27193
27194 exports.default = LoginClient;
27195
27196/***/ },
27197/* 326 */
27198/***/ function(module, exports, __webpack_require__) {
27199
27200 'use strict';
27201
27202 Object.defineProperty(exports, "__esModule", {
27203 value: true
27204 });
27205
27206 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; }; }(); /**
27207 * Base client with core requests
27208 * @author patrickkerrypei / https://github.com/patrickkerrypei
27209 */
27210
27211 /* eslint-env node, browser */
27212
27213
27214 var _superagent = __webpack_require__(327);
27215
27216 var _superagent2 = _interopRequireDefault(_superagent);
27217
27218 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27219
27220 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27221
27222 var BaseClient = function () {
27223 function BaseClient(baseUrl) {
27224 _classCallCheck(this, BaseClient);
27225
27226 this.baseUrl = baseUrl;
27227 }
27228
27229 /**
27230 * General GET request
27231 * @param {Array} path - path (ex. ['projects', 'ownerId', 'projectName'])
27232 * @param {Object} query - query if any (ex. {n: 100})
27233 * @return {Promise} //TODO: How to document the resolved value.
27234 */
27235
27236
27237 _createClass(BaseClient, [{
27238 key: 'get',
27239 value: function get(path) {
27240 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27241
27242 var url = this.baseUrl + path.join('/') + '/';
27243
27244 return new Promise(function (resolve, reject) {
27245 _superagent2.default.get(url).query(query).end(function (err, res) {
27246 if (err || !res.ok) {
27247 console.error(err); // eslint-disable-line no-console
27248 reject(err);
27249 } else {
27250 resolve(res.body);
27251 }
27252 });
27253 });
27254 }
27255
27256 /**
27257 * General PATCH request
27258 * @param {Array} path - path (ex. ['projects', 'ownerId', 'projectName'])
27259 * @param {object} value - value to be updated
27260 * @return {Promise} //TODO: How to document the resolved value.
27261 */
27262
27263 }, {
27264 key: 'patch',
27265 value: function patch(path, value) {
27266 var url = this.baseUrl + path.join('/') + '/';
27267
27268 return new Promise(function (resolve, reject) {
27269 _superagent2.default.patch(url).send(value).end(function (err, res) {
27270 if (err) {
27271 console.error(err); // eslint-disable-line no-console
27272 reject(err);
27273 } else {
27274 resolve(res.body);
27275 }
27276 });
27277 });
27278 }
27279
27280 /**
27281 * General POST request
27282 * @param {Array} path - path (ex. ['projects', 'ownerId', 'projectName'])
27283 * @param {object} data - data to be sent (ex. {userId: 'exampleId', password: 'examplePassword'})
27284 * @return {Promise} //TODO: How to document the resolved value.
27285 */
27286
27287 }, {
27288 key: 'post',
27289 value: function post(path) {
27290 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27291
27292 var url = this.baseUrl + path.join('/') + '/';
27293
27294 return new Promise(function (resolve, reject) {
27295 _superagent2.default.post(url).send(data).end(function (err, res) {
27296 if (err) {
27297 console.error(err); // eslint-disable-line no-console
27298 reject(err);
27299 } else {
27300 resolve(res);
27301 }
27302 });
27303 });
27304 }
27305
27306 /**
27307 * General PUT request
27308 * @param {Array} path - path (ex. ['projects', 'ownerId', 'projectName'])
27309 * @param {object} value - value to be set
27310 * @return {Promise} //TODO: How to document the resolved value.
27311 */
27312
27313 }, {
27314 key: 'put',
27315 value: function put(path) {
27316 var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27317
27318 var url = this.baseUrl + path.join('/') + '/';
27319
27320 return new Promise(function (resolve, reject) {
27321 _superagent2.default.put(url).send(value).end(function (err, res) {
27322 if (err) {
27323 console.error(err); // eslint-disable-line no-console
27324 reject(err);
27325 } else {
27326 resolve(res.body);
27327 }
27328 });
27329 });
27330 }
27331
27332 /**
27333 * General DELETE request
27334 * @param {Array} path - path (ex. ['projects', 'ownerId', 'projectName'])
27335 * @param {Object} query - query if any (ex. {force: true})
27336 * @return {Promise} //TODO: How to document the resolved value.
27337 */
27338
27339 }, {
27340 key: 'delete',
27341 value: function _delete(path) {
27342 var query = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
27343
27344 var url = this.baseUrl + path.join('/') + '/';
27345
27346 return new Promise(function (resolve, reject) {
27347 _superagent2.default.delete(url).query(query).end(function (err, res) {
27348 if (err || !res.ok) {
27349 console.error(err); // eslint-disable-line no-console
27350 reject(err);
27351 } else {
27352 resolve(res.body);
27353 }
27354 });
27355 });
27356 }
27357 }]);
27358
27359 return BaseClient;
27360 }();
27361
27362 exports.default = BaseClient;
27363
27364/***/ },
27365/* 327 */
27366/***/ function(module, exports, __webpack_require__) {
27367
27368 /**
27369 * Module dependencies.
27370 */
27371
27372 var Emitter = __webpack_require__(328);
27373 var reduce = __webpack_require__(329);
27374 var requestBase = __webpack_require__(330);
27375 var isObject = __webpack_require__(331);
27376
27377 /**
27378 * Root reference for iframes.
27379 */
27380
27381 var root;
27382 if (typeof window !== 'undefined') { // Browser window
27383 root = window;
27384 } else if (typeof self !== 'undefined') { // Web Worker
27385 root = self;
27386 } else { // Other environments
27387 root = this;
27388 }
27389
27390 /**
27391 * Noop.
27392 */
27393
27394 function noop(){};
27395
27396 /**
27397 * Check if `obj` is a host object,
27398 * we don't want to serialize these :)
27399 *
27400 * TODO: future proof, move to compoent land
27401 *
27402 * @param {Object} obj
27403 * @return {Boolean}
27404 * @api private
27405 */
27406
27407 function isHost(obj) {
27408 var str = {}.toString.call(obj);
27409
27410 switch (str) {
27411 case '[object File]':
27412 case '[object Blob]':
27413 case '[object FormData]':
27414 return true;
27415 default:
27416 return false;
27417 }
27418 }
27419
27420 /**
27421 * Expose `request`.
27422 */
27423
27424 var request = module.exports = __webpack_require__(332).bind(null, Request);
27425
27426 /**
27427 * Determine XHR.
27428 */
27429
27430 request.getXHR = function () {
27431 if (root.XMLHttpRequest
27432 && (!root.location || 'file:' != root.location.protocol
27433 || !root.ActiveXObject)) {
27434 return new XMLHttpRequest;
27435 } else {
27436 try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}
27437 try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}
27438 try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}
27439 try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}
27440 }
27441 return false;
27442 };
27443
27444 /**
27445 * Removes leading and trailing whitespace, added to support IE.
27446 *
27447 * @param {String} s
27448 * @return {String}
27449 * @api private
27450 */
27451
27452 var trim = ''.trim
27453 ? function(s) { return s.trim(); }
27454 : function(s) { return s.replace(/(^\s*|\s*$)/g, ''); };
27455
27456 /**
27457 * Serialize the given `obj`.
27458 *
27459 * @param {Object} obj
27460 * @return {String}
27461 * @api private
27462 */
27463
27464 function serialize(obj) {
27465 if (!isObject(obj)) return obj;
27466 var pairs = [];
27467 for (var key in obj) {
27468 if (null != obj[key]) {
27469 pushEncodedKeyValuePair(pairs, key, obj[key]);
27470 }
27471 }
27472 return pairs.join('&');
27473 }
27474
27475 /**
27476 * Helps 'serialize' with serializing arrays.
27477 * Mutates the pairs array.
27478 *
27479 * @param {Array} pairs
27480 * @param {String} key
27481 * @param {Mixed} val
27482 */
27483
27484 function pushEncodedKeyValuePair(pairs, key, val) {
27485 if (Array.isArray(val)) {
27486 return val.forEach(function(v) {
27487 pushEncodedKeyValuePair(pairs, key, v);
27488 });
27489 }
27490 pairs.push(encodeURIComponent(key)
27491 + '=' + encodeURIComponent(val));
27492 }
27493
27494 /**
27495 * Expose serialization method.
27496 */
27497
27498 request.serializeObject = serialize;
27499
27500 /**
27501 * Parse the given x-www-form-urlencoded `str`.
27502 *
27503 * @param {String} str
27504 * @return {Object}
27505 * @api private
27506 */
27507
27508 function parseString(str) {
27509 var obj = {};
27510 var pairs = str.split('&');
27511 var parts;
27512 var pair;
27513
27514 for (var i = 0, len = pairs.length; i < len; ++i) {
27515 pair = pairs[i];
27516 parts = pair.split('=');
27517 obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);
27518 }
27519
27520 return obj;
27521 }
27522
27523 /**
27524 * Expose parser.
27525 */
27526
27527 request.parseString = parseString;
27528
27529 /**
27530 * Default MIME type map.
27531 *
27532 * superagent.types.xml = 'application/xml';
27533 *
27534 */
27535
27536 request.types = {
27537 html: 'text/html',
27538 json: 'application/json',
27539 xml: 'application/xml',
27540 urlencoded: 'application/x-www-form-urlencoded',
27541 'form': 'application/x-www-form-urlencoded',
27542 'form-data': 'application/x-www-form-urlencoded'
27543 };
27544
27545 /**
27546 * Default serialization map.
27547 *
27548 * superagent.serialize['application/xml'] = function(obj){
27549 * return 'generated xml here';
27550 * };
27551 *
27552 */
27553
27554 request.serialize = {
27555 'application/x-www-form-urlencoded': serialize,
27556 'application/json': JSON.stringify
27557 };
27558
27559 /**
27560 * Default parsers.
27561 *
27562 * superagent.parse['application/xml'] = function(str){
27563 * return { object parsed from str };
27564 * };
27565 *
27566 */
27567
27568 request.parse = {
27569 'application/x-www-form-urlencoded': parseString,
27570 'application/json': JSON.parse
27571 };
27572
27573 /**
27574 * Parse the given header `str` into
27575 * an object containing the mapped fields.
27576 *
27577 * @param {String} str
27578 * @return {Object}
27579 * @api private
27580 */
27581
27582 function parseHeader(str) {
27583 var lines = str.split(/\r?\n/);
27584 var fields = {};
27585 var index;
27586 var line;
27587 var field;
27588 var val;
27589
27590 lines.pop(); // trailing CRLF
27591
27592 for (var i = 0, len = lines.length; i < len; ++i) {
27593 line = lines[i];
27594 index = line.indexOf(':');
27595 field = line.slice(0, index).toLowerCase();
27596 val = trim(line.slice(index + 1));
27597 fields[field] = val;
27598 }
27599
27600 return fields;
27601 }
27602
27603 /**
27604 * Check if `mime` is json or has +json structured syntax suffix.
27605 *
27606 * @param {String} mime
27607 * @return {Boolean}
27608 * @api private
27609 */
27610
27611 function isJSON(mime) {
27612 return /[\/+]json\b/.test(mime);
27613 }
27614
27615 /**
27616 * Return the mime type for the given `str`.
27617 *
27618 * @param {String} str
27619 * @return {String}
27620 * @api private
27621 */
27622
27623 function type(str){
27624 return str.split(/ *; */).shift();
27625 };
27626
27627 /**
27628 * Return header field parameters.
27629 *
27630 * @param {String} str
27631 * @return {Object}
27632 * @api private
27633 */
27634
27635 function params(str){
27636 return reduce(str.split(/ *; */), function(obj, str){
27637 var parts = str.split(/ *= */)
27638 , key = parts.shift()
27639 , val = parts.shift();
27640
27641 if (key && val) obj[key] = val;
27642 return obj;
27643 }, {});
27644 };
27645
27646 /**
27647 * Initialize a new `Response` with the given `xhr`.
27648 *
27649 * - set flags (.ok, .error, etc)
27650 * - parse header
27651 *
27652 * Examples:
27653 *
27654 * Aliasing `superagent` as `request` is nice:
27655 *
27656 * request = superagent;
27657 *
27658 * We can use the promise-like API, or pass callbacks:
27659 *
27660 * request.get('/').end(function(res){});
27661 * request.get('/', function(res){});
27662 *
27663 * Sending data can be chained:
27664 *
27665 * request
27666 * .post('/user')
27667 * .send({ name: 'tj' })
27668 * .end(function(res){});
27669 *
27670 * Or passed to `.send()`:
27671 *
27672 * request
27673 * .post('/user')
27674 * .send({ name: 'tj' }, function(res){});
27675 *
27676 * Or passed to `.post()`:
27677 *
27678 * request
27679 * .post('/user', { name: 'tj' })
27680 * .end(function(res){});
27681 *
27682 * Or further reduced to a single call for simple cases:
27683 *
27684 * request
27685 * .post('/user', { name: 'tj' }, function(res){});
27686 *
27687 * @param {XMLHTTPRequest} xhr
27688 * @param {Object} options
27689 * @api private
27690 */
27691
27692 function Response(req, options) {
27693 options = options || {};
27694 this.req = req;
27695 this.xhr = this.req.xhr;
27696 // responseText is accessible only if responseType is '' or 'text' and on older browsers
27697 this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')
27698 ? this.xhr.responseText
27699 : null;
27700 this.statusText = this.req.xhr.statusText;
27701 this.setStatusProperties(this.xhr.status);
27702 this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());
27703 // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but
27704 // getResponseHeader still works. so we get content-type even if getting
27705 // other headers fails.
27706 this.header['content-type'] = this.xhr.getResponseHeader('content-type');
27707 this.setHeaderProperties(this.header);
27708 this.body = this.req.method != 'HEAD'
27709 ? this.parseBody(this.text ? this.text : this.xhr.response)
27710 : null;
27711 }
27712
27713 /**
27714 * Get case-insensitive `field` value.
27715 *
27716 * @param {String} field
27717 * @return {String}
27718 * @api public
27719 */
27720
27721 Response.prototype.get = function(field){
27722 return this.header[field.toLowerCase()];
27723 };
27724
27725 /**
27726 * Set header related properties:
27727 *
27728 * - `.type` the content type without params
27729 *
27730 * A response of "Content-Type: text/plain; charset=utf-8"
27731 * will provide you with a `.type` of "text/plain".
27732 *
27733 * @param {Object} header
27734 * @api private
27735 */
27736
27737 Response.prototype.setHeaderProperties = function(header){
27738 // content-type
27739 var ct = this.header['content-type'] || '';
27740 this.type = type(ct);
27741
27742 // params
27743 var obj = params(ct);
27744 for (var key in obj) this[key] = obj[key];
27745 };
27746
27747 /**
27748 * Parse the given body `str`.
27749 *
27750 * Used for auto-parsing of bodies. Parsers
27751 * are defined on the `superagent.parse` object.
27752 *
27753 * @param {String} str
27754 * @return {Mixed}
27755 * @api private
27756 */
27757
27758 Response.prototype.parseBody = function(str){
27759 var parse = request.parse[this.type];
27760 if (!parse && isJSON(this.type)) {
27761 parse = request.parse['application/json'];
27762 }
27763 return parse && str && (str.length || str instanceof Object)
27764 ? parse(str)
27765 : null;
27766 };
27767
27768 /**
27769 * Set flags such as `.ok` based on `status`.
27770 *
27771 * For example a 2xx response will give you a `.ok` of __true__
27772 * whereas 5xx will be __false__ and `.error` will be __true__. The
27773 * `.clientError` and `.serverError` are also available to be more
27774 * specific, and `.statusType` is the class of error ranging from 1..5
27775 * sometimes useful for mapping respond colors etc.
27776 *
27777 * "sugar" properties are also defined for common cases. Currently providing:
27778 *
27779 * - .noContent
27780 * - .badRequest
27781 * - .unauthorized
27782 * - .notAcceptable
27783 * - .notFound
27784 *
27785 * @param {Number} status
27786 * @api private
27787 */
27788
27789 Response.prototype.setStatusProperties = function(status){
27790 // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request
27791 if (status === 1223) {
27792 status = 204;
27793 }
27794
27795 var type = status / 100 | 0;
27796
27797 // status / class
27798 this.status = this.statusCode = status;
27799 this.statusType = type;
27800
27801 // basics
27802 this.info = 1 == type;
27803 this.ok = 2 == type;
27804 this.clientError = 4 == type;
27805 this.serverError = 5 == type;
27806 this.error = (4 == type || 5 == type)
27807 ? this.toError()
27808 : false;
27809
27810 // sugar
27811 this.accepted = 202 == status;
27812 this.noContent = 204 == status;
27813 this.badRequest = 400 == status;
27814 this.unauthorized = 401 == status;
27815 this.notAcceptable = 406 == status;
27816 this.notFound = 404 == status;
27817 this.forbidden = 403 == status;
27818 };
27819
27820 /**
27821 * Return an `Error` representative of this response.
27822 *
27823 * @return {Error}
27824 * @api public
27825 */
27826
27827 Response.prototype.toError = function(){
27828 var req = this.req;
27829 var method = req.method;
27830 var url = req.url;
27831
27832 var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';
27833 var err = new Error(msg);
27834 err.status = this.status;
27835 err.method = method;
27836 err.url = url;
27837
27838 return err;
27839 };
27840
27841 /**
27842 * Expose `Response`.
27843 */
27844
27845 request.Response = Response;
27846
27847 /**
27848 * Initialize a new `Request` with the given `method` and `url`.
27849 *
27850 * @param {String} method
27851 * @param {String} url
27852 * @api public
27853 */
27854
27855 function Request(method, url) {
27856 var self = this;
27857 this._query = this._query || [];
27858 this.method = method;
27859 this.url = url;
27860 this.header = {}; // preserves header name case
27861 this._header = {}; // coerces header names to lowercase
27862 this.on('end', function(){
27863 var err = null;
27864 var res = null;
27865
27866 try {
27867 res = new Response(self);
27868 } catch(e) {
27869 err = new Error('Parser is unable to parse the response');
27870 err.parse = true;
27871 err.original = e;
27872 // issue #675: return the raw response if the response parsing fails
27873 err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;
27874 // issue #876: return the http status code if the response parsing fails
27875 err.statusCode = self.xhr && self.xhr.status ? self.xhr.status : null;
27876 return self.callback(err);
27877 }
27878
27879 self.emit('response', res);
27880
27881 if (err) {
27882 return self.callback(err, res);
27883 }
27884
27885 if (res.status >= 200 && res.status < 300) {
27886 return self.callback(err, res);
27887 }
27888
27889 var new_err = new Error(res.statusText || 'Unsuccessful HTTP response');
27890 new_err.original = err;
27891 new_err.response = res;
27892 new_err.status = res.status;
27893
27894 self.callback(new_err, res);
27895 });
27896 }
27897
27898 /**
27899 * Mixin `Emitter` and `requestBase`.
27900 */
27901
27902 Emitter(Request.prototype);
27903 for (var key in requestBase) {
27904 Request.prototype[key] = requestBase[key];
27905 }
27906
27907 /**
27908 * Abort the request, and clear potential timeout.
27909 *
27910 * @return {Request}
27911 * @api public
27912 */
27913
27914 Request.prototype.abort = function(){
27915 if (this.aborted) return;
27916 this.aborted = true;
27917 this.xhr && this.xhr.abort();
27918 this.clearTimeout();
27919 this.emit('abort');
27920 return this;
27921 };
27922
27923 /**
27924 * Set Content-Type to `type`, mapping values from `request.types`.
27925 *
27926 * Examples:
27927 *
27928 * superagent.types.xml = 'application/xml';
27929 *
27930 * request.post('/')
27931 * .type('xml')
27932 * .send(xmlstring)
27933 * .end(callback);
27934 *
27935 * request.post('/')
27936 * .type('application/xml')
27937 * .send(xmlstring)
27938 * .end(callback);
27939 *
27940 * @param {String} type
27941 * @return {Request} for chaining
27942 * @api public
27943 */
27944
27945 Request.prototype.type = function(type){
27946 this.set('Content-Type', request.types[type] || type);
27947 return this;
27948 };
27949
27950 /**
27951 * Set responseType to `val`. Presently valid responseTypes are 'blob' and
27952 * 'arraybuffer'.
27953 *
27954 * Examples:
27955 *
27956 * req.get('/')
27957 * .responseType('blob')
27958 * .end(callback);
27959 *
27960 * @param {String} val
27961 * @return {Request} for chaining
27962 * @api public
27963 */
27964
27965 Request.prototype.responseType = function(val){
27966 this._responseType = val;
27967 return this;
27968 };
27969
27970 /**
27971 * Set Accept to `type`, mapping values from `request.types`.
27972 *
27973 * Examples:
27974 *
27975 * superagent.types.json = 'application/json';
27976 *
27977 * request.get('/agent')
27978 * .accept('json')
27979 * .end(callback);
27980 *
27981 * request.get('/agent')
27982 * .accept('application/json')
27983 * .end(callback);
27984 *
27985 * @param {String} accept
27986 * @return {Request} for chaining
27987 * @api public
27988 */
27989
27990 Request.prototype.accept = function(type){
27991 this.set('Accept', request.types[type] || type);
27992 return this;
27993 };
27994
27995 /**
27996 * Set Authorization field value with `user` and `pass`.
27997 *
27998 * @param {String} user
27999 * @param {String} pass
28000 * @param {Object} options with 'type' property 'auto' or 'basic' (default 'basic')
28001 * @return {Request} for chaining
28002 * @api public
28003 */
28004
28005 Request.prototype.auth = function(user, pass, options){
28006 if (!options) {
28007 options = {
28008 type: 'basic'
28009 }
28010 }
28011
28012 switch (options.type) {
28013 case 'basic':
28014 var str = btoa(user + ':' + pass);
28015 this.set('Authorization', 'Basic ' + str);
28016 break;
28017
28018 case 'auto':
28019 this.username = user;
28020 this.password = pass;
28021 break;
28022 }
28023 return this;
28024 };
28025
28026 /**
28027 * Add query-string `val`.
28028 *
28029 * Examples:
28030 *
28031 * request.get('/shoes')
28032 * .query('size=10')
28033 * .query({ color: 'blue' })
28034 *
28035 * @param {Object|String} val
28036 * @return {Request} for chaining
28037 * @api public
28038 */
28039
28040 Request.prototype.query = function(val){
28041 if ('string' != typeof val) val = serialize(val);
28042 if (val) this._query.push(val);
28043 return this;
28044 };
28045
28046 /**
28047 * Queue the given `file` as an attachment to the specified `field`,
28048 * with optional `filename`.
28049 *
28050 * ``` js
28051 * request.post('/upload')
28052 * .attach(new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"}))
28053 * .end(callback);
28054 * ```
28055 *
28056 * @param {String} field
28057 * @param {Blob|File} file
28058 * @param {String} filename
28059 * @return {Request} for chaining
28060 * @api public
28061 */
28062
28063 Request.prototype.attach = function(field, file, filename){
28064 this._getFormData().append(field, file, filename || file.name);
28065 return this;
28066 };
28067
28068 Request.prototype._getFormData = function(){
28069 if (!this._formData) {
28070 this._formData = new root.FormData();
28071 }
28072 return this._formData;
28073 };
28074
28075 /**
28076 * Send `data` as the request body, defaulting the `.type()` to "json" when
28077 * an object is given.
28078 *
28079 * Examples:
28080 *
28081 * // manual json
28082 * request.post('/user')
28083 * .type('json')
28084 * .send('{"name":"tj"}')
28085 * .end(callback)
28086 *
28087 * // auto json
28088 * request.post('/user')
28089 * .send({ name: 'tj' })
28090 * .end(callback)
28091 *
28092 * // manual x-www-form-urlencoded
28093 * request.post('/user')
28094 * .type('form')
28095 * .send('name=tj')
28096 * .end(callback)
28097 *
28098 * // auto x-www-form-urlencoded
28099 * request.post('/user')
28100 * .type('form')
28101 * .send({ name: 'tj' })
28102 * .end(callback)
28103 *
28104 * // defaults to x-www-form-urlencoded
28105 * request.post('/user')
28106 * .send('name=tobi')
28107 * .send('species=ferret')
28108 * .end(callback)
28109 *
28110 * @param {String|Object} data
28111 * @return {Request} for chaining
28112 * @api public
28113 */
28114
28115 Request.prototype.send = function(data){
28116 var obj = isObject(data);
28117 var type = this._header['content-type'];
28118
28119 // merge
28120 if (obj && isObject(this._data)) {
28121 for (var key in data) {
28122 this._data[key] = data[key];
28123 }
28124 } else if ('string' == typeof data) {
28125 if (!type) this.type('form');
28126 type = this._header['content-type'];
28127 if ('application/x-www-form-urlencoded' == type) {
28128 this._data = this._data
28129 ? this._data + '&' + data
28130 : data;
28131 } else {
28132 this._data = (this._data || '') + data;
28133 }
28134 } else {
28135 this._data = data;
28136 }
28137
28138 if (!obj || isHost(data)) return this;
28139 if (!type) this.type('json');
28140 return this;
28141 };
28142
28143 /**
28144 * @deprecated
28145 */
28146 Response.prototype.parse = function serialize(fn){
28147 if (root.console) {
28148 console.warn("Client-side parse() method has been renamed to serialize(). This method is not compatible with superagent v2.0");
28149 }
28150 this.serialize(fn);
28151 return this;
28152 };
28153
28154 Response.prototype.serialize = function serialize(fn){
28155 this._parser = fn;
28156 return this;
28157 };
28158
28159 /**
28160 * Invoke the callback with `err` and `res`
28161 * and handle arity check.
28162 *
28163 * @param {Error} err
28164 * @param {Response} res
28165 * @api private
28166 */
28167
28168 Request.prototype.callback = function(err, res){
28169 var fn = this._callback;
28170 this.clearTimeout();
28171 fn(err, res);
28172 };
28173
28174 /**
28175 * Invoke callback with x-domain error.
28176 *
28177 * @api private
28178 */
28179
28180 Request.prototype.crossDomainError = function(){
28181 var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');
28182 err.crossDomain = true;
28183
28184 err.status = this.status;
28185 err.method = this.method;
28186 err.url = this.url;
28187
28188 this.callback(err);
28189 };
28190
28191 /**
28192 * Invoke callback with timeout error.
28193 *
28194 * @api private
28195 */
28196
28197 Request.prototype.timeoutError = function(){
28198 var timeout = this._timeout;
28199 var err = new Error('timeout of ' + timeout + 'ms exceeded');
28200 err.timeout = timeout;
28201 this.callback(err);
28202 };
28203
28204 /**
28205 * Enable transmission of cookies with x-domain requests.
28206 *
28207 * Note that for this to work the origin must not be
28208 * using "Access-Control-Allow-Origin" with a wildcard,
28209 * and also must set "Access-Control-Allow-Credentials"
28210 * to "true".
28211 *
28212 * @api public
28213 */
28214
28215 Request.prototype.withCredentials = function(){
28216 this._withCredentials = true;
28217 return this;
28218 };
28219
28220 /**
28221 * Initiate request, invoking callback `fn(res)`
28222 * with an instanceof `Response`.
28223 *
28224 * @param {Function} fn
28225 * @return {Request} for chaining
28226 * @api public
28227 */
28228
28229 Request.prototype.end = function(fn){
28230 var self = this;
28231 var xhr = this.xhr = request.getXHR();
28232 var query = this._query.join('&');
28233 var timeout = this._timeout;
28234 var data = this._formData || this._data;
28235
28236 // store callback
28237 this._callback = fn || noop;
28238
28239 // state change
28240 xhr.onreadystatechange = function(){
28241 if (4 != xhr.readyState) return;
28242
28243 // In IE9, reads to any property (e.g. status) off of an aborted XHR will
28244 // result in the error "Could not complete the operation due to error c00c023f"
28245 var status;
28246 try { status = xhr.status } catch(e) { status = 0; }
28247
28248 if (0 == status) {
28249 if (self.timedout) return self.timeoutError();
28250 if (self.aborted) return;
28251 return self.crossDomainError();
28252 }
28253 self.emit('end');
28254 };
28255
28256 // progress
28257 var handleProgress = function(e){
28258 if (e.total > 0) {
28259 e.percent = e.loaded / e.total * 100;
28260 }
28261 e.direction = 'download';
28262 self.emit('progress', e);
28263 };
28264 if (this.hasListeners('progress')) {
28265 xhr.onprogress = handleProgress;
28266 }
28267 try {
28268 if (xhr.upload && this.hasListeners('progress')) {
28269 xhr.upload.onprogress = handleProgress;
28270 }
28271 } catch(e) {
28272 // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.
28273 // Reported here:
28274 // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context
28275 }
28276
28277 // timeout
28278 if (timeout && !this._timer) {
28279 this._timer = setTimeout(function(){
28280 self.timedout = true;
28281 self.abort();
28282 }, timeout);
28283 }
28284
28285 // querystring
28286 if (query) {
28287 query = request.serializeObject(query);
28288 this.url += ~this.url.indexOf('?')
28289 ? '&' + query
28290 : '?' + query;
28291 }
28292
28293 // initiate request
28294 if (this.username && this.password) {
28295 xhr.open(this.method, this.url, true, this.username, this.password);
28296 } else {
28297 xhr.open(this.method, this.url, true);
28298 }
28299
28300 // CORS
28301 if (this._withCredentials) xhr.withCredentials = true;
28302
28303 // body
28304 if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) {
28305 // serialize stuff
28306 var contentType = this._header['content-type'];
28307 var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : ''];
28308 if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];
28309 if (serialize) data = serialize(data);
28310 }
28311
28312 // set header fields
28313 for (var field in this.header) {
28314 if (null == this.header[field]) continue;
28315 xhr.setRequestHeader(field, this.header[field]);
28316 }
28317
28318 if (this._responseType) {
28319 xhr.responseType = this._responseType;
28320 }
28321
28322 // send stuff
28323 this.emit('request', this);
28324
28325 // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)
28326 // We need null here if data is undefined
28327 xhr.send(typeof data !== 'undefined' ? data : null);
28328 return this;
28329 };
28330
28331
28332 /**
28333 * Expose `Request`.
28334 */
28335
28336 request.Request = Request;
28337
28338 /**
28339 * GET `url` with optional callback `fn(res)`.
28340 *
28341 * @param {String} url
28342 * @param {Mixed|Function} data or fn
28343 * @param {Function} fn
28344 * @return {Request}
28345 * @api public
28346 */
28347
28348 request.get = function(url, data, fn){
28349 var req = request('GET', url);
28350 if ('function' == typeof data) fn = data, data = null;
28351 if (data) req.query(data);
28352 if (fn) req.end(fn);
28353 return req;
28354 };
28355
28356 /**
28357 * HEAD `url` with optional callback `fn(res)`.
28358 *
28359 * @param {String} url
28360 * @param {Mixed|Function} data or fn
28361 * @param {Function} fn
28362 * @return {Request}
28363 * @api public
28364 */
28365
28366 request.head = function(url, data, fn){
28367 var req = request('HEAD', url);
28368 if ('function' == typeof data) fn = data, data = null;
28369 if (data) req.send(data);
28370 if (fn) req.end(fn);
28371 return req;
28372 };
28373
28374 /**
28375 * DELETE `url` with optional callback `fn(res)`.
28376 *
28377 * @param {String} url
28378 * @param {Function} fn
28379 * @return {Request}
28380 * @api public
28381 */
28382
28383 function del(url, fn){
28384 var req = request('DELETE', url);
28385 if (fn) req.end(fn);
28386 return req;
28387 };
28388
28389 request['del'] = del;
28390 request['delete'] = del;
28391
28392 /**
28393 * PATCH `url` with optional `data` and callback `fn(res)`.
28394 *
28395 * @param {String} url
28396 * @param {Mixed} data
28397 * @param {Function} fn
28398 * @return {Request}
28399 * @api public
28400 */
28401
28402 request.patch = function(url, data, fn){
28403 var req = request('PATCH', url);
28404 if ('function' == typeof data) fn = data, data = null;
28405 if (data) req.send(data);
28406 if (fn) req.end(fn);
28407 return req;
28408 };
28409
28410 /**
28411 * POST `url` with optional `data` and callback `fn(res)`.
28412 *
28413 * @param {String} url
28414 * @param {Mixed} data
28415 * @param {Function} fn
28416 * @return {Request}
28417 * @api public
28418 */
28419
28420 request.post = function(url, data, fn){
28421 var req = request('POST', url);
28422 if ('function' == typeof data) fn = data, data = null;
28423 if (data) req.send(data);
28424 if (fn) req.end(fn);
28425 return req;
28426 };
28427
28428 /**
28429 * PUT `url` with optional `data` and callback `fn(res)`.
28430 *
28431 * @param {String} url
28432 * @param {Mixed|Function} data or fn
28433 * @param {Function} fn
28434 * @return {Request}
28435 * @api public
28436 */
28437
28438 request.put = function(url, data, fn){
28439 var req = request('PUT', url);
28440 if ('function' == typeof data) fn = data, data = null;
28441 if (data) req.send(data);
28442 if (fn) req.end(fn);
28443 return req;
28444 };
28445
28446
28447/***/ },
28448/* 328 */
28449/***/ function(module, exports, __webpack_require__) {
28450
28451
28452 /**
28453 * Expose `Emitter`.
28454 */
28455
28456 if (true) {
28457 module.exports = Emitter;
28458 }
28459
28460 /**
28461 * Initialize a new `Emitter`.
28462 *
28463 * @api public
28464 */
28465
28466 function Emitter(obj) {
28467 if (obj) return mixin(obj);
28468 };
28469
28470 /**
28471 * Mixin the emitter properties.
28472 *
28473 * @param {Object} obj
28474 * @return {Object}
28475 * @api private
28476 */
28477
28478 function mixin(obj) {
28479 for (var key in Emitter.prototype) {
28480 obj[key] = Emitter.prototype[key];
28481 }
28482 return obj;
28483 }
28484
28485 /**
28486 * Listen on the given `event` with `fn`.
28487 *
28488 * @param {String} event
28489 * @param {Function} fn
28490 * @return {Emitter}
28491 * @api public
28492 */
28493
28494 Emitter.prototype.on =
28495 Emitter.prototype.addEventListener = function(event, fn){
28496 this._callbacks = this._callbacks || {};
28497 (this._callbacks['$' + event] = this._callbacks['$' + event] || [])
28498 .push(fn);
28499 return this;
28500 };
28501
28502 /**
28503 * Adds an `event` listener that will be invoked a single
28504 * time then automatically removed.
28505 *
28506 * @param {String} event
28507 * @param {Function} fn
28508 * @return {Emitter}
28509 * @api public
28510 */
28511
28512 Emitter.prototype.once = function(event, fn){
28513 function on() {
28514 this.off(event, on);
28515 fn.apply(this, arguments);
28516 }
28517
28518 on.fn = fn;
28519 this.on(event, on);
28520 return this;
28521 };
28522
28523 /**
28524 * Remove the given callback for `event` or all
28525 * registered callbacks.
28526 *
28527 * @param {String} event
28528 * @param {Function} fn
28529 * @return {Emitter}
28530 * @api public
28531 */
28532
28533 Emitter.prototype.off =
28534 Emitter.prototype.removeListener =
28535 Emitter.prototype.removeAllListeners =
28536 Emitter.prototype.removeEventListener = function(event, fn){
28537 this._callbacks = this._callbacks || {};
28538
28539 // all
28540 if (0 == arguments.length) {
28541 this._callbacks = {};
28542 return this;
28543 }
28544
28545 // specific event
28546 var callbacks = this._callbacks['$' + event];
28547 if (!callbacks) return this;
28548
28549 // remove all handlers
28550 if (1 == arguments.length) {
28551 delete this._callbacks['$' + event];
28552 return this;
28553 }
28554
28555 // remove specific handler
28556 var cb;
28557 for (var i = 0; i < callbacks.length; i++) {
28558 cb = callbacks[i];
28559 if (cb === fn || cb.fn === fn) {
28560 callbacks.splice(i, 1);
28561 break;
28562 }
28563 }
28564 return this;
28565 };
28566
28567 /**
28568 * Emit `event` with the given args.
28569 *
28570 * @param {String} event
28571 * @param {Mixed} ...
28572 * @return {Emitter}
28573 */
28574
28575 Emitter.prototype.emit = function(event){
28576 this._callbacks = this._callbacks || {};
28577 var args = [].slice.call(arguments, 1)
28578 , callbacks = this._callbacks['$' + event];
28579
28580 if (callbacks) {
28581 callbacks = callbacks.slice(0);
28582 for (var i = 0, len = callbacks.length; i < len; ++i) {
28583 callbacks[i].apply(this, args);
28584 }
28585 }
28586
28587 return this;
28588 };
28589
28590 /**
28591 * Return array of callbacks for `event`.
28592 *
28593 * @param {String} event
28594 * @return {Array}
28595 * @api public
28596 */
28597
28598 Emitter.prototype.listeners = function(event){
28599 this._callbacks = this._callbacks || {};
28600 return this._callbacks['$' + event] || [];
28601 };
28602
28603 /**
28604 * Check if this emitter has `event` handlers.
28605 *
28606 * @param {String} event
28607 * @return {Boolean}
28608 * @api public
28609 */
28610
28611 Emitter.prototype.hasListeners = function(event){
28612 return !! this.listeners(event).length;
28613 };
28614
28615
28616/***/ },
28617/* 329 */
28618/***/ function(module, exports) {
28619
28620
28621 /**
28622 * Reduce `arr` with `fn`.
28623 *
28624 * @param {Array} arr
28625 * @param {Function} fn
28626 * @param {Mixed} initial
28627 *
28628 * TODO: combatible error handling?
28629 */
28630
28631 module.exports = function(arr, fn, initial){
28632 var idx = 0;
28633 var len = arr.length;
28634 var curr = arguments.length == 3
28635 ? initial
28636 : arr[idx++];
28637
28638 while (idx < len) {
28639 curr = fn.call(null, curr, arr[idx], ++idx, arr);
28640 }
28641
28642 return curr;
28643 };
28644
28645/***/ },
28646/* 330 */
28647/***/ function(module, exports, __webpack_require__) {
28648
28649 /**
28650 * Module of mixed-in functions shared between node and client code
28651 */
28652 var isObject = __webpack_require__(331);
28653
28654 /**
28655 * Clear previous timeout.
28656 *
28657 * @return {Request} for chaining
28658 * @api public
28659 */
28660
28661 exports.clearTimeout = function _clearTimeout(){
28662 this._timeout = 0;
28663 clearTimeout(this._timer);
28664 return this;
28665 };
28666
28667 /**
28668 * Force given parser
28669 *
28670 * Sets the body parser no matter type.
28671 *
28672 * @param {Function}
28673 * @api public
28674 */
28675
28676 exports.parse = function parse(fn){
28677 this._parser = fn;
28678 return this;
28679 };
28680
28681 /**
28682 * Set timeout to `ms`.
28683 *
28684 * @param {Number} ms
28685 * @return {Request} for chaining
28686 * @api public
28687 */
28688
28689 exports.timeout = function timeout(ms){
28690 this._timeout = ms;
28691 return this;
28692 };
28693
28694 /**
28695 * Faux promise support
28696 *
28697 * @param {Function} fulfill
28698 * @param {Function} reject
28699 * @return {Request}
28700 */
28701
28702 exports.then = function then(fulfill, reject) {
28703 return this.end(function(err, res) {
28704 err ? reject(err) : fulfill(res);
28705 });
28706 }
28707
28708 /**
28709 * Allow for extension
28710 */
28711
28712 exports.use = function use(fn) {
28713 fn(this);
28714 return this;
28715 }
28716
28717
28718 /**
28719 * Get request header `field`.
28720 * Case-insensitive.
28721 *
28722 * @param {String} field
28723 * @return {String}
28724 * @api public
28725 */
28726
28727 exports.get = function(field){
28728 return this._header[field.toLowerCase()];
28729 };
28730
28731 /**
28732 * Get case-insensitive header `field` value.
28733 * This is a deprecated internal API. Use `.get(field)` instead.
28734 *
28735 * (getHeader is no longer used internally by the superagent code base)
28736 *
28737 * @param {String} field
28738 * @return {String}
28739 * @api private
28740 * @deprecated
28741 */
28742
28743 exports.getHeader = exports.get;
28744
28745 /**
28746 * Set header `field` to `val`, or multiple fields with one object.
28747 * Case-insensitive.
28748 *
28749 * Examples:
28750 *
28751 * req.get('/')
28752 * .set('Accept', 'application/json')
28753 * .set('X-API-Key', 'foobar')
28754 * .end(callback);
28755 *
28756 * req.get('/')
28757 * .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })
28758 * .end(callback);
28759 *
28760 * @param {String|Object} field
28761 * @param {String} val
28762 * @return {Request} for chaining
28763 * @api public
28764 */
28765
28766 exports.set = function(field, val){
28767 if (isObject(field)) {
28768 for (var key in field) {
28769 this.set(key, field[key]);
28770 }
28771 return this;
28772 }
28773 this._header[field.toLowerCase()] = val;
28774 this.header[field] = val;
28775 return this;
28776 };
28777
28778 /**
28779 * Remove header `field`.
28780 * Case-insensitive.
28781 *
28782 * Example:
28783 *
28784 * req.get('/')
28785 * .unset('User-Agent')
28786 * .end(callback);
28787 *
28788 * @param {String} field
28789 */
28790 exports.unset = function(field){
28791 delete this._header[field.toLowerCase()];
28792 delete this.header[field];
28793 return this;
28794 };
28795
28796 /**
28797 * Write the field `name` and `val` for "multipart/form-data"
28798 * request bodies.
28799 *
28800 * ``` js
28801 * request.post('/upload')
28802 * .field('foo', 'bar')
28803 * .end(callback);
28804 * ```
28805 *
28806 * @param {String} name
28807 * @param {String|Blob|File|Buffer|fs.ReadStream} val
28808 * @return {Request} for chaining
28809 * @api public
28810 */
28811 exports.field = function(name, val) {
28812 this._getFormData().append(name, val);
28813 return this;
28814 };
28815
28816
28817/***/ },
28818/* 331 */
28819/***/ function(module, exports) {
28820
28821 /**
28822 * Check if `obj` is an object.
28823 *
28824 * @param {Object} obj
28825 * @return {Boolean}
28826 * @api private
28827 */
28828
28829 function isObject(obj) {
28830 return null != obj && 'object' == typeof obj;
28831 }
28832
28833 module.exports = isObject;
28834
28835
28836/***/ },
28837/* 332 */
28838/***/ function(module, exports) {
28839
28840 // The node and browser modules expose versions of this with the
28841 // appropriate constructor function bound as first argument
28842 /**
28843 * Issue a request:
28844 *
28845 * Examples:
28846 *
28847 * request('GET', '/users').end(callback)
28848 * request('/users').end(callback)
28849 * request('/users', callback)
28850 *
28851 * @param {String} method
28852 * @param {String|Function} url or callback
28853 * @return {Request}
28854 * @api public
28855 */
28856
28857 function request(RequestConstructor, method, url) {
28858 // callback
28859 if ('function' == typeof url) {
28860 return new RequestConstructor('GET', method).end(url);
28861 }
28862
28863 // url first
28864 if (2 == arguments.length) {
28865 return new RequestConstructor('GET', method);
28866 }
28867
28868 return new RequestConstructor(method, url);
28869 }
28870
28871 module.exports = request;
28872
28873
28874/***/ },
28875/* 333 */,
28876/* 334 */
28877/***/ function(module, exports, __webpack_require__) {
28878
28879 'use strict';
28880
28881 var _interopRequireDefault = __webpack_require__(335)['default'];
28882
28883 var _interopRequireWildcard = __webpack_require__(336)['default'];
28884
28885 exports.__esModule = true;
28886
28887 var _Accordion2 = __webpack_require__(337);
28888
28889 var _Accordion3 = _interopRequireDefault(_Accordion2);
28890
28891 exports.Accordion = _Accordion3['default'];
28892
28893 var _Alert2 = __webpack_require__(366);
28894
28895 var _Alert3 = _interopRequireDefault(_Alert2);
28896
28897 exports.Alert = _Alert3['default'];
28898
28899 var _Badge2 = __webpack_require__(368);
28900
28901 var _Badge3 = _interopRequireDefault(_Badge2);
28902
28903 exports.Badge = _Badge3['default'];
28904
28905 var _Breadcrumb2 = __webpack_require__(369);
28906
28907 var _Breadcrumb3 = _interopRequireDefault(_Breadcrumb2);
28908
28909 exports.Breadcrumb = _Breadcrumb3['default'];
28910
28911 var _BreadcrumbItem2 = __webpack_require__(370);
28912
28913 var _BreadcrumbItem3 = _interopRequireDefault(_BreadcrumbItem2);
28914
28915 exports.BreadcrumbItem = _BreadcrumbItem3['default'];
28916
28917 var _Button2 = __webpack_require__(382);
28918
28919 var _Button3 = _interopRequireDefault(_Button2);
28920
28921 exports.Button = _Button3['default'];
28922
28923 var _ButtonGroup2 = __webpack_require__(383);
28924
28925 var _ButtonGroup3 = _interopRequireDefault(_ButtonGroup2);
28926
28927 exports.ButtonGroup = _ButtonGroup3['default'];
28928
28929 var _ButtonInput2 = __webpack_require__(385);
28930
28931 var _ButtonInput3 = _interopRequireDefault(_ButtonInput2);
28932
28933 exports.ButtonInput = _ButtonInput3['default'];
28934
28935 var _ButtonToolbar2 = __webpack_require__(392);
28936
28937 var _ButtonToolbar3 = _interopRequireDefault(_ButtonToolbar2);
28938
28939 exports.ButtonToolbar = _ButtonToolbar3['default'];
28940
28941 var _Carousel2 = __webpack_require__(393);
28942
28943 var _Carousel3 = _interopRequireDefault(_Carousel2);
28944
28945 exports.Carousel = _Carousel3['default'];
28946
28947 var _CarouselItem2 = __webpack_require__(395);
28948
28949 var _CarouselItem3 = _interopRequireDefault(_CarouselItem2);
28950
28951 exports.CarouselItem = _CarouselItem3['default'];
28952
28953 var _Checkbox2 = __webpack_require__(397);
28954
28955 var _Checkbox3 = _interopRequireDefault(_Checkbox2);
28956
28957 exports.Checkbox = _Checkbox3['default'];
28958
28959 var _Clearfix2 = __webpack_require__(398);
28960
28961 var _Clearfix3 = _interopRequireDefault(_Clearfix2);
28962
28963 exports.Clearfix = _Clearfix3['default'];
28964
28965 var _ControlLabel2 = __webpack_require__(399);
28966
28967 var _ControlLabel3 = _interopRequireDefault(_ControlLabel2);
28968
28969 exports.ControlLabel = _ControlLabel3['default'];
28970
28971 var _Col2 = __webpack_require__(400);
28972
28973 var _Col3 = _interopRequireDefault(_Col2);
28974
28975 exports.Col = _Col3['default'];
28976
28977 var _Collapse2 = __webpack_require__(401);
28978
28979 var _Collapse3 = _interopRequireDefault(_Collapse2);
28980
28981 exports.Collapse = _Collapse3['default'];
28982
28983 var _Dropdown2 = __webpack_require__(415);
28984
28985 var _Dropdown3 = _interopRequireDefault(_Dropdown2);
28986
28987 exports.Dropdown = _Dropdown3['default'];
28988
28989 var _DropdownButton2 = __webpack_require__(500);
28990
28991 var _DropdownButton3 = _interopRequireDefault(_DropdownButton2);
28992
28993 exports.DropdownButton = _DropdownButton3['default'];
28994
28995 var _Fade2 = __webpack_require__(502);
28996
28997 var _Fade3 = _interopRequireDefault(_Fade2);
28998
28999 exports.Fade = _Fade3['default'];
29000
29001 var _Form2 = __webpack_require__(503);
29002
29003 var _Form3 = _interopRequireDefault(_Form2);
29004
29005 exports.Form = _Form3['default'];
29006
29007 var _FormControl2 = __webpack_require__(504);
29008
29009 var _FormControl3 = _interopRequireDefault(_FormControl2);
29010
29011 exports.FormControl = _FormControl3['default'];
29012
29013 var _FormGroup2 = __webpack_require__(386);
29014
29015 var _FormGroup3 = _interopRequireDefault(_FormGroup2);
29016
29017 exports.FormGroup = _FormGroup3['default'];
29018
29019 var _Glyphicon2 = __webpack_require__(388);
29020
29021 var _Glyphicon3 = _interopRequireDefault(_Glyphicon2);
29022
29023 exports.Glyphicon = _Glyphicon3['default'];
29024
29025 var _Grid2 = __webpack_require__(507);
29026
29027 var _Grid3 = _interopRequireDefault(_Grid2);
29028
29029 exports.Grid = _Grid3['default'];
29030
29031 var _HelpBlock2 = __webpack_require__(508);
29032
29033 var _HelpBlock3 = _interopRequireDefault(_HelpBlock2);
29034
29035 exports.HelpBlock = _HelpBlock3['default'];
29036
29037 var _Image2 = __webpack_require__(509);
29038
29039 var _Image3 = _interopRequireDefault(_Image2);
29040
29041 exports.Image = _Image3['default'];
29042
29043 var _Input2 = __webpack_require__(510);
29044
29045 var _Input3 = _interopRequireDefault(_Input2);
29046
29047 exports.Input = _Input3['default'];
29048
29049 var _InputGroup2 = __webpack_require__(513);
29050
29051 var _InputGroup3 = _interopRequireDefault(_InputGroup2);
29052
29053 exports.InputGroup = _InputGroup3['default'];
29054
29055 var _Interpolate2 = __webpack_require__(516);
29056
29057 var _Interpolate3 = _interopRequireDefault(_Interpolate2);
29058
29059 exports.Interpolate = _Interpolate3['default'];
29060
29061 var _Jumbotron2 = __webpack_require__(517);
29062
29063 var _Jumbotron3 = _interopRequireDefault(_Jumbotron2);
29064
29065 exports.Jumbotron = _Jumbotron3['default'];
29066
29067 var _Label2 = __webpack_require__(518);
29068
29069 var _Label3 = _interopRequireDefault(_Label2);
29070
29071 exports.Label = _Label3['default'];
29072
29073 var _ListGroup2 = __webpack_require__(519);
29074
29075 var _ListGroup3 = _interopRequireDefault(_ListGroup2);
29076
29077 exports.ListGroup = _ListGroup3['default'];
29078
29079 var _ListGroupItem2 = __webpack_require__(520);
29080
29081 var _ListGroupItem3 = _interopRequireDefault(_ListGroupItem2);
29082
29083 exports.ListGroupItem = _ListGroupItem3['default'];
29084
29085 var _Media2 = __webpack_require__(521);
29086
29087 var _Media3 = _interopRequireDefault(_Media2);
29088
29089 exports.Media = _Media3['default'];
29090
29091 var _MenuItem2 = __webpack_require__(528);
29092
29093 var _MenuItem3 = _interopRequireDefault(_MenuItem2);
29094
29095 exports.MenuItem = _MenuItem3['default'];
29096
29097 var _Modal2 = __webpack_require__(529);
29098
29099 var _Modal3 = _interopRequireDefault(_Modal2);
29100
29101 exports.Modal = _Modal3['default'];
29102
29103 var _ModalBody2 = __webpack_require__(551);
29104
29105 var _ModalBody3 = _interopRequireDefault(_ModalBody2);
29106
29107 exports.ModalBody = _ModalBody3['default'];
29108
29109 var _ModalFooter2 = __webpack_require__(554);
29110
29111 var _ModalFooter3 = _interopRequireDefault(_ModalFooter2);
29112
29113 exports.ModalFooter = _ModalFooter3['default'];
29114
29115 var _ModalHeader2 = __webpack_require__(552);
29116
29117 var _ModalHeader3 = _interopRequireDefault(_ModalHeader2);
29118
29119 exports.ModalHeader = _ModalHeader3['default'];
29120
29121 var _ModalTitle2 = __webpack_require__(553);
29122
29123 var _ModalTitle3 = _interopRequireDefault(_ModalTitle2);
29124
29125 exports.ModalTitle = _ModalTitle3['default'];
29126
29127 var _Nav2 = __webpack_require__(555);
29128
29129 var _Nav3 = _interopRequireDefault(_Nav2);
29130
29131 exports.Nav = _Nav3['default'];
29132
29133 var _Navbar2 = __webpack_require__(557);
29134
29135 var _Navbar3 = _interopRequireDefault(_Navbar2);
29136
29137 exports.Navbar = _Navbar3['default'];
29138
29139 var _NavbarBrand2 = __webpack_require__(558);
29140
29141 var _NavbarBrand3 = _interopRequireDefault(_NavbarBrand2);
29142
29143 exports.NavbarBrand = _NavbarBrand3['default'];
29144
29145 var _NavDropdown2 = __webpack_require__(562);
29146
29147 var _NavDropdown3 = _interopRequireDefault(_NavDropdown2);
29148
29149 exports.NavDropdown = _NavDropdown3['default'];
29150
29151 var _NavItem2 = __webpack_require__(563);
29152
29153 var _NavItem3 = _interopRequireDefault(_NavItem2);
29154
29155 exports.NavItem = _NavItem3['default'];
29156
29157 var _Overlay2 = __webpack_require__(564);
29158
29159 var _Overlay3 = _interopRequireDefault(_Overlay2);
29160
29161 exports.Overlay = _Overlay3['default'];
29162
29163 var _OverlayTrigger2 = __webpack_require__(573);
29164
29165 var _OverlayTrigger3 = _interopRequireDefault(_OverlayTrigger2);
29166
29167 exports.OverlayTrigger = _OverlayTrigger3['default'];
29168
29169 var _PageHeader2 = __webpack_require__(574);
29170
29171 var _PageHeader3 = _interopRequireDefault(_PageHeader2);
29172
29173 exports.PageHeader = _PageHeader3['default'];
29174
29175 var _PageItem2 = __webpack_require__(575);
29176
29177 var _PageItem3 = _interopRequireDefault(_PageItem2);
29178
29179 exports.PageItem = _PageItem3['default'];
29180
29181 var _Pager2 = __webpack_require__(576);
29182
29183 var _Pager3 = _interopRequireDefault(_Pager2);
29184
29185 exports.Pager = _Pager3['default'];
29186
29187 var _Pagination2 = __webpack_require__(577);
29188
29189 var _Pagination3 = _interopRequireDefault(_Pagination2);
29190
29191 exports.Pagination = _Pagination3['default'];
29192
29193 var _Panel2 = __webpack_require__(579);
29194
29195 var _Panel3 = _interopRequireDefault(_Panel2);
29196
29197 exports.Panel = _Panel3['default'];
29198
29199 var _PanelGroup2 = __webpack_require__(354);
29200
29201 var _PanelGroup3 = _interopRequireDefault(_PanelGroup2);
29202
29203 exports.PanelGroup = _PanelGroup3['default'];
29204
29205 var _Popover2 = __webpack_require__(580);
29206
29207 var _Popover3 = _interopRequireDefault(_Popover2);
29208
29209 exports.Popover = _Popover3['default'];
29210
29211 var _ProgressBar2 = __webpack_require__(581);
29212
29213 var _ProgressBar3 = _interopRequireDefault(_ProgressBar2);
29214
29215 exports.ProgressBar = _ProgressBar3['default'];
29216
29217 var _Radio2 = __webpack_require__(582);
29218
29219 var _Radio3 = _interopRequireDefault(_Radio2);
29220
29221 exports.Radio = _Radio3['default'];
29222
29223 var _ResponsiveEmbed2 = __webpack_require__(583);
29224
29225 var _ResponsiveEmbed3 = _interopRequireDefault(_ResponsiveEmbed2);
29226
29227 exports.ResponsiveEmbed = _ResponsiveEmbed3['default'];
29228
29229 var _Row2 = __webpack_require__(584);
29230
29231 var _Row3 = _interopRequireDefault(_Row2);
29232
29233 exports.Row = _Row3['default'];
29234
29235 var _SafeAnchor2 = __webpack_require__(371);
29236
29237 var _SafeAnchor3 = _interopRequireDefault(_SafeAnchor2);
29238
29239 exports.SafeAnchor = _SafeAnchor3['default'];
29240
29241 var _SplitButton2 = __webpack_require__(585);
29242
29243 var _SplitButton3 = _interopRequireDefault(_SplitButton2);
29244
29245 exports.SplitButton = _SplitButton3['default'];
29246
29247 var _Tab2 = __webpack_require__(587);
29248
29249 var _Tab3 = _interopRequireDefault(_Tab2);
29250
29251 exports.Tab = _Tab3['default'];
29252
29253 var _TabContainer2 = __webpack_require__(589);
29254
29255 var _TabContainer3 = _interopRequireDefault(_TabContainer2);
29256
29257 exports.TabContainer = _TabContainer3['default'];
29258
29259 var _TabContent2 = __webpack_require__(590);
29260
29261 var _TabContent3 = _interopRequireDefault(_TabContent2);
29262
29263 exports.TabContent = _TabContent3['default'];
29264
29265 var _Table2 = __webpack_require__(591);
29266
29267 var _Table3 = _interopRequireDefault(_Table2);
29268
29269 exports.Table = _Table3['default'];
29270
29271 var _TabPane2 = __webpack_require__(588);
29272
29273 var _TabPane3 = _interopRequireDefault(_TabPane2);
29274
29275 exports.TabPane = _TabPane3['default'];
29276
29277 var _Tabs2 = __webpack_require__(592);
29278
29279 var _Tabs3 = _interopRequireDefault(_Tabs2);
29280
29281 exports.Tabs = _Tabs3['default'];
29282
29283 var _Thumbnail2 = __webpack_require__(593);
29284
29285 var _Thumbnail3 = _interopRequireDefault(_Thumbnail2);
29286
29287 exports.Thumbnail = _Thumbnail3['default'];
29288
29289 var _Tooltip2 = __webpack_require__(594);
29290
29291 var _Tooltip3 = _interopRequireDefault(_Tooltip2);
29292
29293 exports.Tooltip = _Tooltip3['default'];
29294
29295 var _Well2 = __webpack_require__(595);
29296
29297 var _Well3 = _interopRequireDefault(_Well2);
29298
29299 exports.Well = _Well3['default'];
29300
29301 var _FormControls2 = __webpack_require__(511);
29302
29303 var _FormControls = _interopRequireWildcard(_FormControls2);
29304
29305 exports.FormControls = _FormControls;
29306
29307 var _utils2 = __webpack_require__(596);
29308
29309 var _utils = _interopRequireWildcard(_utils2);
29310
29311 exports.utils = _utils;
29312
29313/***/ },
29314/* 335 */
29315/***/ function(module, exports) {
29316
29317 "use strict";
29318
29319 exports["default"] = function (obj) {
29320 return obj && obj.__esModule ? obj : {
29321 "default": obj
29322 };
29323 };
29324
29325 exports.__esModule = true;
29326
29327/***/ },
29328/* 336 */
29329/***/ function(module, exports) {
29330
29331 "use strict";
29332
29333 exports["default"] = function (obj) {
29334 if (obj && obj.__esModule) {
29335 return obj;
29336 } else {
29337 var newObj = {};
29338
29339 if (obj != null) {
29340 for (var key in obj) {
29341 if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
29342 }
29343 }
29344
29345 newObj["default"] = obj;
29346 return newObj;
29347 }
29348 };
29349
29350 exports.__esModule = true;
29351
29352/***/ },
29353/* 337 */
29354/***/ function(module, exports, __webpack_require__) {
29355
29356 'use strict';
29357
29358 var _extends = __webpack_require__(338)['default'];
29359
29360 var _interopRequireDefault = __webpack_require__(335)['default'];
29361
29362 exports.__esModule = true;
29363
29364 var _react = __webpack_require__(89);
29365
29366 var _react2 = _interopRequireDefault(_react);
29367
29368 var _PanelGroup = __webpack_require__(354);
29369
29370 var _PanelGroup2 = _interopRequireDefault(_PanelGroup);
29371
29372 var Accordion = _react2['default'].createClass({
29373 displayName: 'Accordion',
29374
29375 render: function render() {
29376 return _react2['default'].createElement(
29377 _PanelGroup2['default'],
29378 _extends({}, this.props, { accordion: true }),
29379 this.props.children
29380 );
29381 }
29382 });
29383
29384 exports['default'] = Accordion;
29385 module.exports = exports['default'];
29386
29387/***/ },
29388/* 338 */
29389/***/ function(module, exports, __webpack_require__) {
29390
29391 "use strict";
29392
29393 var _Object$assign = __webpack_require__(339)["default"];
29394
29395 exports["default"] = _Object$assign || function (target) {
29396 for (var i = 1; i < arguments.length; i++) {
29397 var source = arguments[i];
29398
29399 for (var key in source) {
29400 if (Object.prototype.hasOwnProperty.call(source, key)) {
29401 target[key] = source[key];
29402 }
29403 }
29404 }
29405
29406 return target;
29407 };
29408
29409 exports.__esModule = true;
29410
29411/***/ },
29412/* 339 */
29413/***/ function(module, exports, __webpack_require__) {
29414
29415 module.exports = { "default": __webpack_require__(340), __esModule: true };
29416
29417/***/ },
29418/* 340 */
29419/***/ function(module, exports, __webpack_require__) {
29420
29421 __webpack_require__(341);
29422 module.exports = __webpack_require__(344).Object.assign;
29423
29424/***/ },
29425/* 341 */
29426/***/ function(module, exports, __webpack_require__) {
29427
29428 // 19.1.3.1 Object.assign(target, source)
29429 var $export = __webpack_require__(342);
29430
29431 $export($export.S + $export.F, 'Object', {assign: __webpack_require__(347)});
29432
29433/***/ },
29434/* 342 */
29435/***/ function(module, exports, __webpack_require__) {
29436
29437 var global = __webpack_require__(343)
29438 , core = __webpack_require__(344)
29439 , ctx = __webpack_require__(345)
29440 , PROTOTYPE = 'prototype';
29441
29442 var $export = function(type, name, source){
29443 var IS_FORCED = type & $export.F
29444 , IS_GLOBAL = type & $export.G
29445 , IS_STATIC = type & $export.S
29446 , IS_PROTO = type & $export.P
29447 , IS_BIND = type & $export.B
29448 , IS_WRAP = type & $export.W
29449 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
29450 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
29451 , key, own, out;
29452 if(IS_GLOBAL)source = name;
29453 for(key in source){
29454 // contains in native
29455 own = !IS_FORCED && target && key in target;
29456 if(own && key in exports)continue;
29457 // export native or passed
29458 out = own ? target[key] : source[key];
29459 // prevent global pollution for namespaces
29460 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
29461 // bind timers to global for call from export context
29462 : IS_BIND && own ? ctx(out, global)
29463 // wrap global constructors for prevent change them in library
29464 : IS_WRAP && target[key] == out ? (function(C){
29465 var F = function(param){
29466 return this instanceof C ? new C(param) : C(param);
29467 };
29468 F[PROTOTYPE] = C[PROTOTYPE];
29469 return F;
29470 // make static versions for prototype methods
29471 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
29472 if(IS_PROTO)(exports[PROTOTYPE] || (exports[PROTOTYPE] = {}))[key] = out;
29473 }
29474 };
29475 // type bitmap
29476 $export.F = 1; // forced
29477 $export.G = 2; // global
29478 $export.S = 4; // static
29479 $export.P = 8; // proto
29480 $export.B = 16; // bind
29481 $export.W = 32; // wrap
29482 module.exports = $export;
29483
29484/***/ },
29485/* 343 */
29486/***/ function(module, exports) {
29487
29488 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
29489 var global = module.exports = typeof window != 'undefined' && window.Math == Math
29490 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
29491 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
29492
29493/***/ },
29494/* 344 */
29495/***/ function(module, exports) {
29496
29497 var core = module.exports = {version: '1.2.6'};
29498 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
29499
29500/***/ },
29501/* 345 */
29502/***/ function(module, exports, __webpack_require__) {
29503
29504 // optional / simple context binding
29505 var aFunction = __webpack_require__(346);
29506 module.exports = function(fn, that, length){
29507 aFunction(fn);
29508 if(that === undefined)return fn;
29509 switch(length){
29510 case 1: return function(a){
29511 return fn.call(that, a);
29512 };
29513 case 2: return function(a, b){
29514 return fn.call(that, a, b);
29515 };
29516 case 3: return function(a, b, c){
29517 return fn.call(that, a, b, c);
29518 };
29519 }
29520 return function(/* ...args */){
29521 return fn.apply(that, arguments);
29522 };
29523 };
29524
29525/***/ },
29526/* 346 */
29527/***/ function(module, exports) {
29528
29529 module.exports = function(it){
29530 if(typeof it != 'function')throw TypeError(it + ' is not a function!');
29531 return it;
29532 };
29533
29534/***/ },
29535/* 347 */
29536/***/ function(module, exports, __webpack_require__) {
29537
29538 // 19.1.2.1 Object.assign(target, source, ...)
29539 var $ = __webpack_require__(348)
29540 , toObject = __webpack_require__(349)
29541 , IObject = __webpack_require__(351);
29542
29543 // should work with symbols and should have deterministic property order (V8 bug)
29544 module.exports = __webpack_require__(353)(function(){
29545 var a = Object.assign
29546 , A = {}
29547 , B = {}
29548 , S = Symbol()
29549 , K = 'abcdefghijklmnopqrst';
29550 A[S] = 7;
29551 K.split('').forEach(function(k){ B[k] = k; });
29552 return a({}, A)[S] != 7 || Object.keys(a({}, B)).join('') != K;
29553 }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
29554 var T = toObject(target)
29555 , $$ = arguments
29556 , $$len = $$.length
29557 , index = 1
29558 , getKeys = $.getKeys
29559 , getSymbols = $.getSymbols
29560 , isEnum = $.isEnum;
29561 while($$len > index){
29562 var S = IObject($$[index++])
29563 , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
29564 , length = keys.length
29565 , j = 0
29566 , key;
29567 while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
29568 }
29569 return T;
29570 } : Object.assign;
29571
29572/***/ },
29573/* 348 */
29574/***/ function(module, exports) {
29575
29576 var $Object = Object;
29577 module.exports = {
29578 create: $Object.create,
29579 getProto: $Object.getPrototypeOf,
29580 isEnum: {}.propertyIsEnumerable,
29581 getDesc: $Object.getOwnPropertyDescriptor,
29582 setDesc: $Object.defineProperty,
29583 setDescs: $Object.defineProperties,
29584 getKeys: $Object.keys,
29585 getNames: $Object.getOwnPropertyNames,
29586 getSymbols: $Object.getOwnPropertySymbols,
29587 each: [].forEach
29588 };
29589
29590/***/ },
29591/* 349 */
29592/***/ function(module, exports, __webpack_require__) {
29593
29594 // 7.1.13 ToObject(argument)
29595 var defined = __webpack_require__(350);
29596 module.exports = function(it){
29597 return Object(defined(it));
29598 };
29599
29600/***/ },
29601/* 350 */
29602/***/ function(module, exports) {
29603
29604 // 7.2.1 RequireObjectCoercible(argument)
29605 module.exports = function(it){
29606 if(it == undefined)throw TypeError("Can't call method on " + it);
29607 return it;
29608 };
29609
29610/***/ },
29611/* 351 */
29612/***/ function(module, exports, __webpack_require__) {
29613
29614 // fallback for non-array-like ES3 and non-enumerable old V8 strings
29615 var cof = __webpack_require__(352);
29616 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
29617 return cof(it) == 'String' ? it.split('') : Object(it);
29618 };
29619
29620/***/ },
29621/* 352 */
29622/***/ function(module, exports) {
29623
29624 var toString = {}.toString;
29625
29626 module.exports = function(it){
29627 return toString.call(it).slice(8, -1);
29628 };
29629
29630/***/ },
29631/* 353 */
29632/***/ function(module, exports) {
29633
29634 module.exports = function(exec){
29635 try {
29636 return !!exec();
29637 } catch(e){
29638 return true;
29639 }
29640 };
29641
29642/***/ },
29643/* 354 */
29644/***/ function(module, exports, __webpack_require__) {
29645
29646 'use strict';
29647
29648 var _objectWithoutProperties = __webpack_require__(355)['default'];
29649
29650 var _extends = __webpack_require__(338)['default'];
29651
29652 var _interopRequireDefault = __webpack_require__(335)['default'];
29653
29654 exports.__esModule = true;
29655
29656 var _classnames = __webpack_require__(356);
29657
29658 var _classnames2 = _interopRequireDefault(_classnames);
29659
29660 var _react = __webpack_require__(89);
29661
29662 var _react2 = _interopRequireDefault(_react);
29663
29664 var _utilsBootstrapUtils = __webpack_require__(357);
29665
29666 var _utilsValidComponentChildren = __webpack_require__(365);
29667
29668 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
29669
29670 var PanelGroup = _react2['default'].createClass({
29671 displayName: 'PanelGroup',
29672
29673 propTypes: {
29674 accordion: _react2['default'].PropTypes.bool,
29675 activeKey: _react2['default'].PropTypes.any,
29676 className: _react2['default'].PropTypes.string,
29677 children: _react2['default'].PropTypes.node,
29678 defaultActiveKey: _react2['default'].PropTypes.any,
29679 onSelect: _react2['default'].PropTypes.func
29680 },
29681
29682 getDefaultProps: function getDefaultProps() {
29683 return {
29684 accordion: false
29685 };
29686 },
29687
29688 getInitialState: function getInitialState() {
29689 var defaultActiveKey = this.props.defaultActiveKey;
29690
29691 return {
29692 activeKey: defaultActiveKey
29693 };
29694 },
29695
29696 render: function render() {
29697 var classes = _utilsBootstrapUtils.getClassSet(this.props);
29698 var _props = this.props;
29699 var className = _props.className;
29700
29701 var props = _objectWithoutProperties(_props, ['className']);
29702
29703 if (this.props.accordion) {
29704 props.role = 'tablist';
29705 }
29706 return _react2['default'].createElement(
29707 'div',
29708 _extends({}, props, { className: _classnames2['default'](className, classes), onSelect: null }),
29709 _utilsValidComponentChildren2['default'].map(props.children, this.renderPanel)
29710 );
29711 },
29712
29713 renderPanel: function renderPanel(child, index) {
29714 var activeKey = this.props.activeKey != null ? this.props.activeKey : this.state.activeKey;
29715
29716 var props = {
29717 bsStyle: child.props.bsStyle || this.props.bsStyle,
29718 key: child.key ? child.key : index,
29719 ref: child.ref
29720 };
29721
29722 if (this.props.accordion) {
29723 props.headerRole = 'tab';
29724 props.panelRole = 'tabpanel';
29725 props.collapsible = true;
29726 props.expanded = child.props.eventKey === activeKey;
29727 props.onSelect = this.handleSelect;
29728 }
29729
29730 return _react.cloneElement(child, props);
29731 },
29732
29733 shouldComponentUpdate: function shouldComponentUpdate() {
29734 // Defer any updates to this component during the `onSelect` handler.
29735 return !this._isChanging;
29736 },
29737
29738 handleSelect: function handleSelect(key, e) {
29739 e.preventDefault();
29740
29741 if (this.props.onSelect) {
29742 this._isChanging = true;
29743 this.props.onSelect(key, e);
29744 this._isChanging = false;
29745 }
29746
29747 if (this.state.activeKey === key) {
29748 key = null;
29749 }
29750
29751 this.setState({
29752 activeKey: key
29753 });
29754 }
29755 });
29756
29757 exports['default'] = _utilsBootstrapUtils.bsClass('panel-group', PanelGroup);
29758 module.exports = exports['default'];
29759
29760/***/ },
29761/* 355 */
29762/***/ function(module, exports) {
29763
29764 "use strict";
29765
29766 exports["default"] = function (obj, keys) {
29767 var target = {};
29768
29769 for (var i in obj) {
29770 if (keys.indexOf(i) >= 0) continue;
29771 if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
29772 target[i] = obj[i];
29773 }
29774
29775 return target;
29776 };
29777
29778 exports.__esModule = true;
29779
29780/***/ },
29781/* 356 */
29782/***/ function(module, exports, __webpack_require__) {
29783
29784 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
29785 Copyright (c) 2016 Jed Watson.
29786 Licensed under the MIT License (MIT), see
29787 http://jedwatson.github.io/classnames
29788 */
29789 /* global define */
29790
29791 (function () {
29792 'use strict';
29793
29794 var hasOwn = {}.hasOwnProperty;
29795
29796 function classNames () {
29797 var classes = [];
29798
29799 for (var i = 0; i < arguments.length; i++) {
29800 var arg = arguments[i];
29801 if (!arg) continue;
29802
29803 var argType = typeof arg;
29804
29805 if (argType === 'string' || argType === 'number') {
29806 classes.push(arg);
29807 } else if (Array.isArray(arg)) {
29808 classes.push(classNames.apply(null, arg));
29809 } else if (argType === 'object') {
29810 for (var key in arg) {
29811 if (hasOwn.call(arg, key) && arg[key]) {
29812 classes.push(key);
29813 }
29814 }
29815 }
29816 }
29817
29818 return classes.join(' ');
29819 }
29820
29821 if (typeof module !== 'undefined' && module.exports) {
29822 module.exports = classNames;
29823 } else if (true) {
29824 // register as 'classnames', consistent with npm package name
29825 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
29826 return classNames;
29827 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
29828 } else {
29829 window.classNames = classNames;
29830 }
29831 }());
29832
29833
29834/***/ },
29835/* 357 */
29836/***/ function(module, exports, __webpack_require__) {
29837
29838 'use strict';
29839
29840 var _extends = __webpack_require__(338)['default'];
29841
29842 var _interopRequireDefault = __webpack_require__(335)['default'];
29843
29844 exports.__esModule = true;
29845 exports.prefix = prefix;
29846 exports.getClassSet = getClassSet;
29847 exports.addStyle = addStyle;
29848
29849 var _react = __webpack_require__(89);
29850
29851 var _styleMaps = __webpack_require__(358);
29852
29853 var _styleMaps2 = _interopRequireDefault(_styleMaps);
29854
29855 var _invariant = __webpack_require__(268);
29856
29857 var _invariant2 = _interopRequireDefault(_invariant);
29858
29859 function curry(fn) {
29860 return function () {
29861 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
29862 args[_key] = arguments[_key];
29863 }
29864
29865 var last = args[args.length - 1];
29866 if (typeof last === 'function') {
29867 return fn.apply(undefined, args);
29868 }
29869 return function (Component) {
29870 return fn.apply(undefined, args.concat([Component]));
29871 };
29872 };
29873 }
29874
29875 function prefix(props, variant) {
29876 if (props === undefined) props = {};
29877
29878 !(props.bsClass || '').trim() ? (undefined) !== 'production' ? _invariant2['default'](false, 'A `bsClass` prop is required for this component') : _invariant2['default'](false) : undefined;
29879 return props.bsClass + (variant ? '-' + variant : '');
29880 }
29881
29882 var bsClass = curry(function (defaultClass, Component) {
29883 var propTypes = Component.propTypes || (Component.propTypes = {});
29884 var defaultProps = Component.defaultProps || (Component.defaultProps = {});
29885
29886 propTypes.bsClass = _react.PropTypes.string;
29887 defaultProps.bsClass = defaultClass;
29888
29889 return Component;
29890 });
29891
29892 exports.bsClass = bsClass;
29893 var bsStyles = curry(function (styles, defaultStyle, Component) {
29894 if (typeof defaultStyle !== 'string') {
29895 Component = defaultStyle;
29896 defaultStyle = undefined;
29897 }
29898
29899 var existing = Component.STYLES || [];
29900 var propTypes = Component.propTypes || {};
29901
29902 styles.forEach(function (style) {
29903 if (existing.indexOf(style) === -1) {
29904 existing.push(style);
29905 }
29906 });
29907
29908 var propType = _react.PropTypes.oneOf(existing);
29909
29910 // expose the values on the propType function for documentation
29911 Component.STYLES = propType._values = existing;
29912
29913 Component.propTypes = _extends({}, propTypes, {
29914 bsStyle: propType
29915 });
29916
29917 if (defaultStyle !== undefined) {
29918 var defaultProps = Component.defaultProps || (Component.defaultProps = {});
29919 defaultProps.bsStyle = defaultStyle;
29920 }
29921
29922 return Component;
29923 });
29924
29925 exports.bsStyles = bsStyles;
29926 var bsSizes = curry(function (sizes, defaultSize, Component) {
29927 if (typeof defaultSize !== 'string') {
29928 Component = defaultSize;
29929 defaultSize = undefined;
29930 }
29931
29932 var existing = Component.SIZES || [];
29933 var propTypes = Component.propTypes || {};
29934
29935 sizes.forEach(function (size) {
29936 if (existing.indexOf(size) === -1) {
29937 existing.push(size);
29938 }
29939 });
29940
29941 var values = [];
29942 existing.forEach(function (size) {
29943 var mappedSize = _styleMaps2['default'].SIZES[size];
29944 if (mappedSize && mappedSize !== size) {
29945 values.push(mappedSize);
29946 }
29947
29948 values.push(size);
29949 });
29950
29951 var propType = _react.PropTypes.oneOf(values);
29952 propType._values = values;
29953
29954 // expose the values on the propType function for documentation
29955 Component.SIZES = existing;
29956
29957 Component.propTypes = _extends({}, propTypes, {
29958 bsSize: propType
29959 });
29960
29961 if (defaultSize !== undefined) {
29962 if (!Component.defaultProps) {
29963 Component.defaultProps = {};
29964 }
29965 Component.defaultProps.bsSize = defaultSize;
29966 }
29967
29968 return Component;
29969 });
29970
29971 exports.bsSizes = bsSizes;
29972
29973 function getClassSet(props) {
29974 var _classes;
29975
29976 var classes = (_classes = {}, _classes[prefix(props)] = true, _classes);
29977
29978 if (props.bsSize) {
29979 var bsSize = _styleMaps2['default'].SIZES[props.bsSize] || bsSize;
29980 classes[prefix(props, bsSize)] = true;
29981 }
29982
29983 if (props.bsStyle) {
29984 classes[prefix(props, props.bsStyle)] = true;
29985 }
29986
29987 return classes;
29988 }
29989
29990 /**
29991 * Add a style variant to a Component. Mutates the propTypes of the component
29992 * in order to validate the new variant.
29993 */
29994
29995 function addStyle(Component) {
29996 for (var _len2 = arguments.length, styleVariant = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
29997 styleVariant[_key2 - 1] = arguments[_key2];
29998 }
29999
30000 bsStyles(styleVariant, Component);
30001 }
30002
30003 var _curry = curry;
30004 exports._curry = _curry;
30005
30006/***/ },
30007/* 358 */
30008/***/ function(module, exports, __webpack_require__) {
30009
30010 'use strict';
30011
30012 var _Object$assign = __webpack_require__(339)['default'];
30013
30014 var _Object$create = __webpack_require__(359)['default'];
30015
30016 var _Object$keys = __webpack_require__(361)['default'];
30017
30018 exports.__esModule = true;
30019
30020 var constant = function constant(obj) {
30021 return _Object$assign(_Object$create({
30022 values: function values() {
30023 var _this = this;
30024
30025 return _Object$keys(this).map(function (k) {
30026 return _this[k];
30027 });
30028 }
30029 }), obj);
30030 };
30031
30032 var styleMaps = {
30033
30034 SIZES: {
30035 'large': 'lg',
30036 'medium': 'md',
30037 'small': 'sm',
30038 'xsmall': 'xs',
30039 'lg': 'lg',
30040 'md': 'md',
30041 'sm': 'sm',
30042 'xs': 'xs'
30043 },
30044 GRID_COLUMNS: 12
30045 };
30046
30047 var Sizes = constant({
30048 LARGE: 'large',
30049 MEDIUM: 'medium',
30050 SMALL: 'small',
30051 XSMALL: 'xsmall'
30052 });
30053
30054 exports.Sizes = Sizes;
30055 var State = constant({
30056 SUCCESS: 'success',
30057 WARNING: 'warning',
30058 DANGER: 'danger',
30059 INFO: 'info'
30060 });
30061
30062 exports.State = State;
30063 var DEFAULT = 'default';
30064 exports.DEFAULT = DEFAULT;
30065 var PRIMARY = 'primary';
30066 exports.PRIMARY = PRIMARY;
30067 var LINK = 'link';
30068 exports.LINK = LINK;
30069 var INVERSE = 'inverse';
30070
30071 exports.INVERSE = INVERSE;
30072 exports['default'] = styleMaps;
30073
30074/***/ },
30075/* 359 */
30076/***/ function(module, exports, __webpack_require__) {
30077
30078 module.exports = { "default": __webpack_require__(360), __esModule: true };
30079
30080/***/ },
30081/* 360 */
30082/***/ function(module, exports, __webpack_require__) {
30083
30084 var $ = __webpack_require__(348);
30085 module.exports = function create(P, D){
30086 return $.create(P, D);
30087 };
30088
30089/***/ },
30090/* 361 */
30091/***/ function(module, exports, __webpack_require__) {
30092
30093 module.exports = { "default": __webpack_require__(362), __esModule: true };
30094
30095/***/ },
30096/* 362 */
30097/***/ function(module, exports, __webpack_require__) {
30098
30099 __webpack_require__(363);
30100 module.exports = __webpack_require__(344).Object.keys;
30101
30102/***/ },
30103/* 363 */
30104/***/ function(module, exports, __webpack_require__) {
30105
30106 // 19.1.2.14 Object.keys(O)
30107 var toObject = __webpack_require__(349);
30108
30109 __webpack_require__(364)('keys', function($keys){
30110 return function keys(it){
30111 return $keys(toObject(it));
30112 };
30113 });
30114
30115/***/ },
30116/* 364 */
30117/***/ function(module, exports, __webpack_require__) {
30118
30119 // most Object methods by ES6 should accept primitives
30120 var $export = __webpack_require__(342)
30121 , core = __webpack_require__(344)
30122 , fails = __webpack_require__(353);
30123 module.exports = function(KEY, exec){
30124 var fn = (core.Object || {})[KEY] || Object[KEY]
30125 , exp = {};
30126 exp[KEY] = exec(fn);
30127 $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp);
30128 };
30129
30130/***/ },
30131/* 365 */
30132/***/ function(module, exports, __webpack_require__) {
30133
30134 'use strict';
30135
30136 var _interopRequireDefault = __webpack_require__(335)['default'];
30137
30138 exports.__esModule = true;
30139
30140 var _react = __webpack_require__(89);
30141
30142 var _react2 = _interopRequireDefault(_react);
30143
30144 // FIXME: This should really be ValidElementChildren.
30145
30146 /**
30147 * Iterates through children that are typically specified as `props.children`,
30148 * but only maps over children that are "valid components".
30149 *
30150 * The mapFunction provided index will be normalised to the components mapped,
30151 * so an invalid component would not increase the index.
30152 *
30153 * @param {?*} children Children tree container.
30154 * @param {function(*, int)} func.
30155 * @param {*} context Context for func.
30156 * @return {object} Object containing the ordered map of results.
30157 */
30158 function map(children, func, context) {
30159 var index = 0;
30160
30161 return _react2['default'].Children.map(children, function (child) {
30162 if (!_react2['default'].isValidElement(child)) {
30163 return child;
30164 }
30165
30166 return func.call(context, child, index++);
30167 });
30168 }
30169
30170 /**
30171 * Iterates through children that are "valid components".
30172 *
30173 * The provided forEachFunc(child, index) will be called for each
30174 * leaf child with the index reflecting the position relative to "valid components".
30175 *
30176 * @param {?*} children Children tree container.
30177 * @param {function(*, int)} func.
30178 * @param {*} context Context for context.
30179 */
30180 function forEach(children, func, context) {
30181 var index = 0;
30182
30183 _react2['default'].Children.forEach(children, function (child) {
30184 if (!_react2['default'].isValidElement(child)) {
30185 return;
30186 }
30187
30188 func.call(context, child, index++);
30189 });
30190 }
30191
30192 /**
30193 * Count the number of "valid components" in the Children container.
30194 *
30195 * @param {?*} children Children tree container.
30196 * @returns {number}
30197 */
30198 function count(children) {
30199 var result = 0;
30200
30201 _react2['default'].Children.forEach(children, function (child) {
30202 if (!_react2['default'].isValidElement(child)) {
30203 return;
30204 }
30205
30206 ++result;
30207 });
30208
30209 return result;
30210 }
30211
30212 /**
30213 * Finds children that are typically specified as `props.children`,
30214 * but only iterates over children that are "valid components".
30215 *
30216 * The provided forEachFunc(child, index) will be called for each
30217 * leaf child with the index reflecting the position relative to "valid components".
30218 *
30219 * @param {?*} children Children tree container.
30220 * @param {function(*, int)} func.
30221 * @param {*} context Context for func.
30222 * @returns {array} of children that meet the func return statement
30223 */
30224 function filter(children, func, context) {
30225 var index = 0;
30226 var result = [];
30227
30228 _react2['default'].Children.forEach(children, function (child) {
30229 if (!_react2['default'].isValidElement(child)) {
30230 return;
30231 }
30232
30233 if (func.call(context, child, index++)) {
30234 result.push(child);
30235 }
30236 });
30237
30238 return result;
30239 }
30240
30241 function find(children, func, context) {
30242 var index = 0;
30243 var result = undefined;
30244
30245 _react2['default'].Children.forEach(children, function (child) {
30246 if (result) {
30247 return;
30248 }
30249 if (!_react2['default'].isValidElement(child)) {
30250 return;
30251 }
30252
30253 if (func.call(context, child, index++)) {
30254 result = child;
30255 }
30256 });
30257
30258 return result;
30259 }
30260
30261 function some(children, func, context) {
30262 var index = 0;
30263 var result = false;
30264
30265 _react2['default'].Children.forEach(children, function (child) {
30266 if (result) {
30267 return;
30268 }
30269 if (!_react2['default'].isValidElement(child)) {
30270 return;
30271 }
30272
30273 if (func.call(context, child, index++)) {
30274 result = true;
30275 }
30276 });
30277
30278 return result;
30279 }
30280
30281 exports['default'] = {
30282 map: map,
30283 forEach: forEach,
30284 count: count,
30285 find: find,
30286 filter: filter,
30287 some: some
30288 };
30289 module.exports = exports['default'];
30290
30291/***/ },
30292/* 366 */
30293/***/ function(module, exports, __webpack_require__) {
30294
30295 'use strict';
30296
30297 var _extends = __webpack_require__(338)['default'];
30298
30299 var _interopRequireDefault = __webpack_require__(335)['default'];
30300
30301 exports.__esModule = true;
30302
30303 var _classnames = __webpack_require__(356);
30304
30305 var _classnames2 = _interopRequireDefault(_classnames);
30306
30307 var _react = __webpack_require__(89);
30308
30309 var _react2 = _interopRequireDefault(_react);
30310
30311 var _reactPropTypesLibDeprecated = __webpack_require__(367);
30312
30313 var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated);
30314
30315 var _styleMaps = __webpack_require__(358);
30316
30317 var _utilsBootstrapUtils = __webpack_require__(357);
30318
30319 var Alert = _react2['default'].createClass({
30320 displayName: 'Alert',
30321
30322 propTypes: {
30323 onDismiss: _react2['default'].PropTypes.func,
30324 /**
30325 * @private
30326 */
30327 dismissAfter: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.number, 'No longer supported.'),
30328 closeLabel: _react2['default'].PropTypes.string
30329 },
30330
30331 getDefaultProps: function getDefaultProps() {
30332 return {
30333 closeLabel: 'Close Alert'
30334 };
30335 },
30336
30337 renderDismissButton: function renderDismissButton() {
30338 return _react2['default'].createElement(
30339 'button',
30340 {
30341 type: 'button',
30342 className: 'close',
30343 onClick: this.props.onDismiss,
30344 'aria-hidden': 'true',
30345 tabIndex: '-1'
30346 },
30347 _react2['default'].createElement(
30348 'span',
30349 null,
30350 '×'
30351 )
30352 );
30353 },
30354
30355 renderSrOnlyDismissButton: function renderSrOnlyDismissButton() {
30356 return _react2['default'].createElement(
30357 'button',
30358 {
30359 type: 'button',
30360 className: 'close sr-only',
30361 onClick: this.props.onDismiss
30362 },
30363 this.props.closeLabel
30364 );
30365 },
30366
30367 render: function render() {
30368 var classes = _utilsBootstrapUtils.getClassSet(this.props);
30369 var isDismissable = !!this.props.onDismiss;
30370
30371 classes[_utilsBootstrapUtils.prefix(this.props, 'dismissable')] = isDismissable;
30372
30373 return _react2['default'].createElement(
30374 'div',
30375 _extends({}, this.props, {
30376 role: 'alert',
30377 className: _classnames2['default'](this.props.className, classes)
30378 }),
30379 isDismissable ? this.renderDismissButton() : null,
30380 this.props.children,
30381 isDismissable ? this.renderSrOnlyDismissButton() : null
30382 );
30383 },
30384
30385 componentDidMount: function componentDidMount() {
30386 if (this.props.dismissAfter && this.props.onDismiss) {
30387 this.dismissTimer = setTimeout(this.props.onDismiss, this.props.dismissAfter);
30388 }
30389 },
30390
30391 componentWillUnmount: function componentWillUnmount() {
30392 clearTimeout(this.dismissTimer);
30393 }
30394 });
30395
30396 exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _styleMaps.State.INFO, _utilsBootstrapUtils.bsClass('alert', Alert));
30397 module.exports = exports['default'];
30398
30399/***/ },
30400/* 367 */
30401/***/ function(module, exports, __webpack_require__) {
30402
30403 'use strict';
30404
30405 exports.__esModule = true;
30406 exports['default'] = deprecated;
30407
30408 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
30409
30410 var _warning = __webpack_require__(271);
30411
30412 var _warning2 = _interopRequireDefault(_warning);
30413
30414 var warned = {};
30415
30416 function deprecated(propType, explanation) {
30417 return function validate(props, propName, componentName) {
30418 if (props[propName] != null) {
30419 var message = '"' + propName + '" property of "' + componentName + '" has been deprecated.\n' + explanation;
30420 if (!warned[message]) {
30421 _warning2['default'](false, message);
30422 warned[message] = true;
30423 }
30424 }
30425
30426 return propType(props, propName, componentName);
30427 };
30428 }
30429
30430 function _resetWarned() {
30431 warned = {};
30432 }
30433
30434 deprecated._resetWarned = _resetWarned;
30435 module.exports = exports['default'];
30436
30437/***/ },
30438/* 368 */
30439/***/ function(module, exports, __webpack_require__) {
30440
30441 'use strict';
30442
30443 var _extends = __webpack_require__(338)['default'];
30444
30445 var _interopRequireDefault = __webpack_require__(335)['default'];
30446
30447 exports.__esModule = true;
30448
30449 var _classnames = __webpack_require__(356);
30450
30451 var _classnames2 = _interopRequireDefault(_classnames);
30452
30453 var _react = __webpack_require__(89);
30454
30455 var _react2 = _interopRequireDefault(_react);
30456
30457 var _utilsBootstrapUtils = __webpack_require__(357);
30458
30459 var _utilsValidComponentChildren = __webpack_require__(365);
30460
30461 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
30462
30463 var Badge = _react2['default'].createClass({
30464 displayName: 'Badge',
30465
30466 propTypes: {
30467 pullRight: _react2['default'].PropTypes.bool
30468 },
30469
30470 getDefaultProps: function getDefaultProps() {
30471 return {
30472 pullRight: false,
30473 bsClass: 'badge'
30474 };
30475 },
30476
30477 hasContent: function hasContent() {
30478 var children = this.props.children;
30479
30480 return _utilsValidComponentChildren2['default'].count(children) > 0 || _react2['default'].Children.count(children) > 1 || typeof children === 'string' || typeof children === 'number';
30481 },
30482
30483 render: function render() {
30484 var _classes;
30485
30486 var classes = (_classes = {
30487 'pull-right': this.props.pullRight
30488 }, _classes[_utilsBootstrapUtils.prefix(this.props)] = this.hasContent(), _classes);
30489 return _react2['default'].createElement(
30490 'span',
30491 _extends({}, this.props, {
30492 className: _classnames2['default'](this.props.className, classes)
30493 }),
30494 this.props.children
30495 );
30496 }
30497 });
30498
30499 exports['default'] = Badge;
30500 module.exports = exports['default'];
30501
30502/***/ },
30503/* 369 */
30504/***/ function(module, exports, __webpack_require__) {
30505
30506 'use strict';
30507
30508 var _objectWithoutProperties = __webpack_require__(355)['default'];
30509
30510 var _extends = __webpack_require__(338)['default'];
30511
30512 var _interopRequireDefault = __webpack_require__(335)['default'];
30513
30514 exports.__esModule = true;
30515
30516 var _react = __webpack_require__(89);
30517
30518 var _react2 = _interopRequireDefault(_react);
30519
30520 var _classnames = __webpack_require__(356);
30521
30522 var _classnames2 = _interopRequireDefault(_classnames);
30523
30524 var _utilsValidComponentChildren = __webpack_require__(365);
30525
30526 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
30527
30528 var _BreadcrumbItem = __webpack_require__(370);
30529
30530 var _BreadcrumbItem2 = _interopRequireDefault(_BreadcrumbItem);
30531
30532 var Breadcrumb = _react2['default'].createClass({
30533 displayName: 'Breadcrumb',
30534
30535 propTypes: {
30536 /**
30537 * bootstrap className
30538 * @private
30539 */
30540 bsClass: _react2['default'].PropTypes.string
30541 },
30542
30543 getDefaultProps: function getDefaultProps() {
30544 return {
30545 bsClass: 'breadcrumb'
30546 };
30547 },
30548
30549 render: function render() {
30550 var _props = this.props;
30551 var className = _props.className;
30552
30553 var props = _objectWithoutProperties(_props, ['className']);
30554
30555 return _react2['default'].createElement(
30556 'ol',
30557 _extends({}, props, {
30558 role: 'navigation',
30559 'aria-label': 'breadcrumbs',
30560 className: _classnames2['default'](className, this.props.bsClass) }),
30561 _utilsValidComponentChildren2['default'].map(this.props.children, this.renderBreadcrumbItem)
30562 );
30563 },
30564
30565 renderBreadcrumbItem: function renderBreadcrumbItem(child, index) {
30566 return _react.cloneElement(child, { key: child.key || index });
30567 }
30568 });
30569
30570 Breadcrumb.Item = _BreadcrumbItem2['default'];
30571
30572 exports['default'] = Breadcrumb;
30573 module.exports = exports['default'];
30574
30575/***/ },
30576/* 370 */
30577/***/ function(module, exports, __webpack_require__) {
30578
30579 'use strict';
30580
30581 var _objectWithoutProperties = __webpack_require__(355)['default'];
30582
30583 var _extends = __webpack_require__(338)['default'];
30584
30585 var _interopRequireDefault = __webpack_require__(335)['default'];
30586
30587 exports.__esModule = true;
30588
30589 var _classnames = __webpack_require__(356);
30590
30591 var _classnames2 = _interopRequireDefault(_classnames);
30592
30593 var _react = __webpack_require__(89);
30594
30595 var _react2 = _interopRequireDefault(_react);
30596
30597 var _SafeAnchor = __webpack_require__(371);
30598
30599 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
30600
30601 var BreadcrumbItem = _react2['default'].createClass({
30602 displayName: 'BreadcrumbItem',
30603
30604 propTypes: {
30605 /**
30606 * If set to true, renders `span` instead of `a`
30607 */
30608 active: _react2['default'].PropTypes.bool,
30609 /**
30610 * HTML id for the wrapper `li` element
30611 */
30612 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
30613 /**
30614 * HTML id for the inner `a` element
30615 */
30616 linkId: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
30617 /**
30618 * `href` attribute for the inner `a` element
30619 */
30620 href: _react2['default'].PropTypes.string,
30621 /**
30622 * `title` attribute for the inner `a` element
30623 */
30624 title: _react2['default'].PropTypes.node,
30625 /**
30626 * `target` attribute for the inner `a` element
30627 */
30628 target: _react2['default'].PropTypes.string
30629 },
30630
30631 getDefaultProps: function getDefaultProps() {
30632 return {
30633 active: false
30634 };
30635 },
30636
30637 render: function render() {
30638 var _props = this.props;
30639 var active = _props.active;
30640 var className = _props.className;
30641 var id = _props.id;
30642 var linkId = _props.linkId;
30643 var children = _props.children;
30644 var href = _props.href;
30645 var title = _props.title;
30646 var target = _props.target;
30647
30648 var props = _objectWithoutProperties(_props, ['active', 'className', 'id', 'linkId', 'children', 'href', 'title', 'target']);
30649
30650 var linkProps = {
30651 href: href,
30652 title: title,
30653 target: target,
30654 id: linkId
30655 };
30656
30657 return _react2['default'].createElement(
30658 'li',
30659 { id: id, className: _classnames2['default'](className, { active: active }) },
30660 active ? _react2['default'].createElement(
30661 'span',
30662 props,
30663 children
30664 ) : _react2['default'].createElement(
30665 _SafeAnchor2['default'],
30666 _extends({}, props, linkProps),
30667 children
30668 )
30669 );
30670 }
30671 });
30672
30673 exports['default'] = BreadcrumbItem;
30674 module.exports = exports['default'];
30675
30676/***/ },
30677/* 371 */
30678/***/ function(module, exports, __webpack_require__) {
30679
30680 'use strict';
30681
30682 var _inherits = __webpack_require__(372)['default'];
30683
30684 var _classCallCheck = __webpack_require__(379)['default'];
30685
30686 var _extends = __webpack_require__(338)['default'];
30687
30688 var _objectWithoutProperties = __webpack_require__(355)['default'];
30689
30690 var _interopRequireDefault = __webpack_require__(335)['default'];
30691
30692 exports.__esModule = true;
30693
30694 var _react = __webpack_require__(89);
30695
30696 var _react2 = _interopRequireDefault(_react);
30697
30698 var _reactPropTypesLibElementType = __webpack_require__(380);
30699
30700 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
30701
30702 function isTrivialHref(href) {
30703 return !href || href.trim() === '#';
30704 }
30705
30706 /**
30707 * There are situations due to browser quirks or bootstrap css where
30708 * an anchor tag is needed, when semantically a button tag is the
30709 * better choice. SafeAnchor ensures that when an anchor is used like a
30710 * button its accessible. It also emulates input `disabled` behavior for
30711 * links, which is usually desirable for Buttons, NavItems, MenuItems, etc.
30712 */
30713
30714 var SafeAnchor = (function (_React$Component) {
30715 _inherits(SafeAnchor, _React$Component);
30716
30717 function SafeAnchor(props) {
30718 _classCallCheck(this, SafeAnchor);
30719
30720 _React$Component.call(this, props);
30721 this.handleClick = this.handleClick.bind(this);
30722 }
30723
30724 SafeAnchor.prototype.render = function render() {
30725 var _props = this.props;
30726 var href = _props.href;
30727 var role = _props.role;
30728 var tabIndex = _props.tabIndex;
30729 var disabled = _props.disabled;
30730 var style = _props.style;
30731
30732 var props = _objectWithoutProperties(_props, ['href', 'role', 'tabIndex', 'disabled', 'style']);
30733
30734 var Component = this.props.componentClass || 'a';
30735
30736 if (isTrivialHref(href)) {
30737 role = role || 'button';
30738 // we want to make sure there is a href attribute on the node
30739 // otherwise, the cursor incorrectly styled (except with role='button')
30740 href = href || '';
30741 }
30742
30743 if (disabled) {
30744 tabIndex = -1;
30745 style = _extends({ pointerEvents: 'none' }, style);
30746 }
30747
30748 return _react2['default'].createElement(Component, _extends({}, props, {
30749 role: role,
30750 href: href,
30751 style: style,
30752 tabIndex: tabIndex,
30753 onClick: this.handleClick
30754 }));
30755 };
30756
30757 SafeAnchor.prototype.handleClick = function handleClick(event) {
30758 var _props2 = this.props;
30759 var disabled = _props2.disabled;
30760 var href = _props2.href;
30761 var onClick = _props2.onClick;
30762
30763 if (disabled || isTrivialHref(href)) {
30764 event.preventDefault();
30765 }
30766
30767 if (disabled) {
30768 event.stopPropagation();
30769 return;
30770 }
30771
30772 if (onClick) {
30773 onClick(event);
30774 }
30775 };
30776
30777 return SafeAnchor;
30778 })(_react2['default'].Component);
30779
30780 exports['default'] = SafeAnchor;
30781
30782 SafeAnchor.propTypes = {
30783 href: _react2['default'].PropTypes.string,
30784 onClick: _react2['default'].PropTypes.func,
30785 disabled: _react2['default'].PropTypes.bool,
30786 role: _react2['default'].PropTypes.string,
30787 tabIndex: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
30788 /**
30789 * this is sort of silly but needed for Button
30790 */
30791 componentClass: _reactPropTypesLibElementType2['default']
30792 };
30793 module.exports = exports['default'];
30794
30795/***/ },
30796/* 372 */
30797/***/ function(module, exports, __webpack_require__) {
30798
30799 "use strict";
30800
30801 var _Object$create = __webpack_require__(359)["default"];
30802
30803 var _Object$setPrototypeOf = __webpack_require__(373)["default"];
30804
30805 exports["default"] = function (subClass, superClass) {
30806 if (typeof superClass !== "function" && superClass !== null) {
30807 throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
30808 }
30809
30810 subClass.prototype = _Object$create(superClass && superClass.prototype, {
30811 constructor: {
30812 value: subClass,
30813 enumerable: false,
30814 writable: true,
30815 configurable: true
30816 }
30817 });
30818 if (superClass) _Object$setPrototypeOf ? _Object$setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
30819 };
30820
30821 exports.__esModule = true;
30822
30823/***/ },
30824/* 373 */
30825/***/ function(module, exports, __webpack_require__) {
30826
30827 module.exports = { "default": __webpack_require__(374), __esModule: true };
30828
30829/***/ },
30830/* 374 */
30831/***/ function(module, exports, __webpack_require__) {
30832
30833 __webpack_require__(375);
30834 module.exports = __webpack_require__(344).Object.setPrototypeOf;
30835
30836/***/ },
30837/* 375 */
30838/***/ function(module, exports, __webpack_require__) {
30839
30840 // 19.1.3.19 Object.setPrototypeOf(O, proto)
30841 var $export = __webpack_require__(342);
30842 $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(376).set});
30843
30844/***/ },
30845/* 376 */
30846/***/ function(module, exports, __webpack_require__) {
30847
30848 // Works with __proto__ only. Old v8 can't work with null proto objects.
30849 /* eslint-disable no-proto */
30850 var getDesc = __webpack_require__(348).getDesc
30851 , isObject = __webpack_require__(377)
30852 , anObject = __webpack_require__(378);
30853 var check = function(O, proto){
30854 anObject(O);
30855 if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
30856 };
30857 module.exports = {
30858 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
30859 function(test, buggy, set){
30860 try {
30861 set = __webpack_require__(345)(Function.call, getDesc(Object.prototype, '__proto__').set, 2);
30862 set(test, []);
30863 buggy = !(test instanceof Array);
30864 } catch(e){ buggy = true; }
30865 return function setPrototypeOf(O, proto){
30866 check(O, proto);
30867 if(buggy)O.__proto__ = proto;
30868 else set(O, proto);
30869 return O;
30870 };
30871 }({}, false) : undefined),
30872 check: check
30873 };
30874
30875/***/ },
30876/* 377 */
30877/***/ function(module, exports) {
30878
30879 module.exports = function(it){
30880 return typeof it === 'object' ? it !== null : typeof it === 'function';
30881 };
30882
30883/***/ },
30884/* 378 */
30885/***/ function(module, exports, __webpack_require__) {
30886
30887 var isObject = __webpack_require__(377);
30888 module.exports = function(it){
30889 if(!isObject(it))throw TypeError(it + ' is not an object!');
30890 return it;
30891 };
30892
30893/***/ },
30894/* 379 */
30895/***/ function(module, exports) {
30896
30897 "use strict";
30898
30899 exports["default"] = function (instance, Constructor) {
30900 if (!(instance instanceof Constructor)) {
30901 throw new TypeError("Cannot call a class as a function");
30902 }
30903 };
30904
30905 exports.__esModule = true;
30906
30907/***/ },
30908/* 380 */
30909/***/ function(module, exports, __webpack_require__) {
30910
30911 'use strict';
30912
30913 exports.__esModule = true;
30914
30915 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
30916
30917 var _react = __webpack_require__(89);
30918
30919 var _react2 = _interopRequireDefault(_react);
30920
30921 var _common = __webpack_require__(381);
30922
30923 /**
30924 * Checks whether a prop provides a type of element.
30925 *
30926 * The type of element can be provided in two forms:
30927 * - tag name (string)
30928 * - a return value of React.createClass(...)
30929 *
30930 * @param props
30931 * @param propName
30932 * @param componentName
30933 * @returns {Error|undefined}
30934 */
30935
30936 function validate(props, propName, componentName) {
30937 var errBeginning = _common.errMsg(props, propName, componentName, '. Expected an Element `type`');
30938
30939 if (typeof props[propName] !== 'function') {
30940 if (_react2['default'].isValidElement(props[propName])) {
30941 return new Error(errBeginning + ', not an actual Element');
30942 }
30943
30944 if (typeof props[propName] !== 'string') {
30945 return new Error(errBeginning + ' such as a tag name or return value of React.createClass(...)');
30946 }
30947 }
30948 }
30949
30950 exports['default'] = _common.createChainableTypeChecker(validate);
30951 module.exports = exports['default'];
30952
30953/***/ },
30954/* 381 */
30955/***/ function(module, exports) {
30956
30957 'use strict';
30958
30959 exports.__esModule = true;
30960 exports.errMsg = errMsg;
30961 exports.createChainableTypeChecker = createChainableTypeChecker;
30962
30963 function errMsg(props, propName, componentName, msgContinuation) {
30964 return 'Invalid prop \'' + propName + '\' of value \'' + props[propName] + '\'' + (' supplied to \'' + componentName + '\'' + msgContinuation);
30965 }
30966
30967 /**
30968 * Create chain-able isRequired validator
30969 *
30970 * Largely copied directly from:
30971 * https://github.com/facebook/react/blob/0.11-stable/src/core/ReactPropTypes.js#L94
30972 */
30973
30974 function createChainableTypeChecker(validate) {
30975 function checkType(isRequired, props, propName, componentName) {
30976 componentName = componentName || '<<anonymous>>';
30977 if (props[propName] == null) {
30978 if (isRequired) {
30979 return new Error('Required prop \'' + propName + '\' was not specified in \'' + componentName + '\'.');
30980 }
30981 } else {
30982 return validate(props, propName, componentName);
30983 }
30984 }
30985
30986 var chainedCheckType = checkType.bind(null, false);
30987 chainedCheckType.isRequired = checkType.bind(null, true);
30988
30989 return chainedCheckType;
30990 }
30991
30992/***/ },
30993/* 382 */
30994/***/ function(module, exports, __webpack_require__) {
30995
30996 'use strict';
30997
30998 var _inherits = __webpack_require__(372)['default'];
30999
31000 var _classCallCheck = __webpack_require__(379)['default'];
31001
31002 var _extends = __webpack_require__(338)['default'];
31003
31004 var _interopRequireDefault = __webpack_require__(335)['default'];
31005
31006 exports.__esModule = true;
31007
31008 var _classnames = __webpack_require__(356);
31009
31010 var _classnames2 = _interopRequireDefault(_classnames);
31011
31012 var _react = __webpack_require__(89);
31013
31014 var _react2 = _interopRequireDefault(_react);
31015
31016 var _reactPropTypesLibElementType = __webpack_require__(380);
31017
31018 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
31019
31020 var _styleMaps = __webpack_require__(358);
31021
31022 var _utilsBootstrapUtils = __webpack_require__(357);
31023
31024 var _SafeAnchor = __webpack_require__(371);
31025
31026 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
31027
31028 var ButtonStyles = _styleMaps.State.values().concat(_styleMaps.DEFAULT, _styleMaps.PRIMARY, _styleMaps.LINK);
31029
31030 var types = ['button', 'reset', 'submit'];
31031
31032 var Button = (function (_React$Component) {
31033 _inherits(Button, _React$Component);
31034
31035 function Button(props, context) {
31036 _classCallCheck(this, Button);
31037
31038 _React$Component.call(this, props, context);
31039 }
31040
31041 Button.prototype.render = function render() {
31042 var _extends2;
31043
31044 var classes = this.props.navDropdown ? {} : _utilsBootstrapUtils.getClassSet(this.props);
31045 var renderFuncName = undefined;
31046
31047 var blockClass = _utilsBootstrapUtils.prefix(this.props, 'block');
31048
31049 classes = _extends((_extends2 = {
31050 active: this.props.active
31051 }, _extends2[blockClass] = this.props.block, _extends2), classes);
31052
31053 if (this.props.navItem) {
31054 return this.renderNavItem(classes);
31055 }
31056
31057 renderFuncName = this.props.href || this.props.target || this.props.navDropdown ? 'renderAnchor' : 'renderButton';
31058
31059 return this[renderFuncName](classes);
31060 };
31061
31062 Button.prototype.renderAnchor = function renderAnchor(classes) {
31063 var _props = this.props;
31064 var disabled = _props.disabled;
31065 var href = _props.href;
31066
31067 classes.disabled = disabled;
31068
31069 return _react2['default'].createElement(
31070 _SafeAnchor2['default'],
31071 _extends({}, this.props, {
31072 href: href || '#',
31073 className: _classnames2['default'](this.props.className, classes)
31074 }),
31075 this.props.children
31076 );
31077 };
31078
31079 Button.prototype.renderButton = function renderButton(classes) {
31080 var Component = this.props.componentClass || 'button';
31081
31082 return _react2['default'].createElement(
31083 Component,
31084 _extends({}, this.props, {
31085 type: this.props.type || 'button',
31086 className: _classnames2['default'](this.props.className, classes) }),
31087 this.props.children
31088 );
31089 };
31090
31091 Button.prototype.renderNavItem = function renderNavItem(classes) {
31092 var liClasses = {
31093 active: this.props.active
31094 };
31095
31096 return _react2['default'].createElement(
31097 'li',
31098 { className: _classnames2['default'](liClasses) },
31099 this.renderAnchor(classes)
31100 );
31101 };
31102
31103 return Button;
31104 })(_react2['default'].Component);
31105
31106 Button.propTypes = {
31107 active: _react2['default'].PropTypes.bool,
31108 disabled: _react2['default'].PropTypes.bool,
31109 block: _react2['default'].PropTypes.bool,
31110 navItem: _react2['default'].PropTypes.bool,
31111 navDropdown: _react2['default'].PropTypes.bool,
31112 onClick: _react2['default'].PropTypes.func,
31113 /**
31114 * You can use a custom element for this component
31115 */
31116 componentClass: _reactPropTypesLibElementType2['default'],
31117 href: _react2['default'].PropTypes.string,
31118 target: _react2['default'].PropTypes.string,
31119 /**
31120 * Defines HTML button type Attribute
31121 * @type {("button"|"reset"|"submit")}
31122 * @defaultValue 'button'
31123 */
31124 type: _react2['default'].PropTypes.oneOf(types)
31125 };
31126
31127 Button.defaultProps = {
31128 active: false,
31129 block: false,
31130 disabled: false,
31131 navItem: false,
31132 navDropdown: false
31133 };
31134
31135 Button.types = types;
31136
31137 exports['default'] = _utilsBootstrapUtils.bsStyles(ButtonStyles, _styleMaps.DEFAULT, _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL, _styleMaps.Sizes.XSMALL], _utilsBootstrapUtils.bsClass('btn', Button)));
31138 module.exports = exports['default'];
31139
31140/***/ },
31141/* 383 */
31142/***/ function(module, exports, __webpack_require__) {
31143
31144 'use strict';
31145
31146 var _extends = __webpack_require__(338)['default'];
31147
31148 var _interopRequireDefault = __webpack_require__(335)['default'];
31149
31150 exports.__esModule = true;
31151
31152 var _classnames = __webpack_require__(356);
31153
31154 var _classnames2 = _interopRequireDefault(_classnames);
31155
31156 var _react = __webpack_require__(89);
31157
31158 var _react2 = _interopRequireDefault(_react);
31159
31160 var _reactPropTypesLibAll = __webpack_require__(384);
31161
31162 var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll);
31163
31164 var _utilsBootstrapUtils = __webpack_require__(357);
31165
31166 var _Button = __webpack_require__(382);
31167
31168 var _Button2 = _interopRequireDefault(_Button);
31169
31170 var ButtonGroup = _react2['default'].createClass({
31171 displayName: 'ButtonGroup',
31172
31173 propTypes: {
31174 vertical: _react2['default'].PropTypes.bool,
31175 justified: _react2['default'].PropTypes.bool,
31176 /**
31177 * Display block buttons, only useful when used with the "vertical" prop.
31178 * @type {bool}
31179 */
31180 block: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) {
31181 if (props.block && !props.vertical) {
31182 return new Error('The block property requires the vertical property to be set to have any effect');
31183 }
31184 })
31185 },
31186
31187 getDefaultProps: function getDefaultProps() {
31188 return {
31189 block: false,
31190 justified: false,
31191 vertical: false
31192 };
31193 },
31194
31195 render: function render() {
31196 var classes = _utilsBootstrapUtils.getClassSet(this.props);
31197
31198 classes[_utilsBootstrapUtils.prefix(this.props)] = !this.props.vertical;
31199 classes[_utilsBootstrapUtils.prefix(this.props, 'vertical')] = this.props.vertical;
31200 classes[_utilsBootstrapUtils.prefix(this.props, 'justified')] = this.props.justified;
31201
31202 // this is annoying, since the class is `btn-block` not `btn-group-block`
31203 classes[_utilsBootstrapUtils.prefix(_Button2['default'].defaultProps, 'block')] = this.props.block;
31204
31205 return _react2['default'].createElement(
31206 'div',
31207 _extends({}, this.props, {
31208 className: _classnames2['default'](this.props.className, classes)
31209 }),
31210 this.props.children
31211 );
31212 }
31213 });
31214
31215 exports['default'] = _utilsBootstrapUtils.bsClass('btn-group', ButtonGroup);
31216 module.exports = exports['default'];
31217
31218/***/ },
31219/* 384 */
31220/***/ function(module, exports, __webpack_require__) {
31221
31222 'use strict';
31223
31224 exports.__esModule = true;
31225 exports['default'] = all;
31226
31227 var _common = __webpack_require__(381);
31228
31229 function all() {
31230 for (var _len = arguments.length, propTypes = Array(_len), _key = 0; _key < _len; _key++) {
31231 propTypes[_key] = arguments[_key];
31232 }
31233
31234 if (propTypes === undefined) {
31235 throw new Error('No validations provided');
31236 }
31237
31238 if (propTypes.some(function (propType) {
31239 return typeof propType !== 'function';
31240 })) {
31241 throw new Error('Invalid arguments, must be functions');
31242 }
31243
31244 if (propTypes.length === 0) {
31245 throw new Error('No validations provided');
31246 }
31247
31248 function validate(props, propName, componentName) {
31249 for (var i = 0; i < propTypes.length; i++) {
31250 var result = propTypes[i](props, propName, componentName);
31251
31252 if (result !== undefined && result !== null) {
31253 return result;
31254 }
31255 }
31256 }
31257
31258 return _common.createChainableTypeChecker(validate);
31259 }
31260
31261 module.exports = exports['default'];
31262
31263/***/ },
31264/* 385 */
31265/***/ function(module, exports, __webpack_require__) {
31266
31267 'use strict';
31268
31269 var _inherits = __webpack_require__(372)['default'];
31270
31271 var _classCallCheck = __webpack_require__(379)['default'];
31272
31273 var _objectWithoutProperties = __webpack_require__(355)['default'];
31274
31275 var _extends = __webpack_require__(338)['default'];
31276
31277 var _interopRequireDefault = __webpack_require__(335)['default'];
31278
31279 exports.__esModule = true;
31280
31281 var _react = __webpack_require__(89);
31282
31283 var _react2 = _interopRequireDefault(_react);
31284
31285 var _Button = __webpack_require__(382);
31286
31287 var _Button2 = _interopRequireDefault(_Button);
31288
31289 var _FormGroup = __webpack_require__(386);
31290
31291 var _FormGroup2 = _interopRequireDefault(_FormGroup);
31292
31293 var _InputBase2 = __webpack_require__(387);
31294
31295 var _InputBase3 = _interopRequireDefault(_InputBase2);
31296
31297 var _utilsChildrenValueInputValidation = __webpack_require__(389);
31298
31299 var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation);
31300
31301 var _utilsDeprecationWarning = __webpack_require__(391);
31302
31303 var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning);
31304
31305 var ButtonInput = (function (_InputBase) {
31306 _inherits(ButtonInput, _InputBase);
31307
31308 function ButtonInput() {
31309 _classCallCheck(this, ButtonInput);
31310
31311 _InputBase.apply(this, arguments);
31312 }
31313
31314 ButtonInput.prototype.renderFormGroup = function renderFormGroup(children) {
31315 var _props = this.props;
31316 var bsStyle = _props.bsStyle;
31317 var value = _props.value;
31318
31319 var other = _objectWithoutProperties(_props, ['bsStyle', 'value']);
31320
31321 return _react2['default'].createElement(
31322 _FormGroup2['default'],
31323 other,
31324 children
31325 );
31326 };
31327
31328 ButtonInput.prototype.renderInput = function renderInput() {
31329 var _props2 = this.props;
31330 var children = _props2.children;
31331 var value = _props2.value;
31332
31333 var other = _objectWithoutProperties(_props2, ['children', 'value']);
31334
31335 var val = children ? children : value;
31336 return _react2['default'].createElement(_Button2['default'], _extends({}, other, { componentClass: 'input', ref: 'input', key: 'input', value: val }));
31337 };
31338
31339 return ButtonInput;
31340 })(_InputBase3['default']);
31341
31342 ButtonInput.types = _Button2['default'].types;
31343
31344 ButtonInput.defaultProps = {
31345 type: 'button'
31346 };
31347
31348 ButtonInput.propTypes = {
31349 type: _react2['default'].PropTypes.oneOf(ButtonInput.types),
31350 bsStyle: function bsStyle() {
31351 // defer to Button propTypes of bsStyle
31352 return null;
31353 },
31354 children: _utilsChildrenValueInputValidation2['default'],
31355 value: _utilsChildrenValueInputValidation2['default']
31356 };
31357
31358 exports['default'] = _utilsDeprecationWarning2['default'].wrapper(ButtonInput, '`<ButtonInput>`', '`<Button>` directly');
31359 module.exports = exports['default'];
31360
31361/***/ },
31362/* 386 */
31363/***/ function(module, exports, __webpack_require__) {
31364
31365 'use strict';
31366
31367 var _inherits = __webpack_require__(372)['default'];
31368
31369 var _classCallCheck = __webpack_require__(379)['default'];
31370
31371 var _extends = __webpack_require__(338)['default'];
31372
31373 var _objectWithoutProperties = __webpack_require__(355)['default'];
31374
31375 var _interopRequireDefault = __webpack_require__(335)['default'];
31376
31377 exports.__esModule = true;
31378
31379 var _classnames = __webpack_require__(356);
31380
31381 var _classnames2 = _interopRequireDefault(_classnames);
31382
31383 var _react = __webpack_require__(89);
31384
31385 var _react2 = _interopRequireDefault(_react);
31386
31387 var _reactPropTypesLibDeprecated = __webpack_require__(367);
31388
31389 var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated);
31390
31391 var _styleMaps = __webpack_require__(358);
31392
31393 var _utilsBootstrapUtils = __webpack_require__(357);
31394
31395 var _utilsValidComponentChildren = __webpack_require__(365);
31396
31397 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
31398
31399 var propTypes = {
31400 /**
31401 * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.
31402 */
31403 controlId: _react2['default'].PropTypes.string,
31404 /**
31405 * @private
31406 */
31407 standalone: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.bool, 'Use a `<FormControl>` or `<InputGroup>` directly.'),
31408 validationState: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']),
31409 /**
31410 * @private
31411 */
31412 bsStyle: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.oneOf(['success', 'warning', 'error']), 'Use `validationState`'),
31413 /**
31414 * @private
31415 */
31416 hasFeedback: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.bool, 'Use a `<FormControl.Feedback>` element.'),
31417 /**
31418 * @private
31419 */
31420 groupClassName: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.string, 'Use `className`.')
31421 };
31422
31423 var childContextTypes = {
31424 $bs_formGroup: _react2['default'].PropTypes.object.isRequired
31425 };
31426
31427 var FormGroup = (function (_React$Component) {
31428 _inherits(FormGroup, _React$Component);
31429
31430 function FormGroup() {
31431 _classCallCheck(this, FormGroup);
31432
31433 _React$Component.apply(this, arguments);
31434 }
31435
31436 FormGroup.prototype.getChildContext = function getChildContext() {
31437 var _props = this.props;
31438 var controlId = _props.controlId;
31439 var bsStyle = _props.bsStyle;
31440 var _props$validationState = _props.validationState;
31441 var validationState = _props$validationState === undefined ? bsStyle : _props$validationState;
31442
31443 return {
31444 $bs_formGroup: {
31445 controlId: controlId,
31446 validationState: validationState
31447 }
31448 };
31449 };
31450
31451 FormGroup.prototype.hasFeedback = function hasFeedback(children) {
31452 var _this = this;
31453
31454 return _utilsValidComponentChildren2['default'].some(children, function (child) {
31455 return child.props.bsRole === 'feedback' || child.props.children && _this.hasFeedback(child.props.children);
31456 });
31457 };
31458
31459 FormGroup.prototype.render = function render() {
31460 var _props2 = this.props;
31461 var standalone = _props2.standalone;
31462 var bsStyle = _props2.bsStyle;
31463 var _props2$validationState = _props2.validationState;
31464 var validationState = _props2$validationState === undefined ? bsStyle : _props2$validationState;
31465 var groupClassName = _props2.groupClassName;
31466 var _props2$className = _props2.className;
31467 var className = _props2$className === undefined ? groupClassName : _props2$className;
31468 var children = _props2.children;
31469 var _props2$hasFeedback = _props2.hasFeedback;
31470 var hasFeedback = _props2$hasFeedback === undefined ? this.hasFeedback(children) : _props2$hasFeedback;
31471
31472 var props = _objectWithoutProperties(_props2, ['standalone', 'bsStyle', 'validationState', 'groupClassName', 'className', 'children', 'hasFeedback']);
31473
31474 delete props.bsClass;
31475 delete props.bsSize;
31476 delete props.controlId;
31477
31478 var classes = _extends({}, !standalone && _utilsBootstrapUtils.getClassSet(this.props), {
31479 'has-feedback': hasFeedback
31480 });
31481 if (validationState) {
31482 classes['has-' + validationState] = true;
31483 }
31484
31485 return _react2['default'].createElement(
31486 'div',
31487 _extends({}, props, { className: _classnames2['default'](className, classes) }),
31488 children
31489 );
31490 };
31491
31492 return FormGroup;
31493 })(_react2['default'].Component);
31494
31495 FormGroup.propTypes = propTypes;
31496 FormGroup.childContextTypes = childContextTypes;
31497
31498 exports['default'] = _utilsBootstrapUtils.bsClass('form-group', _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], FormGroup));
31499 module.exports = exports['default'];
31500
31501/***/ },
31502/* 387 */
31503/***/ function(module, exports, __webpack_require__) {
31504
31505 'use strict';
31506
31507 var _inherits = __webpack_require__(372)['default'];
31508
31509 var _classCallCheck = __webpack_require__(379)['default'];
31510
31511 var _extends = __webpack_require__(338)['default'];
31512
31513 var _interopRequireDefault = __webpack_require__(335)['default'];
31514
31515 exports.__esModule = true;
31516
31517 var _classnames = __webpack_require__(356);
31518
31519 var _classnames2 = _interopRequireDefault(_classnames);
31520
31521 var _react = __webpack_require__(89);
31522
31523 var _react2 = _interopRequireDefault(_react);
31524
31525 var _FormGroup = __webpack_require__(386);
31526
31527 var _FormGroup2 = _interopRequireDefault(_FormGroup);
31528
31529 var _Glyphicon = __webpack_require__(388);
31530
31531 var _Glyphicon2 = _interopRequireDefault(_Glyphicon);
31532
31533 var InputBase = (function (_React$Component) {
31534 _inherits(InputBase, _React$Component);
31535
31536 function InputBase() {
31537 _classCallCheck(this, InputBase);
31538
31539 _React$Component.apply(this, arguments);
31540 }
31541
31542 InputBase.prototype.getInputDOMNode = function getInputDOMNode() {
31543 return this.refs.input;
31544 };
31545
31546 InputBase.prototype.getValue = function getValue() {
31547 if (this.props.type === 'static') {
31548 return this.props.value;
31549 } else if (this.props.type) {
31550 if (this.props.type === 'select' && this.props.multiple) {
31551 return this.getSelectedOptions();
31552 }
31553 return this.getInputDOMNode().value;
31554 }
31555 throw new Error('Cannot use getValue without specifying input type.');
31556 };
31557
31558 InputBase.prototype.getChecked = function getChecked() {
31559 return this.getInputDOMNode().checked;
31560 };
31561
31562 InputBase.prototype.getSelectedOptions = function getSelectedOptions() {
31563 var values = [];
31564
31565 Array.prototype.forEach.call(this.getInputDOMNode().getElementsByTagName('option'), function (option) {
31566 if (option.selected) {
31567 var value = option.getAttribute('value') || option.innerHtml;
31568 values.push(value);
31569 }
31570 });
31571
31572 return values;
31573 };
31574
31575 InputBase.prototype.isCheckboxOrRadio = function isCheckboxOrRadio() {
31576 return this.props.type === 'checkbox' || this.props.type === 'radio';
31577 };
31578
31579 InputBase.prototype.isFile = function isFile() {
31580 return this.props.type === 'file';
31581 };
31582
31583 InputBase.prototype.renderInputGroup = function renderInputGroup(children) {
31584 var addonBefore = this.props.addonBefore ? _react2['default'].createElement(
31585 'span',
31586 { className: 'input-group-addon', key: 'addonBefore' },
31587 this.props.addonBefore
31588 ) : null;
31589
31590 var addonAfter = this.props.addonAfter ? _react2['default'].createElement(
31591 'span',
31592 { className: 'input-group-addon', key: 'addonAfter' },
31593 this.props.addonAfter
31594 ) : null;
31595
31596 var buttonBefore = this.props.buttonBefore ? _react2['default'].createElement(
31597 'span',
31598 { className: 'input-group-btn' },
31599 this.props.buttonBefore
31600 ) : null;
31601
31602 var buttonAfter = this.props.buttonAfter ? _react2['default'].createElement(
31603 'span',
31604 { className: 'input-group-btn' },
31605 this.props.buttonAfter
31606 ) : null;
31607
31608 var inputGroupClassName = undefined;
31609 switch (this.props.bsSize) {
31610 case 'small':
31611 inputGroupClassName = 'input-group-sm';break;
31612 case 'large':
31613 inputGroupClassName = 'input-group-lg';break;
31614 default:
31615 }
31616
31617 return addonBefore || addonAfter || buttonBefore || buttonAfter ? _react2['default'].createElement(
31618 'div',
31619 { className: _classnames2['default'](inputGroupClassName, 'input-group'), key: 'input-group' },
31620 addonBefore,
31621 buttonBefore,
31622 children,
31623 addonAfter,
31624 buttonAfter
31625 ) : children;
31626 };
31627
31628 InputBase.prototype.renderIcon = function renderIcon() {
31629 if (this.props.hasFeedback) {
31630 if (this.props.feedbackIcon) {
31631 return _react2['default'].cloneElement(this.props.feedbackIcon, { formControlFeedback: true });
31632 }
31633
31634 switch (this.props.bsStyle) {
31635 case 'success':
31636 return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'ok', key: 'icon' });
31637 case 'warning':
31638 return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'warning-sign', key: 'icon' });
31639 case 'error':
31640 return _react2['default'].createElement(_Glyphicon2['default'], { formControlFeedback: true, glyph: 'remove', key: 'icon' });
31641 default:
31642 return _react2['default'].createElement('span', { className: 'form-control-feedback', key: 'icon' });
31643 }
31644 } else {
31645 return null;
31646 }
31647 };
31648
31649 InputBase.prototype.renderHelp = function renderHelp() {
31650 return this.props.help ? _react2['default'].createElement(
31651 'span',
31652 { className: 'help-block', key: 'help' },
31653 this.props.help
31654 ) : null;
31655 };
31656
31657 InputBase.prototype.renderCheckboxAndRadioWrapper = function renderCheckboxAndRadioWrapper(children) {
31658 var classes = {
31659 'checkbox': this.props.type === 'checkbox',
31660 'radio': this.props.type === 'radio'
31661 };
31662
31663 return _react2['default'].createElement(
31664 'div',
31665 { className: _classnames2['default'](classes), key: 'checkboxRadioWrapper' },
31666 children
31667 );
31668 };
31669
31670 InputBase.prototype.renderWrapper = function renderWrapper(children) {
31671 return this.props.wrapperClassName ? _react2['default'].createElement(
31672 'div',
31673 { className: this.props.wrapperClassName, key: 'wrapper' },
31674 children
31675 ) : children;
31676 };
31677
31678 InputBase.prototype.renderLabel = function renderLabel(children) {
31679 var classes = {
31680 'control-label': !this.isCheckboxOrRadio()
31681 };
31682 classes[this.props.labelClassName] = this.props.labelClassName;
31683
31684 return this.props.label ? _react2['default'].createElement(
31685 'label',
31686 { htmlFor: this.props.id, className: _classnames2['default'](classes), key: 'label' },
31687 children,
31688 this.props.label
31689 ) : children;
31690 };
31691
31692 InputBase.prototype.renderInput = function renderInput() {
31693 if (!this.props.type) {
31694 return this.props.children;
31695 }
31696
31697 switch (this.props.type) {
31698 case 'select':
31699 return _react2['default'].createElement(
31700 'select',
31701 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control'), ref: 'input', key: 'input' }),
31702 this.props.children
31703 );
31704 case 'textarea':
31705 return _react2['default'].createElement('textarea', _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control'), ref: 'input', key: 'input' }));
31706 case 'static':
31707 return _react2['default'].createElement(
31708 'p',
31709 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'form-control-static'), ref: 'input', key: 'input' }),
31710 this.props.value
31711 );
31712 default:
31713 var className = this.isCheckboxOrRadio() || this.isFile() ? '' : 'form-control';
31714 return _react2['default'].createElement('input', _extends({}, this.props, { className: _classnames2['default'](this.props.className, className), ref: 'input', key: 'input' }));
31715 }
31716 };
31717
31718 InputBase.prototype.renderFormGroup = function renderFormGroup(children) {
31719 return _react2['default'].createElement(
31720 _FormGroup2['default'],
31721 this.props,
31722 children
31723 );
31724 };
31725
31726 InputBase.prototype.renderChildren = function renderChildren() {
31727 return !this.isCheckboxOrRadio() ? [this.renderLabel(), this.renderWrapper([this.renderInputGroup(this.renderInput()), this.renderIcon(), this.renderHelp()])] : this.renderWrapper([this.renderCheckboxAndRadioWrapper(this.renderLabel(this.renderInput())), this.renderHelp()]);
31728 };
31729
31730 InputBase.prototype.render = function render() {
31731 var children = this.renderChildren();
31732 return this.renderFormGroup(children);
31733 };
31734
31735 return InputBase;
31736 })(_react2['default'].Component);
31737
31738 InputBase.propTypes = {
31739 type: _react2['default'].PropTypes.string,
31740 label: _react2['default'].PropTypes.node,
31741 help: _react2['default'].PropTypes.node,
31742 addonBefore: _react2['default'].PropTypes.node,
31743 addonAfter: _react2['default'].PropTypes.node,
31744 buttonBefore: _react2['default'].PropTypes.node,
31745 buttonAfter: _react2['default'].PropTypes.node,
31746 bsSize: _react2['default'].PropTypes.oneOf(['small', 'medium', 'large']),
31747 bsStyle: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']),
31748 hasFeedback: _react2['default'].PropTypes.bool,
31749 feedbackIcon: _react2['default'].PropTypes.node,
31750 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
31751 groupClassName: _react2['default'].PropTypes.string,
31752 wrapperClassName: _react2['default'].PropTypes.string,
31753 labelClassName: _react2['default'].PropTypes.string,
31754 multiple: _react2['default'].PropTypes.bool,
31755 disabled: _react2['default'].PropTypes.bool,
31756 value: _react2['default'].PropTypes.any
31757 };
31758
31759 InputBase.defaultProps = {
31760 disabled: false,
31761 hasFeedback: false,
31762 multiple: false
31763 };
31764
31765 exports['default'] = InputBase;
31766 module.exports = exports['default'];
31767
31768/***/ },
31769/* 388 */
31770/***/ function(module, exports, __webpack_require__) {
31771
31772 'use strict';
31773
31774 var _extends = __webpack_require__(338)['default'];
31775
31776 var _interopRequireDefault = __webpack_require__(335)['default'];
31777
31778 exports.__esModule = true;
31779
31780 var _classnames = __webpack_require__(356);
31781
31782 var _classnames2 = _interopRequireDefault(_classnames);
31783
31784 var _react = __webpack_require__(89);
31785
31786 var _react2 = _interopRequireDefault(_react);
31787
31788 var _reactPropTypesLibDeprecated = __webpack_require__(367);
31789
31790 var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated);
31791
31792 var Glyphicon = _react2['default'].createClass({
31793 displayName: 'Glyphicon',
31794
31795 propTypes: {
31796 /**
31797 * bootstrap className
31798 * @private
31799 */
31800 bsClass: _react2['default'].PropTypes.string,
31801 /**
31802 * An icon name. See e.g. http://getbootstrap.com/components/#glyphicons
31803 */
31804 glyph: _react2['default'].PropTypes.string.isRequired,
31805 /**
31806 * Adds 'form-control-feedback' class
31807 * @private
31808 */
31809 formControlFeedback: _reactPropTypesLibDeprecated2['default'](_react2['default'].PropTypes.bool, 'Use `<FormControl.Feedback>`.')
31810 },
31811
31812 getDefaultProps: function getDefaultProps() {
31813 return {
31814 bsClass: 'glyphicon'
31815 };
31816 },
31817
31818 render: function render() {
31819 var _classNames;
31820
31821 var className = _classnames2['default'](this.props.className, (_classNames = {}, _classNames[this.props.bsClass] = true, _classNames['glyphicon-' + this.props.glyph] = true, _classNames['form-control-feedback'] = this.props.formControlFeedback, _classNames));
31822
31823 return _react2['default'].createElement(
31824 'span',
31825 _extends({}, this.props, { className: className }),
31826 this.props.children
31827 );
31828 }
31829 });
31830
31831 exports['default'] = Glyphicon;
31832 module.exports = exports['default'];
31833
31834/***/ },
31835/* 389 */
31836/***/ function(module, exports, __webpack_require__) {
31837
31838 'use strict';
31839
31840 var _interopRequireDefault = __webpack_require__(335)['default'];
31841
31842 exports.__esModule = true;
31843 exports['default'] = valueValidation;
31844
31845 var _react = __webpack_require__(89);
31846
31847 var _react2 = _interopRequireDefault(_react);
31848
31849 var _reactPropTypesLibSinglePropFrom = __webpack_require__(390);
31850
31851 var _reactPropTypesLibSinglePropFrom2 = _interopRequireDefault(_reactPropTypesLibSinglePropFrom);
31852
31853 function valueValidation(props, propName, componentName) {
31854 var error = _reactPropTypesLibSinglePropFrom2['default']('children', 'value')(props, propName, componentName);
31855
31856 if (!error) {
31857 error = _react2['default'].PropTypes.node(props, propName, componentName);
31858 }
31859
31860 return error;
31861 }
31862
31863 module.exports = exports['default'];
31864
31865/***/ },
31866/* 390 */
31867/***/ function(module, exports) {
31868
31869 /**
31870 * Checks if only one of the listed properties is in use. An error is given
31871 * if multiple have a value
31872 *
31873 * @param props
31874 * @param propName
31875 * @param componentName
31876 * @returns {Error|undefined}
31877 */
31878 'use strict';
31879
31880 exports.__esModule = true;
31881 exports['default'] = createSinglePropFromChecker;
31882
31883 function createSinglePropFromChecker() {
31884 for (var _len = arguments.length, arrOfProps = Array(_len), _key = 0; _key < _len; _key++) {
31885 arrOfProps[_key] = arguments[_key];
31886 }
31887
31888 function validate(props, propName) {
31889 var usedPropCount = arrOfProps.map(function (listedProp) {
31890 return props[listedProp];
31891 }).reduce(function (acc, curr) {
31892 return acc + (curr !== undefined ? 1 : 0);
31893 }, 0);
31894
31895 if (usedPropCount > 1) {
31896 var first = arrOfProps[0];
31897 var others = arrOfProps.slice(1);
31898
31899 var message = others.join(', ') + ' and ' + first;
31900 return new Error('Invalid prop \'' + propName + '\', only one of the following ' + ('may be provided: ' + message));
31901 }
31902 }
31903 return validate;
31904 }
31905
31906 module.exports = exports['default'];
31907
31908/***/ },
31909/* 391 */
31910/***/ function(module, exports, __webpack_require__) {
31911
31912 'use strict';
31913
31914 var _inherits = __webpack_require__(372)['default'];
31915
31916 var _classCallCheck = __webpack_require__(379)['default'];
31917
31918 var _interopRequireDefault = __webpack_require__(335)['default'];
31919
31920 exports.__esModule = true;
31921 exports._resetWarned = _resetWarned;
31922
31923 var _warning = __webpack_require__(271);
31924
31925 var _warning2 = _interopRequireDefault(_warning);
31926
31927 var warned = {};
31928
31929 function deprecationWarning(oldname, newname, link) {
31930 var message = undefined;
31931
31932 if (typeof oldname === 'object') {
31933 message = oldname.message;
31934 } else {
31935 message = oldname + ' is deprecated. Use ' + newname + ' instead.';
31936
31937 if (link) {
31938 message += '\nYou can read more about it at ' + link;
31939 }
31940 }
31941
31942 if (warned[message]) {
31943 return;
31944 }
31945
31946 (undefined) !== 'production' ? _warning2['default'](false, message) : undefined;
31947 warned[message] = true;
31948 }
31949
31950 deprecationWarning.wrapper = function (Component) {
31951 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
31952 args[_key - 1] = arguments[_key];
31953 }
31954
31955 return (function (_Component) {
31956 _inherits(DeprecatedComponent, _Component);
31957
31958 function DeprecatedComponent() {
31959 _classCallCheck(this, DeprecatedComponent);
31960
31961 _Component.apply(this, arguments);
31962 }
31963
31964 DeprecatedComponent.prototype.componentWillMount = function componentWillMount() {
31965 deprecationWarning.apply(undefined, args);
31966
31967 if (_Component.prototype.componentWillMount) {
31968 var _Component$prototype$componentWillMount;
31969
31970 for (var _len2 = arguments.length, methodArgs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
31971 methodArgs[_key2] = arguments[_key2];
31972 }
31973
31974 (_Component$prototype$componentWillMount = _Component.prototype.componentWillMount).call.apply(_Component$prototype$componentWillMount, [this].concat(methodArgs));
31975 }
31976 };
31977
31978 return DeprecatedComponent;
31979 })(Component);
31980 };
31981
31982 exports['default'] = deprecationWarning;
31983
31984 function _resetWarned() {
31985 warned = {};
31986 }
31987
31988/***/ },
31989/* 392 */
31990/***/ function(module, exports, __webpack_require__) {
31991
31992 'use strict';
31993
31994 var _extends = __webpack_require__(338)['default'];
31995
31996 var _interopRequireDefault = __webpack_require__(335)['default'];
31997
31998 exports.__esModule = true;
31999
32000 var _classnames = __webpack_require__(356);
32001
32002 var _classnames2 = _interopRequireDefault(_classnames);
32003
32004 var _react = __webpack_require__(89);
32005
32006 var _react2 = _interopRequireDefault(_react);
32007
32008 var _utilsBootstrapUtils = __webpack_require__(357);
32009
32010 var _Button = __webpack_require__(382);
32011
32012 var _Button2 = _interopRequireDefault(_Button);
32013
32014 var ButtonToolbar = _react2['default'].createClass({
32015 displayName: 'ButtonToolbar',
32016
32017 propTypes: {
32018 bsSize: _Button2['default'].propTypes.bsSize
32019 },
32020
32021 getDefaultProps: function getDefaultProps() {
32022 return {
32023 bsClass: 'btn-toolbar'
32024 };
32025 },
32026
32027 render: function render() {
32028 var classes = _utilsBootstrapUtils.getClassSet(this.props);
32029
32030 return _react2['default'].createElement(
32031 'div',
32032 _extends({}, this.props, {
32033 role: 'toolbar',
32034 className: _classnames2['default'](this.props.className, classes)
32035 }),
32036 this.props.children
32037 );
32038 }
32039 });
32040
32041 exports['default'] = ButtonToolbar;
32042 module.exports = exports['default'];
32043
32044/***/ },
32045/* 393 */
32046/***/ function(module, exports, __webpack_require__) {
32047
32048 'use strict';
32049
32050 var _extends = __webpack_require__(338)['default'];
32051
32052 var _Object$assign = __webpack_require__(339)['default'];
32053
32054 var _interopRequireDefault = __webpack_require__(335)['default'];
32055
32056 exports.__esModule = true;
32057
32058 var _classnames = __webpack_require__(356);
32059
32060 var _classnames2 = _interopRequireDefault(_classnames);
32061
32062 var _react = __webpack_require__(89);
32063
32064 var _react2 = _interopRequireDefault(_react);
32065
32066 var _utilsBootstrapUtils = __webpack_require__(357);
32067
32068 var _utilsValidComponentChildren = __webpack_require__(365);
32069
32070 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
32071
32072 var _CarouselCaption = __webpack_require__(394);
32073
32074 var _CarouselCaption2 = _interopRequireDefault(_CarouselCaption);
32075
32076 var _CarouselItem = __webpack_require__(395);
32077
32078 var _CarouselItem2 = _interopRequireDefault(_CarouselItem);
32079
32080 var _Glyphicon = __webpack_require__(388);
32081
32082 var _Glyphicon2 = _interopRequireDefault(_Glyphicon);
32083
32084 var Carousel = _react2['default'].createClass({
32085 displayName: 'Carousel',
32086
32087 propTypes: {
32088 slide: _react2['default'].PropTypes.bool,
32089 indicators: _react2['default'].PropTypes.bool,
32090 interval: _react2['default'].PropTypes.number,
32091 controls: _react2['default'].PropTypes.bool,
32092 pauseOnHover: _react2['default'].PropTypes.bool,
32093 wrap: _react2['default'].PropTypes.bool,
32094 /**
32095 * Callback fired when the active item changes.
32096 *
32097 * ```js
32098 * (eventKey: any) => any | (eventKey: any, event: Object) => any
32099 * ```
32100 *
32101 * If this callback takes two or more arguments, the second argument will
32102 * be a persisted event object with `direction` set to the direction of the
32103 * transition.
32104 */
32105 onSelect: _react2['default'].PropTypes.func,
32106 onSlideEnd: _react2['default'].PropTypes.func,
32107 activeIndex: _react2['default'].PropTypes.number,
32108 defaultActiveIndex: _react2['default'].PropTypes.number,
32109 direction: _react2['default'].PropTypes.oneOf(['prev', 'next']),
32110 prevIcon: _react2['default'].PropTypes.node,
32111 nextIcon: _react2['default'].PropTypes.node
32112 },
32113
32114 getDefaultProps: function getDefaultProps() {
32115 return {
32116 bsClass: 'carousel',
32117 slide: true,
32118 interval: 5000,
32119 pauseOnHover: true,
32120 wrap: true,
32121 indicators: true,
32122 controls: true,
32123 prevIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-left' }),
32124 nextIcon: _react2['default'].createElement(_Glyphicon2['default'], { glyph: 'chevron-right' })
32125 };
32126 },
32127
32128 getInitialState: function getInitialState() {
32129 return {
32130 activeIndex: this.props.defaultActiveIndex == null ? 0 : this.props.defaultActiveIndex,
32131 previousActiveIndex: null,
32132 direction: null
32133 };
32134 },
32135
32136 getDirection: function getDirection(prevIndex, index) {
32137 if (prevIndex === index) {
32138 return null;
32139 }
32140
32141 return prevIndex > index ? 'prev' : 'next';
32142 },
32143
32144 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
32145 var activeIndex = this.getActiveIndex();
32146
32147 if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) {
32148 clearTimeout(this.timeout);
32149 this.setState({
32150 previousActiveIndex: activeIndex,
32151 direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex)
32152 });
32153 }
32154 },
32155
32156 componentDidMount: function componentDidMount() {
32157 this.waitForNext();
32158 },
32159
32160 componentWillUnmount: function componentWillUnmount() {
32161 clearTimeout(this.timeout);
32162 },
32163
32164 next: function next(e) {
32165 if (e) {
32166 e.preventDefault();
32167 }
32168
32169 var index = this.getActiveIndex() + 1;
32170 var count = _utilsValidComponentChildren2['default'].count(this.props.children);
32171
32172 if (index > count - 1) {
32173 if (!this.props.wrap) {
32174 return;
32175 }
32176 index = 0;
32177 }
32178
32179 this.handleSelect(index, e, 'next');
32180 },
32181
32182 prev: function prev(e) {
32183 if (e) {
32184 e.preventDefault();
32185 }
32186
32187 var index = this.getActiveIndex() - 1;
32188
32189 if (index < 0) {
32190 if (!this.props.wrap) {
32191 return;
32192 }
32193 index = _utilsValidComponentChildren2['default'].count(this.props.children) - 1;
32194 }
32195
32196 this.handleSelect(index, e, 'prev');
32197 },
32198
32199 pause: function pause() {
32200 this.isPaused = true;
32201 clearTimeout(this.timeout);
32202 },
32203
32204 play: function play() {
32205 this.isPaused = false;
32206 this.waitForNext();
32207 },
32208
32209 waitForNext: function waitForNext() {
32210 if (!this.isPaused && this.props.slide && this.props.interval && this.props.activeIndex == null) {
32211 this.timeout = setTimeout(this.next, this.props.interval);
32212 }
32213 },
32214
32215 handleMouseOver: function handleMouseOver() {
32216 if (this.props.pauseOnHover) {
32217 this.pause();
32218 }
32219 },
32220
32221 handleMouseOut: function handleMouseOut() {
32222 if (this.isPaused) {
32223 this.play();
32224 }
32225 },
32226
32227 render: function render() {
32228 var _classes;
32229
32230 var classes = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props)] = true, _classes.slide = this.props.slide, _classes);
32231
32232 return _react2['default'].createElement(
32233 'div',
32234 _extends({}, this.props, {
32235 className: _classnames2['default'](this.props.className, classes),
32236 onMouseOver: this.handleMouseOver,
32237 onMouseOut: this.handleMouseOut
32238 }),
32239 this.props.indicators ? this.renderIndicators() : null,
32240 _react2['default'].createElement(
32241 'div',
32242 {
32243 ref: 'inner',
32244 className: _utilsBootstrapUtils.prefix(this.props, 'inner')
32245 },
32246 _utilsValidComponentChildren2['default'].map(this.props.children, this.renderItem)
32247 ),
32248 this.props.controls ? this.renderControls() : null
32249 );
32250 },
32251
32252 renderPrev: function renderPrev() {
32253 var classes = 'left ' + _utilsBootstrapUtils.prefix(this.props, 'control');
32254
32255 return _react2['default'].createElement(
32256 'a',
32257 { className: classes, href: '#prev', key: 0, onClick: this.prev },
32258 this.props.prevIcon
32259 );
32260 },
32261
32262 renderNext: function renderNext() {
32263 var classes = 'right ' + _utilsBootstrapUtils.prefix(this.props, 'control');
32264
32265 return _react2['default'].createElement(
32266 'a',
32267 { className: classes, href: '#next', key: 1, onClick: this.next },
32268 this.props.nextIcon
32269 );
32270 },
32271
32272 renderControls: function renderControls() {
32273 if (!this.props.wrap) {
32274 var activeIndex = this.getActiveIndex();
32275 var count = _utilsValidComponentChildren2['default'].count(this.props.children);
32276
32277 return [activeIndex !== 0 ? this.renderPrev() : null, activeIndex !== count - 1 ? this.renderNext() : null];
32278 }
32279
32280 return [this.renderPrev(), this.renderNext()];
32281 },
32282
32283 renderIndicator: function renderIndicator(child, index) {
32284 var _this = this;
32285
32286 var className = index === this.getActiveIndex() ? 'active' : null;
32287
32288 return _react2['default'].createElement('li', {
32289 key: index,
32290 className: className,
32291 onClick: function (e) {
32292 return _this.handleSelect(index, e, null);
32293 } });
32294 },
32295
32296 renderIndicators: function renderIndicators() {
32297 var _this2 = this;
32298
32299 var indicators = [];
32300 _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child, index) {
32301 indicators.push(_this2.renderIndicator(child, index),
32302
32303 // Force whitespace between indicator elements, bootstrap
32304 // requires this for correct spacing of elements.
32305 ' ');
32306 }, this);
32307
32308 return _react2['default'].createElement(
32309 'ol',
32310 { className: _utilsBootstrapUtils.prefix(this.props, 'indicators') },
32311 indicators
32312 );
32313 },
32314
32315 getActiveIndex: function getActiveIndex() {
32316 return this.props.activeIndex != null ? this.props.activeIndex : this.state.activeIndex;
32317 },
32318
32319 handleItemAnimateOutEnd: function handleItemAnimateOutEnd() {
32320 var _this3 = this;
32321
32322 this.setState({
32323 previousActiveIndex: null,
32324 direction: null
32325 }, function () {
32326 _this3.waitForNext();
32327
32328 if (_this3.props.onSlideEnd) {
32329 _this3.props.onSlideEnd();
32330 }
32331 });
32332 },
32333
32334 renderItem: function renderItem(child, index) {
32335 var activeIndex = this.getActiveIndex();
32336 var isActive = index === activeIndex;
32337 var isPreviousActive = this.state.previousActiveIndex != null && this.state.previousActiveIndex === index && this.props.slide;
32338
32339 return _react.cloneElement(child, {
32340 active: isActive,
32341 ref: child.ref,
32342 key: child.key ? child.key : index,
32343 index: index,
32344 animateOut: isPreviousActive,
32345 animateIn: isActive && this.state.previousActiveIndex != null && this.props.slide,
32346 direction: this.state.direction,
32347 onAnimateOutEnd: isPreviousActive ? this.handleItemAnimateOutEnd : null
32348 });
32349 },
32350
32351 handleSelect: function handleSelect(index, e, direction) {
32352 clearTimeout(this.timeout);
32353
32354 if (this.isMounted()) {
32355 var previousActiveIndex = this.getActiveIndex();
32356 direction = direction || this.getDirection(previousActiveIndex, index);
32357
32358 var onSelect = this.props.onSelect;
32359
32360 if (onSelect) {
32361 if (onSelect.length > 1) {
32362 // React SyntheticEvents are pooled, so we need to remove this event
32363 // from the pool to add a custom property. To avoid unnecessarily
32364 // removing objects from the pool, only do this when the listener
32365 // actually wants the event.
32366 e.persist();
32367 e.direction = direction;
32368
32369 onSelect(index, e);
32370 } else {
32371 onSelect(index);
32372 }
32373 }
32374
32375 if (this.props.activeIndex == null && index !== previousActiveIndex) {
32376 if (this.state.previousActiveIndex != null) {
32377 // If currently animating don't activate the new index.
32378 // TODO: look into queuing this canceled call and
32379 // animating after the current animation has ended.
32380 return;
32381 }
32382
32383 this.setState({
32384 activeIndex: index,
32385 previousActiveIndex: previousActiveIndex,
32386 direction: direction
32387 });
32388 }
32389 }
32390 }
32391 });
32392
32393 Carousel = _Object$assign(Carousel, { Caption: _CarouselCaption2['default'], Item: _CarouselItem2['default'] });
32394
32395 exports['default'] = Carousel;
32396 module.exports = exports['default'];
32397
32398/***/ },
32399/* 394 */
32400/***/ function(module, exports, __webpack_require__) {
32401
32402 'use strict';
32403
32404 var _extends = __webpack_require__(338)['default'];
32405
32406 var _interopRequireDefault = __webpack_require__(335)['default'];
32407
32408 exports.__esModule = true;
32409
32410 var _classnames = __webpack_require__(356);
32411
32412 var _classnames2 = _interopRequireDefault(_classnames);
32413
32414 var _react = __webpack_require__(89);
32415
32416 var _react2 = _interopRequireDefault(_react);
32417
32418 var _reactPropTypesLibElementType = __webpack_require__(380);
32419
32420 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
32421
32422 var CarouselCaption = _react2['default'].createClass({
32423 displayName: 'Carousel.Caption',
32424 propTypes: {
32425 /**
32426 * You can use a custom element for this component
32427 */
32428 componentClass: _reactPropTypesLibElementType2['default']
32429 },
32430
32431 getDefaultProps: function getDefaultProps() {
32432 return {
32433 componentClass: 'div'
32434 };
32435 },
32436
32437 render: function render() {
32438 var ComponentClass = this.props.componentClass;
32439
32440 return _react2['default'].createElement(
32441 ComponentClass,
32442 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'carousel-caption') }),
32443 this.props.children
32444 );
32445 }
32446 });
32447
32448 exports['default'] = CarouselCaption;
32449 module.exports = exports['default'];
32450
32451/***/ },
32452/* 395 */
32453/***/ function(module, exports, __webpack_require__) {
32454
32455 'use strict';
32456
32457 var _extends = __webpack_require__(338)['default'];
32458
32459 var _interopRequireDefault = __webpack_require__(335)['default'];
32460
32461 exports.__esModule = true;
32462
32463 var _classnames = __webpack_require__(356);
32464
32465 var _classnames2 = _interopRequireDefault(_classnames);
32466
32467 var _react = __webpack_require__(89);
32468
32469 var _react2 = _interopRequireDefault(_react);
32470
32471 var _reactDom = __webpack_require__(122);
32472
32473 var _reactDom2 = _interopRequireDefault(_reactDom);
32474
32475 var _utilsBootstrapUtils = __webpack_require__(357);
32476
32477 var _utilsTransitionEvents = __webpack_require__(396);
32478
32479 var _utilsTransitionEvents2 = _interopRequireDefault(_utilsTransitionEvents);
32480
32481 var CarouselItem = _react2['default'].createClass({
32482 displayName: 'CarouselItem',
32483
32484 propTypes: {
32485 direction: _react2['default'].PropTypes.oneOf(['prev', 'next']),
32486 onAnimateOutEnd: _react2['default'].PropTypes.func,
32487 active: _react2['default'].PropTypes.bool,
32488 animateIn: _react2['default'].PropTypes.bool,
32489 animateOut: _react2['default'].PropTypes.bool,
32490 caption: _react2['default'].PropTypes.node,
32491 index: _react2['default'].PropTypes.number
32492 },
32493
32494 getInitialState: function getInitialState() {
32495 return {
32496 direction: null
32497 };
32498 },
32499
32500 getDefaultProps: function getDefaultProps() {
32501 return {
32502 bsStyle: 'carousel',
32503 active: false,
32504 animateIn: false,
32505 animateOut: false
32506 };
32507 },
32508
32509 handleAnimateOutEnd: function handleAnimateOutEnd() {
32510 if (this.props.onAnimateOutEnd && this.isMounted()) {
32511 this.props.onAnimateOutEnd(this.props.index);
32512 }
32513 },
32514
32515 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
32516 if (this.props.active !== nextProps.active) {
32517 this.setState({
32518 direction: null
32519 });
32520 }
32521 },
32522
32523 componentDidUpdate: function componentDidUpdate(prevProps) {
32524 if (!this.props.active && prevProps.active) {
32525 _utilsTransitionEvents2['default'].addEndEventListener(_reactDom2['default'].findDOMNode(this), this.handleAnimateOutEnd);
32526 }
32527
32528 if (this.props.active !== prevProps.active) {
32529 setTimeout(this.startAnimation, 20);
32530 }
32531 },
32532
32533 startAnimation: function startAnimation() {
32534 if (!this.isMounted()) {
32535 return;
32536 }
32537
32538 this.setState({
32539 direction: this.props.direction === 'prev' ? 'right' : 'left'
32540 });
32541 },
32542
32543 render: function render() {
32544 var classes = {
32545 item: true,
32546 active: this.props.active && !this.props.animateIn || this.props.animateOut,
32547 next: this.props.active && this.props.animateIn && this.props.direction === 'next',
32548 prev: this.props.active && this.props.animateIn && this.props.direction === 'prev'
32549 };
32550
32551 if (this.state.direction && (this.props.animateIn || this.props.animateOut)) {
32552 classes[this.state.direction] = true;
32553 }
32554
32555 return _react2['default'].createElement(
32556 'div',
32557 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
32558 this.props.children,
32559 this.props.caption ? this.renderCaption() : null
32560 );
32561 },
32562
32563 renderCaption: function renderCaption() {
32564 var classes = _utilsBootstrapUtils.prefix(this.props, 'caption');
32565
32566 return _react2['default'].createElement(
32567 'div',
32568 { className: classes },
32569 this.props.caption
32570 );
32571 }
32572 });
32573
32574 exports['default'] = CarouselItem;
32575 module.exports = exports['default'];
32576
32577/***/ },
32578/* 396 */
32579/***/ function(module, exports) {
32580
32581 /**
32582 * Copyright 2013-2014, Facebook, Inc.
32583 * All rights reserved.
32584 *
32585 * This file contains a modified version of:
32586 * https://github.com/facebook/react/blob/v0.12.0/src/addons/transitions/ReactTransitionEvents.js
32587 *
32588 * This source code is licensed under the BSD-style license found here:
32589 * https://github.com/facebook/react/blob/v0.12.0/LICENSE
32590 * An additional grant of patent rights can be found here:
32591 * https://github.com/facebook/react/blob/v0.12.0/PATENTS
32592 */
32593
32594 'use strict';
32595
32596 exports.__esModule = true;
32597 var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
32598
32599 /**
32600 * EVENT_NAME_MAP is used to determine which event fired when a
32601 * transition/animation ends, based on the style property used to
32602 * define that event.
32603 */
32604 var EVENT_NAME_MAP = {
32605 transitionend: {
32606 'transition': 'transitionend',
32607 'WebkitTransition': 'webkitTransitionEnd',
32608 'MozTransition': 'mozTransitionEnd',
32609 'OTransition': 'oTransitionEnd',
32610 'msTransition': 'MSTransitionEnd'
32611 },
32612
32613 animationend: {
32614 'animation': 'animationend',
32615 'WebkitAnimation': 'webkitAnimationEnd',
32616 'MozAnimation': 'mozAnimationEnd',
32617 'OAnimation': 'oAnimationEnd',
32618 'msAnimation': 'MSAnimationEnd'
32619 }
32620 };
32621
32622 var endEvents = [];
32623
32624 function detectEvents() {
32625 var testEl = document.createElement('div');
32626 var style = testEl.style;
32627
32628 // On some platforms, in particular some releases of Android 4.x,
32629 // the un-prefixed "animation" and "transition" properties are defined on the
32630 // style object but the events that fire will still be prefixed, so we need
32631 // to check if the un-prefixed events are useable, and if not remove them
32632 // from the map
32633 if (!('AnimationEvent' in window)) {
32634 delete EVENT_NAME_MAP.animationend.animation;
32635 }
32636
32637 if (!('TransitionEvent' in window)) {
32638 delete EVENT_NAME_MAP.transitionend.transition;
32639 }
32640
32641 for (var baseEventName in EVENT_NAME_MAP) {
32642 // eslint-disable-line guard-for-in
32643 var baseEvents = EVENT_NAME_MAP[baseEventName];
32644 for (var styleName in baseEvents) {
32645 if (styleName in style) {
32646 endEvents.push(baseEvents[styleName]);
32647 break;
32648 }
32649 }
32650 }
32651 }
32652
32653 if (canUseDOM) {
32654 detectEvents();
32655 }
32656
32657 // We use the raw {add|remove}EventListener() call because EventListener
32658 // does not know how to remove event listeners and we really should
32659 // clean up. Also, these events are not triggered in older browsers
32660 // so we should be A-OK here.
32661
32662 function addEventListener(node, eventName, eventListener) {
32663 node.addEventListener(eventName, eventListener, false);
32664 }
32665
32666 function removeEventListener(node, eventName, eventListener) {
32667 node.removeEventListener(eventName, eventListener, false);
32668 }
32669
32670 var ReactTransitionEvents = {
32671 addEndEventListener: function addEndEventListener(node, eventListener) {
32672 if (endEvents.length === 0) {
32673 // If CSS transitions are not supported, trigger an "end animation"
32674 // event immediately.
32675 window.setTimeout(eventListener, 0);
32676 return;
32677 }
32678 endEvents.forEach(function (endEvent) {
32679 addEventListener(node, endEvent, eventListener);
32680 });
32681 },
32682
32683 removeEndEventListener: function removeEndEventListener(node, eventListener) {
32684 if (endEvents.length === 0) {
32685 return;
32686 }
32687 endEvents.forEach(function (endEvent) {
32688 removeEventListener(node, endEvent, eventListener);
32689 });
32690 }
32691 };
32692
32693 exports['default'] = ReactTransitionEvents;
32694 module.exports = exports['default'];
32695
32696/***/ },
32697/* 397 */
32698/***/ function(module, exports, __webpack_require__) {
32699
32700 'use strict';
32701
32702 var _inherits = __webpack_require__(372)['default'];
32703
32704 var _classCallCheck = __webpack_require__(379)['default'];
32705
32706 var _extends = __webpack_require__(338)['default'];
32707
32708 var _objectWithoutProperties = __webpack_require__(355)['default'];
32709
32710 var _interopRequireDefault = __webpack_require__(335)['default'];
32711
32712 exports.__esModule = true;
32713
32714 var _classnames = __webpack_require__(356);
32715
32716 var _classnames2 = _interopRequireDefault(_classnames);
32717
32718 var _react = __webpack_require__(89);
32719
32720 var _react2 = _interopRequireDefault(_react);
32721
32722 var _warning = __webpack_require__(271);
32723
32724 var _warning2 = _interopRequireDefault(_warning);
32725
32726 var _utilsBootstrapUtils = __webpack_require__(357);
32727
32728 var propTypes = {
32729 inline: _react2['default'].PropTypes.bool,
32730 disabled: _react2['default'].PropTypes.bool,
32731 /**
32732 * Only valid if `inline` is not set.
32733 */
32734 validationState: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']),
32735 /**
32736 * Attaches a ref to the `<input>` element. Only functions can be used here.
32737 *
32738 * ```js
32739 * <Checkbox inputRef={ref => { this.input = ref; }} />
32740 * ```
32741 */
32742 inputRef: _react2['default'].PropTypes.func
32743 };
32744
32745 var defaultProps = {
32746 inline: false,
32747 disabled: false
32748 };
32749
32750 var Checkbox = (function (_React$Component) {
32751 _inherits(Checkbox, _React$Component);
32752
32753 function Checkbox() {
32754 _classCallCheck(this, Checkbox);
32755
32756 _React$Component.apply(this, arguments);
32757 }
32758
32759 Checkbox.prototype.render = function render() {
32760 var _props = this.props;
32761 var inline = _props.inline;
32762 var disabled = _props.disabled;
32763 var validationState = _props.validationState;
32764 var inputRef = _props.inputRef;
32765 var className = _props.className;
32766 var style = _props.style;
32767 var children = _props.children;
32768
32769 var props = _objectWithoutProperties(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'children']);
32770
32771 delete props.bsClass;
32772
32773 var input = _react2['default'].createElement('input', _extends({}, props, {
32774 ref: inputRef,
32775 type: 'checkbox',
32776 disabled: disabled
32777 }));
32778
32779 if (inline) {
32780 var _classes;
32781
32782 var _classes2 = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props, 'inline')] = true, _classes.disabled = disabled, _classes);
32783
32784 // Use a warning here instead of in propTypes to get better-looking
32785 // generated documentation.
32786 (undefined) !== 'production' ? _warning2['default'](!validationState, '`validationState` is ignored on `<Checkbox inline>`. To display ' + 'validation state on an inline checkbox, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : undefined;
32787
32788 return _react2['default'].createElement(
32789 'label',
32790 { className: _classnames2['default'](className, _classes2), style: style },
32791 input,
32792 children
32793 );
32794 }
32795
32796 var classes = _extends({}, _utilsBootstrapUtils.getClassSet(this.props), {
32797 disabled: disabled
32798 });
32799 if (validationState) {
32800 classes['has-' + validationState] = true;
32801 }
32802
32803 return _react2['default'].createElement(
32804 'div',
32805 { className: _classnames2['default'](className, classes), style: style },
32806 _react2['default'].createElement(
32807 'label',
32808 null,
32809 input,
32810 children
32811 )
32812 );
32813 };
32814
32815 return Checkbox;
32816 })(_react2['default'].Component);
32817
32818 Checkbox.propTypes = propTypes;
32819 Checkbox.defaultProps = defaultProps;
32820
32821 exports['default'] = _utilsBootstrapUtils.bsClass('checkbox', Checkbox);
32822 module.exports = exports['default'];
32823
32824/***/ },
32825/* 398 */
32826/***/ function(module, exports, __webpack_require__) {
32827
32828 'use strict';
32829
32830 var _extends = __webpack_require__(338)['default'];
32831
32832 var _Object$keys = __webpack_require__(361)['default'];
32833
32834 var _interopRequireDefault = __webpack_require__(335)['default'];
32835
32836 exports.__esModule = true;
32837
32838 var _react = __webpack_require__(89);
32839
32840 var _react2 = _interopRequireDefault(_react);
32841
32842 var _classnames = __webpack_require__(356);
32843
32844 var _classnames2 = _interopRequireDefault(_classnames);
32845
32846 var _styleMaps = __webpack_require__(358);
32847
32848 var _styleMaps2 = _interopRequireDefault(_styleMaps);
32849
32850 var _reactPropTypesLibElementType = __webpack_require__(380);
32851
32852 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
32853
32854 var Clearfix = _react2['default'].createClass({
32855 displayName: 'Clearfix',
32856
32857 propTypes: {
32858 /**
32859 * You can use a custom element for this component
32860 */
32861 componentClass: _reactPropTypesLibElementType2['default'],
32862 /**
32863 * Apply clearfix
32864 *
32865 * on Extra small devices Phones
32866 *
32867 * adds class `visible-xs-block`
32868 */
32869 visibleXsBlock: _react2['default'].PropTypes.bool,
32870 /**
32871 * Apply clearfix
32872 *
32873 * on Small devices Tablets
32874 *
32875 * adds class `visible-sm-block`
32876 */
32877 visibleSmBlock: _react2['default'].PropTypes.bool,
32878 /**
32879 * Apply clearfix
32880 *
32881 * on Medium devices Desktops
32882 *
32883 * adds class `visible-md-block`
32884 */
32885 visibleMdBlock: _react2['default'].PropTypes.bool,
32886 /**
32887 * Apply clearfix
32888 *
32889 * on Large devices Desktops
32890 *
32891 * adds class `visible-lg-block`
32892 */
32893 visibleLgBlock: _react2['default'].PropTypes.bool
32894 },
32895
32896 getDefaultProps: function getDefaultProps() {
32897 return {
32898 componentClass: 'div'
32899 };
32900 },
32901
32902 render: function render() {
32903 var _this = this;
32904
32905 var ComponentClass = this.props.componentClass;
32906
32907 var classes = {};
32908
32909 _Object$keys(_styleMaps2['default'].SIZES).forEach(function (key) {
32910 var size = _styleMaps2['default'].SIZES[key];
32911
32912 classes['visible-' + size + '-block'] = _this.props['visible' + size.charAt(0).toUpperCase() + size.slice(1) + 'Block'];
32913 }, this);
32914
32915 return _react2['default'].createElement(
32916 ComponentClass,
32917 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'clearfix', classes) }),
32918 this.props.children
32919 );
32920 }
32921 });
32922
32923 exports['default'] = Clearfix;
32924 module.exports = exports['default'];
32925
32926/***/ },
32927/* 399 */
32928/***/ function(module, exports, __webpack_require__) {
32929
32930 'use strict';
32931
32932 var _inherits = __webpack_require__(372)['default'];
32933
32934 var _classCallCheck = __webpack_require__(379)['default'];
32935
32936 var _extends = __webpack_require__(338)['default'];
32937
32938 var _objectWithoutProperties = __webpack_require__(355)['default'];
32939
32940 var _interopRequireDefault = __webpack_require__(335)['default'];
32941
32942 exports.__esModule = true;
32943
32944 var _classnames = __webpack_require__(356);
32945
32946 var _classnames2 = _interopRequireDefault(_classnames);
32947
32948 var _react = __webpack_require__(89);
32949
32950 var _react2 = _interopRequireDefault(_react);
32951
32952 var _warning = __webpack_require__(271);
32953
32954 var _warning2 = _interopRequireDefault(_warning);
32955
32956 var _utilsBootstrapUtils = __webpack_require__(357);
32957
32958 var propTypes = {
32959 /**
32960 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
32961 */
32962 htmlFor: _react2['default'].PropTypes.string,
32963 srOnly: _react2['default'].PropTypes.bool
32964 };
32965
32966 var defaultProps = {
32967 srOnly: false
32968 };
32969
32970 var contextTypes = {
32971 $bs_formGroup: _react2['default'].PropTypes.object
32972 };
32973
32974 var ControlLabel = (function (_React$Component) {
32975 _inherits(ControlLabel, _React$Component);
32976
32977 function ControlLabel() {
32978 _classCallCheck(this, ControlLabel);
32979
32980 _React$Component.apply(this, arguments);
32981 }
32982
32983 ControlLabel.prototype.render = function render() {
32984 var formGroup = this.context.$bs_formGroup;
32985 var controlId = formGroup && formGroup.controlId;
32986
32987 var _props = this.props;
32988 var _props$htmlFor = _props.htmlFor;
32989 var htmlFor = _props$htmlFor === undefined ? controlId : _props$htmlFor;
32990 var srOnly = _props.srOnly;
32991 var className = _props.className;
32992
32993 var props = _objectWithoutProperties(_props, ['htmlFor', 'srOnly', 'className']);
32994
32995 (undefined) !== 'production' ? _warning2['default'](controlId == null || htmlFor === controlId, '`controlId` is ignored on `<ControlLabel>` when `htmlFor` is specified.') : undefined;
32996
32997 delete props.bsClass;
32998
32999 var classes = _extends({}, _utilsBootstrapUtils.getClassSet(this.props), {
33000 'sr-only': srOnly
33001 });
33002
33003 return _react2['default'].createElement('label', _extends({}, props, {
33004 htmlFor: htmlFor,
33005 className: _classnames2['default'](className, classes)
33006 }));
33007 };
33008
33009 return ControlLabel;
33010 })(_react2['default'].Component);
33011
33012 ControlLabel.propTypes = propTypes;
33013 ControlLabel.defaultProps = defaultProps;
33014 ControlLabel.contextTypes = contextTypes;
33015
33016 exports['default'] = _utilsBootstrapUtils.bsClass('control-label', ControlLabel);
33017 module.exports = exports['default'];
33018
33019/***/ },
33020/* 400 */
33021/***/ function(module, exports, __webpack_require__) {
33022
33023 'use strict';
33024
33025 var _extends = __webpack_require__(338)['default'];
33026
33027 var _Object$keys = __webpack_require__(361)['default'];
33028
33029 var _interopRequireDefault = __webpack_require__(335)['default'];
33030
33031 exports.__esModule = true;
33032
33033 var _react = __webpack_require__(89);
33034
33035 var _react2 = _interopRequireDefault(_react);
33036
33037 var _classnames = __webpack_require__(356);
33038
33039 var _classnames2 = _interopRequireDefault(_classnames);
33040
33041 var _styleMaps = __webpack_require__(358);
33042
33043 var _styleMaps2 = _interopRequireDefault(_styleMaps);
33044
33045 var _reactPropTypesLibElementType = __webpack_require__(380);
33046
33047 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
33048
33049 var Col = _react2['default'].createClass({
33050 displayName: 'Col',
33051
33052 propTypes: {
33053 /**
33054 * The number of columns you wish to span
33055 *
33056 * for Extra small devices Phones (<768px)
33057 *
33058 * class-prefix `col-xs-`
33059 */
33060 xs: _react2['default'].PropTypes.number,
33061 /**
33062 * The number of columns you wish to span
33063 *
33064 * for Small devices Tablets (≥768px)
33065 *
33066 * class-prefix `col-sm-`
33067 */
33068 sm: _react2['default'].PropTypes.number,
33069 /**
33070 * The number of columns you wish to span
33071 *
33072 * for Medium devices Desktops (≥992px)
33073 *
33074 * class-prefix `col-md-`
33075 */
33076 md: _react2['default'].PropTypes.number,
33077 /**
33078 * The number of columns you wish to span
33079 *
33080 * for Large devices Desktops (≥1200px)
33081 *
33082 * class-prefix `col-lg-`
33083 */
33084 lg: _react2['default'].PropTypes.number,
33085 /**
33086 * Hide column
33087 *
33088 * on Extra small devices Phones
33089 *
33090 * adds class `hidden-xs`
33091 */
33092 xsHidden: _react2['default'].PropTypes.bool,
33093 /**
33094 * Hide column
33095 *
33096 * on Small devices Tablets
33097 *
33098 * adds class `hidden-sm`
33099 */
33100 smHidden: _react2['default'].PropTypes.bool,
33101 /**
33102 * Hide column
33103 *
33104 * on Medium devices Desktops
33105 *
33106 * adds class `hidden-md`
33107 */
33108 mdHidden: _react2['default'].PropTypes.bool,
33109 /**
33110 * Hide column
33111 *
33112 * on Large devices Desktops
33113 *
33114 * adds class `hidden-lg`
33115 */
33116 lgHidden: _react2['default'].PropTypes.bool,
33117 /**
33118 * Move columns to the right
33119 *
33120 * for Extra small devices Phones
33121 *
33122 * class-prefix `col-xs-offset-`
33123 */
33124 xsOffset: _react2['default'].PropTypes.number,
33125 /**
33126 * Move columns to the right
33127 *
33128 * for Small devices Tablets
33129 *
33130 * class-prefix `col-sm-offset-`
33131 */
33132 smOffset: _react2['default'].PropTypes.number,
33133 /**
33134 * Move columns to the right
33135 *
33136 * for Medium devices Desktops
33137 *
33138 * class-prefix `col-md-offset-`
33139 */
33140 mdOffset: _react2['default'].PropTypes.number,
33141 /**
33142 * Move columns to the right
33143 *
33144 * for Large devices Desktops
33145 *
33146 * class-prefix `col-lg-offset-`
33147 */
33148 lgOffset: _react2['default'].PropTypes.number,
33149 /**
33150 * Change the order of grid columns to the right
33151 *
33152 * for Extra small devices Phones
33153 *
33154 * class-prefix `col-xs-push-`
33155 */
33156 xsPush: _react2['default'].PropTypes.number,
33157 /**
33158 * Change the order of grid columns to the right
33159 *
33160 * for Small devices Tablets
33161 *
33162 * class-prefix `col-sm-push-`
33163 */
33164 smPush: _react2['default'].PropTypes.number,
33165 /**
33166 * Change the order of grid columns to the right
33167 *
33168 * for Medium devices Desktops
33169 *
33170 * class-prefix `col-md-push-`
33171 */
33172 mdPush: _react2['default'].PropTypes.number,
33173 /**
33174 * Change the order of grid columns to the right
33175 *
33176 * for Large devices Desktops
33177 *
33178 * class-prefix `col-lg-push-`
33179 */
33180 lgPush: _react2['default'].PropTypes.number,
33181 /**
33182 * Change the order of grid columns to the left
33183 *
33184 * for Extra small devices Phones
33185 *
33186 * class-prefix `col-xs-pull-`
33187 */
33188 xsPull: _react2['default'].PropTypes.number,
33189 /**
33190 * Change the order of grid columns to the left
33191 *
33192 * for Small devices Tablets
33193 *
33194 * class-prefix `col-sm-pull-`
33195 */
33196 smPull: _react2['default'].PropTypes.number,
33197 /**
33198 * Change the order of grid columns to the left
33199 *
33200 * for Medium devices Desktops
33201 *
33202 * class-prefix `col-md-pull-`
33203 */
33204 mdPull: _react2['default'].PropTypes.number,
33205 /**
33206 * Change the order of grid columns to the left
33207 *
33208 * for Large devices Desktops
33209 *
33210 * class-prefix `col-lg-pull-`
33211 */
33212 lgPull: _react2['default'].PropTypes.number,
33213 /**
33214 * You can use a custom element for this component
33215 */
33216 componentClass: _reactPropTypesLibElementType2['default']
33217 },
33218
33219 getDefaultProps: function getDefaultProps() {
33220 return {
33221 componentClass: 'div'
33222 };
33223 },
33224
33225 render: function render() {
33226 var _this = this;
33227
33228 var ComponentClass = this.props.componentClass;
33229 var classes = {};
33230
33231 _Object$keys(_styleMaps2['default'].SIZES).forEach(function (key) {
33232 var size = _styleMaps2['default'].SIZES[key];
33233 var prop = size;
33234 var classPart = size + '-';
33235
33236 if (_this.props[prop]) {
33237 classes['col-' + classPart + _this.props[prop]] = true;
33238 }
33239
33240 classes['hidden-' + size] = _this.props[size + 'Hidden'];
33241
33242 prop = size + 'Offset';
33243 classPart = size + '-offset-';
33244 if (_this.props[prop] >= 0) {
33245 classes['col-' + classPart + _this.props[prop]] = true;
33246 }
33247
33248 prop = size + 'Push';
33249 classPart = size + '-push-';
33250 if (_this.props[prop] >= 0) {
33251 classes['col-' + classPart + _this.props[prop]] = true;
33252 }
33253
33254 prop = size + 'Pull';
33255 classPart = size + '-pull-';
33256 if (_this.props[prop] >= 0) {
33257 classes['col-' + classPart + _this.props[prop]] = true;
33258 }
33259 }, this);
33260
33261 return _react2['default'].createElement(
33262 ComponentClass,
33263 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
33264 this.props.children
33265 );
33266 }
33267 });
33268
33269 exports['default'] = Col;
33270 module.exports = exports['default'];
33271
33272/***/ },
33273/* 401 */
33274/***/ function(module, exports, __webpack_require__) {
33275
33276 'use strict';
33277
33278 var _inherits = __webpack_require__(372)['default'];
33279
33280 var _classCallCheck = __webpack_require__(379)['default'];
33281
33282 var _extends = __webpack_require__(338)['default'];
33283
33284 var _interopRequireDefault = __webpack_require__(335)['default'];
33285
33286 exports.__esModule = true;
33287
33288 var _domHelpersStyle = __webpack_require__(402);
33289
33290 var _domHelpersStyle2 = _interopRequireDefault(_domHelpersStyle);
33291
33292 var _react = __webpack_require__(89);
33293
33294 var _react2 = _interopRequireDefault(_react);
33295
33296 var _classnames = __webpack_require__(356);
33297
33298 var _classnames2 = _interopRequireDefault(_classnames);
33299
33300 var _reactOverlaysLibTransition = __webpack_require__(410);
33301
33302 var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition);
33303
33304 var _utilsCreateChainedFunction = __webpack_require__(414);
33305
33306 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
33307
33308 var capitalize = function capitalize(str) {
33309 return str[0].toUpperCase() + str.substr(1);
33310 };
33311
33312 // reading a dimension prop will cause the browser to recalculate,
33313 // which will let our animations work
33314 var triggerBrowserReflow = function triggerBrowserReflow(node) {
33315 return node.offsetHeight;
33316 };
33317
33318 var MARGINS = {
33319 height: ['marginTop', 'marginBottom'],
33320 width: ['marginLeft', 'marginRight']
33321 };
33322
33323 function getDimensionValue(dimension, elem) {
33324 var value = elem['offset' + capitalize(dimension)];
33325 var margins = MARGINS[dimension];
33326
33327 return value + parseInt(_domHelpersStyle2['default'](elem, margins[0]), 10) + parseInt(_domHelpersStyle2['default'](elem, margins[1]), 10);
33328 }
33329
33330 var Collapse = (function (_React$Component) {
33331 _inherits(Collapse, _React$Component);
33332
33333 function Collapse(props, context) {
33334 _classCallCheck(this, Collapse);
33335
33336 _React$Component.call(this, props, context);
33337
33338 this.onEnterListener = this.handleEnter.bind(this);
33339 this.onEnteringListener = this.handleEntering.bind(this);
33340 this.onEnteredListener = this.handleEntered.bind(this);
33341 this.onExitListener = this.handleExit.bind(this);
33342 this.onExitingListener = this.handleExiting.bind(this);
33343 }
33344
33345 // Explicitly copied from Transition for doc generation.
33346 // TODO: Remove duplication once #977 is resolved.
33347
33348 Collapse.prototype.render = function render() {
33349 var enter = _utilsCreateChainedFunction2['default'](this.onEnterListener, this.props.onEnter);
33350 var entering = _utilsCreateChainedFunction2['default'](this.onEnteringListener, this.props.onEntering);
33351 var entered = _utilsCreateChainedFunction2['default'](this.onEnteredListener, this.props.onEntered);
33352 var exit = _utilsCreateChainedFunction2['default'](this.onExitListener, this.props.onExit);
33353 var exiting = _utilsCreateChainedFunction2['default'](this.onExitingListener, this.props.onExiting);
33354
33355 return _react2['default'].createElement(
33356 _reactOverlaysLibTransition2['default'],
33357 _extends({
33358 ref: 'transition'
33359 }, this.props, {
33360 'aria-expanded': this.props.role ? this.props['in'] : null,
33361 className: _classnames2['default'](this.props.className, { width: this._dimension() === 'width' }),
33362 exitedClassName: 'collapse',
33363 exitingClassName: 'collapsing',
33364 enteredClassName: 'collapse in',
33365 enteringClassName: 'collapsing',
33366 onEnter: enter,
33367 onEntering: entering,
33368 onEntered: entered,
33369 onExit: exit,
33370 onExiting: exiting,
33371 onExited: this.props.onExited
33372 }),
33373 this.props.children
33374 );
33375 };
33376
33377 /* -- Expanding -- */
33378
33379 Collapse.prototype.handleEnter = function handleEnter(elem) {
33380 var dimension = this._dimension();
33381 elem.style[dimension] = '0';
33382 };
33383
33384 Collapse.prototype.handleEntering = function handleEntering(elem) {
33385 var dimension = this._dimension();
33386
33387 elem.style[dimension] = this._getScrollDimensionValue(elem, dimension);
33388 };
33389
33390 Collapse.prototype.handleEntered = function handleEntered(elem) {
33391 var dimension = this._dimension();
33392 elem.style[dimension] = null;
33393 };
33394
33395 /* -- Collapsing -- */
33396
33397 Collapse.prototype.handleExit = function handleExit(elem) {
33398 var dimension = this._dimension();
33399
33400 elem.style[dimension] = this.props.getDimensionValue(dimension, elem) + 'px';
33401 };
33402
33403 Collapse.prototype.handleExiting = function handleExiting(elem) {
33404 var dimension = this._dimension();
33405
33406 triggerBrowserReflow(elem);
33407 elem.style[dimension] = '0';
33408 };
33409
33410 Collapse.prototype._dimension = function _dimension() {
33411 return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension;
33412 };
33413
33414 // for testing
33415
33416 Collapse.prototype._getTransitionInstance = function _getTransitionInstance() {
33417 return this.refs.transition;
33418 };
33419
33420 Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) {
33421 return elem['scroll' + capitalize(dimension)] + 'px';
33422 };
33423
33424 return Collapse;
33425 })(_react2['default'].Component);
33426
33427 Collapse.propTypes = {
33428 /**
33429 * Show the component; triggers the expand or collapse animation
33430 */
33431 'in': _react2['default'].PropTypes.bool,
33432
33433 /**
33434 * Unmount the component (remove it from the DOM) when it is collapsed
33435 */
33436 unmountOnExit: _react2['default'].PropTypes.bool,
33437
33438 /**
33439 * Run the expand animation when the component mounts, if it is initially
33440 * shown
33441 */
33442 transitionAppear: _react2['default'].PropTypes.bool,
33443
33444 /**
33445 * Duration of the collapse animation in milliseconds, to ensure that
33446 * finishing callbacks are fired even if the original browser transition end
33447 * events are canceled
33448 */
33449 timeout: _react2['default'].PropTypes.number,
33450
33451 /**
33452 * Callback fired before the component expands
33453 */
33454 onEnter: _react2['default'].PropTypes.func,
33455 /**
33456 * Callback fired after the component starts to expand
33457 */
33458 onEntering: _react2['default'].PropTypes.func,
33459 /**
33460 * Callback fired after the component has expanded
33461 */
33462 onEntered: _react2['default'].PropTypes.func,
33463 /**
33464 * Callback fired before the component collapses
33465 */
33466 onExit: _react2['default'].PropTypes.func,
33467 /**
33468 * Callback fired after the component starts to collapse
33469 */
33470 onExiting: _react2['default'].PropTypes.func,
33471 /**
33472 * Callback fired after the component has collapsed
33473 */
33474 onExited: _react2['default'].PropTypes.func,
33475
33476 /**
33477 * The dimension used when collapsing, or a function that returns the
33478 * dimension
33479 *
33480 * _Note: Bootstrap only partially supports 'width'!
33481 * You will need to supply your own CSS animation for the `.width` CSS class._
33482 */
33483 dimension: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.oneOf(['height', 'width']), _react2['default'].PropTypes.func]),
33484
33485 /**
33486 * Function that returns the height or width of the animating DOM node
33487 *
33488 * Allows for providing some custom logic for how much the Collapse component
33489 * should animate in its specified dimension. Called with the current
33490 * dimension prop value and the DOM node.
33491 */
33492 getDimensionValue: _react2['default'].PropTypes.func,
33493
33494 /**
33495 * ARIA role of collapsible element
33496 */
33497 role: _react2['default'].PropTypes.string
33498 };
33499
33500 Collapse.defaultProps = {
33501 'in': false,
33502 timeout: 300,
33503 unmountOnExit: false,
33504 transitionAppear: false,
33505
33506 dimension: 'height',
33507 getDimensionValue: getDimensionValue
33508 };
33509
33510 exports['default'] = Collapse;
33511 module.exports = exports['default'];
33512
33513/***/ },
33514/* 402 */
33515/***/ function(module, exports, __webpack_require__) {
33516
33517 'use strict';
33518
33519 var camelize = __webpack_require__(403),
33520 hyphenate = __webpack_require__(405),
33521 _getComputedStyle = __webpack_require__(407),
33522 removeStyle = __webpack_require__(409);
33523
33524 var has = Object.prototype.hasOwnProperty;
33525
33526 module.exports = function style(node, property, value) {
33527 var css = '',
33528 props = property;
33529
33530 if (typeof property === 'string') {
33531
33532 if (value === undefined) return node.style[camelize(property)] || _getComputedStyle(node).getPropertyValue(hyphenate(property));else (props = {})[property] = value;
33533 }
33534
33535 for (var key in props) if (has.call(props, key)) {
33536 !props[key] && props[key] !== 0 ? removeStyle(node, hyphenate(key)) : css += hyphenate(key) + ':' + props[key] + ';';
33537 }
33538
33539 node.style.cssText += ';' + css;
33540 };
33541
33542/***/ },
33543/* 403 */
33544/***/ function(module, exports, __webpack_require__) {
33545
33546 /**
33547 * Copyright 2014-2015, Facebook, Inc.
33548 * All rights reserved.
33549 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
33550 */
33551
33552 'use strict';
33553 var camelize = __webpack_require__(404);
33554 var msPattern = /^-ms-/;
33555
33556 module.exports = function camelizeStyleName(string) {
33557 return camelize(string.replace(msPattern, 'ms-'));
33558 };
33559
33560/***/ },
33561/* 404 */
33562/***/ function(module, exports) {
33563
33564 "use strict";
33565
33566 var rHyphen = /-(.)/g;
33567
33568 module.exports = function camelize(string) {
33569 return string.replace(rHyphen, function (_, chr) {
33570 return chr.toUpperCase();
33571 });
33572 };
33573
33574/***/ },
33575/* 405 */
33576/***/ function(module, exports, __webpack_require__) {
33577
33578 /**
33579 * Copyright 2013-2014, Facebook, Inc.
33580 * All rights reserved.
33581 * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js
33582 */
33583
33584 "use strict";
33585
33586 var hyphenate = __webpack_require__(406);
33587 var msPattern = /^ms-/;
33588
33589 module.exports = function hyphenateStyleName(string) {
33590 return hyphenate(string).replace(msPattern, "-ms-");
33591 };
33592
33593/***/ },
33594/* 406 */
33595/***/ function(module, exports) {
33596
33597 'use strict';
33598
33599 var rUpper = /([A-Z])/g;
33600
33601 module.exports = function hyphenate(string) {
33602 return string.replace(rUpper, '-$1').toLowerCase();
33603 };
33604
33605/***/ },
33606/* 407 */
33607/***/ function(module, exports, __webpack_require__) {
33608
33609 'use strict';
33610
33611 var babelHelpers = __webpack_require__(408);
33612
33613 var _utilCamelizeStyle = __webpack_require__(403);
33614
33615 var _utilCamelizeStyle2 = babelHelpers.interopRequireDefault(_utilCamelizeStyle);
33616
33617 var rposition = /^(top|right|bottom|left)$/;
33618 var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i;
33619
33620 module.exports = function _getComputedStyle(node) {
33621 if (!node) throw new TypeError('No Element passed to `getComputedStyle()`');
33622 var doc = node.ownerDocument;
33623
33624 return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : { //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72
33625 getPropertyValue: function getPropertyValue(prop) {
33626 var style = node.style;
33627
33628 prop = (0, _utilCamelizeStyle2['default'])(prop);
33629
33630 if (prop == 'float') prop = 'styleFloat';
33631
33632 var current = node.currentStyle[prop] || null;
33633
33634 if (current == null && style && style[prop]) current = style[prop];
33635
33636 if (rnumnonpx.test(current) && !rposition.test(prop)) {
33637 // Remember the original values
33638 var left = style.left;
33639 var runStyle = node.runtimeStyle;
33640 var rsLeft = runStyle && runStyle.left;
33641
33642 // Put in the new values to get a computed value out
33643 if (rsLeft) runStyle.left = node.currentStyle.left;
33644
33645 style.left = prop === 'fontSize' ? '1em' : current;
33646 current = style.pixelLeft + 'px';
33647
33648 // Revert the changed values
33649 style.left = left;
33650 if (rsLeft) runStyle.left = rsLeft;
33651 }
33652
33653 return current;
33654 }
33655 };
33656 };
33657
33658/***/ },
33659/* 408 */
33660/***/ function(module, exports, __webpack_require__) {
33661
33662 var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) {
33663 if (true) {
33664 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
33665 } else if (typeof exports === "object") {
33666 factory(exports);
33667 } else {
33668 factory(root.babelHelpers = {});
33669 }
33670 })(this, function (global) {
33671 var babelHelpers = global;
33672
33673 babelHelpers.interopRequireDefault = function (obj) {
33674 return obj && obj.__esModule ? obj : {
33675 "default": obj
33676 };
33677 };
33678
33679 babelHelpers._extends = Object.assign || function (target) {
33680 for (var i = 1; i < arguments.length; i++) {
33681 var source = arguments[i];
33682
33683 for (var key in source) {
33684 if (Object.prototype.hasOwnProperty.call(source, key)) {
33685 target[key] = source[key];
33686 }
33687 }
33688 }
33689
33690 return target;
33691 };
33692 })
33693
33694/***/ },
33695/* 409 */
33696/***/ function(module, exports) {
33697
33698 'use strict';
33699
33700 module.exports = function removeStyle(node, key) {
33701 return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key);
33702 };
33703
33704/***/ },
33705/* 410 */
33706/***/ function(module, exports, __webpack_require__) {
33707
33708 'use strict';
33709
33710 Object.defineProperty(exports, "__esModule", {
33711 value: true
33712 });
33713 exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
33714
33715 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
33716
33717 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; }; }();
33718
33719 var _react = __webpack_require__(89);
33720
33721 var _react2 = _interopRequireDefault(_react);
33722
33723 var _reactDom = __webpack_require__(122);
33724
33725 var _reactDom2 = _interopRequireDefault(_reactDom);
33726
33727 var _properties = __webpack_require__(411);
33728
33729 var _properties2 = _interopRequireDefault(_properties);
33730
33731 var _on = __webpack_require__(413);
33732
33733 var _on2 = _interopRequireDefault(_on);
33734
33735 var _classnames = __webpack_require__(356);
33736
33737 var _classnames2 = _interopRequireDefault(_classnames);
33738
33739 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33740
33741 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
33742
33743 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
33744
33745 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; }
33746
33747 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; }
33748
33749 var transitionEndEvent = _properties2.default.end;
33750
33751 var UNMOUNTED = exports.UNMOUNTED = 0;
33752 var EXITED = exports.EXITED = 1;
33753 var ENTERING = exports.ENTERING = 2;
33754 var ENTERED = exports.ENTERED = 3;
33755 var EXITING = exports.EXITING = 4;
33756
33757 /**
33758 * The Transition component lets you define and run css transitions with a simple declarative api.
33759 * It works similar to React's own [CSSTransitionGroup](http://facebook.github.io/react/docs/animation.html#high-level-api-reactcsstransitiongroup)
33760 * but is specifically optimized for transitioning a single child "in" or "out".
33761 *
33762 * You don't even need to use class based css transitions if you don't want to (but it is easiest).
33763 * The extensive set of lifecyle callbacks means you have control over
33764 * the transitioning now at each step of the way.
33765 */
33766
33767 var Transition = function (_React$Component) {
33768 _inherits(Transition, _React$Component);
33769
33770 function Transition(props, context) {
33771 _classCallCheck(this, Transition);
33772
33773 var _this = _possibleConstructorReturn(this, (Transition.__proto__ || Object.getPrototypeOf(Transition)).call(this, props, context));
33774
33775 var initialStatus = void 0;
33776 if (props.in) {
33777 // Start enter transition in componentDidMount.
33778 initialStatus = props.transitionAppear ? EXITED : ENTERED;
33779 } else {
33780 initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
33781 }
33782 _this.state = { status: initialStatus };
33783
33784 _this.nextCallback = null;
33785 return _this;
33786 }
33787
33788 _createClass(Transition, [{
33789 key: 'componentDidMount',
33790 value: function componentDidMount() {
33791 if (this.props.transitionAppear && this.props.in) {
33792 this.performEnter(this.props);
33793 }
33794 }
33795 }, {
33796 key: 'componentWillReceiveProps',
33797 value: function componentWillReceiveProps(nextProps) {
33798 if (nextProps.in && this.props.unmountOnExit) {
33799 if (this.state.status === UNMOUNTED) {
33800 // Start enter transition in componentDidUpdate.
33801 this.setState({ status: EXITED });
33802 }
33803 } else {
33804 this._needsUpdate = true;
33805 }
33806 }
33807 }, {
33808 key: 'componentDidUpdate',
33809 value: function componentDidUpdate() {
33810 var status = this.state.status;
33811
33812 if (this.props.unmountOnExit && status === EXITED) {
33813 // EXITED is always a transitional state to either ENTERING or UNMOUNTED
33814 // when using unmountOnExit.
33815 if (this.props.in) {
33816 this.performEnter(this.props);
33817 } else {
33818 this.setState({ status: UNMOUNTED });
33819 }
33820
33821 return;
33822 }
33823
33824 // guard ensures we are only responding to prop changes
33825 if (this._needsUpdate) {
33826 this._needsUpdate = false;
33827
33828 if (this.props.in) {
33829 if (status === EXITING) {
33830 this.performEnter(this.props);
33831 } else if (status === EXITED) {
33832 this.performEnter(this.props);
33833 }
33834 // Otherwise we're already entering or entered.
33835 } else {
33836 if (status === ENTERING || status === ENTERED) {
33837 this.performExit(this.props);
33838 }
33839 // Otherwise we're already exited or exiting.
33840 }
33841 }
33842 }
33843 }, {
33844 key: 'componentWillUnmount',
33845 value: function componentWillUnmount() {
33846 this.cancelNextCallback();
33847 }
33848 }, {
33849 key: 'performEnter',
33850 value: function performEnter(props) {
33851 var _this2 = this;
33852
33853 this.cancelNextCallback();
33854 var node = _reactDom2.default.findDOMNode(this);
33855
33856 // Not this.props, because we might be about to receive new props.
33857 props.onEnter(node);
33858
33859 this.safeSetState({ status: ENTERING }, function () {
33860 _this2.props.onEntering(node);
33861
33862 _this2.onTransitionEnd(node, function () {
33863 _this2.safeSetState({ status: ENTERED }, function () {
33864 _this2.props.onEntered(node);
33865 });
33866 });
33867 });
33868 }
33869 }, {
33870 key: 'performExit',
33871 value: function performExit(props) {
33872 var _this3 = this;
33873
33874 this.cancelNextCallback();
33875 var node = _reactDom2.default.findDOMNode(this);
33876
33877 // Not this.props, because we might be about to receive new props.
33878 props.onExit(node);
33879
33880 this.safeSetState({ status: EXITING }, function () {
33881 _this3.props.onExiting(node);
33882
33883 _this3.onTransitionEnd(node, function () {
33884 _this3.safeSetState({ status: EXITED }, function () {
33885 _this3.props.onExited(node);
33886 });
33887 });
33888 });
33889 }
33890 }, {
33891 key: 'cancelNextCallback',
33892 value: function cancelNextCallback() {
33893 if (this.nextCallback !== null) {
33894 this.nextCallback.cancel();
33895 this.nextCallback = null;
33896 }
33897 }
33898 }, {
33899 key: 'safeSetState',
33900 value: function safeSetState(nextState, callback) {
33901 // This shouldn't be necessary, but there are weird race conditions with
33902 // setState callbacks and unmounting in testing, so always make sure that
33903 // we can cancel any pending setState callbacks after we unmount.
33904 this.setState(nextState, this.setNextCallback(callback));
33905 }
33906 }, {
33907 key: 'setNextCallback',
33908 value: function setNextCallback(callback) {
33909 var _this4 = this;
33910
33911 var active = true;
33912
33913 this.nextCallback = function (event) {
33914 if (active) {
33915 active = false;
33916 _this4.nextCallback = null;
33917
33918 callback(event);
33919 }
33920 };
33921
33922 this.nextCallback.cancel = function () {
33923 active = false;
33924 };
33925
33926 return this.nextCallback;
33927 }
33928 }, {
33929 key: 'onTransitionEnd',
33930 value: function onTransitionEnd(node, handler) {
33931 this.setNextCallback(handler);
33932
33933 if (node) {
33934 (0, _on2.default)(node, transitionEndEvent, this.nextCallback);
33935 setTimeout(this.nextCallback, this.props.timeout);
33936 } else {
33937 setTimeout(this.nextCallback, 0);
33938 }
33939 }
33940 }, {
33941 key: 'render',
33942 value: function render() {
33943 var status = this.state.status;
33944 if (status === UNMOUNTED) {
33945 return null;
33946 }
33947
33948 var _props = this.props;
33949 var children = _props.children;
33950 var className = _props.className;
33951
33952 var childProps = _objectWithoutProperties(_props, ['children', 'className']);
33953
33954 Object.keys(Transition.propTypes).forEach(function (key) {
33955 return delete childProps[key];
33956 });
33957
33958 var transitionClassName = void 0;
33959 if (status === EXITED) {
33960 transitionClassName = this.props.exitedClassName;
33961 } else if (status === ENTERING) {
33962 transitionClassName = this.props.enteringClassName;
33963 } else if (status === ENTERED) {
33964 transitionClassName = this.props.enteredClassName;
33965 } else if (status === EXITING) {
33966 transitionClassName = this.props.exitingClassName;
33967 }
33968
33969 var child = _react2.default.Children.only(children);
33970 return _react2.default.cloneElement(child, _extends({}, childProps, {
33971 className: (0, _classnames2.default)(child.props.className, className, transitionClassName)
33972 }));
33973 }
33974 }]);
33975
33976 return Transition;
33977 }(_react2.default.Component);
33978
33979 Transition.propTypes = {
33980 /**
33981 * Show the component; triggers the enter or exit animation
33982 */
33983 in: _react2.default.PropTypes.bool,
33984
33985 /**
33986 * Unmount the component (remove it from the DOM) when it is not shown
33987 */
33988 unmountOnExit: _react2.default.PropTypes.bool,
33989
33990 /**
33991 * Run the enter animation when the component mounts, if it is initially
33992 * shown
33993 */
33994 transitionAppear: _react2.default.PropTypes.bool,
33995
33996 /**
33997 * A Timeout for the animation, in milliseconds, to ensure that a node doesn't
33998 * transition indefinately if the browser transitionEnd events are
33999 * canceled or interrupted.
34000 *
34001 * By default this is set to a high number (5 seconds) as a failsafe. You should consider
34002 * setting this to the duration of your animation (or a bit above it).
34003 */
34004 timeout: _react2.default.PropTypes.number,
34005
34006 /**
34007 * CSS class or classes applied when the component is exited
34008 */
34009 exitedClassName: _react2.default.PropTypes.string,
34010 /**
34011 * CSS class or classes applied while the component is exiting
34012 */
34013 exitingClassName: _react2.default.PropTypes.string,
34014 /**
34015 * CSS class or classes applied when the component is entered
34016 */
34017 enteredClassName: _react2.default.PropTypes.string,
34018 /**
34019 * CSS class or classes applied while the component is entering
34020 */
34021 enteringClassName: _react2.default.PropTypes.string,
34022
34023 /**
34024 * Callback fired before the "entering" classes are applied
34025 */
34026 onEnter: _react2.default.PropTypes.func,
34027 /**
34028 * Callback fired after the "entering" classes are applied
34029 */
34030 onEntering: _react2.default.PropTypes.func,
34031 /**
34032 * Callback fired after the "enter" classes are applied
34033 */
34034 onEntered: _react2.default.PropTypes.func,
34035 /**
34036 * Callback fired before the "exiting" classes are applied
34037 */
34038 onExit: _react2.default.PropTypes.func,
34039 /**
34040 * Callback fired after the "exiting" classes are applied
34041 */
34042 onExiting: _react2.default.PropTypes.func,
34043 /**
34044 * Callback fired after the "exited" classes are applied
34045 */
34046 onExited: _react2.default.PropTypes.func
34047 };
34048
34049 // Name the function so it is clearer in the documentation
34050 function noop() {}
34051
34052 Transition.displayName = 'Transition';
34053
34054 Transition.defaultProps = {
34055 in: false,
34056 unmountOnExit: false,
34057 transitionAppear: false,
34058
34059 timeout: 5000,
34060
34061 onEnter: noop,
34062 onEntering: noop,
34063 onEntered: noop,
34064
34065 onExit: noop,
34066 onExiting: noop,
34067 onExited: noop
34068 };
34069
34070 exports.default = Transition;
34071
34072/***/ },
34073/* 411 */
34074/***/ function(module, exports, __webpack_require__) {
34075
34076 'use strict';
34077 var canUseDOM = __webpack_require__(412);
34078
34079 var has = Object.prototype.hasOwnProperty,
34080 transform = 'transform',
34081 transition = {},
34082 transitionTiming,
34083 transitionDuration,
34084 transitionProperty,
34085 transitionDelay;
34086
34087 if (canUseDOM) {
34088 transition = getTransitionProperties();
34089
34090 transform = transition.prefix + transform;
34091
34092 transitionProperty = transition.prefix + 'transition-property';
34093 transitionDuration = transition.prefix + 'transition-duration';
34094 transitionDelay = transition.prefix + 'transition-delay';
34095 transitionTiming = transition.prefix + 'transition-timing-function';
34096 }
34097
34098 module.exports = {
34099 transform: transform,
34100 end: transition.end,
34101 property: transitionProperty,
34102 timing: transitionTiming,
34103 delay: transitionDelay,
34104 duration: transitionDuration
34105 };
34106
34107 function getTransitionProperties() {
34108 var endEvent,
34109 prefix = '',
34110 transitions = {
34111 O: 'otransitionend',
34112 Moz: 'transitionend',
34113 Webkit: 'webkitTransitionEnd',
34114 ms: 'MSTransitionEnd'
34115 };
34116
34117 var element = document.createElement('div');
34118
34119 for (var vendor in transitions) if (has.call(transitions, vendor)) {
34120 if (element.style[vendor + 'TransitionProperty'] !== undefined) {
34121 prefix = '-' + vendor.toLowerCase() + '-';
34122 endEvent = transitions[vendor];
34123 break;
34124 }
34125 }
34126
34127 if (!endEvent && element.style.transitionProperty !== undefined) endEvent = 'transitionend';
34128
34129 return { end: endEvent, prefix: prefix };
34130 }
34131
34132/***/ },
34133/* 412 */
34134/***/ function(module, exports) {
34135
34136 'use strict';
34137 module.exports = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
34138
34139/***/ },
34140/* 413 */
34141/***/ function(module, exports, __webpack_require__) {
34142
34143 'use strict';
34144 var canUseDOM = __webpack_require__(412);
34145 var on = function on() {};
34146
34147 if (canUseDOM) {
34148 on = (function () {
34149
34150 if (document.addEventListener) return function (node, eventName, handler, capture) {
34151 return node.addEventListener(eventName, handler, capture || false);
34152 };else if (document.attachEvent) return function (node, eventName, handler) {
34153 return node.attachEvent('on' + eventName, handler);
34154 };
34155 })();
34156 }
34157
34158 module.exports = on;
34159
34160/***/ },
34161/* 414 */
34162/***/ function(module, exports) {
34163
34164 /**
34165 * Safe chained function
34166 *
34167 * Will only create a new function if needed,
34168 * otherwise will pass back existing functions or null.
34169 *
34170 * @param {function} functions to chain
34171 * @returns {function|null}
34172 */
34173 'use strict';
34174
34175 exports.__esModule = true;
34176 function createChainedFunction() {
34177 for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
34178 funcs[_key] = arguments[_key];
34179 }
34180
34181 return funcs.filter(function (f) {
34182 return f != null;
34183 }).reduce(function (acc, f) {
34184 if (typeof f !== 'function') {
34185 throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
34186 }
34187
34188 if (acc === null) {
34189 return f;
34190 }
34191
34192 return function chainedFunction() {
34193 for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
34194 args[_key2] = arguments[_key2];
34195 }
34196
34197 acc.apply(this, args);
34198 f.apply(this, args);
34199 };
34200 }, null);
34201 }
34202
34203 exports['default'] = createChainedFunction;
34204 module.exports = exports['default'];
34205
34206/***/ },
34207/* 415 */
34208/***/ function(module, exports, __webpack_require__) {
34209
34210 'use strict';
34211
34212 var _inherits = __webpack_require__(372)['default'];
34213
34214 var _classCallCheck = __webpack_require__(379)['default'];
34215
34216 var _extends = __webpack_require__(338)['default'];
34217
34218 var _interopRequireDefault = __webpack_require__(335)['default'];
34219
34220 exports.__esModule = true;
34221
34222 var _classnames = __webpack_require__(356);
34223
34224 var _classnames2 = _interopRequireDefault(_classnames);
34225
34226 var _domHelpersActiveElement = __webpack_require__(416);
34227
34228 var _domHelpersActiveElement2 = _interopRequireDefault(_domHelpersActiveElement);
34229
34230 var _domHelpersQueryContains = __webpack_require__(418);
34231
34232 var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains);
34233
34234 var _keycode = __webpack_require__(419);
34235
34236 var _keycode2 = _interopRequireDefault(_keycode);
34237
34238 var _lodashCompatCollectionFind = __webpack_require__(420);
34239
34240 var _lodashCompatCollectionFind2 = _interopRequireDefault(_lodashCompatCollectionFind);
34241
34242 var _lodashCompatObjectOmit = __webpack_require__(473);
34243
34244 var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit);
34245
34246 var _react = __webpack_require__(89);
34247
34248 var _react2 = _interopRequireDefault(_react);
34249
34250 var _reactDom = __webpack_require__(122);
34251
34252 var _reactDom2 = _interopRequireDefault(_reactDom);
34253
34254 var _reactPropTypesLibAll = __webpack_require__(384);
34255
34256 var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll);
34257
34258 var _reactPropTypesLibElementType = __webpack_require__(380);
34259
34260 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
34261
34262 var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(488);
34263
34264 var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y);
34265
34266 var _uncontrollable = __webpack_require__(489);
34267
34268 var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
34269
34270 var _warning = __webpack_require__(271);
34271
34272 var _warning2 = _interopRequireDefault(_warning);
34273
34274 var _utilsBootstrapUtils = __webpack_require__(357);
34275
34276 var _utilsCreateChainedFunction = __webpack_require__(414);
34277
34278 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
34279
34280 var _utilsCustomPropTypes = __webpack_require__(492);
34281
34282 var _utilsCustomPropTypes2 = _interopRequireDefault(_utilsCustomPropTypes);
34283
34284 var _utilsValidComponentChildren = __webpack_require__(365);
34285
34286 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
34287
34288 var _ButtonGroup = __webpack_require__(383);
34289
34290 var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup);
34291
34292 var _DropdownMenu = __webpack_require__(494);
34293
34294 var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);
34295
34296 var _DropdownToggle = __webpack_require__(499);
34297
34298 var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle);
34299
34300 var TOGGLE_ROLE = _DropdownToggle2['default'].defaultProps.bsRole;
34301 var MENU_ROLE = _DropdownMenu2['default'].defaultProps.bsRole;
34302
34303 var Dropdown = (function (_React$Component) {
34304 _inherits(Dropdown, _React$Component);
34305
34306 function Dropdown(props) {
34307 _classCallCheck(this, Dropdown);
34308
34309 _React$Component.call(this, props);
34310
34311 this.Toggle = _DropdownToggle2['default'];
34312
34313 this.toggleOpen = this.toggleOpen.bind(this);
34314 this.handleClick = this.handleClick.bind(this);
34315 this.handleKeyDown = this.handleKeyDown.bind(this);
34316 this.handleClose = this.handleClose.bind(this);
34317 this.extractChildren = this.extractChildren.bind(this);
34318
34319 this.refineMenu = this.refineMenu.bind(this);
34320 this.refineToggle = this.refineToggle.bind(this);
34321
34322 this.childExtractors = [{
34323 key: 'toggle',
34324 matches: function matches(child) {
34325 return child.props.bsRole === TOGGLE_ROLE;
34326 },
34327 refine: this.refineToggle
34328 }, {
34329 key: 'menu',
34330 exclusive: true,
34331 matches: function matches(child) {
34332 return child.props.bsRole === MENU_ROLE;
34333 },
34334 refine: this.refineMenu
34335 }];
34336
34337 this.state = {};
34338
34339 this.lastOpenEventType = null;
34340 }
34341
34342 Dropdown.prototype.componentDidMount = function componentDidMount() {
34343 this.focusNextOnOpen();
34344 };
34345
34346 Dropdown.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
34347 if (!nextProps.open && this.props.open) {
34348 this._focusInDropdown = _domHelpersQueryContains2['default'](_reactDom2['default'].findDOMNode(this.menu), _domHelpersActiveElement2['default'](document));
34349 }
34350 };
34351
34352 Dropdown.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
34353 if (this.props.open && !prevProps.open) {
34354 this.focusNextOnOpen();
34355 }
34356
34357 if (!this.props.open && prevProps.open) {
34358 // if focus hasn't already moved from the menu lets return it
34359 // to the toggle
34360 if (this._focusInDropdown) {
34361 this._focusInDropdown = false;
34362 this.focus();
34363 }
34364 }
34365 };
34366
34367 Dropdown.prototype.render = function render() {
34368 var _rootClasses;
34369
34370 var children = this.extractChildren();
34371 var Component = this.props.componentClass;
34372
34373 var props = _lodashCompatObjectOmit2['default'](this.props, ['id', 'bsClass', 'role', 'onSelect']);
34374 var className = _utilsBootstrapUtils.prefix(this.props);
34375
34376 var rootClasses = (_rootClasses = {
34377 open: this.props.open,
34378 disabled: this.props.disabled
34379 }, _rootClasses[className] = !this.props.dropup, _rootClasses.dropup = this.props.dropup, _rootClasses);
34380
34381 return _react2['default'].createElement(
34382 Component,
34383 _extends({}, props, {
34384 className: _classnames2['default'](this.props.className, rootClasses)
34385 }),
34386 children
34387 );
34388 };
34389
34390 Dropdown.prototype.toggleOpen = function toggleOpen() {
34391 var eventType = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0];
34392
34393 var open = !this.props.open;
34394
34395 if (open) {
34396 this.lastOpenEventType = eventType;
34397 }
34398
34399 if (this.props.onToggle) {
34400 this.props.onToggle(open);
34401 }
34402 };
34403
34404 Dropdown.prototype.handleClick = function handleClick() {
34405 if (this.props.disabled) {
34406 return;
34407 }
34408
34409 this.toggleOpen('click');
34410 };
34411
34412 Dropdown.prototype.handleKeyDown = function handleKeyDown(event) {
34413 if (this.props.disabled) {
34414 return;
34415 }
34416
34417 switch (event.keyCode) {
34418 case _keycode2['default'].codes.down:
34419 if (!this.props.open) {
34420 this.toggleOpen('keydown');
34421 } else if (this.menu.focusNext) {
34422 this.menu.focusNext();
34423 }
34424 event.preventDefault();
34425 break;
34426 case _keycode2['default'].codes.esc:
34427 case _keycode2['default'].codes.tab:
34428 this.handleClose(event);
34429 break;
34430 default:
34431 }
34432 };
34433
34434 Dropdown.prototype.handleClose = function handleClose() {
34435 if (!this.props.open) {
34436 return;
34437 }
34438
34439 this.toggleOpen();
34440 };
34441
34442 Dropdown.prototype.focusNextOnOpen = function focusNextOnOpen() {
34443 var menu = this.menu;
34444
34445 if (!menu.focusNext) {
34446 return;
34447 }
34448
34449 if (this.lastOpenEventType === 'keydown' || this.props.role === 'menuitem') {
34450 menu.focusNext();
34451 }
34452 };
34453
34454 Dropdown.prototype.focus = function focus() {
34455 var toggle = _reactDom2['default'].findDOMNode(this.toggle);
34456
34457 if (toggle && toggle.focus) {
34458 toggle.focus();
34459 }
34460 };
34461
34462 Dropdown.prototype.extractChildren = function extractChildren() {
34463 var _this = this;
34464
34465 var open = !!this.props.open;
34466 var seen = {};
34467
34468 return _utilsValidComponentChildren2['default'].map(this.props.children, function (child) {
34469 var extractor = _lodashCompatCollectionFind2['default'](_this.childExtractors, function (x) {
34470 return x.matches(child);
34471 });
34472
34473 if (extractor) {
34474 if (seen[extractor.key]) {
34475 return false;
34476 }
34477
34478 seen[extractor.key] = extractor.exclusive;
34479 child = extractor.refine(child, open);
34480 }
34481
34482 return child;
34483 });
34484 };
34485
34486 Dropdown.prototype.refineMenu = function refineMenu(menu, open) {
34487 var _this2 = this;
34488
34489 var ref = function ref(r) {
34490 return _this2.menu = r;
34491 };
34492
34493 if (typeof menu.ref === 'string') {
34494 (undefined) !== 'production' ? _warning2['default'](false, 'String refs are not supported on `<Dropdown.Menu>` components. ' + 'To apply a ref to the component use the callback signature: \n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : undefined;
34495 } else {
34496 ref = _utilsCreateChainedFunction2['default'](menu.ref, ref);
34497 }
34498
34499 var menuProps = {
34500 ref: ref,
34501 open: open,
34502 labelledBy: this.props.id,
34503 pullRight: this.props.pullRight,
34504 bsClass: this.props.bsClass
34505 };
34506
34507 menuProps.onClose = _utilsCreateChainedFunction2['default'](menu.props.onClose, this.props.onClose, this.handleClose);
34508
34509 menuProps.onSelect = _utilsCreateChainedFunction2['default'](menu.props.onSelect, this.props.onSelect, this.handleClose);
34510
34511 return _react.cloneElement(menu, menuProps, menu.props.children);
34512 };
34513
34514 Dropdown.prototype.refineToggle = function refineToggle(toggle, open) {
34515 var _this3 = this;
34516
34517 var ref = function ref(r) {
34518 return _this3.toggle = r;
34519 };
34520
34521 if (typeof toggle.ref === 'string') {
34522 (undefined) !== 'production' ? _warning2['default'](false, 'String refs are not supported on `<Dropdown.Toggle>` components. ' + 'To apply a ref to the component use the callback signature: \n\n ' + 'https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute') : undefined;
34523 } else {
34524 ref = _utilsCreateChainedFunction2['default'](toggle.ref, ref);
34525 }
34526
34527 var toggleProps = {
34528 ref: ref,
34529 open: open,
34530 id: this.props.id,
34531 role: this.props.role
34532 };
34533
34534 toggleProps.onClick = _utilsCreateChainedFunction2['default'](toggle.props.onClick, this.handleClick);
34535
34536 toggleProps.onKeyDown = _utilsCreateChainedFunction2['default'](toggle.props.onKeyDown, this.handleKeyDown);
34537
34538 return _react.cloneElement(toggle, toggleProps, toggle.props.children);
34539 };
34540
34541 return Dropdown;
34542 })(_react2['default'].Component);
34543
34544 Dropdown.Toggle = _DropdownToggle2['default'];
34545
34546 Dropdown.TOGGLE_ROLE = TOGGLE_ROLE;
34547 Dropdown.MENU_ROLE = MENU_ROLE;
34548
34549 Dropdown.defaultProps = {
34550 componentClass: _ButtonGroup2['default'],
34551 bsClass: 'dropdown'
34552 };
34553
34554 Dropdown.propTypes = {
34555
34556 bsClass: _react2['default'].PropTypes.string,
34557
34558 /**
34559 * The menu will open above the dropdown button, instead of below it.
34560 */
34561 dropup: _react2['default'].PropTypes.bool,
34562
34563 /**
34564 * An html id attribute, necessary for assistive technologies, such as screen readers.
34565 * @type {string|number}
34566 * @required
34567 */
34568 id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])),
34569
34570 componentClass: _reactPropTypesLibElementType2['default'],
34571
34572 /**
34573 * The children of a Dropdown may be a `<Dropdown.Toggle/>` or a `<Dropdown.Menu/>`.
34574 * @type {node}
34575 */
34576 children: _reactPropTypesLibAll2['default'](_utilsCustomPropTypes2['default'].requiredRoles(TOGGLE_ROLE, MENU_ROLE), _utilsCustomPropTypes2['default'].exclusiveRoles(MENU_ROLE)),
34577
34578 /**
34579 * Whether or not component is disabled.
34580 */
34581 disabled: _react2['default'].PropTypes.bool,
34582
34583 /**
34584 * Align the menu to the right side of the Dropdown toggle
34585 */
34586 pullRight: _react2['default'].PropTypes.bool,
34587
34588 /**
34589 * Whether or not the Dropdown is visible.
34590 *
34591 * @controllable onToggle
34592 */
34593 open: _react2['default'].PropTypes.bool,
34594
34595 /**
34596 * A callback fired when the Dropdown closes.
34597 */
34598 onClose: _react2['default'].PropTypes.func,
34599
34600 /**
34601 * A callback fired when the Dropdown wishes to change visibility. Called with the requested
34602 * `open` value.
34603 *
34604 * ```js
34605 * function(Boolean isOpen) {}
34606 * ```
34607 * @controllable open
34608 */
34609 onToggle: _react2['default'].PropTypes.func,
34610
34611 /**
34612 * A callback fired when a menu item is selected.
34613 *
34614 * ```js
34615 * (eventKey: any, event: Object) => any
34616 * ```
34617 */
34618 onSelect: _react2['default'].PropTypes.func,
34619
34620 /**
34621 * If `'menuitem'`, causes the dropdown to behave like a menu item rather than
34622 * a menu button.
34623 */
34624 role: _react2['default'].PropTypes.string
34625 };
34626
34627 Dropdown = _uncontrollable2['default'](Dropdown, { open: 'onToggle' });
34628
34629 Dropdown.Toggle = _DropdownToggle2['default'];
34630 Dropdown.Menu = _DropdownMenu2['default'];
34631
34632 exports['default'] = Dropdown;
34633 module.exports = exports['default'];
34634
34635/***/ },
34636/* 416 */
34637/***/ function(module, exports, __webpack_require__) {
34638
34639 'use strict';
34640
34641 var babelHelpers = __webpack_require__(408);
34642
34643 exports.__esModule = true;
34644
34645 /**
34646 * document.activeElement
34647 */
34648 exports['default'] = activeElement;
34649
34650 var _ownerDocument = __webpack_require__(417);
34651
34652 var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument);
34653
34654 function activeElement() {
34655 var doc = arguments[0] === undefined ? document : arguments[0];
34656
34657 try {
34658 return doc.activeElement;
34659 } catch (e) {}
34660 }
34661
34662 module.exports = exports['default'];
34663
34664/***/ },
34665/* 417 */
34666/***/ function(module, exports) {
34667
34668 "use strict";
34669
34670 exports.__esModule = true;
34671 exports["default"] = ownerDocument;
34672
34673 function ownerDocument(node) {
34674 return node && node.ownerDocument || document;
34675 }
34676
34677 module.exports = exports["default"];
34678
34679/***/ },
34680/* 418 */
34681/***/ function(module, exports, __webpack_require__) {
34682
34683 'use strict';
34684 var canUseDOM = __webpack_require__(412);
34685
34686 var contains = (function () {
34687 var root = canUseDOM && document.documentElement;
34688
34689 return root && root.contains ? function (context, node) {
34690 return context.contains(node);
34691 } : root && root.compareDocumentPosition ? function (context, node) {
34692 return context === node || !!(context.compareDocumentPosition(node) & 16);
34693 } : function (context, node) {
34694 if (node) do {
34695 if (node === context) return true;
34696 } while (node = node.parentNode);
34697
34698 return false;
34699 };
34700 })();
34701
34702 module.exports = contains;
34703
34704/***/ },
34705/* 419 */
34706/***/ function(module, exports) {
34707
34708 // Source: http://jsfiddle.net/vWx8V/
34709 // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes
34710
34711 /**
34712 * Conenience method returns corresponding value for given keyName or keyCode.
34713 *
34714 * @param {Mixed} keyCode {Number} or keyName {String}
34715 * @return {Mixed}
34716 * @api public
34717 */
34718
34719 exports = module.exports = function(searchInput) {
34720 // Keyboard Events
34721 if (searchInput && 'object' === typeof searchInput) {
34722 var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode
34723 if (hasKeyCode) searchInput = hasKeyCode
34724 }
34725
34726 // Numbers
34727 if ('number' === typeof searchInput) return names[searchInput]
34728
34729 // Everything else (cast to string)
34730 var search = String(searchInput)
34731
34732 // check codes
34733 var foundNamedKey = codes[search.toLowerCase()]
34734 if (foundNamedKey) return foundNamedKey
34735
34736 // check aliases
34737 var foundNamedKey = aliases[search.toLowerCase()]
34738 if (foundNamedKey) return foundNamedKey
34739
34740 // weird character?
34741 if (search.length === 1) return search.charCodeAt(0)
34742
34743 return undefined
34744 }
34745
34746 /**
34747 * Get by name
34748 *
34749 * exports.code['enter'] // => 13
34750 */
34751
34752 var codes = exports.code = exports.codes = {
34753 'backspace': 8,
34754 'tab': 9,
34755 'enter': 13,
34756 'shift': 16,
34757 'ctrl': 17,
34758 'alt': 18,
34759 'pause/break': 19,
34760 'caps lock': 20,
34761 'esc': 27,
34762 'space': 32,
34763 'page up': 33,
34764 'page down': 34,
34765 'end': 35,
34766 'home': 36,
34767 'left': 37,
34768 'up': 38,
34769 'right': 39,
34770 'down': 40,
34771 'insert': 45,
34772 'delete': 46,
34773 'command': 91,
34774 'left command': 91,
34775 'right command': 93,
34776 'numpad *': 106,
34777 'numpad +': 107,
34778 'numpad -': 109,
34779 'numpad .': 110,
34780 'numpad /': 111,
34781 'num lock': 144,
34782 'scroll lock': 145,
34783 'my computer': 182,
34784 'my calculator': 183,
34785 ';': 186,
34786 '=': 187,
34787 ',': 188,
34788 '-': 189,
34789 '.': 190,
34790 '/': 191,
34791 '`': 192,
34792 '[': 219,
34793 '\\': 220,
34794 ']': 221,
34795 "'": 222
34796 }
34797
34798 // Helper aliases
34799
34800 var aliases = exports.aliases = {
34801 'windows': 91,
34802 '⇧': 16,
34803 '⌥': 18,
34804 '⌃': 17,
34805 '⌘': 91,
34806 'ctl': 17,
34807 'control': 17,
34808 'option': 18,
34809 'pause': 19,
34810 'break': 19,
34811 'caps': 20,
34812 'return': 13,
34813 'escape': 27,
34814 'spc': 32,
34815 'pgup': 33,
34816 'pgdn': 34,
34817 'ins': 45,
34818 'del': 46,
34819 'cmd': 91
34820 }
34821
34822
34823 /*!
34824 * Programatically add the following
34825 */
34826
34827 // lower case chars
34828 for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32
34829
34830 // numbers
34831 for (var i = 48; i < 58; i++) codes[i - 48] = i
34832
34833 // function keys
34834 for (i = 1; i < 13; i++) codes['f'+i] = i + 111
34835
34836 // numpad keys
34837 for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96
34838
34839 /**
34840 * Get by code
34841 *
34842 * exports.name[13] // => 'Enter'
34843 */
34844
34845 var names = exports.names = exports.title = {} // title for backward compat
34846
34847 // Create reverse mapping
34848 for (i in codes) names[codes[i]] = i
34849
34850 // Add aliases
34851 for (var alias in aliases) {
34852 codes[alias] = aliases[alias]
34853 }
34854
34855
34856/***/ },
34857/* 420 */
34858/***/ function(module, exports, __webpack_require__) {
34859
34860 var baseEach = __webpack_require__(421),
34861 createFind = __webpack_require__(446);
34862
34863 /**
34864 * Iterates over elements of `collection`, returning the first element
34865 * `predicate` returns truthy for. The predicate is bound to `thisArg` and
34866 * invoked with three arguments: (value, index|key, collection).
34867 *
34868 * If a property name is provided for `predicate` the created `_.property`
34869 * style callback returns the property value of the given element.
34870 *
34871 * If a value is also provided for `thisArg` the created `_.matchesProperty`
34872 * style callback returns `true` for elements that have a matching property
34873 * value, else `false`.
34874 *
34875 * If an object is provided for `predicate` the created `_.matches` style
34876 * callback returns `true` for elements that have the properties of the given
34877 * object, else `false`.
34878 *
34879 * @static
34880 * @memberOf _
34881 * @alias detect
34882 * @category Collection
34883 * @param {Array|Object|string} collection The collection to search.
34884 * @param {Function|Object|string} [predicate=_.identity] The function invoked
34885 * per iteration.
34886 * @param {*} [thisArg] The `this` binding of `predicate`.
34887 * @returns {*} Returns the matched element, else `undefined`.
34888 * @example
34889 *
34890 * var users = [
34891 * { 'user': 'barney', 'age': 36, 'active': true },
34892 * { 'user': 'fred', 'age': 40, 'active': false },
34893 * { 'user': 'pebbles', 'age': 1, 'active': true }
34894 * ];
34895 *
34896 * _.result(_.find(users, function(chr) {
34897 * return chr.age < 40;
34898 * }), 'user');
34899 * // => 'barney'
34900 *
34901 * // using the `_.matches` callback shorthand
34902 * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');
34903 * // => 'pebbles'
34904 *
34905 * // using the `_.matchesProperty` callback shorthand
34906 * _.result(_.find(users, 'active', false), 'user');
34907 * // => 'fred'
34908 *
34909 * // using the `_.property` callback shorthand
34910 * _.result(_.find(users, 'active'), 'user');
34911 * // => 'barney'
34912 */
34913 var find = createFind(baseEach);
34914
34915 module.exports = find;
34916
34917
34918/***/ },
34919/* 421 */
34920/***/ function(module, exports, __webpack_require__) {
34921
34922 var baseForOwn = __webpack_require__(422),
34923 createBaseEach = __webpack_require__(445);
34924
34925 /**
34926 * The base implementation of `_.forEach` without support for callback
34927 * shorthands and `this` binding.
34928 *
34929 * @private
34930 * @param {Array|Object|string} collection The collection to iterate over.
34931 * @param {Function} iteratee The function invoked per iteration.
34932 * @returns {Array|Object|string} Returns `collection`.
34933 */
34934 var baseEach = createBaseEach(baseForOwn);
34935
34936 module.exports = baseEach;
34937
34938
34939/***/ },
34940/* 422 */
34941/***/ function(module, exports, __webpack_require__) {
34942
34943 var baseFor = __webpack_require__(423),
34944 keys = __webpack_require__(430);
34945
34946 /**
34947 * The base implementation of `_.forOwn` without support for callback
34948 * shorthands and `this` binding.
34949 *
34950 * @private
34951 * @param {Object} object The object to iterate over.
34952 * @param {Function} iteratee The function invoked per iteration.
34953 * @returns {Object} Returns `object`.
34954 */
34955 function baseForOwn(object, iteratee) {
34956 return baseFor(object, iteratee, keys);
34957 }
34958
34959 module.exports = baseForOwn;
34960
34961
34962/***/ },
34963/* 423 */
34964/***/ function(module, exports, __webpack_require__) {
34965
34966 var createBaseFor = __webpack_require__(424);
34967
34968 /**
34969 * The base implementation of `baseForIn` and `baseForOwn` which iterates
34970 * over `object` properties returned by `keysFunc` invoking `iteratee` for
34971 * each property. Iteratee functions may exit iteration early by explicitly
34972 * returning `false`.
34973 *
34974 * @private
34975 * @param {Object} object The object to iterate over.
34976 * @param {Function} iteratee The function invoked per iteration.
34977 * @param {Function} keysFunc The function to get the keys of `object`.
34978 * @returns {Object} Returns `object`.
34979 */
34980 var baseFor = createBaseFor();
34981
34982 module.exports = baseFor;
34983
34984
34985/***/ },
34986/* 424 */
34987/***/ function(module, exports, __webpack_require__) {
34988
34989 var toObject = __webpack_require__(425);
34990
34991 /**
34992 * Creates a base function for `_.forIn` or `_.forInRight`.
34993 *
34994 * @private
34995 * @param {boolean} [fromRight] Specify iterating from right to left.
34996 * @returns {Function} Returns the new base function.
34997 */
34998 function createBaseFor(fromRight) {
34999 return function(object, iteratee, keysFunc) {
35000 var iterable = toObject(object),
35001 props = keysFunc(object),
35002 length = props.length,
35003 index = fromRight ? length : -1;
35004
35005 while ((fromRight ? index-- : ++index < length)) {
35006 var key = props[index];
35007 if (iteratee(iterable[key], key, iterable) === false) {
35008 break;
35009 }
35010 }
35011 return object;
35012 };
35013 }
35014
35015 module.exports = createBaseFor;
35016
35017
35018/***/ },
35019/* 425 */
35020/***/ function(module, exports, __webpack_require__) {
35021
35022 var isObject = __webpack_require__(426),
35023 isString = __webpack_require__(427),
35024 support = __webpack_require__(429);
35025
35026 /**
35027 * Converts `value` to an object if it's not one.
35028 *
35029 * @private
35030 * @param {*} value The value to process.
35031 * @returns {Object} Returns the object.
35032 */
35033 function toObject(value) {
35034 if (support.unindexedChars && isString(value)) {
35035 var index = -1,
35036 length = value.length,
35037 result = Object(value);
35038
35039 while (++index < length) {
35040 result[index] = value.charAt(index);
35041 }
35042 return result;
35043 }
35044 return isObject(value) ? value : Object(value);
35045 }
35046
35047 module.exports = toObject;
35048
35049
35050/***/ },
35051/* 426 */
35052/***/ function(module, exports) {
35053
35054 /**
35055 * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
35056 * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
35057 *
35058 * @static
35059 * @memberOf _
35060 * @category Lang
35061 * @param {*} value The value to check.
35062 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
35063 * @example
35064 *
35065 * _.isObject({});
35066 * // => true
35067 *
35068 * _.isObject([1, 2, 3]);
35069 * // => true
35070 *
35071 * _.isObject(1);
35072 * // => false
35073 */
35074 function isObject(value) {
35075 // Avoid a V8 JIT bug in Chrome 19-20.
35076 // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.
35077 var type = typeof value;
35078 return !!value && (type == 'object' || type == 'function');
35079 }
35080
35081 module.exports = isObject;
35082
35083
35084/***/ },
35085/* 427 */
35086/***/ function(module, exports, __webpack_require__) {
35087
35088 var isObjectLike = __webpack_require__(428);
35089
35090 /** `Object#toString` result references. */
35091 var stringTag = '[object String]';
35092
35093 /** Used for native method references. */
35094 var objectProto = Object.prototype;
35095
35096 /**
35097 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
35098 * of values.
35099 */
35100 var objToString = objectProto.toString;
35101
35102 /**
35103 * Checks if `value` is classified as a `String` primitive or object.
35104 *
35105 * @static
35106 * @memberOf _
35107 * @category Lang
35108 * @param {*} value The value to check.
35109 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
35110 * @example
35111 *
35112 * _.isString('abc');
35113 * // => true
35114 *
35115 * _.isString(1);
35116 * // => false
35117 */
35118 function isString(value) {
35119 return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
35120 }
35121
35122 module.exports = isString;
35123
35124
35125/***/ },
35126/* 428 */
35127/***/ function(module, exports) {
35128
35129 /**
35130 * Checks if `value` is object-like.
35131 *
35132 * @private
35133 * @param {*} value The value to check.
35134 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
35135 */
35136 function isObjectLike(value) {
35137 return !!value && typeof value == 'object';
35138 }
35139
35140 module.exports = isObjectLike;
35141
35142
35143/***/ },
35144/* 429 */
35145/***/ function(module, exports) {
35146
35147 /** Used for native method references. */
35148 var arrayProto = Array.prototype,
35149 errorProto = Error.prototype,
35150 objectProto = Object.prototype;
35151
35152 /** Native method references. */
35153 var propertyIsEnumerable = objectProto.propertyIsEnumerable,
35154 splice = arrayProto.splice;
35155
35156 /**
35157 * An object environment feature flags.
35158 *
35159 * @static
35160 * @memberOf _
35161 * @type Object
35162 */
35163 var support = {};
35164
35165 (function(x) {
35166 var Ctor = function() { this.x = x; },
35167 object = { '0': x, 'length': x },
35168 props = [];
35169
35170 Ctor.prototype = { 'valueOf': x, 'y': x };
35171 for (var key in new Ctor) { props.push(key); }
35172
35173 /**
35174 * Detect if `name` or `message` properties of `Error.prototype` are
35175 * enumerable by default (IE < 9, Safari < 5.1).
35176 *
35177 * @memberOf _.support
35178 * @type boolean
35179 */
35180 support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||
35181 propertyIsEnumerable.call(errorProto, 'name');
35182
35183 /**
35184 * Detect if `prototype` properties are enumerable by default.
35185 *
35186 * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1
35187 * (if the prototype or a property on the prototype has been set)
35188 * incorrectly set the `[[Enumerable]]` value of a function's `prototype`
35189 * property to `true`.
35190 *
35191 * @memberOf _.support
35192 * @type boolean
35193 */
35194 support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');
35195
35196 /**
35197 * Detect if properties shadowing those on `Object.prototype` are non-enumerable.
35198 *
35199 * In IE < 9 an object's own properties, shadowing non-enumerable ones,
35200 * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).
35201 *
35202 * @memberOf _.support
35203 * @type boolean
35204 */
35205 support.nonEnumShadows = !/valueOf/.test(props);
35206
35207 /**
35208 * Detect if own properties are iterated after inherited properties (IE < 9).
35209 *
35210 * @memberOf _.support
35211 * @type boolean
35212 */
35213 support.ownLast = props[0] != 'x';
35214
35215 /**
35216 * Detect if `Array#shift` and `Array#splice` augment array-like objects
35217 * correctly.
35218 *
35219 * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array
35220 * `shift()` and `splice()` functions that fail to remove the last element,
35221 * `value[0]`, of array-like objects even though the "length" property is
35222 * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,
35223 * while `splice()` is buggy regardless of mode in IE < 9.
35224 *
35225 * @memberOf _.support
35226 * @type boolean
35227 */
35228 support.spliceObjects = (splice.call(object, 0, 1), !object[0]);
35229
35230 /**
35231 * Detect lack of support for accessing string characters by index.
35232 *
35233 * IE < 8 can't access characters by index. IE 8 can only access characters
35234 * by index on string literals, not string objects.
35235 *
35236 * @memberOf _.support
35237 * @type boolean
35238 */
35239 support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';
35240 }(1, 0));
35241
35242 module.exports = support;
35243
35244
35245/***/ },
35246/* 430 */
35247/***/ function(module, exports, __webpack_require__) {
35248
35249 var getNative = __webpack_require__(431),
35250 isArrayLike = __webpack_require__(435),
35251 isObject = __webpack_require__(426),
35252 shimKeys = __webpack_require__(439),
35253 support = __webpack_require__(429);
35254
35255 /* Native method references for those with the same name as other `lodash` methods. */
35256 var nativeKeys = getNative(Object, 'keys');
35257
35258 /**
35259 * Creates an array of the own enumerable property names of `object`.
35260 *
35261 * **Note:** Non-object values are coerced to objects. See the
35262 * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
35263 * for more details.
35264 *
35265 * @static
35266 * @memberOf _
35267 * @category Object
35268 * @param {Object} object The object to query.
35269 * @returns {Array} Returns the array of property names.
35270 * @example
35271 *
35272 * function Foo() {
35273 * this.a = 1;
35274 * this.b = 2;
35275 * }
35276 *
35277 * Foo.prototype.c = 3;
35278 *
35279 * _.keys(new Foo);
35280 * // => ['a', 'b'] (iteration order is not guaranteed)
35281 *
35282 * _.keys('hi');
35283 * // => ['0', '1']
35284 */
35285 var keys = !nativeKeys ? shimKeys : function(object) {
35286 var Ctor = object == null ? undefined : object.constructor;
35287 if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
35288 (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {
35289 return shimKeys(object);
35290 }
35291 return isObject(object) ? nativeKeys(object) : [];
35292 };
35293
35294 module.exports = keys;
35295
35296
35297/***/ },
35298/* 431 */
35299/***/ function(module, exports, __webpack_require__) {
35300
35301 var isNative = __webpack_require__(432);
35302
35303 /**
35304 * Gets the native function at `key` of `object`.
35305 *
35306 * @private
35307 * @param {Object} object The object to query.
35308 * @param {string} key The key of the method to get.
35309 * @returns {*} Returns the function if it's native, else `undefined`.
35310 */
35311 function getNative(object, key) {
35312 var value = object == null ? undefined : object[key];
35313 return isNative(value) ? value : undefined;
35314 }
35315
35316 module.exports = getNative;
35317
35318
35319/***/ },
35320/* 432 */
35321/***/ function(module, exports, __webpack_require__) {
35322
35323 var isFunction = __webpack_require__(433),
35324 isHostObject = __webpack_require__(434),
35325 isObjectLike = __webpack_require__(428);
35326
35327 /** Used to detect host constructors (Safari > 5). */
35328 var reIsHostCtor = /^\[object .+?Constructor\]$/;
35329
35330 /** Used for native method references. */
35331 var objectProto = Object.prototype;
35332
35333 /** Used to resolve the decompiled source of functions. */
35334 var fnToString = Function.prototype.toString;
35335
35336 /** Used to check objects for own properties. */
35337 var hasOwnProperty = objectProto.hasOwnProperty;
35338
35339 /** Used to detect if a method is native. */
35340 var reIsNative = RegExp('^' +
35341 fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
35342 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
35343 );
35344
35345 /**
35346 * Checks if `value` is a native function.
35347 *
35348 * @static
35349 * @memberOf _
35350 * @category Lang
35351 * @param {*} value The value to check.
35352 * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
35353 * @example
35354 *
35355 * _.isNative(Array.prototype.push);
35356 * // => true
35357 *
35358 * _.isNative(_);
35359 * // => false
35360 */
35361 function isNative(value) {
35362 if (value == null) {
35363 return false;
35364 }
35365 if (isFunction(value)) {
35366 return reIsNative.test(fnToString.call(value));
35367 }
35368 return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
35369 }
35370
35371 module.exports = isNative;
35372
35373
35374/***/ },
35375/* 433 */
35376/***/ function(module, exports, __webpack_require__) {
35377
35378 var isObject = __webpack_require__(426);
35379
35380 /** `Object#toString` result references. */
35381 var funcTag = '[object Function]';
35382
35383 /** Used for native method references. */
35384 var objectProto = Object.prototype;
35385
35386 /**
35387 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
35388 * of values.
35389 */
35390 var objToString = objectProto.toString;
35391
35392 /**
35393 * Checks if `value` is classified as a `Function` object.
35394 *
35395 * @static
35396 * @memberOf _
35397 * @category Lang
35398 * @param {*} value The value to check.
35399 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
35400 * @example
35401 *
35402 * _.isFunction(_);
35403 * // => true
35404 *
35405 * _.isFunction(/abc/);
35406 * // => false
35407 */
35408 function isFunction(value) {
35409 // The use of `Object#toString` avoids issues with the `typeof` operator
35410 // in older versions of Chrome and Safari which return 'function' for regexes
35411 // and Safari 8 which returns 'object' for typed array constructors.
35412 return isObject(value) && objToString.call(value) == funcTag;
35413 }
35414
35415 module.exports = isFunction;
35416
35417
35418/***/ },
35419/* 434 */
35420/***/ function(module, exports) {
35421
35422 /**
35423 * Checks if `value` is a host object in IE < 9.
35424 *
35425 * @private
35426 * @param {*} value The value to check.
35427 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
35428 */
35429 var isHostObject = (function() {
35430 try {
35431 Object({ 'toString': 0 } + '');
35432 } catch(e) {
35433 return function() { return false; };
35434 }
35435 return function(value) {
35436 // IE < 9 presents many host objects as `Object` objects that can coerce
35437 // to strings despite having improperly defined `toString` methods.
35438 return typeof value.toString != 'function' && typeof (value + '') == 'string';
35439 };
35440 }());
35441
35442 module.exports = isHostObject;
35443
35444
35445/***/ },
35446/* 435 */
35447/***/ function(module, exports, __webpack_require__) {
35448
35449 var getLength = __webpack_require__(436),
35450 isLength = __webpack_require__(438);
35451
35452 /**
35453 * Checks if `value` is array-like.
35454 *
35455 * @private
35456 * @param {*} value The value to check.
35457 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
35458 */
35459 function isArrayLike(value) {
35460 return value != null && isLength(getLength(value));
35461 }
35462
35463 module.exports = isArrayLike;
35464
35465
35466/***/ },
35467/* 436 */
35468/***/ function(module, exports, __webpack_require__) {
35469
35470 var baseProperty = __webpack_require__(437);
35471
35472 /**
35473 * Gets the "length" property value of `object`.
35474 *
35475 * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
35476 * that affects Safari on at least iOS 8.1-8.3 ARM64.
35477 *
35478 * @private
35479 * @param {Object} object The object to query.
35480 * @returns {*} Returns the "length" value.
35481 */
35482 var getLength = baseProperty('length');
35483
35484 module.exports = getLength;
35485
35486
35487/***/ },
35488/* 437 */
35489/***/ function(module, exports, __webpack_require__) {
35490
35491 var toObject = __webpack_require__(425);
35492
35493 /**
35494 * The base implementation of `_.property` without support for deep paths.
35495 *
35496 * @private
35497 * @param {string} key The key of the property to get.
35498 * @returns {Function} Returns the new function.
35499 */
35500 function baseProperty(key) {
35501 return function(object) {
35502 return object == null ? undefined : toObject(object)[key];
35503 };
35504 }
35505
35506 module.exports = baseProperty;
35507
35508
35509/***/ },
35510/* 438 */
35511/***/ function(module, exports) {
35512
35513 /**
35514 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
35515 * of an array-like value.
35516 */
35517 var MAX_SAFE_INTEGER = 9007199254740991;
35518
35519 /**
35520 * Checks if `value` is a valid array-like length.
35521 *
35522 * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
35523 *
35524 * @private
35525 * @param {*} value The value to check.
35526 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
35527 */
35528 function isLength(value) {
35529 return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
35530 }
35531
35532 module.exports = isLength;
35533
35534
35535/***/ },
35536/* 439 */
35537/***/ function(module, exports, __webpack_require__) {
35538
35539 var isArguments = __webpack_require__(440),
35540 isArray = __webpack_require__(441),
35541 isIndex = __webpack_require__(442),
35542 isLength = __webpack_require__(438),
35543 isString = __webpack_require__(427),
35544 keysIn = __webpack_require__(443);
35545
35546 /** Used for native method references. */
35547 var objectProto = Object.prototype;
35548
35549 /** Used to check objects for own properties. */
35550 var hasOwnProperty = objectProto.hasOwnProperty;
35551
35552 /**
35553 * A fallback implementation of `Object.keys` which creates an array of the
35554 * own enumerable property names of `object`.
35555 *
35556 * @private
35557 * @param {Object} object The object to query.
35558 * @returns {Array} Returns the array of property names.
35559 */
35560 function shimKeys(object) {
35561 var props = keysIn(object),
35562 propsLength = props.length,
35563 length = propsLength && object.length;
35564
35565 var allowIndexes = !!length && isLength(length) &&
35566 (isArray(object) || isArguments(object) || isString(object));
35567
35568 var index = -1,
35569 result = [];
35570
35571 while (++index < propsLength) {
35572 var key = props[index];
35573 if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
35574 result.push(key);
35575 }
35576 }
35577 return result;
35578 }
35579
35580 module.exports = shimKeys;
35581
35582
35583/***/ },
35584/* 440 */
35585/***/ function(module, exports, __webpack_require__) {
35586
35587 var isArrayLike = __webpack_require__(435),
35588 isObjectLike = __webpack_require__(428);
35589
35590 /** Used for native method references. */
35591 var objectProto = Object.prototype;
35592
35593 /** Used to check objects for own properties. */
35594 var hasOwnProperty = objectProto.hasOwnProperty;
35595
35596 /** Native method references. */
35597 var propertyIsEnumerable = objectProto.propertyIsEnumerable;
35598
35599 /**
35600 * Checks if `value` is classified as an `arguments` object.
35601 *
35602 * @static
35603 * @memberOf _
35604 * @category Lang
35605 * @param {*} value The value to check.
35606 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
35607 * @example
35608 *
35609 * _.isArguments(function() { return arguments; }());
35610 * // => true
35611 *
35612 * _.isArguments([1, 2, 3]);
35613 * // => false
35614 */
35615 function isArguments(value) {
35616 return isObjectLike(value) && isArrayLike(value) &&
35617 hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
35618 }
35619
35620 module.exports = isArguments;
35621
35622
35623/***/ },
35624/* 441 */
35625/***/ function(module, exports, __webpack_require__) {
35626
35627 var getNative = __webpack_require__(431),
35628 isLength = __webpack_require__(438),
35629 isObjectLike = __webpack_require__(428);
35630
35631 /** `Object#toString` result references. */
35632 var arrayTag = '[object Array]';
35633
35634 /** Used for native method references. */
35635 var objectProto = Object.prototype;
35636
35637 /**
35638 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
35639 * of values.
35640 */
35641 var objToString = objectProto.toString;
35642
35643 /* Native method references for those with the same name as other `lodash` methods. */
35644 var nativeIsArray = getNative(Array, 'isArray');
35645
35646 /**
35647 * Checks if `value` is classified as an `Array` object.
35648 *
35649 * @static
35650 * @memberOf _
35651 * @category Lang
35652 * @param {*} value The value to check.
35653 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
35654 * @example
35655 *
35656 * _.isArray([1, 2, 3]);
35657 * // => true
35658 *
35659 * _.isArray(function() { return arguments; }());
35660 * // => false
35661 */
35662 var isArray = nativeIsArray || function(value) {
35663 return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
35664 };
35665
35666 module.exports = isArray;
35667
35668
35669/***/ },
35670/* 442 */
35671/***/ function(module, exports) {
35672
35673 /** Used to detect unsigned integer values. */
35674 var reIsUint = /^\d+$/;
35675
35676 /**
35677 * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)
35678 * of an array-like value.
35679 */
35680 var MAX_SAFE_INTEGER = 9007199254740991;
35681
35682 /**
35683 * Checks if `value` is a valid array-like index.
35684 *
35685 * @private
35686 * @param {*} value The value to check.
35687 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
35688 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
35689 */
35690 function isIndex(value, length) {
35691 value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
35692 length = length == null ? MAX_SAFE_INTEGER : length;
35693 return value > -1 && value % 1 == 0 && value < length;
35694 }
35695
35696 module.exports = isIndex;
35697
35698
35699/***/ },
35700/* 443 */
35701/***/ function(module, exports, __webpack_require__) {
35702
35703 var arrayEach = __webpack_require__(444),
35704 isArguments = __webpack_require__(440),
35705 isArray = __webpack_require__(441),
35706 isFunction = __webpack_require__(433),
35707 isIndex = __webpack_require__(442),
35708 isLength = __webpack_require__(438),
35709 isObject = __webpack_require__(426),
35710 isString = __webpack_require__(427),
35711 support = __webpack_require__(429);
35712
35713 /** `Object#toString` result references. */
35714 var arrayTag = '[object Array]',
35715 boolTag = '[object Boolean]',
35716 dateTag = '[object Date]',
35717 errorTag = '[object Error]',
35718 funcTag = '[object Function]',
35719 numberTag = '[object Number]',
35720 objectTag = '[object Object]',
35721 regexpTag = '[object RegExp]',
35722 stringTag = '[object String]';
35723
35724 /** Used to fix the JScript `[[DontEnum]]` bug. */
35725 var shadowProps = [
35726 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
35727 'toLocaleString', 'toString', 'valueOf'
35728 ];
35729
35730 /** Used for native method references. */
35731 var errorProto = Error.prototype,
35732 objectProto = Object.prototype,
35733 stringProto = String.prototype;
35734
35735 /** Used to check objects for own properties. */
35736 var hasOwnProperty = objectProto.hasOwnProperty;
35737
35738 /**
35739 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
35740 * of values.
35741 */
35742 var objToString = objectProto.toString;
35743
35744 /** Used to avoid iterating over non-enumerable properties in IE < 9. */
35745 var nonEnumProps = {};
35746 nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };
35747 nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };
35748 nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };
35749 nonEnumProps[objectTag] = { 'constructor': true };
35750
35751 arrayEach(shadowProps, function(key) {
35752 for (var tag in nonEnumProps) {
35753 if (hasOwnProperty.call(nonEnumProps, tag)) {
35754 var props = nonEnumProps[tag];
35755 props[key] = hasOwnProperty.call(props, key);
35756 }
35757 }
35758 });
35759
35760 /**
35761 * Creates an array of the own and inherited enumerable property names of `object`.
35762 *
35763 * **Note:** Non-object values are coerced to objects.
35764 *
35765 * @static
35766 * @memberOf _
35767 * @category Object
35768 * @param {Object} object The object to query.
35769 * @returns {Array} Returns the array of property names.
35770 * @example
35771 *
35772 * function Foo() {
35773 * this.a = 1;
35774 * this.b = 2;
35775 * }
35776 *
35777 * Foo.prototype.c = 3;
35778 *
35779 * _.keysIn(new Foo);
35780 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
35781 */
35782 function keysIn(object) {
35783 if (object == null) {
35784 return [];
35785 }
35786 if (!isObject(object)) {
35787 object = Object(object);
35788 }
35789 var length = object.length;
35790
35791 length = (length && isLength(length) &&
35792 (isArray(object) || isArguments(object) || isString(object)) && length) || 0;
35793
35794 var Ctor = object.constructor,
35795 index = -1,
35796 proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,
35797 isProto = proto === object,
35798 result = Array(length),
35799 skipIndexes = length > 0,
35800 skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),
35801 skipProto = support.enumPrototypes && isFunction(object);
35802
35803 while (++index < length) {
35804 result[index] = (index + '');
35805 }
35806 // lodash skips the `constructor` property when it infers it's iterating
35807 // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`
35808 // attribute of an existing property and the `constructor` property of a
35809 // prototype defaults to non-enumerable.
35810 for (var key in object) {
35811 if (!(skipProto && key == 'prototype') &&
35812 !(skipErrorProps && (key == 'message' || key == 'name')) &&
35813 !(skipIndexes && isIndex(key, length)) &&
35814 !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
35815 result.push(key);
35816 }
35817 }
35818 if (support.nonEnumShadows && object !== objectProto) {
35819 var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),
35820 nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];
35821
35822 if (tag == objectTag) {
35823 proto = objectProto;
35824 }
35825 length = shadowProps.length;
35826 while (length--) {
35827 key = shadowProps[length];
35828 var nonEnum = nonEnums[key];
35829 if (!(isProto && nonEnum) &&
35830 (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {
35831 result.push(key);
35832 }
35833 }
35834 }
35835 return result;
35836 }
35837
35838 module.exports = keysIn;
35839
35840
35841/***/ },
35842/* 444 */
35843/***/ function(module, exports) {
35844
35845 /**
35846 * A specialized version of `_.forEach` for arrays without support for callback
35847 * shorthands and `this` binding.
35848 *
35849 * @private
35850 * @param {Array} array The array to iterate over.
35851 * @param {Function} iteratee The function invoked per iteration.
35852 * @returns {Array} Returns `array`.
35853 */
35854 function arrayEach(array, iteratee) {
35855 var index = -1,
35856 length = array.length;
35857
35858 while (++index < length) {
35859 if (iteratee(array[index], index, array) === false) {
35860 break;
35861 }
35862 }
35863 return array;
35864 }
35865
35866 module.exports = arrayEach;
35867
35868
35869/***/ },
35870/* 445 */
35871/***/ function(module, exports, __webpack_require__) {
35872
35873 var getLength = __webpack_require__(436),
35874 isLength = __webpack_require__(438),
35875 toObject = __webpack_require__(425);
35876
35877 /**
35878 * Creates a `baseEach` or `baseEachRight` function.
35879 *
35880 * @private
35881 * @param {Function} eachFunc The function to iterate over a collection.
35882 * @param {boolean} [fromRight] Specify iterating from right to left.
35883 * @returns {Function} Returns the new base function.
35884 */
35885 function createBaseEach(eachFunc, fromRight) {
35886 return function(collection, iteratee) {
35887 var length = collection ? getLength(collection) : 0;
35888 if (!isLength(length)) {
35889 return eachFunc(collection, iteratee);
35890 }
35891 var index = fromRight ? length : -1,
35892 iterable = toObject(collection);
35893
35894 while ((fromRight ? index-- : ++index < length)) {
35895 if (iteratee(iterable[index], index, iterable) === false) {
35896 break;
35897 }
35898 }
35899 return collection;
35900 };
35901 }
35902
35903 module.exports = createBaseEach;
35904
35905
35906/***/ },
35907/* 446 */
35908/***/ function(module, exports, __webpack_require__) {
35909
35910 var baseCallback = __webpack_require__(447),
35911 baseFind = __webpack_require__(471),
35912 baseFindIndex = __webpack_require__(472),
35913 isArray = __webpack_require__(441);
35914
35915 /**
35916 * Creates a `_.find` or `_.findLast` function.
35917 *
35918 * @private
35919 * @param {Function} eachFunc The function to iterate over a collection.
35920 * @param {boolean} [fromRight] Specify iterating from right to left.
35921 * @returns {Function} Returns the new find function.
35922 */
35923 function createFind(eachFunc, fromRight) {
35924 return function(collection, predicate, thisArg) {
35925 predicate = baseCallback(predicate, thisArg, 3);
35926 if (isArray(collection)) {
35927 var index = baseFindIndex(collection, predicate, fromRight);
35928 return index > -1 ? collection[index] : undefined;
35929 }
35930 return baseFind(collection, predicate, eachFunc);
35931 };
35932 }
35933
35934 module.exports = createFind;
35935
35936
35937/***/ },
35938/* 447 */
35939/***/ function(module, exports, __webpack_require__) {
35940
35941 var baseMatches = __webpack_require__(448),
35942 baseMatchesProperty = __webpack_require__(460),
35943 bindCallback = __webpack_require__(467),
35944 identity = __webpack_require__(468),
35945 property = __webpack_require__(469);
35946
35947 /**
35948 * The base implementation of `_.callback` which supports specifying the
35949 * number of arguments to provide to `func`.
35950 *
35951 * @private
35952 * @param {*} [func=_.identity] The value to convert to a callback.
35953 * @param {*} [thisArg] The `this` binding of `func`.
35954 * @param {number} [argCount] The number of arguments to provide to `func`.
35955 * @returns {Function} Returns the callback.
35956 */
35957 function baseCallback(func, thisArg, argCount) {
35958 var type = typeof func;
35959 if (type == 'function') {
35960 return thisArg === undefined
35961 ? func
35962 : bindCallback(func, thisArg, argCount);
35963 }
35964 if (func == null) {
35965 return identity;
35966 }
35967 if (type == 'object') {
35968 return baseMatches(func);
35969 }
35970 return thisArg === undefined
35971 ? property(func)
35972 : baseMatchesProperty(func, thisArg);
35973 }
35974
35975 module.exports = baseCallback;
35976
35977
35978/***/ },
35979/* 448 */
35980/***/ function(module, exports, __webpack_require__) {
35981
35982 var baseIsMatch = __webpack_require__(449),
35983 getMatchData = __webpack_require__(457),
35984 toObject = __webpack_require__(425);
35985
35986 /**
35987 * The base implementation of `_.matches` which does not clone `source`.
35988 *
35989 * @private
35990 * @param {Object} source The object of property values to match.
35991 * @returns {Function} Returns the new function.
35992 */
35993 function baseMatches(source) {
35994 var matchData = getMatchData(source);
35995 if (matchData.length == 1 && matchData[0][2]) {
35996 var key = matchData[0][0],
35997 value = matchData[0][1];
35998
35999 return function(object) {
36000 if (object == null) {
36001 return false;
36002 }
36003 object = toObject(object);
36004 return object[key] === value && (value !== undefined || (key in object));
36005 };
36006 }
36007 return function(object) {
36008 return baseIsMatch(object, matchData);
36009 };
36010 }
36011
36012 module.exports = baseMatches;
36013
36014
36015/***/ },
36016/* 449 */
36017/***/ function(module, exports, __webpack_require__) {
36018
36019 var baseIsEqual = __webpack_require__(450),
36020 toObject = __webpack_require__(425);
36021
36022 /**
36023 * The base implementation of `_.isMatch` without support for callback
36024 * shorthands and `this` binding.
36025 *
36026 * @private
36027 * @param {Object} object The object to inspect.
36028 * @param {Array} matchData The propery names, values, and compare flags to match.
36029 * @param {Function} [customizer] The function to customize comparing objects.
36030 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
36031 */
36032 function baseIsMatch(object, matchData, customizer) {
36033 var index = matchData.length,
36034 length = index,
36035 noCustomizer = !customizer;
36036
36037 if (object == null) {
36038 return !length;
36039 }
36040 object = toObject(object);
36041 while (index--) {
36042 var data = matchData[index];
36043 if ((noCustomizer && data[2])
36044 ? data[1] !== object[data[0]]
36045 : !(data[0] in object)
36046 ) {
36047 return false;
36048 }
36049 }
36050 while (++index < length) {
36051 data = matchData[index];
36052 var key = data[0],
36053 objValue = object[key],
36054 srcValue = data[1];
36055
36056 if (noCustomizer && data[2]) {
36057 if (objValue === undefined && !(key in object)) {
36058 return false;
36059 }
36060 } else {
36061 var result = customizer ? customizer(objValue, srcValue, key) : undefined;
36062 if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
36063 return false;
36064 }
36065 }
36066 }
36067 return true;
36068 }
36069
36070 module.exports = baseIsMatch;
36071
36072
36073/***/ },
36074/* 450 */
36075/***/ function(module, exports, __webpack_require__) {
36076
36077 var baseIsEqualDeep = __webpack_require__(451),
36078 isObject = __webpack_require__(426),
36079 isObjectLike = __webpack_require__(428);
36080
36081 /**
36082 * The base implementation of `_.isEqual` without support for `this` binding
36083 * `customizer` functions.
36084 *
36085 * @private
36086 * @param {*} value The value to compare.
36087 * @param {*} other The other value to compare.
36088 * @param {Function} [customizer] The function to customize comparing values.
36089 * @param {boolean} [isLoose] Specify performing partial comparisons.
36090 * @param {Array} [stackA] Tracks traversed `value` objects.
36091 * @param {Array} [stackB] Tracks traversed `other` objects.
36092 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
36093 */
36094 function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
36095 if (value === other) {
36096 return true;
36097 }
36098 if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
36099 return value !== value && other !== other;
36100 }
36101 return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
36102 }
36103
36104 module.exports = baseIsEqual;
36105
36106
36107/***/ },
36108/* 451 */
36109/***/ function(module, exports, __webpack_require__) {
36110
36111 var equalArrays = __webpack_require__(452),
36112 equalByTag = __webpack_require__(454),
36113 equalObjects = __webpack_require__(455),
36114 isArray = __webpack_require__(441),
36115 isHostObject = __webpack_require__(434),
36116 isTypedArray = __webpack_require__(456);
36117
36118 /** `Object#toString` result references. */
36119 var argsTag = '[object Arguments]',
36120 arrayTag = '[object Array]',
36121 objectTag = '[object Object]';
36122
36123 /** Used for native method references. */
36124 var objectProto = Object.prototype;
36125
36126 /** Used to check objects for own properties. */
36127 var hasOwnProperty = objectProto.hasOwnProperty;
36128
36129 /**
36130 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
36131 * of values.
36132 */
36133 var objToString = objectProto.toString;
36134
36135 /**
36136 * A specialized version of `baseIsEqual` for arrays and objects which performs
36137 * deep comparisons and tracks traversed objects enabling objects with circular
36138 * references to be compared.
36139 *
36140 * @private
36141 * @param {Object} object The object to compare.
36142 * @param {Object} other The other object to compare.
36143 * @param {Function} equalFunc The function to determine equivalents of values.
36144 * @param {Function} [customizer] The function to customize comparing objects.
36145 * @param {boolean} [isLoose] Specify performing partial comparisons.
36146 * @param {Array} [stackA=[]] Tracks traversed `value` objects.
36147 * @param {Array} [stackB=[]] Tracks traversed `other` objects.
36148 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
36149 */
36150 function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
36151 var objIsArr = isArray(object),
36152 othIsArr = isArray(other),
36153 objTag = arrayTag,
36154 othTag = arrayTag;
36155
36156 if (!objIsArr) {
36157 objTag = objToString.call(object);
36158 if (objTag == argsTag) {
36159 objTag = objectTag;
36160 } else if (objTag != objectTag) {
36161 objIsArr = isTypedArray(object);
36162 }
36163 }
36164 if (!othIsArr) {
36165 othTag = objToString.call(other);
36166 if (othTag == argsTag) {
36167 othTag = objectTag;
36168 } else if (othTag != objectTag) {
36169 othIsArr = isTypedArray(other);
36170 }
36171 }
36172 var objIsObj = objTag == objectTag && !isHostObject(object),
36173 othIsObj = othTag == objectTag && !isHostObject(other),
36174 isSameTag = objTag == othTag;
36175
36176 if (isSameTag && !(objIsArr || objIsObj)) {
36177 return equalByTag(object, other, objTag);
36178 }
36179 if (!isLoose) {
36180 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
36181 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
36182
36183 if (objIsWrapped || othIsWrapped) {
36184 return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
36185 }
36186 }
36187 if (!isSameTag) {
36188 return false;
36189 }
36190 // Assume cyclic values are equal.
36191 // For more information on detecting circular references see https://es5.github.io/#JO.
36192 stackA || (stackA = []);
36193 stackB || (stackB = []);
36194
36195 var length = stackA.length;
36196 while (length--) {
36197 if (stackA[length] == object) {
36198 return stackB[length] == other;
36199 }
36200 }
36201 // Add `object` and `other` to the stack of traversed objects.
36202 stackA.push(object);
36203 stackB.push(other);
36204
36205 var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
36206
36207 stackA.pop();
36208 stackB.pop();
36209
36210 return result;
36211 }
36212
36213 module.exports = baseIsEqualDeep;
36214
36215
36216/***/ },
36217/* 452 */
36218/***/ function(module, exports, __webpack_require__) {
36219
36220 var arraySome = __webpack_require__(453);
36221
36222 /**
36223 * A specialized version of `baseIsEqualDeep` for arrays with support for
36224 * partial deep comparisons.
36225 *
36226 * @private
36227 * @param {Array} array The array to compare.
36228 * @param {Array} other The other array to compare.
36229 * @param {Function} equalFunc The function to determine equivalents of values.
36230 * @param {Function} [customizer] The function to customize comparing arrays.
36231 * @param {boolean} [isLoose] Specify performing partial comparisons.
36232 * @param {Array} [stackA] Tracks traversed `value` objects.
36233 * @param {Array} [stackB] Tracks traversed `other` objects.
36234 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
36235 */
36236 function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
36237 var index = -1,
36238 arrLength = array.length,
36239 othLength = other.length;
36240
36241 if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
36242 return false;
36243 }
36244 // Ignore non-index properties.
36245 while (++index < arrLength) {
36246 var arrValue = array[index],
36247 othValue = other[index],
36248 result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
36249
36250 if (result !== undefined) {
36251 if (result) {
36252 continue;
36253 }
36254 return false;
36255 }
36256 // Recursively compare arrays (susceptible to call stack limits).
36257 if (isLoose) {
36258 if (!arraySome(other, function(othValue) {
36259 return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
36260 })) {
36261 return false;
36262 }
36263 } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
36264 return false;
36265 }
36266 }
36267 return true;
36268 }
36269
36270 module.exports = equalArrays;
36271
36272
36273/***/ },
36274/* 453 */
36275/***/ function(module, exports) {
36276
36277 /**
36278 * A specialized version of `_.some` for arrays without support for callback
36279 * shorthands and `this` binding.
36280 *
36281 * @private
36282 * @param {Array} array The array to iterate over.
36283 * @param {Function} predicate The function invoked per iteration.
36284 * @returns {boolean} Returns `true` if any element passes the predicate check,
36285 * else `false`.
36286 */
36287 function arraySome(array, predicate) {
36288 var index = -1,
36289 length = array.length;
36290
36291 while (++index < length) {
36292 if (predicate(array[index], index, array)) {
36293 return true;
36294 }
36295 }
36296 return false;
36297 }
36298
36299 module.exports = arraySome;
36300
36301
36302/***/ },
36303/* 454 */
36304/***/ function(module, exports) {
36305
36306 /** `Object#toString` result references. */
36307 var boolTag = '[object Boolean]',
36308 dateTag = '[object Date]',
36309 errorTag = '[object Error]',
36310 numberTag = '[object Number]',
36311 regexpTag = '[object RegExp]',
36312 stringTag = '[object String]';
36313
36314 /**
36315 * A specialized version of `baseIsEqualDeep` for comparing objects of
36316 * the same `toStringTag`.
36317 *
36318 * **Note:** This function only supports comparing values with tags of
36319 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
36320 *
36321 * @private
36322 * @param {Object} object The object to compare.
36323 * @param {Object} other The other object to compare.
36324 * @param {string} tag The `toStringTag` of the objects to compare.
36325 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
36326 */
36327 function equalByTag(object, other, tag) {
36328 switch (tag) {
36329 case boolTag:
36330 case dateTag:
36331 // Coerce dates and booleans to numbers, dates to milliseconds and booleans
36332 // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
36333 return +object == +other;
36334
36335 case errorTag:
36336 return object.name == other.name && object.message == other.message;
36337
36338 case numberTag:
36339 // Treat `NaN` vs. `NaN` as equal.
36340 return (object != +object)
36341 ? other != +other
36342 : object == +other;
36343
36344 case regexpTag:
36345 case stringTag:
36346 // Coerce regexes to strings and treat strings primitives and string
36347 // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
36348 return object == (other + '');
36349 }
36350 return false;
36351 }
36352
36353 module.exports = equalByTag;
36354
36355
36356/***/ },
36357/* 455 */
36358/***/ function(module, exports, __webpack_require__) {
36359
36360 var keys = __webpack_require__(430);
36361
36362 /** Used for native method references. */
36363 var objectProto = Object.prototype;
36364
36365 /** Used to check objects for own properties. */
36366 var hasOwnProperty = objectProto.hasOwnProperty;
36367
36368 /**
36369 * A specialized version of `baseIsEqualDeep` for objects with support for
36370 * partial deep comparisons.
36371 *
36372 * @private
36373 * @param {Object} object The object to compare.
36374 * @param {Object} other The other object to compare.
36375 * @param {Function} equalFunc The function to determine equivalents of values.
36376 * @param {Function} [customizer] The function to customize comparing values.
36377 * @param {boolean} [isLoose] Specify performing partial comparisons.
36378 * @param {Array} [stackA] Tracks traversed `value` objects.
36379 * @param {Array} [stackB] Tracks traversed `other` objects.
36380 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
36381 */
36382 function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
36383 var objProps = keys(object),
36384 objLength = objProps.length,
36385 othProps = keys(other),
36386 othLength = othProps.length;
36387
36388 if (objLength != othLength && !isLoose) {
36389 return false;
36390 }
36391 var index = objLength;
36392 while (index--) {
36393 var key = objProps[index];
36394 if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
36395 return false;
36396 }
36397 }
36398 var skipCtor = isLoose;
36399 while (++index < objLength) {
36400 key = objProps[index];
36401 var objValue = object[key],
36402 othValue = other[key],
36403 result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
36404
36405 // Recursively compare objects (susceptible to call stack limits).
36406 if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
36407 return false;
36408 }
36409 skipCtor || (skipCtor = key == 'constructor');
36410 }
36411 if (!skipCtor) {
36412 var objCtor = object.constructor,
36413 othCtor = other.constructor;
36414
36415 // Non `Object` object instances with different constructors are not equal.
36416 if (objCtor != othCtor &&
36417 ('constructor' in object && 'constructor' in other) &&
36418 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
36419 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
36420 return false;
36421 }
36422 }
36423 return true;
36424 }
36425
36426 module.exports = equalObjects;
36427
36428
36429/***/ },
36430/* 456 */
36431/***/ function(module, exports, __webpack_require__) {
36432
36433 var isLength = __webpack_require__(438),
36434 isObjectLike = __webpack_require__(428);
36435
36436 /** `Object#toString` result references. */
36437 var argsTag = '[object Arguments]',
36438 arrayTag = '[object Array]',
36439 boolTag = '[object Boolean]',
36440 dateTag = '[object Date]',
36441 errorTag = '[object Error]',
36442 funcTag = '[object Function]',
36443 mapTag = '[object Map]',
36444 numberTag = '[object Number]',
36445 objectTag = '[object Object]',
36446 regexpTag = '[object RegExp]',
36447 setTag = '[object Set]',
36448 stringTag = '[object String]',
36449 weakMapTag = '[object WeakMap]';
36450
36451 var arrayBufferTag = '[object ArrayBuffer]',
36452 float32Tag = '[object Float32Array]',
36453 float64Tag = '[object Float64Array]',
36454 int8Tag = '[object Int8Array]',
36455 int16Tag = '[object Int16Array]',
36456 int32Tag = '[object Int32Array]',
36457 uint8Tag = '[object Uint8Array]',
36458 uint8ClampedTag = '[object Uint8ClampedArray]',
36459 uint16Tag = '[object Uint16Array]',
36460 uint32Tag = '[object Uint32Array]';
36461
36462 /** Used to identify `toStringTag` values of typed arrays. */
36463 var typedArrayTags = {};
36464 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
36465 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
36466 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
36467 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
36468 typedArrayTags[uint32Tag] = true;
36469 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
36470 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
36471 typedArrayTags[dateTag] = typedArrayTags[errorTag] =
36472 typedArrayTags[funcTag] = typedArrayTags[mapTag] =
36473 typedArrayTags[numberTag] = typedArrayTags[objectTag] =
36474 typedArrayTags[regexpTag] = typedArrayTags[setTag] =
36475 typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
36476
36477 /** Used for native method references. */
36478 var objectProto = Object.prototype;
36479
36480 /**
36481 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
36482 * of values.
36483 */
36484 var objToString = objectProto.toString;
36485
36486 /**
36487 * Checks if `value` is classified as a typed array.
36488 *
36489 * @static
36490 * @memberOf _
36491 * @category Lang
36492 * @param {*} value The value to check.
36493 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
36494 * @example
36495 *
36496 * _.isTypedArray(new Uint8Array);
36497 * // => true
36498 *
36499 * _.isTypedArray([]);
36500 * // => false
36501 */
36502 function isTypedArray(value) {
36503 return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
36504 }
36505
36506 module.exports = isTypedArray;
36507
36508
36509/***/ },
36510/* 457 */
36511/***/ function(module, exports, __webpack_require__) {
36512
36513 var isStrictComparable = __webpack_require__(458),
36514 pairs = __webpack_require__(459);
36515
36516 /**
36517 * Gets the propery names, values, and compare flags of `object`.
36518 *
36519 * @private
36520 * @param {Object} object The object to query.
36521 * @returns {Array} Returns the match data of `object`.
36522 */
36523 function getMatchData(object) {
36524 var result = pairs(object),
36525 length = result.length;
36526
36527 while (length--) {
36528 result[length][2] = isStrictComparable(result[length][1]);
36529 }
36530 return result;
36531 }
36532
36533 module.exports = getMatchData;
36534
36535
36536/***/ },
36537/* 458 */
36538/***/ function(module, exports, __webpack_require__) {
36539
36540 var isObject = __webpack_require__(426);
36541
36542 /**
36543 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
36544 *
36545 * @private
36546 * @param {*} value The value to check.
36547 * @returns {boolean} Returns `true` if `value` if suitable for strict
36548 * equality comparisons, else `false`.
36549 */
36550 function isStrictComparable(value) {
36551 return value === value && !isObject(value);
36552 }
36553
36554 module.exports = isStrictComparable;
36555
36556
36557/***/ },
36558/* 459 */
36559/***/ function(module, exports, __webpack_require__) {
36560
36561 var keys = __webpack_require__(430),
36562 toObject = __webpack_require__(425);
36563
36564 /**
36565 * Creates a two dimensional array of the key-value pairs for `object`,
36566 * e.g. `[[key1, value1], [key2, value2]]`.
36567 *
36568 * @static
36569 * @memberOf _
36570 * @category Object
36571 * @param {Object} object The object to query.
36572 * @returns {Array} Returns the new array of key-value pairs.
36573 * @example
36574 *
36575 * _.pairs({ 'barney': 36, 'fred': 40 });
36576 * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)
36577 */
36578 function pairs(object) {
36579 object = toObject(object);
36580
36581 var index = -1,
36582 props = keys(object),
36583 length = props.length,
36584 result = Array(length);
36585
36586 while (++index < length) {
36587 var key = props[index];
36588 result[index] = [key, object[key]];
36589 }
36590 return result;
36591 }
36592
36593 module.exports = pairs;
36594
36595
36596/***/ },
36597/* 460 */
36598/***/ function(module, exports, __webpack_require__) {
36599
36600 var baseGet = __webpack_require__(461),
36601 baseIsEqual = __webpack_require__(450),
36602 baseSlice = __webpack_require__(462),
36603 isArray = __webpack_require__(441),
36604 isKey = __webpack_require__(463),
36605 isStrictComparable = __webpack_require__(458),
36606 last = __webpack_require__(464),
36607 toObject = __webpack_require__(425),
36608 toPath = __webpack_require__(465);
36609
36610 /**
36611 * The base implementation of `_.matchesProperty` which does not clone `srcValue`.
36612 *
36613 * @private
36614 * @param {string} path The path of the property to get.
36615 * @param {*} srcValue The value to compare.
36616 * @returns {Function} Returns the new function.
36617 */
36618 function baseMatchesProperty(path, srcValue) {
36619 var isArr = isArray(path),
36620 isCommon = isKey(path) && isStrictComparable(srcValue),
36621 pathKey = (path + '');
36622
36623 path = toPath(path);
36624 return function(object) {
36625 if (object == null) {
36626 return false;
36627 }
36628 var key = pathKey;
36629 object = toObject(object);
36630 if ((isArr || !isCommon) && !(key in object)) {
36631 object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
36632 if (object == null) {
36633 return false;
36634 }
36635 key = last(path);
36636 object = toObject(object);
36637 }
36638 return object[key] === srcValue
36639 ? (srcValue !== undefined || (key in object))
36640 : baseIsEqual(srcValue, object[key], undefined, true);
36641 };
36642 }
36643
36644 module.exports = baseMatchesProperty;
36645
36646
36647/***/ },
36648/* 461 */
36649/***/ function(module, exports, __webpack_require__) {
36650
36651 var toObject = __webpack_require__(425);
36652
36653 /**
36654 * The base implementation of `get` without support for string paths
36655 * and default values.
36656 *
36657 * @private
36658 * @param {Object} object The object to query.
36659 * @param {Array} path The path of the property to get.
36660 * @param {string} [pathKey] The key representation of path.
36661 * @returns {*} Returns the resolved value.
36662 */
36663 function baseGet(object, path, pathKey) {
36664 if (object == null) {
36665 return;
36666 }
36667 object = toObject(object);
36668 if (pathKey !== undefined && pathKey in object) {
36669 path = [pathKey];
36670 }
36671 var index = 0,
36672 length = path.length;
36673
36674 while (object != null && index < length) {
36675 object = toObject(object)[path[index++]];
36676 }
36677 return (index && index == length) ? object : undefined;
36678 }
36679
36680 module.exports = baseGet;
36681
36682
36683/***/ },
36684/* 462 */
36685/***/ function(module, exports) {
36686
36687 /**
36688 * The base implementation of `_.slice` without an iteratee call guard.
36689 *
36690 * @private
36691 * @param {Array} array The array to slice.
36692 * @param {number} [start=0] The start position.
36693 * @param {number} [end=array.length] The end position.
36694 * @returns {Array} Returns the slice of `array`.
36695 */
36696 function baseSlice(array, start, end) {
36697 var index = -1,
36698 length = array.length;
36699
36700 start = start == null ? 0 : (+start || 0);
36701 if (start < 0) {
36702 start = -start > length ? 0 : (length + start);
36703 }
36704 end = (end === undefined || end > length) ? length : (+end || 0);
36705 if (end < 0) {
36706 end += length;
36707 }
36708 length = start > end ? 0 : ((end - start) >>> 0);
36709 start >>>= 0;
36710
36711 var result = Array(length);
36712 while (++index < length) {
36713 result[index] = array[index + start];
36714 }
36715 return result;
36716 }
36717
36718 module.exports = baseSlice;
36719
36720
36721/***/ },
36722/* 463 */
36723/***/ function(module, exports, __webpack_require__) {
36724
36725 var isArray = __webpack_require__(441),
36726 toObject = __webpack_require__(425);
36727
36728 /** Used to match property names within property paths. */
36729 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
36730 reIsPlainProp = /^\w*$/;
36731
36732 /**
36733 * Checks if `value` is a property name and not a property path.
36734 *
36735 * @private
36736 * @param {*} value The value to check.
36737 * @param {Object} [object] The object to query keys on.
36738 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
36739 */
36740 function isKey(value, object) {
36741 var type = typeof value;
36742 if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
36743 return true;
36744 }
36745 if (isArray(value)) {
36746 return false;
36747 }
36748 var result = !reIsDeepProp.test(value);
36749 return result || (object != null && value in toObject(object));
36750 }
36751
36752 module.exports = isKey;
36753
36754
36755/***/ },
36756/* 464 */
36757/***/ function(module, exports) {
36758
36759 /**
36760 * Gets the last element of `array`.
36761 *
36762 * @static
36763 * @memberOf _
36764 * @category Array
36765 * @param {Array} array The array to query.
36766 * @returns {*} Returns the last element of `array`.
36767 * @example
36768 *
36769 * _.last([1, 2, 3]);
36770 * // => 3
36771 */
36772 function last(array) {
36773 var length = array ? array.length : 0;
36774 return length ? array[length - 1] : undefined;
36775 }
36776
36777 module.exports = last;
36778
36779
36780/***/ },
36781/* 465 */
36782/***/ function(module, exports, __webpack_require__) {
36783
36784 var baseToString = __webpack_require__(466),
36785 isArray = __webpack_require__(441);
36786
36787 /** Used to match property names within property paths. */
36788 var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
36789
36790 /** Used to match backslashes in property paths. */
36791 var reEscapeChar = /\\(\\)?/g;
36792
36793 /**
36794 * Converts `value` to property path array if it's not one.
36795 *
36796 * @private
36797 * @param {*} value The value to process.
36798 * @returns {Array} Returns the property path array.
36799 */
36800 function toPath(value) {
36801 if (isArray(value)) {
36802 return value;
36803 }
36804 var result = [];
36805 baseToString(value).replace(rePropName, function(match, number, quote, string) {
36806 result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
36807 });
36808 return result;
36809 }
36810
36811 module.exports = toPath;
36812
36813
36814/***/ },
36815/* 466 */
36816/***/ function(module, exports) {
36817
36818 /**
36819 * Converts `value` to a string if it's not one. An empty string is returned
36820 * for `null` or `undefined` values.
36821 *
36822 * @private
36823 * @param {*} value The value to process.
36824 * @returns {string} Returns the string.
36825 */
36826 function baseToString(value) {
36827 return value == null ? '' : (value + '');
36828 }
36829
36830 module.exports = baseToString;
36831
36832
36833/***/ },
36834/* 467 */
36835/***/ function(module, exports, __webpack_require__) {
36836
36837 var identity = __webpack_require__(468);
36838
36839 /**
36840 * A specialized version of `baseCallback` which only supports `this` binding
36841 * and specifying the number of arguments to provide to `func`.
36842 *
36843 * @private
36844 * @param {Function} func The function to bind.
36845 * @param {*} thisArg The `this` binding of `func`.
36846 * @param {number} [argCount] The number of arguments to provide to `func`.
36847 * @returns {Function} Returns the callback.
36848 */
36849 function bindCallback(func, thisArg, argCount) {
36850 if (typeof func != 'function') {
36851 return identity;
36852 }
36853 if (thisArg === undefined) {
36854 return func;
36855 }
36856 switch (argCount) {
36857 case 1: return function(value) {
36858 return func.call(thisArg, value);
36859 };
36860 case 3: return function(value, index, collection) {
36861 return func.call(thisArg, value, index, collection);
36862 };
36863 case 4: return function(accumulator, value, index, collection) {
36864 return func.call(thisArg, accumulator, value, index, collection);
36865 };
36866 case 5: return function(value, other, key, object, source) {
36867 return func.call(thisArg, value, other, key, object, source);
36868 };
36869 }
36870 return function() {
36871 return func.apply(thisArg, arguments);
36872 };
36873 }
36874
36875 module.exports = bindCallback;
36876
36877
36878/***/ },
36879/* 468 */
36880/***/ function(module, exports) {
36881
36882 /**
36883 * This method returns the first argument provided to it.
36884 *
36885 * @static
36886 * @memberOf _
36887 * @category Utility
36888 * @param {*} value Any value.
36889 * @returns {*} Returns `value`.
36890 * @example
36891 *
36892 * var object = { 'user': 'fred' };
36893 *
36894 * _.identity(object) === object;
36895 * // => true
36896 */
36897 function identity(value) {
36898 return value;
36899 }
36900
36901 module.exports = identity;
36902
36903
36904/***/ },
36905/* 469 */
36906/***/ function(module, exports, __webpack_require__) {
36907
36908 var baseProperty = __webpack_require__(437),
36909 basePropertyDeep = __webpack_require__(470),
36910 isKey = __webpack_require__(463);
36911
36912 /**
36913 * Creates a function that returns the property value at `path` on a
36914 * given object.
36915 *
36916 * @static
36917 * @memberOf _
36918 * @category Utility
36919 * @param {Array|string} path The path of the property to get.
36920 * @returns {Function} Returns the new function.
36921 * @example
36922 *
36923 * var objects = [
36924 * { 'a': { 'b': { 'c': 2 } } },
36925 * { 'a': { 'b': { 'c': 1 } } }
36926 * ];
36927 *
36928 * _.map(objects, _.property('a.b.c'));
36929 * // => [2, 1]
36930 *
36931 * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
36932 * // => [1, 2]
36933 */
36934 function property(path) {
36935 return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
36936 }
36937
36938 module.exports = property;
36939
36940
36941/***/ },
36942/* 470 */
36943/***/ function(module, exports, __webpack_require__) {
36944
36945 var baseGet = __webpack_require__(461),
36946 toPath = __webpack_require__(465);
36947
36948 /**
36949 * A specialized version of `baseProperty` which supports deep paths.
36950 *
36951 * @private
36952 * @param {Array|string} path The path of the property to get.
36953 * @returns {Function} Returns the new function.
36954 */
36955 function basePropertyDeep(path) {
36956 var pathKey = (path + '');
36957 path = toPath(path);
36958 return function(object) {
36959 return baseGet(object, path, pathKey);
36960 };
36961 }
36962
36963 module.exports = basePropertyDeep;
36964
36965
36966/***/ },
36967/* 471 */
36968/***/ function(module, exports) {
36969
36970 /**
36971 * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,
36972 * without support for callback shorthands and `this` binding, which iterates
36973 * over `collection` using the provided `eachFunc`.
36974 *
36975 * @private
36976 * @param {Array|Object|string} collection The collection to search.
36977 * @param {Function} predicate The function invoked per iteration.
36978 * @param {Function} eachFunc The function to iterate over `collection`.
36979 * @param {boolean} [retKey] Specify returning the key of the found element
36980 * instead of the element itself.
36981 * @returns {*} Returns the found element or its key, else `undefined`.
36982 */
36983 function baseFind(collection, predicate, eachFunc, retKey) {
36984 var result;
36985 eachFunc(collection, function(value, key, collection) {
36986 if (predicate(value, key, collection)) {
36987 result = retKey ? key : value;
36988 return false;
36989 }
36990 });
36991 return result;
36992 }
36993
36994 module.exports = baseFind;
36995
36996
36997/***/ },
36998/* 472 */
36999/***/ function(module, exports) {
37000
37001 /**
37002 * The base implementation of `_.findIndex` and `_.findLastIndex` without
37003 * support for callback shorthands and `this` binding.
37004 *
37005 * @private
37006 * @param {Array} array The array to search.
37007 * @param {Function} predicate The function invoked per iteration.
37008 * @param {boolean} [fromRight] Specify iterating from right to left.
37009 * @returns {number} Returns the index of the matched value, else `-1`.
37010 */
37011 function baseFindIndex(array, predicate, fromRight) {
37012 var length = array.length,
37013 index = fromRight ? length : -1;
37014
37015 while ((fromRight ? index-- : ++index < length)) {
37016 if (predicate(array[index], index, array)) {
37017 return index;
37018 }
37019 }
37020 return -1;
37021 }
37022
37023 module.exports = baseFindIndex;
37024
37025
37026/***/ },
37027/* 473 */
37028/***/ function(module, exports, __webpack_require__) {
37029
37030 var arrayMap = __webpack_require__(474),
37031 baseDifference = __webpack_require__(475),
37032 baseFlatten = __webpack_require__(482),
37033 bindCallback = __webpack_require__(467),
37034 keysIn = __webpack_require__(443),
37035 pickByArray = __webpack_require__(484),
37036 pickByCallback = __webpack_require__(485),
37037 restParam = __webpack_require__(487);
37038
37039 /**
37040 * The opposite of `_.pick`; this method creates an object composed of the
37041 * own and inherited enumerable properties of `object` that are not omitted.
37042 *
37043 * @static
37044 * @memberOf _
37045 * @category Object
37046 * @param {Object} object The source object.
37047 * @param {Function|...(string|string[])} [predicate] The function invoked per
37048 * iteration or property names to omit, specified as individual property
37049 * names or arrays of property names.
37050 * @param {*} [thisArg] The `this` binding of `predicate`.
37051 * @returns {Object} Returns the new object.
37052 * @example
37053 *
37054 * var object = { 'user': 'fred', 'age': 40 };
37055 *
37056 * _.omit(object, 'age');
37057 * // => { 'user': 'fred' }
37058 *
37059 * _.omit(object, _.isNumber);
37060 * // => { 'user': 'fred' }
37061 */
37062 var omit = restParam(function(object, props) {
37063 if (object == null) {
37064 return {};
37065 }
37066 if (typeof props[0] != 'function') {
37067 var props = arrayMap(baseFlatten(props), String);
37068 return pickByArray(object, baseDifference(keysIn(object), props));
37069 }
37070 var predicate = bindCallback(props[0], props[1], 3);
37071 return pickByCallback(object, function(value, key, object) {
37072 return !predicate(value, key, object);
37073 });
37074 });
37075
37076 module.exports = omit;
37077
37078
37079/***/ },
37080/* 474 */
37081/***/ function(module, exports) {
37082
37083 /**
37084 * A specialized version of `_.map` for arrays without support for callback
37085 * shorthands and `this` binding.
37086 *
37087 * @private
37088 * @param {Array} array The array to iterate over.
37089 * @param {Function} iteratee The function invoked per iteration.
37090 * @returns {Array} Returns the new mapped array.
37091 */
37092 function arrayMap(array, iteratee) {
37093 var index = -1,
37094 length = array.length,
37095 result = Array(length);
37096
37097 while (++index < length) {
37098 result[index] = iteratee(array[index], index, array);
37099 }
37100 return result;
37101 }
37102
37103 module.exports = arrayMap;
37104
37105
37106/***/ },
37107/* 475 */
37108/***/ function(module, exports, __webpack_require__) {
37109
37110 var baseIndexOf = __webpack_require__(476),
37111 cacheIndexOf = __webpack_require__(478),
37112 createCache = __webpack_require__(479);
37113
37114 /** Used as the size to enable large array optimizations. */
37115 var LARGE_ARRAY_SIZE = 200;
37116
37117 /**
37118 * The base implementation of `_.difference` which accepts a single array
37119 * of values to exclude.
37120 *
37121 * @private
37122 * @param {Array} array The array to inspect.
37123 * @param {Array} values The values to exclude.
37124 * @returns {Array} Returns the new array of filtered values.
37125 */
37126 function baseDifference(array, values) {
37127 var length = array ? array.length : 0,
37128 result = [];
37129
37130 if (!length) {
37131 return result;
37132 }
37133 var index = -1,
37134 indexOf = baseIndexOf,
37135 isCommon = true,
37136 cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
37137 valuesLength = values.length;
37138
37139 if (cache) {
37140 indexOf = cacheIndexOf;
37141 isCommon = false;
37142 values = cache;
37143 }
37144 outer:
37145 while (++index < length) {
37146 var value = array[index];
37147
37148 if (isCommon && value === value) {
37149 var valuesIndex = valuesLength;
37150 while (valuesIndex--) {
37151 if (values[valuesIndex] === value) {
37152 continue outer;
37153 }
37154 }
37155 result.push(value);
37156 }
37157 else if (indexOf(values, value, 0) < 0) {
37158 result.push(value);
37159 }
37160 }
37161 return result;
37162 }
37163
37164 module.exports = baseDifference;
37165
37166
37167/***/ },
37168/* 476 */
37169/***/ function(module, exports, __webpack_require__) {
37170
37171 var indexOfNaN = __webpack_require__(477);
37172
37173 /**
37174 * The base implementation of `_.indexOf` without support for binary searches.
37175 *
37176 * @private
37177 * @param {Array} array The array to search.
37178 * @param {*} value The value to search for.
37179 * @param {number} fromIndex The index to search from.
37180 * @returns {number} Returns the index of the matched value, else `-1`.
37181 */
37182 function baseIndexOf(array, value, fromIndex) {
37183 if (value !== value) {
37184 return indexOfNaN(array, fromIndex);
37185 }
37186 var index = fromIndex - 1,
37187 length = array.length;
37188
37189 while (++index < length) {
37190 if (array[index] === value) {
37191 return index;
37192 }
37193 }
37194 return -1;
37195 }
37196
37197 module.exports = baseIndexOf;
37198
37199
37200/***/ },
37201/* 477 */
37202/***/ function(module, exports) {
37203
37204 /**
37205 * Gets the index at which the first occurrence of `NaN` is found in `array`.
37206 *
37207 * @private
37208 * @param {Array} array The array to search.
37209 * @param {number} fromIndex The index to search from.
37210 * @param {boolean} [fromRight] Specify iterating from right to left.
37211 * @returns {number} Returns the index of the matched `NaN`, else `-1`.
37212 */
37213 function indexOfNaN(array, fromIndex, fromRight) {
37214 var length = array.length,
37215 index = fromIndex + (fromRight ? 0 : -1);
37216
37217 while ((fromRight ? index-- : ++index < length)) {
37218 var other = array[index];
37219 if (other !== other) {
37220 return index;
37221 }
37222 }
37223 return -1;
37224 }
37225
37226 module.exports = indexOfNaN;
37227
37228
37229/***/ },
37230/* 478 */
37231/***/ function(module, exports, __webpack_require__) {
37232
37233 var isObject = __webpack_require__(426);
37234
37235 /**
37236 * Checks if `value` is in `cache` mimicking the return signature of
37237 * `_.indexOf` by returning `0` if the value is found, else `-1`.
37238 *
37239 * @private
37240 * @param {Object} cache The cache to search.
37241 * @param {*} value The value to search for.
37242 * @returns {number} Returns `0` if `value` is found, else `-1`.
37243 */
37244 function cacheIndexOf(cache, value) {
37245 var data = cache.data,
37246 result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
37247
37248 return result ? 0 : -1;
37249 }
37250
37251 module.exports = cacheIndexOf;
37252
37253
37254/***/ },
37255/* 479 */
37256/***/ function(module, exports, __webpack_require__) {
37257
37258 /* WEBPACK VAR INJECTION */(function(global) {var SetCache = __webpack_require__(480),
37259 getNative = __webpack_require__(431);
37260
37261 /** Native method references. */
37262 var Set = getNative(global, 'Set');
37263
37264 /* Native method references for those with the same name as other `lodash` methods. */
37265 var nativeCreate = getNative(Object, 'create');
37266
37267 /**
37268 * Creates a `Set` cache object to optimize linear searches of large arrays.
37269 *
37270 * @private
37271 * @param {Array} [values] The values to cache.
37272 * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`.
37273 */
37274 function createCache(values) {
37275 return (nativeCreate && Set) ? new SetCache(values) : null;
37276 }
37277
37278 module.exports = createCache;
37279
37280 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
37281
37282/***/ },
37283/* 480 */
37284/***/ function(module, exports, __webpack_require__) {
37285
37286 /* WEBPACK VAR INJECTION */(function(global) {var cachePush = __webpack_require__(481),
37287 getNative = __webpack_require__(431);
37288
37289 /** Native method references. */
37290 var Set = getNative(global, 'Set');
37291
37292 /* Native method references for those with the same name as other `lodash` methods. */
37293 var nativeCreate = getNative(Object, 'create');
37294
37295 /**
37296 *
37297 * Creates a cache object to store unique values.
37298 *
37299 * @private
37300 * @param {Array} [values] The values to cache.
37301 */
37302 function SetCache(values) {
37303 var length = values ? values.length : 0;
37304
37305 this.data = { 'hash': nativeCreate(null), 'set': new Set };
37306 while (length--) {
37307 this.push(values[length]);
37308 }
37309 }
37310
37311 // Add functions to the `Set` cache.
37312 SetCache.prototype.push = cachePush;
37313
37314 module.exports = SetCache;
37315
37316 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
37317
37318/***/ },
37319/* 481 */
37320/***/ function(module, exports, __webpack_require__) {
37321
37322 var isObject = __webpack_require__(426);
37323
37324 /**
37325 * Adds `value` to the cache.
37326 *
37327 * @private
37328 * @name push
37329 * @memberOf SetCache
37330 * @param {*} value The value to cache.
37331 */
37332 function cachePush(value) {
37333 var data = this.data;
37334 if (typeof value == 'string' || isObject(value)) {
37335 data.set.add(value);
37336 } else {
37337 data.hash[value] = true;
37338 }
37339 }
37340
37341 module.exports = cachePush;
37342
37343
37344/***/ },
37345/* 482 */
37346/***/ function(module, exports, __webpack_require__) {
37347
37348 var arrayPush = __webpack_require__(483),
37349 isArguments = __webpack_require__(440),
37350 isArray = __webpack_require__(441),
37351 isArrayLike = __webpack_require__(435),
37352 isObjectLike = __webpack_require__(428);
37353
37354 /**
37355 * The base implementation of `_.flatten` with added support for restricting
37356 * flattening and specifying the start index.
37357 *
37358 * @private
37359 * @param {Array} array The array to flatten.
37360 * @param {boolean} [isDeep] Specify a deep flatten.
37361 * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
37362 * @param {Array} [result=[]] The initial result value.
37363 * @returns {Array} Returns the new flattened array.
37364 */
37365 function baseFlatten(array, isDeep, isStrict, result) {
37366 result || (result = []);
37367
37368 var index = -1,
37369 length = array.length;
37370
37371 while (++index < length) {
37372 var value = array[index];
37373 if (isObjectLike(value) && isArrayLike(value) &&
37374 (isStrict || isArray(value) || isArguments(value))) {
37375 if (isDeep) {
37376 // Recursively flatten arrays (susceptible to call stack limits).
37377 baseFlatten(value, isDeep, isStrict, result);
37378 } else {
37379 arrayPush(result, value);
37380 }
37381 } else if (!isStrict) {
37382 result[result.length] = value;
37383 }
37384 }
37385 return result;
37386 }
37387
37388 module.exports = baseFlatten;
37389
37390
37391/***/ },
37392/* 483 */
37393/***/ function(module, exports) {
37394
37395 /**
37396 * Appends the elements of `values` to `array`.
37397 *
37398 * @private
37399 * @param {Array} array The array to modify.
37400 * @param {Array} values The values to append.
37401 * @returns {Array} Returns `array`.
37402 */
37403 function arrayPush(array, values) {
37404 var index = -1,
37405 length = values.length,
37406 offset = array.length;
37407
37408 while (++index < length) {
37409 array[offset + index] = values[index];
37410 }
37411 return array;
37412 }
37413
37414 module.exports = arrayPush;
37415
37416
37417/***/ },
37418/* 484 */
37419/***/ function(module, exports, __webpack_require__) {
37420
37421 var toObject = __webpack_require__(425);
37422
37423 /**
37424 * A specialized version of `_.pick` which picks `object` properties specified
37425 * by `props`.
37426 *
37427 * @private
37428 * @param {Object} object The source object.
37429 * @param {string[]} props The property names to pick.
37430 * @returns {Object} Returns the new object.
37431 */
37432 function pickByArray(object, props) {
37433 object = toObject(object);
37434
37435 var index = -1,
37436 length = props.length,
37437 result = {};
37438
37439 while (++index < length) {
37440 var key = props[index];
37441 if (key in object) {
37442 result[key] = object[key];
37443 }
37444 }
37445 return result;
37446 }
37447
37448 module.exports = pickByArray;
37449
37450
37451/***/ },
37452/* 485 */
37453/***/ function(module, exports, __webpack_require__) {
37454
37455 var baseForIn = __webpack_require__(486);
37456
37457 /**
37458 * A specialized version of `_.pick` which picks `object` properties `predicate`
37459 * returns truthy for.
37460 *
37461 * @private
37462 * @param {Object} object The source object.
37463 * @param {Function} predicate The function invoked per iteration.
37464 * @returns {Object} Returns the new object.
37465 */
37466 function pickByCallback(object, predicate) {
37467 var result = {};
37468 baseForIn(object, function(value, key, object) {
37469 if (predicate(value, key, object)) {
37470 result[key] = value;
37471 }
37472 });
37473 return result;
37474 }
37475
37476 module.exports = pickByCallback;
37477
37478
37479/***/ },
37480/* 486 */
37481/***/ function(module, exports, __webpack_require__) {
37482
37483 var baseFor = __webpack_require__(423),
37484 keysIn = __webpack_require__(443);
37485
37486 /**
37487 * The base implementation of `_.forIn` without support for callback
37488 * shorthands and `this` binding.
37489 *
37490 * @private
37491 * @param {Object} object The object to iterate over.
37492 * @param {Function} iteratee The function invoked per iteration.
37493 * @returns {Object} Returns `object`.
37494 */
37495 function baseForIn(object, iteratee) {
37496 return baseFor(object, iteratee, keysIn);
37497 }
37498
37499 module.exports = baseForIn;
37500
37501
37502/***/ },
37503/* 487 */
37504/***/ function(module, exports) {
37505
37506 /** Used as the `TypeError` message for "Functions" methods. */
37507 var FUNC_ERROR_TEXT = 'Expected a function';
37508
37509 /* Native method references for those with the same name as other `lodash` methods. */
37510 var nativeMax = Math.max;
37511
37512 /**
37513 * Creates a function that invokes `func` with the `this` binding of the
37514 * created function and arguments from `start` and beyond provided as an array.
37515 *
37516 * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).
37517 *
37518 * @static
37519 * @memberOf _
37520 * @category Function
37521 * @param {Function} func The function to apply a rest parameter to.
37522 * @param {number} [start=func.length-1] The start position of the rest parameter.
37523 * @returns {Function} Returns the new function.
37524 * @example
37525 *
37526 * var say = _.restParam(function(what, names) {
37527 * return what + ' ' + _.initial(names).join(', ') +
37528 * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
37529 * });
37530 *
37531 * say('hello', 'fred', 'barney', 'pebbles');
37532 * // => 'hello fred, barney, & pebbles'
37533 */
37534 function restParam(func, start) {
37535 if (typeof func != 'function') {
37536 throw new TypeError(FUNC_ERROR_TEXT);
37537 }
37538 start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
37539 return function() {
37540 var args = arguments,
37541 index = -1,
37542 length = nativeMax(args.length - start, 0),
37543 rest = Array(length);
37544
37545 while (++index < length) {
37546 rest[index] = args[start + index];
37547 }
37548 switch (start) {
37549 case 0: return func.call(this, rest);
37550 case 1: return func.call(this, args[0], rest);
37551 case 2: return func.call(this, args[0], args[1], rest);
37552 }
37553 var otherArgs = Array(start + 1);
37554 index = -1;
37555 while (++index < start) {
37556 otherArgs[index] = args[index];
37557 }
37558 otherArgs[start] = rest;
37559 return func.apply(this, otherArgs);
37560 };
37561 }
37562
37563 module.exports = restParam;
37564
37565
37566/***/ },
37567/* 488 */
37568/***/ function(module, exports) {
37569
37570 "use strict";
37571
37572 exports.__esModule = true;
37573 exports["default"] = isRequiredForA11y;
37574
37575 function isRequiredForA11y(propType) {
37576 return function validate(props, propName, componentName) {
37577 if (props[propName] == null) {
37578 return new Error("The prop '" + propName + "' is required to make '" + componentName + "' accessible" + " for users using assistive technologies such as screen readers");
37579 }
37580
37581 return propType(props, propName, componentName);
37582 };
37583 }
37584
37585 module.exports = exports["default"];
37586
37587/***/ },
37588/* 489 */
37589/***/ function(module, exports, __webpack_require__) {
37590
37591 'use strict';
37592
37593 exports.__esModule = true;
37594
37595 var _createUncontrollable = __webpack_require__(490);
37596
37597 var _createUncontrollable2 = _interopRequireDefault(_createUncontrollable);
37598
37599 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37600
37601 var mixin = {
37602 shouldComponentUpdate: function shouldComponentUpdate() {
37603 //let the forceUpdate trigger the update
37604 return !this._notifying;
37605 }
37606 };
37607
37608 function set(component, propName, handler, value, args) {
37609 if (handler) {
37610 component._notifying = true;
37611 handler.call.apply(handler, [component, value].concat(args));
37612 component._notifying = false;
37613 }
37614
37615 component._values[propName] = value;
37616
37617 if (component.isMounted()) component.forceUpdate();
37618 }
37619
37620 exports.default = (0, _createUncontrollable2.default)([mixin], set);
37621 module.exports = exports['default'];
37622
37623/***/ },
37624/* 490 */
37625/***/ function(module, exports, __webpack_require__) {
37626
37627 'use strict';
37628
37629 exports.__esModule = true;
37630
37631 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
37632
37633 exports.default = createUncontrollable;
37634
37635 var _react = __webpack_require__(89);
37636
37637 var _react2 = _interopRequireDefault(_react);
37638
37639 var _invariant = __webpack_require__(268);
37640
37641 var _invariant2 = _interopRequireDefault(_invariant);
37642
37643 var _utils = __webpack_require__(491);
37644
37645 var utils = _interopRequireWildcard(_utils);
37646
37647 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
37648
37649 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37650
37651 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
37652
37653 function createUncontrollable(mixins, set) {
37654
37655 return uncontrollable;
37656
37657 function uncontrollable(Component, controlledValues) {
37658 var methods = arguments.length <= 2 || arguments[2] === undefined ? [] : arguments[2];
37659
37660 var displayName = Component.displayName || Component.name || 'Component',
37661 basePropTypes = utils.getType(Component).propTypes,
37662 isCompositeComponent = utils.isReactComponent(Component),
37663 propTypes;
37664
37665 propTypes = utils.uncontrolledPropTypes(controlledValues, basePropTypes, displayName);
37666
37667 (0, _invariant2.default)(isCompositeComponent || !methods.length, '[uncontrollable] stateless function components cannot pass through methods ' + 'becasue they have no associated instances. Check component: ' + displayName + ', ' + 'attempting to pass through methods: ' + methods.join(', '));
37668 methods = utils.transform(methods, function (obj, method) {
37669 obj[method] = function () {
37670 var _refs$inner;
37671
37672 return (_refs$inner = this.refs.inner)[method].apply(_refs$inner, arguments);
37673 };
37674 }, {});
37675
37676 var component = _react2.default.createClass(_extends({
37677
37678 displayName: 'Uncontrolled(' + displayName + ')',
37679
37680 mixins: mixins,
37681
37682 propTypes: propTypes
37683
37684 }, methods, {
37685 componentWillMount: function componentWillMount() {
37686 var props = this.props,
37687 keys = Object.keys(controlledValues);
37688
37689 this._values = utils.transform(keys, function (values, key) {
37690 values[key] = props[utils.defaultKey(key)];
37691 }, {});
37692 },
37693
37694
37695 /**
37696 * If a prop switches from controlled to Uncontrolled
37697 * reset its value to the defaultValue
37698 */
37699 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
37700 var _this = this;
37701
37702 var props = this.props,
37703 keys = Object.keys(controlledValues);
37704
37705 keys.forEach(function (key) {
37706 if (utils.getValue(nextProps, key) === undefined && utils.getValue(props, key) !== undefined) {
37707 _this._values[key] = nextProps[utils.defaultKey(key)];
37708 }
37709 });
37710 },
37711 render: function render() {
37712 var _this2 = this;
37713
37714 var newProps = {};
37715 var _props = this.props;
37716 var valueLink = _props.valueLink;
37717 var checkedLink = _props.checkedLink;
37718
37719 var props = _objectWithoutProperties(_props, ['valueLink', 'checkedLink']);
37720
37721 utils.each(controlledValues, function (handle, propName) {
37722 var linkPropName = utils.getLinkName(propName),
37723 prop = _this2.props[propName];
37724
37725 if (linkPropName && !isProp(_this2.props, propName) && isProp(_this2.props, linkPropName)) {
37726 prop = _this2.props[linkPropName].value;
37727 }
37728
37729 newProps[propName] = prop !== undefined ? prop : _this2._values[propName];
37730
37731 newProps[handle] = setAndNotify.bind(_this2, propName);
37732 });
37733
37734 newProps = _extends({}, props, newProps, {
37735 ref: isCompositeComponent ? 'inner' : null
37736 });
37737
37738 return _react2.default.createElement(Component, newProps);
37739 }
37740 }));
37741
37742 component.ControlledComponent = Component;
37743
37744 /**
37745 * useful when wrapping a Component and you want to control
37746 * everything
37747 */
37748 component.deferControlTo = function (newComponent) {
37749 var additions = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
37750 var nextMethods = arguments[2];
37751
37752 return uncontrollable(newComponent, _extends({}, controlledValues, additions), nextMethods);
37753 };
37754
37755 return component;
37756
37757 function setAndNotify(propName, value) {
37758 var linkName = utils.getLinkName(propName),
37759 handler = this.props[controlledValues[propName]];
37760
37761 if (linkName && isProp(this.props, linkName) && !handler) {
37762 handler = this.props[linkName].requestChange;
37763 }
37764
37765 for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
37766 args[_key - 2] = arguments[_key];
37767 }
37768
37769 set(this, propName, handler, value, args);
37770 }
37771
37772 function isProp(props, prop) {
37773 return props[prop] !== undefined;
37774 }
37775 }
37776 }
37777 module.exports = exports['default'];
37778
37779/***/ },
37780/* 491 */
37781/***/ function(module, exports, __webpack_require__) {
37782
37783 'use strict';
37784
37785 exports.__esModule = true;
37786 exports.version = undefined;
37787 exports.customPropType = customPropType;
37788 exports.uncontrolledPropTypes = uncontrolledPropTypes;
37789 exports.getType = getType;
37790 exports.getValue = getValue;
37791 exports.getLinkName = getLinkName;
37792 exports.defaultKey = defaultKey;
37793 exports.chain = chain;
37794 exports.transform = transform;
37795 exports.each = each;
37796 exports.isReactComponent = isReactComponent;
37797 exports.has = has;
37798
37799 var _react = __webpack_require__(89);
37800
37801 var _react2 = _interopRequireDefault(_react);
37802
37803 var _invariant = __webpack_require__(268);
37804
37805 var _invariant2 = _interopRequireDefault(_invariant);
37806
37807 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37808
37809 function customPropType(handler, propType, name) {
37810
37811 return function (props, propName) {
37812
37813 if (props[propName] !== undefined) {
37814 if (!props[handler]) {
37815 return new Error('You have provided a `' + propName + '` prop to ' + '`' + name + '` without an `' + handler + '` handler. This will render a read-only field. ' + 'If the field should be mutable use `' + defaultKey(propName) + '`. Otherwise, set `' + handler + '`');
37816 }
37817
37818 return propType && propType(props, propName, name);
37819 }
37820 };
37821 }
37822
37823 function uncontrolledPropTypes(controlledValues, basePropTypes, displayName) {
37824 var propTypes = {};
37825
37826 if ((undefined) !== 'production' && basePropTypes) {
37827 transform(controlledValues, function (obj, handler, prop) {
37828 var type = basePropTypes[prop];
37829
37830 (0, _invariant2.default)(typeof handler === 'string' && handler.trim().length, 'Uncontrollable - [%s]: the prop `%s` needs a valid handler key name in order to make it uncontrollable', displayName, prop);
37831
37832 obj[prop] = customPropType(handler, type, displayName);
37833
37834 if (type !== undefined) obj[defaultKey(prop)] = type;
37835 }, propTypes);
37836 }
37837
37838 return propTypes;
37839 }
37840
37841 var version = exports.version = _react2.default.version.split('.').map(parseFloat);
37842
37843 function getType(component) {
37844 if (version[0] >= 15 || version[0] === 0 && version[1] >= 13) return component;
37845
37846 return component.type;
37847 }
37848
37849 function getValue(props, name) {
37850 var linkPropName = getLinkName(name);
37851
37852 if (linkPropName && !isProp(props, name) && isProp(props, linkPropName)) return props[linkPropName].value;
37853
37854 return props[name];
37855 }
37856
37857 function isProp(props, prop) {
37858 return props[prop] !== undefined;
37859 }
37860
37861 function getLinkName(name) {
37862 return name === 'value' ? 'valueLink' : name === 'checked' ? 'checkedLink' : null;
37863 }
37864
37865 function defaultKey(key) {
37866 return 'default' + key.charAt(0).toUpperCase() + key.substr(1);
37867 }
37868
37869 function chain(thisArg, a, b) {
37870 return function chainedFunction() {
37871 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
37872 args[_key] = arguments[_key];
37873 }
37874
37875 a && a.call.apply(a, [thisArg].concat(args));
37876 b && b.call.apply(b, [thisArg].concat(args));
37877 };
37878 }
37879
37880 function transform(obj, cb, seed) {
37881 each(obj, cb.bind(null, seed = seed || (Array.isArray(obj) ? [] : {})));
37882 return seed;
37883 }
37884
37885 function each(obj, cb, thisArg) {
37886 if (Array.isArray(obj)) return obj.forEach(cb, thisArg);
37887
37888 for (var key in obj) {
37889 if (has(obj, key)) cb.call(thisArg, obj[key], key, obj);
37890 }
37891 }
37892
37893 /**
37894 * Copyright (c) 2013-present, Facebook, Inc.
37895 * All rights reserved.
37896 *
37897 * This source code is licensed under the BSD-style license found in the
37898 * LICENSE file in the root directory of this source tree. An additional grant
37899 * of patent rights can be found in the PATENTS file in the same directory.
37900 */
37901 function isReactComponent(component) {
37902 return !!(component && component.prototype && component.prototype.isReactComponent);
37903 }
37904
37905 function has(o, k) {
37906 return o ? Object.prototype.hasOwnProperty.call(o, k) : false;
37907 }
37908
37909/***/ },
37910/* 492 */
37911/***/ function(module, exports, __webpack_require__) {
37912
37913 'use strict';
37914
37915 var _interopRequireDefault = __webpack_require__(335)['default'];
37916
37917 exports.__esModule = true;
37918
37919 var _reactPropTypesLibCommon = __webpack_require__(381);
37920
37921 var _childrenToArray = __webpack_require__(493);
37922
37923 var _childrenToArray2 = _interopRequireDefault(_childrenToArray);
37924
37925 exports['default'] = {
37926
37927 requiredRoles: function requiredRoles() {
37928 for (var _len = arguments.length, roles = Array(_len), _key = 0; _key < _len; _key++) {
37929 roles[_key] = arguments[_key];
37930 }
37931
37932 return _reactPropTypesLibCommon.createChainableTypeChecker(function requiredRolesValidator(props, propName, component) {
37933 var missing = undefined;
37934 var children = _childrenToArray2['default'](props.children);
37935
37936 var inRole = function inRole(role, child) {
37937 return role === child.props.bsRole;
37938 };
37939
37940 roles.every(function (role) {
37941 if (!children.some(function (child) {
37942 return inRole(role, child);
37943 })) {
37944 missing = role;
37945 return false;
37946 }
37947 return true;
37948 });
37949
37950 if (missing) {
37951 return new Error('(children) ' + component + ' - Missing a required child with bsRole: ' + missing + '. ' + (component + ' must have at least one child of each of the following bsRoles: ' + roles.join(', ')));
37952 }
37953 });
37954 },
37955
37956 exclusiveRoles: function exclusiveRoles() {
37957 for (var _len2 = arguments.length, roles = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
37958 roles[_key2] = arguments[_key2];
37959 }
37960
37961 return _reactPropTypesLibCommon.createChainableTypeChecker(function exclusiveRolesValidator(props, propName, component) {
37962 var children = _childrenToArray2['default'](props.children);
37963 var duplicate = undefined;
37964
37965 roles.every(function (role) {
37966 var childrenWithRole = children.filter(function (child) {
37967 return child.props.bsRole === role;
37968 });
37969
37970 if (childrenWithRole.length > 1) {
37971 duplicate = role;
37972 return false;
37973 }
37974 return true;
37975 });
37976
37977 if (duplicate) {
37978 return new Error('(children) ' + component + ' - Duplicate children detected of bsRole: ' + duplicate + '. ' + ('Only one child each allowed with the following bsRoles: ' + roles.join(', ')));
37979 }
37980 });
37981 }
37982 };
37983 module.exports = exports['default'];
37984
37985/***/ },
37986/* 493 */
37987/***/ function(module, exports, __webpack_require__) {
37988
37989 'use strict';
37990
37991 var _interopRequireDefault = __webpack_require__(335)['default'];
37992
37993 exports.__esModule = true;
37994 exports['default'] = childrenAsArray;
37995
37996 var _ValidComponentChildren = __webpack_require__(365);
37997
37998 var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
37999
38000 function childrenAsArray(children) {
38001 var result = [];
38002
38003 if (children === undefined) {
38004 return result;
38005 }
38006
38007 _ValidComponentChildren2['default'].forEach(children, function (child) {
38008 result.push(child);
38009 });
38010
38011 return result;
38012 }
38013
38014 module.exports = exports['default'];
38015
38016/***/ },
38017/* 494 */
38018/***/ function(module, exports, __webpack_require__) {
38019
38020 'use strict';
38021
38022 var _inherits = __webpack_require__(372)['default'];
38023
38024 var _classCallCheck = __webpack_require__(379)['default'];
38025
38026 var _objectWithoutProperties = __webpack_require__(355)['default'];
38027
38028 var _extends = __webpack_require__(338)['default'];
38029
38030 var _interopRequireDefault = __webpack_require__(335)['default'];
38031
38032 exports.__esModule = true;
38033
38034 var _classnames = __webpack_require__(356);
38035
38036 var _classnames2 = _interopRequireDefault(_classnames);
38037
38038 var _keycode = __webpack_require__(419);
38039
38040 var _keycode2 = _interopRequireDefault(_keycode);
38041
38042 var _react = __webpack_require__(89);
38043
38044 var _react2 = _interopRequireDefault(_react);
38045
38046 var _reactDom = __webpack_require__(122);
38047
38048 var _reactDom2 = _interopRequireDefault(_reactDom);
38049
38050 var _utilsBootstrapUtils = __webpack_require__(357);
38051
38052 var _utilsCreateChainedFunction = __webpack_require__(414);
38053
38054 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
38055
38056 var _utilsValidComponentChildren = __webpack_require__(365);
38057
38058 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
38059
38060 var _reactOverlaysLibRootCloseWrapper = __webpack_require__(495);
38061
38062 var _reactOverlaysLibRootCloseWrapper2 = _interopRequireDefault(_reactOverlaysLibRootCloseWrapper);
38063
38064 var DropdownMenu = (function (_React$Component) {
38065 _inherits(DropdownMenu, _React$Component);
38066
38067 function DropdownMenu(props) {
38068 _classCallCheck(this, DropdownMenu);
38069
38070 _React$Component.call(this, props);
38071
38072 this.focusNext = this.focusNext.bind(this);
38073 this.focusPrevious = this.focusPrevious.bind(this);
38074 this.getFocusableMenuItems = this.getFocusableMenuItems.bind(this);
38075 this.getItemsAndActiveIndex = this.getItemsAndActiveIndex.bind(this);
38076
38077 this.handleKeyDown = this.handleKeyDown.bind(this);
38078 }
38079
38080 DropdownMenu.prototype.handleKeyDown = function handleKeyDown(event) {
38081 switch (event.keyCode) {
38082 case _keycode2['default'].codes.down:
38083 this.focusNext();
38084 event.preventDefault();
38085 break;
38086 case _keycode2['default'].codes.up:
38087 this.focusPrevious();
38088 event.preventDefault();
38089 break;
38090 case _keycode2['default'].codes.esc:
38091 case _keycode2['default'].codes.tab:
38092 this.props.onClose(event);
38093 break;
38094 default:
38095 }
38096 };
38097
38098 DropdownMenu.prototype.focusNext = function focusNext() {
38099 var _getItemsAndActiveIndex = this.getItemsAndActiveIndex();
38100
38101 var items = _getItemsAndActiveIndex.items;
38102 var activeItemIndex = _getItemsAndActiveIndex.activeItemIndex;
38103
38104 if (items.length === 0) {
38105 return;
38106 }
38107
38108 if (activeItemIndex === items.length - 1) {
38109 items[0].focus();
38110 return;
38111 }
38112
38113 items[activeItemIndex + 1].focus();
38114 };
38115
38116 DropdownMenu.prototype.focusPrevious = function focusPrevious() {
38117 var _getItemsAndActiveIndex2 = this.getItemsAndActiveIndex();
38118
38119 var items = _getItemsAndActiveIndex2.items;
38120 var activeItemIndex = _getItemsAndActiveIndex2.activeItemIndex;
38121
38122 if (activeItemIndex === 0) {
38123 items[items.length - 1].focus();
38124 return;
38125 }
38126
38127 items[activeItemIndex - 1].focus();
38128 };
38129
38130 DropdownMenu.prototype.getItemsAndActiveIndex = function getItemsAndActiveIndex() {
38131 var items = this.getFocusableMenuItems();
38132 var activeElement = document.activeElement;
38133 var activeItemIndex = items.indexOf(activeElement);
38134
38135 return { items: items, activeItemIndex: activeItemIndex };
38136 };
38137
38138 DropdownMenu.prototype.getFocusableMenuItems = function getFocusableMenuItems() {
38139 var menuNode = _reactDom2['default'].findDOMNode(this);
38140
38141 if (menuNode === undefined) {
38142 return [];
38143 }
38144
38145 return [].slice.call(menuNode.querySelectorAll('[tabIndex="-1"]'), 0);
38146 };
38147
38148 DropdownMenu.prototype.render = function render() {
38149 var _classes,
38150 _this = this;
38151
38152 var _props = this.props;
38153 var children = _props.children;
38154 var onSelect = _props.onSelect;
38155 var pullRight = _props.pullRight;
38156 var className = _props.className;
38157 var labelledBy = _props.labelledBy;
38158 var open = _props.open;
38159 var onClose = _props.onClose;
38160
38161 var props = _objectWithoutProperties(_props, ['children', 'onSelect', 'pullRight', 'className', 'labelledBy', 'open', 'onClose']);
38162
38163 var items = _utilsValidComponentChildren2['default'].map(children, function (child) {
38164 var childProps = child.props || {};
38165
38166 return _react2['default'].cloneElement(child, {
38167 onKeyDown: _utilsCreateChainedFunction2['default'](childProps.onKeyDown, _this.handleKeyDown),
38168 onSelect: _utilsCreateChainedFunction2['default'](childProps.onSelect, onSelect)
38169 }, childProps.children);
38170 });
38171
38172 var classes = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props, 'menu')] = true, _classes[_utilsBootstrapUtils.prefix(this.props, 'menu-right')] = pullRight, _classes);
38173
38174 var list = _react2['default'].createElement(
38175 'ul',
38176 _extends({
38177 className: _classnames2['default'](className, classes),
38178 role: 'menu',
38179 'aria-labelledby': labelledBy
38180 }, props),
38181 items
38182 );
38183
38184 if (open) {
38185 list = _react2['default'].createElement(
38186 _reactOverlaysLibRootCloseWrapper2['default'],
38187 { noWrap: true, onRootClose: onClose },
38188 list
38189 );
38190 }
38191
38192 return list;
38193 };
38194
38195 return DropdownMenu;
38196 })(_react2['default'].Component);
38197
38198 DropdownMenu.defaultProps = {
38199 bsRole: 'menu',
38200 bsClass: 'dropdown',
38201 pullRight: false
38202 };
38203
38204 DropdownMenu.propTypes = {
38205 open: _react2['default'].PropTypes.bool,
38206 pullRight: _react2['default'].PropTypes.bool,
38207 onClose: _react2['default'].PropTypes.func,
38208 labelledBy: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
38209 onSelect: _react2['default'].PropTypes.func
38210 };
38211
38212 exports['default'] = DropdownMenu;
38213 module.exports = exports['default'];
38214
38215/***/ },
38216/* 495 */
38217/***/ function(module, exports, __webpack_require__) {
38218
38219 'use strict';
38220
38221 Object.defineProperty(exports, "__esModule", {
38222 value: true
38223 });
38224
38225 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; }; }();
38226
38227 var _contains = __webpack_require__(418);
38228
38229 var _contains2 = _interopRequireDefault(_contains);
38230
38231 var _react = __webpack_require__(89);
38232
38233 var _react2 = _interopRequireDefault(_react);
38234
38235 var _reactDom = __webpack_require__(122);
38236
38237 var _reactDom2 = _interopRequireDefault(_reactDom);
38238
38239 var _addEventListener = __webpack_require__(496);
38240
38241 var _addEventListener2 = _interopRequireDefault(_addEventListener);
38242
38243 var _ownerDocument = __webpack_require__(498);
38244
38245 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
38246
38247 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38248
38249 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
38250
38251 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; }
38252
38253 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; }
38254
38255 function isLeftClickEvent(event) {
38256 return event.button === 0;
38257 }
38258
38259 function isModifiedEvent(event) {
38260 return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
38261 }
38262
38263 var RootCloseWrapper = function (_React$Component) {
38264 _inherits(RootCloseWrapper, _React$Component);
38265
38266 function RootCloseWrapper(props, context) {
38267 _classCallCheck(this, RootCloseWrapper);
38268
38269 var _this = _possibleConstructorReturn(this, (RootCloseWrapper.__proto__ || Object.getPrototypeOf(RootCloseWrapper)).call(this, props, context));
38270
38271 _this.handleMouseCapture = function (e) {
38272 _this.preventMouseRootClose = isModifiedEvent(e) || !isLeftClickEvent(e) || (0, _contains2.default)(_reactDom2.default.findDOMNode(_this), e.target);
38273 };
38274
38275 _this.handleMouse = function () {
38276 if (!_this.preventMouseRootClose && _this.props.onRootClose) {
38277 _this.props.onRootClose();
38278 }
38279 };
38280
38281 _this.handleKeyUp = function (e) {
38282 if (e.keyCode === 27 && _this.props.onRootClose) {
38283 _this.props.onRootClose();
38284 }
38285 };
38286
38287 _this.preventMouseRootClose = false;
38288 return _this;
38289 }
38290
38291 _createClass(RootCloseWrapper, [{
38292 key: 'componentDidMount',
38293 value: function componentDidMount() {
38294 if (!this.props.disabled) {
38295 this.addEventListeners();
38296 }
38297 }
38298 }, {
38299 key: 'componentDidUpdate',
38300 value: function componentDidUpdate(prevProps) {
38301 if (!this.props.disabled && prevProps.disabled) {
38302 this.addEventListeners();
38303 } else if (this.props.disabled && !prevProps.disabled) {
38304 this.removeEventListeners();
38305 }
38306 }
38307 }, {
38308 key: 'componentWillUnmount',
38309 value: function componentWillUnmount() {
38310 if (!this.props.disabled) {
38311 this.removeEventListeners();
38312 }
38313 }
38314 }, {
38315 key: 'addEventListeners',
38316 value: function addEventListeners() {
38317 var event = this.props.event;
38318
38319 var doc = (0, _ownerDocument2.default)(this);
38320
38321 // Use capture for this listener so it fires before React's listener, to
38322 // avoid false positives in the contains() check below if the target DOM
38323 // element is removed in the React mouse callback.
38324 this.documentMouseCaptureListener = (0, _addEventListener2.default)(doc, event, this.handleMouseCapture, true);
38325
38326 this.documentMouseListener = (0, _addEventListener2.default)(doc, event, this.handleMouse);
38327
38328 this.documentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', this.handleKeyUp);
38329 }
38330 }, {
38331 key: 'removeEventListeners',
38332 value: function removeEventListeners() {
38333 if (this.documentMouseCaptureListener) {
38334 this.documentMouseCaptureListener.remove();
38335 }
38336
38337 if (this.documentMouseListener) {
38338 this.documentMouseListener.remove();
38339 }
38340
38341 if (this.documentKeyupListener) {
38342 this.documentKeyupListener.remove();
38343 }
38344 }
38345 }, {
38346 key: 'render',
38347 value: function render() {
38348 return this.props.children;
38349 }
38350 }]);
38351
38352 return RootCloseWrapper;
38353 }(_react2.default.Component);
38354
38355 exports.default = RootCloseWrapper;
38356
38357
38358 RootCloseWrapper.displayName = 'RootCloseWrapper';
38359
38360 RootCloseWrapper.propTypes = {
38361 onRootClose: _react2.default.PropTypes.func,
38362 children: _react2.default.PropTypes.element,
38363
38364 /**
38365 * Disable the the RootCloseWrapper, preventing it from triggering
38366 * `onRootClose`.
38367 */
38368 disabled: _react2.default.PropTypes.bool,
38369 /**
38370 * Choose which document mouse event to bind to
38371 */
38372 event: _react2.default.PropTypes.oneOf(['click', 'mousedown'])
38373 };
38374
38375 RootCloseWrapper.defaultProps = {
38376 event: 'click'
38377 };
38378 module.exports = exports['default'];
38379
38380/***/ },
38381/* 496 */
38382/***/ function(module, exports, __webpack_require__) {
38383
38384 'use strict';
38385
38386 Object.defineProperty(exports, "__esModule", {
38387 value: true
38388 });
38389
38390 exports.default = function (node, event, handler, capture) {
38391 (0, _on2.default)(node, event, handler, capture);
38392
38393 return {
38394 remove: function remove() {
38395 (0, _off2.default)(node, event, handler, capture);
38396 }
38397 };
38398 };
38399
38400 var _on = __webpack_require__(413);
38401
38402 var _on2 = _interopRequireDefault(_on);
38403
38404 var _off = __webpack_require__(497);
38405
38406 var _off2 = _interopRequireDefault(_off);
38407
38408 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38409
38410 module.exports = exports['default'];
38411
38412/***/ },
38413/* 497 */
38414/***/ function(module, exports, __webpack_require__) {
38415
38416 'use strict';
38417 var canUseDOM = __webpack_require__(412);
38418 var off = function off() {};
38419
38420 if (canUseDOM) {
38421
38422 off = (function () {
38423
38424 if (document.addEventListener) return function (node, eventName, handler, capture) {
38425 return node.removeEventListener(eventName, handler, capture || false);
38426 };else if (document.attachEvent) return function (node, eventName, handler) {
38427 return node.detachEvent('on' + eventName, handler);
38428 };
38429 })();
38430 }
38431
38432 module.exports = off;
38433
38434/***/ },
38435/* 498 */
38436/***/ function(module, exports, __webpack_require__) {
38437
38438 'use strict';
38439
38440 Object.defineProperty(exports, "__esModule", {
38441 value: true
38442 });
38443
38444 exports.default = function (componentOrElement) {
38445 return (0, _ownerDocument2.default)(_reactDom2.default.findDOMNode(componentOrElement));
38446 };
38447
38448 var _reactDom = __webpack_require__(122);
38449
38450 var _reactDom2 = _interopRequireDefault(_reactDom);
38451
38452 var _ownerDocument = __webpack_require__(417);
38453
38454 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
38455
38456 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38457
38458 module.exports = exports['default'];
38459
38460/***/ },
38461/* 499 */
38462/***/ function(module, exports, __webpack_require__) {
38463
38464 'use strict';
38465
38466 var _inherits = __webpack_require__(372)['default'];
38467
38468 var _classCallCheck = __webpack_require__(379)['default'];
38469
38470 var _extends = __webpack_require__(338)['default'];
38471
38472 var _interopRequireDefault = __webpack_require__(335)['default'];
38473
38474 exports.__esModule = true;
38475
38476 var _react = __webpack_require__(89);
38477
38478 var _react2 = _interopRequireDefault(_react);
38479
38480 var _classnames = __webpack_require__(356);
38481
38482 var _classnames2 = _interopRequireDefault(_classnames);
38483
38484 var _Button = __webpack_require__(382);
38485
38486 var _Button2 = _interopRequireDefault(_Button);
38487
38488 var _SafeAnchor = __webpack_require__(371);
38489
38490 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
38491
38492 var CARET = _react2['default'].createElement(
38493 'span',
38494 null,
38495 ' ',
38496 _react2['default'].createElement('span', { className: 'caret' })
38497 );
38498
38499 var DropdownToggle = (function (_React$Component) {
38500 _inherits(DropdownToggle, _React$Component);
38501
38502 function DropdownToggle() {
38503 _classCallCheck(this, DropdownToggle);
38504
38505 _React$Component.apply(this, arguments);
38506 }
38507
38508 DropdownToggle.prototype.render = function render() {
38509 var caret = this.props.noCaret ? null : CARET;
38510
38511 var classes = {
38512 'dropdown-toggle': true
38513 };
38514
38515 var Component = this.props.useAnchor ? _SafeAnchor2['default'] : _Button2['default'];
38516
38517 return _react2['default'].createElement(
38518 Component,
38519 _extends({}, this.props, {
38520 className: _classnames2['default'](classes, this.props.className),
38521 role: 'button',
38522 'aria-haspopup': true,
38523 'aria-expanded': this.props.open }),
38524 this.props.children || this.props.title,
38525 caret
38526 );
38527 };
38528
38529 return DropdownToggle;
38530 })(_react2['default'].Component);
38531
38532 exports['default'] = DropdownToggle;
38533
38534 DropdownToggle.defaultProps = {
38535 open: false,
38536 useAnchor: false,
38537 bsRole: 'toggle'
38538 };
38539
38540 DropdownToggle.propTypes = {
38541 bsRole: _react2['default'].PropTypes.string,
38542 noCaret: _react2['default'].PropTypes.bool,
38543 open: _react2['default'].PropTypes.bool,
38544 title: _react2['default'].PropTypes.string,
38545 useAnchor: _react2['default'].PropTypes.bool
38546 };
38547
38548 DropdownToggle.isToggle = true;
38549 DropdownToggle.titleProp = 'title';
38550 DropdownToggle.onClickProp = 'onClick';
38551 module.exports = exports['default'];
38552
38553/***/ },
38554/* 500 */
38555/***/ function(module, exports, __webpack_require__) {
38556
38557 'use strict';
38558
38559 var _inherits = __webpack_require__(372)['default'];
38560
38561 var _classCallCheck = __webpack_require__(379)['default'];
38562
38563 var _extends = __webpack_require__(338)['default'];
38564
38565 var _objectWithoutProperties = __webpack_require__(355)['default'];
38566
38567 var _Object$keys = __webpack_require__(361)['default'];
38568
38569 var _interopRequireDefault = __webpack_require__(335)['default'];
38570
38571 exports.__esModule = true;
38572
38573 var _react = __webpack_require__(89);
38574
38575 var _react2 = _interopRequireDefault(_react);
38576
38577 var _Dropdown = __webpack_require__(415);
38578
38579 var _Dropdown2 = _interopRequireDefault(_Dropdown);
38580
38581 var _lodashCompatObjectOmit = __webpack_require__(473);
38582
38583 var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit);
38584
38585 var _lodashCompatObjectPick = __webpack_require__(501);
38586
38587 var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick);
38588
38589 var _Button = __webpack_require__(382);
38590
38591 var _Button2 = _interopRequireDefault(_Button);
38592
38593 var DropdownButton = (function (_React$Component) {
38594 _inherits(DropdownButton, _React$Component);
38595
38596 function DropdownButton() {
38597 _classCallCheck(this, DropdownButton);
38598
38599 _React$Component.apply(this, arguments);
38600 }
38601
38602 DropdownButton.prototype.render = function render() {
38603 var _props = this.props;
38604 var bsStyle = _props.bsStyle;
38605 var bsSize = _props.bsSize;
38606 var disabled = _props.disabled;
38607 var _props2 = this.props;
38608 var title = _props2.title;
38609 var children = _props2.children;
38610
38611 var props = _objectWithoutProperties(_props2, ['title', 'children']);
38612
38613 var dropdownProps = _lodashCompatObjectPick2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes));
38614 var toggleProps = _lodashCompatObjectOmit2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes));
38615
38616 return _react2['default'].createElement(
38617 _Dropdown2['default'],
38618 _extends({}, dropdownProps, {
38619 bsSize: bsSize,
38620 bsStyle: bsStyle
38621 }),
38622 _react2['default'].createElement(
38623 _Dropdown2['default'].Toggle,
38624 _extends({}, toggleProps, {
38625 disabled: disabled
38626 }),
38627 title
38628 ),
38629 _react2['default'].createElement(
38630 _Dropdown2['default'].Menu,
38631 null,
38632 children
38633 )
38634 );
38635 };
38636
38637 return DropdownButton;
38638 })(_react2['default'].Component);
38639
38640 DropdownButton.propTypes = _extends({
38641 disabled: _react2['default'].PropTypes.bool,
38642 bsStyle: _Button2['default'].propTypes.bsStyle,
38643 bsSize: _Button2['default'].propTypes.bsSize,
38644
38645 /**
38646 * When used with the `title` prop, the noCaret option will not render a caret icon, in the toggle element.
38647 */
38648 noCaret: _react2['default'].PropTypes.bool,
38649 title: _react2['default'].PropTypes.node.isRequired
38650
38651 }, _Dropdown2['default'].propTypes);
38652
38653 DropdownButton.defaultProps = {
38654 disabled: false,
38655 pullRight: false,
38656 dropup: false,
38657 navItem: false,
38658 noCaret: false
38659 };
38660
38661 exports['default'] = DropdownButton;
38662 module.exports = exports['default'];
38663
38664/***/ },
38665/* 501 */
38666/***/ function(module, exports, __webpack_require__) {
38667
38668 var baseFlatten = __webpack_require__(482),
38669 bindCallback = __webpack_require__(467),
38670 pickByArray = __webpack_require__(484),
38671 pickByCallback = __webpack_require__(485),
38672 restParam = __webpack_require__(487);
38673
38674 /**
38675 * Creates an object composed of the picked `object` properties. Property
38676 * names may be specified as individual arguments or as arrays of property
38677 * names. If `predicate` is provided it's invoked for each property of `object`
38678 * picking the properties `predicate` returns truthy for. The predicate is
38679 * bound to `thisArg` and invoked with three arguments: (value, key, object).
38680 *
38681 * @static
38682 * @memberOf _
38683 * @category Object
38684 * @param {Object} object The source object.
38685 * @param {Function|...(string|string[])} [predicate] The function invoked per
38686 * iteration or property names to pick, specified as individual property
38687 * names or arrays of property names.
38688 * @param {*} [thisArg] The `this` binding of `predicate`.
38689 * @returns {Object} Returns the new object.
38690 * @example
38691 *
38692 * var object = { 'user': 'fred', 'age': 40 };
38693 *
38694 * _.pick(object, 'user');
38695 * // => { 'user': 'fred' }
38696 *
38697 * _.pick(object, _.isString);
38698 * // => { 'user': 'fred' }
38699 */
38700 var pick = restParam(function(object, props) {
38701 if (object == null) {
38702 return {};
38703 }
38704 return typeof props[0] == 'function'
38705 ? pickByCallback(object, bindCallback(props[0], props[1], 3))
38706 : pickByArray(object, baseFlatten(props));
38707 });
38708
38709 module.exports = pick;
38710
38711
38712/***/ },
38713/* 502 */
38714/***/ function(module, exports, __webpack_require__) {
38715
38716 'use strict';
38717
38718 var _inherits = __webpack_require__(372)['default'];
38719
38720 var _classCallCheck = __webpack_require__(379)['default'];
38721
38722 var _extends = __webpack_require__(338)['default'];
38723
38724 var _interopRequireDefault = __webpack_require__(335)['default'];
38725
38726 exports.__esModule = true;
38727
38728 var _react = __webpack_require__(89);
38729
38730 var _react2 = _interopRequireDefault(_react);
38731
38732 var _classnames = __webpack_require__(356);
38733
38734 var _classnames2 = _interopRequireDefault(_classnames);
38735
38736 var _reactOverlaysLibTransition = __webpack_require__(410);
38737
38738 var _reactOverlaysLibTransition2 = _interopRequireDefault(_reactOverlaysLibTransition);
38739
38740 var Fade = (function (_React$Component) {
38741 _inherits(Fade, _React$Component);
38742
38743 function Fade() {
38744 _classCallCheck(this, Fade);
38745
38746 _React$Component.apply(this, arguments);
38747 }
38748
38749 // Explicitly copied from Transition for doc generation.
38750 // TODO: Remove duplication once #977 is resolved.
38751
38752 Fade.prototype.render = function render() {
38753 var timeout = this.props.timeout;
38754
38755 return _react2['default'].createElement(
38756 _reactOverlaysLibTransition2['default'],
38757 _extends({}, this.props, {
38758 timeout: timeout,
38759 className: _classnames2['default'](this.props.className, 'fade'),
38760 enteredClassName: 'in',
38761 enteringClassName: 'in'
38762 }),
38763 this.props.children
38764 );
38765 };
38766
38767 return Fade;
38768 })(_react2['default'].Component);
38769
38770 Fade.propTypes = {
38771 /**
38772 * Show the component; triggers the fade in or fade out animation
38773 */
38774 'in': _react2['default'].PropTypes.bool,
38775
38776 /**
38777 * Unmount the component (remove it from the DOM) when it is faded out
38778 */
38779 unmountOnExit: _react2['default'].PropTypes.bool,
38780
38781 /**
38782 * Run the fade in animation when the component mounts, if it is initially
38783 * shown
38784 */
38785 transitionAppear: _react2['default'].PropTypes.bool,
38786
38787 /**
38788 * Duration of the fade animation in milliseconds, to ensure that finishing
38789 * callbacks are fired even if the original browser transition end events are
38790 * canceled
38791 */
38792 timeout: _react2['default'].PropTypes.number,
38793
38794 /**
38795 * Callback fired before the component fades in
38796 */
38797 onEnter: _react2['default'].PropTypes.func,
38798 /**
38799 * Callback fired after the component starts to fade in
38800 */
38801 onEntering: _react2['default'].PropTypes.func,
38802 /**
38803 * Callback fired after the has component faded in
38804 */
38805 onEntered: _react2['default'].PropTypes.func,
38806 /**
38807 * Callback fired before the component fades out
38808 */
38809 onExit: _react2['default'].PropTypes.func,
38810 /**
38811 * Callback fired after the component starts to fade out
38812 */
38813 onExiting: _react2['default'].PropTypes.func,
38814 /**
38815 * Callback fired after the component has faded out
38816 */
38817 onExited: _react2['default'].PropTypes.func
38818 };
38819
38820 Fade.defaultProps = {
38821 'in': false,
38822 timeout: 300,
38823 unmountOnExit: false,
38824 transitionAppear: false
38825 };
38826
38827 exports['default'] = Fade;
38828 module.exports = exports['default'];
38829
38830/***/ },
38831/* 503 */
38832/***/ function(module, exports, __webpack_require__) {
38833
38834 'use strict';
38835
38836 var _inherits = __webpack_require__(372)['default'];
38837
38838 var _classCallCheck = __webpack_require__(379)['default'];
38839
38840 var _objectWithoutProperties = __webpack_require__(355)['default'];
38841
38842 var _extends = __webpack_require__(338)['default'];
38843
38844 var _interopRequireDefault = __webpack_require__(335)['default'];
38845
38846 exports.__esModule = true;
38847
38848 var _classnames = __webpack_require__(356);
38849
38850 var _classnames2 = _interopRequireDefault(_classnames);
38851
38852 var _react = __webpack_require__(89);
38853
38854 var _react2 = _interopRequireDefault(_react);
38855
38856 var _reactPropTypesLibElementType = __webpack_require__(380);
38857
38858 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
38859
38860 var _utilsBootstrapUtils = __webpack_require__(357);
38861
38862 var propTypes = {
38863 horizontal: _react2['default'].PropTypes.bool,
38864 inline: _react2['default'].PropTypes.bool,
38865 componentClass: _reactPropTypesLibElementType2['default']
38866 };
38867
38868 var defaultProps = {
38869 horizontal: false,
38870 inline: false,
38871 componentClass: 'form'
38872 };
38873
38874 var Form = (function (_React$Component) {
38875 _inherits(Form, _React$Component);
38876
38877 function Form() {
38878 _classCallCheck(this, Form);
38879
38880 _React$Component.apply(this, arguments);
38881 }
38882
38883 Form.prototype.render = function render() {
38884 var _props = this.props;
38885 var horizontal = _props.horizontal;
38886 var inline = _props.inline;
38887 var Component = _props.componentClass;
38888 var className = _props.className;
38889
38890 var props = _objectWithoutProperties(_props, ['horizontal', 'inline', 'componentClass', 'className']);
38891
38892 delete props.bsClass;
38893
38894 var classes = [];
38895 if (horizontal) {
38896 classes.push(_utilsBootstrapUtils.prefix(this.props, 'horizontal'));
38897 }
38898 if (inline) {
38899 classes.push(_utilsBootstrapUtils.prefix(this.props, 'inline'));
38900 }
38901
38902 return _react2['default'].createElement(Component, _extends({}, props, { className: _classnames2['default'](className, classes) }));
38903 };
38904
38905 return Form;
38906 })(_react2['default'].Component);
38907
38908 Form.propTypes = propTypes;
38909 Form.defaultProps = defaultProps;
38910
38911 exports['default'] = _utilsBootstrapUtils.bsClass('form', Form);
38912 module.exports = exports['default'];
38913
38914/***/ },
38915/* 504 */
38916/***/ function(module, exports, __webpack_require__) {
38917
38918 'use strict';
38919
38920 var _inherits = __webpack_require__(372)['default'];
38921
38922 var _classCallCheck = __webpack_require__(379)['default'];
38923
38924 var _objectWithoutProperties = __webpack_require__(355)['default'];
38925
38926 var _extends = __webpack_require__(338)['default'];
38927
38928 var _interopRequireDefault = __webpack_require__(335)['default'];
38929
38930 exports.__esModule = true;
38931
38932 var _classnames = __webpack_require__(356);
38933
38934 var _classnames2 = _interopRequireDefault(_classnames);
38935
38936 var _react = __webpack_require__(89);
38937
38938 var _react2 = _interopRequireDefault(_react);
38939
38940 var _reactPropTypesLibElementType = __webpack_require__(380);
38941
38942 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
38943
38944 var _warning = __webpack_require__(271);
38945
38946 var _warning2 = _interopRequireDefault(_warning);
38947
38948 var _utilsBootstrapUtils = __webpack_require__(357);
38949
38950 var _FormControlFeedback = __webpack_require__(505);
38951
38952 var _FormControlFeedback2 = _interopRequireDefault(_FormControlFeedback);
38953
38954 var _FormControlStatic = __webpack_require__(506);
38955
38956 var _FormControlStatic2 = _interopRequireDefault(_FormControlStatic);
38957
38958 var propTypes = {
38959 componentClass: _reactPropTypesLibElementType2['default'],
38960 /**
38961 * Only relevant if `componentClass` is `'input'`.
38962 */
38963 type: _react2['default'].PropTypes.string,
38964 /**
38965 * Uses `controlId` from `<FormGroup>` if not explicitly specified.
38966 */
38967 id: _react2['default'].PropTypes.string
38968 };
38969
38970 var defaultProps = {
38971 componentClass: 'input'
38972 };
38973
38974 var contextTypes = {
38975 $bs_formGroup: _react2['default'].PropTypes.object
38976 };
38977
38978 var FormControl = (function (_React$Component) {
38979 _inherits(FormControl, _React$Component);
38980
38981 function FormControl() {
38982 _classCallCheck(this, FormControl);
38983
38984 _React$Component.apply(this, arguments);
38985 }
38986
38987 FormControl.prototype.render = function render() {
38988 var formGroup = this.context.$bs_formGroup;
38989 var controlId = formGroup && formGroup.controlId;
38990
38991 var _props = this.props;
38992 var Component = _props.componentClass;
38993 var type = _props.type;
38994 var _props$id = _props.id;
38995 var id = _props$id === undefined ? controlId : _props$id;
38996 var className = _props.className;
38997
38998 var props = _objectWithoutProperties(_props, ['componentClass', 'type', 'id', 'className']);
38999
39000 (undefined) !== 'production' ? _warning2['default'](controlId == null || id === controlId, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : undefined;
39001
39002 delete props.bsClass;
39003
39004 // input[type="file"] should not have .form-control.
39005 var classes = undefined;
39006 if (type !== 'file') {
39007 classes = _utilsBootstrapUtils.getClassSet(this.props);
39008 }
39009
39010 return _react2['default'].createElement(Component, _extends({}, props, {
39011 type: type,
39012 id: id,
39013 className: _classnames2['default'](className, classes)
39014 }));
39015 };
39016
39017 return FormControl;
39018 })(_react2['default'].Component);
39019
39020 FormControl.propTypes = propTypes;
39021 FormControl.defaultProps = defaultProps;
39022 FormControl.contextTypes = contextTypes;
39023
39024 FormControl.Feedback = _FormControlFeedback2['default'];
39025 FormControl.Static = _FormControlStatic2['default'];
39026
39027 exports['default'] = _utilsBootstrapUtils.bsClass('form-control', FormControl);
39028 module.exports = exports['default'];
39029
39030/***/ },
39031/* 505 */
39032/***/ function(module, exports, __webpack_require__) {
39033
39034 'use strict';
39035
39036 var _inherits = __webpack_require__(372)['default'];
39037
39038 var _classCallCheck = __webpack_require__(379)['default'];
39039
39040 var _extends = __webpack_require__(338)['default'];
39041
39042 var _objectWithoutProperties = __webpack_require__(355)['default'];
39043
39044 var _interopRequireDefault = __webpack_require__(335)['default'];
39045
39046 exports.__esModule = true;
39047
39048 var _classnames = __webpack_require__(356);
39049
39050 var _classnames2 = _interopRequireDefault(_classnames);
39051
39052 var _react = __webpack_require__(89);
39053
39054 var _react2 = _interopRequireDefault(_react);
39055
39056 var _utilsBootstrapUtils = __webpack_require__(357);
39057
39058 var _Glyphicon = __webpack_require__(388);
39059
39060 var _Glyphicon2 = _interopRequireDefault(_Glyphicon);
39061
39062 var defaultProps = {
39063 bsRole: 'feedback'
39064 };
39065
39066 var contextTypes = {
39067 $bs_formGroup: _react2['default'].PropTypes.object
39068 };
39069
39070 var FormControlFeedback = (function (_React$Component) {
39071 _inherits(FormControlFeedback, _React$Component);
39072
39073 function FormControlFeedback() {
39074 _classCallCheck(this, FormControlFeedback);
39075
39076 _React$Component.apply(this, arguments);
39077 }
39078
39079 FormControlFeedback.prototype.getGlyph = function getGlyph(validationState) {
39080 switch (validationState) {
39081 case 'success':
39082 return 'ok';
39083 case 'warning':
39084 return 'warning-sign';
39085 case 'error':
39086 return 'remove';
39087 default:
39088 return null;
39089 }
39090 };
39091
39092 FormControlFeedback.prototype.renderDefaultFeedback = function renderDefaultFeedback(formGroup, className, classes, props) {
39093 var glyph = this.getGlyph(formGroup && formGroup.validationState);
39094 if (!glyph) {
39095 return null;
39096 }
39097
39098 return _react2['default'].createElement(_Glyphicon2['default'], _extends({}, props, {
39099 glyph: glyph,
39100 className: _classnames2['default'](className, classes)
39101 }));
39102 };
39103
39104 FormControlFeedback.prototype.render = function render() {
39105 var _props = this.props;
39106 var className = _props.className;
39107 var children = _props.children;
39108
39109 var props = _objectWithoutProperties(_props, ['className', 'children']);
39110
39111 delete props.bsClass;
39112
39113 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39114
39115 if (!children) {
39116 return this.renderDefaultFeedback(this.context.$bs_formGroup, className, classes, props);
39117 }
39118
39119 var child = _react2['default'].Children.only(children);
39120 return _react2['default'].cloneElement(child, _extends({}, props, {
39121 className: _classnames2['default'](child.props.className, className, classes)
39122 }));
39123 };
39124
39125 return FormControlFeedback;
39126 })(_react2['default'].Component);
39127
39128 FormControlFeedback.defaultProps = defaultProps;
39129 FormControlFeedback.contextTypes = contextTypes;
39130
39131 exports['default'] = _utilsBootstrapUtils.bsClass('form-control-feedback', FormControlFeedback);
39132 module.exports = exports['default'];
39133
39134/***/ },
39135/* 506 */
39136/***/ function(module, exports, __webpack_require__) {
39137
39138 'use strict';
39139
39140 var _inherits = __webpack_require__(372)['default'];
39141
39142 var _classCallCheck = __webpack_require__(379)['default'];
39143
39144 var _objectWithoutProperties = __webpack_require__(355)['default'];
39145
39146 var _extends = __webpack_require__(338)['default'];
39147
39148 var _interopRequireDefault = __webpack_require__(335)['default'];
39149
39150 exports.__esModule = true;
39151
39152 var _classnames = __webpack_require__(356);
39153
39154 var _classnames2 = _interopRequireDefault(_classnames);
39155
39156 var _react = __webpack_require__(89);
39157
39158 var _react2 = _interopRequireDefault(_react);
39159
39160 var _reactPropTypesLibElementType = __webpack_require__(380);
39161
39162 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
39163
39164 var _utilsBootstrapUtils = __webpack_require__(357);
39165
39166 var propTypes = {
39167 componentClass: _reactPropTypesLibElementType2['default']
39168 };
39169
39170 var defaultProps = {
39171 componentClass: 'p'
39172 };
39173
39174 var FormControlStatic = (function (_React$Component) {
39175 _inherits(FormControlStatic, _React$Component);
39176
39177 function FormControlStatic() {
39178 _classCallCheck(this, FormControlStatic);
39179
39180 _React$Component.apply(this, arguments);
39181 }
39182
39183 FormControlStatic.prototype.render = function render() {
39184 var _props = this.props;
39185 var Component = _props.componentClass;
39186 var className = _props.className;
39187
39188 var props = _objectWithoutProperties(_props, ['componentClass', 'className']);
39189
39190 delete props.bsClass;
39191
39192 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39193
39194 return _react2['default'].createElement(Component, _extends({}, props, { className: _classnames2['default'](className, classes) }));
39195 };
39196
39197 return FormControlStatic;
39198 })(_react2['default'].Component);
39199
39200 FormControlStatic.propTypes = propTypes;
39201 FormControlStatic.defaultProps = defaultProps;
39202
39203 exports['default'] = _utilsBootstrapUtils.bsClass('form-control-static', FormControlStatic);
39204 module.exports = exports['default'];
39205
39206/***/ },
39207/* 507 */
39208/***/ function(module, exports, __webpack_require__) {
39209
39210 'use strict';
39211
39212 var _extends = __webpack_require__(338)['default'];
39213
39214 var _interopRequireDefault = __webpack_require__(335)['default'];
39215
39216 exports.__esModule = true;
39217
39218 var _react = __webpack_require__(89);
39219
39220 var _react2 = _interopRequireDefault(_react);
39221
39222 var _classnames = __webpack_require__(356);
39223
39224 var _classnames2 = _interopRequireDefault(_classnames);
39225
39226 var _reactPropTypesLibElementType = __webpack_require__(380);
39227
39228 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
39229
39230 var Grid = _react2['default'].createClass({
39231 displayName: 'Grid',
39232
39233 propTypes: {
39234 /**
39235 * Turn any fixed-width grid layout into a full-width layout by this property.
39236 *
39237 * Adds `container-fluid` class.
39238 */
39239 fluid: _react2['default'].PropTypes.bool,
39240 /**
39241 * You can use a custom element for this component
39242 */
39243 componentClass: _reactPropTypesLibElementType2['default']
39244 },
39245
39246 getDefaultProps: function getDefaultProps() {
39247 return {
39248 componentClass: 'div',
39249 fluid: false
39250 };
39251 },
39252
39253 render: function render() {
39254 var ComponentClass = this.props.componentClass;
39255 var className = this.props.fluid ? 'container-fluid' : 'container';
39256
39257 return _react2['default'].createElement(
39258 ComponentClass,
39259 _extends({}, this.props, {
39260 className: _classnames2['default'](this.props.className, className) }),
39261 this.props.children
39262 );
39263 }
39264 });
39265
39266 exports['default'] = Grid;
39267 module.exports = exports['default'];
39268
39269/***/ },
39270/* 508 */
39271/***/ function(module, exports, __webpack_require__) {
39272
39273 'use strict';
39274
39275 var _inherits = __webpack_require__(372)['default'];
39276
39277 var _classCallCheck = __webpack_require__(379)['default'];
39278
39279 var _objectWithoutProperties = __webpack_require__(355)['default'];
39280
39281 var _extends = __webpack_require__(338)['default'];
39282
39283 var _interopRequireDefault = __webpack_require__(335)['default'];
39284
39285 exports.__esModule = true;
39286
39287 var _classnames = __webpack_require__(356);
39288
39289 var _classnames2 = _interopRequireDefault(_classnames);
39290
39291 var _react = __webpack_require__(89);
39292
39293 var _react2 = _interopRequireDefault(_react);
39294
39295 var _utilsBootstrapUtils = __webpack_require__(357);
39296
39297 var HelpBlock = (function (_React$Component) {
39298 _inherits(HelpBlock, _React$Component);
39299
39300 function HelpBlock() {
39301 _classCallCheck(this, HelpBlock);
39302
39303 _React$Component.apply(this, arguments);
39304 }
39305
39306 HelpBlock.prototype.render = function render() {
39307 var _props = this.props;
39308 var className = _props.className;
39309
39310 var props = _objectWithoutProperties(_props, ['className']);
39311
39312 delete props.bsClass;
39313
39314 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39315
39316 return _react2['default'].createElement('span', _extends({}, props, { className: _classnames2['default'](className, classes) }));
39317 };
39318
39319 return HelpBlock;
39320 })(_react2['default'].Component);
39321
39322 exports['default'] = _utilsBootstrapUtils.bsClass('help-block', HelpBlock);
39323 module.exports = exports['default'];
39324
39325/***/ },
39326/* 509 */
39327/***/ function(module, exports, __webpack_require__) {
39328
39329 'use strict';
39330
39331 var _extends = __webpack_require__(338)['default'];
39332
39333 var _interopRequireDefault = __webpack_require__(335)['default'];
39334
39335 exports.__esModule = true;
39336
39337 var _react = __webpack_require__(89);
39338
39339 var _react2 = _interopRequireDefault(_react);
39340
39341 var _classnames = __webpack_require__(356);
39342
39343 var _classnames2 = _interopRequireDefault(_classnames);
39344
39345 var Image = _react2['default'].createClass({
39346 displayName: 'Image',
39347
39348 propTypes: {
39349
39350 /**
39351 * Sets image as responsive image
39352 */
39353 responsive: _react2['default'].PropTypes.bool,
39354
39355 /**
39356 * Sets image shape as rounded
39357 */
39358 rounded: _react2['default'].PropTypes.bool,
39359
39360 /**
39361 * Sets image shape as circle
39362 */
39363 circle: _react2['default'].PropTypes.bool,
39364
39365 /**
39366 * Sets image shape as thumbnail
39367 */
39368 thumbnail: _react2['default'].PropTypes.bool
39369 },
39370
39371 getDefaultProps: function getDefaultProps() {
39372 return {
39373 responsive: false,
39374 rounded: false,
39375 circle: false,
39376 thumbnail: false
39377 };
39378 },
39379
39380 render: function render() {
39381 var classes = {
39382 'img-responsive': this.props.responsive,
39383 'img-rounded': this.props.rounded,
39384 'img-circle': this.props.circle,
39385 'img-thumbnail': this.props.thumbnail
39386 };
39387
39388 return _react2['default'].createElement('img', _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }));
39389 }
39390 });
39391
39392 exports['default'] = Image;
39393 module.exports = exports['default'];
39394
39395/***/ },
39396/* 510 */
39397/***/ function(module, exports, __webpack_require__) {
39398
39399 'use strict';
39400
39401 var _inherits = __webpack_require__(372)['default'];
39402
39403 var _classCallCheck = __webpack_require__(379)['default'];
39404
39405 var _interopRequireDefault = __webpack_require__(335)['default'];
39406
39407 var _interopRequireWildcard = __webpack_require__(336)['default'];
39408
39409 exports.__esModule = true;
39410
39411 var _react = __webpack_require__(89);
39412
39413 var _react2 = _interopRequireDefault(_react);
39414
39415 var _FormControls = __webpack_require__(511);
39416
39417 var FormControls = _interopRequireWildcard(_FormControls);
39418
39419 var _InputBase2 = __webpack_require__(387);
39420
39421 var _InputBase3 = _interopRequireDefault(_InputBase2);
39422
39423 var _utilsDeprecationWarning = __webpack_require__(391);
39424
39425 var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning);
39426
39427 var Input = (function (_InputBase) {
39428 _inherits(Input, _InputBase);
39429
39430 function Input() {
39431 _classCallCheck(this, Input);
39432
39433 _InputBase.apply(this, arguments);
39434 }
39435
39436 Input.prototype.render = function render() {
39437 if (this.props.type === 'static') {
39438 _utilsDeprecationWarning2['default']('Input type=static', 'FormControls.Static');
39439 return _react2['default'].createElement(FormControls.Static, this.props);
39440 }
39441
39442 return _InputBase.prototype.render.call(this);
39443 };
39444
39445 return Input;
39446 })(_InputBase3['default']);
39447
39448 Input.propTypes = {
39449 type: _react2['default'].PropTypes.string
39450 };
39451
39452 exports['default'] = _utilsDeprecationWarning2['default'].wrapper(Input, '`<Input>`', '`<FormControl>`, `<Checkbox>`, or `<Radio>`, with `<FormGroup>` and/or ' + '`<InputGroup>` as needed');
39453 module.exports = exports['default'];
39454
39455/***/ },
39456/* 511 */
39457/***/ function(module, exports, __webpack_require__) {
39458
39459 'use strict';
39460
39461 var _interopRequireDefault = __webpack_require__(335)['default'];
39462
39463 exports.__esModule = true;
39464
39465 var _Static2 = __webpack_require__(512);
39466
39467 var _Static3 = _interopRequireDefault(_Static2);
39468
39469 exports.Static = _Static3['default'];
39470
39471/***/ },
39472/* 512 */
39473/***/ function(module, exports, __webpack_require__) {
39474
39475 'use strict';
39476
39477 var _inherits = __webpack_require__(372)['default'];
39478
39479 var _classCallCheck = __webpack_require__(379)['default'];
39480
39481 var _objectWithoutProperties = __webpack_require__(355)['default'];
39482
39483 var _extends = __webpack_require__(338)['default'];
39484
39485 var _interopRequireDefault = __webpack_require__(335)['default'];
39486
39487 exports.__esModule = true;
39488
39489 var _classnames = __webpack_require__(356);
39490
39491 var _classnames2 = _interopRequireDefault(_classnames);
39492
39493 var _react = __webpack_require__(89);
39494
39495 var _react2 = _interopRequireDefault(_react);
39496
39497 var _reactPropTypesLibElementType = __webpack_require__(380);
39498
39499 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
39500
39501 var _InputBase2 = __webpack_require__(387);
39502
39503 var _InputBase3 = _interopRequireDefault(_InputBase2);
39504
39505 var _utilsChildrenValueInputValidation = __webpack_require__(389);
39506
39507 var _utilsChildrenValueInputValidation2 = _interopRequireDefault(_utilsChildrenValueInputValidation);
39508
39509 var _utilsDeprecationWarning = __webpack_require__(391);
39510
39511 var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning);
39512
39513 var Static = (function (_InputBase) {
39514 _inherits(Static, _InputBase);
39515
39516 function Static() {
39517 _classCallCheck(this, Static);
39518
39519 _InputBase.apply(this, arguments);
39520 }
39521
39522 Static.prototype.getValue = function getValue() {
39523 var _props = this.props;
39524 var children = _props.children;
39525 var value = _props.value;
39526
39527 return children ? children : value;
39528 };
39529
39530 Static.prototype.renderInput = function renderInput() {
39531 var _props2 = this.props;
39532 var ComponentClass = _props2.componentClass;
39533
39534 var props = _objectWithoutProperties(_props2, ['componentClass']);
39535
39536 return _react2['default'].createElement(
39537 ComponentClass,
39538 _extends({}, props, { className: _classnames2['default'](props.className, 'form-control-static'), ref: 'input', key: 'input' }),
39539 this.getValue()
39540 );
39541 };
39542
39543 return Static;
39544 })(_InputBase3['default']);
39545
39546 Static.propTypes = {
39547 value: _utilsChildrenValueInputValidation2['default'],
39548 /**
39549 * You can override the default 'p' with a custom element
39550 */
39551 componentClass: _reactPropTypesLibElementType2['default'],
39552 children: _utilsChildrenValueInputValidation2['default']
39553 };
39554
39555 Static.defaultProps = {
39556 componentClass: 'p'
39557 };
39558
39559 exports['default'] = _utilsDeprecationWarning2['default'].wrapper(Static, '`<FormControls.Static>`', '`<FormControl.Static>`');
39560 module.exports = exports['default'];
39561
39562/***/ },
39563/* 513 */
39564/***/ function(module, exports, __webpack_require__) {
39565
39566 'use strict';
39567
39568 var _inherits = __webpack_require__(372)['default'];
39569
39570 var _classCallCheck = __webpack_require__(379)['default'];
39571
39572 var _objectWithoutProperties = __webpack_require__(355)['default'];
39573
39574 var _extends = __webpack_require__(338)['default'];
39575
39576 var _interopRequireDefault = __webpack_require__(335)['default'];
39577
39578 exports.__esModule = true;
39579
39580 var _classnames = __webpack_require__(356);
39581
39582 var _classnames2 = _interopRequireDefault(_classnames);
39583
39584 var _react = __webpack_require__(89);
39585
39586 var _react2 = _interopRequireDefault(_react);
39587
39588 var _styleMaps = __webpack_require__(358);
39589
39590 var _utilsBootstrapUtils = __webpack_require__(357);
39591
39592 var _InputGroupAddon = __webpack_require__(514);
39593
39594 var _InputGroupAddon2 = _interopRequireDefault(_InputGroupAddon);
39595
39596 var _InputGroupButton = __webpack_require__(515);
39597
39598 var _InputGroupButton2 = _interopRequireDefault(_InputGroupButton);
39599
39600 var InputGroup = (function (_React$Component) {
39601 _inherits(InputGroup, _React$Component);
39602
39603 function InputGroup() {
39604 _classCallCheck(this, InputGroup);
39605
39606 _React$Component.apply(this, arguments);
39607 }
39608
39609 InputGroup.prototype.render = function render() {
39610 var _props = this.props;
39611 var className = _props.className;
39612
39613 var props = _objectWithoutProperties(_props, ['className']);
39614
39615 delete props.bsClass;
39616 delete props.bsSize;
39617
39618 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39619
39620 return _react2['default'].createElement('span', _extends({}, props, { className: _classnames2['default'](className, classes) }));
39621 };
39622
39623 return InputGroup;
39624 })(_react2['default'].Component);
39625
39626 InputGroup.Addon = _InputGroupAddon2['default'];
39627 InputGroup.Button = _InputGroupButton2['default'];
39628
39629 exports['default'] = _utilsBootstrapUtils.bsClass('input-group', _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], InputGroup));
39630 module.exports = exports['default'];
39631
39632/***/ },
39633/* 514 */
39634/***/ function(module, exports, __webpack_require__) {
39635
39636 'use strict';
39637
39638 var _inherits = __webpack_require__(372)['default'];
39639
39640 var _classCallCheck = __webpack_require__(379)['default'];
39641
39642 var _objectWithoutProperties = __webpack_require__(355)['default'];
39643
39644 var _extends = __webpack_require__(338)['default'];
39645
39646 var _interopRequireDefault = __webpack_require__(335)['default'];
39647
39648 exports.__esModule = true;
39649
39650 var _classnames = __webpack_require__(356);
39651
39652 var _classnames2 = _interopRequireDefault(_classnames);
39653
39654 var _react = __webpack_require__(89);
39655
39656 var _react2 = _interopRequireDefault(_react);
39657
39658 var _utilsBootstrapUtils = __webpack_require__(357);
39659
39660 var InputGroupAddon = (function (_React$Component) {
39661 _inherits(InputGroupAddon, _React$Component);
39662
39663 function InputGroupAddon() {
39664 _classCallCheck(this, InputGroupAddon);
39665
39666 _React$Component.apply(this, arguments);
39667 }
39668
39669 InputGroupAddon.prototype.render = function render() {
39670 var _props = this.props;
39671 var className = _props.className;
39672
39673 var props = _objectWithoutProperties(_props, ['className']);
39674
39675 delete props.bsClass;
39676
39677 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39678
39679 return _react2['default'].createElement('span', _extends({}, props, { className: _classnames2['default'](className, classes) }));
39680 };
39681
39682 return InputGroupAddon;
39683 })(_react2['default'].Component);
39684
39685 exports['default'] = _utilsBootstrapUtils.bsClass('input-group-addon', InputGroupAddon);
39686 module.exports = exports['default'];
39687
39688/***/ },
39689/* 515 */
39690/***/ function(module, exports, __webpack_require__) {
39691
39692 'use strict';
39693
39694 var _inherits = __webpack_require__(372)['default'];
39695
39696 var _classCallCheck = __webpack_require__(379)['default'];
39697
39698 var _objectWithoutProperties = __webpack_require__(355)['default'];
39699
39700 var _extends = __webpack_require__(338)['default'];
39701
39702 var _interopRequireDefault = __webpack_require__(335)['default'];
39703
39704 exports.__esModule = true;
39705
39706 var _classnames = __webpack_require__(356);
39707
39708 var _classnames2 = _interopRequireDefault(_classnames);
39709
39710 var _react = __webpack_require__(89);
39711
39712 var _react2 = _interopRequireDefault(_react);
39713
39714 var _utilsBootstrapUtils = __webpack_require__(357);
39715
39716 var InputGroupButton = (function (_React$Component) {
39717 _inherits(InputGroupButton, _React$Component);
39718
39719 function InputGroupButton() {
39720 _classCallCheck(this, InputGroupButton);
39721
39722 _React$Component.apply(this, arguments);
39723 }
39724
39725 InputGroupButton.prototype.render = function render() {
39726 var _props = this.props;
39727 var className = _props.className;
39728
39729 var props = _objectWithoutProperties(_props, ['className']);
39730
39731 delete props.bsClass;
39732
39733 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39734
39735 return _react2['default'].createElement('span', _extends({}, props, { className: _classnames2['default'](className, classes) }));
39736 };
39737
39738 return InputGroupButton;
39739 })(_react2['default'].Component);
39740
39741 exports['default'] = _utilsBootstrapUtils.bsClass('input-group-btn', InputGroupButton);
39742 module.exports = exports['default'];
39743
39744/***/ },
39745/* 516 */
39746/***/ function(module, exports, __webpack_require__) {
39747
39748 // https://www.npmjs.org/package/react-interpolate-component
39749 // TODO: Drop this in favor of es6 string interpolation
39750
39751 'use strict';
39752
39753 var _extends = __webpack_require__(338)['default'];
39754
39755 var _Object$assign = __webpack_require__(339)['default'];
39756
39757 var _interopRequireDefault = __webpack_require__(335)['default'];
39758
39759 exports.__esModule = true;
39760
39761 var _react = __webpack_require__(89);
39762
39763 var _react2 = _interopRequireDefault(_react);
39764
39765 var _utilsValidComponentChildren = __webpack_require__(365);
39766
39767 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
39768
39769 var REGEXP = /\%\((.+?)\)s/;
39770
39771 var Interpolate = _react2['default'].createClass({
39772 displayName: 'Interpolate',
39773
39774 propTypes: {
39775 component: _react2['default'].PropTypes.node,
39776 format: _react2['default'].PropTypes.string,
39777 unsafe: _react2['default'].PropTypes.bool
39778 },
39779
39780 getDefaultProps: function getDefaultProps() {
39781 return {
39782 component: 'span',
39783 unsafe: false
39784 };
39785 },
39786
39787 render: function render() {
39788 var format = _utilsValidComponentChildren2['default'].count(this.props.children) > 0 || typeof this.props.children === 'string' ? this.props.children : this.props.format;
39789 var parent = this.props.component;
39790 var unsafe = this.props.unsafe === true;
39791 var props = _extends({}, this.props);
39792
39793 delete props.children;
39794 delete props.format;
39795 delete props.component;
39796 delete props.unsafe;
39797
39798 if (unsafe) {
39799 var content = format.split(REGEXP).reduce(function (memo, match, index) {
39800 var html = undefined;
39801
39802 if (index % 2 === 0) {
39803 html = match;
39804 } else {
39805 html = props[match];
39806 delete props[match];
39807 }
39808
39809 if (_react2['default'].isValidElement(html)) {
39810 throw new Error('cannot interpolate a React component into unsafe text');
39811 }
39812
39813 memo += html;
39814
39815 return memo;
39816 }, '');
39817
39818 props.dangerouslySetInnerHTML = { __html: content };
39819
39820 return _react2['default'].createElement(parent, props);
39821 }
39822 var kids = format.split(REGEXP).reduce(function (memo, match, index) {
39823 var child = undefined;
39824
39825 if (index % 2 === 0) {
39826 if (match.length === 0) {
39827 return memo;
39828 }
39829
39830 child = match;
39831 } else {
39832 child = props[match];
39833 delete props[match];
39834 }
39835
39836 memo.push(child);
39837
39838 return memo;
39839 }, []);
39840
39841 return _react2['default'].createElement(parent, props, kids);
39842 }
39843 });
39844
39845 _Object$assign(Interpolate, { REGEXP: REGEXP });
39846
39847 exports['default'] = Interpolate;
39848 module.exports = exports['default'];
39849
39850/***/ },
39851/* 517 */
39852/***/ function(module, exports, __webpack_require__) {
39853
39854 'use strict';
39855
39856 var _extends = __webpack_require__(338)['default'];
39857
39858 var _interopRequireDefault = __webpack_require__(335)['default'];
39859
39860 exports.__esModule = true;
39861
39862 var _react = __webpack_require__(89);
39863
39864 var _react2 = _interopRequireDefault(_react);
39865
39866 var _classnames = __webpack_require__(356);
39867
39868 var _classnames2 = _interopRequireDefault(_classnames);
39869
39870 var _reactPropTypesLibElementType = __webpack_require__(380);
39871
39872 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
39873
39874 var Jumbotron = _react2['default'].createClass({
39875 displayName: 'Jumbotron',
39876
39877 propTypes: {
39878 /**
39879 * You can use a custom element for this component
39880 */
39881 componentClass: _reactPropTypesLibElementType2['default']
39882 },
39883
39884 getDefaultProps: function getDefaultProps() {
39885 return { componentClass: 'div' };
39886 },
39887
39888 render: function render() {
39889 var ComponentClass = this.props.componentClass;
39890
39891 return _react2['default'].createElement(
39892 ComponentClass,
39893 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'jumbotron') }),
39894 this.props.children
39895 );
39896 }
39897 });
39898
39899 exports['default'] = Jumbotron;
39900 module.exports = exports['default'];
39901
39902/***/ },
39903/* 518 */
39904/***/ function(module, exports, __webpack_require__) {
39905
39906 'use strict';
39907
39908 var _inherits = __webpack_require__(372)['default'];
39909
39910 var _classCallCheck = __webpack_require__(379)['default'];
39911
39912 var _extends = __webpack_require__(338)['default'];
39913
39914 var _interopRequireDefault = __webpack_require__(335)['default'];
39915
39916 exports.__esModule = true;
39917
39918 var _classnames = __webpack_require__(356);
39919
39920 var _classnames2 = _interopRequireDefault(_classnames);
39921
39922 var _react = __webpack_require__(89);
39923
39924 var _react2 = _interopRequireDefault(_react);
39925
39926 var _styleMaps = __webpack_require__(358);
39927
39928 var _utilsBootstrapUtils = __webpack_require__(357);
39929
39930 var Label = (function (_React$Component) {
39931 _inherits(Label, _React$Component);
39932
39933 function Label() {
39934 _classCallCheck(this, _Label);
39935
39936 _React$Component.apply(this, arguments);
39937 }
39938
39939 Label.prototype.render = function render() {
39940 var classes = _utilsBootstrapUtils.getClassSet(this.props);
39941
39942 return _react2['default'].createElement(
39943 'span',
39944 _extends({}, this.props, {
39945 className: _classnames2['default'](this.props.className, classes)
39946 }),
39947 this.props.children
39948 );
39949 };
39950
39951 var _Label = Label;
39952 Label = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values().concat(_styleMaps.DEFAULT, _styleMaps.PRIMARY), _styleMaps.DEFAULT)(Label) || Label;
39953 Label = _utilsBootstrapUtils.bsClass('label')(Label) || Label;
39954 return Label;
39955 })(_react2['default'].Component);
39956
39957 exports['default'] = Label;
39958 module.exports = exports['default'];
39959
39960/***/ },
39961/* 519 */
39962/***/ function(module, exports, __webpack_require__) {
39963
39964 'use strict';
39965
39966 var _inherits = __webpack_require__(372)['default'];
39967
39968 var _classCallCheck = __webpack_require__(379)['default'];
39969
39970 var _extends = __webpack_require__(338)['default'];
39971
39972 var _interopRequireDefault = __webpack_require__(335)['default'];
39973
39974 exports.__esModule = true;
39975
39976 var _react = __webpack_require__(89);
39977
39978 var _react2 = _interopRequireDefault(_react);
39979
39980 var _ListGroupItem = __webpack_require__(520);
39981
39982 var _ListGroupItem2 = _interopRequireDefault(_ListGroupItem);
39983
39984 var _classnames = __webpack_require__(356);
39985
39986 var _classnames2 = _interopRequireDefault(_classnames);
39987
39988 var _utilsValidComponentChildren = __webpack_require__(365);
39989
39990 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
39991
39992 var ListGroup = (function (_React$Component) {
39993 _inherits(ListGroup, _React$Component);
39994
39995 function ListGroup() {
39996 _classCallCheck(this, ListGroup);
39997
39998 _React$Component.apply(this, arguments);
39999 }
40000
40001 ListGroup.prototype.render = function render() {
40002 var _this = this;
40003
40004 var items = _utilsValidComponentChildren2['default'].map(this.props.children, function (item, index) {
40005 return _react.cloneElement(item, { key: item.key ? item.key : index });
40006 });
40007
40008 if (this.areCustomChildren(items)) {
40009 var Component = this.props.componentClass;
40010 return _react2['default'].createElement(
40011 Component,
40012 _extends({}, this.props, {
40013 className: _classnames2['default'](this.props.className, 'list-group') }),
40014 items
40015 );
40016 }
40017
40018 var shouldRenderDiv = false;
40019
40020 if (!this.props.children) {
40021 shouldRenderDiv = true;
40022 } else {
40023 _utilsValidComponentChildren2['default'].forEach(this.props.children, function (child) {
40024 if (_this.isAnchorOrButton(child.props)) {
40025 shouldRenderDiv = true;
40026 }
40027 });
40028 }
40029
40030 return shouldRenderDiv ? this.renderDiv(items) : this.renderUL(items);
40031 };
40032
40033 ListGroup.prototype.isAnchorOrButton = function isAnchorOrButton(props) {
40034 return props.href || props.onClick;
40035 };
40036
40037 ListGroup.prototype.areCustomChildren = function areCustomChildren(children) {
40038 var customChildren = false;
40039
40040 _utilsValidComponentChildren2['default'].forEach(children, function (child) {
40041 if (child.type !== _ListGroupItem2['default']) {
40042 customChildren = true;
40043 }
40044 }, this);
40045
40046 return customChildren;
40047 };
40048
40049 ListGroup.prototype.renderUL = function renderUL(items) {
40050 var listItems = _utilsValidComponentChildren2['default'].map(items, function (item) {
40051 return _react.cloneElement(item, { listItem: true });
40052 });
40053
40054 return _react2['default'].createElement(
40055 'ul',
40056 _extends({}, this.props, {
40057 className: _classnames2['default'](this.props.className, 'list-group') }),
40058 listItems
40059 );
40060 };
40061
40062 ListGroup.prototype.renderDiv = function renderDiv(items) {
40063 return _react2['default'].createElement(
40064 'div',
40065 _extends({}, this.props, {
40066 className: _classnames2['default'](this.props.className, 'list-group') }),
40067 items
40068 );
40069 };
40070
40071 return ListGroup;
40072 })(_react2['default'].Component);
40073
40074 ListGroup.defaultProps = {
40075 componentClass: 'div'
40076 };
40077
40078 ListGroup.propTypes = {
40079 className: _react2['default'].PropTypes.string,
40080 /**
40081 * The element for ListGroup if children are
40082 * user-defined custom components.
40083 * @type {("ul"|"div")}
40084 */
40085 componentClass: _react2['default'].PropTypes.oneOf(['ul', 'div']),
40086 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])
40087 };
40088
40089 exports['default'] = ListGroup;
40090 module.exports = exports['default'];
40091
40092/***/ },
40093/* 520 */
40094/***/ function(module, exports, __webpack_require__) {
40095
40096 'use strict';
40097
40098 var _inherits = __webpack_require__(372)['default'];
40099
40100 var _classCallCheck = __webpack_require__(379)['default'];
40101
40102 var _extends = __webpack_require__(338)['default'];
40103
40104 var _interopRequireDefault = __webpack_require__(335)['default'];
40105
40106 exports.__esModule = true;
40107
40108 var _classnames = __webpack_require__(356);
40109
40110 var _classnames2 = _interopRequireDefault(_classnames);
40111
40112 var _react = __webpack_require__(89);
40113
40114 var _react2 = _interopRequireDefault(_react);
40115
40116 var _styleMaps = __webpack_require__(358);
40117
40118 var _utilsBootstrapUtils = __webpack_require__(357);
40119
40120 var ListGroupItem = (function (_React$Component) {
40121 _inherits(ListGroupItem, _React$Component);
40122
40123 function ListGroupItem() {
40124 _classCallCheck(this, ListGroupItem);
40125
40126 _React$Component.apply(this, arguments);
40127 }
40128
40129 ListGroupItem.prototype.render = function render() {
40130 var classes = _utilsBootstrapUtils.getClassSet(this.props);
40131
40132 classes.active = this.props.active;
40133 classes.disabled = this.props.disabled;
40134
40135 if (this.props.href) {
40136 return this.renderAnchor(classes);
40137 } else if (this.props.onClick) {
40138 return this.renderButton(classes);
40139 } else if (this.props.listItem) {
40140 return this.renderLi(classes);
40141 }
40142
40143 return this.renderSpan(classes);
40144 };
40145
40146 ListGroupItem.prototype.renderLi = function renderLi(classes) {
40147 return _react2['default'].createElement(
40148 'li',
40149 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
40150 this.props.header ? this.renderStructuredContent() : this.props.children
40151 );
40152 };
40153
40154 ListGroupItem.prototype.renderAnchor = function renderAnchor(classes) {
40155 return _react2['default'].createElement(
40156 'a',
40157 _extends({}, this.props, {
40158 className: _classnames2['default'](this.props.className, classes)
40159 }),
40160 this.props.header ? this.renderStructuredContent() : this.props.children
40161 );
40162 };
40163
40164 ListGroupItem.prototype.renderButton = function renderButton(classes) {
40165 return _react2['default'].createElement(
40166 'button',
40167 _extends({
40168 type: 'button'
40169 }, this.props, {
40170 className: _classnames2['default'](this.props.className, classes) }),
40171 this.props.header ? this.renderStructuredContent() : this.props.children
40172 );
40173 };
40174
40175 ListGroupItem.prototype.renderSpan = function renderSpan(classes) {
40176 return _react2['default'].createElement(
40177 'span',
40178 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
40179 this.props.header ? this.renderStructuredContent() : this.props.children
40180 );
40181 };
40182
40183 ListGroupItem.prototype.renderStructuredContent = function renderStructuredContent() {
40184 var header = undefined;
40185 var headingClass = _utilsBootstrapUtils.prefix(this.props, 'heading');
40186
40187 if (_react2['default'].isValidElement(this.props.header)) {
40188 header = _react.cloneElement(this.props.header, {
40189 key: 'header',
40190 className: _classnames2['default'](this.props.header.props.className, headingClass)
40191 });
40192 } else {
40193 header = _react2['default'].createElement(
40194 'h4',
40195 { key: 'header', className: headingClass },
40196 this.props.header
40197 );
40198 }
40199
40200 var content = _react2['default'].createElement(
40201 'p',
40202 { key: 'content', className: _utilsBootstrapUtils.prefix(this.props, 'text') },
40203 this.props.children
40204 );
40205
40206 return [header, content];
40207 };
40208
40209 return ListGroupItem;
40210 })(_react2['default'].Component);
40211
40212 ListGroupItem.propTypes = {
40213 className: _react2['default'].PropTypes.string,
40214 active: _react2['default'].PropTypes.any,
40215 disabled: _react2['default'].PropTypes.any,
40216 header: _react2['default'].PropTypes.node,
40217 listItem: _react2['default'].PropTypes.bool,
40218 onClick: _react2['default'].PropTypes.func,
40219 eventKey: _react2['default'].PropTypes.any,
40220 href: _react2['default'].PropTypes.string,
40221 target: _react2['default'].PropTypes.string
40222 };
40223
40224 ListGroupItem.defaultTypes = {
40225 listItem: false
40226 };
40227
40228 exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _utilsBootstrapUtils.bsClass('list-group-item', ListGroupItem));
40229 module.exports = exports['default'];
40230
40231/***/ },
40232/* 521 */
40233/***/ function(module, exports, __webpack_require__) {
40234
40235 'use strict';
40236
40237 var _objectWithoutProperties = __webpack_require__(355)['default'];
40238
40239 var _extends = __webpack_require__(338)['default'];
40240
40241 var _Object$assign = __webpack_require__(339)['default'];
40242
40243 var _interopRequireDefault = __webpack_require__(335)['default'];
40244
40245 exports.__esModule = true;
40246
40247 var _react = __webpack_require__(89);
40248
40249 var _react2 = _interopRequireDefault(_react);
40250
40251 var _reactPropTypesLibElementType = __webpack_require__(380);
40252
40253 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
40254
40255 var _classnames = __webpack_require__(356);
40256
40257 var _classnames2 = _interopRequireDefault(_classnames);
40258
40259 var _MediaHeading = __webpack_require__(522);
40260
40261 var _MediaHeading2 = _interopRequireDefault(_MediaHeading);
40262
40263 var _MediaBody = __webpack_require__(523);
40264
40265 var _MediaBody2 = _interopRequireDefault(_MediaBody);
40266
40267 var _MediaLeft = __webpack_require__(524);
40268
40269 var _MediaLeft2 = _interopRequireDefault(_MediaLeft);
40270
40271 var _MediaRight = __webpack_require__(525);
40272
40273 var _MediaRight2 = _interopRequireDefault(_MediaRight);
40274
40275 var _MediaList = __webpack_require__(526);
40276
40277 var _MediaList2 = _interopRequireDefault(_MediaList);
40278
40279 var _MediaListItem = __webpack_require__(527);
40280
40281 var _MediaListItem2 = _interopRequireDefault(_MediaListItem);
40282
40283 var Media = _react2['default'].createClass({
40284 displayName: 'Media',
40285 propTypes: {
40286 /**
40287 * You can use a custom element for the media container
40288 */
40289 componentClass: _reactPropTypesLibElementType2['default']
40290 },
40291
40292 getDefaultProps: function getDefaultProps() {
40293 return {
40294 componentClass: 'div'
40295 };
40296 },
40297
40298 render: function render() {
40299 var _props = this.props;
40300 var ComponentClass = _props.componentClass;
40301 var className = _props.className;
40302
40303 var props = _objectWithoutProperties(_props, ['componentClass', 'className']);
40304
40305 return _react2['default'].createElement(ComponentClass, _extends({}, props, { className: _classnames2['default'](className, 'media') }));
40306 }
40307 });
40308
40309 Media = _Object$assign(Media, { Heading: _MediaHeading2['default'], Body: _MediaBody2['default'], Left: _MediaLeft2['default'], Right: _MediaRight2['default'], List: _MediaList2['default'], ListItem: _MediaListItem2['default'] });
40310
40311 exports['default'] = Media;
40312 module.exports = exports['default'];
40313
40314/***/ },
40315/* 522 */
40316/***/ function(module, exports, __webpack_require__) {
40317
40318 'use strict';
40319
40320 var _objectWithoutProperties = __webpack_require__(355)['default'];
40321
40322 var _extends = __webpack_require__(338)['default'];
40323
40324 var _interopRequireDefault = __webpack_require__(335)['default'];
40325
40326 exports.__esModule = true;
40327
40328 var _react = __webpack_require__(89);
40329
40330 var _react2 = _interopRequireDefault(_react);
40331
40332 var _reactPropTypesLibElementType = __webpack_require__(380);
40333
40334 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
40335
40336 var _classnames = __webpack_require__(356);
40337
40338 var _classnames2 = _interopRequireDefault(_classnames);
40339
40340 var MediaHeading = _react2['default'].createClass({
40341 displayName: 'Media.Heading',
40342 propTypes: {
40343 /**
40344 * You can use a custom element for the media heading
40345 */
40346 componentClass: _reactPropTypesLibElementType2['default']
40347 },
40348
40349 getDefaultProps: function getDefaultProps() {
40350 return {
40351 componentClass: 'h4'
40352 };
40353 },
40354
40355 render: function render() {
40356 var _props = this.props;
40357 var ComponentClass = _props.componentClass;
40358 var className = _props.className;
40359
40360 var props = _objectWithoutProperties(_props, ['componentClass', 'className']);
40361
40362 return _react2['default'].createElement(ComponentClass, _extends({}, props, { className: _classnames2['default'](className, 'media-heading') }));
40363 }
40364 });
40365
40366 exports['default'] = MediaHeading;
40367 module.exports = exports['default'];
40368
40369/***/ },
40370/* 523 */
40371/***/ function(module, exports, __webpack_require__) {
40372
40373 'use strict';
40374
40375 var _objectWithoutProperties = __webpack_require__(355)['default'];
40376
40377 var _extends = __webpack_require__(338)['default'];
40378
40379 var _interopRequireDefault = __webpack_require__(335)['default'];
40380
40381 exports.__esModule = true;
40382
40383 var _react = __webpack_require__(89);
40384
40385 var _react2 = _interopRequireDefault(_react);
40386
40387 var _reactPropTypesLibElementType = __webpack_require__(380);
40388
40389 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
40390
40391 var _classnames = __webpack_require__(356);
40392
40393 var _classnames2 = _interopRequireDefault(_classnames);
40394
40395 var MediaBody = _react2['default'].createClass({
40396 displayName: 'Media.Body',
40397 propTypes: {
40398 /**
40399 * You can use a custom element for the media body
40400 */
40401 componentClass: _reactPropTypesLibElementType2['default']
40402 },
40403
40404 getDefaultProps: function getDefaultProps() {
40405 return {
40406 componentClass: 'div'
40407 };
40408 },
40409
40410 render: function render() {
40411 var _props = this.props;
40412 var ComponentClass = _props.componentClass;
40413 var className = _props.className;
40414
40415 var props = _objectWithoutProperties(_props, ['componentClass', 'className']);
40416
40417 return _react2['default'].createElement(ComponentClass, _extends({}, props, { className: _classnames2['default'](className, 'media-body') }));
40418 }
40419 });
40420
40421 exports['default'] = MediaBody;
40422 module.exports = exports['default'];
40423
40424/***/ },
40425/* 524 */
40426/***/ function(module, exports, __webpack_require__) {
40427
40428 'use strict';
40429
40430 var _objectWithoutProperties = __webpack_require__(355)['default'];
40431
40432 var _extends = __webpack_require__(338)['default'];
40433
40434 var _interopRequireDefault = __webpack_require__(335)['default'];
40435
40436 exports.__esModule = true;
40437
40438 var _react = __webpack_require__(89);
40439
40440 var _react2 = _interopRequireDefault(_react);
40441
40442 var _classnames = __webpack_require__(356);
40443
40444 var _classnames2 = _interopRequireDefault(_classnames);
40445
40446 var MediaLeft = _react2['default'].createClass({
40447 displayName: 'Media.Left',
40448 propTypes: {
40449 /**
40450 * Align the media to the top, middle or bottom
40451 * of the media object
40452 */
40453 align: _react2['default'].PropTypes.oneOf(['top', 'middle', 'bottom'])
40454 },
40455
40456 render: function render() {
40457 var _classNames;
40458
40459 var _props = this.props;
40460 var align = _props.align;
40461 var className = _props.className;
40462
40463 var props = _objectWithoutProperties(_props, ['align', 'className']);
40464
40465 var classes = _classnames2['default'](className, 'media-left', (_classNames = {}, _classNames['media-' + align] = Boolean(align), _classNames));
40466
40467 // Only add the media-alignment class if align is passed in props
40468 return _react2['default'].createElement('div', _extends({}, props, { className: classes }));
40469 }
40470 });
40471
40472 exports['default'] = MediaLeft;
40473 module.exports = exports['default'];
40474
40475/***/ },
40476/* 525 */
40477/***/ function(module, exports, __webpack_require__) {
40478
40479 'use strict';
40480
40481 var _objectWithoutProperties = __webpack_require__(355)['default'];
40482
40483 var _extends = __webpack_require__(338)['default'];
40484
40485 var _interopRequireDefault = __webpack_require__(335)['default'];
40486
40487 exports.__esModule = true;
40488
40489 var _react = __webpack_require__(89);
40490
40491 var _react2 = _interopRequireDefault(_react);
40492
40493 var _classnames = __webpack_require__(356);
40494
40495 var _classnames2 = _interopRequireDefault(_classnames);
40496
40497 var MediaRight = _react2['default'].createClass({
40498 displayName: 'Media.Right',
40499 propTypes: {
40500 /**
40501 * Align the media to the top, middle or bottom
40502 * of the media object
40503 */
40504 align: _react2['default'].PropTypes.oneOf(['top', 'middle', 'bottom'])
40505 },
40506
40507 render: function render() {
40508 var _classNames;
40509
40510 var _props = this.props;
40511 var align = _props.align;
40512 var className = _props.className;
40513
40514 var props = _objectWithoutProperties(_props, ['align', 'className']);
40515
40516 var classes = _classnames2['default'](className, 'media-right', (_classNames = {}, _classNames['media-' + align] = Boolean(align), _classNames));
40517
40518 // Only add the media-alignment class if align is passed in props
40519 return _react2['default'].createElement('div', _extends({}, props, { className: classes }));
40520 }
40521 });
40522
40523 exports['default'] = MediaRight;
40524 module.exports = exports['default'];
40525
40526/***/ },
40527/* 526 */
40528/***/ function(module, exports, __webpack_require__) {
40529
40530 'use strict';
40531
40532 var _objectWithoutProperties = __webpack_require__(355)['default'];
40533
40534 var _extends = __webpack_require__(338)['default'];
40535
40536 var _interopRequireDefault = __webpack_require__(335)['default'];
40537
40538 exports.__esModule = true;
40539
40540 var _react = __webpack_require__(89);
40541
40542 var _react2 = _interopRequireDefault(_react);
40543
40544 var _classnames = __webpack_require__(356);
40545
40546 var _classnames2 = _interopRequireDefault(_classnames);
40547
40548 var MediaList = _react2['default'].createClass({
40549 displayName: 'Media.List',
40550 render: function render() {
40551 var _props = this.props;
40552 var className = _props.className;
40553
40554 var props = _objectWithoutProperties(_props, ['className']);
40555
40556 return _react2['default'].createElement('ul', _extends({}, props, { className: _classnames2['default'](className, 'media-list') }));
40557 }
40558 });
40559
40560 exports['default'] = MediaList;
40561 module.exports = exports['default'];
40562
40563/***/ },
40564/* 527 */
40565/***/ function(module, exports, __webpack_require__) {
40566
40567 'use strict';
40568
40569 var _objectWithoutProperties = __webpack_require__(355)['default'];
40570
40571 var _extends = __webpack_require__(338)['default'];
40572
40573 var _interopRequireDefault = __webpack_require__(335)['default'];
40574
40575 exports.__esModule = true;
40576
40577 var _react = __webpack_require__(89);
40578
40579 var _react2 = _interopRequireDefault(_react);
40580
40581 var _classnames = __webpack_require__(356);
40582
40583 var _classnames2 = _interopRequireDefault(_classnames);
40584
40585 var MediaListItem = _react2['default'].createClass({
40586 displayName: 'Media.ListItem',
40587 render: function render() {
40588 var _props = this.props;
40589 var className = _props.className;
40590
40591 var props = _objectWithoutProperties(_props, ['className']);
40592
40593 return _react2['default'].createElement('li', _extends({}, props, { className: _classnames2['default'](className, 'media') }));
40594 }
40595 });
40596
40597 exports['default'] = MediaListItem;
40598 module.exports = exports['default'];
40599
40600/***/ },
40601/* 528 */
40602/***/ function(module, exports, __webpack_require__) {
40603
40604 'use strict';
40605
40606 var _inherits = __webpack_require__(372)['default'];
40607
40608 var _classCallCheck = __webpack_require__(379)['default'];
40609
40610 var _objectWithoutProperties = __webpack_require__(355)['default'];
40611
40612 var _extends = __webpack_require__(338)['default'];
40613
40614 var _interopRequireDefault = __webpack_require__(335)['default'];
40615
40616 exports.__esModule = true;
40617
40618 var _classnames = __webpack_require__(356);
40619
40620 var _classnames2 = _interopRequireDefault(_classnames);
40621
40622 var _react = __webpack_require__(89);
40623
40624 var _react2 = _interopRequireDefault(_react);
40625
40626 var _reactPropTypesLibAll = __webpack_require__(384);
40627
40628 var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll);
40629
40630 var _utilsBootstrapUtils = __webpack_require__(357);
40631
40632 var _utilsCreateChainedFunction = __webpack_require__(414);
40633
40634 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
40635
40636 var _SafeAnchor = __webpack_require__(371);
40637
40638 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
40639
40640 var MenuItem = (function (_React$Component) {
40641 _inherits(MenuItem, _React$Component);
40642
40643 function MenuItem(props) {
40644 _classCallCheck(this, MenuItem);
40645
40646 _React$Component.call(this, props);
40647
40648 this.handleClick = this.handleClick.bind(this);
40649 }
40650
40651 MenuItem.prototype.handleClick = function handleClick(event) {
40652 if (!this.props.href || this.props.disabled) {
40653 event.preventDefault();
40654 }
40655
40656 if (this.props.disabled) {
40657 return;
40658 }
40659
40660 if (this.props.onSelect) {
40661 this.props.onSelect(this.props.eventKey, event);
40662 }
40663 };
40664
40665 MenuItem.prototype.render = function render() {
40666 if (this.props.divider) {
40667 return _react2['default'].createElement('li', {
40668 role: 'separator',
40669 className: _classnames2['default']('divider', this.props.className),
40670 style: this.props.style
40671 });
40672 }
40673
40674 if (this.props.header) {
40675 var headerClass = _utilsBootstrapUtils.prefix(this.props, 'header');
40676
40677 return _react2['default'].createElement(
40678 'li',
40679 {
40680 role: 'heading',
40681 className: _classnames2['default'](headerClass, this.props.className),
40682 style: this.props.style
40683 },
40684 this.props.children
40685 );
40686 }
40687
40688 var _props = this.props;
40689 var className = _props.className;
40690 var style = _props.style;
40691 var onClick = _props.onClick;
40692
40693 var props = _objectWithoutProperties(_props, ['className', 'style', 'onClick']);
40694
40695 delete props.onSelect;
40696
40697 var classes = {
40698 disabled: this.props.disabled,
40699 active: this.props.active
40700 };
40701
40702 return _react2['default'].createElement(
40703 'li',
40704 { role: 'presentation',
40705 className: _classnames2['default'](className, classes),
40706 style: style
40707 },
40708 _react2['default'].createElement(_SafeAnchor2['default'], _extends({}, props, {
40709 role: 'menuitem',
40710 tabIndex: '-1',
40711 onClick: _utilsCreateChainedFunction2['default'](onClick, this.handleClick)
40712 }))
40713 );
40714 };
40715
40716 return MenuItem;
40717 })(_react2['default'].Component);
40718
40719 MenuItem.propTypes = {
40720
40721 /**
40722 * Highlight the menu item as active.
40723 */
40724 active: _react2['default'].PropTypes.bool,
40725
40726 /**
40727 * Disable the menu item, making it unselectable.
40728 */
40729 disabled: _react2['default'].PropTypes.bool,
40730
40731 /**
40732 * Styles the menu item as a horizontal rule, providing visual separation between
40733 * groups of menu items.
40734 */
40735 divider: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (props) {
40736 if (props.divider && props.children) {
40737 return new Error('Children will not be rendered for dividers');
40738 }
40739 }),
40740
40741 /**
40742 * Value passed to the `onSelect` handler, useful for identifying the selected menu item.
40743 */
40744 eventKey: _react2['default'].PropTypes.any,
40745
40746 /**
40747 * Styles the menu item as a header label, useful for describing a group of menu items.
40748 */
40749 header: _react2['default'].PropTypes.bool,
40750
40751 /**
40752 * HTML `href` attribute corresponding to `a.href`.
40753 */
40754 href: _react2['default'].PropTypes.string,
40755
40756 /**
40757 * HTML `target` attribute corresponding to `a.target`.
40758 */
40759 target: _react2['default'].PropTypes.string,
40760
40761 /**
40762 * HTML `title` attribute corresponding to `a.title`.
40763 */
40764 title: _react2['default'].PropTypes.string,
40765
40766 /**
40767 * Callback fired when the menu item is clicked.
40768 */
40769 onClick: _react2['default'].PropTypes.func,
40770
40771 onKeyDown: _react2['default'].PropTypes.func,
40772
40773 /**
40774 * Callback fired when the menu item is selected.
40775 *
40776 * ```js
40777 * (eventKey: any, event: Object) => any
40778 * ```
40779 */
40780 onSelect: _react2['default'].PropTypes.func,
40781
40782 /**
40783 * HTML `id` attribute.
40784 */
40785 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])
40786 };
40787
40788 MenuItem.defaultProps = {
40789 divider: false,
40790 disabled: false,
40791 header: false
40792 };
40793
40794 exports['default'] = _utilsBootstrapUtils.bsClass('dropdown', MenuItem);
40795 module.exports = exports['default'];
40796
40797/***/ },
40798/* 529 */
40799/***/ function(module, exports, __webpack_require__) {
40800
40801 'use strict';
40802
40803 var _extends = __webpack_require__(338)['default'];
40804
40805 var _objectWithoutProperties = __webpack_require__(355)['default'];
40806
40807 var _Object$keys = __webpack_require__(361)['default'];
40808
40809 var _interopRequireDefault = __webpack_require__(335)['default'];
40810
40811 exports.__esModule = true;
40812
40813 var _classnames = __webpack_require__(356);
40814
40815 var _classnames2 = _interopRequireDefault(_classnames);
40816
40817 var _domHelpersEvents = __webpack_require__(530);
40818
40819 var _domHelpersEvents2 = _interopRequireDefault(_domHelpersEvents);
40820
40821 var _domHelpersOwnerDocument = __webpack_require__(417);
40822
40823 var _domHelpersOwnerDocument2 = _interopRequireDefault(_domHelpersOwnerDocument);
40824
40825 var _domHelpersUtilInDOM = __webpack_require__(412);
40826
40827 var _domHelpersUtilInDOM2 = _interopRequireDefault(_domHelpersUtilInDOM);
40828
40829 var _domHelpersUtilScrollbarSize = __webpack_require__(533);
40830
40831 var _domHelpersUtilScrollbarSize2 = _interopRequireDefault(_domHelpersUtilScrollbarSize);
40832
40833 var _lodashCompatObjectPick = __webpack_require__(501);
40834
40835 var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick);
40836
40837 var _react = __webpack_require__(89);
40838
40839 var _react2 = _interopRequireDefault(_react);
40840
40841 var _reactDom = __webpack_require__(122);
40842
40843 var _reactDom2 = _interopRequireDefault(_reactDom);
40844
40845 var _reactOverlaysLibModal = __webpack_require__(534);
40846
40847 var _reactOverlaysLibModal2 = _interopRequireDefault(_reactOverlaysLibModal);
40848
40849 var _reactOverlaysLibUtilsIsOverflowing = __webpack_require__(546);
40850
40851 var _reactOverlaysLibUtilsIsOverflowing2 = _interopRequireDefault(_reactOverlaysLibUtilsIsOverflowing);
40852
40853 var _reactPropTypesLibDeprecated = __webpack_require__(367);
40854
40855 var _reactPropTypesLibDeprecated2 = _interopRequireDefault(_reactPropTypesLibDeprecated);
40856
40857 var _reactPropTypesLibElementType = __webpack_require__(380);
40858
40859 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
40860
40861 var _styleMaps = __webpack_require__(358);
40862
40863 var _utilsBootstrapUtils = __webpack_require__(357);
40864
40865 var _Fade = __webpack_require__(502);
40866
40867 var _Fade2 = _interopRequireDefault(_Fade);
40868
40869 var _ModalDialog = __webpack_require__(550);
40870
40871 var _ModalDialog2 = _interopRequireDefault(_ModalDialog);
40872
40873 var _ModalBody = __webpack_require__(551);
40874
40875 var _ModalBody2 = _interopRequireDefault(_ModalBody);
40876
40877 var _ModalHeader = __webpack_require__(552);
40878
40879 var _ModalHeader2 = _interopRequireDefault(_ModalHeader);
40880
40881 var _ModalTitle = __webpack_require__(553);
40882
40883 var _ModalTitle2 = _interopRequireDefault(_ModalTitle);
40884
40885 var _ModalFooter = __webpack_require__(554);
40886
40887 var _ModalFooter2 = _interopRequireDefault(_ModalFooter);
40888
40889 /* eslint-disable react/prop-types */
40890 var Modal = _react2['default'].createClass({
40891 displayName: 'Modal',
40892
40893 propTypes: _extends({}, _reactOverlaysLibModal2['default'].propTypes, _ModalDialog2['default'].propTypes, {
40894
40895 /**
40896 * Include a backdrop component. Specify 'static' for a backdrop that doesn't trigger an "onHide" when clicked.
40897 */
40898 backdrop: _react2['default'].PropTypes.oneOf(['static', true, false]),
40899
40900 /**
40901 * Close the modal when escape key is pressed
40902 */
40903 keyboard: _react2['default'].PropTypes.bool,
40904
40905 /**
40906 * Open and close the Modal with a slide and fade animation.
40907 */
40908 animation: _react2['default'].PropTypes.bool,
40909
40910 /**
40911 * A Component type that provides the modal content Markup. This is a useful prop when you want to use your own
40912 * styles and markup to create a custom modal component.
40913 */
40914 dialogComponentClass: _reactPropTypesLibElementType2['default'],
40915
40916 /**
40917 * @private
40918 */
40919 dialogComponent: _reactPropTypesLibDeprecated2['default'](_reactPropTypesLibElementType2['default'], 'Use `dialogComponentClass`.'),
40920
40921 /**
40922 * When `true` The modal will automatically shift focus to itself when it opens, and replace it to the last focused element when it closes.
40923 * Generally this should never be set to false as it makes the Modal less accessible to assistive technologies, like screen-readers.
40924 */
40925 autoFocus: _react2['default'].PropTypes.bool,
40926
40927 /**
40928 * When `true` The modal will prevent focus from leaving the Modal while open.
40929 * Consider leaving the default value here, as it is necessary to make the Modal work well with assistive technologies,
40930 * such as screen readers.
40931 */
40932 enforceFocus: _react2['default'].PropTypes.bool,
40933
40934 /**
40935 * Hide this from automatic props documentation generation.
40936 * @private
40937 */
40938 bsStyle: _react2['default'].PropTypes.string,
40939
40940 /**
40941 * When `true` The modal will show itself.
40942 */
40943 show: _react2['default'].PropTypes.bool,
40944
40945 /**
40946 * A callback fired when the header closeButton or non-static backdrop is
40947 * clicked. Required if either are specified.
40948 */
40949 onHide: _react2['default'].PropTypes.func,
40950
40951 /**
40952 * Callback fired before the Modal transitions in
40953 */
40954 onEnter: _react2['default'].PropTypes.func,
40955
40956 /**
40957 * Callback fired as the Modal begins to transition in
40958 */
40959 onEntering: _react2['default'].PropTypes.func,
40960
40961 /**
40962 * Callback fired after the Modal finishes transitioning in
40963 */
40964 onEntered: _react2['default'].PropTypes.func,
40965
40966 /**
40967 * Callback fired right before the Modal transitions out
40968 */
40969 onExit: _react2['default'].PropTypes.func,
40970
40971 /**
40972 * Callback fired as the Modal begins to transition out
40973 */
40974 onExiting: _react2['default'].PropTypes.func,
40975
40976 /**
40977 * Callback fired after the Modal finishes transitioning out
40978 */
40979 onExited: _react2['default'].PropTypes.func
40980 }),
40981
40982 childContextTypes: {
40983 '$bs_onModalHide': _react2['default'].PropTypes.func
40984 },
40985
40986 getDefaultProps: function getDefaultProps() {
40987 return _extends({}, _reactOverlaysLibModal2['default'].defaultProps, {
40988 bsClass: 'modal',
40989 animation: true,
40990 dialogComponentClass: _ModalDialog2['default']
40991 });
40992 },
40993
40994 getInitialState: function getInitialState() {
40995 return {
40996 modalStyles: {}
40997 };
40998 },
40999
41000 getChildContext: function getChildContext() {
41001 return {
41002 $bs_onModalHide: this.props.onHide
41003 };
41004 },
41005
41006 componentWillUnmount: function componentWillUnmount() {
41007 _domHelpersEvents2['default'].off(window, 'resize', this.handleWindowResize);
41008 },
41009
41010 render: function render() {
41011 var _this = this;
41012
41013 var _props = this.props;
41014 var className = _props.className;
41015 var children = _props.children;
41016 var dialogClassName = _props.dialogClassName;
41017 var animation = _props.animation;
41018
41019 var props = _objectWithoutProperties(_props, ['className', 'children', 'dialogClassName', 'animation']);
41020
41021 var modalStyles = this.state.modalStyles;
41022
41023 var inClass = { 'in': props.show && !animation };
41024 var Dialog = props.dialogComponent || props.dialogComponentClass;
41025
41026 var parentProps = _lodashCompatObjectPick2['default'](props, _Object$keys(_reactOverlaysLibModal2['default'].propTypes).concat(['onExit', 'onExiting', 'onEnter', 'onEntered']) // the rest are fired in _onHide() and _onShow()
41027 );
41028
41029 var modal = _react2['default'].createElement(
41030 Dialog,
41031 _extends({
41032 key: 'modal',
41033 ref: function (ref) {
41034 return _this._modal = ref;
41035 }
41036 }, props, {
41037 style: modalStyles,
41038 className: _classnames2['default'](className, inClass),
41039 dialogClassName: dialogClassName,
41040 onClick: props.backdrop === true ? this.handleDialogClick : null
41041 }),
41042 this.props.children
41043 );
41044
41045 return _react2['default'].createElement(
41046 _reactOverlaysLibModal2['default'],
41047 _extends({}, parentProps, {
41048 show: props.show,
41049 ref: function (ref) {
41050 _this._wrapper = ref && ref.refs.modal;
41051 _this._backdrop = ref && ref.refs.backdrop;
41052 },
41053 onEntering: this._onShow,
41054 onExited: this._onHide,
41055 backdropClassName: _classnames2['default'](_utilsBootstrapUtils.prefix(props, 'backdrop'), inClass),
41056 containerClassName: _utilsBootstrapUtils.prefix(props, 'open'),
41057 transition: animation ? _Fade2['default'] : undefined,
41058 dialogTransitionTimeout: Modal.TRANSITION_DURATION,
41059 backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
41060 }),
41061 modal
41062 );
41063 },
41064
41065 _onShow: function _onShow() {
41066 _domHelpersEvents2['default'].on(window, 'resize', this.handleWindowResize);
41067
41068 this.setState(this._getStyles());
41069
41070 if (this.props.onEntering) {
41071 var _props2;
41072
41073 (_props2 = this.props).onEntering.apply(_props2, arguments);
41074 }
41075 },
41076
41077 _onHide: function _onHide() {
41078 _domHelpersEvents2['default'].off(window, 'resize', this.handleWindowResize);
41079
41080 if (this.props.onExited) {
41081 var _props3;
41082
41083 (_props3 = this.props).onExited.apply(_props3, arguments);
41084 }
41085 },
41086
41087 handleDialogClick: function handleDialogClick(e) {
41088 if (e.target !== e.currentTarget) {
41089 return;
41090 }
41091
41092 this.props.onHide();
41093 },
41094
41095 handleWindowResize: function handleWindowResize() {
41096 this.setState(this._getStyles());
41097 },
41098
41099 _getStyles: function _getStyles() {
41100 if (!_domHelpersUtilInDOM2['default']) {
41101 return {};
41102 }
41103
41104 var node = _reactDom2['default'].findDOMNode(this._modal);
41105 var doc = _domHelpersOwnerDocument2['default'](node);
41106
41107 var scrollHt = node.scrollHeight;
41108 var bodyIsOverflowing = _reactOverlaysLibUtilsIsOverflowing2['default'](_reactDom2['default'].findDOMNode(this.props.container || doc.body));
41109 var modalIsOverflowing = scrollHt > doc.documentElement.clientHeight;
41110
41111 return {
41112 modalStyles: {
41113 paddingRight: bodyIsOverflowing && !modalIsOverflowing ? _domHelpersUtilScrollbarSize2['default']() : void 0,
41114 paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? _domHelpersUtilScrollbarSize2['default']() : void 0
41115 }
41116 };
41117 }
41118 });
41119
41120 Modal.Body = _ModalBody2['default'];
41121 Modal.Header = _ModalHeader2['default'];
41122 Modal.Title = _ModalTitle2['default'];
41123 Modal.Footer = _ModalFooter2['default'];
41124
41125 Modal.Dialog = _ModalDialog2['default'];
41126
41127 Modal.TRANSITION_DURATION = 300;
41128 Modal.BACKDROP_TRANSITION_DURATION = 150;
41129
41130 exports['default'] = _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], _utilsBootstrapUtils.bsClass('modal', Modal));
41131 module.exports = exports['default'];
41132
41133/***/ },
41134/* 530 */
41135/***/ function(module, exports, __webpack_require__) {
41136
41137 'use strict';
41138 var on = __webpack_require__(413),
41139 off = __webpack_require__(497),
41140 filter = __webpack_require__(531);
41141
41142 module.exports = { on: on, off: off, filter: filter };
41143
41144/***/ },
41145/* 531 */
41146/***/ function(module, exports, __webpack_require__) {
41147
41148 'use strict';
41149
41150 var contains = __webpack_require__(418),
41151 qsa = __webpack_require__(532);
41152
41153 module.exports = function (selector, handler) {
41154 return function (e) {
41155 var top = e.currentTarget,
41156 target = e.target,
41157 matches = qsa(top, selector);
41158
41159 if (matches.some(function (match) {
41160 return contains(match, target);
41161 })) handler.call(this, e);
41162 };
41163 };
41164
41165/***/ },
41166/* 532 */
41167/***/ function(module, exports) {
41168
41169 'use strict';
41170 // Zepto.js
41171 // (c) 2010-2015 Thomas Fuchs
41172 // Zepto.js may be freely distributed under the MIT license.
41173 var simpleSelectorRE = /^[\w-]*$/,
41174 toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
41175
41176 module.exports = function qsa(element, selector) {
41177 var maybeID = selector[0] === '#',
41178 maybeClass = selector[0] === '.',
41179 nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,
41180 isSimple = simpleSelectorRE.test(nameOnly),
41181 found;
41182
41183 if (isSimple) {
41184 if (maybeID) {
41185 element = element.getElementById ? element : document;
41186 return (found = element.getElementById(nameOnly)) ? [found] : [];
41187 }
41188
41189 if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly));
41190
41191 return toArray(element.getElementsByTagName(selector));
41192 }
41193
41194 return toArray(element.querySelectorAll(selector));
41195 };
41196
41197/***/ },
41198/* 533 */
41199/***/ function(module, exports, __webpack_require__) {
41200
41201 'use strict';
41202
41203 var canUseDOM = __webpack_require__(412);
41204
41205 var size;
41206
41207 module.exports = function (recalc) {
41208 if (!size || recalc) {
41209 if (canUseDOM) {
41210 var scrollDiv = document.createElement('div');
41211
41212 scrollDiv.style.position = 'absolute';
41213 scrollDiv.style.top = '-9999px';
41214 scrollDiv.style.width = '50px';
41215 scrollDiv.style.height = '50px';
41216 scrollDiv.style.overflow = 'scroll';
41217
41218 document.body.appendChild(scrollDiv);
41219 size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
41220 document.body.removeChild(scrollDiv);
41221 }
41222 }
41223
41224 return size;
41225 };
41226
41227/***/ },
41228/* 534 */
41229/***/ function(module, exports, __webpack_require__) {
41230
41231 'use strict';
41232
41233 Object.defineProperty(exports, "__esModule", {
41234 value: true
41235 });
41236
41237 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /*eslint-disable react/prop-types */
41238
41239
41240 var _react = __webpack_require__(89);
41241
41242 var _react2 = _interopRequireDefault(_react);
41243
41244 var _warning = __webpack_require__(535);
41245
41246 var _warning2 = _interopRequireDefault(_warning);
41247
41248 var _componentOrElement = __webpack_require__(536);
41249
41250 var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
41251
41252 var _elementType = __webpack_require__(538);
41253
41254 var _elementType2 = _interopRequireDefault(_elementType);
41255
41256 var _Portal = __webpack_require__(539);
41257
41258 var _Portal2 = _interopRequireDefault(_Portal);
41259
41260 var _ModalManager = __webpack_require__(541);
41261
41262 var _ModalManager2 = _interopRequireDefault(_ModalManager);
41263
41264 var _ownerDocument = __webpack_require__(498);
41265
41266 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
41267
41268 var _addEventListener = __webpack_require__(496);
41269
41270 var _addEventListener2 = _interopRequireDefault(_addEventListener);
41271
41272 var _addFocusListener = __webpack_require__(549);
41273
41274 var _addFocusListener2 = _interopRequireDefault(_addFocusListener);
41275
41276 var _inDOM = __webpack_require__(412);
41277
41278 var _inDOM2 = _interopRequireDefault(_inDOM);
41279
41280 var _activeElement = __webpack_require__(416);
41281
41282 var _activeElement2 = _interopRequireDefault(_activeElement);
41283
41284 var _contains = __webpack_require__(418);
41285
41286 var _contains2 = _interopRequireDefault(_contains);
41287
41288 var _getContainer = __webpack_require__(540);
41289
41290 var _getContainer2 = _interopRequireDefault(_getContainer);
41291
41292 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41293
41294 var modalManager = new _ModalManager2.default();
41295
41296 /**
41297 * Love them or hate them, `<Modal/>` provides a solid foundation for creating dialogs, lightboxes, or whatever else.
41298 * The Modal component renders its `children` node in front of a backdrop component.
41299 *
41300 * The Modal offers a few helpful features over using just a `<Portal/>` component and some styles:
41301 *
41302 * - Manages dialog stacking when one-at-a-time just isn't enough.
41303 * - Creates a backdrop, for disabling interaction below the modal.
41304 * - It properly manages focus; moving to the modal content, and keeping it there until the modal is closed.
41305 * - It disables scrolling of the page content while open.
41306 * - Adds the appropriate ARIA roles are automatically.
41307 * - Easily pluggable animations via a `<Transition/>` component.
41308 *
41309 * Note that, in the same way the backdrop element prevents users from clicking or interacting
41310 * with the page content underneath the Modal, Screen readers also need to be signaled to not to
41311 * interact with page content while the Modal is open. To do this, we use a common technique of applying
41312 * the `aria-hidden='true'` attribute to the non-Modal elements in the Modal `container`. This means that for
41313 * a Modal to be truly modal, it should have a `container` that is _outside_ your app's
41314 * React hierarchy (such as the default: document.body).
41315 */
41316 var Modal = _react2.default.createClass({
41317 displayName: 'Modal',
41318
41319
41320 propTypes: _extends({}, _Portal2.default.propTypes, {
41321
41322 /**
41323 * Set the visibility of the Modal
41324 */
41325 show: _react2.default.PropTypes.bool,
41326
41327 /**
41328 * A Node, Component instance, or function that returns either. The Modal is appended to it's container element.
41329 *
41330 * For the sake of assistive technologies, the container should usually be the document body, so that the rest of the
41331 * page content can be placed behind a virtual backdrop as well as a visual one.
41332 */
41333 container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),
41334
41335 /**
41336 * A callback fired when the Modal is opening.
41337 */
41338 onShow: _react2.default.PropTypes.func,
41339
41340 /**
41341 * A callback fired when either the backdrop is clicked, or the escape key is pressed.
41342 *
41343 * The `onHide` callback only signals intent from the Modal,
41344 * you must actually set the `show` prop to `false` for the Modal to close.
41345 */
41346 onHide: _react2.default.PropTypes.func,
41347
41348 /**
41349 * Include a backdrop component.
41350 */
41351 backdrop: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.bool, _react2.default.PropTypes.oneOf(['static'])]),
41352
41353 /**
41354 * A function that returns a backdrop component. Useful for custom
41355 * backdrop rendering.
41356 *
41357 * ```js
41358 * renderBackdrop={props => <MyBackdrop {...props} />}
41359 * ```
41360 */
41361 renderBackdrop: _react2.default.PropTypes.func,
41362
41363 /**
41364 * A callback fired when the escape key, if specified in `keyboard`, is pressed.
41365 */
41366 onEscapeKeyUp: _react2.default.PropTypes.func,
41367
41368 /**
41369 * A callback fired when the backdrop, if specified, is clicked.
41370 */
41371 onBackdropClick: _react2.default.PropTypes.func,
41372
41373 /**
41374 * A style object for the backdrop component.
41375 */
41376 backdropStyle: _react2.default.PropTypes.object,
41377
41378 /**
41379 * A css class or classes for the backdrop component.
41380 */
41381 backdropClassName: _react2.default.PropTypes.string,
41382
41383 /**
41384 * A css class or set of classes applied to the modal container when the modal is open,
41385 * and removed when it is closed.
41386 */
41387 containerClassName: _react2.default.PropTypes.string,
41388
41389 /**
41390 * Close the modal when escape key is pressed
41391 */
41392 keyboard: _react2.default.PropTypes.bool,
41393
41394 /**
41395 * A `<Transition/>` component to use for the dialog and backdrop components.
41396 */
41397 transition: _elementType2.default,
41398
41399 /**
41400 * The `timeout` of the dialog transition if specified. This number is used to ensure that
41401 * transition callbacks are always fired, even if browser transition events are canceled.
41402 *
41403 * See the Transition `timeout` prop for more infomation.
41404 */
41405 dialogTransitionTimeout: _react2.default.PropTypes.number,
41406
41407 /**
41408 * The `timeout` of the backdrop transition if specified. This number is used to
41409 * ensure that transition callbacks are always fired, even if browser transition events are canceled.
41410 *
41411 * See the Transition `timeout` prop for more infomation.
41412 */
41413 backdropTransitionTimeout: _react2.default.PropTypes.number,
41414
41415 /**
41416 * When `true` The modal will automatically shift focus to itself when it opens, and
41417 * replace it to the last focused element when it closes. This also
41418 * works correctly with any Modal children that have the `autoFocus` prop.
41419 *
41420 * Generally this should never be set to `false` as it makes the Modal less
41421 * accessible to assistive technologies, like screen readers.
41422 */
41423 autoFocus: _react2.default.PropTypes.bool,
41424
41425 /**
41426 * When `true` The modal will prevent focus from leaving the Modal while open.
41427 *
41428 * Generally this should never be set to `false` as it makes the Modal less
41429 * accessible to assistive technologies, like screen readers.
41430 */
41431 enforceFocus: _react2.default.PropTypes.bool,
41432
41433 /**
41434 * Callback fired before the Modal transitions in
41435 */
41436 onEnter: _react2.default.PropTypes.func,
41437
41438 /**
41439 * Callback fired as the Modal begins to transition in
41440 */
41441 onEntering: _react2.default.PropTypes.func,
41442
41443 /**
41444 * Callback fired after the Modal finishes transitioning in
41445 */
41446 onEntered: _react2.default.PropTypes.func,
41447
41448 /**
41449 * Callback fired right before the Modal transitions out
41450 */
41451 onExit: _react2.default.PropTypes.func,
41452
41453 /**
41454 * Callback fired as the Modal begins to transition out
41455 */
41456 onExiting: _react2.default.PropTypes.func,
41457
41458 /**
41459 * Callback fired after the Modal finishes transitioning out
41460 */
41461 onExited: _react2.default.PropTypes.func,
41462
41463 /**
41464 * A ModalManager instance used to track and manage the state of open
41465 * Modals. Useful when customizing how modals interact within a container
41466 */
41467 manager: _react2.default.PropTypes.object.isRequired
41468 }),
41469
41470 getDefaultProps: function getDefaultProps() {
41471 var noop = function noop() {};
41472
41473 return {
41474 show: false,
41475 backdrop: true,
41476 keyboard: true,
41477 autoFocus: true,
41478 enforceFocus: true,
41479 onHide: noop,
41480 manager: modalManager,
41481 renderBackdrop: function renderBackdrop(props) {
41482 return _react2.default.createElement('div', props);
41483 }
41484 };
41485 },
41486 getInitialState: function getInitialState() {
41487 return { exited: !this.props.show };
41488 },
41489 render: function render() {
41490 var _props = this.props;
41491 var show = _props.show;
41492 var container = _props.container;
41493 var children = _props.children;
41494 var Transition = _props.transition;
41495 var backdrop = _props.backdrop;
41496 var dialogTransitionTimeout = _props.dialogTransitionTimeout;
41497 var className = _props.className;
41498 var style = _props.style;
41499 var onExit = _props.onExit;
41500 var onExiting = _props.onExiting;
41501 var onEnter = _props.onEnter;
41502 var onEntering = _props.onEntering;
41503 var onEntered = _props.onEntered;
41504
41505
41506 var dialog = _react2.default.Children.only(children);
41507
41508 var mountModal = show || Transition && !this.state.exited;
41509 if (!mountModal) {
41510 return null;
41511 }
41512
41513 var _dialog$props = dialog.props;
41514 var role = _dialog$props.role;
41515 var tabIndex = _dialog$props.tabIndex;
41516
41517
41518 if (role === undefined || tabIndex === undefined) {
41519 dialog = (0, _react.cloneElement)(dialog, {
41520 role: role === undefined ? 'document' : role,
41521 tabIndex: tabIndex == null ? '-1' : tabIndex
41522 });
41523 }
41524
41525 if (Transition) {
41526 dialog = _react2.default.createElement(
41527 Transition,
41528 {
41529 transitionAppear: true,
41530 unmountOnExit: true,
41531 'in': show,
41532 timeout: dialogTransitionTimeout,
41533 onExit: onExit,
41534 onExiting: onExiting,
41535 onExited: this.handleHidden,
41536 onEnter: onEnter,
41537 onEntering: onEntering,
41538 onEntered: onEntered
41539 },
41540 dialog
41541 );
41542 }
41543
41544 return _react2.default.createElement(
41545 _Portal2.default,
41546 {
41547 ref: this.setMountNode,
41548 container: container
41549 },
41550 _react2.default.createElement(
41551 'div',
41552 {
41553 ref: 'modal',
41554 role: role || 'dialog',
41555 style: style,
41556 className: className
41557 },
41558 backdrop && this.renderBackdrop(),
41559 dialog
41560 )
41561 );
41562 },
41563 renderBackdrop: function renderBackdrop() {
41564 var _this = this;
41565
41566 var _props2 = this.props;
41567 var backdropStyle = _props2.backdropStyle;
41568 var backdropClassName = _props2.backdropClassName;
41569 var renderBackdrop = _props2.renderBackdrop;
41570 var Transition = _props2.transition;
41571 var backdropTransitionTimeout = _props2.backdropTransitionTimeout;
41572
41573
41574 var backdropRef = function backdropRef(ref) {
41575 return _this.backdrop = ref;
41576 };
41577
41578 var backdrop = _react2.default.createElement('div', {
41579 ref: backdropRef,
41580 style: this.props.backdropStyle,
41581 className: this.props.backdropClassName,
41582 onClick: this.handleBackdropClick
41583 });
41584
41585 if (Transition) {
41586 backdrop = _react2.default.createElement(
41587 Transition,
41588 { transitionAppear: true,
41589 'in': this.props.show,
41590 timeout: backdropTransitionTimeout
41591 },
41592 renderBackdrop({
41593 ref: backdropRef,
41594 style: backdropStyle,
41595 className: backdropClassName,
41596 onClick: this.handleBackdropClick
41597 })
41598 );
41599 }
41600
41601 return backdrop;
41602 },
41603 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
41604 if (nextProps.show) {
41605 this.setState({ exited: false });
41606 } else if (!nextProps.transition) {
41607 // Otherwise let handleHidden take care of marking exited.
41608 this.setState({ exited: true });
41609 }
41610 },
41611 componentWillUpdate: function componentWillUpdate(nextProps) {
41612 if (!this.props.show && nextProps.show) {
41613 this.checkForFocus();
41614 }
41615 },
41616 componentDidMount: function componentDidMount() {
41617 if (this.props.show) {
41618 this.onShow();
41619 }
41620 },
41621 componentDidUpdate: function componentDidUpdate(prevProps) {
41622 var transition = this.props.transition;
41623
41624
41625 if (prevProps.show && !this.props.show && !transition) {
41626 // Otherwise handleHidden will call this.
41627 this.onHide();
41628 } else if (!prevProps.show && this.props.show) {
41629 this.onShow();
41630 }
41631 },
41632 componentWillUnmount: function componentWillUnmount() {
41633 var _props3 = this.props;
41634 var show = _props3.show;
41635 var transition = _props3.transition;
41636
41637
41638 if (show || transition && !this.state.exited) {
41639 this.onHide();
41640 }
41641 },
41642 onShow: function onShow() {
41643 var doc = (0, _ownerDocument2.default)(this);
41644 var container = (0, _getContainer2.default)(this.props.container, doc.body);
41645
41646 this.props.manager.add(this, container, this.props.containerClassName);
41647
41648 this._onDocumentKeyupListener = (0, _addEventListener2.default)(doc, 'keyup', this.handleDocumentKeyUp);
41649
41650 this._onFocusinListener = (0, _addFocusListener2.default)(this.enforceFocus);
41651
41652 this.focus();
41653
41654 if (this.props.onShow) {
41655 this.props.onShow();
41656 }
41657 },
41658 onHide: function onHide() {
41659 this.props.manager.remove(this);
41660
41661 this._onDocumentKeyupListener.remove();
41662
41663 this._onFocusinListener.remove();
41664
41665 this.restoreLastFocus();
41666 },
41667 setMountNode: function setMountNode(ref) {
41668 this.mountNode = ref ? ref.getMountNode() : ref;
41669 },
41670 handleHidden: function handleHidden() {
41671 this.setState({ exited: true });
41672 this.onHide();
41673
41674 if (this.props.onExited) {
41675 var _props4;
41676
41677 (_props4 = this.props).onExited.apply(_props4, arguments);
41678 }
41679 },
41680 handleBackdropClick: function handleBackdropClick(e) {
41681 if (e.target !== e.currentTarget) {
41682 return;
41683 }
41684
41685 if (this.props.onBackdropClick) {
41686 this.props.onBackdropClick(e);
41687 }
41688
41689 if (this.props.backdrop === true) {
41690 this.props.onHide();
41691 }
41692 },
41693 handleDocumentKeyUp: function handleDocumentKeyUp(e) {
41694 if (this.props.keyboard && e.keyCode === 27 && this.isTopModal()) {
41695 if (this.props.onEscapeKeyUp) {
41696 this.props.onEscapeKeyUp(e);
41697 }
41698 this.props.onHide();
41699 }
41700 },
41701 checkForFocus: function checkForFocus() {
41702 if (_inDOM2.default) {
41703 this.lastFocus = (0, _activeElement2.default)();
41704 }
41705 },
41706 focus: function focus() {
41707 var autoFocus = this.props.autoFocus;
41708 var modalContent = this.getDialogElement();
41709 var current = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));
41710 var focusInModal = current && (0, _contains2.default)(modalContent, current);
41711
41712 if (modalContent && autoFocus && !focusInModal) {
41713 this.lastFocus = current;
41714
41715 if (!modalContent.hasAttribute('tabIndex')) {
41716 modalContent.setAttribute('tabIndex', -1);
41717 (0, _warning2.default)(false, 'The modal content node does not accept focus. ' + 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".');
41718 }
41719
41720 modalContent.focus();
41721 }
41722 },
41723 restoreLastFocus: function restoreLastFocus() {
41724 // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
41725 if (this.lastFocus && this.lastFocus.focus) {
41726 this.lastFocus.focus();
41727 this.lastFocus = null;
41728 }
41729 },
41730 enforceFocus: function enforceFocus() {
41731 var enforceFocus = this.props.enforceFocus;
41732
41733
41734 if (!enforceFocus || !this.isMounted() || !this.isTopModal()) {
41735 return;
41736 }
41737
41738 var active = (0, _activeElement2.default)((0, _ownerDocument2.default)(this));
41739 var modal = this.getDialogElement();
41740
41741 if (modal && modal !== active && !(0, _contains2.default)(modal, active)) {
41742 modal.focus();
41743 }
41744 },
41745
41746
41747 //instead of a ref, which might conflict with one the parent applied.
41748 getDialogElement: function getDialogElement() {
41749 var node = this.refs.modal;
41750 return node && node.lastChild;
41751 },
41752 isTopModal: function isTopModal() {
41753 return this.props.manager.isTopModal(this);
41754 }
41755 });
41756
41757 Modal.Manager = _ModalManager2.default;
41758
41759 exports.default = Modal;
41760 module.exports = exports['default'];
41761
41762/***/ },
41763/* 535 */
41764/***/ function(module, exports, __webpack_require__) {
41765
41766 /**
41767 * Copyright 2014-2015, Facebook, Inc.
41768 * All rights reserved.
41769 *
41770 * This source code is licensed under the BSD-style license found in the
41771 * LICENSE file in the root directory of this source tree. An additional grant
41772 * of patent rights can be found in the PATENTS file in the same directory.
41773 */
41774
41775 'use strict';
41776
41777 /**
41778 * Similar to invariant but only logs a warning if the condition is not met.
41779 * This can be used to log issues in development environments in critical
41780 * paths. Removing the logging code for production environments will keep the
41781 * same logic and follow the same code paths.
41782 */
41783
41784 var warning = function() {};
41785
41786 if ((undefined) !== 'production') {
41787 warning = function(condition, format, args) {
41788 var len = arguments.length;
41789 args = new Array(len > 2 ? len - 2 : 0);
41790 for (var key = 2; key < len; key++) {
41791 args[key - 2] = arguments[key];
41792 }
41793 if (format === undefined) {
41794 throw new Error(
41795 '`warning(condition, format, ...args)` requires a warning ' +
41796 'message argument'
41797 );
41798 }
41799
41800 if (format.length < 10 || (/^[s\W]*$/).test(format)) {
41801 throw new Error(
41802 'The warning format should be able to uniquely identify this ' +
41803 'warning. Please, use a more descriptive format than: ' + format
41804 );
41805 }
41806
41807 if (!condition) {
41808 var argIndex = 0;
41809 var message = 'Warning: ' +
41810 format.replace(/%s/g, function() {
41811 return args[argIndex++];
41812 });
41813 if (typeof console !== 'undefined') {
41814 console.error(message);
41815 }
41816 try {
41817 // This error was thrown as a convenience so that you can use this stack
41818 // to find the callsite that caused this warning to fire.
41819 throw new Error(message);
41820 } catch(x) {}
41821 }
41822 };
41823 }
41824
41825 module.exports = warning;
41826
41827
41828/***/ },
41829/* 536 */
41830/***/ function(module, exports, __webpack_require__) {
41831
41832 'use strict';
41833
41834 exports.__esModule = true;
41835
41836 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
41837
41838 var _react = __webpack_require__(89);
41839
41840 var _react2 = _interopRequireDefault(_react);
41841
41842 var _createChainableTypeChecker = __webpack_require__(537);
41843
41844 var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
41845
41846 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41847
41848 function validate(props, propName, componentName, location, propFullName) {
41849 var propValue = props[propName];
41850 var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
41851
41852 if (_react2.default.isValidElement(propValue)) {
41853 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.');
41854 }
41855
41856 if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) {
41857 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.');
41858 }
41859
41860 return null;
41861 }
41862
41863 exports.default = (0, _createChainableTypeChecker2.default)(validate);
41864
41865/***/ },
41866/* 537 */
41867/***/ function(module, exports) {
41868
41869 'use strict';
41870
41871 exports.__esModule = true;
41872 exports.default = createChainableTypeChecker;
41873 /**
41874 * Copyright 2013-present, Facebook, Inc.
41875 * All rights reserved.
41876 *
41877 * This source code is licensed under the BSD-style license found in the
41878 * LICENSE file in the root directory of this source tree. An additional grant
41879 * of patent rights can be found in the PATENTS file in the same directory.
41880 */
41881
41882 // Mostly taken from ReactPropTypes.
41883
41884 function createChainableTypeChecker(validate) {
41885 function checkType(isRequired, props, propName, componentName, location, propFullName) {
41886 var componentNameSafe = componentName || '<<anonymous>>';
41887 var propFullNameSafe = propFullName || propName;
41888
41889 if (props[propName] == null) {
41890 if (isRequired) {
41891 return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
41892 }
41893
41894 return null;
41895 }
41896
41897 for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
41898 args[_key - 6] = arguments[_key];
41899 }
41900
41901 return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
41902 }
41903
41904 var chainedCheckType = checkType.bind(null, false);
41905 chainedCheckType.isRequired = checkType.bind(null, true);
41906
41907 return chainedCheckType;
41908 }
41909
41910/***/ },
41911/* 538 */
41912/***/ function(module, exports, __webpack_require__) {
41913
41914 'use strict';
41915
41916 exports.__esModule = true;
41917
41918 var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
41919
41920 var _react = __webpack_require__(89);
41921
41922 var _react2 = _interopRequireDefault(_react);
41923
41924 var _createChainableTypeChecker = __webpack_require__(537);
41925
41926 var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
41927
41928 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41929
41930 function elementType(props, propName, componentName, location, propFullName) {
41931 var propValue = props[propName];
41932 var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
41933
41934 if (_react2.default.isValidElement(propValue)) {
41935 return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
41936 }
41937
41938 if (propType !== 'function' && propType !== 'string') {
41939 return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
41940 }
41941
41942 return null;
41943 }
41944
41945 exports.default = (0, _createChainableTypeChecker2.default)(elementType);
41946
41947/***/ },
41948/* 539 */
41949/***/ function(module, exports, __webpack_require__) {
41950
41951 'use strict';
41952
41953 Object.defineProperty(exports, "__esModule", {
41954 value: true
41955 });
41956
41957 var _react = __webpack_require__(89);
41958
41959 var _react2 = _interopRequireDefault(_react);
41960
41961 var _reactDom = __webpack_require__(122);
41962
41963 var _reactDom2 = _interopRequireDefault(_reactDom);
41964
41965 var _componentOrElement = __webpack_require__(536);
41966
41967 var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
41968
41969 var _ownerDocument = __webpack_require__(498);
41970
41971 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
41972
41973 var _getContainer = __webpack_require__(540);
41974
41975 var _getContainer2 = _interopRequireDefault(_getContainer);
41976
41977 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41978
41979 /**
41980 * The `<Portal/>` component renders its children into a new "subtree" outside of current component hierarchy.
41981 * You can think of it as a declarative `appendChild()`, or jQuery's `$.fn.appendTo()`.
41982 * The children of `<Portal/>` component will be appended to the `container` specified.
41983 */
41984 var Portal = _react2.default.createClass({
41985
41986 displayName: 'Portal',
41987
41988 propTypes: {
41989 /**
41990 * A Node, Component instance, or function that returns either. The `container` will have the Portal children
41991 * appended to it.
41992 */
41993 container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func])
41994 },
41995
41996 componentDidMount: function componentDidMount() {
41997 this._renderOverlay();
41998 },
41999 componentDidUpdate: function componentDidUpdate() {
42000 this._renderOverlay();
42001 },
42002 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
42003 if (this._overlayTarget && nextProps.container !== this.props.container) {
42004 this._portalContainerNode.removeChild(this._overlayTarget);
42005 this._portalContainerNode = (0, _getContainer2.default)(nextProps.container, (0, _ownerDocument2.default)(this).body);
42006 this._portalContainerNode.appendChild(this._overlayTarget);
42007 }
42008 },
42009 componentWillUnmount: function componentWillUnmount() {
42010 this._unrenderOverlay();
42011 this._unmountOverlayTarget();
42012 },
42013 _mountOverlayTarget: function _mountOverlayTarget() {
42014 if (!this._overlayTarget) {
42015 this._overlayTarget = document.createElement('div');
42016 this._portalContainerNode = (0, _getContainer2.default)(this.props.container, (0, _ownerDocument2.default)(this).body);
42017 this._portalContainerNode.appendChild(this._overlayTarget);
42018 }
42019 },
42020 _unmountOverlayTarget: function _unmountOverlayTarget() {
42021 if (this._overlayTarget) {
42022 this._portalContainerNode.removeChild(this._overlayTarget);
42023 this._overlayTarget = null;
42024 }
42025 this._portalContainerNode = null;
42026 },
42027 _renderOverlay: function _renderOverlay() {
42028
42029 var overlay = !this.props.children ? null : _react2.default.Children.only(this.props.children);
42030
42031 // Save reference for future access.
42032 if (overlay !== null) {
42033 this._mountOverlayTarget();
42034 this._overlayInstance = _reactDom2.default.unstable_renderSubtreeIntoContainer(this, overlay, this._overlayTarget);
42035 } else {
42036 // Unrender if the component is null for transitions to null
42037 this._unrenderOverlay();
42038 this._unmountOverlayTarget();
42039 }
42040 },
42041 _unrenderOverlay: function _unrenderOverlay() {
42042 if (this._overlayTarget) {
42043 _reactDom2.default.unmountComponentAtNode(this._overlayTarget);
42044 this._overlayInstance = null;
42045 }
42046 },
42047 render: function render() {
42048 return null;
42049 },
42050 getMountNode: function getMountNode() {
42051 return this._overlayTarget;
42052 },
42053 getOverlayDOMNode: function getOverlayDOMNode() {
42054 if (!this.isMounted()) {
42055 throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.');
42056 }
42057
42058 if (this._overlayInstance) {
42059 return _reactDom2.default.findDOMNode(this._overlayInstance);
42060 }
42061
42062 return null;
42063 }
42064 });
42065
42066 exports.default = Portal;
42067 module.exports = exports['default'];
42068
42069/***/ },
42070/* 540 */
42071/***/ function(module, exports, __webpack_require__) {
42072
42073 'use strict';
42074
42075 Object.defineProperty(exports, "__esModule", {
42076 value: true
42077 });
42078 exports.default = getContainer;
42079
42080 var _reactDom = __webpack_require__(122);
42081
42082 var _reactDom2 = _interopRequireDefault(_reactDom);
42083
42084 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42085
42086 function getContainer(container, defaultContainer) {
42087 container = typeof container === 'function' ? container() : container;
42088 return _reactDom2.default.findDOMNode(container) || defaultContainer;
42089 }
42090 module.exports = exports['default'];
42091
42092/***/ },
42093/* 541 */
42094/***/ function(module, exports, __webpack_require__) {
42095
42096 'use strict';
42097
42098 Object.defineProperty(exports, "__esModule", {
42099 value: true
42100 });
42101
42102 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; }; }();
42103
42104 var _style = __webpack_require__(402);
42105
42106 var _style2 = _interopRequireDefault(_style);
42107
42108 var _class = __webpack_require__(542);
42109
42110 var _class2 = _interopRequireDefault(_class);
42111
42112 var _scrollbarSize = __webpack_require__(533);
42113
42114 var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);
42115
42116 var _isOverflowing = __webpack_require__(546);
42117
42118 var _isOverflowing2 = _interopRequireDefault(_isOverflowing);
42119
42120 var _manageAriaHidden = __webpack_require__(548);
42121
42122 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42123
42124 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
42125
42126 function findIndexOf(arr, cb) {
42127 var idx = -1;
42128 arr.some(function (d, i) {
42129 if (cb(d, i)) {
42130 idx = i;
42131 return true;
42132 }
42133 });
42134 return idx;
42135 }
42136
42137 function findContainer(data, modal) {
42138 return findIndexOf(data, function (d) {
42139 return d.modals.indexOf(modal) !== -1;
42140 });
42141 }
42142
42143 function setContainerStyle(state, container) {
42144 var style = { overflow: 'hidden' };
42145
42146 // we are only interested in the actual `style` here
42147 // becasue we will override it
42148 state.style = {
42149 overflow: container.style.overflow,
42150 paddingRight: container.style.paddingRight
42151 };
42152
42153 if (state.overflowing) {
42154 // use computed style, here to get the real padding
42155 // to add our scrollbar width
42156 style.paddingRight = parseInt((0, _style2.default)(container, 'paddingRight') || 0, 10) + (0, _scrollbarSize2.default)() + 'px';
42157 }
42158
42159 (0, _style2.default)(container, style);
42160 }
42161
42162 function removeContainerStyle(_ref, container) {
42163 var style = _ref.style;
42164
42165
42166 Object.keys(style).forEach(function (key) {
42167 return container.style[key] = style[key];
42168 });
42169 }
42170 /**
42171 * Proper state managment for containers and the modals in those containers.
42172 *
42173 * @internal Used by the Modal to ensure proper styling of containers.
42174 */
42175
42176 var ModalManager = function () {
42177 function ModalManager() {
42178 var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
42179
42180 var _ref2$hideSiblingNode = _ref2.hideSiblingNodes;
42181 var hideSiblingNodes = _ref2$hideSiblingNode === undefined ? true : _ref2$hideSiblingNode;
42182 var _ref2$handleContainer = _ref2.handleContainerOverflow;
42183 var handleContainerOverflow = _ref2$handleContainer === undefined ? true : _ref2$handleContainer;
42184
42185 _classCallCheck(this, ModalManager);
42186
42187 this.hideSiblingNodes = hideSiblingNodes;
42188 this.handleContainerOverflow = handleContainerOverflow;
42189 this.modals = [];
42190 this.containers = [];
42191 this.data = [];
42192 }
42193
42194 _createClass(ModalManager, [{
42195 key: 'add',
42196 value: function add(modal, container, className) {
42197 var modalIdx = this.modals.indexOf(modal);
42198 var containerIdx = this.containers.indexOf(container);
42199
42200 if (modalIdx !== -1) {
42201 return modalIdx;
42202 }
42203
42204 modalIdx = this.modals.length;
42205 this.modals.push(modal);
42206
42207 if (this.hideSiblingNodes) {
42208 (0, _manageAriaHidden.hideSiblings)(container, modal.mountNode);
42209 }
42210
42211 if (containerIdx !== -1) {
42212 this.data[containerIdx].modals.push(modal);
42213 return modalIdx;
42214 }
42215
42216 var data = {
42217 modals: [modal],
42218 //right now only the first modal of a container will have its classes applied
42219 classes: className ? className.split(/\s+/) : [],
42220
42221 overflowing: (0, _isOverflowing2.default)(container)
42222 };
42223
42224 if (this.handleContainerOverflow) {
42225 setContainerStyle(data, container);
42226 }
42227
42228 data.classes.forEach(_class2.default.addClass.bind(null, container));
42229
42230 this.containers.push(container);
42231 this.data.push(data);
42232
42233 return modalIdx;
42234 }
42235 }, {
42236 key: 'remove',
42237 value: function remove(modal) {
42238 var modalIdx = this.modals.indexOf(modal);
42239
42240 if (modalIdx === -1) {
42241 return;
42242 }
42243
42244 var containerIdx = findContainer(this.data, modal);
42245 var data = this.data[containerIdx];
42246 var container = this.containers[containerIdx];
42247
42248 data.modals.splice(data.modals.indexOf(modal), 1);
42249
42250 this.modals.splice(modalIdx, 1);
42251
42252 // if that was the last modal in a container,
42253 // clean up the container
42254 if (data.modals.length === 0) {
42255 data.classes.forEach(_class2.default.removeClass.bind(null, container));
42256
42257 if (this.handleContainerOverflow) {
42258 removeContainerStyle(data, container);
42259 }
42260
42261 if (this.hideSiblingNodes) {
42262 (0, _manageAriaHidden.showSiblings)(container, modal.mountNode);
42263 }
42264 this.containers.splice(containerIdx, 1);
42265 this.data.splice(containerIdx, 1);
42266 } else if (this.hideSiblingNodes) {
42267 //otherwise make sure the next top modal is visible to a SR
42268 (0, _manageAriaHidden.ariaHidden)(false, data.modals[data.modals.length - 1].mountNode);
42269 }
42270 }
42271 }, {
42272 key: 'isTopModal',
42273 value: function isTopModal(modal) {
42274 return !!this.modals.length && this.modals[this.modals.length - 1] === modal;
42275 }
42276 }]);
42277
42278 return ModalManager;
42279 }();
42280
42281 exports.default = ModalManager;
42282 module.exports = exports['default'];
42283
42284/***/ },
42285/* 542 */
42286/***/ function(module, exports, __webpack_require__) {
42287
42288 'use strict';
42289
42290 module.exports = {
42291 addClass: __webpack_require__(543),
42292 removeClass: __webpack_require__(545),
42293 hasClass: __webpack_require__(544)
42294 };
42295
42296/***/ },
42297/* 543 */
42298/***/ function(module, exports, __webpack_require__) {
42299
42300 'use strict';
42301 var hasClass = __webpack_require__(544);
42302
42303 module.exports = function addClass(element, className) {
42304 if (element.classList) element.classList.add(className);else if (!hasClass(element)) element.className = element.className + ' ' + className;
42305 };
42306
42307/***/ },
42308/* 544 */
42309/***/ function(module, exports) {
42310
42311 'use strict';
42312 module.exports = function hasClass(element, className) {
42313 if (element.classList) return !!className && element.classList.contains(className);else return (' ' + element.className + ' ').indexOf(' ' + className + ' ') !== -1;
42314 };
42315
42316/***/ },
42317/* 545 */
42318/***/ function(module, exports) {
42319
42320 'use strict';
42321
42322 module.exports = function removeClass(element, className) {
42323 if (element.classList) element.classList.remove(className);else element.className = element.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
42324 };
42325
42326/***/ },
42327/* 546 */
42328/***/ function(module, exports, __webpack_require__) {
42329
42330 'use strict';
42331
42332 Object.defineProperty(exports, "__esModule", {
42333 value: true
42334 });
42335 exports.default = isOverflowing;
42336
42337 var _isWindow = __webpack_require__(547);
42338
42339 var _isWindow2 = _interopRequireDefault(_isWindow);
42340
42341 var _ownerDocument = __webpack_require__(417);
42342
42343 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
42344
42345 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42346
42347 function isBody(node) {
42348 return node && node.tagName.toLowerCase() === 'body';
42349 }
42350
42351 function bodyIsOverflowing(node) {
42352 var doc = (0, _ownerDocument2.default)(node);
42353 var win = (0, _isWindow2.default)(doc);
42354 var fullWidth = win.innerWidth;
42355
42356 // Support: ie8, no innerWidth
42357 if (!fullWidth) {
42358 var documentElementRect = doc.documentElement.getBoundingClientRect();
42359 fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);
42360 }
42361
42362 return doc.body.clientWidth < fullWidth;
42363 }
42364
42365 function isOverflowing(container) {
42366 var win = (0, _isWindow2.default)(container);
42367
42368 return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
42369 }
42370 module.exports = exports['default'];
42371
42372/***/ },
42373/* 547 */
42374/***/ function(module, exports) {
42375
42376 'use strict';
42377
42378 module.exports = function getWindow(node) {
42379 return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
42380 };
42381
42382/***/ },
42383/* 548 */
42384/***/ function(module, exports) {
42385
42386 'use strict';
42387
42388 Object.defineProperty(exports, "__esModule", {
42389 value: true
42390 });
42391 exports.ariaHidden = ariaHidden;
42392 exports.hideSiblings = hideSiblings;
42393 exports.showSiblings = showSiblings;
42394
42395 var BLACKLIST = ['template', 'script', 'style'];
42396
42397 var isHidable = function isHidable(_ref) {
42398 var nodeType = _ref.nodeType;
42399 var tagName = _ref.tagName;
42400 return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;
42401 };
42402
42403 var siblings = function siblings(container, mount, cb) {
42404 mount = [].concat(mount);
42405
42406 [].forEach.call(container.children, function (node) {
42407 if (mount.indexOf(node) === -1 && isHidable(node)) {
42408 cb(node);
42409 }
42410 });
42411 };
42412
42413 function ariaHidden(show, node) {
42414 if (!node) {
42415 return;
42416 }
42417 if (show) {
42418 node.setAttribute('aria-hidden', 'true');
42419 } else {
42420 node.removeAttribute('aria-hidden');
42421 }
42422 }
42423
42424 function hideSiblings(container, mountNode) {
42425 siblings(container, mountNode, function (node) {
42426 return ariaHidden(true, node);
42427 });
42428 }
42429
42430 function showSiblings(container, mountNode) {
42431 siblings(container, mountNode, function (node) {
42432 return ariaHidden(false, node);
42433 });
42434 }
42435
42436/***/ },
42437/* 549 */
42438/***/ function(module, exports) {
42439
42440 'use strict';
42441
42442 Object.defineProperty(exports, "__esModule", {
42443 value: true
42444 });
42445 exports.default = addFocusListener;
42446 /**
42447 * Firefox doesn't have a focusin event so using capture is easiest way to get bubbling
42448 * IE8 can't do addEventListener, but does have onfocusin, so we use that in ie8
42449 *
42450 * We only allow one Listener at a time to avoid stack overflows
42451 */
42452 function addFocusListener(handler) {
42453 var useFocusin = !document.addEventListener;
42454 var remove = void 0;
42455
42456 if (useFocusin) {
42457 document.attachEvent('onfocusin', handler);
42458 remove = function remove() {
42459 return document.detachEvent('onfocusin', handler);
42460 };
42461 } else {
42462 document.addEventListener('focus', handler, true);
42463 remove = function remove() {
42464 return document.removeEventListener('focus', handler, true);
42465 };
42466 }
42467
42468 return { remove: remove };
42469 }
42470 module.exports = exports['default'];
42471
42472/***/ },
42473/* 550 */
42474/***/ function(module, exports, __webpack_require__) {
42475
42476 'use strict';
42477
42478 var _extends = __webpack_require__(338)['default'];
42479
42480 var _interopRequireDefault = __webpack_require__(335)['default'];
42481
42482 exports.__esModule = true;
42483
42484 var _classnames = __webpack_require__(356);
42485
42486 var _classnames2 = _interopRequireDefault(_classnames);
42487
42488 var _react = __webpack_require__(89);
42489
42490 var _react2 = _interopRequireDefault(_react);
42491
42492 var _styleMaps = __webpack_require__(358);
42493
42494 var _utilsBootstrapUtils = __webpack_require__(357);
42495
42496 /* eslint-disable react/prop-types */
42497 var ModalDialog = _react2['default'].createClass({
42498 displayName: 'ModalDialog',
42499
42500 propTypes: {
42501 /**
42502 * A css class to apply to the Modal dialog DOM node.
42503 */
42504 dialogClassName: _react2['default'].PropTypes.string
42505 },
42506
42507 render: function render() {
42508 var modalStyle = _extends({
42509 display: 'block'
42510 }, this.props.style);
42511 var bsClassPrefix = _utilsBootstrapUtils.prefix(this.props);
42512 var dialogClasses = _utilsBootstrapUtils.getClassSet(this.props);
42513
42514 delete dialogClasses[bsClassPrefix];
42515 dialogClasses[_utilsBootstrapUtils.prefix(this.props, 'dialog')] = true;
42516
42517 return _react2['default'].createElement(
42518 'div',
42519 _extends({}, this.props, {
42520 title: null,
42521 tabIndex: '-1',
42522 role: 'dialog',
42523 style: modalStyle,
42524 className: _classnames2['default'](this.props.className, bsClassPrefix)
42525 }),
42526 _react2['default'].createElement(
42527 'div',
42528 { className: _classnames2['default'](this.props.dialogClassName, dialogClasses) },
42529 _react2['default'].createElement(
42530 'div',
42531 { className: _utilsBootstrapUtils.prefix(this.props, 'content'), role: 'document' },
42532 this.props.children
42533 )
42534 )
42535 );
42536 }
42537 });
42538
42539 exports['default'] = _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL], _utilsBootstrapUtils.bsClass('modal', ModalDialog));
42540 module.exports = exports['default'];
42541
42542/***/ },
42543/* 551 */
42544/***/ function(module, exports, __webpack_require__) {
42545
42546 'use strict';
42547
42548 var _inherits = __webpack_require__(372)['default'];
42549
42550 var _classCallCheck = __webpack_require__(379)['default'];
42551
42552 var _extends = __webpack_require__(338)['default'];
42553
42554 var _interopRequireDefault = __webpack_require__(335)['default'];
42555
42556 exports.__esModule = true;
42557
42558 var _classnames = __webpack_require__(356);
42559
42560 var _classnames2 = _interopRequireDefault(_classnames);
42561
42562 var _react = __webpack_require__(89);
42563
42564 var _react2 = _interopRequireDefault(_react);
42565
42566 var _utilsBootstrapUtils = __webpack_require__(357);
42567
42568 var ModalBody = (function (_React$Component) {
42569 _inherits(ModalBody, _React$Component);
42570
42571 function ModalBody() {
42572 _classCallCheck(this, ModalBody);
42573
42574 _React$Component.apply(this, arguments);
42575 }
42576
42577 ModalBody.prototype.render = function render() {
42578 return _react2['default'].createElement(
42579 'div',
42580 _extends({}, this.props, {
42581 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.prefix(this.props, 'body'))
42582 }),
42583 this.props.children
42584 );
42585 };
42586
42587 return ModalBody;
42588 })(_react2['default'].Component);
42589
42590 exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalBody);
42591 module.exports = exports['default'];
42592
42593/***/ },
42594/* 552 */
42595/***/ function(module, exports, __webpack_require__) {
42596
42597 'use strict';
42598
42599 var _inherits = __webpack_require__(372)['default'];
42600
42601 var _classCallCheck = __webpack_require__(379)['default'];
42602
42603 var _objectWithoutProperties = __webpack_require__(355)['default'];
42604
42605 var _extends = __webpack_require__(338)['default'];
42606
42607 var _interopRequireDefault = __webpack_require__(335)['default'];
42608
42609 exports.__esModule = true;
42610
42611 var _classnames = __webpack_require__(356);
42612
42613 var _classnames2 = _interopRequireDefault(_classnames);
42614
42615 var _react = __webpack_require__(89);
42616
42617 var _react2 = _interopRequireDefault(_react);
42618
42619 var _utilsBootstrapUtils = __webpack_require__(357);
42620
42621 var _utilsCreateChainedFunction = __webpack_require__(414);
42622
42623 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
42624
42625 var ModalHeader = (function (_React$Component) {
42626 _inherits(ModalHeader, _React$Component);
42627
42628 function ModalHeader() {
42629 _classCallCheck(this, ModalHeader);
42630
42631 _React$Component.apply(this, arguments);
42632 }
42633
42634 ModalHeader.prototype.render = function render() {
42635 var _props = this.props;
42636 var label = _props['aria-label'];
42637
42638 var props = _objectWithoutProperties(_props, ['aria-label']);
42639
42640 var onHide = _utilsCreateChainedFunction2['default'](this.context.$bs_onModalHide, this.props.onHide);
42641
42642 return _react2['default'].createElement(
42643 'div',
42644 _extends({}, props, {
42645 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.prefix(this.props, 'header'))
42646 }),
42647 this.props.closeButton && _react2['default'].createElement(
42648 'button',
42649 {
42650 type: 'button',
42651 className: 'close',
42652 'aria-label': label,
42653 onClick: onHide },
42654 _react2['default'].createElement(
42655 'span',
42656 { 'aria-hidden': 'true' },
42657 '×'
42658 )
42659 ),
42660 this.props.children
42661 );
42662 };
42663
42664 return ModalHeader;
42665 })(_react2['default'].Component);
42666
42667 ModalHeader.propTypes = {
42668 /**
42669 * The 'aria-label' attribute provides an accessible label for the close button.
42670 * It is used for Assistive Technology when the label text is not readable.
42671 */
42672 'aria-label': _react2['default'].PropTypes.string,
42673
42674 bsClass: _react2['default'].PropTypes.string,
42675
42676 /**
42677 * Specify whether the Component should contain a close button
42678 */
42679 closeButton: _react2['default'].PropTypes.bool,
42680
42681 /**
42682 * A Callback fired when the close button is clicked. If used directly inside a Modal component, the onHide will automatically
42683 * be propagated up to the parent Modal `onHide`.
42684 */
42685 onHide: _react2['default'].PropTypes.func
42686 };
42687
42688 ModalHeader.contextTypes = {
42689 '$bs_onModalHide': _react2['default'].PropTypes.func
42690 };
42691
42692 ModalHeader.defaultProps = {
42693 'aria-label': 'Close',
42694 closeButton: false
42695 };
42696
42697 exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalHeader);
42698 module.exports = exports['default'];
42699
42700/***/ },
42701/* 553 */
42702/***/ function(module, exports, __webpack_require__) {
42703
42704 'use strict';
42705
42706 var _inherits = __webpack_require__(372)['default'];
42707
42708 var _classCallCheck = __webpack_require__(379)['default'];
42709
42710 var _extends = __webpack_require__(338)['default'];
42711
42712 var _interopRequireDefault = __webpack_require__(335)['default'];
42713
42714 exports.__esModule = true;
42715
42716 var _classnames = __webpack_require__(356);
42717
42718 var _classnames2 = _interopRequireDefault(_classnames);
42719
42720 var _react = __webpack_require__(89);
42721
42722 var _react2 = _interopRequireDefault(_react);
42723
42724 var _utilsBootstrapUtils = __webpack_require__(357);
42725
42726 var ModalTitle = (function (_React$Component) {
42727 _inherits(ModalTitle, _React$Component);
42728
42729 function ModalTitle() {
42730 _classCallCheck(this, ModalTitle);
42731
42732 _React$Component.apply(this, arguments);
42733 }
42734
42735 ModalTitle.prototype.render = function render() {
42736 return _react2['default'].createElement(
42737 'h4',
42738 _extends({}, this.props, {
42739 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.prefix(this.props, 'title'))
42740 }),
42741 this.props.children
42742 );
42743 };
42744
42745 return ModalTitle;
42746 })(_react2['default'].Component);
42747
42748 exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalTitle);
42749 module.exports = exports['default'];
42750
42751/***/ },
42752/* 554 */
42753/***/ function(module, exports, __webpack_require__) {
42754
42755 'use strict';
42756
42757 var _inherits = __webpack_require__(372)['default'];
42758
42759 var _classCallCheck = __webpack_require__(379)['default'];
42760
42761 var _extends = __webpack_require__(338)['default'];
42762
42763 var _interopRequireDefault = __webpack_require__(335)['default'];
42764
42765 exports.__esModule = true;
42766
42767 var _classnames = __webpack_require__(356);
42768
42769 var _classnames2 = _interopRequireDefault(_classnames);
42770
42771 var _react = __webpack_require__(89);
42772
42773 var _react2 = _interopRequireDefault(_react);
42774
42775 var _utilsBootstrapUtils = __webpack_require__(357);
42776
42777 var ModalFooter = (function (_React$Component) {
42778 _inherits(ModalFooter, _React$Component);
42779
42780 function ModalFooter() {
42781 _classCallCheck(this, ModalFooter);
42782
42783 _React$Component.apply(this, arguments);
42784 }
42785
42786 ModalFooter.prototype.render = function render() {
42787 return _react2['default'].createElement(
42788 'div',
42789 _extends({}, this.props, {
42790 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.prefix(this.props, 'footer'))
42791 }),
42792 this.props.children
42793 );
42794 };
42795
42796 return ModalFooter;
42797 })(_react2['default'].Component);
42798
42799 ModalFooter.propTypes = {
42800 /**
42801 * A css class applied to the Component
42802 */
42803 bsClass: _react2['default'].PropTypes.string
42804 };
42805
42806 ModalFooter.defaultProps = {
42807 bsClass: 'modal'
42808 };
42809
42810 exports['default'] = _utilsBootstrapUtils.bsClass('modal', ModalFooter);
42811 module.exports = exports['default'];
42812
42813/***/ },
42814/* 555 */
42815/***/ function(module, exports, __webpack_require__) {
42816
42817 'use strict';
42818
42819 var _inherits = __webpack_require__(372)['default'];
42820
42821 var _classCallCheck = __webpack_require__(379)['default'];
42822
42823 var _extends = __webpack_require__(338)['default'];
42824
42825 var _interopRequireDefault = __webpack_require__(335)['default'];
42826
42827 exports.__esModule = true;
42828
42829 var _classnames = __webpack_require__(356);
42830
42831 var _classnames2 = _interopRequireDefault(_classnames);
42832
42833 var _keycode = __webpack_require__(419);
42834
42835 var _keycode2 = _interopRequireDefault(_keycode);
42836
42837 var _react = __webpack_require__(89);
42838
42839 var _react2 = _interopRequireDefault(_react);
42840
42841 var _reactDom = __webpack_require__(122);
42842
42843 var _reactDom2 = _interopRequireDefault(_reactDom);
42844
42845 var _reactPropTypesLibAll = __webpack_require__(384);
42846
42847 var _reactPropTypesLibAll2 = _interopRequireDefault(_reactPropTypesLibAll);
42848
42849 var _warning = __webpack_require__(271);
42850
42851 var _warning2 = _interopRequireDefault(_warning);
42852
42853 var _utilsBootstrapUtils = __webpack_require__(357);
42854
42855 var _utilsCreateChainedFunction = __webpack_require__(414);
42856
42857 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
42858
42859 var _utilsTabUtils = __webpack_require__(556);
42860
42861 var _utilsValidComponentChildren = __webpack_require__(365);
42862
42863 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
42864
42865 var Nav = (function (_React$Component) {
42866 _inherits(Nav, _React$Component);
42867
42868 function Nav() {
42869 _classCallCheck(this, Nav);
42870
42871 _React$Component.apply(this, arguments);
42872 }
42873
42874 Nav.prototype.componentDidUpdate = function componentDidUpdate() {
42875 if (this._needsRefocus) {
42876 var ul = this.refs.ul && _reactDom2['default'].findDOMNode(this.refs.ul);
42877 var tabs = ul ? ul.children || [] : [];
42878 var tabIdx = this.eventKeys().indexOf(this.getActiveKey());
42879
42880 this._needsRefocus = false;
42881
42882 if (tabIdx !== -1) {
42883 var tabNode = tabs[tabIdx];
42884
42885 if (tabNode && tabNode.firstChild) {
42886 tabNode.firstChild.focus();
42887 }
42888 }
42889 }
42890 };
42891
42892 Nav.prototype.render = function render() {
42893 var className = this.props.className;
42894
42895 var isNavbar = this.props.navbar != null ? this.props.navbar : this.context.$bs_navbar;
42896
42897 var classes = _utilsBootstrapUtils.getClassSet(this.props);
42898
42899 classes[_utilsBootstrapUtils.prefix(this.props, 'stacked')] = this.props.stacked;
42900 classes[_utilsBootstrapUtils.prefix(this.props, 'justified')] = this.props.justified;
42901
42902 if (isNavbar) {
42903 var bsClass = this.context.$bs_navbar_bsClass || 'navbar';
42904
42905 classes[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'nav')] = true;
42906 classes[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'right')] = this.props.pullRight;
42907 classes[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'left')] = this.props.pullLeft;
42908 } else {
42909 classes['pull-right'] = this.props.pullRight;
42910 classes['pull-left'] = this.props.pullLeft;
42911 }
42912
42913 var list = _react2['default'].createElement(
42914 'ul',
42915 _extends({ ref: 'ul'
42916 }, this.props, {
42917 role: this.getNavRole(),
42918 className: _classnames2['default'](className, classes)
42919 }),
42920 _utilsValidComponentChildren2['default'].map(this.props.children, this.renderNavItem, this)
42921 );
42922
42923 return list;
42924 };
42925
42926 Nav.prototype.renderNavItem = function renderNavItem(child, index) {
42927 var onSelect = _utilsCreateChainedFunction2['default'](child.props.onSelect, this.props.onSelect);
42928 var active = this.isChildActive(child);
42929 var tabProps = this.getTabProps(child, active, onSelect);
42930
42931 return _react.cloneElement(child, _extends({
42932 active: active,
42933 activeKey: this.props.activeKey,
42934 activeHref: this.props.activeHref,
42935 onSelect: onSelect,
42936 key: child.key || index,
42937 navItem: true
42938 }, tabProps));
42939 };
42940
42941 Nav.prototype.getActiveKey = function getActiveKey() {
42942 var context = this.context.$bs_tabcontainer;
42943 if (!context) {
42944 return this.props.activeKey;
42945 }
42946
42947 (undefined) !== 'production' ? _warning2['default'](!(this.props.activeKey != null || this.props.activeHref), 'Specifing a Nav `activeKey` or `activeHref` prop in the context of a `TabContainer` is not supported. ' + 'Instead use `<TabContainer activeKey={' + this.props.activeKey + '} />`') : undefined;
42948
42949 return context.activeKey;
42950 };
42951
42952 Nav.prototype.isChildActive = function isChildActive(child) {
42953 var activeKey = this.getActiveKey();
42954
42955 if (this.context.$bs_tabcontainer) {
42956 (undefined) !== 'production' ? _warning2['default'](!child.props.active, 'Specifying a NavItem `active` prop in the context of a `TabContainer` is not supported. Instead ' + 'use `<TabContainer activeKey={' + child.props.eventKey + '} />`') : undefined;
42957
42958 return child.props.eventKey === activeKey;
42959 }
42960
42961 if (child.props.active) {
42962 return true;
42963 }
42964 if (this.props.activeKey != null) {
42965 if (child.props.eventKey === this.props.activeKey) {
42966 return true;
42967 }
42968 }
42969 if (this.props.activeHref != null) {
42970 if (child.props.href === this.props.activeHref) {
42971 return true;
42972 }
42973 }
42974
42975 return child.props.active;
42976 };
42977
42978 Nav.prototype.getTabProps = function getTabProps(child, isActive, onSelect) {
42979 var navRole = this.getNavRole();
42980 var context = this.context.$bs_tabcontainer;
42981
42982 if (!context && navRole !== 'tablist') {
42983 // No tab props here.
42984 return null;
42985 }
42986
42987 var _child$props = child.props;
42988 var id = _child$props.id;
42989 var controls = _child$props['aria-controls'];
42990 var eventKey = _child$props.eventKey;
42991 var role = _child$props.role;
42992 var onKeyDown = _child$props.onKeyDown;
42993 var _child$props$tabIndex = _child$props.tabIndex;
42994 var tabIndex = _child$props$tabIndex === undefined ? 0 : _child$props$tabIndex;
42995
42996 if (context && context.getId) {
42997 (undefined) !== 'production' ? _warning2['default'](!(id || controls), 'In the context of a TabContainer, NavItems are given generated `id` and `aria-controls` ' + 'attributes for the sake of proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly provide a `generateChildId` prop to the parent TabContainer.') : undefined;
42998
42999 id = context.getId(eventKey, _utilsTabUtils.TAB) || null;
43000 controls = context.getId(eventKey, _utilsTabUtils.PANE) || null;
43001 onSelect = _utilsCreateChainedFunction2['default'](onSelect, context.onSelect);
43002 }
43003
43004 if (navRole === 'tablist') {
43005 role = role || 'tab';
43006 onKeyDown = _utilsCreateChainedFunction2['default'](this.handleTabKeyDown.bind(this, onSelect || function () {}), onKeyDown);
43007 tabIndex = isActive ? tabIndex : -1;
43008 }
43009
43010 return {
43011 onSelect: onSelect,
43012 id: id,
43013 role: role,
43014 onKeyDown: onKeyDown,
43015 'aria-controls': controls,
43016 tabIndex: tabIndex
43017 };
43018 };
43019
43020 Nav.prototype.handleTabKeyDown = function handleTabKeyDown(onSelect, event) {
43021 var keys = this.eventKeys();
43022 var currentKey = this.getActiveKey() || keys[0];
43023 var next = undefined;
43024
43025 switch (event.keyCode) {
43026
43027 case _keycode2['default'].codes.left:
43028 case _keycode2['default'].codes.up:
43029 next = _utilsTabUtils.nextEnabled(this.props.children, currentKey, keys, false);
43030
43031 if (next && next !== currentKey) {
43032 event.preventDefault();
43033 onSelect(next);
43034 this._needsRefocus = true;
43035 }
43036 break;
43037 case _keycode2['default'].codes.right:
43038 case _keycode2['default'].codes.down:
43039 next = _utilsTabUtils.nextEnabled(this.props.children, currentKey, keys, true);
43040
43041 if (next && next !== currentKey) {
43042 event.preventDefault();
43043 onSelect(next);
43044 this._needsRefocus = true;
43045 }
43046 break;
43047 default:
43048 }
43049 };
43050
43051 Nav.prototype.eventKeys = function eventKeys() {
43052 var keys = [];
43053 _utilsValidComponentChildren2['default'].forEach(this.props.children, function (_ref) {
43054 var eventKey = _ref.props.eventKey;
43055 return keys.push(eventKey);
43056 });
43057 return keys;
43058 };
43059
43060 Nav.prototype.getNavRole = function getNavRole() {
43061 return this.props.role || (this.context.$bs_tabcontainer ? 'tablist' : null);
43062 };
43063
43064 return Nav;
43065 })(_react2['default'].Component);
43066
43067 Nav.propTypes = {
43068
43069 /**
43070 * Marks the child NavItem with a matching `href` prop as active.
43071 */
43072 activeHref: _react2['default'].PropTypes.string,
43073
43074 /**
43075 * Marks the NavItem with a matching `eventKey` as active. Has a
43076 * higher precedence over `activeHref`.
43077 */
43078 activeKey: _react2['default'].PropTypes.any,
43079
43080 /**
43081 * NavItems are be positioned vertically.
43082 */
43083 stacked: _react2['default'].PropTypes.bool,
43084
43085 justified: _reactPropTypesLibAll2['default'](_react2['default'].PropTypes.bool, function (_ref2) {
43086 var justified = _ref2.justified;
43087 var navbar = _ref2.navbar;
43088 return justified && navbar ? Error('justified navbar `Nav`s are not supported') : null;
43089 }),
43090
43091 /**
43092 * A callback fired when a NavItem is selected.
43093 *
43094 * ```js
43095 * function (
43096 * Any eventKey,
43097 * SyntheticEvent event?
43098 * )
43099 * ```
43100 */
43101 onSelect: _react2['default'].PropTypes.func,
43102
43103 /**
43104 * CSS classes for the wrapper `nav` element
43105 */
43106 className: _react2['default'].PropTypes.string,
43107 /**
43108 * HTML id for the wrapper `nav` element
43109 */
43110 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
43111
43112 /**
43113 * ARIA role for the Nav, in the context of a TabContainer, the default will be set
43114 * to "tablist", but can be overridden by the Nav when set explicitly.
43115 *
43116 * When the role is set to "tablist" NavItem focus is managed according to the
43117 * ARIA authoring practices for tabs: https://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel
43118 */
43119 role: _react2['default'].PropTypes.string,
43120
43121 /**
43122 * Apply styling an alignment for use in a Navbar. This prop will be set
43123 * automatically when the Nav is used inside a Navbar.
43124 */
43125 navbar: _react2['default'].PropTypes.bool,
43126
43127 /**
43128 * Float the Nav to the right. When `navbar` is `true` the appropriate
43129 * contextual classes are added as well.
43130 */
43131 pullRight: _react2['default'].PropTypes.bool,
43132
43133 /**
43134 * Float the Nav to the left. When `navbar` is `true` the appropriate
43135 * contextual classes are added as well.
43136 */
43137 pullLeft: _react2['default'].PropTypes.bool
43138 };
43139
43140 Nav.contextTypes = {
43141 $bs_navbar: _react2['default'].PropTypes.bool,
43142 $bs_navbar_bsClass: _react2['default'].PropTypes.string,
43143
43144 $bs_tabcontainer: _react2['default'].PropTypes.shape({
43145 activeKey: _react2['default'].PropTypes.any,
43146 onSelect: _react2['default'].PropTypes.func,
43147 getId: _react2['default'].PropTypes.func
43148 })
43149 };
43150
43151 Nav.defaultProps = {
43152 justified: false,
43153 pullRight: false,
43154 pullLeft: false,
43155 stacked: false
43156 };
43157
43158 exports['default'] = _utilsBootstrapUtils.bsClass('nav', _utilsBootstrapUtils.bsStyles(['tabs', 'pills'], Nav));
43159 module.exports = exports['default'];
43160
43161/***/ },
43162/* 556 */
43163/***/ function(module, exports, __webpack_require__) {
43164
43165 'use strict';
43166
43167 var _interopRequireDefault = __webpack_require__(335)['default'];
43168
43169 exports.__esModule = true;
43170 exports.nextEnabled = nextEnabled;
43171
43172 var _ValidComponentChildren = __webpack_require__(365);
43173
43174 var _ValidComponentChildren2 = _interopRequireDefault(_ValidComponentChildren);
43175
43176 var findChild = _ValidComponentChildren2['default'].find;
43177
43178 var TAB = 'tab';
43179 exports.TAB = TAB;
43180 var PANE = 'pane';
43181
43182 exports.PANE = PANE;
43183
43184 function nextEnabled(children, currentKey, keys, moveNext) {
43185 var lastIdx = keys.length - 1;
43186 var stopAt = keys[moveNext ? Math.max(lastIdx, 0) : 0];
43187 var nextKey = currentKey;
43188
43189 function getNext() {
43190 var idx = keys.indexOf(nextKey);
43191 nextKey = moveNext ? keys[Math.min(lastIdx, idx + 1)] : keys[Math.max(0, idx - 1)];
43192
43193 return findChild(children, function (_child) {
43194 return _child.props.eventKey === nextKey;
43195 });
43196 }
43197
43198 var next = getNext();
43199
43200 while (next.props.eventKey !== stopAt && next.props.disabled) {
43201 next = getNext();
43202 }
43203
43204 return next.props.disabled ? currentKey : next.props.eventKey;
43205 }
43206
43207/***/ },
43208/* 557 */
43209/***/ function(module, exports, __webpack_require__) {
43210
43211 /* eslint react/no-multi-comp: 0 */
43212 'use strict';
43213
43214 var _objectWithoutProperties = __webpack_require__(355)['default'];
43215
43216 var _extends = __webpack_require__(338)['default'];
43217
43218 var _interopRequireDefault = __webpack_require__(335)['default'];
43219
43220 exports.__esModule = true;
43221
43222 var _classnames = __webpack_require__(356);
43223
43224 var _classnames2 = _interopRequireDefault(_classnames);
43225
43226 var _react = __webpack_require__(89);
43227
43228 var _react2 = _interopRequireDefault(_react);
43229
43230 var _reactPropTypesLibElementType = __webpack_require__(380);
43231
43232 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
43233
43234 var _uncontrollable = __webpack_require__(489);
43235
43236 var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
43237
43238 var _styleMaps = __webpack_require__(358);
43239
43240 var _utilsBootstrapUtils = __webpack_require__(357);
43241
43242 var _Grid = __webpack_require__(507);
43243
43244 var _Grid2 = _interopRequireDefault(_Grid);
43245
43246 var _NavbarBrand = __webpack_require__(558);
43247
43248 var _NavbarBrand2 = _interopRequireDefault(_NavbarBrand);
43249
43250 var _NavbarCollapse = __webpack_require__(559);
43251
43252 var _NavbarCollapse2 = _interopRequireDefault(_NavbarCollapse);
43253
43254 var _NavbarHeader = __webpack_require__(560);
43255
43256 var _NavbarHeader2 = _interopRequireDefault(_NavbarHeader);
43257
43258 var _NavbarToggle = __webpack_require__(561);
43259
43260 var _NavbarToggle2 = _interopRequireDefault(_NavbarToggle);
43261
43262 var Navbar = _react2['default'].createClass({
43263 displayName: 'Navbar',
43264
43265 propTypes: {
43266 /**
43267 * Create a fixed navbar along the top of the screen, that scrolls with the page
43268 */
43269 fixedTop: _react2['default'].PropTypes.bool,
43270 /**
43271 * Create a fixed navbar along the bottom of the screen, that scrolls with the page
43272 */
43273 fixedBottom: _react2['default'].PropTypes.bool,
43274 /**
43275 * Create a full-width navbar that scrolls away with the page
43276 */
43277 staticTop: _react2['default'].PropTypes.bool,
43278 /**
43279 * An alternative dark visual style for the Navbar
43280 */
43281 inverse: _react2['default'].PropTypes.bool,
43282 /**
43283 * Allow the Navbar to fluidly adjust to the page or container width, instead of at the
43284 * predefined screen breakpoints
43285 */
43286 fluid: _react2['default'].PropTypes.bool,
43287
43288 /**
43289 * Set a custom element for this component.
43290 */
43291 componentClass: _reactPropTypesLibElementType2['default'],
43292 /**
43293 * A callback fired when the `<Navbar>` body collapses or expands.
43294 * Fired when a `<Navbar.Toggle>` is clicked and called with the new `navExpanded` boolean value.
43295 *
43296 * @controllable navExpanded
43297 */
43298 onToggle: _react2['default'].PropTypes.func,
43299
43300 /**
43301 * Explicitly set the visiblity of the navbar body
43302 *
43303 * @controllable onToggle
43304 */
43305 expanded: _react2['default'].PropTypes.bool
43306
43307 },
43308
43309 childContextTypes: {
43310 $bs_navbar: _react.PropTypes.bool,
43311 $bs_navbar_bsClass: _react.PropTypes.string,
43312 $bs_navbar_onToggle: _react.PropTypes.func,
43313 $bs_navbar_expanded: _react.PropTypes.bool
43314 },
43315
43316 getDefaultProps: function getDefaultProps() {
43317 return {
43318 componentClass: 'nav',
43319 fixedTop: false,
43320 fixedBottom: false,
43321 staticTop: false,
43322 inverse: false,
43323 fluid: false
43324 };
43325 },
43326
43327 getChildContext: function getChildContext() {
43328 return {
43329 $bs_navbar: true,
43330 $bs_navbar_bsClass: this.props.bsClass,
43331 $bs_navbar_onToggle: this.handleToggle,
43332 $bs_navbar_expanded: this.props.expanded
43333 };
43334 },
43335
43336 handleToggle: function handleToggle() {
43337 this.props.onToggle(!this.props.expanded);
43338 },
43339
43340 isNavExpanded: function isNavExpanded() {
43341 return !!this.props.expanded;
43342 },
43343
43344 render: function render() {
43345 var _props = this.props;
43346 var fixedTop = _props.fixedTop;
43347 var fixedBottom = _props.fixedBottom;
43348 var staticTop = _props.staticTop;
43349 var inverse = _props.inverse;
43350 var ComponentClass = _props.componentClass;
43351 var fluid = _props.fluid;
43352 var className = _props.className;
43353 var children = _props.children;
43354
43355 var props = _objectWithoutProperties(_props, ['fixedTop', 'fixedBottom', 'staticTop', 'inverse', 'componentClass', 'fluid', 'className', 'children']);
43356
43357 // will result in some false positives but that seems better
43358 // than false negatives. strict `undefined` check allows explicit
43359 // "nulling" of the role if the user really doesn't want one
43360 if (props.role === undefined && ComponentClass !== 'nav') {
43361 props.role = 'navigation';
43362 }
43363
43364 if (inverse) {
43365 props.bsStyle = _styleMaps.INVERSE;
43366 }
43367
43368 var classes = _utilsBootstrapUtils.getClassSet(props);
43369
43370 classes[_utilsBootstrapUtils.prefix(this.props, 'fixed-top')] = fixedTop;
43371 classes[_utilsBootstrapUtils.prefix(this.props, 'fixed-bottom')] = fixedBottom;
43372 classes[_utilsBootstrapUtils.prefix(this.props, 'static-top')] = staticTop;
43373
43374 return _react2['default'].createElement(
43375 ComponentClass,
43376 _extends({}, props, { className: _classnames2['default'](className, classes) }),
43377 _react2['default'].createElement(
43378 _Grid2['default'],
43379 { fluid: fluid },
43380 children
43381 )
43382 );
43383 }
43384 });
43385
43386 var NAVBAR_STATES = [_styleMaps.DEFAULT, _styleMaps.INVERSE];
43387
43388 Navbar = _utilsBootstrapUtils.bsStyles(NAVBAR_STATES, _styleMaps.DEFAULT, _utilsBootstrapUtils.bsClass('navbar', _uncontrollable2['default'](Navbar, { expanded: 'onToggle' })));
43389
43390 function createSimpleWrapper(tag, suffix, displayName) {
43391 var wrapper = function wrapper(_ref, _ref2) {
43392 var Tag = _ref.componentClass;
43393 var className = _ref.className;
43394
43395 var props = _objectWithoutProperties(_ref, ['componentClass', 'className']);
43396
43397 var _classNames;
43398
43399 var _ref2$$bs_navbar_bsClass = _ref2.$bs_navbar_bsClass;
43400 var bsClass = _ref2$$bs_navbar_bsClass === undefined ? 'navbar' : _ref2$$bs_navbar_bsClass;
43401 return _react2['default'].createElement(Tag, _extends({}, props, {
43402 className: _classnames2['default'](className, _utilsBootstrapUtils.prefix({ bsClass: bsClass }, suffix), (_classNames = {}, _classNames[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'right')] = props.pullRight, _classNames[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'left')] = props.pullLeft, _classNames))
43403 }));
43404 };
43405
43406 wrapper.displayName = displayName;
43407
43408 wrapper.propTypes = {
43409 componentClass: _reactPropTypesLibElementType2['default'],
43410 pullRight: _react2['default'].PropTypes.bool,
43411 pullLeft: _react2['default'].PropTypes.bool
43412 };
43413 wrapper.defaultProps = {
43414 componentClass: tag,
43415 pullRight: false,
43416 pullLeft: false
43417 };
43418
43419 wrapper.contextTypes = {
43420 $bs_navbar_bsClass: _react.PropTypes.string
43421 };
43422
43423 return wrapper;
43424 }
43425
43426 Navbar.Brand = _NavbarBrand2['default'];
43427 Navbar.Header = _NavbarHeader2['default'];
43428 Navbar.Toggle = _NavbarToggle2['default'];
43429 Navbar.Collapse = _NavbarCollapse2['default'];
43430
43431 Navbar.Form = createSimpleWrapper('div', 'form', 'NavbarForm');
43432 Navbar.Text = createSimpleWrapper('p', 'text', 'NavbarText');
43433 Navbar.Link = createSimpleWrapper('a', 'link', 'NavbarLink');
43434
43435 exports['default'] = Navbar;
43436 module.exports = exports['default'];
43437
43438/***/ },
43439/* 558 */
43440/***/ function(module, exports, __webpack_require__) {
43441
43442 'use strict';
43443
43444 var _inherits = __webpack_require__(372)['default'];
43445
43446 var _classCallCheck = __webpack_require__(379)['default'];
43447
43448 var _objectWithoutProperties = __webpack_require__(355)['default'];
43449
43450 var _extends = __webpack_require__(338)['default'];
43451
43452 var _interopRequireDefault = __webpack_require__(335)['default'];
43453
43454 exports.__esModule = true;
43455
43456 var _classnames = __webpack_require__(356);
43457
43458 var _classnames2 = _interopRequireDefault(_classnames);
43459
43460 var _react = __webpack_require__(89);
43461
43462 var _react2 = _interopRequireDefault(_react);
43463
43464 var _utilsBootstrapUtils = __webpack_require__(357);
43465
43466 var NavbarBrand = (function (_React$Component) {
43467 _inherits(NavbarBrand, _React$Component);
43468
43469 function NavbarBrand() {
43470 _classCallCheck(this, NavbarBrand);
43471
43472 _React$Component.apply(this, arguments);
43473 }
43474
43475 NavbarBrand.prototype.render = function render() {
43476 var _props = this.props;
43477 var className = _props.className;
43478 var children = _props.children;
43479
43480 var props = _objectWithoutProperties(_props, ['className', 'children']);
43481
43482 var _context$$bs_navbar_bsClass = this.context.$bs_navbar_bsClass;
43483 var bsClass = _context$$bs_navbar_bsClass === undefined ? 'navbar' : _context$$bs_navbar_bsClass;
43484
43485 var brandClasses = _utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'brand');
43486
43487 if (_react2['default'].isValidElement(children)) {
43488 return _react2['default'].cloneElement(children, {
43489 className: _classnames2['default'](children.props.className, className, brandClasses)
43490 });
43491 }
43492
43493 return _react2['default'].createElement(
43494 'span',
43495 _extends({}, props, { className: _classnames2['default'](className, brandClasses) }),
43496 children
43497 );
43498 };
43499
43500 return NavbarBrand;
43501 })(_react2['default'].Component);
43502
43503 NavbarBrand.contextTypes = {
43504 $bs_navbar_bsClass: _react2['default'].PropTypes.string
43505 };
43506
43507 exports['default'] = NavbarBrand;
43508 module.exports = exports['default'];
43509
43510/***/ },
43511/* 559 */
43512/***/ function(module, exports, __webpack_require__) {
43513
43514 'use strict';
43515
43516 var _objectWithoutProperties = __webpack_require__(355)['default'];
43517
43518 var _extends = __webpack_require__(338)['default'];
43519
43520 var _interopRequireDefault = __webpack_require__(335)['default'];
43521
43522 exports.__esModule = true;
43523
43524 var _react = __webpack_require__(89);
43525
43526 var _react2 = _interopRequireDefault(_react);
43527
43528 var _utilsBootstrapUtils = __webpack_require__(357);
43529
43530 var _Collapse = __webpack_require__(401);
43531
43532 var _Collapse2 = _interopRequireDefault(_Collapse);
43533
43534 var NavbarCollapse = _react2['default'].createClass({
43535 displayName: 'NavbarCollapse',
43536
43537 contextTypes: {
43538 $bs_navbar_bsClass: _react.PropTypes.string,
43539 $bs_navbar_expanded: _react.PropTypes.bool
43540 },
43541
43542 render: function render() {
43543 var _props = this.props;
43544 var children = _props.children;
43545
43546 var props = _objectWithoutProperties(_props, ['children']);
43547
43548 var _context = this.context;
43549 var _context$$bs_navbar_bsClass = _context.$bs_navbar_bsClass;
43550 var bsClass = _context$$bs_navbar_bsClass === undefined ? 'navbar' : _context$$bs_navbar_bsClass;
43551 var expanded = _context.$bs_navbar_expanded;
43552
43553 return _react2['default'].createElement(
43554 _Collapse2['default'],
43555 _extends({ 'in': expanded }, props),
43556 _react2['default'].createElement(
43557 'div',
43558 { className: _utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'collapse') },
43559 children
43560 )
43561 );
43562 }
43563 });
43564
43565 exports['default'] = NavbarCollapse;
43566 module.exports = exports['default'];
43567
43568/***/ },
43569/* 560 */
43570/***/ function(module, exports, __webpack_require__) {
43571
43572 'use strict';
43573
43574 var _objectWithoutProperties = __webpack_require__(355)['default'];
43575
43576 var _extends = __webpack_require__(338)['default'];
43577
43578 var _interopRequireDefault = __webpack_require__(335)['default'];
43579
43580 exports.__esModule = true;
43581
43582 var _classnames = __webpack_require__(356);
43583
43584 var _classnames2 = _interopRequireDefault(_classnames);
43585
43586 var _react = __webpack_require__(89);
43587
43588 var _react2 = _interopRequireDefault(_react);
43589
43590 var _utilsBootstrapUtils = __webpack_require__(357);
43591
43592 var NavbarHeader = _react2['default'].createClass({
43593 displayName: 'NavbarHeader',
43594
43595 contextTypes: {
43596 $bs_navbar_bsClass: _react.PropTypes.string
43597 },
43598
43599 render: function render() {
43600 var _props = this.props;
43601 var className = _props.className;
43602
43603 var props = _objectWithoutProperties(_props, ['className']);
43604
43605 var _context$$bs_navbar_bsClass = this.context.$bs_navbar_bsClass;
43606 var bsClass = _context$$bs_navbar_bsClass === undefined ? 'navbar' : _context$$bs_navbar_bsClass;
43607
43608 var headerClasses = _utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'header');
43609
43610 return _react2['default'].createElement('div', _extends({}, props, { className: _classnames2['default'](className, headerClasses) }));
43611 }
43612 });
43613
43614 exports['default'] = NavbarHeader;
43615 module.exports = exports['default'];
43616
43617/***/ },
43618/* 561 */
43619/***/ function(module, exports, __webpack_require__) {
43620
43621 'use strict';
43622
43623 var _extends = __webpack_require__(338)['default'];
43624
43625 var _objectWithoutProperties = __webpack_require__(355)['default'];
43626
43627 var _interopRequireDefault = __webpack_require__(335)['default'];
43628
43629 exports.__esModule = true;
43630
43631 var _classnames = __webpack_require__(356);
43632
43633 var _classnames2 = _interopRequireDefault(_classnames);
43634
43635 var _react = __webpack_require__(89);
43636
43637 var _react2 = _interopRequireDefault(_react);
43638
43639 var _utilsBootstrapUtils = __webpack_require__(357);
43640
43641 var _utilsCreateChainedFunction = __webpack_require__(414);
43642
43643 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
43644
43645 var NavbarToggle = _react2['default'].createClass({
43646 displayName: 'NavbarToggle',
43647
43648 propTypes: {
43649 onClick: _react2['default'].PropTypes.func,
43650 /**
43651 * The toggle content, if left empty it will render the default toggle (seen above).
43652 */
43653 children: _react.PropTypes.node
43654 },
43655
43656 contextTypes: {
43657 $bs_navbar_bsClass: _react.PropTypes.string,
43658 $bs_navbar_onToggle: _react.PropTypes.func,
43659 $bs_navbar_expanded: _react.PropTypes.bool
43660 },
43661
43662 render: function render() {
43663 var _props = this.props;
43664 var onClick = _props.onClick;
43665 var className = _props.className;
43666 var children = _props.children;
43667
43668 var props = _objectWithoutProperties(_props, ['onClick', 'className', 'children']);
43669
43670 var _context = this.context;
43671 var _context$$bs_navbar_bsClass = _context.$bs_navbar_bsClass;
43672 var bsClass = _context$$bs_navbar_bsClass === undefined ? 'navbar' : _context$$bs_navbar_bsClass;
43673 var onToggle = _context.$bs_navbar_onToggle;
43674 var expanded = _context.$bs_navbar_expanded;
43675
43676 var buttonProps = _extends({
43677 type: 'button'
43678 }, props, {
43679 onClick: _utilsCreateChainedFunction2['default'](onClick, onToggle),
43680 className: _classnames2['default'](className, _utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'toggle'), !expanded && 'collapsed')
43681 });
43682
43683 if (children) {
43684 return _react2['default'].createElement(
43685 'button',
43686 buttonProps,
43687 children
43688 );
43689 }
43690
43691 return _react2['default'].createElement(
43692 'button',
43693 buttonProps,
43694 _react2['default'].createElement(
43695 'span',
43696 { className: 'sr-only' },
43697 'Toggle navigation'
43698 ),
43699 _react2['default'].createElement('span', { className: 'icon-bar' }),
43700 _react2['default'].createElement('span', { className: 'icon-bar' }),
43701 _react2['default'].createElement('span', { className: 'icon-bar' })
43702 );
43703 }
43704 });
43705
43706 exports['default'] = NavbarToggle;
43707 module.exports = exports['default'];
43708
43709/***/ },
43710/* 562 */
43711/***/ function(module, exports, __webpack_require__) {
43712
43713 'use strict';
43714
43715 var _inherits = __webpack_require__(372)['default'];
43716
43717 var _classCallCheck = __webpack_require__(379)['default'];
43718
43719 var _extends = __webpack_require__(338)['default'];
43720
43721 var _objectWithoutProperties = __webpack_require__(355)['default'];
43722
43723 var _interopRequireDefault = __webpack_require__(335)['default'];
43724
43725 exports.__esModule = true;
43726
43727 var _react = __webpack_require__(89);
43728
43729 var _react2 = _interopRequireDefault(_react);
43730
43731 var _Dropdown = __webpack_require__(415);
43732
43733 var _Dropdown2 = _interopRequireDefault(_Dropdown);
43734
43735 var NavDropdown = (function (_React$Component) {
43736 _inherits(NavDropdown, _React$Component);
43737
43738 function NavDropdown() {
43739 _classCallCheck(this, NavDropdown);
43740
43741 _React$Component.apply(this, arguments);
43742 }
43743
43744 NavDropdown.prototype.render = function render() {
43745 var _props = this.props;
43746 var children = _props.children;
43747 var title = _props.title;
43748 var noCaret = _props.noCaret;
43749
43750 var props = _objectWithoutProperties(_props, ['children', 'title', 'noCaret']);
43751
43752 return _react2['default'].createElement(
43753 _Dropdown2['default'],
43754 _extends({}, props, { componentClass: 'li' }),
43755 _react2['default'].createElement(
43756 _Dropdown2['default'].Toggle,
43757 {
43758 useAnchor: true,
43759 disabled: props.disabled,
43760 noCaret: noCaret
43761 },
43762 title
43763 ),
43764 _react2['default'].createElement(
43765 _Dropdown2['default'].Menu,
43766 null,
43767 children
43768 )
43769 );
43770 };
43771
43772 return NavDropdown;
43773 })(_react2['default'].Component);
43774
43775 NavDropdown.propTypes = _extends({
43776 noCaret: _react2['default'].PropTypes.bool,
43777 title: _react2['default'].PropTypes.node.isRequired
43778 }, _Dropdown2['default'].propTypes);
43779
43780 exports['default'] = NavDropdown;
43781 module.exports = exports['default'];
43782
43783/***/ },
43784/* 563 */
43785/***/ function(module, exports, __webpack_require__) {
43786
43787 'use strict';
43788
43789 var _objectWithoutProperties = __webpack_require__(355)['default'];
43790
43791 var _extends = __webpack_require__(338)['default'];
43792
43793 var _interopRequireDefault = __webpack_require__(335)['default'];
43794
43795 exports.__esModule = true;
43796
43797 var _classnames = __webpack_require__(356);
43798
43799 var _classnames2 = _interopRequireDefault(_classnames);
43800
43801 var _react = __webpack_require__(89);
43802
43803 var _react2 = _interopRequireDefault(_react);
43804
43805 var _SafeAnchor = __webpack_require__(371);
43806
43807 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
43808
43809 var _utilsCreateChainedFunction = __webpack_require__(414);
43810
43811 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
43812
43813 var NavItem = _react2['default'].createClass({
43814 displayName: 'NavItem',
43815
43816 propTypes: {
43817 active: _react2['default'].PropTypes.bool,
43818 disabled: _react2['default'].PropTypes.bool,
43819 role: _react2['default'].PropTypes.string,
43820 href: _react2['default'].PropTypes.string,
43821 onClick: _react2['default'].PropTypes.func,
43822 onSelect: _react2['default'].PropTypes.func,
43823 eventKey: _react2['default'].PropTypes.any
43824 },
43825
43826 getDefaultProps: function getDefaultProps() {
43827 return {
43828 active: false,
43829 disabled: false
43830 };
43831 },
43832
43833 render: function render() {
43834 var _props = this.props;
43835 var active = _props.active;
43836 var disabled = _props.disabled;
43837 var role = _props.role;
43838 var href = _props.href;
43839 var onClick = _props.onClick;
43840 var className = _props.className;
43841 var style = _props.style;
43842
43843 var props = _objectWithoutProperties(_props, ['active', 'disabled', 'role', 'href', 'onClick', 'className', 'style']);
43844
43845 delete props.onSelect;
43846 delete props.eventKey;
43847
43848 if (!role) {
43849 if (href === '#') {
43850 role = 'button';
43851 }
43852 } else if (role === 'tab') {
43853 props['aria-selected'] = active;
43854 }
43855
43856 return _react2['default'].createElement(
43857 'li',
43858 {
43859 role: 'presentation',
43860 className: _classnames2['default'](className, { active: active, disabled: disabled }),
43861 style: style
43862 },
43863 _react2['default'].createElement(_SafeAnchor2['default'], _extends({}, props, {
43864 disabled: disabled,
43865 role: role,
43866 href: href,
43867 onClick: _utilsCreateChainedFunction2['default'](onClick, this.handleClick)
43868 }))
43869 );
43870 },
43871
43872 handleClick: function handleClick(e) {
43873 if (this.props.onSelect) {
43874 e.preventDefault();
43875
43876 if (!this.props.disabled) {
43877 this.props.onSelect(this.props.eventKey, e);
43878 }
43879 }
43880 }
43881 });
43882
43883 exports['default'] = NavItem;
43884 module.exports = exports['default'];
43885
43886/***/ },
43887/* 564 */
43888/***/ function(module, exports, __webpack_require__) {
43889
43890 /* eslint react/prop-types: [2, {ignore: ["container", "containerPadding", "target", "placement", "children"] }] */
43891 /* These properties are validated in 'Portal' and 'Position' components */
43892
43893 'use strict';
43894
43895 var _inherits = __webpack_require__(372)['default'];
43896
43897 var _classCallCheck = __webpack_require__(379)['default'];
43898
43899 var _extends = __webpack_require__(338)['default'];
43900
43901 var _objectWithoutProperties = __webpack_require__(355)['default'];
43902
43903 var _interopRequireDefault = __webpack_require__(335)['default'];
43904
43905 exports.__esModule = true;
43906
43907 var _react = __webpack_require__(89);
43908
43909 var _react2 = _interopRequireDefault(_react);
43910
43911 var _reactOverlaysLibOverlay = __webpack_require__(565);
43912
43913 var _reactOverlaysLibOverlay2 = _interopRequireDefault(_reactOverlaysLibOverlay);
43914
43915 var _reactPropTypesLibElementType = __webpack_require__(380);
43916
43917 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
43918
43919 var _Fade = __webpack_require__(502);
43920
43921 var _Fade2 = _interopRequireDefault(_Fade);
43922
43923 var _classnames = __webpack_require__(356);
43924
43925 var _classnames2 = _interopRequireDefault(_classnames);
43926
43927 var Overlay = (function (_React$Component) {
43928 _inherits(Overlay, _React$Component);
43929
43930 function Overlay() {
43931 _classCallCheck(this, Overlay);
43932
43933 _React$Component.apply(this, arguments);
43934 }
43935
43936 Overlay.prototype.render = function render() {
43937 var _props = this.props;
43938 var child = _props.children;
43939 var transition = _props.animation;
43940
43941 var props = _objectWithoutProperties(_props, ['children', 'animation']);
43942
43943 if (transition === true) {
43944 transition = _Fade2['default'];
43945 }
43946
43947 if (transition === false) {
43948 transition = null;
43949 }
43950
43951 if (!transition) {
43952 child = _react.cloneElement(child, {
43953 className: _classnames2['default']('in', child.props.className)
43954 });
43955 }
43956
43957 return _react2['default'].createElement(
43958 _reactOverlaysLibOverlay2['default'],
43959 _extends({}, props, {
43960 transition: transition
43961 }),
43962 child
43963 );
43964 };
43965
43966 return Overlay;
43967 })(_react2['default'].Component);
43968
43969 Overlay.propTypes = _extends({}, _reactOverlaysLibOverlay2['default'].propTypes, {
43970
43971 /**
43972 * Set the visibility of the Overlay
43973 */
43974 show: _react2['default'].PropTypes.bool,
43975 /**
43976 * Specify whether the overlay should trigger onHide when the user clicks outside the overlay
43977 */
43978 rootClose: _react2['default'].PropTypes.bool,
43979 /**
43980 * A callback invoked by the overlay when it wishes to be hidden. Required if
43981 * `rootClose` is specified.
43982 */
43983 onHide: _react2['default'].PropTypes.func,
43984
43985 /**
43986 * Use animation
43987 */
43988 animation: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _reactPropTypesLibElementType2['default']]),
43989
43990 /**
43991 * Callback fired before the Overlay transitions in
43992 */
43993 onEnter: _react2['default'].PropTypes.func,
43994
43995 /**
43996 * Callback fired as the Overlay begins to transition in
43997 */
43998 onEntering: _react2['default'].PropTypes.func,
43999
44000 /**
44001 * Callback fired after the Overlay finishes transitioning in
44002 */
44003 onEntered: _react2['default'].PropTypes.func,
44004
44005 /**
44006 * Callback fired right before the Overlay transitions out
44007 */
44008 onExit: _react2['default'].PropTypes.func,
44009
44010 /**
44011 * Callback fired as the Overlay begins to transition out
44012 */
44013 onExiting: _react2['default'].PropTypes.func,
44014
44015 /**
44016 * Callback fired after the Overlay finishes transitioning out
44017 */
44018 onExited: _react2['default'].PropTypes.func
44019 });
44020
44021 Overlay.defaultProps = {
44022 animation: _Fade2['default'],
44023 rootClose: false,
44024 show: false
44025 };
44026
44027 exports['default'] = Overlay;
44028 module.exports = exports['default'];
44029
44030/***/ },
44031/* 565 */
44032/***/ function(module, exports, __webpack_require__) {
44033
44034 'use strict';
44035
44036 Object.defineProperty(exports, "__esModule", {
44037 value: true
44038 });
44039
44040 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
44041
44042 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; }; }();
44043
44044 var _react = __webpack_require__(89);
44045
44046 var _react2 = _interopRequireDefault(_react);
44047
44048 var _Portal = __webpack_require__(539);
44049
44050 var _Portal2 = _interopRequireDefault(_Portal);
44051
44052 var _Position = __webpack_require__(566);
44053
44054 var _Position2 = _interopRequireDefault(_Position);
44055
44056 var _RootCloseWrapper = __webpack_require__(495);
44057
44058 var _RootCloseWrapper2 = _interopRequireDefault(_RootCloseWrapper);
44059
44060 var _elementType = __webpack_require__(538);
44061
44062 var _elementType2 = _interopRequireDefault(_elementType);
44063
44064 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44065
44066 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
44067
44068 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
44069
44070 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; }
44071
44072 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; }
44073
44074 /**
44075 * Built on top of `<Position/>` and `<Portal/>`, the overlay component is great for custom tooltip overlays.
44076 */
44077 var Overlay = function (_React$Component) {
44078 _inherits(Overlay, _React$Component);
44079
44080 function Overlay(props, context) {
44081 _classCallCheck(this, Overlay);
44082
44083 var _this = _possibleConstructorReturn(this, (Overlay.__proto__ || Object.getPrototypeOf(Overlay)).call(this, props, context));
44084
44085 _this.state = { exited: !props.show };
44086 _this.onHiddenListener = _this.handleHidden.bind(_this);
44087 return _this;
44088 }
44089
44090 _createClass(Overlay, [{
44091 key: 'componentWillReceiveProps',
44092 value: function componentWillReceiveProps(nextProps) {
44093 if (nextProps.show) {
44094 this.setState({ exited: false });
44095 } else if (!nextProps.transition) {
44096 // Otherwise let handleHidden take care of marking exited.
44097 this.setState({ exited: true });
44098 }
44099 }
44100 }, {
44101 key: 'render',
44102 value: function render() {
44103 var _props = this.props;
44104 var container = _props.container;
44105 var containerPadding = _props.containerPadding;
44106 var target = _props.target;
44107 var placement = _props.placement;
44108 var shouldUpdatePosition = _props.shouldUpdatePosition;
44109 var rootClose = _props.rootClose;
44110 var children = _props.children;
44111 var Transition = _props.transition;
44112
44113 var props = _objectWithoutProperties(_props, ['container', 'containerPadding', 'target', 'placement', 'shouldUpdatePosition', 'rootClose', 'children', 'transition']);
44114
44115 // Don't un-render the overlay while it's transitioning out.
44116
44117
44118 var mountOverlay = props.show || Transition && !this.state.exited;
44119 if (!mountOverlay) {
44120 // Don't bother showing anything if we don't have to.
44121 return null;
44122 }
44123
44124 var child = children;
44125
44126 // Position is be inner-most because it adds inline styles into the child,
44127 // which the other wrappers don't forward correctly.
44128 child = _react2.default.createElement(
44129 _Position2.default,
44130 { container: container, containerPadding: containerPadding, target: target, placement: placement, shouldUpdatePosition: shouldUpdatePosition },
44131 child
44132 );
44133
44134 if (Transition) {
44135 var onExit = props.onExit;
44136 var onExiting = props.onExiting;
44137 var onEnter = props.onEnter;
44138 var onEntering = props.onEntering;
44139 var onEntered = props.onEntered;
44140
44141 // This animates the child node by injecting props, so it must precede
44142 // anything that adds a wrapping div.
44143
44144 child = _react2.default.createElement(
44145 Transition,
44146 {
44147 'in': props.show,
44148 transitionAppear: true,
44149 onExit: onExit,
44150 onExiting: onExiting,
44151 onExited: this.onHiddenListener,
44152 onEnter: onEnter,
44153 onEntering: onEntering,
44154 onEntered: onEntered
44155 },
44156 child
44157 );
44158 }
44159
44160 // This goes after everything else because it adds a wrapping div.
44161 if (rootClose) {
44162 child = _react2.default.createElement(
44163 _RootCloseWrapper2.default,
44164 { onRootClose: props.onHide },
44165 child
44166 );
44167 }
44168
44169 return _react2.default.createElement(
44170 _Portal2.default,
44171 { container: container },
44172 child
44173 );
44174 }
44175 }, {
44176 key: 'handleHidden',
44177 value: function handleHidden() {
44178 this.setState({ exited: true });
44179
44180 if (this.props.onExited) {
44181 var _props2;
44182
44183 (_props2 = this.props).onExited.apply(_props2, arguments);
44184 }
44185 }
44186 }]);
44187
44188 return Overlay;
44189 }(_react2.default.Component);
44190
44191 Overlay.propTypes = _extends({}, _Portal2.default.propTypes, _Position2.default.propTypes, {
44192
44193 /**
44194 * Set the visibility of the Overlay
44195 */
44196 show: _react2.default.PropTypes.bool,
44197
44198 /**
44199 * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
44200 */
44201 rootClose: _react2.default.PropTypes.bool,
44202
44203 /**
44204 * A Callback fired by the Overlay when it wishes to be hidden.
44205 *
44206 * __required__ when `rootClose` is `true`.
44207 *
44208 * @type func
44209 */
44210 onHide: function onHide(props) {
44211 var propType = _react2.default.PropTypes.func;
44212 if (props.rootClose) {
44213 propType = propType.isRequired;
44214 }
44215
44216 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
44217 args[_key - 1] = arguments[_key];
44218 }
44219
44220 return propType.apply(undefined, [props].concat(args));
44221 },
44222
44223
44224 /**
44225 * A `<Transition/>` component used to animate the overlay changes visibility.
44226 */
44227 transition: _elementType2.default,
44228
44229 /**
44230 * Callback fired before the Overlay transitions in
44231 */
44232 onEnter: _react2.default.PropTypes.func,
44233
44234 /**
44235 * Callback fired as the Overlay begins to transition in
44236 */
44237 onEntering: _react2.default.PropTypes.func,
44238
44239 /**
44240 * Callback fired after the Overlay finishes transitioning in
44241 */
44242 onEntered: _react2.default.PropTypes.func,
44243
44244 /**
44245 * Callback fired right before the Overlay transitions out
44246 */
44247 onExit: _react2.default.PropTypes.func,
44248
44249 /**
44250 * Callback fired as the Overlay begins to transition out
44251 */
44252 onExiting: _react2.default.PropTypes.func,
44253
44254 /**
44255 * Callback fired after the Overlay finishes transitioning out
44256 */
44257 onExited: _react2.default.PropTypes.func
44258 });
44259
44260 exports.default = Overlay;
44261 module.exports = exports['default'];
44262
44263/***/ },
44264/* 566 */
44265/***/ function(module, exports, __webpack_require__) {
44266
44267 'use strict';
44268
44269 Object.defineProperty(exports, "__esModule", {
44270 value: true
44271 });
44272
44273 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
44274
44275 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; }; }();
44276
44277 var _classnames = __webpack_require__(356);
44278
44279 var _classnames2 = _interopRequireDefault(_classnames);
44280
44281 var _react = __webpack_require__(89);
44282
44283 var _react2 = _interopRequireDefault(_react);
44284
44285 var _reactDom = __webpack_require__(122);
44286
44287 var _reactDom2 = _interopRequireDefault(_reactDom);
44288
44289 var _componentOrElement = __webpack_require__(536);
44290
44291 var _componentOrElement2 = _interopRequireDefault(_componentOrElement);
44292
44293 var _calculatePosition = __webpack_require__(567);
44294
44295 var _calculatePosition2 = _interopRequireDefault(_calculatePosition);
44296
44297 var _getContainer = __webpack_require__(540);
44298
44299 var _getContainer2 = _interopRequireDefault(_getContainer);
44300
44301 var _ownerDocument = __webpack_require__(498);
44302
44303 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
44304
44305 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44306
44307 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
44308
44309 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
44310
44311 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; }
44312
44313 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; }
44314
44315 /**
44316 * The Position component calculates the coordinates for its child, to position
44317 * it relative to a `target` component or node. Useful for creating callouts
44318 * and tooltips, the Position component injects a `style` props with `left` and
44319 * `top` values for positioning your component.
44320 *
44321 * It also injects "arrow" `left`, and `top` values for styling callout arrows
44322 * for giving your components a sense of directionality.
44323 */
44324 var Position = function (_React$Component) {
44325 _inherits(Position, _React$Component);
44326
44327 function Position(props, context) {
44328 _classCallCheck(this, Position);
44329
44330 var _this = _possibleConstructorReturn(this, (Position.__proto__ || Object.getPrototypeOf(Position)).call(this, props, context));
44331
44332 _this.state = {
44333 positionLeft: 0,
44334 positionTop: 0,
44335 arrowOffsetLeft: null,
44336 arrowOffsetTop: null
44337 };
44338
44339 _this._needsFlush = false;
44340 _this._lastTarget = null;
44341 return _this;
44342 }
44343
44344 _createClass(Position, [{
44345 key: 'componentDidMount',
44346 value: function componentDidMount() {
44347 this.updatePosition(this.getTarget());
44348 }
44349 }, {
44350 key: 'componentWillReceiveProps',
44351 value: function componentWillReceiveProps() {
44352 this._needsFlush = true;
44353 }
44354 }, {
44355 key: 'componentDidUpdate',
44356 value: function componentDidUpdate(prevProps) {
44357 if (this._needsFlush) {
44358 this._needsFlush = false;
44359 this.maybeUpdatePosition(this.props.placement !== prevProps.placement);
44360 }
44361 }
44362 }, {
44363 key: 'render',
44364 value: function render() {
44365 var _props = this.props;
44366 var children = _props.children;
44367 var className = _props.className;
44368
44369 var props = _objectWithoutProperties(_props, ['children', 'className']);
44370
44371 var _state = this.state;
44372 var positionLeft = _state.positionLeft;
44373 var positionTop = _state.positionTop;
44374
44375 var arrowPosition = _objectWithoutProperties(_state, ['positionLeft', 'positionTop']);
44376
44377 // These should not be forwarded to the child.
44378
44379
44380 delete props.target;
44381 delete props.container;
44382 delete props.containerPadding;
44383 delete props.shouldUpdatePosition;
44384
44385 var child = _react2.default.Children.only(children);
44386 return (0, _react.cloneElement)(child, _extends({}, props, arrowPosition, {
44387 // FIXME: Don't forward `positionLeft` and `positionTop` via both props
44388 // and `props.style`.
44389 positionLeft: positionLeft,
44390 positionTop: positionTop,
44391 className: (0, _classnames2.default)(className, child.props.className),
44392 style: _extends({}, child.props.style, {
44393 left: positionLeft,
44394 top: positionTop
44395 })
44396 }));
44397 }
44398 }, {
44399 key: 'getTarget',
44400 value: function getTarget() {
44401 var target = this.props.target;
44402
44403 var targetElement = typeof target === 'function' ? target() : target;
44404 return targetElement && _reactDom2.default.findDOMNode(targetElement) || null;
44405 }
44406 }, {
44407 key: 'maybeUpdatePosition',
44408 value: function maybeUpdatePosition(placementChanged) {
44409 var target = this.getTarget();
44410
44411 if (!this.props.shouldUpdatePosition && target === this._lastTarget && !placementChanged) {
44412 return;
44413 }
44414
44415 this.updatePosition(target);
44416 }
44417 }, {
44418 key: 'updatePosition',
44419 value: function updatePosition(target) {
44420 this._lastTarget = target;
44421
44422 if (!target) {
44423 this.setState({
44424 positionLeft: 0,
44425 positionTop: 0,
44426 arrowOffsetLeft: null,
44427 arrowOffsetTop: null
44428 });
44429
44430 return;
44431 }
44432
44433 var overlay = _reactDom2.default.findDOMNode(this);
44434 var container = (0, _getContainer2.default)(this.props.container, (0, _ownerDocument2.default)(this).body);
44435
44436 this.setState((0, _calculatePosition2.default)(this.props.placement, overlay, target, container, this.props.containerPadding));
44437 }
44438 }]);
44439
44440 return Position;
44441 }(_react2.default.Component);
44442
44443 Position.propTypes = {
44444 /**
44445 * A node, element, or function that returns either. The child will be
44446 * be positioned next to the `target` specified.
44447 */
44448 target: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),
44449
44450 /**
44451 * "offsetParent" of the component
44452 */
44453 container: _react2.default.PropTypes.oneOfType([_componentOrElement2.default, _react2.default.PropTypes.func]),
44454 /**
44455 * Minimum spacing in pixels between container border and component border
44456 */
44457 containerPadding: _react2.default.PropTypes.number,
44458 /**
44459 * How to position the component relative to the target
44460 */
44461 placement: _react2.default.PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
44462 /**
44463 * Whether the position should be changed on each update
44464 */
44465 shouldUpdatePosition: _react2.default.PropTypes.bool
44466 };
44467
44468 Position.displayName = 'Position';
44469
44470 Position.defaultProps = {
44471 containerPadding: 0,
44472 placement: 'right',
44473 shouldUpdatePosition: false
44474 };
44475
44476 exports.default = Position;
44477 module.exports = exports['default'];
44478
44479/***/ },
44480/* 567 */
44481/***/ function(module, exports, __webpack_require__) {
44482
44483 'use strict';
44484
44485 Object.defineProperty(exports, "__esModule", {
44486 value: true
44487 });
44488 exports.default = calculatePosition;
44489
44490 var _offset = __webpack_require__(568);
44491
44492 var _offset2 = _interopRequireDefault(_offset);
44493
44494 var _position = __webpack_require__(569);
44495
44496 var _position2 = _interopRequireDefault(_position);
44497
44498 var _scrollTop = __webpack_require__(571);
44499
44500 var _scrollTop2 = _interopRequireDefault(_scrollTop);
44501
44502 var _ownerDocument = __webpack_require__(498);
44503
44504 var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
44505
44506 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44507
44508 function getContainerDimensions(containerNode) {
44509 var width = void 0,
44510 height = void 0,
44511 scroll = void 0;
44512
44513 if (containerNode.tagName === 'BODY') {
44514 width = window.innerWidth;
44515 height = window.innerHeight;
44516
44517 scroll = (0, _scrollTop2.default)((0, _ownerDocument2.default)(containerNode).documentElement) || (0, _scrollTop2.default)(containerNode);
44518 } else {
44519 var _getOffset = (0, _offset2.default)(containerNode);
44520
44521 width = _getOffset.width;
44522 height = _getOffset.height;
44523
44524 scroll = (0, _scrollTop2.default)(containerNode);
44525 }
44526
44527 return { width: width, height: height, scroll: scroll };
44528 }
44529
44530 function getTopDelta(top, overlayHeight, container, padding) {
44531 var containerDimensions = getContainerDimensions(container);
44532 var containerScroll = containerDimensions.scroll;
44533 var containerHeight = containerDimensions.height;
44534
44535 var topEdgeOffset = top - padding - containerScroll;
44536 var bottomEdgeOffset = top + padding - containerScroll + overlayHeight;
44537
44538 if (topEdgeOffset < 0) {
44539 return -topEdgeOffset;
44540 } else if (bottomEdgeOffset > containerHeight) {
44541 return containerHeight - bottomEdgeOffset;
44542 } else {
44543 return 0;
44544 }
44545 }
44546
44547 function getLeftDelta(left, overlayWidth, container, padding) {
44548 var containerDimensions = getContainerDimensions(container);
44549 var containerWidth = containerDimensions.width;
44550
44551 var leftEdgeOffset = left - padding;
44552 var rightEdgeOffset = left + padding + overlayWidth;
44553
44554 if (leftEdgeOffset < 0) {
44555 return -leftEdgeOffset;
44556 } else if (rightEdgeOffset > containerWidth) {
44557 return containerWidth - rightEdgeOffset;
44558 }
44559
44560 return 0;
44561 }
44562
44563 function calculatePosition(placement, overlayNode, target, container, padding) {
44564 var childOffset = container.tagName === 'BODY' ? (0, _offset2.default)(target) : (0, _position2.default)(target, container);
44565
44566 var _getOffset2 = (0, _offset2.default)(overlayNode);
44567
44568 var overlayHeight = _getOffset2.height;
44569 var overlayWidth = _getOffset2.width;
44570
44571
44572 var positionLeft = void 0,
44573 positionTop = void 0,
44574 arrowOffsetLeft = void 0,
44575 arrowOffsetTop = void 0;
44576
44577 if (placement === 'left' || placement === 'right') {
44578 positionTop = childOffset.top + (childOffset.height - overlayHeight) / 2;
44579
44580 if (placement === 'left') {
44581 positionLeft = childOffset.left - overlayWidth;
44582 } else {
44583 positionLeft = childOffset.left + childOffset.width;
44584 }
44585
44586 var topDelta = getTopDelta(positionTop, overlayHeight, container, padding);
44587
44588 positionTop += topDelta;
44589 arrowOffsetTop = 50 * (1 - 2 * topDelta / overlayHeight) + '%';
44590 arrowOffsetLeft = void 0;
44591 } else if (placement === 'top' || placement === 'bottom') {
44592 positionLeft = childOffset.left + (childOffset.width - overlayWidth) / 2;
44593
44594 if (placement === 'top') {
44595 positionTop = childOffset.top - overlayHeight;
44596 } else {
44597 positionTop = childOffset.top + childOffset.height;
44598 }
44599
44600 var leftDelta = getLeftDelta(positionLeft, overlayWidth, container, padding);
44601
44602 positionLeft += leftDelta;
44603 arrowOffsetLeft = 50 * (1 - 2 * leftDelta / overlayWidth) + '%';
44604 arrowOffsetTop = void 0;
44605 } else {
44606 throw new Error('calcOverlayPosition(): No such placement of "' + placement + '" found.');
44607 }
44608
44609 return { positionLeft: positionLeft, positionTop: positionTop, arrowOffsetLeft: arrowOffsetLeft, arrowOffsetTop: arrowOffsetTop };
44610 }
44611 module.exports = exports['default'];
44612
44613/***/ },
44614/* 568 */
44615/***/ function(module, exports, __webpack_require__) {
44616
44617 'use strict';
44618 var contains = __webpack_require__(418),
44619 getWindow = __webpack_require__(547),
44620 ownerDocument = __webpack_require__(417);
44621
44622 module.exports = function offset(node) {
44623 var doc = ownerDocument(node),
44624 win = getWindow(doc),
44625 docElem = doc && doc.documentElement,
44626 box = { top: 0, left: 0, height: 0, width: 0 };
44627
44628 if (!doc) return;
44629
44630 // Make sure it's not a disconnected DOM node
44631 if (!contains(docElem, node)) return box;
44632
44633 if (node.getBoundingClientRect !== undefined) box = node.getBoundingClientRect();
44634
44635 if (box.width || box.height) {
44636
44637 box = {
44638 top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),
44639 left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0),
44640 width: (box.width == null ? node.offsetWidth : box.width) || 0,
44641 height: (box.height == null ? node.offsetHeight : box.height) || 0
44642 };
44643 }
44644
44645 return box;
44646 };
44647
44648/***/ },
44649/* 569 */
44650/***/ function(module, exports, __webpack_require__) {
44651
44652 'use strict';
44653
44654 var babelHelpers = __webpack_require__(408);
44655
44656 exports.__esModule = true;
44657 exports['default'] = position;
44658
44659 var _offset = __webpack_require__(568);
44660
44661 var _offset2 = babelHelpers.interopRequireDefault(_offset);
44662
44663 var _offsetParent = __webpack_require__(570);
44664
44665 var _offsetParent2 = babelHelpers.interopRequireDefault(_offsetParent);
44666
44667 var _scrollTop = __webpack_require__(571);
44668
44669 var _scrollTop2 = babelHelpers.interopRequireDefault(_scrollTop);
44670
44671 var _scrollLeft = __webpack_require__(572);
44672
44673 var _scrollLeft2 = babelHelpers.interopRequireDefault(_scrollLeft);
44674
44675 var _style = __webpack_require__(402);
44676
44677 var _style2 = babelHelpers.interopRequireDefault(_style);
44678
44679 function nodeName(node) {
44680 return node.nodeName && node.nodeName.toLowerCase();
44681 }
44682
44683 function position(node, offsetParent) {
44684 var parentOffset = { top: 0, left: 0 },
44685 offset;
44686
44687 // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
44688 // because it is its only offset parent
44689 if ((0, _style2['default'])(node, 'position') === 'fixed') {
44690 offset = node.getBoundingClientRect();
44691 } else {
44692 offsetParent = offsetParent || (0, _offsetParent2['default'])(node);
44693 offset = (0, _offset2['default'])(node);
44694
44695 if (nodeName(offsetParent) !== 'html') parentOffset = (0, _offset2['default'])(offsetParent);
44696
44697 parentOffset.top += parseInt((0, _style2['default'])(offsetParent, 'borderTopWidth'), 10) - (0, _scrollTop2['default'])(offsetParent) || 0;
44698 parentOffset.left += parseInt((0, _style2['default'])(offsetParent, 'borderLeftWidth'), 10) - (0, _scrollLeft2['default'])(offsetParent) || 0;
44699 }
44700
44701 // Subtract parent offsets and node margins
44702 return babelHelpers._extends({}, offset, {
44703 top: offset.top - parentOffset.top - (parseInt((0, _style2['default'])(node, 'marginTop'), 10) || 0),
44704 left: offset.left - parentOffset.left - (parseInt((0, _style2['default'])(node, 'marginLeft'), 10) || 0)
44705 });
44706 }
44707
44708 module.exports = exports['default'];
44709
44710/***/ },
44711/* 570 */
44712/***/ function(module, exports, __webpack_require__) {
44713
44714 'use strict';
44715
44716 var babelHelpers = __webpack_require__(408);
44717
44718 exports.__esModule = true;
44719 exports['default'] = offsetParent;
44720
44721 var _ownerDocument = __webpack_require__(417);
44722
44723 var _ownerDocument2 = babelHelpers.interopRequireDefault(_ownerDocument);
44724
44725 var _style = __webpack_require__(402);
44726
44727 var _style2 = babelHelpers.interopRequireDefault(_style);
44728
44729 function nodeName(node) {
44730 return node.nodeName && node.nodeName.toLowerCase();
44731 }
44732
44733 function offsetParent(node) {
44734 var doc = (0, _ownerDocument2['default'])(node),
44735 offsetParent = node && node.offsetParent;
44736
44737 while (offsetParent && nodeName(node) !== 'html' && (0, _style2['default'])(offsetParent, 'position') === 'static') {
44738 offsetParent = offsetParent.offsetParent;
44739 }
44740
44741 return offsetParent || doc.documentElement;
44742 }
44743
44744 module.exports = exports['default'];
44745
44746/***/ },
44747/* 571 */
44748/***/ function(module, exports, __webpack_require__) {
44749
44750 'use strict';
44751 var getWindow = __webpack_require__(547);
44752
44753 module.exports = function scrollTop(node, val) {
44754 var win = getWindow(node);
44755
44756 if (val === undefined) return win ? 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop : node.scrollTop;
44757
44758 if (win) win.scrollTo('pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft, val);else node.scrollTop = val;
44759 };
44760
44761/***/ },
44762/* 572 */
44763/***/ function(module, exports, __webpack_require__) {
44764
44765 'use strict';
44766 var getWindow = __webpack_require__(547);
44767
44768 module.exports = function scrollTop(node, val) {
44769 var win = getWindow(node);
44770
44771 if (val === undefined) return win ? 'pageXOffset' in win ? win.pageXOffset : win.document.documentElement.scrollLeft : node.scrollLeft;
44772
44773 if (win) win.scrollTo(val, 'pageYOffset' in win ? win.pageYOffset : win.document.documentElement.scrollTop);else node.scrollLeft = val;
44774 };
44775
44776/***/ },
44777/* 573 */
44778/***/ function(module, exports, __webpack_require__) {
44779
44780 /* eslint-disable react/prop-types */
44781
44782 'use strict';
44783
44784 var _extends = __webpack_require__(338)['default'];
44785
44786 var _Object$keys = __webpack_require__(361)['default'];
44787
44788 var _interopRequireDefault = __webpack_require__(335)['default'];
44789
44790 exports.__esModule = true;
44791
44792 var _domHelpersQueryContains = __webpack_require__(418);
44793
44794 var _domHelpersQueryContains2 = _interopRequireDefault(_domHelpersQueryContains);
44795
44796 var _lodashCompatObjectPick = __webpack_require__(501);
44797
44798 var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick);
44799
44800 var _react = __webpack_require__(89);
44801
44802 var _react2 = _interopRequireDefault(_react);
44803
44804 var _reactDom = __webpack_require__(122);
44805
44806 var _reactDom2 = _interopRequireDefault(_reactDom);
44807
44808 var _warning = __webpack_require__(271);
44809
44810 var _warning2 = _interopRequireDefault(_warning);
44811
44812 var _Overlay = __webpack_require__(564);
44813
44814 var _Overlay2 = _interopRequireDefault(_Overlay);
44815
44816 var _utilsCreateChainedFunction = __webpack_require__(414);
44817
44818 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
44819
44820 /**
44821 * Check if value one is inside or equal to the of value
44822 *
44823 * @param {string} one
44824 * @param {string|array} of
44825 * @returns {boolean}
44826 */
44827 function isOneOf(one, of) {
44828 if (Array.isArray(of)) {
44829 return of.indexOf(one) >= 0;
44830 }
44831 return one === of;
44832 }
44833
44834 var OverlayTrigger = _react2['default'].createClass({
44835 displayName: 'OverlayTrigger',
44836
44837 propTypes: _extends({}, _Overlay2['default'].propTypes, {
44838
44839 /**
44840 * Specify which action or actions trigger Overlay visibility
44841 */
44842 trigger: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.oneOf(['click', 'hover', 'focus']), _react2['default'].PropTypes.arrayOf(_react2['default'].PropTypes.oneOf(['click', 'hover', 'focus']))]),
44843
44844 /**
44845 * A millisecond delay amount to show and hide the Overlay once triggered
44846 */
44847 delay: _react2['default'].PropTypes.number,
44848 /**
44849 * A millisecond delay amount before showing the Overlay once triggered.
44850 */
44851 delayShow: _react2['default'].PropTypes.number,
44852 /**
44853 * A millisecond delay amount before hiding the Overlay once triggered.
44854 */
44855 delayHide: _react2['default'].PropTypes.number,
44856
44857 /**
44858 * The initial visibility state of the Overlay, for more nuanced visibility control consider
44859 * using the Overlay component directly.
44860 */
44861 defaultOverlayShown: _react2['default'].PropTypes.bool,
44862
44863 /**
44864 * An element or text to overlay next to the target.
44865 */
44866 overlay: _react2['default'].PropTypes.node.isRequired,
44867
44868 /**
44869 * @private
44870 */
44871 onBlur: _react2['default'].PropTypes.func,
44872 /**
44873 * @private
44874 */
44875 onClick: _react2['default'].PropTypes.func,
44876 /**
44877 * @private
44878 */
44879 onFocus: _react2['default'].PropTypes.func,
44880 /**
44881 * @private
44882 */
44883 onMouseEnter: _react2['default'].PropTypes.func,
44884 /**
44885 * @private
44886 */
44887 onMouseLeave: _react2['default'].PropTypes.func,
44888
44889 // override specific overlay props
44890 /**
44891 * @private
44892 */
44893 target: function target() {},
44894 /**
44895 * @private
44896 */
44897 onHide: function onHide() {},
44898 /**
44899 * @private
44900 */
44901 show: function show() {}
44902 }),
44903
44904 getDefaultProps: function getDefaultProps() {
44905 return {
44906 defaultOverlayShown: false,
44907 trigger: ['hover', 'focus']
44908 };
44909 },
44910
44911 getInitialState: function getInitialState() {
44912 return {
44913 isOverlayShown: this.props.defaultOverlayShown
44914 };
44915 },
44916
44917 show: function show() {
44918 this.setState({
44919 isOverlayShown: true
44920 });
44921 },
44922
44923 hide: function hide() {
44924 this.setState({
44925 isOverlayShown: false
44926 });
44927 },
44928
44929 toggle: function toggle() {
44930 if (this.state.isOverlayShown) {
44931 this.hide();
44932 } else {
44933 this.show();
44934 }
44935 },
44936
44937 componentWillMount: function componentWillMount() {
44938 this.handleMouseOver = this.handleMouseOverOut.bind(null, this.handleDelayedShow);
44939 this.handleMouseOut = this.handleMouseOverOut.bind(null, this.handleDelayedHide);
44940 },
44941
44942 componentDidMount: function componentDidMount() {
44943 this._mountNode = document.createElement('div');
44944 this.renderOverlay();
44945 },
44946
44947 renderOverlay: function renderOverlay() {
44948 _reactDom2['default'].unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
44949 },
44950
44951 componentWillUnmount: function componentWillUnmount() {
44952 _reactDom2['default'].unmountComponentAtNode(this._mountNode);
44953 this._mountNode = null;
44954 clearTimeout(this._hoverShowDelay);
44955 clearTimeout(this._hoverHideDelay);
44956 },
44957
44958 componentDidUpdate: function componentDidUpdate() {
44959 if (this._mountNode) {
44960 this.renderOverlay();
44961 }
44962 },
44963
44964 getOverlayTarget: function getOverlayTarget() {
44965 return _reactDom2['default'].findDOMNode(this);
44966 },
44967
44968 getOverlay: function getOverlay() {
44969 var overlayProps = _extends({}, _lodashCompatObjectPick2['default'](this.props, _Object$keys(_Overlay2['default'].propTypes)), {
44970 show: this.state.isOverlayShown,
44971 onHide: this.hide,
44972 target: this.getOverlayTarget,
44973 onExit: this.props.onExit,
44974 onExiting: this.props.onExiting,
44975 onExited: this.props.onExited,
44976 onEnter: this.props.onEnter,
44977 onEntering: this.props.onEntering,
44978 onEntered: this.props.onEntered
44979 });
44980
44981 var overlay = _react.cloneElement(this.props.overlay, {
44982 placement: overlayProps.placement,
44983 container: overlayProps.container
44984 });
44985
44986 return _react2['default'].createElement(
44987 _Overlay2['default'],
44988 overlayProps,
44989 overlay
44990 );
44991 },
44992
44993 render: function render() {
44994 var trigger = _react2['default'].Children.only(this.props.children);
44995 var triggerProps = trigger.props;
44996
44997 var props = {
44998 'aria-describedby': this.props.overlay.props.id
44999 };
45000
45001 // create in render otherwise owner is lost...
45002 this._overlay = this.getOverlay();
45003
45004 props.onClick = _utilsCreateChainedFunction2['default'](triggerProps.onClick, this.props.onClick);
45005
45006 if (isOneOf('click', this.props.trigger)) {
45007 props.onClick = _utilsCreateChainedFunction2['default'](this.toggle, props.onClick);
45008 }
45009
45010 if (isOneOf('hover', this.props.trigger)) {
45011 (undefined) !== 'production' ? _warning2['default'](!(this.props.trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the visibilty of the overlay to just mouse users. ' + 'Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.') : undefined;
45012
45013 props.onMouseOver = _utilsCreateChainedFunction2['default'](this.handleMouseOver, this.props.onMouseOver, triggerProps.onMouseOver);
45014 props.onMouseOut = _utilsCreateChainedFunction2['default'](this.handleMouseOut, this.props.onMouseOut, triggerProps.onMouseOut);
45015 }
45016
45017 if (isOneOf('focus', this.props.trigger)) {
45018 props.onFocus = _utilsCreateChainedFunction2['default'](this.handleDelayedShow, this.props.onFocus, triggerProps.onFocus);
45019 props.onBlur = _utilsCreateChainedFunction2['default'](this.handleDelayedHide, this.props.onBlur, triggerProps.onBlur);
45020 }
45021
45022 return _react.cloneElement(trigger, props);
45023 },
45024
45025 handleDelayedShow: function handleDelayedShow() {
45026 var _this = this;
45027
45028 if (this._hoverHideDelay != null) {
45029 clearTimeout(this._hoverHideDelay);
45030 this._hoverHideDelay = null;
45031 return;
45032 }
45033
45034 if (this.state.isOverlayShown || this._hoverShowDelay != null) {
45035 return;
45036 }
45037
45038 var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
45039
45040 if (!delay) {
45041 this.show();
45042 return;
45043 }
45044
45045 this._hoverShowDelay = setTimeout(function () {
45046 _this._hoverShowDelay = null;
45047 _this.show();
45048 }, delay);
45049 },
45050
45051 handleDelayedHide: function handleDelayedHide() {
45052 var _this2 = this;
45053
45054 if (this._hoverShowDelay != null) {
45055 clearTimeout(this._hoverShowDelay);
45056 this._hoverShowDelay = null;
45057 return;
45058 }
45059
45060 if (!this.state.isOverlayShown || this._hoverHideDelay != null) {
45061 return;
45062 }
45063
45064 var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
45065
45066 if (!delay) {
45067 this.hide();
45068 return;
45069 }
45070
45071 this._hoverHideDelay = setTimeout(function () {
45072 _this2._hoverHideDelay = null;
45073 _this2.hide();
45074 }, delay);
45075 },
45076
45077 // Simple implementation of mouseEnter and mouseLeave.
45078 // React's built version is broken: https://github.com/facebook/react/issues/4251
45079 // for cases when the trigger is disabled and mouseOut/Over can cause flicker moving
45080 // from one child element to another.
45081 handleMouseOverOut: function handleMouseOverOut(handler, e) {
45082 var target = e.currentTarget;
45083 var related = e.relatedTarget || e.nativeEvent.toElement;
45084
45085 if (!related || related !== target && !_domHelpersQueryContains2['default'](target, related)) {
45086 handler(e);
45087 }
45088 }
45089
45090 });
45091
45092 exports['default'] = OverlayTrigger;
45093 module.exports = exports['default'];
45094
45095/***/ },
45096/* 574 */
45097/***/ function(module, exports, __webpack_require__) {
45098
45099 'use strict';
45100
45101 var _extends = __webpack_require__(338)['default'];
45102
45103 var _interopRequireDefault = __webpack_require__(335)['default'];
45104
45105 exports.__esModule = true;
45106
45107 var _react = __webpack_require__(89);
45108
45109 var _react2 = _interopRequireDefault(_react);
45110
45111 var _classnames = __webpack_require__(356);
45112
45113 var _classnames2 = _interopRequireDefault(_classnames);
45114
45115 var PageHeader = _react2['default'].createClass({
45116 displayName: 'PageHeader',
45117
45118 render: function render() {
45119 return _react2['default'].createElement(
45120 'div',
45121 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'page-header') }),
45122 _react2['default'].createElement(
45123 'h1',
45124 null,
45125 this.props.children
45126 )
45127 );
45128 }
45129 });
45130
45131 exports['default'] = PageHeader;
45132 module.exports = exports['default'];
45133
45134/***/ },
45135/* 575 */
45136/***/ function(module, exports, __webpack_require__) {
45137
45138 'use strict';
45139
45140 var _objectWithoutProperties = __webpack_require__(355)['default'];
45141
45142 var _extends = __webpack_require__(338)['default'];
45143
45144 var _interopRequireDefault = __webpack_require__(335)['default'];
45145
45146 exports.__esModule = true;
45147
45148 var _classnames = __webpack_require__(356);
45149
45150 var _classnames2 = _interopRequireDefault(_classnames);
45151
45152 var _react = __webpack_require__(89);
45153
45154 var _react2 = _interopRequireDefault(_react);
45155
45156 var _SafeAnchor = __webpack_require__(371);
45157
45158 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
45159
45160 var _utilsCreateChainedFunction = __webpack_require__(414);
45161
45162 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
45163
45164 var PageItem = _react2['default'].createClass({
45165 displayName: 'PageItem',
45166
45167 propTypes: {
45168 disabled: _react2['default'].PropTypes.bool,
45169 previous: _react2['default'].PropTypes.bool,
45170 next: _react2['default'].PropTypes.bool,
45171 onClick: _react2['default'].PropTypes.func,
45172 onSelect: _react2['default'].PropTypes.func,
45173 eventKey: _react2['default'].PropTypes.any
45174 },
45175
45176 getDefaultProps: function getDefaultProps() {
45177 return {
45178 disabled: false,
45179 previous: false,
45180 next: false
45181 };
45182 },
45183
45184 render: function render() {
45185 var _props = this.props;
45186 var disabled = _props.disabled;
45187 var previous = _props.previous;
45188 var next = _props.next;
45189 var onClick = _props.onClick;
45190 var className = _props.className;
45191 var style = _props.style;
45192
45193 var props = _objectWithoutProperties(_props, ['disabled', 'previous', 'next', 'onClick', 'className', 'style']);
45194
45195 delete props.onSelect;
45196 delete props.eventKey;
45197
45198 return _react2['default'].createElement(
45199 'li',
45200 {
45201 className: _classnames2['default'](className, { disabled: disabled, previous: previous, next: next }),
45202 style: style
45203 },
45204 _react2['default'].createElement(_SafeAnchor2['default'], _extends({}, props, {
45205 disabled: disabled,
45206 onClick: _utilsCreateChainedFunction2['default'](onClick, this.handleSelect)
45207 }))
45208 );
45209 },
45210
45211 handleSelect: function handleSelect(e) {
45212 if (this.props.onSelect || this.props.disabled) {
45213 e.preventDefault();
45214
45215 if (!this.props.disabled) {
45216 this.props.onSelect(this.props.eventKey, e);
45217 }
45218 }
45219 }
45220 });
45221
45222 exports['default'] = PageItem;
45223 module.exports = exports['default'];
45224
45225/***/ },
45226/* 576 */
45227/***/ function(module, exports, __webpack_require__) {
45228
45229 'use strict';
45230
45231 var _extends = __webpack_require__(338)['default'];
45232
45233 var _interopRequireDefault = __webpack_require__(335)['default'];
45234
45235 exports.__esModule = true;
45236
45237 var _react = __webpack_require__(89);
45238
45239 var _react2 = _interopRequireDefault(_react);
45240
45241 var _classnames = __webpack_require__(356);
45242
45243 var _classnames2 = _interopRequireDefault(_classnames);
45244
45245 var _utilsValidComponentChildren = __webpack_require__(365);
45246
45247 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
45248
45249 var _utilsCreateChainedFunction = __webpack_require__(414);
45250
45251 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
45252
45253 var Pager = _react2['default'].createClass({
45254 displayName: 'Pager',
45255
45256 propTypes: {
45257 onSelect: _react2['default'].PropTypes.func
45258 },
45259
45260 render: function render() {
45261 return _react2['default'].createElement(
45262 'ul',
45263 _extends({}, this.props, {
45264 className: _classnames2['default'](this.props.className, 'pager') }),
45265 _utilsValidComponentChildren2['default'].map(this.props.children, this.renderPageItem)
45266 );
45267 },
45268
45269 renderPageItem: function renderPageItem(child, index) {
45270 return _react.cloneElement(child, {
45271 onSelect: _utilsCreateChainedFunction2['default'](child.props.onSelect, this.props.onSelect),
45272 key: child.key ? child.key : index
45273 });
45274 }
45275 });
45276
45277 exports['default'] = Pager;
45278 module.exports = exports['default'];
45279
45280/***/ },
45281/* 577 */
45282/***/ function(module, exports, __webpack_require__) {
45283
45284 'use strict';
45285
45286 var _extends = __webpack_require__(338)['default'];
45287
45288 var _interopRequireDefault = __webpack_require__(335)['default'];
45289
45290 exports.__esModule = true;
45291
45292 var _classnames = __webpack_require__(356);
45293
45294 var _classnames2 = _interopRequireDefault(_classnames);
45295
45296 var _react = __webpack_require__(89);
45297
45298 var _react2 = _interopRequireDefault(_react);
45299
45300 var _reactPropTypesLibElementType = __webpack_require__(380);
45301
45302 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
45303
45304 var _utilsBootstrapUtils = __webpack_require__(357);
45305
45306 var _PaginationButton = __webpack_require__(578);
45307
45308 var _PaginationButton2 = _interopRequireDefault(_PaginationButton);
45309
45310 var _SafeAnchor = __webpack_require__(371);
45311
45312 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
45313
45314 var Pagination = _react2['default'].createClass({
45315 displayName: 'Pagination',
45316
45317 propTypes: {
45318 activePage: _react2['default'].PropTypes.number,
45319 items: _react2['default'].PropTypes.number,
45320 maxButtons: _react2['default'].PropTypes.number,
45321 /**
45322 * When `true`, will display the first and the last button page
45323 */
45324 boundaryLinks: _react2['default'].PropTypes.bool,
45325 /**
45326 * When `true`, will display the default node value ('&hellip;').
45327 * Otherwise, will display provided node (when specified).
45328 */
45329 ellipsis: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _react2['default'].PropTypes.node]),
45330 /**
45331 * When `true`, will display the default node value ('&laquo;').
45332 * Otherwise, will display provided node (when specified).
45333 */
45334 first: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _react2['default'].PropTypes.node]),
45335 /**
45336 * When `true`, will display the default node value ('&raquo;').
45337 * Otherwise, will display provided node (when specified).
45338 */
45339 last: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _react2['default'].PropTypes.node]),
45340 /**
45341 * When `true`, will display the default node value ('&lsaquo;').
45342 * Otherwise, will display provided node (when specified).
45343 */
45344 prev: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _react2['default'].PropTypes.node]),
45345 /**
45346 * When `true`, will display the default node value ('&rsaquo;').
45347 * Otherwise, will display provided node (when specified).
45348 */
45349 next: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.bool, _react2['default'].PropTypes.node]),
45350 onSelect: _react2['default'].PropTypes.func,
45351 /**
45352 * You can use a custom element for the buttons
45353 */
45354 buttonComponentClass: _reactPropTypesLibElementType2['default']
45355 },
45356
45357 getDefaultProps: function getDefaultProps() {
45358 return {
45359 activePage: 1,
45360 items: 1,
45361 maxButtons: 0,
45362 first: false,
45363 last: false,
45364 prev: false,
45365 next: false,
45366 ellipsis: true,
45367 boundaryLinks: false,
45368 buttonComponentClass: _SafeAnchor2['default'],
45369 bsClass: 'pagination'
45370 };
45371 },
45372
45373 renderPageButtons: function renderPageButtons() {
45374 var pageButtons = [];
45375 var startPage = undefined,
45376 endPage = undefined,
45377 hasHiddenPagesAfter = undefined;
45378 var _props = this.props;
45379 var maxButtons = _props.maxButtons;
45380 var activePage = _props.activePage;
45381 var items = _props.items;
45382 var onSelect = _props.onSelect;
45383 var ellipsis = _props.ellipsis;
45384 var buttonComponentClass = _props.buttonComponentClass;
45385 var boundaryLinks = _props.boundaryLinks;
45386
45387 if (maxButtons) {
45388 var hiddenPagesBefore = activePage - parseInt(maxButtons / 2, 10);
45389 startPage = hiddenPagesBefore > 1 ? hiddenPagesBefore : 1;
45390 hasHiddenPagesAfter = startPage + maxButtons <= items;
45391
45392 if (!hasHiddenPagesAfter) {
45393 endPage = items;
45394 startPage = items - maxButtons + 1;
45395 if (startPage < 1) {
45396 startPage = 1;
45397 }
45398 } else {
45399 endPage = startPage + maxButtons - 1;
45400 }
45401 } else {
45402 startPage = 1;
45403 endPage = items;
45404 }
45405
45406 for (var pagenumber = startPage; pagenumber <= endPage; pagenumber++) {
45407 pageButtons.push(_react2['default'].createElement(
45408 _PaginationButton2['default'],
45409 {
45410 key: pagenumber,
45411 eventKey: pagenumber,
45412 active: pagenumber === activePage,
45413 onSelect: onSelect,
45414 buttonComponentClass: buttonComponentClass
45415 },
45416 pagenumber
45417 ));
45418 }
45419
45420 if (boundaryLinks && ellipsis && startPage !== 1) {
45421 pageButtons.unshift(_react2['default'].createElement(
45422 _PaginationButton2['default'],
45423 {
45424 key: 'ellipsisFirst',
45425 disabled: true,
45426 buttonComponentClass: buttonComponentClass
45427 },
45428 _react2['default'].createElement(
45429 'span',
45430 { 'aria-label': 'More' },
45431 this.props.ellipsis === true ? '…' : this.props.ellipsis
45432 )
45433 ));
45434
45435 pageButtons.unshift(_react2['default'].createElement(
45436 _PaginationButton2['default'],
45437 {
45438 key: 1,
45439 eventKey: 1,
45440 active: false,
45441 onSelect: onSelect,
45442 buttonComponentClass: buttonComponentClass
45443 },
45444 '1'
45445 ));
45446 }
45447
45448 if (maxButtons && hasHiddenPagesAfter && ellipsis) {
45449 pageButtons.push(_react2['default'].createElement(
45450 _PaginationButton2['default'],
45451 {
45452 key: 'ellipsis',
45453 disabled: true,
45454 buttonComponentClass: buttonComponentClass
45455 },
45456 _react2['default'].createElement(
45457 'span',
45458 { 'aria-label': 'More' },
45459 this.props.ellipsis === true ? '…' : this.props.ellipsis
45460 )
45461 ));
45462
45463 if (boundaryLinks && endPage !== items) {
45464 pageButtons.push(_react2['default'].createElement(
45465 _PaginationButton2['default'],
45466 {
45467 key: items,
45468 eventKey: items,
45469 active: false,
45470 onSelect: onSelect,
45471 buttonComponentClass: buttonComponentClass
45472 },
45473 items
45474 ));
45475 }
45476 }
45477
45478 return pageButtons;
45479 },
45480
45481 renderPrev: function renderPrev() {
45482 if (!this.props.prev) {
45483 return null;
45484 }
45485
45486 return _react2['default'].createElement(
45487 _PaginationButton2['default'],
45488 {
45489 key: 'prev',
45490 eventKey: this.props.activePage - 1,
45491 disabled: this.props.activePage === 1,
45492 onSelect: this.props.onSelect,
45493 buttonComponentClass: this.props.buttonComponentClass
45494 },
45495 _react2['default'].createElement(
45496 'span',
45497 { 'aria-label': 'Previous' },
45498 this.props.prev === true ? '‹' : this.props.prev
45499 )
45500 );
45501 },
45502
45503 renderNext: function renderNext() {
45504 if (!this.props.next) {
45505 return null;
45506 }
45507
45508 return _react2['default'].createElement(
45509 _PaginationButton2['default'],
45510 {
45511 key: 'next',
45512 eventKey: this.props.activePage + 1,
45513 disabled: this.props.activePage >= this.props.items,
45514 onSelect: this.props.onSelect,
45515 buttonComponentClass: this.props.buttonComponentClass
45516 },
45517 _react2['default'].createElement(
45518 'span',
45519 { 'aria-label': 'Next' },
45520 this.props.next === true ? '›' : this.props.next
45521 )
45522 );
45523 },
45524
45525 renderFirst: function renderFirst() {
45526 if (!this.props.first) {
45527 return null;
45528 }
45529
45530 return _react2['default'].createElement(
45531 _PaginationButton2['default'],
45532 {
45533 key: 'first',
45534 eventKey: 1,
45535 disabled: this.props.activePage === 1,
45536 onSelect: this.props.onSelect,
45537 buttonComponentClass: this.props.buttonComponentClass
45538 },
45539 _react2['default'].createElement(
45540 'span',
45541 { 'aria-label': 'First' },
45542 this.props.first === true ? '«' : this.props.first
45543 )
45544 );
45545 },
45546
45547 renderLast: function renderLast() {
45548 if (!this.props.last) {
45549 return null;
45550 }
45551
45552 return _react2['default'].createElement(
45553 _PaginationButton2['default'],
45554 {
45555 key: 'last',
45556 eventKey: this.props.items,
45557 disabled: this.props.activePage >= this.props.items,
45558 onSelect: this.props.onSelect,
45559 buttonComponentClass: this.props.buttonComponentClass
45560 },
45561 _react2['default'].createElement(
45562 'span',
45563 { 'aria-label': 'Last' },
45564 this.props.last === true ? '»' : this.props.last
45565 )
45566 );
45567 },
45568
45569 render: function render() {
45570 return _react2['default'].createElement(
45571 'ul',
45572 _extends({}, this.props, {
45573 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.getClassSet(this.props))
45574 }),
45575 this.renderFirst(),
45576 this.renderPrev(),
45577 this.renderPageButtons(),
45578 this.renderNext(),
45579 this.renderLast()
45580 );
45581 }
45582 });
45583
45584 exports['default'] = _utilsBootstrapUtils.bsClass('pagination', Pagination);
45585 module.exports = exports['default'];
45586
45587/***/ },
45588/* 578 */
45589/***/ function(module, exports, __webpack_require__) {
45590
45591 'use strict';
45592
45593 var _objectWithoutProperties = __webpack_require__(355)['default'];
45594
45595 var _extends = __webpack_require__(338)['default'];
45596
45597 var _interopRequireDefault = __webpack_require__(335)['default'];
45598
45599 exports.__esModule = true;
45600
45601 var _classnames = __webpack_require__(356);
45602
45603 var _classnames2 = _interopRequireDefault(_classnames);
45604
45605 var _react = __webpack_require__(89);
45606
45607 var _react2 = _interopRequireDefault(_react);
45608
45609 var _reactPropTypesLibElementType = __webpack_require__(380);
45610
45611 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
45612
45613 var _utilsCreateChainedFunction = __webpack_require__(414);
45614
45615 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
45616
45617 var PaginationButton = _react2['default'].createClass({
45618 displayName: 'PaginationButton',
45619
45620 propTypes: {
45621 className: _react2['default'].PropTypes.string,
45622 eventKey: _react2['default'].PropTypes.any,
45623 onSelect: _react2['default'].PropTypes.func,
45624 disabled: _react2['default'].PropTypes.bool,
45625 active: _react2['default'].PropTypes.bool,
45626 onClick: _react2['default'].PropTypes.func,
45627 /**
45628 * You can use a custom element for this component
45629 */
45630 buttonComponentClass: _reactPropTypesLibElementType2['default']
45631 },
45632
45633 getDefaultProps: function getDefaultProps() {
45634 return {
45635 active: false,
45636 disabled: false
45637 };
45638 },
45639
45640 handleClick: function handleClick(event) {
45641 if (this.props.disabled) {
45642 return;
45643 }
45644
45645 if (this.props.onSelect) {
45646 this.props.onSelect(this.props.eventKey, event);
45647 }
45648 },
45649
45650 render: function render() {
45651 var _props = this.props;
45652 var active = _props.active;
45653 var disabled = _props.disabled;
45654 var onClick = _props.onClick;
45655 var ButtonComponentClass = _props.buttonComponentClass;
45656 var className = _props.className;
45657 var style = _props.style;
45658
45659 var props = _objectWithoutProperties(_props, ['active', 'disabled', 'onClick', 'buttonComponentClass', 'className', 'style']);
45660
45661 delete props.onSelect;
45662
45663 return _react2['default'].createElement(
45664 'li',
45665 {
45666 className: _classnames2['default'](className, { active: active, disabled: disabled }),
45667 style: style
45668 },
45669 _react2['default'].createElement(ButtonComponentClass, _extends({}, props, {
45670 disabled: disabled,
45671 onClick: _utilsCreateChainedFunction2['default'](onClick, this.handleClick)
45672 }))
45673 );
45674 }
45675 });
45676
45677 exports['default'] = PaginationButton;
45678 module.exports = exports['default'];
45679
45680/***/ },
45681/* 579 */
45682/***/ function(module, exports, __webpack_require__) {
45683
45684 'use strict';
45685
45686 var _objectWithoutProperties = __webpack_require__(355)['default'];
45687
45688 var _extends = __webpack_require__(338)['default'];
45689
45690 var _interopRequireDefault = __webpack_require__(335)['default'];
45691
45692 exports.__esModule = true;
45693
45694 var _classnames = __webpack_require__(356);
45695
45696 var _classnames2 = _interopRequireDefault(_classnames);
45697
45698 var _react = __webpack_require__(89);
45699
45700 var _react2 = _interopRequireDefault(_react);
45701
45702 var _styleMaps = __webpack_require__(358);
45703
45704 var _utilsBootstrapUtils = __webpack_require__(357);
45705
45706 var _Collapse = __webpack_require__(401);
45707
45708 var _Collapse2 = _interopRequireDefault(_Collapse);
45709
45710 var Panel = _react2['default'].createClass({
45711 displayName: 'Panel',
45712
45713 propTypes: {
45714 collapsible: _react2['default'].PropTypes.bool,
45715 onSelect: _react2['default'].PropTypes.func,
45716 header: _react2['default'].PropTypes.node,
45717 id: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number]),
45718 footer: _react2['default'].PropTypes.node,
45719 defaultExpanded: _react2['default'].PropTypes.bool,
45720 expanded: _react2['default'].PropTypes.bool,
45721 eventKey: _react2['default'].PropTypes.any,
45722 headerRole: _react2['default'].PropTypes.string,
45723 panelRole: _react2['default'].PropTypes.string,
45724
45725 onEnter: _Collapse2['default'].propTypes.onEnter,
45726 onEntering: _Collapse2['default'].propTypes.onEntering,
45727 onEntered: _Collapse2['default'].propTypes.onEntered,
45728 onExit: _Collapse2['default'].propTypes.onExit,
45729 onExiting: _Collapse2['default'].propTypes.onExiting,
45730 onExited: _Collapse2['default'].propTypes.onExited
45731 },
45732
45733 getDefaultProps: function getDefaultProps() {
45734 return {
45735 defaultExpanded: false
45736 };
45737 },
45738
45739 getInitialState: function getInitialState() {
45740 return {
45741 expanded: this.props.defaultExpanded
45742 };
45743 },
45744
45745 handleSelect: function handleSelect(e) {
45746 e.persist();
45747 e.selected = true;
45748
45749 if (this.props.onSelect) {
45750 this.props.onSelect(this.props.eventKey, e);
45751 } else {
45752 e.preventDefault();
45753 }
45754
45755 if (e.selected) {
45756 this.handleToggle();
45757 }
45758 },
45759
45760 handleToggle: function handleToggle() {
45761 this.setState({ expanded: !this.state.expanded });
45762 },
45763
45764 isExpanded: function isExpanded() {
45765 return this.props.expanded != null ? this.props.expanded : this.state.expanded;
45766 },
45767
45768 render: function render() {
45769 var _props = this.props;
45770 var headerRole = _props.headerRole;
45771 var panelRole = _props.panelRole;
45772
45773 var props = _objectWithoutProperties(_props, ['headerRole', 'panelRole']);
45774
45775 return _react2['default'].createElement(
45776 'div',
45777 _extends({}, props, {
45778 className: _classnames2['default'](this.props.className, _utilsBootstrapUtils.getClassSet(this.props)),
45779 id: this.props.collapsible ? null : this.props.id, onSelect: null
45780 }),
45781 this.renderHeading(headerRole),
45782 this.props.collapsible ? this.renderCollapsibleBody(panelRole) : this.renderBody(),
45783 this.renderFooter()
45784 );
45785 },
45786
45787 renderCollapsibleBody: function renderCollapsibleBody(panelRole) {
45788 var collapseProps = {
45789 onEnter: this.props.onEnter,
45790 onEntering: this.props.onEntering,
45791 onEntered: this.props.onEntered,
45792 onExit: this.props.onExit,
45793 onExiting: this.props.onExiting,
45794 onExited: this.props.onExited,
45795 'in': this.isExpanded()
45796 };
45797 var props = {
45798 className: _utilsBootstrapUtils.prefix(this.props, 'collapse'),
45799 id: this.props.id,
45800 ref: 'panel',
45801 'aria-hidden': !this.isExpanded()
45802 };
45803 if (panelRole) {
45804 props.role = panelRole;
45805 }
45806
45807 return _react2['default'].createElement(
45808 _Collapse2['default'],
45809 collapseProps,
45810 _react2['default'].createElement(
45811 'div',
45812 props,
45813 this.renderBody()
45814 )
45815 );
45816 },
45817
45818 renderBody: function renderBody() {
45819 var _this = this;
45820
45821 var allChildren = this.props.children;
45822 var bodyElements = [];
45823 var panelBodyChildren = [];
45824 var bodyClass = _utilsBootstrapUtils.prefix(this.props, 'body');
45825
45826 function getProps() {
45827 return { key: bodyElements.length };
45828 }
45829
45830 function addPanelChild(child) {
45831 bodyElements.push(_react.cloneElement(child, getProps()));
45832 }
45833
45834 function addPanelBody(children) {
45835 bodyElements.push(_react2['default'].createElement(
45836 'div',
45837 _extends({ className: bodyClass }, getProps()),
45838 children
45839 ));
45840 }
45841
45842 function maybeRenderPanelBody() {
45843 if (panelBodyChildren.length === 0) {
45844 return;
45845 }
45846
45847 addPanelBody(panelBodyChildren);
45848 panelBodyChildren = [];
45849 }
45850
45851 // Handle edge cases where we should not iterate through children.
45852 if (!Array.isArray(allChildren) || allChildren.length === 0) {
45853 if (this.shouldRenderFill(allChildren)) {
45854 addPanelChild(allChildren);
45855 } else {
45856 addPanelBody(allChildren);
45857 }
45858 } else {
45859 allChildren.forEach(function (child) {
45860 if (_this.shouldRenderFill(child)) {
45861 maybeRenderPanelBody();
45862
45863 // Separately add the filled element.
45864 addPanelChild(child);
45865 } else {
45866 panelBodyChildren.push(child);
45867 }
45868 });
45869
45870 maybeRenderPanelBody();
45871 }
45872
45873 return bodyElements;
45874 },
45875
45876 shouldRenderFill: function shouldRenderFill(child) {
45877 return _react2['default'].isValidElement(child) && child.props.fill != null;
45878 },
45879
45880 renderHeading: function renderHeading(headerRole) {
45881 var header = this.props.header;
45882
45883 if (!header) {
45884 return null;
45885 }
45886
45887 if (!_react2['default'].isValidElement(header) || Array.isArray(header)) {
45888 header = this.props.collapsible ? this.renderCollapsibleTitle(header, headerRole) : header;
45889 } else {
45890 var className = _classnames2['default'](_utilsBootstrapUtils.prefix(this.props, 'title'), header.props.className);
45891
45892 if (this.props.collapsible) {
45893 header = _react.cloneElement(header, {
45894 className: className,
45895 children: this.renderAnchor(header.props.children, headerRole)
45896 });
45897 } else {
45898 header = _react.cloneElement(header, { className: className });
45899 }
45900 }
45901
45902 return _react2['default'].createElement(
45903 'div',
45904 { className: _utilsBootstrapUtils.prefix(this.props, 'heading') },
45905 header
45906 );
45907 },
45908
45909 renderAnchor: function renderAnchor(header, headerRole) {
45910 return _react2['default'].createElement(
45911 'a',
45912 {
45913 href: '#' + (this.props.id || ''),
45914 'aria-controls': this.props.collapsible ? this.props.id : null,
45915 className: this.isExpanded() ? null : 'collapsed',
45916 'aria-expanded': this.isExpanded(),
45917 'aria-selected': this.isExpanded(),
45918 onClick: this.handleSelect,
45919 role: headerRole
45920 },
45921 header
45922 );
45923 },
45924
45925 renderCollapsibleTitle: function renderCollapsibleTitle(header, headerRole) {
45926 return _react2['default'].createElement(
45927 'h4',
45928 { className: _utilsBootstrapUtils.prefix(this.props, 'title'), role: 'presentation' },
45929 this.renderAnchor(header, headerRole)
45930 );
45931 },
45932
45933 renderFooter: function renderFooter() {
45934 if (!this.props.footer) {
45935 return null;
45936 }
45937
45938 return _react2['default'].createElement(
45939 'div',
45940 { className: _utilsBootstrapUtils.prefix(this.props, 'footer') },
45941 this.props.footer
45942 );
45943 }
45944 });
45945
45946 var PANEL_STATES = _styleMaps.State.values().concat(_styleMaps.DEFAULT, _styleMaps.PRIMARY);
45947
45948 exports['default'] = _utilsBootstrapUtils.bsStyles(PANEL_STATES, _styleMaps.DEFAULT, _utilsBootstrapUtils.bsClass('panel', Panel));
45949 module.exports = exports['default'];
45950
45951/***/ },
45952/* 580 */
45953/***/ function(module, exports, __webpack_require__) {
45954
45955 'use strict';
45956
45957 var _extends = __webpack_require__(338)['default'];
45958
45959 var _interopRequireDefault = __webpack_require__(335)['default'];
45960
45961 exports.__esModule = true;
45962
45963 var _classnames = __webpack_require__(356);
45964
45965 var _classnames2 = _interopRequireDefault(_classnames);
45966
45967 var _react = __webpack_require__(89);
45968
45969 var _react2 = _interopRequireDefault(_react);
45970
45971 var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(488);
45972
45973 var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y);
45974
45975 var _utilsBootstrapUtils = __webpack_require__(357);
45976
45977 var Popover = _react2['default'].createClass({
45978 displayName: 'Popover',
45979
45980 propTypes: {
45981
45982 /**
45983 * An html id attribute, necessary for accessibility
45984 * @type {string}
45985 * @required
45986 */
45987 id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])),
45988
45989 /**
45990 * Sets the direction the Popover is positioned towards.
45991 */
45992 placement: _react2['default'].PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
45993
45994 /**
45995 * The "left" position value for the Popover.
45996 */
45997 positionLeft: _react2['default'].PropTypes.number,
45998 /**
45999 * The "top" position value for the Popover.
46000 */
46001 positionTop: _react2['default'].PropTypes.number,
46002 /**
46003 * The "left" position value for the Popover arrow.
46004 */
46005 arrowOffsetLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
46006 /**
46007 * The "top" position value for the Popover arrow.
46008 */
46009 arrowOffsetTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
46010 /**
46011 * Title text
46012 */
46013 title: _react2['default'].PropTypes.node
46014 },
46015
46016 getDefaultProps: function getDefaultProps() {
46017 return {
46018 placement: 'right',
46019 bsClass: 'popover'
46020 };
46021 },
46022
46023 render: function render() {
46024 var _classes;
46025
46026 var classes = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props)] = true, _classes[this.props.placement] = true, _classes);
46027
46028 var style = _extends({
46029 left: this.props.positionLeft,
46030 top: this.props.positionTop,
46031 display: 'block'
46032 }, this.props.style);
46033
46034 // eslint-disable-line react/prop-types
46035 var arrowStyle = {
46036 left: this.props.arrowOffsetLeft,
46037 top: this.props.arrowOffsetTop
46038 };
46039
46040 return _react2['default'].createElement(
46041 'div',
46042 _extends({
46043 role: 'tooltip'
46044 }, this.props, {
46045 className: _classnames2['default'](this.props.className, classes),
46046 style: style,
46047 title: null
46048 }),
46049 _react2['default'].createElement('div', { className: 'arrow', style: arrowStyle }),
46050 this.props.title ? this.renderTitle() : null,
46051 _react2['default'].createElement(
46052 'div',
46053 { className: _utilsBootstrapUtils.prefix(this.props, 'content') },
46054 this.props.children
46055 )
46056 );
46057 },
46058
46059 renderTitle: function renderTitle() {
46060 return _react2['default'].createElement(
46061 'h3',
46062 { className: _utilsBootstrapUtils.prefix(this.props, 'title') },
46063 this.props.title
46064 );
46065 }
46066 });
46067
46068 exports['default'] = Popover;
46069 module.exports = exports['default'];
46070 // we don't want to expose the `style` property
46071
46072/***/ },
46073/* 581 */
46074/***/ function(module, exports, __webpack_require__) {
46075
46076 'use strict';
46077
46078 var _inherits = __webpack_require__(372)['default'];
46079
46080 var _classCallCheck = __webpack_require__(379)['default'];
46081
46082 var _extends = __webpack_require__(338)['default'];
46083
46084 var _objectWithoutProperties = __webpack_require__(355)['default'];
46085
46086 var _interopRequireDefault = __webpack_require__(335)['default'];
46087
46088 exports.__esModule = true;
46089
46090 var _classnames = __webpack_require__(356);
46091
46092 var _classnames2 = _interopRequireDefault(_classnames);
46093
46094 var _react = __webpack_require__(89);
46095
46096 var _react2 = _interopRequireDefault(_react);
46097
46098 var _styleMaps = __webpack_require__(358);
46099
46100 var _utilsBootstrapUtils = __webpack_require__(357);
46101
46102 var _utilsDeprecationWarning = __webpack_require__(391);
46103
46104 var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning);
46105
46106 var _utilsValidComponentChildren = __webpack_require__(365);
46107
46108 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
46109
46110 var _Interpolate = __webpack_require__(516);
46111
46112 var _Interpolate2 = _interopRequireDefault(_Interpolate);
46113
46114 /**
46115 * Custom propTypes checker
46116 */
46117 function onlyProgressBar(props, propName, componentName) {
46118 if (props[propName]) {
46119 var _ret = (function () {
46120 var error = undefined,
46121 childIdentifier = undefined;
46122
46123 _react2['default'].Children.forEach(props[propName], function (child) {
46124 if (child.type !== ProgressBar) {
46125 //eslint-disable-line
46126 childIdentifier = child.type.displayName ? child.type.displayName : child.type;
46127 error = new Error('Children of ' + componentName + ' can contain only ProgressBar components. Found ' + childIdentifier);
46128 }
46129 });
46130
46131 return {
46132 v: error
46133 };
46134 })();
46135
46136 if (typeof _ret === 'object') return _ret.v;
46137 }
46138 }
46139
46140 var ProgressBar = (function (_React$Component) {
46141 _inherits(ProgressBar, _React$Component);
46142
46143 function ProgressBar() {
46144 _classCallCheck(this, ProgressBar);
46145
46146 _React$Component.apply(this, arguments);
46147 }
46148
46149 ProgressBar.prototype.getPercentage = function getPercentage(now, min, max) {
46150 var roundPrecision = 1000;
46151 return Math.round((now - min) / (max - min) * 100 * roundPrecision) / roundPrecision;
46152 };
46153
46154 ProgressBar.prototype.render = function render() {
46155 if (this.props.isChild) {
46156 return this.renderProgressBar();
46157 }
46158
46159 var content = undefined;
46160
46161 if (this.props.children) {
46162 content = _utilsValidComponentChildren2['default'].map(this.props.children, this.renderChildBar);
46163 } else {
46164 content = this.renderProgressBar();
46165 }
46166
46167 return _react2['default'].createElement(
46168 'div',
46169 _extends({}, this.props, {
46170 className: _classnames2['default'](this.props.className, 'progress'),
46171 min: null,
46172 max: null,
46173 label: null,
46174 'aria-valuetext': null
46175 }),
46176 content
46177 );
46178 };
46179
46180 ProgressBar.prototype.renderChildBar = function renderChildBar(child, index) {
46181 return _react.cloneElement(child, {
46182 isChild: true,
46183 key: child.key ? child.key : index
46184 });
46185 };
46186
46187 ProgressBar.prototype.renderProgressBar = function renderProgressBar() {
46188 var _classNames;
46189
46190 var _props = this.props;
46191 var className = _props.className;
46192 var label = _props.label;
46193 var now = _props.now;
46194 var min = _props.min;
46195 var max = _props.max;
46196 var style = _props.style;
46197
46198 var props = _objectWithoutProperties(_props, ['className', 'label', 'now', 'min', 'max', 'style']);
46199
46200 var percentage = this.getPercentage(now, min, max);
46201
46202 if (typeof label === 'string') {
46203 label = this.renderLabel(percentage);
46204 }
46205
46206 if (this.props.srOnly) {
46207 label = _react2['default'].createElement(
46208 'span',
46209 { className: 'sr-only' },
46210 label
46211 );
46212 }
46213
46214 var classes = _classnames2['default'](className, _utilsBootstrapUtils.getClassSet(this.props), (_classNames = {
46215 active: this.props.active
46216 }, _classNames[_utilsBootstrapUtils.prefix(this.props, 'striped')] = this.props.active || this.props.striped, _classNames));
46217
46218 return _react2['default'].createElement(
46219 'div',
46220 _extends({}, props, {
46221 className: classes,
46222 role: 'progressbar',
46223 style: _extends({ width: percentage + '%' }, style),
46224 'aria-valuenow': this.props.now,
46225 'aria-valuemin': this.props.min,
46226 'aria-valuemax': this.props.max
46227 }),
46228 label
46229 );
46230 };
46231
46232 ProgressBar.prototype.renderLabel = function renderLabel(percentage) {
46233 var _props2 = this.props;
46234 var interpolateClass = _props2.interpolateClass;
46235 var now = _props2.now;
46236 var min = _props2.min;
46237 var max = _props2.max;
46238 var bsStyle = _props2.bsStyle;
46239 var label = _props2.label;
46240
46241 var InterpolateClass = interpolateClass || _Interpolate2['default'];
46242
46243 var REGEXP = InterpolateClass.REGEXP;
46244
46245 if (REGEXP && REGEXP.exec(label)) {
46246 _utilsDeprecationWarning2['default']('String interpolation in <ProgressBar label>', 'ES2015 template strings or other patterns');
46247 }
46248
46249 return _react2['default'].createElement(
46250 InterpolateClass,
46251 {
46252 now: now,
46253 min: min,
46254 max: max,
46255 percent: percentage,
46256 bsStyle: bsStyle
46257 },
46258 label
46259 );
46260 };
46261
46262 return ProgressBar;
46263 })(_react2['default'].Component);
46264
46265 ProgressBar.propTypes = {
46266 min: _react.PropTypes.number,
46267 now: _react.PropTypes.number,
46268 max: _react.PropTypes.number,
46269 label: _react.PropTypes.node,
46270 srOnly: _react.PropTypes.bool,
46271 striped: _react.PropTypes.bool,
46272 active: _react.PropTypes.bool,
46273 children: onlyProgressBar,
46274 className: _react2['default'].PropTypes.string,
46275 interpolateClass: _react.PropTypes.node,
46276 /**
46277 * @private
46278 */
46279 isChild: _react.PropTypes.bool
46280 };
46281
46282 ProgressBar.defaultProps = {
46283 min: 0,
46284 max: 100,
46285 active: false,
46286 isChild: false,
46287 srOnly: false,
46288 striped: false
46289 };
46290
46291 exports['default'] = _utilsBootstrapUtils.bsStyles(_styleMaps.State.values(), _utilsBootstrapUtils.bsClass('progress-bar', ProgressBar));
46292 module.exports = exports['default'];
46293
46294/***/ },
46295/* 582 */
46296/***/ function(module, exports, __webpack_require__) {
46297
46298 'use strict';
46299
46300 var _inherits = __webpack_require__(372)['default'];
46301
46302 var _classCallCheck = __webpack_require__(379)['default'];
46303
46304 var _extends = __webpack_require__(338)['default'];
46305
46306 var _objectWithoutProperties = __webpack_require__(355)['default'];
46307
46308 var _interopRequireDefault = __webpack_require__(335)['default'];
46309
46310 exports.__esModule = true;
46311
46312 var _classnames = __webpack_require__(356);
46313
46314 var _classnames2 = _interopRequireDefault(_classnames);
46315
46316 var _react = __webpack_require__(89);
46317
46318 var _react2 = _interopRequireDefault(_react);
46319
46320 var _warning = __webpack_require__(271);
46321
46322 var _warning2 = _interopRequireDefault(_warning);
46323
46324 var _utilsBootstrapUtils = __webpack_require__(357);
46325
46326 var propTypes = {
46327 inline: _react2['default'].PropTypes.bool,
46328 disabled: _react2['default'].PropTypes.bool,
46329 /**
46330 * Only valid if `inline` is not set.
46331 */
46332 validationState: _react2['default'].PropTypes.oneOf(['success', 'warning', 'error']),
46333 /**
46334 * Attaches a ref to the `<input>` element. Only functions can be used here.
46335 *
46336 * ```js
46337 * <Radio inputRef={ref => { this.input = ref; }} />
46338 * ```
46339 */
46340 inputRef: _react2['default'].PropTypes.func
46341 };
46342
46343 var defaultProps = {
46344 inline: false,
46345 disabled: false
46346 };
46347
46348 var Radio = (function (_React$Component) {
46349 _inherits(Radio, _React$Component);
46350
46351 function Radio() {
46352 _classCallCheck(this, Radio);
46353
46354 _React$Component.apply(this, arguments);
46355 }
46356
46357 Radio.prototype.render = function render() {
46358 var _props = this.props;
46359 var inline = _props.inline;
46360 var disabled = _props.disabled;
46361 var validationState = _props.validationState;
46362 var inputRef = _props.inputRef;
46363 var className = _props.className;
46364 var style = _props.style;
46365 var children = _props.children;
46366
46367 var props = _objectWithoutProperties(_props, ['inline', 'disabled', 'validationState', 'inputRef', 'className', 'style', 'children']);
46368
46369 delete props.bsClass;
46370
46371 var input = _react2['default'].createElement('input', _extends({}, props, {
46372 ref: inputRef,
46373 type: 'radio',
46374 disabled: disabled
46375 }));
46376
46377 if (inline) {
46378 var _classes;
46379
46380 var _classes2 = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props, 'inline')] = true, _classes.disabled = disabled, _classes);
46381
46382 // Use a warning here instead of in propTypes to get better-looking
46383 // generated documentation.
46384 (undefined) !== 'production' ? _warning2['default'](!validationState, '`validationState` is ignored on `<Radio inline>`. To display ' + 'validation state on an inline radio, set `validationState` on a ' + 'parent `<FormGroup>` or other element instead.') : undefined;
46385
46386 return _react2['default'].createElement(
46387 'label',
46388 { className: _classnames2['default'](className, _classes2), style: style },
46389 input,
46390 children
46391 );
46392 }
46393
46394 var classes = _extends({}, _utilsBootstrapUtils.getClassSet(this.props), {
46395 disabled: disabled
46396 });
46397 if (validationState) {
46398 classes['has-' + validationState] = true;
46399 }
46400
46401 return _react2['default'].createElement(
46402 'div',
46403 { className: _classnames2['default'](className, classes), style: style },
46404 _react2['default'].createElement(
46405 'label',
46406 null,
46407 input,
46408 children
46409 )
46410 );
46411 };
46412
46413 return Radio;
46414 })(_react2['default'].Component);
46415
46416 Radio.propTypes = propTypes;
46417 Radio.defaultProps = defaultProps;
46418
46419 exports['default'] = _utilsBootstrapUtils.bsClass('radio', Radio);
46420 module.exports = exports['default'];
46421
46422/***/ },
46423/* 583 */
46424/***/ function(module, exports, __webpack_require__) {
46425
46426 'use strict';
46427
46428 var _inherits = __webpack_require__(372)['default'];
46429
46430 var _classCallCheck = __webpack_require__(379)['default'];
46431
46432 var _extends = __webpack_require__(338)['default'];
46433
46434 var _objectWithoutProperties = __webpack_require__(355)['default'];
46435
46436 var _interopRequireDefault = __webpack_require__(335)['default'];
46437
46438 exports.__esModule = true;
46439
46440 var _classnames = __webpack_require__(356);
46441
46442 var _classnames2 = _interopRequireDefault(_classnames);
46443
46444 var _react = __webpack_require__(89);
46445
46446 var _react2 = _interopRequireDefault(_react);
46447
46448 var _warning = __webpack_require__(271);
46449
46450 var _warning2 = _interopRequireDefault(_warning);
46451
46452 var ResponsiveEmbed = (function (_React$Component) {
46453 _inherits(ResponsiveEmbed, _React$Component);
46454
46455 function ResponsiveEmbed() {
46456 _classCallCheck(this, ResponsiveEmbed);
46457
46458 _React$Component.apply(this, arguments);
46459 }
46460
46461 ResponsiveEmbed.prototype.render = function render() {
46462 var _props = this.props;
46463 var bsClass = _props.bsClass;
46464 var className = _props.className;
46465 var a16by9 = _props.a16by9;
46466 var a4by3 = _props.a4by3;
46467 var children = _props.children;
46468
46469 var props = _objectWithoutProperties(_props, ['bsClass', 'className', 'a16by9', 'a4by3', 'children']);
46470
46471 (undefined) !== 'production' ? _warning2['default'](!(!a16by9 && !a4by3), '`a16by9` or `a4by3` attribute must be set.') : undefined;
46472 (undefined) !== 'production' ? _warning2['default'](!(a16by9 && a4by3), 'Either `a16by9` or `a4by3` attribute can be set. Not both.') : undefined;
46473
46474 var aspectRatio = {
46475 'embed-responsive-16by9': a16by9,
46476 'embed-responsive-4by3': a4by3
46477 };
46478
46479 return _react2['default'].createElement(
46480 'div',
46481 { className: _classnames2['default'](bsClass, aspectRatio) },
46482 _react.cloneElement(children, _extends({}, props, {
46483 className: _classnames2['default'](className, 'embed-responsive-item')
46484 }))
46485 );
46486 };
46487
46488 return ResponsiveEmbed;
46489 })(_react2['default'].Component);
46490
46491 ResponsiveEmbed.defaultProps = {
46492 bsClass: 'embed-responsive',
46493 a16by9: false,
46494 a4by3: false
46495 };
46496
46497 ResponsiveEmbed.propTypes = {
46498 /**
46499 * bootstrap className
46500 * @private
46501 */
46502 bsClass: _react.PropTypes.string,
46503 /**
46504 * This component accepts only one child element
46505 */
46506 children: _react.PropTypes.element.isRequired,
46507 /**
46508 * 16by9 aspect ratio
46509 */
46510 a16by9: _react.PropTypes.bool,
46511 /**
46512 * 4by3 aspect ratio
46513 */
46514 a4by3: _react.PropTypes.bool
46515 };
46516
46517 exports['default'] = ResponsiveEmbed;
46518 module.exports = exports['default'];
46519
46520/***/ },
46521/* 584 */
46522/***/ function(module, exports, __webpack_require__) {
46523
46524 'use strict';
46525
46526 var _extends = __webpack_require__(338)['default'];
46527
46528 var _interopRequireDefault = __webpack_require__(335)['default'];
46529
46530 exports.__esModule = true;
46531
46532 var _react = __webpack_require__(89);
46533
46534 var _react2 = _interopRequireDefault(_react);
46535
46536 var _classnames = __webpack_require__(356);
46537
46538 var _classnames2 = _interopRequireDefault(_classnames);
46539
46540 var _reactPropTypesLibElementType = __webpack_require__(380);
46541
46542 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
46543
46544 var Row = _react2['default'].createClass({
46545 displayName: 'Row',
46546
46547 propTypes: {
46548 /**
46549 * You can use a custom element for this component
46550 */
46551 componentClass: _reactPropTypesLibElementType2['default']
46552 },
46553
46554 getDefaultProps: function getDefaultProps() {
46555 return {
46556 componentClass: 'div'
46557 };
46558 },
46559
46560 render: function render() {
46561 var ComponentClass = this.props.componentClass;
46562
46563 return _react2['default'].createElement(
46564 ComponentClass,
46565 _extends({}, this.props, { className: _classnames2['default'](this.props.className, 'row') }),
46566 this.props.children
46567 );
46568 }
46569 });
46570
46571 exports['default'] = Row;
46572 module.exports = exports['default'];
46573
46574/***/ },
46575/* 585 */
46576/***/ function(module, exports, __webpack_require__) {
46577
46578 'use strict';
46579
46580 var _inherits = __webpack_require__(372)['default'];
46581
46582 var _classCallCheck = __webpack_require__(379)['default'];
46583
46584 var _extends = __webpack_require__(338)['default'];
46585
46586 var _objectWithoutProperties = __webpack_require__(355)['default'];
46587
46588 var _Object$keys = __webpack_require__(361)['default'];
46589
46590 var _interopRequireDefault = __webpack_require__(335)['default'];
46591
46592 exports.__esModule = true;
46593
46594 var _react = __webpack_require__(89);
46595
46596 var _react2 = _interopRequireDefault(_react);
46597
46598 var _Button = __webpack_require__(382);
46599
46600 var _Button2 = _interopRequireDefault(_Button);
46601
46602 var _Dropdown = __webpack_require__(415);
46603
46604 var _Dropdown2 = _interopRequireDefault(_Dropdown);
46605
46606 var _SplitToggle = __webpack_require__(586);
46607
46608 var _SplitToggle2 = _interopRequireDefault(_SplitToggle);
46609
46610 var _lodashCompatObjectOmit = __webpack_require__(473);
46611
46612 var _lodashCompatObjectOmit2 = _interopRequireDefault(_lodashCompatObjectOmit);
46613
46614 var _lodashCompatObjectPick = __webpack_require__(501);
46615
46616 var _lodashCompatObjectPick2 = _interopRequireDefault(_lodashCompatObjectPick);
46617
46618 var SplitButton = (function (_React$Component) {
46619 _inherits(SplitButton, _React$Component);
46620
46621 function SplitButton() {
46622 _classCallCheck(this, SplitButton);
46623
46624 _React$Component.apply(this, arguments);
46625 }
46626
46627 SplitButton.prototype.render = function render() {
46628 var _props = this.props;
46629 var children = _props.children;
46630 var title = _props.title;
46631 var onClick = _props.onClick;
46632 var target = _props.target;
46633 var href = _props.href;
46634 var toggleLabel = _props.toggleLabel;
46635 var bsSize = _props.bsSize;
46636 var bsStyle = _props.bsStyle;
46637
46638 var props = _objectWithoutProperties(_props, ['children', 'title', 'onClick', 'target', 'href', 'toggleLabel', 'bsSize', 'bsStyle']);
46639
46640 var disabled = props.disabled;
46641
46642 var dropdownProps = _lodashCompatObjectPick2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes));
46643 var buttonProps = _lodashCompatObjectOmit2['default'](props, _Object$keys(_Dropdown2['default'].ControlledComponent.propTypes));
46644
46645 return _react2['default'].createElement(
46646 _Dropdown2['default'],
46647 dropdownProps,
46648 _react2['default'].createElement(
46649 _Button2['default'],
46650 _extends({}, buttonProps, {
46651 onClick: onClick,
46652 bsStyle: bsStyle,
46653 bsSize: bsSize,
46654 disabled: disabled,
46655 target: target,
46656 href: href
46657 }),
46658 title
46659 ),
46660 _react2['default'].createElement(_SplitToggle2['default'], {
46661 'aria-label': toggleLabel || title,
46662 bsStyle: bsStyle,
46663 bsSize: bsSize,
46664 disabled: disabled
46665 }),
46666 _react2['default'].createElement(
46667 _Dropdown2['default'].Menu,
46668 null,
46669 children
46670 )
46671 );
46672 };
46673
46674 return SplitButton;
46675 })(_react2['default'].Component);
46676
46677 SplitButton.propTypes = _extends({}, _Dropdown2['default'].propTypes, {
46678 bsStyle: _Button2['default'].propTypes.bsStyle,
46679
46680 /**
46681 * @private
46682 */
46683 onClick: function onClick() {},
46684 target: _react2['default'].PropTypes.string,
46685 href: _react2['default'].PropTypes.string,
46686 /**
46687 * The content of the split button.
46688 */
46689 title: _react2['default'].PropTypes.node.isRequired,
46690 /**
46691 * Accessible label for the toggle; the value of `title` if not specified.
46692 */
46693 toggleLabel: _react2['default'].PropTypes.string
46694 });
46695
46696 SplitButton.defaultProps = {
46697 disabled: false,
46698 dropup: false,
46699 pullRight: false
46700 };
46701
46702 SplitButton.Toggle = _SplitToggle2['default'];
46703
46704 exports['default'] = SplitButton;
46705 module.exports = exports['default'];
46706
46707/***/ },
46708/* 586 */
46709/***/ function(module, exports, __webpack_require__) {
46710
46711 'use strict';
46712
46713 var _inherits = __webpack_require__(372)['default'];
46714
46715 var _classCallCheck = __webpack_require__(379)['default'];
46716
46717 var _extends = __webpack_require__(338)['default'];
46718
46719 var _interopRequireDefault = __webpack_require__(335)['default'];
46720
46721 exports.__esModule = true;
46722
46723 var _react = __webpack_require__(89);
46724
46725 var _react2 = _interopRequireDefault(_react);
46726
46727 var _DropdownToggle = __webpack_require__(499);
46728
46729 var _DropdownToggle2 = _interopRequireDefault(_DropdownToggle);
46730
46731 var SplitToggle = (function (_React$Component) {
46732 _inherits(SplitToggle, _React$Component);
46733
46734 function SplitToggle() {
46735 _classCallCheck(this, SplitToggle);
46736
46737 _React$Component.apply(this, arguments);
46738 }
46739
46740 SplitToggle.prototype.render = function render() {
46741 return _react2['default'].createElement(_DropdownToggle2['default'], _extends({}, this.props, {
46742 useAnchor: false,
46743 noCaret: false
46744 }));
46745 };
46746
46747 return SplitToggle;
46748 })(_react2['default'].Component);
46749
46750 exports['default'] = SplitToggle;
46751
46752 SplitToggle.defaultProps = _DropdownToggle2['default'].defaultProps;
46753 module.exports = exports['default'];
46754
46755/***/ },
46756/* 587 */
46757/***/ function(module, exports, __webpack_require__) {
46758
46759 'use strict';
46760
46761 var _inherits = __webpack_require__(372)['default'];
46762
46763 var _classCallCheck = __webpack_require__(379)['default'];
46764
46765 var _extends = __webpack_require__(338)['default'];
46766
46767 var _objectWithoutProperties = __webpack_require__(355)['default'];
46768
46769 var _interopRequireDefault = __webpack_require__(335)['default'];
46770
46771 exports.__esModule = true;
46772
46773 var _react = __webpack_require__(89);
46774
46775 var _react2 = _interopRequireDefault(_react);
46776
46777 var _TabPane = __webpack_require__(588);
46778
46779 var _TabPane2 = _interopRequireDefault(_TabPane);
46780
46781 var _TabContainer = __webpack_require__(589);
46782
46783 var _TabContainer2 = _interopRequireDefault(_TabContainer);
46784
46785 var _TabContent = __webpack_require__(590);
46786
46787 var _TabContent2 = _interopRequireDefault(_TabContent);
46788
46789 var Tab = (function (_React$Component) {
46790 _inherits(Tab, _React$Component);
46791
46792 function Tab() {
46793 _classCallCheck(this, Tab);
46794
46795 _React$Component.apply(this, arguments);
46796 }
46797
46798 Tab.prototype.render = function render() {
46799 var _props = this.props;
46800 var title = _props.title;
46801 var disabled = _props.disabled;
46802 var tabClassName = _props.tabClassName;
46803
46804 var props = _objectWithoutProperties(_props, ['title', 'disabled', 'tabClassName']);
46805
46806 return _react2['default'].createElement(_TabPane2['default'], props);
46807 };
46808
46809 return Tab;
46810 })(_react2['default'].Component);
46811
46812 Tab.propTypes = _extends({}, _TabPane2['default'].propTypes, {
46813
46814 disabled: _react2['default'].PropTypes.bool,
46815
46816 title: _react2['default'].PropTypes.node,
46817
46818 /**
46819 * tabClassName is used as className for the associated NavItem
46820 */
46821 tabClassName: _react2['default'].PropTypes.string
46822 });
46823
46824 Tab.Container = _TabContainer2['default'];
46825 Tab.Content = _TabContent2['default'];
46826 Tab.Pane = _TabPane2['default'];
46827
46828 exports['default'] = Tab;
46829 module.exports = exports['default'];
46830
46831/***/ },
46832/* 588 */
46833/***/ function(module, exports, __webpack_require__) {
46834
46835 'use strict';
46836
46837 var _extends = __webpack_require__(338)['default'];
46838
46839 var _interopRequireDefault = __webpack_require__(335)['default'];
46840
46841 exports.__esModule = true;
46842
46843 var _classnames = __webpack_require__(356);
46844
46845 var _classnames2 = _interopRequireDefault(_classnames);
46846
46847 var _domHelpersClassAddClass = __webpack_require__(543);
46848
46849 var _domHelpersClassAddClass2 = _interopRequireDefault(_domHelpersClassAddClass);
46850
46851 var _react = __webpack_require__(89);
46852
46853 var _react2 = _interopRequireDefault(_react);
46854
46855 var _reactPropTypesLibElementType = __webpack_require__(380);
46856
46857 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
46858
46859 var _warning = __webpack_require__(271);
46860
46861 var _warning2 = _interopRequireDefault(_warning);
46862
46863 var _utilsBootstrapUtils = __webpack_require__(357);
46864
46865 var _utilsCreateChainedFunction = __webpack_require__(414);
46866
46867 var _utilsCreateChainedFunction2 = _interopRequireDefault(_utilsCreateChainedFunction);
46868
46869 var _utilsTabUtils = __webpack_require__(556);
46870
46871 var _Fade = __webpack_require__(502);
46872
46873 var _Fade2 = _interopRequireDefault(_Fade);
46874
46875 var TabPane = _react2['default'].createClass({
46876 displayName: 'TabPane',
46877
46878 propTypes: {
46879
46880 /**
46881 * Uniquely identify the TabPane amoung its siblings.
46882 */
46883 eventKey: _react.PropTypes.any,
46884
46885 /**
46886 * Use animation when showing or hiding TabPanes. Use `false` to disable,
46887 * `true` to enable the default "Fade" animation or any Transition component.
46888 *
46889 */
46890 animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _reactPropTypesLibElementType2['default']]),
46891
46892 /** @private **/
46893 id: _react.PropTypes.string,
46894
46895 /** @private **/
46896 'aria-labelledby': _react.PropTypes.string,
46897
46898 /**
46899 * Transition onEnter callback when animation is not `false`
46900 */
46901 onEnter: _react.PropTypes.func,
46902
46903 /**
46904 * Transition onEntering callback when animation is not `false`
46905 */
46906 onEntering: _react.PropTypes.func,
46907
46908 /**
46909 * Transition onEntered callback when animation is not `false`
46910 */
46911 onEntered: _react.PropTypes.func,
46912
46913 /**
46914 * Transition onExit callback when animation is not `false`
46915 */
46916 onExit: _react.PropTypes.func,
46917
46918 /**
46919 * Transition onExiting callback when animation is not `false`
46920 */
46921 onExiting: _react.PropTypes.func,
46922
46923 /**
46924 * Transition onExited callback when animation is not `false`
46925 */
46926 onExited: _react.PropTypes.func,
46927
46928 /**
46929 * Unmount the tab (remove it from the DOM) when it is no longer visible
46930 */
46931 unmountOnExit: _react.PropTypes.bool
46932 },
46933
46934 contextTypes: {
46935 $bs_tabcontainer: _react.PropTypes.shape({
46936 getId: _react.PropTypes.func,
46937 unmountOnExit: _react.PropTypes.bool
46938 }),
46939 $bs_tabcontent: _react.PropTypes.shape({
46940 bsClass: _react.PropTypes.string,
46941 animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _reactPropTypesLibElementType2['default']]),
46942 activeKey: _react.PropTypes.any,
46943 onExited: _react.PropTypes.func,
46944 register: _react.PropTypes.func,
46945 unmountOnExit: _react.PropTypes.bool
46946 })
46947 },
46948
46949 /**
46950 * We override the TabContainer context so Navs in TabPanes
46951 * don't conflict with the top level one.
46952 */
46953 childContextTypes: {
46954 $bs_tabcontainer: _react.PropTypes.oneOf([null])
46955 },
46956
46957 componentWillMount: function componentWillMount() {
46958 this.exited = !this.isActive();
46959 this.registerWithParent();
46960 },
46961
46962 componentWillReceiveProps: function componentWillReceiveProps(nextProps, nextContext) {
46963 if (nextProps.eventKey !== this.props.eventKey) {
46964 this.unregisterWithParent();
46965 this.registerWithParent(nextProps, nextContext);
46966 }
46967 },
46968
46969 componentWillUpdate: function componentWillUpdate(nextProps, _, nextContext) {
46970 if (this.isActive(nextProps, nextContext)) {
46971 this.exited = false;
46972 } else if (!this.exited && !this.getTransition(nextProps, nextContext)) {
46973 // Otherwise let handleHidden take care of marking exited.
46974 this.exited = true;
46975 this._fireExitedCallback = true;
46976 }
46977 },
46978
46979 componentDidUpdate: function componentDidUpdate() {
46980 if (this._fireExitedCallback) {
46981 this._fireExitedCallback = false;
46982 this.onExited();
46983 }
46984 },
46985
46986 componentWillUnmount: function componentWillUnmount() {
46987 this.unregisterWithParent();
46988 },
46989
46990 getChildContext: function getChildContext() {
46991 return { $bs_tabcontainer: null };
46992 },
46993
46994 getTransition: function getTransition() {
46995 var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
46996 var context = arguments.length <= 1 || arguments[1] === undefined ? this.context : arguments[1];
46997
46998 context = this.getContext('$bs_tabcontent', context);
46999 return props.animation != null ? props.animation : context.animation;
47000 },
47001
47002 getUnmountOnExit: function getUnmountOnExit() {
47003 var context = this.getContext('$bs_tabcontent', this.context);
47004 return this.props.unmountOnExit != null ? this.props.unmountOnExit : context.unmountOnExit;
47005 },
47006
47007 isActive: function isActive() {
47008 var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
47009 var context = arguments.length <= 1 || arguments[1] === undefined ? this.context : arguments[1];
47010
47011 return this.getContext('$bs_tabcontent', context).activeKey === props.eventKey;
47012 },
47013
47014 render: function render() {
47015 var _classes;
47016
47017 var active = this.isActive();
47018 var visible = active || !this.exited;
47019 var getId = this.getContext('$bs_tabcontainer').getId;
47020 var bsClass = this.props.bsClass || this.getContext('$bs_tabcontent').bsClass;
47021
47022 var Transition = this.getTransition();
47023
47024 if (!visible && !Transition && this.getUnmountOnExit()) {
47025 return null;
47026 }
47027
47028 var classes = (_classes = {
47029 active: visible
47030 }, _classes[_utilsBootstrapUtils.prefix({ bsClass: bsClass }, 'pane')] = true, _classes);
47031
47032 var _props = this.props;
47033 var eventKey = _props.eventKey;
47034 var id = _props.id;
47035 var labelledBy = _props['aria-labelledby'];
47036 var onExit = _props.onExit;
47037 var onExiting = _props.onExiting;
47038 var onExited = _props.onExited;
47039 var onEnter = _props.onEnter;
47040 var onEntering = _props.onEntering;
47041 var onEntered = _props.onEntered;
47042
47043 if (typeof Transition === 'boolean') {
47044 Transition = Transition ? _Fade2['default'] : null;
47045 }
47046
47047 if (getId) {
47048 (undefined) !== 'production' ? _warning2['default'](!(id || labelledBy), 'In the context of a TabContainer, TabPanes are given generated `id` and `aria-labelledby` ' + 'attributes for the sake of proper component accessibility. Any provided ones will be ignored. ' + 'To control these attributes directly provide a `generateChildId` prop to the parent TabContainer.') : undefined;
47049 id = getId(eventKey, _utilsTabUtils.PANE) || null;
47050 labelledBy = getId(eventKey, _utilsTabUtils.TAB) || null;
47051 }
47052
47053 var tabPane = _react2['default'].createElement(
47054 'div',
47055 _extends({}, this.props, {
47056 id: id,
47057 role: 'tabpanel',
47058 'aria-hidden': !visible,
47059 'aria-labelledby': labelledBy,
47060 className: _classnames2['default'](this.props.className, classes, { 'in': !Transition })
47061 }),
47062 this.props.children
47063 );
47064
47065 if (Transition) {
47066 tabPane = _react2['default'].createElement(
47067 Transition,
47068 {
47069 'in': active,
47070 onExit: onExit,
47071 onExiting: onExiting,
47072 onExited: _utilsCreateChainedFunction2['default'](this.handleExited, onExited),
47073 onEnter: _utilsCreateChainedFunction2['default'](this.handleEnter, onEnter),
47074 onEntering: onEntering,
47075 onEntered: onEntered,
47076 unmountOnExit: this.getUnmountOnExit()
47077 },
47078 tabPane
47079 );
47080 }
47081
47082 return tabPane;
47083 },
47084
47085 onExited: function onExited() {
47086 var context = this.getContext('$bs_tabcontent');
47087 if (context.onExited) {
47088 context.onExited(this.props.eventKey);
47089 }
47090 },
47091
47092 handleEnter: function handleEnter(node) {
47093 // ref: https://github.com/react-bootstrap/react-overlays/issues/40
47094 if (this.isActive()) {
47095 _domHelpersClassAddClass2['default'](node, 'active');
47096 node.offsetWidth; // eslint-disable-line no-unused-expressions
47097 }
47098 },
47099
47100 handleExited: function handleExited() {
47101 this.exited = true;
47102 this.onExited();
47103 this.forceUpdate();
47104 },
47105
47106 registerWithParent: function registerWithParent() {
47107 var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
47108 var context = arguments.length <= 1 || arguments[1] === undefined ? this.context : arguments[1];
47109
47110 var register = this.getContext('$bs_tabcontent', context).register;
47111
47112 if (register) {
47113 this.unregister = register(props.eventKey);
47114 }
47115 },
47116
47117 unregisterWithParent: function unregisterWithParent() {
47118 if (this.unregister) {
47119 this.unregister();
47120 }
47121 },
47122
47123 getContext: function getContext(key) {
47124 var context = arguments.length <= 1 || arguments[1] === undefined ? this.context : arguments[1];
47125
47126 return context[key] || {};
47127 }
47128 });
47129
47130 exports['default'] = _utilsBootstrapUtils.bsClass('tab', TabPane);
47131 module.exports = exports['default'];
47132
47133/***/ },
47134/* 589 */
47135/***/ function(module, exports, __webpack_require__) {
47136
47137 'use strict';
47138
47139 var _objectWithoutProperties = __webpack_require__(355)['default'];
47140
47141 var _interopRequireDefault = __webpack_require__(335)['default'];
47142
47143 exports.__esModule = true;
47144
47145 var _react = __webpack_require__(89);
47146
47147 var _react2 = _interopRequireDefault(_react);
47148
47149 var _uncontrollable = __webpack_require__(489);
47150
47151 var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
47152
47153 var idPropType = _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.number]);
47154
47155 var TabContainer = _react2['default'].createClass({
47156 displayName: 'TabContainer',
47157
47158 propTypes: {
47159 /**
47160 * HTML id attribute, required if no `generateChildId` prop
47161 * is specified.
47162 */
47163 id: function id(props) {
47164 var error = null;
47165
47166 if (!props.generateChildId) {
47167 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
47168 args[_key - 1] = arguments[_key];
47169 }
47170
47171 error = idPropType.apply(undefined, [props].concat(args));
47172
47173 if (!error && !props.id) {
47174 error = new Error('In order to properly initialize Tabs in a way that is accessible to assistive technologies ' + '(such as screen readers) an `id` or a `generateChildId` prop to TabContainer is required');
47175 }
47176 }
47177 return error;
47178 },
47179
47180 /**
47181 * A function that takes an eventKey and type and returns a
47182 * unique id for child tab NavItems and TabPanes. The function _must_ be a pure function,
47183 * meaning it should always return the _same_ id for the same set of inputs. The default
47184 * value requires that an `id` to be set for the TabContainer.
47185 *
47186 * The `type` argument will either be `"tab"` or `"pane"`.
47187 *
47188 * @defaultValue (eventKey, type) => `${this.props.id}-${type}-${key}`
47189 */
47190 generateChildId: _react.PropTypes.func,
47191
47192 /**
47193 * A callback fired when a tab is selected.
47194 *
47195 * @controllable activeKey
47196 */
47197 onSelect: _react.PropTypes.func,
47198
47199 /**
47200 * The `eventKey` of the currently active tab.
47201 *
47202 * @controllable onSelect
47203 */
47204 activeKey: _react.PropTypes.any
47205 },
47206
47207 childContextTypes: {
47208 $bs_tabcontainer: _react2['default'].PropTypes.shape({
47209 activeKey: _react.PropTypes.any,
47210 onSelect: _react.PropTypes.func,
47211 getId: _react.PropTypes.func
47212 })
47213 },
47214
47215 getChildContext: function getChildContext() {
47216 var _props = this.props;
47217 var activeKey = _props.activeKey;
47218 var generateChildId = _props.generateChildId;
47219 var id = _props.id;
47220
47221 return {
47222 $bs_tabcontainer: {
47223 activeKey: activeKey,
47224 onSelect: this.handleSelect,
47225 getId: generateChildId || function (key, type) {
47226 return id ? id + '-' + type + '-' + key : null;
47227 }
47228 }
47229 };
47230 },
47231
47232 componentWillUnmount: function componentWillUnmount() {
47233 // isMounted() isn't `true` at this point;
47234 this.unmounting = true;
47235 },
47236
47237 handleSelect: function handleSelect(key) {
47238 if (!this.unmounting) {
47239 this.props.onSelect(key);
47240 }
47241 },
47242
47243 render: function render() {
47244 var _props2 = this.props;
47245 var children = _props2.children;
47246
47247 var props = _objectWithoutProperties(_props2, ['children']);
47248
47249 delete props.generateChildId;
47250 delete props.onSelect;
47251 delete props.activeKey;
47252
47253 return _react2['default'].cloneElement(_react2['default'].Children.only(children), props);
47254 }
47255 });
47256
47257 exports['default'] = _uncontrollable2['default'](TabContainer, { activeKey: 'onSelect' });
47258 module.exports = exports['default'];
47259
47260/***/ },
47261/* 590 */
47262/***/ function(module, exports, __webpack_require__) {
47263
47264 'use strict';
47265
47266 var _interopRequireDefault = __webpack_require__(335)['default'];
47267
47268 exports.__esModule = true;
47269
47270 var _classnames = __webpack_require__(356);
47271
47272 var _classnames2 = _interopRequireDefault(_classnames);
47273
47274 var _invariant = __webpack_require__(268);
47275
47276 var _invariant2 = _interopRequireDefault(_invariant);
47277
47278 var _react = __webpack_require__(89);
47279
47280 var _react2 = _interopRequireDefault(_react);
47281
47282 var _reactPropTypesLibElementType = __webpack_require__(380);
47283
47284 var _reactPropTypesLibElementType2 = _interopRequireDefault(_reactPropTypesLibElementType);
47285
47286 var _utilsBootstrapUtils = __webpack_require__(357);
47287
47288 var animationPropType = _react.PropTypes.oneOfType([_react.PropTypes.bool, _reactPropTypesLibElementType2['default']]);
47289
47290 var TabContent = _react2['default'].createClass({
47291 displayName: 'TabContent',
47292
47293 propTypes: {
47294
47295 /**
47296 * the Component used to render the TabContent
47297 */
47298 componentClass: _reactPropTypesLibElementType2['default'],
47299
47300 /**
47301 * Sets a default animation strategy for all children TabPanes.
47302 * Use `false` to disable, `true` to enable the default "Fade"
47303 * animation or any `<Transition>` component.
47304 */
47305 animation: _react.PropTypes.oneOfType([_react.PropTypes.bool, _reactPropTypesLibElementType2['default']]),
47306
47307 /**
47308 * Unmount the tab (remove it from the DOM) when it is no longer visible
47309 */
47310 unmountOnExit: _react.PropTypes.bool
47311 },
47312
47313 contextTypes: {
47314 $bs_tabcontainer: _react2['default'].PropTypes.shape({
47315 activeKey: _react2['default'].PropTypes.any,
47316 onSelect: _react.PropTypes.func
47317 })
47318 },
47319
47320 childContextTypes: {
47321 $bs_tabcontent: _react.PropTypes.shape({
47322 bsClass: _react.PropTypes.string,
47323 animation: animationPropType,
47324 activeKey: _react.PropTypes.any,
47325 onExited: _react.PropTypes.func,
47326 register: _react.PropTypes.func,
47327 unmountOnExit: _react.PropTypes.bool
47328 })
47329 },
47330
47331 getDefaultProps: function getDefaultProps() {
47332 return {
47333 componentClass: 'div',
47334 animation: true,
47335 unmountOnExit: false
47336 };
47337 },
47338
47339 getInitialState: function getInitialState() {
47340 return {
47341 exitingPane: null
47342 };
47343 },
47344
47345 getChildContext: function getChildContext() {
47346 var exitingPane = this._exitingPane;
47347
47348 return {
47349 $bs_tabcontent: {
47350 bsClass: this.props.bsClass,
47351 animation: this.props.animation,
47352 activeKey: exitingPane ? undefined : this.getActiveKey(),
47353 onExited: this.handlePaneExited,
47354 register: this.registerPane,
47355 unmountOnExit: this.props.unmountOnExit
47356 }
47357 };
47358 },
47359
47360 componentWillMount: function componentWillMount() {
47361 this.panes = [];
47362 },
47363
47364 /**
47365 * This belongs in `componentWillReceiveProps()` but
47366 * 0.14.x contains a bug where cwrp isn't called when only context changes.
47367 * fixed in master, not sure it will make it into any 0.14 release
47368 */
47369 componentWillUpdate: function componentWillUpdate(nextProps, _, nextContext) {
47370 var currentActiveKey = this.getActiveKey();
47371 var nextActiveKey = this.getActiveKey(nextContext);
47372 var currentKeyIsStillValid = this.panes.indexOf(currentActiveKey) !== -1;
47373
47374 if (this.panes.indexOf(this._exitingPane) === -1) {
47375 this._exitingPane = null;
47376 }
47377
47378 if (nextActiveKey !== currentActiveKey && currentKeyIsStillValid) {
47379 this._exitingPane = currentActiveKey;
47380 }
47381 },
47382
47383 render: function render() {
47384 var _props = this.props;
47385 var className = _props.className;
47386 var children = _props.children;
47387
47388 var Component = this.props.componentClass;
47389
47390 var contentClass = _utilsBootstrapUtils.prefix(this.props, 'content');
47391
47392 return _react2['default'].createElement(
47393 Component,
47394 { className: _classnames2['default'](contentClass, className) },
47395 children
47396 );
47397 },
47398
47399 handlePaneExited: function handlePaneExited() {
47400 this._exitingPane = null;
47401 this.forceUpdate();
47402 },
47403
47404 /**
47405 * This is unfortunately neccessary because the TabContent needs to know if
47406 * a TabPane is ever going to exit, since it may unmount and just leave the
47407 * TabContent to wait longingly forever for the handlePaneExited to be called.
47408 */
47409 registerPane: function registerPane(eventKey) {
47410 var _this = this;
47411
47412 var panes = this.panes;
47413
47414 !(panes.indexOf(eventKey) === -1) ? (undefined) !== 'production' ? _invariant2['default'](false, 'You cannot have multiple TabPanes of with the same `eventKey` in the same ' + 'TabContent component. Duplicate eventKey: ' + eventKey) : _invariant2['default'](false) : undefined;
47415
47416 panes.push(eventKey);
47417
47418 return function () {
47419 panes.splice(panes.indexOf(eventKey), 1);
47420
47421 // #1892
47422 // new active state can propagate down _before_
47423 // the tab actually unmounts, so it will map be exiting.
47424 // since an exiting tab won't complete, clear the bad state
47425 if (eventKey === _this._exitingPane) {
47426 _this.handlePaneExited();
47427 }
47428
47429 // If the tab was active, we need to tell the container
47430 // that it no longer exists and as such is not active.
47431 if (eventKey === _this.getActiveKey()) {
47432 _this.getContext('$bs_tabcontainer').onSelect();
47433 }
47434 };
47435 },
47436
47437 getActiveKey: function getActiveKey() {
47438 var context = arguments.length <= 0 || arguments[0] === undefined ? this.context : arguments[0];
47439
47440 return this.getContext('$bs_tabcontainer', context).activeKey;
47441 },
47442
47443 getContext: function getContext(key) {
47444 var context = arguments.length <= 1 || arguments[1] === undefined ? this.context : arguments[1];
47445
47446 return context[key] || {};
47447 }
47448 });
47449
47450 exports['default'] = _utilsBootstrapUtils.bsClass('tab', TabContent);
47451 module.exports = exports['default'];
47452
47453/***/ },
47454/* 591 */
47455/***/ function(module, exports, __webpack_require__) {
47456
47457 'use strict';
47458
47459 var _extends = __webpack_require__(338)['default'];
47460
47461 var _interopRequireDefault = __webpack_require__(335)['default'];
47462
47463 exports.__esModule = true;
47464
47465 var _react = __webpack_require__(89);
47466
47467 var _react2 = _interopRequireDefault(_react);
47468
47469 var _classnames = __webpack_require__(356);
47470
47471 var _classnames2 = _interopRequireDefault(_classnames);
47472
47473 var Table = _react2['default'].createClass({
47474 displayName: 'Table',
47475
47476 propTypes: {
47477 striped: _react2['default'].PropTypes.bool,
47478 bordered: _react2['default'].PropTypes.bool,
47479 condensed: _react2['default'].PropTypes.bool,
47480 hover: _react2['default'].PropTypes.bool,
47481 responsive: _react2['default'].PropTypes.bool
47482 },
47483
47484 getDefaultProps: function getDefaultProps() {
47485 return {
47486 bordered: false,
47487 condensed: false,
47488 hover: false,
47489 responsive: false,
47490 striped: false
47491 };
47492 },
47493
47494 render: function render() {
47495 var classes = {
47496 'table': true,
47497 'table-striped': this.props.striped,
47498 'table-bordered': this.props.bordered,
47499 'table-condensed': this.props.condensed,
47500 'table-hover': this.props.hover
47501 };
47502 var table = _react2['default'].createElement(
47503 'table',
47504 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
47505 this.props.children
47506 );
47507
47508 return this.props.responsive ? _react2['default'].createElement(
47509 'div',
47510 { className: 'table-responsive' },
47511 table
47512 ) : table;
47513 }
47514 });
47515
47516 exports['default'] = Table;
47517 module.exports = exports['default'];
47518
47519/***/ },
47520/* 592 */
47521/***/ function(module, exports, __webpack_require__) {
47522
47523 'use strict';
47524
47525 var _extends = __webpack_require__(338)['default'];
47526
47527 var _objectWithoutProperties = __webpack_require__(355)['default'];
47528
47529 var _Object$keys = __webpack_require__(361)['default'];
47530
47531 var _interopRequireDefault = __webpack_require__(335)['default'];
47532
47533 exports.__esModule = true;
47534
47535 var _classnames = __webpack_require__(356);
47536
47537 var _classnames2 = _interopRequireDefault(_classnames);
47538
47539 var _uncontrollable = __webpack_require__(489);
47540
47541 var _uncontrollable2 = _interopRequireDefault(_uncontrollable);
47542
47543 var _react = __webpack_require__(89);
47544
47545 var _react2 = _interopRequireDefault(_react);
47546
47547 var _Col = __webpack_require__(400);
47548
47549 var _Col2 = _interopRequireDefault(_Col);
47550
47551 var _Nav = __webpack_require__(555);
47552
47553 var _Nav2 = _interopRequireDefault(_Nav);
47554
47555 var _NavItem = __webpack_require__(563);
47556
47557 var _NavItem2 = _interopRequireDefault(_NavItem);
47558
47559 var _styleMaps = __webpack_require__(358);
47560
47561 var _styleMaps2 = _interopRequireDefault(_styleMaps);
47562
47563 var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(488);
47564
47565 var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y);
47566
47567 var _utilsDeprecationWarning = __webpack_require__(391);
47568
47569 var _utilsDeprecationWarning2 = _interopRequireDefault(_utilsDeprecationWarning);
47570
47571 var _utilsValidComponentChildren = __webpack_require__(365);
47572
47573 var _utilsValidComponentChildren2 = _interopRequireDefault(_utilsValidComponentChildren);
47574
47575 var _TabContainer = __webpack_require__(589);
47576
47577 var _TabContainer2 = _interopRequireDefault(_TabContainer);
47578
47579 var _TabContent = __webpack_require__(590);
47580
47581 var _TabContent2 = _interopRequireDefault(_TabContent);
47582
47583 var TabContainer = _TabContainer2['default'].ControlledComponent;
47584
47585 function getDefaultActiveKeyFromChildren(children) {
47586 var defaultActiveKey = undefined;
47587 _utilsValidComponentChildren2['default'].forEach(children, function (child) {
47588 if (defaultActiveKey == null) {
47589 defaultActiveKey = child.props.eventKey;
47590 }
47591 });
47592 return defaultActiveKey;
47593 }
47594
47595 var Tabs = _react2['default'].createClass({
47596 displayName: 'Tabs',
47597
47598 propTypes: {
47599
47600 /**
47601 * Mark the Tab with a matching `eventKey` as active.
47602 *
47603 * @controllable onSelect
47604 */
47605 activeKey: _react2['default'].PropTypes.any,
47606
47607 /**
47608 * Navigation style for tabs
47609 *
47610 * If not specified, it will be treated as `'tabs'` when vertically
47611 * positioned and `'pills'` when horizontally positioned.
47612 */
47613 bsStyle: _react2['default'].PropTypes.oneOf(['tabs', 'pills']),
47614
47615 animation: _react2['default'].PropTypes.bool,
47616
47617 id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])),
47618
47619 /**
47620 * Callback fired when a Tab is selected.
47621 *
47622 * ```js
47623 * function (
47624 * Any eventKey,
47625 * SyntheticEvent event?
47626 * )
47627 * ```
47628 *
47629 * @controllable activeKey
47630 */
47631 onSelect: _react2['default'].PropTypes.func,
47632
47633 /**
47634 * Unmount tabs (remove it from the DOM) when it is no longer visible
47635 */
47636 unmountOnExit: _react2['default'].PropTypes.bool,
47637
47638 /**
47639 * @deprecated Use TabContainer to create differently shaped tab layouts.
47640 */
47641 position: _react2['default'].PropTypes.oneOf(['top', 'left', 'right']),
47642
47643 /**
47644 * Number of grid columns for the tabs if horizontally positioned
47645 *
47646 * This accepts either a single width or a mapping of size to width.
47647 *
47648 * @deprecated Use TabContainer to create differently shaped tab layouts.
47649 */
47650 tabWidth: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.object]),
47651 /**
47652 * Number of grid columns for the panes if horizontally positioned
47653 *
47654 * This accepts either a single width or a mapping of size to width. If not
47655 * specified, it will be treated as `styleMaps.GRID_COLUMNS` minus
47656 * `tabWidth`.
47657 *
47658 * @deprecated Use TabContainer to create differently shaped tab layouts.
47659 */
47660 paneWidth: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.object]),
47661 /**
47662 * Render without clearfix if horizontally positioned
47663 *
47664 * @deprecated Use TabContainer to create differently shaped tab layouts.
47665 */
47666 standalone: _react2['default'].PropTypes.bool
47667 },
47668
47669 getDefaultProps: function getDefaultProps() {
47670 return {
47671 bsClass: 'tab',
47672 animation: true,
47673 tabWidth: 2,
47674 position: 'top',
47675 standalone: false,
47676 unmountOnExit: false
47677 };
47678 },
47679
47680 render: function render() {
47681 var _props = this.props;
47682 var id = _props.id;
47683 var className = _props.className;
47684 var style = _props.style;
47685 var position = _props.position;
47686 var bsStyle = _props.bsStyle;
47687 var tabWidth = _props.tabWidth;
47688 var paneWidth = _props.paneWidth;
47689 var standalone = _props.standalone;
47690 var children = _props.children;
47691 var onSelect = _props.onSelect;
47692 var activeKey = _props.activeKey;
47693
47694 var props = _objectWithoutProperties(_props, ['id', 'className', 'style', 'position', 'bsStyle', 'tabWidth', 'paneWidth', 'standalone', 'children', 'onSelect', 'activeKey']);
47695
47696 activeKey = this.getActiveKey();
47697
47698 var isHorizontal = position === 'left' || position === 'right';
47699
47700 if (bsStyle == null) {
47701 bsStyle = isHorizontal ? 'pills' : 'tabs';
47702 }
47703
47704 var containerProps = { id: id, className: className, style: style, activeKey: activeKey, onSelect: onSelect };
47705
47706 var tabsProps = _extends({}, props, {
47707 bsStyle: bsStyle,
47708 bsClass: undefined,
47709 stacked: isHorizontal,
47710 ref: 'tabs',
47711 role: 'tablist'
47712 });
47713
47714 var childTabs = _utilsValidComponentChildren2['default'].map(children, this.renderTab);
47715
47716 var panesProps = {
47717 ref: 'panes',
47718 animation: props.animation,
47719 unmountOnExit: props.unmountOnExit
47720 };
47721
47722 var childPanes = children;
47723
47724 if (isHorizontal) {
47725 _utilsDeprecationWarning2['default']({
47726 message: 'Horizontal Tabs (position "left" or "right") are deprecated in favor ' + 'of the more flexible TabContainer component.'
47727 });
47728
47729 if (!standalone) {
47730 containerProps.className = _classnames2['default'](containerProps.className, 'clearfix');
47731 }
47732
47733 var _getColProps = this.getColProps({ tabWidth: tabWidth, paneWidth: paneWidth });
47734
47735 var tabsColProps = _getColProps.tabsColProps;
47736 var panesColProps = _getColProps.panesColProps;
47737
47738 var tabs = _react2['default'].createElement(
47739 _Col2['default'],
47740 _extends({ componentClass: _Nav2['default'] }, tabsProps, tabsColProps),
47741 childTabs
47742 );
47743 var panes = _react2['default'].createElement(
47744 _Col2['default'],
47745 _extends({ componentClass: _TabContent2['default'] }, panesProps, panesColProps),
47746 childPanes
47747 );
47748
47749 if (position === 'left') {
47750 return _react2['default'].createElement(
47751 TabContainer,
47752 containerProps,
47753 _react2['default'].createElement(
47754 'div',
47755 null,
47756 tabs,
47757 panes
47758 )
47759 );
47760 }
47761
47762 return _react2['default'].createElement(
47763 TabContainer,
47764 containerProps,
47765 _react2['default'].createElement(
47766 'div',
47767 null,
47768 panes,
47769 tabs
47770 )
47771 );
47772 }
47773
47774 return _react2['default'].createElement(
47775 TabContainer,
47776 containerProps,
47777 _react2['default'].createElement(
47778 'div',
47779 null,
47780 _react2['default'].createElement(
47781 _Nav2['default'],
47782 tabsProps,
47783 childTabs
47784 ),
47785 _react2['default'].createElement(
47786 _TabContent2['default'],
47787 panesProps,
47788 childPanes
47789 )
47790 )
47791 );
47792 },
47793
47794 getActiveKey: function getActiveKey() {
47795 var props = arguments.length <= 0 || arguments[0] === undefined ? this.props : arguments[0];
47796 var activeKey = props.activeKey;
47797 var children = props.children;
47798
47799 return activeKey === undefined ? getDefaultActiveKeyFromChildren(children) : activeKey;
47800 },
47801
47802 renderPane: function renderPane(child, index) {
47803 return _react.cloneElement(child, {
47804 key: child.key ? child.key : index
47805 });
47806 },
47807
47808 renderTab: function renderTab(child) {
47809 if (child.props.title == null) {
47810 return null;
47811 }
47812
47813 var _child$props = child.props;
47814 var eventKey = _child$props.eventKey;
47815 var title = _child$props.title;
47816 var disabled = _child$props.disabled;
47817 var tabClassName = _child$props.tabClassName;
47818
47819 return _react2['default'].createElement(
47820 _NavItem2['default'],
47821 {
47822 eventKey: eventKey,
47823 disabled: disabled,
47824 className: tabClassName
47825 },
47826 title
47827 );
47828 },
47829
47830 getColProps: function getColProps(_ref) {
47831 var tabWidth = _ref.tabWidth;
47832 var paneWidth = _ref.paneWidth;
47833
47834 var tabsColProps = undefined;
47835 if (tabWidth instanceof Object) {
47836 tabsColProps = tabWidth;
47837 } else {
47838 tabsColProps = { xs: tabWidth };
47839 }
47840
47841 var panesColProps = undefined;
47842 if (paneWidth == null) {
47843 panesColProps = {};
47844 _Object$keys(tabsColProps).forEach(function (size) {
47845 panesColProps[size] = _styleMaps2['default'].GRID_COLUMNS - tabsColProps[size];
47846 });
47847 } else if (paneWidth instanceof Object) {
47848 panesColProps = paneWidth;
47849 } else {
47850 panesColProps = { xs: paneWidth };
47851 }
47852
47853 return { tabsColProps: tabsColProps, panesColProps: panesColProps };
47854 }
47855
47856 });
47857
47858 exports['default'] = _uncontrollable2['default'](Tabs, { activeKey: 'onSelect' });
47859 module.exports = exports['default'];
47860
47861/***/ },
47862/* 593 */
47863/***/ function(module, exports, __webpack_require__) {
47864
47865 'use strict';
47866
47867 var _extends = __webpack_require__(338)['default'];
47868
47869 var _interopRequireDefault = __webpack_require__(335)['default'];
47870
47871 exports.__esModule = true;
47872
47873 var _classnames = __webpack_require__(356);
47874
47875 var _classnames2 = _interopRequireDefault(_classnames);
47876
47877 var _react = __webpack_require__(89);
47878
47879 var _react2 = _interopRequireDefault(_react);
47880
47881 var _utilsBootstrapUtils = __webpack_require__(357);
47882
47883 var _SafeAnchor = __webpack_require__(371);
47884
47885 var _SafeAnchor2 = _interopRequireDefault(_SafeAnchor);
47886
47887 var Thumbnail = _react2['default'].createClass({
47888 displayName: 'Thumbnail',
47889
47890 propTypes: {
47891 alt: _react2['default'].PropTypes.string,
47892 href: _react2['default'].PropTypes.string,
47893 src: _react2['default'].PropTypes.string
47894 },
47895
47896 render: function render() {
47897 var classes = _utilsBootstrapUtils.getClassSet(this.props);
47898
47899 if (this.props.href) {
47900 return _react2['default'].createElement(
47901 _SafeAnchor2['default'],
47902 _extends({}, this.props, { href: this.props.href, className: _classnames2['default'](this.props.className, classes) }),
47903 _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt })
47904 );
47905 }
47906
47907 if (this.props.children) {
47908 return _react2['default'].createElement(
47909 'div',
47910 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
47911 _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt }),
47912 _react2['default'].createElement(
47913 'div',
47914 { className: 'caption' },
47915 this.props.children
47916 )
47917 );
47918 }
47919
47920 return _react2['default'].createElement(
47921 'div',
47922 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
47923 _react2['default'].createElement('img', { src: this.props.src, alt: this.props.alt })
47924 );
47925 }
47926 });
47927
47928 exports['default'] = _utilsBootstrapUtils.bsClass('thumbnail', Thumbnail);
47929 module.exports = exports['default'];
47930
47931/***/ },
47932/* 594 */
47933/***/ function(module, exports, __webpack_require__) {
47934
47935 'use strict';
47936
47937 var _extends = __webpack_require__(338)['default'];
47938
47939 var _interopRequireDefault = __webpack_require__(335)['default'];
47940
47941 exports.__esModule = true;
47942
47943 var _classnames = __webpack_require__(356);
47944
47945 var _classnames2 = _interopRequireDefault(_classnames);
47946
47947 var _react = __webpack_require__(89);
47948
47949 var _react2 = _interopRequireDefault(_react);
47950
47951 var _reactPropTypesLibIsRequiredForA11y = __webpack_require__(488);
47952
47953 var _reactPropTypesLibIsRequiredForA11y2 = _interopRequireDefault(_reactPropTypesLibIsRequiredForA11y);
47954
47955 var _utilsBootstrapUtils = __webpack_require__(357);
47956
47957 var Tooltip = _react2['default'].createClass({
47958 displayName: 'Tooltip',
47959
47960 propTypes: {
47961 /**
47962 * An html id attribute, necessary for accessibility
47963 * @type {string}
47964 * @required
47965 */
47966 id: _reactPropTypesLibIsRequiredForA11y2['default'](_react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.number])),
47967
47968 /**
47969 * Sets the direction the Tooltip is positioned towards.
47970 */
47971 placement: _react2['default'].PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
47972
47973 /**
47974 * The "left" position value for the Tooltip.
47975 */
47976 positionLeft: _react2['default'].PropTypes.number,
47977 /**
47978 * The "top" position value for the Tooltip.
47979 */
47980 positionTop: _react2['default'].PropTypes.number,
47981 /**
47982 * The "left" position value for the Tooltip arrow.
47983 */
47984 arrowOffsetLeft: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
47985 /**
47986 * The "top" position value for the Tooltip arrow.
47987 */
47988 arrowOffsetTop: _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.number, _react2['default'].PropTypes.string]),
47989 /**
47990 * Title text
47991 */
47992 title: _react2['default'].PropTypes.node
47993 },
47994
47995 getDefaultProps: function getDefaultProps() {
47996 return {
47997 bsClass: 'tooltip',
47998 placement: 'right'
47999 };
48000 },
48001
48002 render: function render() {
48003 var _classes;
48004
48005 var classes = (_classes = {}, _classes[_utilsBootstrapUtils.prefix(this.props)] = true, _classes[this.props.placement] = true, _classes);
48006
48007 var style = _extends({
48008 left: this.props.positionLeft,
48009 top: this.props.positionTop
48010 }, this.props.style);
48011
48012 var arrowStyle = {
48013 left: this.props.arrowOffsetLeft,
48014 top: this.props.arrowOffsetTop
48015 };
48016
48017 return _react2['default'].createElement(
48018 'div',
48019 _extends({
48020 role: 'tooltip'
48021 }, this.props, {
48022 className: _classnames2['default'](this.props.className, classes),
48023 style: style
48024 }),
48025 _react2['default'].createElement('div', { className: _utilsBootstrapUtils.prefix(this.props, 'arrow'), style: arrowStyle }),
48026 _react2['default'].createElement(
48027 'div',
48028 { className: _utilsBootstrapUtils.prefix(this.props, 'inner') },
48029 this.props.children
48030 )
48031 );
48032 }
48033 });
48034
48035 exports['default'] = Tooltip;
48036 module.exports = exports['default'];
48037
48038/***/ },
48039/* 595 */
48040/***/ function(module, exports, __webpack_require__) {
48041
48042 'use strict';
48043
48044 var _inherits = __webpack_require__(372)['default'];
48045
48046 var _classCallCheck = __webpack_require__(379)['default'];
48047
48048 var _extends = __webpack_require__(338)['default'];
48049
48050 var _interopRequireDefault = __webpack_require__(335)['default'];
48051
48052 exports.__esModule = true;
48053
48054 var _classnames = __webpack_require__(356);
48055
48056 var _classnames2 = _interopRequireDefault(_classnames);
48057
48058 var _react = __webpack_require__(89);
48059
48060 var _react2 = _interopRequireDefault(_react);
48061
48062 var _styleMaps = __webpack_require__(358);
48063
48064 var _utilsBootstrapUtils = __webpack_require__(357);
48065
48066 var Well = (function (_React$Component) {
48067 _inherits(Well, _React$Component);
48068
48069 function Well() {
48070 _classCallCheck(this, _Well);
48071
48072 _React$Component.apply(this, arguments);
48073 }
48074
48075 Well.prototype.render = function render() {
48076 var classes = _utilsBootstrapUtils.getClassSet(this.props);
48077
48078 return _react2['default'].createElement(
48079 'div',
48080 _extends({}, this.props, { className: _classnames2['default'](this.props.className, classes) }),
48081 this.props.children
48082 );
48083 };
48084
48085 var _Well = Well;
48086 Well = _utilsBootstrapUtils.bsSizes([_styleMaps.Sizes.LARGE, _styleMaps.Sizes.SMALL])(Well) || Well;
48087 Well = _utilsBootstrapUtils.bsClass('well')(Well) || Well;
48088 return Well;
48089 })(_react2['default'].Component);
48090
48091 exports['default'] = Well;
48092 module.exports = exports['default'];
48093
48094/***/ },
48095/* 596 */
48096/***/ function(module, exports, __webpack_require__) {
48097
48098 'use strict';
48099
48100 var _interopRequireWildcard = __webpack_require__(336)['default'];
48101
48102 var _interopRequireDefault = __webpack_require__(335)['default'];
48103
48104 exports.__esModule = true;
48105
48106 var _bootstrapUtils2 = __webpack_require__(357);
48107
48108 var _bootstrapUtils = _interopRequireWildcard(_bootstrapUtils2);
48109
48110 exports.bootstrapUtils = _bootstrapUtils;
48111
48112 var _childrenValueInputValidation2 = __webpack_require__(389);
48113
48114 var _childrenValueInputValidation3 = _interopRequireDefault(_childrenValueInputValidation2);
48115
48116 exports.childrenValueInputValidation = _childrenValueInputValidation3['default'];
48117
48118 var _createChainedFunction2 = __webpack_require__(414);
48119
48120 var _createChainedFunction3 = _interopRequireDefault(_createChainedFunction2);
48121
48122 exports.createChainedFunction = _createChainedFunction3['default'];
48123
48124 var _ValidComponentChildren2 = __webpack_require__(365);
48125
48126 var _ValidComponentChildren3 = _interopRequireDefault(_ValidComponentChildren2);
48127
48128 exports.ValidComponentChildren = _ValidComponentChildren3['default'];
48129
48130/***/ },
48131/* 597 */
48132/***/ function(module, exports, __webpack_require__) {
48133
48134 'use strict';
48135
48136 Object.defineProperty(exports, "__esModule", {
48137 value: true
48138 });
48139
48140 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; }; }();
48141
48142 var _react = __webpack_require__(89);
48143
48144 var _react2 = _interopRequireDefault(_react);
48145
48146 var _style = __webpack_require__(598);
48147
48148 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
48149
48150 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
48151
48152 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; }
48153
48154 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; } /**
48155 * Template login field
48156 * @author patrickkerypei / https://github.com/patrickkerrypei
48157 */
48158
48159 // Libraries
48160
48161 // Style
48162
48163
48164 var LoginField = function (_Component) {
48165 _inherits(LoginField, _Component);
48166
48167 function LoginField(props) {
48168 _classCallCheck(this, LoginField);
48169
48170 var _this = _possibleConstructorReturn(this, (LoginField.__proto__ || Object.getPrototypeOf(LoginField)).call(this, props));
48171
48172 _this.checkEnter = _this.checkEnter.bind(_this);
48173 return _this;
48174 }
48175
48176 _createClass(LoginField, [{
48177 key: 'checkEnter',
48178 value: function checkEnter(event) {
48179 if (event.which === 13) {
48180 this.props.onEnter();
48181 }
48182 }
48183 }, {
48184 key: 'shouldComponentUpdate',
48185 value: function shouldComponentUpdate(nextProps, nextState) {
48186 return nextProps.value !== this.props.value || nextProps.valid !== this.props.valid || nextProps.disabled !== this.props.disabled;
48187 }
48188 }, {
48189 key: 'render',
48190 value: function render() {
48191 return _react2.default.createElement(
48192 'div',
48193 null,
48194 _react2.default.createElement(
48195 'div',
48196 { className: 'input-group ' + (this.props.valid ? '' : 'has-error'),
48197 style: this.props.indentStyle || {} },
48198 _react2.default.createElement(
48199 'span',
48200 { className: 'input-group-addon' },
48201 _react2.default.createElement('i', { className: this.props.iconClass })
48202 ),
48203 _react2.default.createElement('input', { autoFocus: this.props.autoFocus,
48204 className: 'form-control',
48205 disabled: this.props.disabled ? true : undefined,
48206 name: this.props.name,
48207 onBlur: this.props.value !== '' ? this.props.onBlur : null,
48208 onChange: this.props.onInputChange,
48209 onKeyUp: this.checkEnter,
48210 placeholder: this.props.hint,
48211 readOnly: this.props.readOnly,
48212 required: 'required',
48213 type: this.props.textType || "text",
48214 value: this.props.value }),
48215 _react2.default.createElement('br', null)
48216 ),
48217 this.props.valid ? null : _react2.default.createElement(
48218 'div',
48219 { className: 'row' },
48220 _react2.default.createElement(
48221 'div',
48222 { className: 'col-sm-12', style: _style.LoginField.invalidMessage.column },
48223 _react2.default.createElement(
48224 'span',
48225 { style: _style.LoginField.invalidMessage.text },
48226 this.props.invalidMessage
48227 )
48228 )
48229 ),
48230 _react2.default.createElement('br', null)
48231 );
48232 }
48233 }]);
48234
48235 return LoginField;
48236 }(_react.Component);
48237
48238 exports.default = LoginField;
48239
48240
48241 LoginField.propTypes = {
48242 autoFocus: _react.PropTypes.bool,
48243 disabled: _react.PropTypes.bool,
48244 hint: _react.PropTypes.string,
48245 iconClass: _react.PropTypes.string.isRequired,
48246 indentStyle: _react.PropTypes.object,
48247 invalidMessage: _react.PropTypes.string,
48248 name: _react.PropTypes.string,
48249 onBlur: _react.PropTypes.func,
48250 onEnter: _react.PropTypes.func,
48251 onInputChange: _react.PropTypes.func,
48252 readOnly: _react.PropTypes.bool,
48253 valid: _react.PropTypes.bool,
48254 value: _react.PropTypes.string
48255 };
48256
48257/***/ },
48258/* 598 */
48259/***/ function(module, exports) {
48260
48261 "use strict";
48262
48263 Object.defineProperty(exports, "__esModule", {
48264 value: true
48265 });
48266 /**
48267 * File to hold all inline styles by module name
48268 * @author patrickkerrypei / https://github.com/patrickkerrypei
48269 */
48270
48271 var AuthorizationWidget = exports.AuthorizationWidget = {
48272 selectableButtonGroup: {
48273 paddingTop: "30px",
48274 textAlign: "center"
48275 },
48276 submitButtonGroup: {
48277 float: "right",
48278 paddingRight: "15px"
48279 }
48280 };
48281
48282 var ColorMenu = exports.ColorMenu = {
48283 colorMenu: {
48284 paddingLeft: "10%"
48285 },
48286 dropdownMenu: {
48287 width: "150px"
48288 },
48289 menuHeader: {
48290 paddingTop: "-6px",
48291 paddingRight: "13px",
48292 paddingBottom: "-6px",
48293 paddingLeft: "20px"
48294 }
48295 };
48296
48297 var ProfileImage = exports.ProfileImage = {
48298 borderRadius: "25%"
48299 };
48300
48301 var DataTable = exports.DataTable = {
48302 noEntriesLabel: {
48303 textAlign: "center"
48304 },
48305 paginationButtons: {
48306 column: {
48307 textAlign: "center"
48308 },
48309 buttons: {
48310 WebkitUserSelect: "none",
48311 KhtmlUserSelect: "none",
48312 MozUserSelect: "none",
48313 MsUserSelect: "none",
48314 OUserSelect: "none",
48315 userSelect: "none",
48316 outlineStyle: "none",
48317 WebkitTapHighlightColor: "transparent"
48318 }
48319 },
48320 selectDropdown: {
48321 column: {
48322 textAlign: "right"
48323 },
48324 label: {
48325 fontWeight: "normal"
48326 },
48327 options: {
48328 padding: "5px 1px"
48329 }
48330 },
48331 showString: {
48332 fontWeight: "normal",
48333 lineHeight: "2.4"
48334 }
48335 };
48336
48337 var Unselectable = exports.Unselectable = {
48338 WebkitUserSelect: "none",
48339 KhtmlUserSelect: "none",
48340 MozUserSelect: "none",
48341 MsUserSelect: "none",
48342 OUserSelect: "none",
48343 userSelect: "none",
48344 outlineStyle: "none",
48345 WebkitTapHighlightColor: "transparent"
48346 };
48347
48348 var DataTablePagination = exports.DataTablePagination = {
48349 unselectable: {
48350 WebkitUserSelect: "none",
48351 KhtmlUserSelect: "none",
48352 MozUserSelect: "none",
48353 MsUserSelect: "none",
48354 OUserSelect: "none",
48355 userSelect: "none",
48356 outlineStyle: "none",
48357 WebkitTapHighlightColor: "transparent"
48358 }
48359 };
48360
48361 var Footer = exports.Footer = {
48362 mainFooter: {
48363 fontSize: "12px",
48364 marginBottom: "1px",
48365 padding: "0px"
48366 },
48367 footerLeft: {
48368 paddingLeft: "10px"
48369 },
48370 footerRight: {
48371 paddingRight: "10px"
48372 }
48373 };
48374
48375 var Header = exports.Header = {
48376 breadCrumb: {
48377 position: "absolute",
48378 boxSizing: "border-box",
48379 padding: "15px 15px",
48380 listStyleType: "none",
48381 display: "inline"
48382 },
48383 breadCrumbIcon: {
48384 fontSize: "20px"
48385 },
48386 breadCrumbListItem: {
48387 display: "inline",
48388 color: "white"
48389 },
48390 breadCrumbLink: {
48391 color: "white",
48392 cursor: "pointer",
48393 display: "inline",
48394 fontSize: "13px",
48395 textDecoration: "none"
48396 }
48397 };
48398
48399 var HomePage = exports.HomePage = {
48400 profileBox: {
48401 paddingLeft: "10%",
48402 paddingRight: "10%"
48403 },
48404 widgetBox: {
48405 color: "white"
48406 }
48407 };
48408
48409 var LoginField = exports.LoginField = {
48410 invalidMessage: {
48411 column: {
48412 textAlign: "center"
48413 },
48414 text: {
48415 color: "red",
48416 textAlign: "center"
48417 }
48418 }
48419 };
48420
48421 var LoginForm = exports.LoginForm = {
48422 invalidLogin: {
48423 column: {
48424 textAlign: "center"
48425 },
48426 text: {
48427 color: "red",
48428 textAlign: "center"
48429 }
48430 }
48431 };
48432
48433 var Multiselect = exports.Multiselect = {
48434 marginBottom: "10px"
48435 };
48436
48437 var AdminBadge = exports.AdminBadge = {
48438 isAdmin: {
48439 color: "green",
48440 cursor: "pointer"
48441 },
48442 isNotAdmin: {
48443 color: "red",
48444 cursor: "pointer"
48445 }
48446 };
48447
48448 var OrganizationsPage = exports.OrganizationsPage = {
48449 modalDialog: {
48450 position: "absolute",
48451 top: "15%",
48452 left: "40%"
48453 }
48454 };
48455
48456 var OrganizationsTable = exports.OrganizationsTable = {
48457 createOrganizationModal: {
48458 paddingTop: "50%",
48459 marginTop: "50%"
48460 },
48461 modalDialogTextField: {
48462 marginLeft: "15px",
48463 paddingRight: "15px"
48464 }
48465 };
48466
48467 var ProfileBox = exports.ProfileBox = {
48468 profileBoxBorder: {
48469 padding: "10px 10px",
48470 marginLeft: "25%",
48471 width: "50%"
48472 },
48473 updateButton: {
48474 float: "right"
48475 },
48476 deleteButton: {
48477 float: "left",
48478 tabindex: "-1"
48479 },
48480 infoTitle: {
48481 fontSize: "12px",
48482 fontWeight: "700",
48483 color: "#959595",
48484 letterSpacing: '1px'
48485 },
48486 preTextArea: {
48487 maxHeight: "200px"
48488 },
48489 textArea: {
48490 width: "100%",
48491 height: "200px",
48492 fontFamily: "monospace",
48493 fontSize: "12px",
48494 resize: "vertical"
48495 }
48496 };
48497
48498 var ProfilePage = exports.ProfilePage = {
48499 profileBox: {
48500 paddingLeft: "10%",
48501 paddingRight: "10%"
48502 }
48503 };
48504
48505 var ProjectPage = exports.ProjectPage = {
48506 titleBox: {
48507 paddingTop: "6px"
48508 },
48509 titleContainer: {
48510 marginBottom: "10px"
48511 },
48512 projectTitle: {
48513 marginLeft: "10px",
48514 display: "inline",
48515 fontSize: "28px",
48516 fontWeight: "500"
48517 },
48518 viewInEditor: {
48519 button: {
48520 marginRight: "10px",
48521 marginTop: "3px"
48522 },
48523 column: {
48524 paddingRight: "30px",
48525 paddingTop: "14px"
48526 }
48527 }
48528 };
48529
48530 var RegisterForm = exports.RegisterForm = {
48531 linkToLogin: {
48532 column: {
48533 paddingTop: "10px"
48534 }
48535 },
48536 registrationNotAllowed: {
48537 color: "red",
48538 fontSize: "15px",
48539 paddingBottom: "10px",
48540 textAlign: "center"
48541 },
48542 registerButton: {
48543 float: "right",
48544 marginTop: "5px"
48545 }
48546 };
48547
48548 var SideBarMenu = exports.SideBarMenu = {
48549 sidebarCategoryStyle: {
48550 lineHeight: "30px",
48551 fontFamily: "\"Helvetica Neue\", Roboto, Arial, \"Droid Sans\", sans-serif",
48552 color: "#E7E7E7"
48553 }
48554 };
48555
48556 var SideBarUserPanel = exports.SideBarUserPanel = {
48557 status: {
48558 color: "#BAB8B8",
48559 fontSize: "13px",
48560 lineHeight: "15px",
48561 paddingLeft: "23px"
48562 },
48563 name: {
48564 color: "#ECF0F1",
48565 fontSize: "14px",
48566 fontWeight: "light",
48567 paddingLeft: "20px",
48568 paddingTop: "5px"
48569 },
48570 panel: {
48571 padding: "15px"
48572 },
48573 imageIcon: {
48574 borderRadius: 0,
48575 maxWidth: "50px",
48576 paddingLeft: "7px",
48577 paddingTop: "5px"
48578 }
48579 };
48580
48581 var UserMenu = exports.UserMenu = {
48582 logoutButtonPadding: {
48583 padding: "9px 100px"
48584 },
48585 logoutButtonBorder: {
48586 borderColor: "#777777"
48587 },
48588 logoutAreaBorder: {
48589 padding: "2px"
48590 },
48591 userHeader: {
48592 height: "145px"
48593 }
48594 };
48595
48596/***/ },
48597/* 599 */,
48598/* 600 */
48599/***/ function(module, exports, __webpack_require__) {
48600
48601 'use strict';
48602
48603 Object.defineProperty(exports, "__esModule", {
48604 value: true
48605 });
48606
48607 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; }; }();
48608
48609 var _react = __webpack_require__(89);
48610
48611 var _react2 = _interopRequireDefault(_react);
48612
48613 var _reactBootstrap = __webpack_require__(334);
48614
48615 var _reactRouter = __webpack_require__(260);
48616
48617 var _LoginField = __webpack_require__(597);
48618
48619 var _LoginField2 = _interopRequireDefault(_LoginField);
48620
48621 var _loginUtils = __webpack_require__(601);
48622
48623 var _style = __webpack_require__(598);
48624
48625 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
48626
48627 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
48628
48629 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; }
48630
48631 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; } /**
48632 * @author pmeijer / https://github.com/pmeijer
48633 * @author patrickkerrypei / https://github.com/patrickkerrypei
48634 */
48635
48636 // Libraries
48637
48638 // Self-defined
48639
48640 // Style
48641
48642
48643 var RegisterForm = function (_Component) {
48644 _inherits(RegisterForm, _Component);
48645
48646 function RegisterForm(props) {
48647 _classCallCheck(this, RegisterForm);
48648
48649 var _this = _possibleConstructorReturn(this, (RegisterForm.__proto__ || Object.getPrototypeOf(RegisterForm)).call(this, props));
48650
48651 _this.state = {
48652 creating: false,
48653 // agreeToTerms: false,
48654 confirmPassword: '',
48655 email: '',
48656 // State so a different message for duplicate userId can be shown
48657 invalidMessage: {
48658 confirmPassword: "Passwords must match",
48659 email: "Invalid email",
48660 password: "Password must be at least 3 characters long and must not be " + "a poor password such as 'password'",
48661 userId: "Username must only contain letters, numbers, and the underscore" + " and must be at least 3 characters long"
48662 },
48663 password: '',
48664 userId: '',
48665 validCredentials: {
48666 // agreeToTerms: true,
48667 confirmPassword: true,
48668 email: true,
48669 password: true,
48670 userId: true
48671 }
48672 };
48673
48674 // Event handlers
48675 _this.checkAllFields = _this.checkAllFields.bind(_this);
48676 _this.checkConfirmPassword = _this.checkConfirmPassword.bind(_this);
48677 _this.checkEmail = _this.checkEmail.bind(_this);
48678 _this.checkPassword = _this.checkPassword.bind(_this);
48679 _this.checkUserId = _this.checkUserId.bind(_this);
48680 _this.onAgreeToTermsChange = _this.onAgreeToTermsChange.bind(_this);
48681 _this.onConfirmPasswordChange = _this.onConfirmPasswordChange.bind(_this);
48682 _this.onEmailChange = _this.onEmailChange.bind(_this);
48683 _this.onPasswordChange = _this.onPasswordChange.bind(_this);
48684 _this.onRegister = _this.onRegister.bind(_this);
48685 _this.atFailedNewUser = _this.atFailedNewUser.bind(_this);
48686 _this.onUserIdChange = _this.onUserIdChange.bind(_this);
48687 return _this;
48688 }
48689
48690 _createClass(RegisterForm, [{
48691 key: 'componentDidMount',
48692 value: function componentDidMount() {}
48693 }, {
48694 key: 'checkAllFields',
48695 value: function checkAllFields() {
48696 this.setState({
48697 validCredentials: {
48698 // agreeToTerms: this.state.agreeToTerms,
48699 confirmPassword: this.state.password === this.state.confirmPassword,
48700 email: (0, _loginUtils.verifyEmail)(this.state.email),
48701 password: (0, _loginUtils.verifyPassword)(this.state.password),
48702 userId: (0, _loginUtils.verifyUserOrOrganizationId)(this.state.userId)
48703 }
48704 });
48705 }
48706 }, {
48707 key: 'checkConfirmPassword',
48708 value: function checkConfirmPassword() {
48709 this.setState({
48710 validCredentials: {
48711 // agreeToTerms: this.state.agreeToTerms,
48712 confirmPassword: this.state.password === this.state.confirmPassword,
48713 email: this.state.validCredentials.email,
48714 password: this.state.validCredentials.password,
48715 userId: this.state.validCredentials.userId
48716 }
48717 });
48718 }
48719 }, {
48720 key: 'checkEmail',
48721 value: function checkEmail() {
48722 this.setState({
48723 validCredentials: {
48724 // agreeToTerms: this.state.validCredentials.agreeToTerms,
48725 confirmPassword: this.state.validCredentials.confirmPassword,
48726 email: (0, _loginUtils.verifyEmail)(this.state.email),
48727 password: this.state.validCredentials.password,
48728 userId: this.state.validCredentials.userId
48729 }
48730 });
48731 }
48732 }, {
48733 key: 'checkPassword',
48734 value: function checkPassword() {
48735 this.setState({
48736 validCredentials: {
48737 // agreeToTerms: this.state.validCredentials.agreeToTerms,
48738 confirmPassword: this.state.validCredentials.confirmPassword,
48739 email: this.state.validCredentials.email,
48740 password: (0, _loginUtils.verifyPassword)(this.state.password),
48741 userId: this.state.validCredentials.userId
48742 }
48743 });
48744 }
48745 }, {
48746 key: 'checkUserId',
48747 value: function checkUserId() {
48748 this.setState({
48749 validCredentials: {
48750 // agreeToTerms: this.state.validCredentials.agreeToTerms,
48751 confirmPassword: this.state.validCredentials.confirmPassword,
48752 email: this.state.validCredentials.email,
48753 password: this.state.validCredentials.password,
48754 userId: (0, _loginUtils.verifyUserOrOrganizationId)(this.state.userId)
48755 }
48756 });
48757 }
48758 }, {
48759 key: 'onAgreeToTermsChange',
48760 value: function onAgreeToTermsChange() {
48761 this.setState({
48762 agreeToTerms: !this.state.agreeToTerms
48763 });
48764 }
48765 }, {
48766 key: 'onConfirmPasswordChange',
48767 value: function onConfirmPasswordChange(event) {
48768 this.setState({
48769 confirmPassword: event.target.value
48770 });
48771 }
48772 }, {
48773 key: 'onEmailChange',
48774 value: function onEmailChange(event) {
48775 this.setState({
48776 email: event.target.value
48777 });
48778 }
48779 }, {
48780 key: 'onPasswordChange',
48781 value: function onPasswordChange(event) {
48782 this.setState({
48783 password: event.target.value
48784 });
48785 }
48786 }, {
48787 key: 'onRegister',
48788 value: function onRegister() {
48789 var _this2 = this;
48790
48791 var allValid = true;
48792
48793 this.checkAllFields();
48794
48795 Object.keys(this.state.validCredentials).forEach(function (key) {
48796 if (!_this2.state.validCredentials[key]) {
48797 allValid = false;
48798 }
48799 });
48800
48801 if (allValid) {
48802 this.setState({
48803 creating: true
48804 });
48805
48806 this.props.onNewUser(this.state.userId, this.state.password, this.state.email).then(function (status) {
48807 if (typeof status === 'number') {
48808 _this2.atFailedNewUser(status);
48809 }
48810 });
48811 } else {
48812 // Reset fields
48813 this.setState({
48814 // agreeToTerms: false,
48815 confirmPassword: '',
48816 email: this.state.validCredentials.email ? this.state.email : '',
48817 password: '',
48818 userId: this.state.validCredentials.userId ? this.state.userId : ''
48819 });
48820 }
48821 }
48822 }, {
48823 key: 'atFailedNewUser',
48824 value: function atFailedNewUser(status) {
48825 this.setState({
48826 creating: false
48827 });
48828
48829 if (status === 400) {
48830 // Immutability add-ons aren't worth installing for this one case
48831 this.setState({
48832 invalidMessage: {
48833 confirmPassword: "Passwords must match",
48834 email: "Invalid email",
48835 password: "Password must be at least 3 characters long and must not be " + "a poor password such as 'password'",
48836 userId: "Username already taken"
48837 },
48838 validCredentials: {
48839 confirmPassword: this.state.password === this.state.confirmPassword,
48840 email: this.state.validCredentials.email,
48841 password: this.state.validCredentials.password,
48842 userId: false
48843 }
48844 });
48845 } else {
48846 console.error('???');
48847 }
48848 }
48849 }, {
48850 key: 'onUserIdChange',
48851 value: function onUserIdChange(event) {
48852 this.setState({
48853 userId: event.target.value
48854 });
48855 }
48856 }, {
48857 key: 'render',
48858 value: function render() {
48859 var _this3 = this;
48860
48861 var validAndNotEmpty = Object.keys(this.state.validCredentials).reduce(function (previousValue, currentValue /* , currentIndex, array */) {
48862 return previousValue && _this3.state.validCredentials[currentValue] && _this3.state[currentValue] !== '';
48863 }, true),
48864 titleMessage = this.props.allowUserCreation ? this.props.title : 'User Creation Not Permitted';
48865
48866 return _react2.default.createElement(
48867 'div',
48868 { className: 'register-box-body' },
48869 titleMessage ? _react2.default.createElement(
48870 'p',
48871 { className: 'login-box-msg' },
48872 titleMessage
48873 ) : null,
48874 _react2.default.createElement(
48875 'form',
48876 null,
48877 _react2.default.createElement(_LoginField2.default, { autoFocus: true,
48878 hint: 'User ID',
48879 iconClass: 'glyphicon glyphicon-user',
48880 disabled: !this.props.allowUserCreation,
48881 invalidMessage: this.state.invalidMessage.userId,
48882 onBlur: this.checkUserId,
48883 onInputChange: this.onUserIdChange,
48884 valid: this.state.validCredentials.userId,
48885 value: this.state.userId }),
48886 _react2.default.createElement(_LoginField2.default, { hint: 'Email',
48887 iconClass: 'glyphicon glyphicon-envelope',
48888 disabled: !this.props.allowUserCreation,
48889 invalidMessage: this.state.invalidMessage.email,
48890 onBlur: this.checkEmail,
48891 onInputChange: this.onEmailChange,
48892 valid: this.state.validCredentials.email,
48893 value: this.state.email }),
48894 _react2.default.createElement(_LoginField2.default, { hint: 'Password',
48895 iconClass: 'glyphicon glyphicon-lock',
48896 disabled: !this.props.allowUserCreation,
48897 invalidMessage: this.state.invalidMessage.password,
48898 onBlur: this.checkPassword,
48899 onInputChange: this.onPasswordChange,
48900 textType: 'password',
48901 valid: this.state.validCredentials.password,
48902 value: this.state.password }),
48903 _react2.default.createElement(_LoginField2.default, { hint: 'Confirm password',
48904 iconClass: 'glyphicon glyphicon-log-in',
48905 disabled: !this.props.allowUserCreation,
48906 invalidMessage: this.state.invalidMessage.confirmPassword,
48907 onBlur: this.checkConfirmPassword,
48908 onEnter: this.onRegister,
48909 onInputChange: this.onConfirmPasswordChange,
48910 textType: 'password',
48911 valid: this.state.validCredentials.confirmPassword,
48912 value: this.state.confirmPassword }),
48913 _react2.default.createElement(
48914 'div',
48915 { className: 'row' },
48916 _react2.default.createElement(
48917 'div',
48918 { className: 'col-sm-8', style: _style.RegisterForm.linkToLogin.column },
48919 _react2.default.createElement(
48920 _reactRouter.Link,
48921 { to: this.props.backLinkData.path },
48922 this.props.backLinkData.title
48923 )
48924 ),
48925 _react2.default.createElement(
48926 'div',
48927 { className: 'col-sm-4' },
48928 this.props.allowUserCreation && this.state.creating === false ? _react2.default.createElement(
48929 _reactBootstrap.Button,
48930 { bsStyle: 'primary',
48931 disabled: !validAndNotEmpty,
48932 onClick: this.onRegister,
48933 style: _style.RegisterForm.registerButton },
48934 'Submit'
48935 ) : null
48936 )
48937 )
48938 )
48939 );
48940 }
48941 }]);
48942
48943 return RegisterForm;
48944 }(_react.Component);
48945
48946 exports.default = RegisterForm;
48947
48948
48949 RegisterForm.propTypes = {
48950 allowUserCreation: _react.PropTypes.bool,
48951 title: _react.PropTypes.string,
48952 backLinkData: _react.PropTypes.shape({
48953 title: _react2.default.PropTypes.string.isRequired,
48954 path: _react2.default.PropTypes.string.isRequired
48955 }),
48956 onNewUser: _react.PropTypes.func.isRequired
48957 };
48958
48959/***/ },
48960/* 601 */
48961/***/ function(module, exports) {
48962
48963 'use strict';
48964
48965 Object.defineProperty(exports, "__esModule", {
48966 value: true
48967 });
48968 exports.verifyEmail = verifyEmail;
48969 exports.verifyPassword = verifyPassword;
48970 exports.verifyUserOrOrganizationId = verifyUserOrOrganizationId;
48971 /**
48972 * Login/Register pages' utility functions
48973 * @author patrickkerrypei / https://github.com/patrickkerrypei
48974 */
48975
48976 /**
48977 * Verifies whether an email is allowed (check in Register page)
48978 * @param {string} email - email to be checked
48979 * @return {boolean} - T/F valid email
48980 */
48981 function verifyEmail(email) {
48982 return true;
48983 // return email.length >= 3 &&
48984 // /^\S+@\S+\.\S+$/.test(email);
48985 }
48986
48987 /**
48988 * Verifies whether a password is allowed (check in Register page)
48989 * @param {string} password - password to be checked
48990 * @return {boolean} - T/F valid password
48991 */
48992 function verifyPassword(password) {
48993 var badPasswords = ['password', '123'];
48994 return password.length >= 3 && badPasswords.indexOf(password) === -1;
48995 }
48996
48997 /**
48998 * Verifies whether a userId is allowed (check in Register page)
48999 * @param {string} userId - userId to be checked
49000 * @return {boolean} - T/F valid userId
49001 */
49002 function verifyUserOrOrganizationId(userId) {
49003 return userId.length >= 3 && /^[A-Za-z0-9_]+$/.test(userId);
49004 // TODO: share the same reference to the check in webgme
49005 }
49006
49007/***/ },
49008/* 602 */
49009/***/ function(module, exports, __webpack_require__) {
49010
49011 __webpack_require__(603);
49012 __webpack_require__(612);
49013
49014
49015/***/ },
49016/* 603 */
49017/***/ function(module, exports, __webpack_require__) {
49018
49019 // style-loader: Adds some css to the DOM by adding a <style> tag
49020
49021 // load the styles
49022 var content = __webpack_require__(604);
49023 if(typeof content === 'string') content = [[module.id, content, '']];
49024 // add the styles to the DOM
49025 var update = __webpack_require__(611)(content, {});
49026 if(content.locals) module.exports = content.locals;
49027 // Hot Module Replacement
49028 if(false) {
49029 // When the styles change, update the <style> tags
49030 if(!content.locals) {
49031 module.hot.accept("!!./../css-loader/index.js!./../less-loader/index.js!./bootstrap-styles.loader.js!./bootstrap.config.js", function() {
49032 var newContent = require("!!./../css-loader/index.js!./../less-loader/index.js!./bootstrap-styles.loader.js!./bootstrap.config.js");
49033 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
49034 update(newContent);
49035 });
49036 }
49037 // When the module is disposed, remove the <style> tags
49038 module.hot.dispose(function() { update(); });
49039 }
49040
49041/***/ },
49042/* 604 */
49043/***/ function(module, exports, __webpack_require__) {
49044
49045 exports = module.exports = __webpack_require__(605)();
49046 // imports
49047
49048
49049 // module
49050 exports.push([module.id, "/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url(" + __webpack_require__(606) + ");\n src: url(" + __webpack_require__(606) + "?#iefix) format('embedded-opentype'), url(" + __webpack_require__(607) + ") format('woff2'), url(" + __webpack_require__(608) + ") format('woff'), url(" + __webpack_require__(609) + ") format('truetype'), url(" + __webpack_require__(610) + "#glyphicons_halflingsregular) format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"*\";\n}\n.glyphicon-plus:before {\n content: \"+\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20AC\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270F\";\n}\n.glyphicon-glass:before {\n content: \"\\E001\";\n}\n.glyphicon-music:before {\n content: \"\\E002\";\n}\n.glyphicon-search:before {\n content: \"\\E003\";\n}\n.glyphicon-heart:before {\n content: \"\\E005\";\n}\n.glyphicon-star:before {\n content: \"\\E006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\E007\";\n}\n.glyphicon-user:before {\n content: \"\\E008\";\n}\n.glyphicon-film:before {\n content: \"\\E009\";\n}\n.glyphicon-th-large:before {\n content: \"\\E010\";\n}\n.glyphicon-th:before {\n content: \"\\E011\";\n}\n.glyphicon-th-list:before {\n content: \"\\E012\";\n}\n.glyphicon-ok:before {\n content: \"\\E013\";\n}\n.glyphicon-remove:before {\n content: \"\\E014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\E015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\E016\";\n}\n.glyphicon-off:before {\n content: \"\\E017\";\n}\n.glyphicon-signal:before {\n content: \"\\E018\";\n}\n.glyphicon-cog:before {\n content: \"\\E019\";\n}\n.glyphicon-trash:before {\n content: \"\\E020\";\n}\n.glyphicon-home:before {\n content: \"\\E021\";\n}\n.glyphicon-file:before {\n content: \"\\E022\";\n}\n.glyphicon-time:before {\n content: \"\\E023\";\n}\n.glyphicon-road:before {\n content: \"\\E024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\E025\";\n}\n.glyphicon-download:before {\n content: \"\\E026\";\n}\n.glyphicon-upload:before {\n content: \"\\E027\";\n}\n.glyphicon-inbox:before {\n content: \"\\E028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\E029\";\n}\n.glyphicon-repeat:before {\n content: \"\\E030\";\n}\n.glyphicon-refresh:before {\n content: \"\\E031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\E032\";\n}\n.glyphicon-lock:before {\n content: \"\\E033\";\n}\n.glyphicon-flag:before {\n content: \"\\E034\";\n}\n.glyphicon-headphones:before {\n content: \"\\E035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\E036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\E037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\E038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\E039\";\n}\n.glyphicon-barcode:before {\n content: \"\\E040\";\n}\n.glyphicon-tag:before {\n content: \"\\E041\";\n}\n.glyphicon-tags:before {\n content: \"\\E042\";\n}\n.glyphicon-book:before {\n content: \"\\E043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\E044\";\n}\n.glyphicon-print:before {\n content: \"\\E045\";\n}\n.glyphicon-camera:before {\n content: \"\\E046\";\n}\n.glyphicon-font:before {\n content: \"\\E047\";\n}\n.glyphicon-bold:before {\n content: \"\\E048\";\n}\n.glyphicon-italic:before {\n content: \"\\E049\";\n}\n.glyphicon-text-height:before {\n content: \"\\E050\";\n}\n.glyphicon-text-width:before {\n content: \"\\E051\";\n}\n.glyphicon-align-left:before {\n content: \"\\E052\";\n}\n.glyphicon-align-center:before {\n content: \"\\E053\";\n}\n.glyphicon-align-right:before {\n content: \"\\E054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\E055\";\n}\n.glyphicon-list:before {\n content: \"\\E056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\E057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\E058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\E059\";\n}\n.glyphicon-picture:before {\n content: \"\\E060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\E062\";\n}\n.glyphicon-adjust:before {\n content: \"\\E063\";\n}\n.glyphicon-tint:before {\n content: \"\\E064\";\n}\n.glyphicon-edit:before {\n content: \"\\E065\";\n}\n.glyphicon-share:before {\n content: \"\\E066\";\n}\n.glyphicon-check:before {\n content: \"\\E067\";\n}\n.glyphicon-move:before {\n content: \"\\E068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\E069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\E070\";\n}\n.glyphicon-backward:before {\n content: \"\\E071\";\n}\n.glyphicon-play:before {\n content: \"\\E072\";\n}\n.glyphicon-pause:before {\n content: \"\\E073\";\n}\n.glyphicon-stop:before {\n content: \"\\E074\";\n}\n.glyphicon-forward:before {\n content: \"\\E075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\E076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\E077\";\n}\n.glyphicon-eject:before {\n content: \"\\E078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\E079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\E080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\E081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\E082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\E083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\E084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\E085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\E086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\E087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\E088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\E089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\E090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\E091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\E092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\E093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\E094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\E095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\E096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\E097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\E101\";\n}\n.glyphicon-gift:before {\n content: \"\\E102\";\n}\n.glyphicon-leaf:before {\n content: \"\\E103\";\n}\n.glyphicon-fire:before {\n content: \"\\E104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\E105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\E106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\E107\";\n}\n.glyphicon-plane:before {\n content: \"\\E108\";\n}\n.glyphicon-calendar:before {\n content: \"\\E109\";\n}\n.glyphicon-random:before {\n content: \"\\E110\";\n}\n.glyphicon-comment:before {\n content: \"\\E111\";\n}\n.glyphicon-magnet:before {\n content: \"\\E112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\E113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\E114\";\n}\n.glyphicon-retweet:before {\n content: \"\\E115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\E116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\E117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\E118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\E119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\E120\";\n}\n.glyphicon-hdd:before {\n content: \"\\E121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\E122\";\n}\n.glyphicon-bell:before {\n content: \"\\E123\";\n}\n.glyphicon-certificate:before {\n content: \"\\E124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\E125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\E126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\E127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\E128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\E129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\E130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\E131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\E132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\E133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\E134\";\n}\n.glyphicon-globe:before {\n content: \"\\E135\";\n}\n.glyphicon-wrench:before {\n content: \"\\E136\";\n}\n.glyphicon-tasks:before {\n content: \"\\E137\";\n}\n.glyphicon-filter:before {\n content: \"\\E138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\E139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\E140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\E141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\E142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\E143\";\n}\n.glyphicon-link:before {\n content: \"\\E144\";\n}\n.glyphicon-phone:before {\n content: \"\\E145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\E146\";\n}\n.glyphicon-usd:before {\n content: \"\\E148\";\n}\n.glyphicon-gbp:before {\n content: \"\\E149\";\n}\n.glyphicon-sort:before {\n content: \"\\E150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\E151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\E152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\E153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\E154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\E155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\E156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\E157\";\n}\n.glyphicon-expand:before {\n content: \"\\E158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\E159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\E160\";\n}\n.glyphicon-log-in:before {\n content: \"\\E161\";\n}\n.glyphicon-flash:before {\n content: \"\\E162\";\n}\n.glyphicon-log-out:before {\n content: \"\\E163\";\n}\n.glyphicon-new-window:before {\n content: \"\\E164\";\n}\n.glyphicon-record:before {\n content: \"\\E165\";\n}\n.glyphicon-save:before {\n content: \"\\E166\";\n}\n.glyphicon-open:before {\n content: \"\\E167\";\n}\n.glyphicon-saved:before {\n content: \"\\E168\";\n}\n.glyphicon-import:before {\n content: \"\\E169\";\n}\n.glyphicon-export:before {\n content: \"\\E170\";\n}\n.glyphicon-send:before {\n content: \"\\E171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\E172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\E173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\E174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\E175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\E176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\E177\";\n}\n.glyphicon-transfer:before {\n content: \"\\E178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\E179\";\n}\n.glyphicon-header:before {\n content: \"\\E180\";\n}\n.glyphicon-compressed:before {\n content: \"\\E181\";\n}\n.glyphicon-earphone:before {\n content: \"\\E182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\E183\";\n}\n.glyphicon-tower:before {\n content: \"\\E184\";\n}\n.glyphicon-stats:before {\n content: \"\\E185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\E186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\E187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\E188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\E189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\E190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\E191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\E192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\E193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\E194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\E195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\E197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\E198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\E199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\E200\";\n}\n.glyphicon-cd:before {\n content: \"\\E201\";\n}\n.glyphicon-save-file:before {\n content: \"\\E202\";\n}\n.glyphicon-open-file:before {\n content: \"\\E203\";\n}\n.glyphicon-level-up:before {\n content: \"\\E204\";\n}\n.glyphicon-copy:before {\n content: \"\\E205\";\n}\n.glyphicon-paste:before {\n content: \"\\E206\";\n}\n.glyphicon-alert:before {\n content: \"\\E209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\E210\";\n}\n.glyphicon-king:before {\n content: \"\\E211\";\n}\n.glyphicon-queen:before {\n content: \"\\E212\";\n}\n.glyphicon-pawn:before {\n content: \"\\E213\";\n}\n.glyphicon-bishop:before {\n content: \"\\E214\";\n}\n.glyphicon-knight:before {\n content: \"\\E215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\E216\";\n}\n.glyphicon-tent:before {\n content: \"\\26FA\";\n}\n.glyphicon-blackboard:before {\n content: \"\\E218\";\n}\n.glyphicon-bed:before {\n content: \"\\E219\";\n}\n.glyphicon-apple:before {\n content: \"\\F8FF\";\n}\n.glyphicon-erase:before {\n content: \"\\E221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231B\";\n}\n.glyphicon-lamp:before {\n content: \"\\E223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\E224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\E225\";\n}\n.glyphicon-scissors:before {\n content: \"\\E226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\E227\";\n}\n.glyphicon-btc:before {\n content: \"\\E227\";\n}\n.glyphicon-xbt:before {\n content: \"\\E227\";\n}\n.glyphicon-yen:before {\n content: \"\\A5\";\n}\n.glyphicon-jpy:before {\n content: \"\\A5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20BD\";\n}\n.glyphicon-rub:before {\n content: \"\\20BD\";\n}\n.glyphicon-scale:before {\n content: \"\\E230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\E231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\E232\";\n}\n.glyphicon-education:before {\n content: \"\\E233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\E234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\E235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\E236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\E237\";\n}\n.glyphicon-oil:before {\n content: \"\\E238\";\n}\n.glyphicon-grain:before {\n content: \"\\E239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\E240\";\n}\n.glyphicon-text-size:before {\n content: \"\\E241\";\n}\n.glyphicon-text-color:before {\n content: \"\\E242\";\n}\n.glyphicon-text-background:before {\n content: \"\\E243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\E244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\E245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\E246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\E247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\E248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\E249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\E250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\E251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\E252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\E253\";\n}\n.glyphicon-console:before {\n content: \"\\E254\";\n}\n.glyphicon-superscript:before {\n content: \"\\E255\";\n}\n.glyphicon-subscript:before {\n content: \"\\E256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\E257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\E258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\E259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\E260\";\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\A0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203A';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n", ""]);
49051
49052 // exports
49053
49054
49055/***/ },
49056/* 605 */
49057/***/ function(module, exports) {
49058
49059 /*
49060 MIT License http://www.opensource.org/licenses/mit-license.php
49061 Author Tobias Koppers @sokra
49062 */
49063 // css base code, injected by the css-loader
49064 module.exports = function() {
49065 var list = [];
49066
49067 // return the list of modules as css string
49068 list.toString = function toString() {
49069 var result = [];
49070 for(var i = 0; i < this.length; i++) {
49071 var item = this[i];
49072 if(item[2]) {
49073 result.push("@media " + item[2] + "{" + item[1] + "}");
49074 } else {
49075 result.push(item[1]);
49076 }
49077 }
49078 return result.join("");
49079 };
49080
49081 // import a list of modules into the list
49082 list.i = function(modules, mediaQuery) {
49083 if(typeof modules === "string")
49084 modules = [[null, modules, ""]];
49085 var alreadyImportedModules = {};
49086 for(var i = 0; i < this.length; i++) {
49087 var id = this[i][0];
49088 if(typeof id === "number")
49089 alreadyImportedModules[id] = true;
49090 }
49091 for(i = 0; i < modules.length; i++) {
49092 var item = modules[i];
49093 // skip already imported module
49094 // this implementation is not 100% perfect for weird media query combinations
49095 // when a module is imported multiple times with different media queries.
49096 // I hope this will never occur (Hey this way we have smaller bundles)
49097 if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
49098 if(mediaQuery && !item[2]) {
49099 item[2] = mediaQuery;
49100 } else if(mediaQuery) {
49101 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
49102 }
49103 list.push(item);
49104 }
49105 }
49106 };
49107 return list;
49108 };
49109
49110
49111/***/ },
49112/* 606 */
49113/***/ function(module, exports, __webpack_require__) {
49114
49115 module.exports = __webpack_require__.p + "f4769f9bdb7466be65088239c12046d1.eot";
49116
49117/***/ },
49118/* 607 */
49119/***/ function(module, exports, __webpack_require__) {
49120
49121 module.exports = __webpack_require__.p + "448c34a56d699c29117adc64c43affeb.woff2";
49122
49123/***/ },
49124/* 608 */
49125/***/ function(module, exports, __webpack_require__) {
49126
49127 module.exports = __webpack_require__.p + "fa2772327f55d8198301fdb8bcfc8158.woff";
49128
49129/***/ },
49130/* 609 */
49131/***/ function(module, exports, __webpack_require__) {
49132
49133 module.exports = __webpack_require__.p + "e18bbf611f2a2e43afc071aa2f4e1512.ttf";
49134
49135/***/ },
49136/* 610 */
49137/***/ function(module, exports, __webpack_require__) {
49138
49139 module.exports = __webpack_require__.p + "89889688147bd7575d6327160d64e760.svg";
49140
49141/***/ },
49142/* 611 */
49143/***/ function(module, exports, __webpack_require__) {
49144
49145 /*
49146 MIT License http://www.opensource.org/licenses/mit-license.php
49147 Author Tobias Koppers @sokra
49148 */
49149 var stylesInDom = {},
49150 memoize = function(fn) {
49151 var memo;
49152 return function () {
49153 if (typeof memo === "undefined") memo = fn.apply(this, arguments);
49154 return memo;
49155 };
49156 },
49157 isOldIE = memoize(function() {
49158 return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
49159 }),
49160 getHeadElement = memoize(function () {
49161 return document.head || document.getElementsByTagName("head")[0];
49162 }),
49163 singletonElement = null,
49164 singletonCounter = 0,
49165 styleElementsInsertedAtTop = [];
49166
49167 module.exports = function(list, options) {
49168 if(false) {
49169 if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
49170 }
49171
49172 options = options || {};
49173 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
49174 // tags it will allow on a page
49175 if (typeof options.singleton === "undefined") options.singleton = isOldIE();
49176
49177 // By default, add <style> tags to the bottom of <head>.
49178 if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
49179
49180 var styles = listToStyles(list);
49181 addStylesToDom(styles, options);
49182
49183 return function update(newList) {
49184 var mayRemove = [];
49185 for(var i = 0; i < styles.length; i++) {
49186 var item = styles[i];
49187 var domStyle = stylesInDom[item.id];
49188 domStyle.refs--;
49189 mayRemove.push(domStyle);
49190 }
49191 if(newList) {
49192 var newStyles = listToStyles(newList);
49193 addStylesToDom(newStyles, options);
49194 }
49195 for(var i = 0; i < mayRemove.length; i++) {
49196 var domStyle = mayRemove[i];
49197 if(domStyle.refs === 0) {
49198 for(var j = 0; j < domStyle.parts.length; j++)
49199 domStyle.parts[j]();
49200 delete stylesInDom[domStyle.id];
49201 }
49202 }
49203 };
49204 }
49205
49206 function addStylesToDom(styles, options) {
49207 for(var i = 0; i < styles.length; i++) {
49208 var item = styles[i];
49209 var domStyle = stylesInDom[item.id];
49210 if(domStyle) {
49211 domStyle.refs++;
49212 for(var j = 0; j < domStyle.parts.length; j++) {
49213 domStyle.parts[j](item.parts[j]);
49214 }
49215 for(; j < item.parts.length; j++) {
49216 domStyle.parts.push(addStyle(item.parts[j], options));
49217 }
49218 } else {
49219 var parts = [];
49220 for(var j = 0; j < item.parts.length; j++) {
49221 parts.push(addStyle(item.parts[j], options));
49222 }
49223 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
49224 }
49225 }
49226 }
49227
49228 function listToStyles(list) {
49229 var styles = [];
49230 var newStyles = {};
49231 for(var i = 0; i < list.length; i++) {
49232 var item = list[i];
49233 var id = item[0];
49234 var css = item[1];
49235 var media = item[2];
49236 var sourceMap = item[3];
49237 var part = {css: css, media: media, sourceMap: sourceMap};
49238 if(!newStyles[id])
49239 styles.push(newStyles[id] = {id: id, parts: [part]});
49240 else
49241 newStyles[id].parts.push(part);
49242 }
49243 return styles;
49244 }
49245
49246 function insertStyleElement(options, styleElement) {
49247 var head = getHeadElement();
49248 var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
49249 if (options.insertAt === "top") {
49250 if(!lastStyleElementInsertedAtTop) {
49251 head.insertBefore(styleElement, head.firstChild);
49252 } else if(lastStyleElementInsertedAtTop.nextSibling) {
49253 head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
49254 } else {
49255 head.appendChild(styleElement);
49256 }
49257 styleElementsInsertedAtTop.push(styleElement);
49258 } else if (options.insertAt === "bottom") {
49259 head.appendChild(styleElement);
49260 } else {
49261 throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
49262 }
49263 }
49264
49265 function removeStyleElement(styleElement) {
49266 styleElement.parentNode.removeChild(styleElement);
49267 var idx = styleElementsInsertedAtTop.indexOf(styleElement);
49268 if(idx >= 0) {
49269 styleElementsInsertedAtTop.splice(idx, 1);
49270 }
49271 }
49272
49273 function createStyleElement(options) {
49274 var styleElement = document.createElement("style");
49275 styleElement.type = "text/css";
49276 insertStyleElement(options, styleElement);
49277 return styleElement;
49278 }
49279
49280 function createLinkElement(options) {
49281 var linkElement = document.createElement("link");
49282 linkElement.rel = "stylesheet";
49283 insertStyleElement(options, linkElement);
49284 return linkElement;
49285 }
49286
49287 function addStyle(obj, options) {
49288 var styleElement, update, remove;
49289
49290 if (options.singleton) {
49291 var styleIndex = singletonCounter++;
49292 styleElement = singletonElement || (singletonElement = createStyleElement(options));
49293 update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
49294 remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
49295 } else if(obj.sourceMap &&
49296 typeof URL === "function" &&
49297 typeof URL.createObjectURL === "function" &&
49298 typeof URL.revokeObjectURL === "function" &&
49299 typeof Blob === "function" &&
49300 typeof btoa === "function") {
49301 styleElement = createLinkElement(options);
49302 update = updateLink.bind(null, styleElement);
49303 remove = function() {
49304 removeStyleElement(styleElement);
49305 if(styleElement.href)
49306 URL.revokeObjectURL(styleElement.href);
49307 };
49308 } else {
49309 styleElement = createStyleElement(options);
49310 update = applyToTag.bind(null, styleElement);
49311 remove = function() {
49312 removeStyleElement(styleElement);
49313 };
49314 }
49315
49316 update(obj);
49317
49318 return function updateStyle(newObj) {
49319 if(newObj) {
49320 if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
49321 return;
49322 update(obj = newObj);
49323 } else {
49324 remove();
49325 }
49326 };
49327 }
49328
49329 var replaceText = (function () {
49330 var textStore = [];
49331
49332 return function (index, replacement) {
49333 textStore[index] = replacement;
49334 return textStore.filter(Boolean).join('\n');
49335 };
49336 })();
49337
49338 function applyToSingletonTag(styleElement, index, remove, obj) {
49339 var css = remove ? "" : obj.css;
49340
49341 if (styleElement.styleSheet) {
49342 styleElement.styleSheet.cssText = replaceText(index, css);
49343 } else {
49344 var cssNode = document.createTextNode(css);
49345 var childNodes = styleElement.childNodes;
49346 if (childNodes[index]) styleElement.removeChild(childNodes[index]);
49347 if (childNodes.length) {
49348 styleElement.insertBefore(cssNode, childNodes[index]);
49349 } else {
49350 styleElement.appendChild(cssNode);
49351 }
49352 }
49353 }
49354
49355 function applyToTag(styleElement, obj) {
49356 var css = obj.css;
49357 var media = obj.media;
49358
49359 if(media) {
49360 styleElement.setAttribute("media", media)
49361 }
49362
49363 if(styleElement.styleSheet) {
49364 styleElement.styleSheet.cssText = css;
49365 } else {
49366 while(styleElement.firstChild) {
49367 styleElement.removeChild(styleElement.firstChild);
49368 }
49369 styleElement.appendChild(document.createTextNode(css));
49370 }
49371 }
49372
49373 function updateLink(linkElement, obj) {
49374 var css = obj.css;
49375 var sourceMap = obj.sourceMap;
49376
49377 if(sourceMap) {
49378 // http://stackoverflow.com/a/26603875
49379 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
49380 }
49381
49382 var blob = new Blob([css], { type: "text/css" });
49383
49384 var oldSrc = linkElement.href;
49385
49386 linkElement.href = URL.createObjectURL(blob);
49387
49388 if(oldSrc)
49389 URL.revokeObjectURL(oldSrc);
49390 }
49391
49392
49393/***/ },
49394/* 612 */
49395/***/ function(module, exports, __webpack_require__) {
49396
49397 __webpack_require__(613);
49398 __webpack_require__(615);
49399 __webpack_require__(616);
49400 __webpack_require__(617);
49401 __webpack_require__(618);
49402 __webpack_require__(619);
49403 __webpack_require__(620);
49404 __webpack_require__(621);
49405 __webpack_require__(622);
49406 __webpack_require__(623);
49407 __webpack_require__(624);
49408 __webpack_require__(625);
49409
49410/***/ },
49411/* 613 */
49412/***/ function(module, exports, __webpack_require__) {
49413
49414 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
49415 * Bootstrap: transition.js v3.3.7
49416 * http://getbootstrap.com/javascript/#transitions
49417 * ========================================================================
49418 * Copyright 2011-2016 Twitter, Inc.
49419 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
49420 * ======================================================================== */
49421
49422
49423 +function ($) {
49424 'use strict';
49425
49426 // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
49427 // ============================================================
49428
49429 function transitionEnd() {
49430 var el = document.createElement('bootstrap')
49431
49432 var transEndEventNames = {
49433 WebkitTransition : 'webkitTransitionEnd',
49434 MozTransition : 'transitionend',
49435 OTransition : 'oTransitionEnd otransitionend',
49436 transition : 'transitionend'
49437 }
49438
49439 for (var name in transEndEventNames) {
49440 if (el.style[name] !== undefined) {
49441 return { end: transEndEventNames[name] }
49442 }
49443 }
49444
49445 return false // explicit for ie8 ( ._.)
49446 }
49447
49448 // http://blog.alexmaccaw.com/css-transitions
49449 $.fn.emulateTransitionEnd = function (duration) {
49450 var called = false
49451 var $el = this
49452 $(this).one('bsTransitionEnd', function () { called = true })
49453 var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
49454 setTimeout(callback, duration)
49455 return this
49456 }
49457
49458 $(function () {
49459 $.support.transition = transitionEnd()
49460
49461 if (!$.support.transition) return
49462
49463 $.event.special.bsTransitionEnd = {
49464 bindType: $.support.transition.end,
49465 delegateType: $.support.transition.end,
49466 handle: function (e) {
49467 if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
49468 }
49469 }
49470 })
49471
49472 }(jQuery);
49473
49474 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
49475
49476/***/ },
49477/* 614 */
49478/***/ function(module, exports, __webpack_require__) {
49479
49480 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
49481 * jQuery JavaScript Library v2.2.4
49482 * http://jquery.com/
49483 *
49484 * Includes Sizzle.js
49485 * http://sizzlejs.com/
49486 *
49487 * Copyright jQuery Foundation and other contributors
49488 * Released under the MIT license
49489 * http://jquery.org/license
49490 *
49491 * Date: 2016-05-20T17:23Z
49492 */
49493
49494 (function( global, factory ) {
49495
49496 if ( typeof module === "object" && typeof module.exports === "object" ) {
49497 // For CommonJS and CommonJS-like environments where a proper `window`
49498 // is present, execute the factory and get jQuery.
49499 // For environments that do not have a `window` with a `document`
49500 // (such as Node.js), expose a factory as module.exports.
49501 // This accentuates the need for the creation of a real `window`.
49502 // e.g. var jQuery = require("jquery")(window);
49503 // See ticket #14549 for more info.
49504 module.exports = global.document ?
49505 factory( global, true ) :
49506 function( w ) {
49507 if ( !w.document ) {
49508 throw new Error( "jQuery requires a window with a document" );
49509 }
49510 return factory( w );
49511 };
49512 } else {
49513 factory( global );
49514 }
49515
49516 // Pass this if window is not defined yet
49517 }(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
49518
49519 // Support: Firefox 18+
49520 // Can't be in strict mode, several libs including ASP.NET trace
49521 // the stack via arguments.caller.callee and Firefox dies if
49522 // you try to trace through "use strict" call chains. (#13335)
49523 //"use strict";
49524 var arr = [];
49525
49526 var document = window.document;
49527
49528 var slice = arr.slice;
49529
49530 var concat = arr.concat;
49531
49532 var push = arr.push;
49533
49534 var indexOf = arr.indexOf;
49535
49536 var class2type = {};
49537
49538 var toString = class2type.toString;
49539
49540 var hasOwn = class2type.hasOwnProperty;
49541
49542 var support = {};
49543
49544
49545
49546 var
49547 version = "2.2.4",
49548
49549 // Define a local copy of jQuery
49550 jQuery = function( selector, context ) {
49551
49552 // The jQuery object is actually just the init constructor 'enhanced'
49553 // Need init if jQuery is called (just allow error to be thrown if not included)
49554 return new jQuery.fn.init( selector, context );
49555 },
49556
49557 // Support: Android<4.1
49558 // Make sure we trim BOM and NBSP
49559 rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
49560
49561 // Matches dashed string for camelizing
49562 rmsPrefix = /^-ms-/,
49563 rdashAlpha = /-([\da-z])/gi,
49564
49565 // Used by jQuery.camelCase as callback to replace()
49566 fcamelCase = function( all, letter ) {
49567 return letter.toUpperCase();
49568 };
49569
49570 jQuery.fn = jQuery.prototype = {
49571
49572 // The current version of jQuery being used
49573 jquery: version,
49574
49575 constructor: jQuery,
49576
49577 // Start with an empty selector
49578 selector: "",
49579
49580 // The default length of a jQuery object is 0
49581 length: 0,
49582
49583 toArray: function() {
49584 return slice.call( this );
49585 },
49586
49587 // Get the Nth element in the matched element set OR
49588 // Get the whole matched element set as a clean array
49589 get: function( num ) {
49590 return num != null ?
49591
49592 // Return just the one element from the set
49593 ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
49594
49595 // Return all the elements in a clean array
49596 slice.call( this );
49597 },
49598
49599 // Take an array of elements and push it onto the stack
49600 // (returning the new matched element set)
49601 pushStack: function( elems ) {
49602
49603 // Build a new jQuery matched element set
49604 var ret = jQuery.merge( this.constructor(), elems );
49605
49606 // Add the old object onto the stack (as a reference)
49607 ret.prevObject = this;
49608 ret.context = this.context;
49609
49610 // Return the newly-formed element set
49611 return ret;
49612 },
49613
49614 // Execute a callback for every element in the matched set.
49615 each: function( callback ) {
49616 return jQuery.each( this, callback );
49617 },
49618
49619 map: function( callback ) {
49620 return this.pushStack( jQuery.map( this, function( elem, i ) {
49621 return callback.call( elem, i, elem );
49622 } ) );
49623 },
49624
49625 slice: function() {
49626 return this.pushStack( slice.apply( this, arguments ) );
49627 },
49628
49629 first: function() {
49630 return this.eq( 0 );
49631 },
49632
49633 last: function() {
49634 return this.eq( -1 );
49635 },
49636
49637 eq: function( i ) {
49638 var len = this.length,
49639 j = +i + ( i < 0 ? len : 0 );
49640 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
49641 },
49642
49643 end: function() {
49644 return this.prevObject || this.constructor();
49645 },
49646
49647 // For internal use only.
49648 // Behaves like an Array's method, not like a jQuery method.
49649 push: push,
49650 sort: arr.sort,
49651 splice: arr.splice
49652 };
49653
49654 jQuery.extend = jQuery.fn.extend = function() {
49655 var options, name, src, copy, copyIsArray, clone,
49656 target = arguments[ 0 ] || {},
49657 i = 1,
49658 length = arguments.length,
49659 deep = false;
49660
49661 // Handle a deep copy situation
49662 if ( typeof target === "boolean" ) {
49663 deep = target;
49664
49665 // Skip the boolean and the target
49666 target = arguments[ i ] || {};
49667 i++;
49668 }
49669
49670 // Handle case when target is a string or something (possible in deep copy)
49671 if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
49672 target = {};
49673 }
49674
49675 // Extend jQuery itself if only one argument is passed
49676 if ( i === length ) {
49677 target = this;
49678 i--;
49679 }
49680
49681 for ( ; i < length; i++ ) {
49682
49683 // Only deal with non-null/undefined values
49684 if ( ( options = arguments[ i ] ) != null ) {
49685
49686 // Extend the base object
49687 for ( name in options ) {
49688 src = target[ name ];
49689 copy = options[ name ];
49690
49691 // Prevent never-ending loop
49692 if ( target === copy ) {
49693 continue;
49694 }
49695
49696 // Recurse if we're merging plain objects or arrays
49697 if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
49698 ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
49699
49700 if ( copyIsArray ) {
49701 copyIsArray = false;
49702 clone = src && jQuery.isArray( src ) ? src : [];
49703
49704 } else {
49705 clone = src && jQuery.isPlainObject( src ) ? src : {};
49706 }
49707
49708 // Never move original objects, clone them
49709 target[ name ] = jQuery.extend( deep, clone, copy );
49710
49711 // Don't bring in undefined values
49712 } else if ( copy !== undefined ) {
49713 target[ name ] = copy;
49714 }
49715 }
49716 }
49717 }
49718
49719 // Return the modified object
49720 return target;
49721 };
49722
49723 jQuery.extend( {
49724
49725 // Unique for each copy of jQuery on the page
49726 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
49727
49728 // Assume jQuery is ready without the ready module
49729 isReady: true,
49730
49731 error: function( msg ) {
49732 throw new Error( msg );
49733 },
49734
49735 noop: function() {},
49736
49737 isFunction: function( obj ) {
49738 return jQuery.type( obj ) === "function";
49739 },
49740
49741 isArray: Array.isArray,
49742
49743 isWindow: function( obj ) {
49744 return obj != null && obj === obj.window;
49745 },
49746
49747 isNumeric: function( obj ) {
49748
49749 // parseFloat NaNs numeric-cast false positives (null|true|false|"")
49750 // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
49751 // subtraction forces infinities to NaN
49752 // adding 1 corrects loss of precision from parseFloat (#15100)
49753 var realStringObj = obj && obj.toString();
49754 return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
49755 },
49756
49757 isPlainObject: function( obj ) {
49758 var key;
49759
49760 // Not plain objects:
49761 // - Any object or value whose internal [[Class]] property is not "[object Object]"
49762 // - DOM nodes
49763 // - window
49764 if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
49765 return false;
49766 }
49767
49768 // Not own constructor property must be Object
49769 if ( obj.constructor &&
49770 !hasOwn.call( obj, "constructor" ) &&
49771 !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
49772 return false;
49773 }
49774
49775 // Own properties are enumerated firstly, so to speed up,
49776 // if last one is own, then all properties are own
49777 for ( key in obj ) {}
49778
49779 return key === undefined || hasOwn.call( obj, key );
49780 },
49781
49782 isEmptyObject: function( obj ) {
49783 var name;
49784 for ( name in obj ) {
49785 return false;
49786 }
49787 return true;
49788 },
49789
49790 type: function( obj ) {
49791 if ( obj == null ) {
49792 return obj + "";
49793 }
49794
49795 // Support: Android<4.0, iOS<6 (functionish RegExp)
49796 return typeof obj === "object" || typeof obj === "function" ?
49797 class2type[ toString.call( obj ) ] || "object" :
49798 typeof obj;
49799 },
49800
49801 // Evaluates a script in a global context
49802 globalEval: function( code ) {
49803 var script,
49804 indirect = eval;
49805
49806 code = jQuery.trim( code );
49807
49808 if ( code ) {
49809
49810 // If the code includes a valid, prologue position
49811 // strict mode pragma, execute code by injecting a
49812 // script tag into the document.
49813 if ( code.indexOf( "use strict" ) === 1 ) {
49814 script = document.createElement( "script" );
49815 script.text = code;
49816 document.head.appendChild( script ).parentNode.removeChild( script );
49817 } else {
49818
49819 // Otherwise, avoid the DOM node creation, insertion
49820 // and removal by using an indirect global eval
49821
49822 indirect( code );
49823 }
49824 }
49825 },
49826
49827 // Convert dashed to camelCase; used by the css and data modules
49828 // Support: IE9-11+
49829 // Microsoft forgot to hump their vendor prefix (#9572)
49830 camelCase: function( string ) {
49831 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
49832 },
49833
49834 nodeName: function( elem, name ) {
49835 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
49836 },
49837
49838 each: function( obj, callback ) {
49839 var length, i = 0;
49840
49841 if ( isArrayLike( obj ) ) {
49842 length = obj.length;
49843 for ( ; i < length; i++ ) {
49844 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
49845 break;
49846 }
49847 }
49848 } else {
49849 for ( i in obj ) {
49850 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
49851 break;
49852 }
49853 }
49854 }
49855
49856 return obj;
49857 },
49858
49859 // Support: Android<4.1
49860 trim: function( text ) {
49861 return text == null ?
49862 "" :
49863 ( text + "" ).replace( rtrim, "" );
49864 },
49865
49866 // results is for internal usage only
49867 makeArray: function( arr, results ) {
49868 var ret = results || [];
49869
49870 if ( arr != null ) {
49871 if ( isArrayLike( Object( arr ) ) ) {
49872 jQuery.merge( ret,
49873 typeof arr === "string" ?
49874 [ arr ] : arr
49875 );
49876 } else {
49877 push.call( ret, arr );
49878 }
49879 }
49880
49881 return ret;
49882 },
49883
49884 inArray: function( elem, arr, i ) {
49885 return arr == null ? -1 : indexOf.call( arr, elem, i );
49886 },
49887
49888 merge: function( first, second ) {
49889 var len = +second.length,
49890 j = 0,
49891 i = first.length;
49892
49893 for ( ; j < len; j++ ) {
49894 first[ i++ ] = second[ j ];
49895 }
49896
49897 first.length = i;
49898
49899 return first;
49900 },
49901
49902 grep: function( elems, callback, invert ) {
49903 var callbackInverse,
49904 matches = [],
49905 i = 0,
49906 length = elems.length,
49907 callbackExpect = !invert;
49908
49909 // Go through the array, only saving the items
49910 // that pass the validator function
49911 for ( ; i < length; i++ ) {
49912 callbackInverse = !callback( elems[ i ], i );
49913 if ( callbackInverse !== callbackExpect ) {
49914 matches.push( elems[ i ] );
49915 }
49916 }
49917
49918 return matches;
49919 },
49920
49921 // arg is for internal usage only
49922 map: function( elems, callback, arg ) {
49923 var length, value,
49924 i = 0,
49925 ret = [];
49926
49927 // Go through the array, translating each of the items to their new values
49928 if ( isArrayLike( elems ) ) {
49929 length = elems.length;
49930 for ( ; i < length; i++ ) {
49931 value = callback( elems[ i ], i, arg );
49932
49933 if ( value != null ) {
49934 ret.push( value );
49935 }
49936 }
49937
49938 // Go through every key on the object,
49939 } else {
49940 for ( i in elems ) {
49941 value = callback( elems[ i ], i, arg );
49942
49943 if ( value != null ) {
49944 ret.push( value );
49945 }
49946 }
49947 }
49948
49949 // Flatten any nested arrays
49950 return concat.apply( [], ret );
49951 },
49952
49953 // A global GUID counter for objects
49954 guid: 1,
49955
49956 // Bind a function to a context, optionally partially applying any
49957 // arguments.
49958 proxy: function( fn, context ) {
49959 var tmp, args, proxy;
49960
49961 if ( typeof context === "string" ) {
49962 tmp = fn[ context ];
49963 context = fn;
49964 fn = tmp;
49965 }
49966
49967 // Quick check to determine if target is callable, in the spec
49968 // this throws a TypeError, but we will just return undefined.
49969 if ( !jQuery.isFunction( fn ) ) {
49970 return undefined;
49971 }
49972
49973 // Simulated bind
49974 args = slice.call( arguments, 2 );
49975 proxy = function() {
49976 return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
49977 };
49978
49979 // Set the guid of unique handler to the same of original handler, so it can be removed
49980 proxy.guid = fn.guid = fn.guid || jQuery.guid++;
49981
49982 return proxy;
49983 },
49984
49985 now: Date.now,
49986
49987 // jQuery.support is not used in Core but other projects attach their
49988 // properties to it so it needs to exist.
49989 support: support
49990 } );
49991
49992 // JSHint would error on this code due to the Symbol not being defined in ES5.
49993 // Defining this global in .jshintrc would create a danger of using the global
49994 // unguarded in another place, it seems safer to just disable JSHint for these
49995 // three lines.
49996 /* jshint ignore: start */
49997 if ( typeof Symbol === "function" ) {
49998 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
49999 }
50000 /* jshint ignore: end */
50001
50002 // Populate the class2type map
50003 jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
50004 function( i, name ) {
50005 class2type[ "[object " + name + "]" ] = name.toLowerCase();
50006 } );
50007
50008 function isArrayLike( obj ) {
50009
50010 // Support: iOS 8.2 (not reproducible in simulator)
50011 // `in` check used to prevent JIT error (gh-2145)
50012 // hasOwn isn't used here due to false negatives
50013 // regarding Nodelist length in IE
50014 var length = !!obj && "length" in obj && obj.length,
50015 type = jQuery.type( obj );
50016
50017 if ( type === "function" || jQuery.isWindow( obj ) ) {
50018 return false;
50019 }
50020
50021 return type === "array" || length === 0 ||
50022 typeof length === "number" && length > 0 && ( length - 1 ) in obj;
50023 }
50024 var Sizzle =
50025 /*!
50026 * Sizzle CSS Selector Engine v2.2.1
50027 * http://sizzlejs.com/
50028 *
50029 * Copyright jQuery Foundation and other contributors
50030 * Released under the MIT license
50031 * http://jquery.org/license
50032 *
50033 * Date: 2015-10-17
50034 */
50035 (function( window ) {
50036
50037 var i,
50038 support,
50039 Expr,
50040 getText,
50041 isXML,
50042 tokenize,
50043 compile,
50044 select,
50045 outermostContext,
50046 sortInput,
50047 hasDuplicate,
50048
50049 // Local document vars
50050 setDocument,
50051 document,
50052 docElem,
50053 documentIsHTML,
50054 rbuggyQSA,
50055 rbuggyMatches,
50056 matches,
50057 contains,
50058
50059 // Instance-specific data
50060 expando = "sizzle" + 1 * new Date(),
50061 preferredDoc = window.document,
50062 dirruns = 0,
50063 done = 0,
50064 classCache = createCache(),
50065 tokenCache = createCache(),
50066 compilerCache = createCache(),
50067 sortOrder = function( a, b ) {
50068 if ( a === b ) {
50069 hasDuplicate = true;
50070 }
50071 return 0;
50072 },
50073
50074 // General-purpose constants
50075 MAX_NEGATIVE = 1 << 31,
50076
50077 // Instance methods
50078 hasOwn = ({}).hasOwnProperty,
50079 arr = [],
50080 pop = arr.pop,
50081 push_native = arr.push,
50082 push = arr.push,
50083 slice = arr.slice,
50084 // Use a stripped-down indexOf as it's faster than native
50085 // http://jsperf.com/thor-indexof-vs-for/5
50086 indexOf = function( list, elem ) {
50087 var i = 0,
50088 len = list.length;
50089 for ( ; i < len; i++ ) {
50090 if ( list[i] === elem ) {
50091 return i;
50092 }
50093 }
50094 return -1;
50095 },
50096
50097 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
50098
50099 // Regular expressions
50100
50101 // http://www.w3.org/TR/css3-selectors/#whitespace
50102 whitespace = "[\\x20\\t\\r\\n\\f]",
50103
50104 // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
50105 identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
50106
50107 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
50108 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
50109 // Operator (capture 2)
50110 "*([*^$|!~]?=)" + whitespace +
50111 // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
50112 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
50113 "*\\]",
50114
50115 pseudos = ":(" + identifier + ")(?:\\((" +
50116 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
50117 // 1. quoted (capture 3; capture 4 or capture 5)
50118 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
50119 // 2. simple (capture 6)
50120 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
50121 // 3. anything else (capture 2)
50122 ".*" +
50123 ")\\)|)",
50124
50125 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
50126 rwhitespace = new RegExp( whitespace + "+", "g" ),
50127 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
50128
50129 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
50130 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
50131
50132 rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
50133
50134 rpseudo = new RegExp( pseudos ),
50135 ridentifier = new RegExp( "^" + identifier + "$" ),
50136
50137 matchExpr = {
50138 "ID": new RegExp( "^#(" + identifier + ")" ),
50139 "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
50140 "TAG": new RegExp( "^(" + identifier + "|[*])" ),
50141 "ATTR": new RegExp( "^" + attributes ),
50142 "PSEUDO": new RegExp( "^" + pseudos ),
50143 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
50144 "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
50145 "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
50146 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
50147 // For use in libraries implementing .is()
50148 // We use this for POS matching in `select`
50149 "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
50150 whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
50151 },
50152
50153 rinputs = /^(?:input|select|textarea|button)$/i,
50154 rheader = /^h\d$/i,
50155
50156 rnative = /^[^{]+\{\s*\[native \w/,
50157
50158 // Easily-parseable/retrievable ID or TAG or CLASS selectors
50159 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
50160
50161 rsibling = /[+~]/,
50162 rescape = /'|\\/g,
50163
50164 // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
50165 runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
50166 funescape = function( _, escaped, escapedWhitespace ) {
50167 var high = "0x" + escaped - 0x10000;
50168 // NaN means non-codepoint
50169 // Support: Firefox<24
50170 // Workaround erroneous numeric interpretation of +"0x"
50171 return high !== high || escapedWhitespace ?
50172 escaped :
50173 high < 0 ?
50174 // BMP codepoint
50175 String.fromCharCode( high + 0x10000 ) :
50176 // Supplemental Plane codepoint (surrogate pair)
50177 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
50178 },
50179
50180 // Used for iframes
50181 // See setDocument()
50182 // Removing the function wrapper causes a "Permission Denied"
50183 // error in IE
50184 unloadHandler = function() {
50185 setDocument();
50186 };
50187
50188 // Optimize for push.apply( _, NodeList )
50189 try {
50190 push.apply(
50191 (arr = slice.call( preferredDoc.childNodes )),
50192 preferredDoc.childNodes
50193 );
50194 // Support: Android<4.0
50195 // Detect silently failing push.apply
50196 arr[ preferredDoc.childNodes.length ].nodeType;
50197 } catch ( e ) {
50198 push = { apply: arr.length ?
50199
50200 // Leverage slice if possible
50201 function( target, els ) {
50202 push_native.apply( target, slice.call(els) );
50203 } :
50204
50205 // Support: IE<9
50206 // Otherwise append directly
50207 function( target, els ) {
50208 var j = target.length,
50209 i = 0;
50210 // Can't trust NodeList.length
50211 while ( (target[j++] = els[i++]) ) {}
50212 target.length = j - 1;
50213 }
50214 };
50215 }
50216
50217 function Sizzle( selector, context, results, seed ) {
50218 var m, i, elem, nid, nidselect, match, groups, newSelector,
50219 newContext = context && context.ownerDocument,
50220
50221 // nodeType defaults to 9, since context defaults to document
50222 nodeType = context ? context.nodeType : 9;
50223
50224 results = results || [];
50225
50226 // Return early from calls with invalid selector or context
50227 if ( typeof selector !== "string" || !selector ||
50228 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
50229
50230 return results;
50231 }
50232
50233 // Try to shortcut find operations (as opposed to filters) in HTML documents
50234 if ( !seed ) {
50235
50236 if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
50237 setDocument( context );
50238 }
50239 context = context || document;
50240
50241 if ( documentIsHTML ) {
50242
50243 // If the selector is sufficiently simple, try using a "get*By*" DOM method
50244 // (excepting DocumentFragment context, where the methods don't exist)
50245 if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
50246
50247 // ID selector
50248 if ( (m = match[1]) ) {
50249
50250 // Document context
50251 if ( nodeType === 9 ) {
50252 if ( (elem = context.getElementById( m )) ) {
50253
50254 // Support: IE, Opera, Webkit
50255 // TODO: identify versions
50256 // getElementById can match elements by name instead of ID
50257 if ( elem.id === m ) {
50258 results.push( elem );
50259 return results;
50260 }
50261 } else {
50262 return results;
50263 }
50264
50265 // Element context
50266 } else {
50267
50268 // Support: IE, Opera, Webkit
50269 // TODO: identify versions
50270 // getElementById can match elements by name instead of ID
50271 if ( newContext && (elem = newContext.getElementById( m )) &&
50272 contains( context, elem ) &&
50273 elem.id === m ) {
50274
50275 results.push( elem );
50276 return results;
50277 }
50278 }
50279
50280 // Type selector
50281 } else if ( match[2] ) {
50282 push.apply( results, context.getElementsByTagName( selector ) );
50283 return results;
50284
50285 // Class selector
50286 } else if ( (m = match[3]) && support.getElementsByClassName &&
50287 context.getElementsByClassName ) {
50288
50289 push.apply( results, context.getElementsByClassName( m ) );
50290 return results;
50291 }
50292 }
50293
50294 // Take advantage of querySelectorAll
50295 if ( support.qsa &&
50296 !compilerCache[ selector + " " ] &&
50297 (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
50298
50299 if ( nodeType !== 1 ) {
50300 newContext = context;
50301 newSelector = selector;
50302
50303 // qSA looks outside Element context, which is not what we want
50304 // Thanks to Andrew Dupont for this workaround technique
50305 // Support: IE <=8
50306 // Exclude object elements
50307 } else if ( context.nodeName.toLowerCase() !== "object" ) {
50308
50309 // Capture the context ID, setting it first if necessary
50310 if ( (nid = context.getAttribute( "id" )) ) {
50311 nid = nid.replace( rescape, "\\$&" );
50312 } else {
50313 context.setAttribute( "id", (nid = expando) );
50314 }
50315
50316 // Prefix every selector in the list
50317 groups = tokenize( selector );
50318 i = groups.length;
50319 nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
50320 while ( i-- ) {
50321 groups[i] = nidselect + " " + toSelector( groups[i] );
50322 }
50323 newSelector = groups.join( "," );
50324
50325 // Expand context for sibling selectors
50326 newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
50327 context;
50328 }
50329
50330 if ( newSelector ) {
50331 try {
50332 push.apply( results,
50333 newContext.querySelectorAll( newSelector )
50334 );
50335 return results;
50336 } catch ( qsaError ) {
50337 } finally {
50338 if ( nid === expando ) {
50339 context.removeAttribute( "id" );
50340 }
50341 }
50342 }
50343 }
50344 }
50345 }
50346
50347 // All others
50348 return select( selector.replace( rtrim, "$1" ), context, results, seed );
50349 }
50350
50351 /**
50352 * Create key-value caches of limited size
50353 * @returns {function(string, object)} Returns the Object data after storing it on itself with
50354 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
50355 * deleting the oldest entry
50356 */
50357 function createCache() {
50358 var keys = [];
50359
50360 function cache( key, value ) {
50361 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
50362 if ( keys.push( key + " " ) > Expr.cacheLength ) {
50363 // Only keep the most recent entries
50364 delete cache[ keys.shift() ];
50365 }
50366 return (cache[ key + " " ] = value);
50367 }
50368 return cache;
50369 }
50370
50371 /**
50372 * Mark a function for special use by Sizzle
50373 * @param {Function} fn The function to mark
50374 */
50375 function markFunction( fn ) {
50376 fn[ expando ] = true;
50377 return fn;
50378 }
50379
50380 /**
50381 * Support testing using an element
50382 * @param {Function} fn Passed the created div and expects a boolean result
50383 */
50384 function assert( fn ) {
50385 var div = document.createElement("div");
50386
50387 try {
50388 return !!fn( div );
50389 } catch (e) {
50390 return false;
50391 } finally {
50392 // Remove from its parent by default
50393 if ( div.parentNode ) {
50394 div.parentNode.removeChild( div );
50395 }
50396 // release memory in IE
50397 div = null;
50398 }
50399 }
50400
50401 /**
50402 * Adds the same handler for all of the specified attrs
50403 * @param {String} attrs Pipe-separated list of attributes
50404 * @param {Function} handler The method that will be applied
50405 */
50406 function addHandle( attrs, handler ) {
50407 var arr = attrs.split("|"),
50408 i = arr.length;
50409
50410 while ( i-- ) {
50411 Expr.attrHandle[ arr[i] ] = handler;
50412 }
50413 }
50414
50415 /**
50416 * Checks document order of two siblings
50417 * @param {Element} a
50418 * @param {Element} b
50419 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
50420 */
50421 function siblingCheck( a, b ) {
50422 var cur = b && a,
50423 diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
50424 ( ~b.sourceIndex || MAX_NEGATIVE ) -
50425 ( ~a.sourceIndex || MAX_NEGATIVE );
50426
50427 // Use IE sourceIndex if available on both nodes
50428 if ( diff ) {
50429 return diff;
50430 }
50431
50432 // Check if b follows a
50433 if ( cur ) {
50434 while ( (cur = cur.nextSibling) ) {
50435 if ( cur === b ) {
50436 return -1;
50437 }
50438 }
50439 }
50440
50441 return a ? 1 : -1;
50442 }
50443
50444 /**
50445 * Returns a function to use in pseudos for input types
50446 * @param {String} type
50447 */
50448 function createInputPseudo( type ) {
50449 return function( elem ) {
50450 var name = elem.nodeName.toLowerCase();
50451 return name === "input" && elem.type === type;
50452 };
50453 }
50454
50455 /**
50456 * Returns a function to use in pseudos for buttons
50457 * @param {String} type
50458 */
50459 function createButtonPseudo( type ) {
50460 return function( elem ) {
50461 var name = elem.nodeName.toLowerCase();
50462 return (name === "input" || name === "button") && elem.type === type;
50463 };
50464 }
50465
50466 /**
50467 * Returns a function to use in pseudos for positionals
50468 * @param {Function} fn
50469 */
50470 function createPositionalPseudo( fn ) {
50471 return markFunction(function( argument ) {
50472 argument = +argument;
50473 return markFunction(function( seed, matches ) {
50474 var j,
50475 matchIndexes = fn( [], seed.length, argument ),
50476 i = matchIndexes.length;
50477
50478 // Match elements found at the specified indexes
50479 while ( i-- ) {
50480 if ( seed[ (j = matchIndexes[i]) ] ) {
50481 seed[j] = !(matches[j] = seed[j]);
50482 }
50483 }
50484 });
50485 });
50486 }
50487
50488 /**
50489 * Checks a node for validity as a Sizzle context
50490 * @param {Element|Object=} context
50491 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
50492 */
50493 function testContext( context ) {
50494 return context && typeof context.getElementsByTagName !== "undefined" && context;
50495 }
50496
50497 // Expose support vars for convenience
50498 support = Sizzle.support = {};
50499
50500 /**
50501 * Detects XML nodes
50502 * @param {Element|Object} elem An element or a document
50503 * @returns {Boolean} True iff elem is a non-HTML XML node
50504 */
50505 isXML = Sizzle.isXML = function( elem ) {
50506 // documentElement is verified for cases where it doesn't yet exist
50507 // (such as loading iframes in IE - #4833)
50508 var documentElement = elem && (elem.ownerDocument || elem).documentElement;
50509 return documentElement ? documentElement.nodeName !== "HTML" : false;
50510 };
50511
50512 /**
50513 * Sets document-related variables once based on the current document
50514 * @param {Element|Object} [doc] An element or document object to use to set the document
50515 * @returns {Object} Returns the current document
50516 */
50517 setDocument = Sizzle.setDocument = function( node ) {
50518 var hasCompare, parent,
50519 doc = node ? node.ownerDocument || node : preferredDoc;
50520
50521 // Return early if doc is invalid or already selected
50522 if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
50523 return document;
50524 }
50525
50526 // Update global variables
50527 document = doc;
50528 docElem = document.documentElement;
50529 documentIsHTML = !isXML( document );
50530
50531 // Support: IE 9-11, Edge
50532 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
50533 if ( (parent = document.defaultView) && parent.top !== parent ) {
50534 // Support: IE 11
50535 if ( parent.addEventListener ) {
50536 parent.addEventListener( "unload", unloadHandler, false );
50537
50538 // Support: IE 9 - 10 only
50539 } else if ( parent.attachEvent ) {
50540 parent.attachEvent( "onunload", unloadHandler );
50541 }
50542 }
50543
50544 /* Attributes
50545 ---------------------------------------------------------------------- */
50546
50547 // Support: IE<8
50548 // Verify that getAttribute really returns attributes and not properties
50549 // (excepting IE8 booleans)
50550 support.attributes = assert(function( div ) {
50551 div.className = "i";
50552 return !div.getAttribute("className");
50553 });
50554
50555 /* getElement(s)By*
50556 ---------------------------------------------------------------------- */
50557
50558 // Check if getElementsByTagName("*") returns only elements
50559 support.getElementsByTagName = assert(function( div ) {
50560 div.appendChild( document.createComment("") );
50561 return !div.getElementsByTagName("*").length;
50562 });
50563
50564 // Support: IE<9
50565 support.getElementsByClassName = rnative.test( document.getElementsByClassName );
50566
50567 // Support: IE<10
50568 // Check if getElementById returns elements by name
50569 // The broken getElementById methods don't pick up programatically-set names,
50570 // so use a roundabout getElementsByName test
50571 support.getById = assert(function( div ) {
50572 docElem.appendChild( div ).id = expando;
50573 return !document.getElementsByName || !document.getElementsByName( expando ).length;
50574 });
50575
50576 // ID find and filter
50577 if ( support.getById ) {
50578 Expr.find["ID"] = function( id, context ) {
50579 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
50580 var m = context.getElementById( id );
50581 return m ? [ m ] : [];
50582 }
50583 };
50584 Expr.filter["ID"] = function( id ) {
50585 var attrId = id.replace( runescape, funescape );
50586 return function( elem ) {
50587 return elem.getAttribute("id") === attrId;
50588 };
50589 };
50590 } else {
50591 // Support: IE6/7
50592 // getElementById is not reliable as a find shortcut
50593 delete Expr.find["ID"];
50594
50595 Expr.filter["ID"] = function( id ) {
50596 var attrId = id.replace( runescape, funescape );
50597 return function( elem ) {
50598 var node = typeof elem.getAttributeNode !== "undefined" &&
50599 elem.getAttributeNode("id");
50600 return node && node.value === attrId;
50601 };
50602 };
50603 }
50604
50605 // Tag
50606 Expr.find["TAG"] = support.getElementsByTagName ?
50607 function( tag, context ) {
50608 if ( typeof context.getElementsByTagName !== "undefined" ) {
50609 return context.getElementsByTagName( tag );
50610
50611 // DocumentFragment nodes don't have gEBTN
50612 } else if ( support.qsa ) {
50613 return context.querySelectorAll( tag );
50614 }
50615 } :
50616
50617 function( tag, context ) {
50618 var elem,
50619 tmp = [],
50620 i = 0,
50621 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
50622 results = context.getElementsByTagName( tag );
50623
50624 // Filter out possible comments
50625 if ( tag === "*" ) {
50626 while ( (elem = results[i++]) ) {
50627 if ( elem.nodeType === 1 ) {
50628 tmp.push( elem );
50629 }
50630 }
50631
50632 return tmp;
50633 }
50634 return results;
50635 };
50636
50637 // Class
50638 Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
50639 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
50640 return context.getElementsByClassName( className );
50641 }
50642 };
50643
50644 /* QSA/matchesSelector
50645 ---------------------------------------------------------------------- */
50646
50647 // QSA and matchesSelector support
50648
50649 // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
50650 rbuggyMatches = [];
50651
50652 // qSa(:focus) reports false when true (Chrome 21)
50653 // We allow this because of a bug in IE8/9 that throws an error
50654 // whenever `document.activeElement` is accessed on an iframe
50655 // So, we allow :focus to pass through QSA all the time to avoid the IE error
50656 // See http://bugs.jquery.com/ticket/13378
50657 rbuggyQSA = [];
50658
50659 if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
50660 // Build QSA regex
50661 // Regex strategy adopted from Diego Perini
50662 assert(function( div ) {
50663 // Select is set to empty string on purpose
50664 // This is to test IE's treatment of not explicitly
50665 // setting a boolean content attribute,
50666 // since its presence should be enough
50667 // http://bugs.jquery.com/ticket/12359
50668 docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
50669 "<select id='" + expando + "-\r\\' msallowcapture=''>" +
50670 "<option selected=''></option></select>";
50671
50672 // Support: IE8, Opera 11-12.16
50673 // Nothing should be selected when empty strings follow ^= or $= or *=
50674 // The test attribute must be unknown in Opera but "safe" for WinRT
50675 // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
50676 if ( div.querySelectorAll("[msallowcapture^='']").length ) {
50677 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
50678 }
50679
50680 // Support: IE8
50681 // Boolean attributes and "value" are not treated correctly
50682 if ( !div.querySelectorAll("[selected]").length ) {
50683 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
50684 }
50685
50686 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
50687 if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
50688 rbuggyQSA.push("~=");
50689 }
50690
50691 // Webkit/Opera - :checked should return selected option elements
50692 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
50693 // IE8 throws error here and will not see later tests
50694 if ( !div.querySelectorAll(":checked").length ) {
50695 rbuggyQSA.push(":checked");
50696 }
50697
50698 // Support: Safari 8+, iOS 8+
50699 // https://bugs.webkit.org/show_bug.cgi?id=136851
50700 // In-page `selector#id sibing-combinator selector` fails
50701 if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
50702 rbuggyQSA.push(".#.+[+~]");
50703 }
50704 });
50705
50706 assert(function( div ) {
50707 // Support: Windows 8 Native Apps
50708 // The type and name attributes are restricted during .innerHTML assignment
50709 var input = document.createElement("input");
50710 input.setAttribute( "type", "hidden" );
50711 div.appendChild( input ).setAttribute( "name", "D" );
50712
50713 // Support: IE8
50714 // Enforce case-sensitivity of name attribute
50715 if ( div.querySelectorAll("[name=d]").length ) {
50716 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
50717 }
50718
50719 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
50720 // IE8 throws error here and will not see later tests
50721 if ( !div.querySelectorAll(":enabled").length ) {
50722 rbuggyQSA.push( ":enabled", ":disabled" );
50723 }
50724
50725 // Opera 10-11 does not throw on post-comma invalid pseudos
50726 div.querySelectorAll("*,:x");
50727 rbuggyQSA.push(",.*:");
50728 });
50729 }
50730
50731 if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
50732 docElem.webkitMatchesSelector ||
50733 docElem.mozMatchesSelector ||
50734 docElem.oMatchesSelector ||
50735 docElem.msMatchesSelector) )) ) {
50736
50737 assert(function( div ) {
50738 // Check to see if it's possible to do matchesSelector
50739 // on a disconnected node (IE 9)
50740 support.disconnectedMatch = matches.call( div, "div" );
50741
50742 // This should fail with an exception
50743 // Gecko does not error, returns false instead
50744 matches.call( div, "[s!='']:x" );
50745 rbuggyMatches.push( "!=", pseudos );
50746 });
50747 }
50748
50749 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
50750 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
50751
50752 /* Contains
50753 ---------------------------------------------------------------------- */
50754 hasCompare = rnative.test( docElem.compareDocumentPosition );
50755
50756 // Element contains another
50757 // Purposefully self-exclusive
50758 // As in, an element does not contain itself
50759 contains = hasCompare || rnative.test( docElem.contains ) ?
50760 function( a, b ) {
50761 var adown = a.nodeType === 9 ? a.documentElement : a,
50762 bup = b && b.parentNode;
50763 return a === bup || !!( bup && bup.nodeType === 1 && (
50764 adown.contains ?
50765 adown.contains( bup ) :
50766 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
50767 ));
50768 } :
50769 function( a, b ) {
50770 if ( b ) {
50771 while ( (b = b.parentNode) ) {
50772 if ( b === a ) {
50773 return true;
50774 }
50775 }
50776 }
50777 return false;
50778 };
50779
50780 /* Sorting
50781 ---------------------------------------------------------------------- */
50782
50783 // Document order sorting
50784 sortOrder = hasCompare ?
50785 function( a, b ) {
50786
50787 // Flag for duplicate removal
50788 if ( a === b ) {
50789 hasDuplicate = true;
50790 return 0;
50791 }
50792
50793 // Sort on method existence if only one input has compareDocumentPosition
50794 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
50795 if ( compare ) {
50796 return compare;
50797 }
50798
50799 // Calculate position if both inputs belong to the same document
50800 compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
50801 a.compareDocumentPosition( b ) :
50802
50803 // Otherwise we know they are disconnected
50804 1;
50805
50806 // Disconnected nodes
50807 if ( compare & 1 ||
50808 (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
50809
50810 // Choose the first element that is related to our preferred document
50811 if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
50812 return -1;
50813 }
50814 if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
50815 return 1;
50816 }
50817
50818 // Maintain original order
50819 return sortInput ?
50820 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
50821 0;
50822 }
50823
50824 return compare & 4 ? -1 : 1;
50825 } :
50826 function( a, b ) {
50827 // Exit early if the nodes are identical
50828 if ( a === b ) {
50829 hasDuplicate = true;
50830 return 0;
50831 }
50832
50833 var cur,
50834 i = 0,
50835 aup = a.parentNode,
50836 bup = b.parentNode,
50837 ap = [ a ],
50838 bp = [ b ];
50839
50840 // Parentless nodes are either documents or disconnected
50841 if ( !aup || !bup ) {
50842 return a === document ? -1 :
50843 b === document ? 1 :
50844 aup ? -1 :
50845 bup ? 1 :
50846 sortInput ?
50847 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
50848 0;
50849
50850 // If the nodes are siblings, we can do a quick check
50851 } else if ( aup === bup ) {
50852 return siblingCheck( a, b );
50853 }
50854
50855 // Otherwise we need full lists of their ancestors for comparison
50856 cur = a;
50857 while ( (cur = cur.parentNode) ) {
50858 ap.unshift( cur );
50859 }
50860 cur = b;
50861 while ( (cur = cur.parentNode) ) {
50862 bp.unshift( cur );
50863 }
50864
50865 // Walk down the tree looking for a discrepancy
50866 while ( ap[i] === bp[i] ) {
50867 i++;
50868 }
50869
50870 return i ?
50871 // Do a sibling check if the nodes have a common ancestor
50872 siblingCheck( ap[i], bp[i] ) :
50873
50874 // Otherwise nodes in our document sort first
50875 ap[i] === preferredDoc ? -1 :
50876 bp[i] === preferredDoc ? 1 :
50877 0;
50878 };
50879
50880 return document;
50881 };
50882
50883 Sizzle.matches = function( expr, elements ) {
50884 return Sizzle( expr, null, null, elements );
50885 };
50886
50887 Sizzle.matchesSelector = function( elem, expr ) {
50888 // Set document vars if needed
50889 if ( ( elem.ownerDocument || elem ) !== document ) {
50890 setDocument( elem );
50891 }
50892
50893 // Make sure that attribute selectors are quoted
50894 expr = expr.replace( rattributeQuotes, "='$1']" );
50895
50896 if ( support.matchesSelector && documentIsHTML &&
50897 !compilerCache[ expr + " " ] &&
50898 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
50899 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
50900
50901 try {
50902 var ret = matches.call( elem, expr );
50903
50904 // IE 9's matchesSelector returns false on disconnected nodes
50905 if ( ret || support.disconnectedMatch ||
50906 // As well, disconnected nodes are said to be in a document
50907 // fragment in IE 9
50908 elem.document && elem.document.nodeType !== 11 ) {
50909 return ret;
50910 }
50911 } catch (e) {}
50912 }
50913
50914 return Sizzle( expr, document, null, [ elem ] ).length > 0;
50915 };
50916
50917 Sizzle.contains = function( context, elem ) {
50918 // Set document vars if needed
50919 if ( ( context.ownerDocument || context ) !== document ) {
50920 setDocument( context );
50921 }
50922 return contains( context, elem );
50923 };
50924
50925 Sizzle.attr = function( elem, name ) {
50926 // Set document vars if needed
50927 if ( ( elem.ownerDocument || elem ) !== document ) {
50928 setDocument( elem );
50929 }
50930
50931 var fn = Expr.attrHandle[ name.toLowerCase() ],
50932 // Don't get fooled by Object.prototype properties (jQuery #13807)
50933 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
50934 fn( elem, name, !documentIsHTML ) :
50935 undefined;
50936
50937 return val !== undefined ?
50938 val :
50939 support.attributes || !documentIsHTML ?
50940 elem.getAttribute( name ) :
50941 (val = elem.getAttributeNode(name)) && val.specified ?
50942 val.value :
50943 null;
50944 };
50945
50946 Sizzle.error = function( msg ) {
50947 throw new Error( "Syntax error, unrecognized expression: " + msg );
50948 };
50949
50950 /**
50951 * Document sorting and removing duplicates
50952 * @param {ArrayLike} results
50953 */
50954 Sizzle.uniqueSort = function( results ) {
50955 var elem,
50956 duplicates = [],
50957 j = 0,
50958 i = 0;
50959
50960 // Unless we *know* we can detect duplicates, assume their presence
50961 hasDuplicate = !support.detectDuplicates;
50962 sortInput = !support.sortStable && results.slice( 0 );
50963 results.sort( sortOrder );
50964
50965 if ( hasDuplicate ) {
50966 while ( (elem = results[i++]) ) {
50967 if ( elem === results[ i ] ) {
50968 j = duplicates.push( i );
50969 }
50970 }
50971 while ( j-- ) {
50972 results.splice( duplicates[ j ], 1 );
50973 }
50974 }
50975
50976 // Clear input after sorting to release objects
50977 // See https://github.com/jquery/sizzle/pull/225
50978 sortInput = null;
50979
50980 return results;
50981 };
50982
50983 /**
50984 * Utility function for retrieving the text value of an array of DOM nodes
50985 * @param {Array|Element} elem
50986 */
50987 getText = Sizzle.getText = function( elem ) {
50988 var node,
50989 ret = "",
50990 i = 0,
50991 nodeType = elem.nodeType;
50992
50993 if ( !nodeType ) {
50994 // If no nodeType, this is expected to be an array
50995 while ( (node = elem[i++]) ) {
50996 // Do not traverse comment nodes
50997 ret += getText( node );
50998 }
50999 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
51000 // Use textContent for elements
51001 // innerText usage removed for consistency of new lines (jQuery #11153)
51002 if ( typeof elem.textContent === "string" ) {
51003 return elem.textContent;
51004 } else {
51005 // Traverse its children
51006 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
51007 ret += getText( elem );
51008 }
51009 }
51010 } else if ( nodeType === 3 || nodeType === 4 ) {
51011 return elem.nodeValue;
51012 }
51013 // Do not include comment or processing instruction nodes
51014
51015 return ret;
51016 };
51017
51018 Expr = Sizzle.selectors = {
51019
51020 // Can be adjusted by the user
51021 cacheLength: 50,
51022
51023 createPseudo: markFunction,
51024
51025 match: matchExpr,
51026
51027 attrHandle: {},
51028
51029 find: {},
51030
51031 relative: {
51032 ">": { dir: "parentNode", first: true },
51033 " ": { dir: "parentNode" },
51034 "+": { dir: "previousSibling", first: true },
51035 "~": { dir: "previousSibling" }
51036 },
51037
51038 preFilter: {
51039 "ATTR": function( match ) {
51040 match[1] = match[1].replace( runescape, funescape );
51041
51042 // Move the given value to match[3] whether quoted or unquoted
51043 match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
51044
51045 if ( match[2] === "~=" ) {
51046 match[3] = " " + match[3] + " ";
51047 }
51048
51049 return match.slice( 0, 4 );
51050 },
51051
51052 "CHILD": function( match ) {
51053 /* matches from matchExpr["CHILD"]
51054 1 type (only|nth|...)
51055 2 what (child|of-type)
51056 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
51057 4 xn-component of xn+y argument ([+-]?\d*n|)
51058 5 sign of xn-component
51059 6 x of xn-component
51060 7 sign of y-component
51061 8 y of y-component
51062 */
51063 match[1] = match[1].toLowerCase();
51064
51065 if ( match[1].slice( 0, 3 ) === "nth" ) {
51066 // nth-* requires argument
51067 if ( !match[3] ) {
51068 Sizzle.error( match[0] );
51069 }
51070
51071 // numeric x and y parameters for Expr.filter.CHILD
51072 // remember that false/true cast respectively to 0/1
51073 match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
51074 match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
51075
51076 // other types prohibit arguments
51077 } else if ( match[3] ) {
51078 Sizzle.error( match[0] );
51079 }
51080
51081 return match;
51082 },
51083
51084 "PSEUDO": function( match ) {
51085 var excess,
51086 unquoted = !match[6] && match[2];
51087
51088 if ( matchExpr["CHILD"].test( match[0] ) ) {
51089 return null;
51090 }
51091
51092 // Accept quoted arguments as-is
51093 if ( match[3] ) {
51094 match[2] = match[4] || match[5] || "";
51095
51096 // Strip excess characters from unquoted arguments
51097 } else if ( unquoted && rpseudo.test( unquoted ) &&
51098 // Get excess from tokenize (recursively)
51099 (excess = tokenize( unquoted, true )) &&
51100 // advance to the next closing parenthesis
51101 (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
51102
51103 // excess is a negative index
51104 match[0] = match[0].slice( 0, excess );
51105 match[2] = unquoted.slice( 0, excess );
51106 }
51107
51108 // Return only captures needed by the pseudo filter method (type and argument)
51109 return match.slice( 0, 3 );
51110 }
51111 },
51112
51113 filter: {
51114
51115 "TAG": function( nodeNameSelector ) {
51116 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
51117 return nodeNameSelector === "*" ?
51118 function() { return true; } :
51119 function( elem ) {
51120 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
51121 };
51122 },
51123
51124 "CLASS": function( className ) {
51125 var pattern = classCache[ className + " " ];
51126
51127 return pattern ||
51128 (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
51129 classCache( className, function( elem ) {
51130 return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
51131 });
51132 },
51133
51134 "ATTR": function( name, operator, check ) {
51135 return function( elem ) {
51136 var result = Sizzle.attr( elem, name );
51137
51138 if ( result == null ) {
51139 return operator === "!=";
51140 }
51141 if ( !operator ) {
51142 return true;
51143 }
51144
51145 result += "";
51146
51147 return operator === "=" ? result === check :
51148 operator === "!=" ? result !== check :
51149 operator === "^=" ? check && result.indexOf( check ) === 0 :
51150 operator === "*=" ? check && result.indexOf( check ) > -1 :
51151 operator === "$=" ? check && result.slice( -check.length ) === check :
51152 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
51153 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
51154 false;
51155 };
51156 },
51157
51158 "CHILD": function( type, what, argument, first, last ) {
51159 var simple = type.slice( 0, 3 ) !== "nth",
51160 forward = type.slice( -4 ) !== "last",
51161 ofType = what === "of-type";
51162
51163 return first === 1 && last === 0 ?
51164
51165 // Shortcut for :nth-*(n)
51166 function( elem ) {
51167 return !!elem.parentNode;
51168 } :
51169
51170 function( elem, context, xml ) {
51171 var cache, uniqueCache, outerCache, node, nodeIndex, start,
51172 dir = simple !== forward ? "nextSibling" : "previousSibling",
51173 parent = elem.parentNode,
51174 name = ofType && elem.nodeName.toLowerCase(),
51175 useCache = !xml && !ofType,
51176 diff = false;
51177
51178 if ( parent ) {
51179
51180 // :(first|last|only)-(child|of-type)
51181 if ( simple ) {
51182 while ( dir ) {
51183 node = elem;
51184 while ( (node = node[ dir ]) ) {
51185 if ( ofType ?
51186 node.nodeName.toLowerCase() === name :
51187 node.nodeType === 1 ) {
51188
51189 return false;
51190 }
51191 }
51192 // Reverse direction for :only-* (if we haven't yet done so)
51193 start = dir = type === "only" && !start && "nextSibling";
51194 }
51195 return true;
51196 }
51197
51198 start = [ forward ? parent.firstChild : parent.lastChild ];
51199
51200 // non-xml :nth-child(...) stores cache data on `parent`
51201 if ( forward && useCache ) {
51202
51203 // Seek `elem` from a previously-cached index
51204
51205 // ...in a gzip-friendly way
51206 node = parent;
51207 outerCache = node[ expando ] || (node[ expando ] = {});
51208
51209 // Support: IE <9 only
51210 // Defend against cloned attroperties (jQuery gh-1709)
51211 uniqueCache = outerCache[ node.uniqueID ] ||
51212 (outerCache[ node.uniqueID ] = {});
51213
51214 cache = uniqueCache[ type ] || [];
51215 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
51216 diff = nodeIndex && cache[ 2 ];
51217 node = nodeIndex && parent.childNodes[ nodeIndex ];
51218
51219 while ( (node = ++nodeIndex && node && node[ dir ] ||
51220
51221 // Fallback to seeking `elem` from the start
51222 (diff = nodeIndex = 0) || start.pop()) ) {
51223
51224 // When found, cache indexes on `parent` and break
51225 if ( node.nodeType === 1 && ++diff && node === elem ) {
51226 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
51227 break;
51228 }
51229 }
51230
51231 } else {
51232 // Use previously-cached element index if available
51233 if ( useCache ) {
51234 // ...in a gzip-friendly way
51235 node = elem;
51236 outerCache = node[ expando ] || (node[ expando ] = {});
51237
51238 // Support: IE <9 only
51239 // Defend against cloned attroperties (jQuery gh-1709)
51240 uniqueCache = outerCache[ node.uniqueID ] ||
51241 (outerCache[ node.uniqueID ] = {});
51242
51243 cache = uniqueCache[ type ] || [];
51244 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
51245 diff = nodeIndex;
51246 }
51247
51248 // xml :nth-child(...)
51249 // or :nth-last-child(...) or :nth(-last)?-of-type(...)
51250 if ( diff === false ) {
51251 // Use the same loop as above to seek `elem` from the start
51252 while ( (node = ++nodeIndex && node && node[ dir ] ||
51253 (diff = nodeIndex = 0) || start.pop()) ) {
51254
51255 if ( ( ofType ?
51256 node.nodeName.toLowerCase() === name :
51257 node.nodeType === 1 ) &&
51258 ++diff ) {
51259
51260 // Cache the index of each encountered element
51261 if ( useCache ) {
51262 outerCache = node[ expando ] || (node[ expando ] = {});
51263
51264 // Support: IE <9 only
51265 // Defend against cloned attroperties (jQuery gh-1709)
51266 uniqueCache = outerCache[ node.uniqueID ] ||
51267 (outerCache[ node.uniqueID ] = {});
51268
51269 uniqueCache[ type ] = [ dirruns, diff ];
51270 }
51271
51272 if ( node === elem ) {
51273 break;
51274 }
51275 }
51276 }
51277 }
51278 }
51279
51280 // Incorporate the offset, then check against cycle size
51281 diff -= last;
51282 return diff === first || ( diff % first === 0 && diff / first >= 0 );
51283 }
51284 };
51285 },
51286
51287 "PSEUDO": function( pseudo, argument ) {
51288 // pseudo-class names are case-insensitive
51289 // http://www.w3.org/TR/selectors/#pseudo-classes
51290 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
51291 // Remember that setFilters inherits from pseudos
51292 var args,
51293 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
51294 Sizzle.error( "unsupported pseudo: " + pseudo );
51295
51296 // The user may use createPseudo to indicate that
51297 // arguments are needed to create the filter function
51298 // just as Sizzle does
51299 if ( fn[ expando ] ) {
51300 return fn( argument );
51301 }
51302
51303 // But maintain support for old signatures
51304 if ( fn.length > 1 ) {
51305 args = [ pseudo, pseudo, "", argument ];
51306 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
51307 markFunction(function( seed, matches ) {
51308 var idx,
51309 matched = fn( seed, argument ),
51310 i = matched.length;
51311 while ( i-- ) {
51312 idx = indexOf( seed, matched[i] );
51313 seed[ idx ] = !( matches[ idx ] = matched[i] );
51314 }
51315 }) :
51316 function( elem ) {
51317 return fn( elem, 0, args );
51318 };
51319 }
51320
51321 return fn;
51322 }
51323 },
51324
51325 pseudos: {
51326 // Potentially complex pseudos
51327 "not": markFunction(function( selector ) {
51328 // Trim the selector passed to compile
51329 // to avoid treating leading and trailing
51330 // spaces as combinators
51331 var input = [],
51332 results = [],
51333 matcher = compile( selector.replace( rtrim, "$1" ) );
51334
51335 return matcher[ expando ] ?
51336 markFunction(function( seed, matches, context, xml ) {
51337 var elem,
51338 unmatched = matcher( seed, null, xml, [] ),
51339 i = seed.length;
51340
51341 // Match elements unmatched by `matcher`
51342 while ( i-- ) {
51343 if ( (elem = unmatched[i]) ) {
51344 seed[i] = !(matches[i] = elem);
51345 }
51346 }
51347 }) :
51348 function( elem, context, xml ) {
51349 input[0] = elem;
51350 matcher( input, null, xml, results );
51351 // Don't keep the element (issue #299)
51352 input[0] = null;
51353 return !results.pop();
51354 };
51355 }),
51356
51357 "has": markFunction(function( selector ) {
51358 return function( elem ) {
51359 return Sizzle( selector, elem ).length > 0;
51360 };
51361 }),
51362
51363 "contains": markFunction(function( text ) {
51364 text = text.replace( runescape, funescape );
51365 return function( elem ) {
51366 return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
51367 };
51368 }),
51369
51370 // "Whether an element is represented by a :lang() selector
51371 // is based solely on the element's language value
51372 // being equal to the identifier C,
51373 // or beginning with the identifier C immediately followed by "-".
51374 // The matching of C against the element's language value is performed case-insensitively.
51375 // The identifier C does not have to be a valid language name."
51376 // http://www.w3.org/TR/selectors/#lang-pseudo
51377 "lang": markFunction( function( lang ) {
51378 // lang value must be a valid identifier
51379 if ( !ridentifier.test(lang || "") ) {
51380 Sizzle.error( "unsupported lang: " + lang );
51381 }
51382 lang = lang.replace( runescape, funescape ).toLowerCase();
51383 return function( elem ) {
51384 var elemLang;
51385 do {
51386 if ( (elemLang = documentIsHTML ?
51387 elem.lang :
51388 elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
51389
51390 elemLang = elemLang.toLowerCase();
51391 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
51392 }
51393 } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
51394 return false;
51395 };
51396 }),
51397
51398 // Miscellaneous
51399 "target": function( elem ) {
51400 var hash = window.location && window.location.hash;
51401 return hash && hash.slice( 1 ) === elem.id;
51402 },
51403
51404 "root": function( elem ) {
51405 return elem === docElem;
51406 },
51407
51408 "focus": function( elem ) {
51409 return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
51410 },
51411
51412 // Boolean properties
51413 "enabled": function( elem ) {
51414 return elem.disabled === false;
51415 },
51416
51417 "disabled": function( elem ) {
51418 return elem.disabled === true;
51419 },
51420
51421 "checked": function( elem ) {
51422 // In CSS3, :checked should return both checked and selected elements
51423 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
51424 var nodeName = elem.nodeName.toLowerCase();
51425 return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
51426 },
51427
51428 "selected": function( elem ) {
51429 // Accessing this property makes selected-by-default
51430 // options in Safari work properly
51431 if ( elem.parentNode ) {
51432 elem.parentNode.selectedIndex;
51433 }
51434
51435 return elem.selected === true;
51436 },
51437
51438 // Contents
51439 "empty": function( elem ) {
51440 // http://www.w3.org/TR/selectors/#empty-pseudo
51441 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
51442 // but not by others (comment: 8; processing instruction: 7; etc.)
51443 // nodeType < 6 works because attributes (2) do not appear as children
51444 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
51445 if ( elem.nodeType < 6 ) {
51446 return false;
51447 }
51448 }
51449 return true;
51450 },
51451
51452 "parent": function( elem ) {
51453 return !Expr.pseudos["empty"]( elem );
51454 },
51455
51456 // Element/input types
51457 "header": function( elem ) {
51458 return rheader.test( elem.nodeName );
51459 },
51460
51461 "input": function( elem ) {
51462 return rinputs.test( elem.nodeName );
51463 },
51464
51465 "button": function( elem ) {
51466 var name = elem.nodeName.toLowerCase();
51467 return name === "input" && elem.type === "button" || name === "button";
51468 },
51469
51470 "text": function( elem ) {
51471 var attr;
51472 return elem.nodeName.toLowerCase() === "input" &&
51473 elem.type === "text" &&
51474
51475 // Support: IE<8
51476 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
51477 ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
51478 },
51479
51480 // Position-in-collection
51481 "first": createPositionalPseudo(function() {
51482 return [ 0 ];
51483 }),
51484
51485 "last": createPositionalPseudo(function( matchIndexes, length ) {
51486 return [ length - 1 ];
51487 }),
51488
51489 "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
51490 return [ argument < 0 ? argument + length : argument ];
51491 }),
51492
51493 "even": createPositionalPseudo(function( matchIndexes, length ) {
51494 var i = 0;
51495 for ( ; i < length; i += 2 ) {
51496 matchIndexes.push( i );
51497 }
51498 return matchIndexes;
51499 }),
51500
51501 "odd": createPositionalPseudo(function( matchIndexes, length ) {
51502 var i = 1;
51503 for ( ; i < length; i += 2 ) {
51504 matchIndexes.push( i );
51505 }
51506 return matchIndexes;
51507 }),
51508
51509 "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
51510 var i = argument < 0 ? argument + length : argument;
51511 for ( ; --i >= 0; ) {
51512 matchIndexes.push( i );
51513 }
51514 return matchIndexes;
51515 }),
51516
51517 "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
51518 var i = argument < 0 ? argument + length : argument;
51519 for ( ; ++i < length; ) {
51520 matchIndexes.push( i );
51521 }
51522 return matchIndexes;
51523 })
51524 }
51525 };
51526
51527 Expr.pseudos["nth"] = Expr.pseudos["eq"];
51528
51529 // Add button/input type pseudos
51530 for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
51531 Expr.pseudos[ i ] = createInputPseudo( i );
51532 }
51533 for ( i in { submit: true, reset: true } ) {
51534 Expr.pseudos[ i ] = createButtonPseudo( i );
51535 }
51536
51537 // Easy API for creating new setFilters
51538 function setFilters() {}
51539 setFilters.prototype = Expr.filters = Expr.pseudos;
51540 Expr.setFilters = new setFilters();
51541
51542 tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
51543 var matched, match, tokens, type,
51544 soFar, groups, preFilters,
51545 cached = tokenCache[ selector + " " ];
51546
51547 if ( cached ) {
51548 return parseOnly ? 0 : cached.slice( 0 );
51549 }
51550
51551 soFar = selector;
51552 groups = [];
51553 preFilters = Expr.preFilter;
51554
51555 while ( soFar ) {
51556
51557 // Comma and first run
51558 if ( !matched || (match = rcomma.exec( soFar )) ) {
51559 if ( match ) {
51560 // Don't consume trailing commas as valid
51561 soFar = soFar.slice( match[0].length ) || soFar;
51562 }
51563 groups.push( (tokens = []) );
51564 }
51565
51566 matched = false;
51567
51568 // Combinators
51569 if ( (match = rcombinators.exec( soFar )) ) {
51570 matched = match.shift();
51571 tokens.push({
51572 value: matched,
51573 // Cast descendant combinators to space
51574 type: match[0].replace( rtrim, " " )
51575 });
51576 soFar = soFar.slice( matched.length );
51577 }
51578
51579 // Filters
51580 for ( type in Expr.filter ) {
51581 if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
51582 (match = preFilters[ type ]( match ))) ) {
51583 matched = match.shift();
51584 tokens.push({
51585 value: matched,
51586 type: type,
51587 matches: match
51588 });
51589 soFar = soFar.slice( matched.length );
51590 }
51591 }
51592
51593 if ( !matched ) {
51594 break;
51595 }
51596 }
51597
51598 // Return the length of the invalid excess
51599 // if we're just parsing
51600 // Otherwise, throw an error or return tokens
51601 return parseOnly ?
51602 soFar.length :
51603 soFar ?
51604 Sizzle.error( selector ) :
51605 // Cache the tokens
51606 tokenCache( selector, groups ).slice( 0 );
51607 };
51608
51609 function toSelector( tokens ) {
51610 var i = 0,
51611 len = tokens.length,
51612 selector = "";
51613 for ( ; i < len; i++ ) {
51614 selector += tokens[i].value;
51615 }
51616 return selector;
51617 }
51618
51619 function addCombinator( matcher, combinator, base ) {
51620 var dir = combinator.dir,
51621 checkNonElements = base && dir === "parentNode",
51622 doneName = done++;
51623
51624 return combinator.first ?
51625 // Check against closest ancestor/preceding element
51626 function( elem, context, xml ) {
51627 while ( (elem = elem[ dir ]) ) {
51628 if ( elem.nodeType === 1 || checkNonElements ) {
51629 return matcher( elem, context, xml );
51630 }
51631 }
51632 } :
51633
51634 // Check against all ancestor/preceding elements
51635 function( elem, context, xml ) {
51636 var oldCache, uniqueCache, outerCache,
51637 newCache = [ dirruns, doneName ];
51638
51639 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
51640 if ( xml ) {
51641 while ( (elem = elem[ dir ]) ) {
51642 if ( elem.nodeType === 1 || checkNonElements ) {
51643 if ( matcher( elem, context, xml ) ) {
51644 return true;
51645 }
51646 }
51647 }
51648 } else {
51649 while ( (elem = elem[ dir ]) ) {
51650 if ( elem.nodeType === 1 || checkNonElements ) {
51651 outerCache = elem[ expando ] || (elem[ expando ] = {});
51652
51653 // Support: IE <9 only
51654 // Defend against cloned attroperties (jQuery gh-1709)
51655 uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
51656
51657 if ( (oldCache = uniqueCache[ dir ]) &&
51658 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
51659
51660 // Assign to newCache so results back-propagate to previous elements
51661 return (newCache[ 2 ] = oldCache[ 2 ]);
51662 } else {
51663 // Reuse newcache so results back-propagate to previous elements
51664 uniqueCache[ dir ] = newCache;
51665
51666 // A match means we're done; a fail means we have to keep checking
51667 if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
51668 return true;
51669 }
51670 }
51671 }
51672 }
51673 }
51674 };
51675 }
51676
51677 function elementMatcher( matchers ) {
51678 return matchers.length > 1 ?
51679 function( elem, context, xml ) {
51680 var i = matchers.length;
51681 while ( i-- ) {
51682 if ( !matchers[i]( elem, context, xml ) ) {
51683 return false;
51684 }
51685 }
51686 return true;
51687 } :
51688 matchers[0];
51689 }
51690
51691 function multipleContexts( selector, contexts, results ) {
51692 var i = 0,
51693 len = contexts.length;
51694 for ( ; i < len; i++ ) {
51695 Sizzle( selector, contexts[i], results );
51696 }
51697 return results;
51698 }
51699
51700 function condense( unmatched, map, filter, context, xml ) {
51701 var elem,
51702 newUnmatched = [],
51703 i = 0,
51704 len = unmatched.length,
51705 mapped = map != null;
51706
51707 for ( ; i < len; i++ ) {
51708 if ( (elem = unmatched[i]) ) {
51709 if ( !filter || filter( elem, context, xml ) ) {
51710 newUnmatched.push( elem );
51711 if ( mapped ) {
51712 map.push( i );
51713 }
51714 }
51715 }
51716 }
51717
51718 return newUnmatched;
51719 }
51720
51721 function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
51722 if ( postFilter && !postFilter[ expando ] ) {
51723 postFilter = setMatcher( postFilter );
51724 }
51725 if ( postFinder && !postFinder[ expando ] ) {
51726 postFinder = setMatcher( postFinder, postSelector );
51727 }
51728 return markFunction(function( seed, results, context, xml ) {
51729 var temp, i, elem,
51730 preMap = [],
51731 postMap = [],
51732 preexisting = results.length,
51733
51734 // Get initial elements from seed or context
51735 elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
51736
51737 // Prefilter to get matcher input, preserving a map for seed-results synchronization
51738 matcherIn = preFilter && ( seed || !selector ) ?
51739 condense( elems, preMap, preFilter, context, xml ) :
51740 elems,
51741
51742 matcherOut = matcher ?
51743 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
51744 postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
51745
51746 // ...intermediate processing is necessary
51747 [] :
51748
51749 // ...otherwise use results directly
51750 results :
51751 matcherIn;
51752
51753 // Find primary matches
51754 if ( matcher ) {
51755 matcher( matcherIn, matcherOut, context, xml );
51756 }
51757
51758 // Apply postFilter
51759 if ( postFilter ) {
51760 temp = condense( matcherOut, postMap );
51761 postFilter( temp, [], context, xml );
51762
51763 // Un-match failing elements by moving them back to matcherIn
51764 i = temp.length;
51765 while ( i-- ) {
51766 if ( (elem = temp[i]) ) {
51767 matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
51768 }
51769 }
51770 }
51771
51772 if ( seed ) {
51773 if ( postFinder || preFilter ) {
51774 if ( postFinder ) {
51775 // Get the final matcherOut by condensing this intermediate into postFinder contexts
51776 temp = [];
51777 i = matcherOut.length;
51778 while ( i-- ) {
51779 if ( (elem = matcherOut[i]) ) {
51780 // Restore matcherIn since elem is not yet a final match
51781 temp.push( (matcherIn[i] = elem) );
51782 }
51783 }
51784 postFinder( null, (matcherOut = []), temp, xml );
51785 }
51786
51787 // Move matched elements from seed to results to keep them synchronized
51788 i = matcherOut.length;
51789 while ( i-- ) {
51790 if ( (elem = matcherOut[i]) &&
51791 (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
51792
51793 seed[temp] = !(results[temp] = elem);
51794 }
51795 }
51796 }
51797
51798 // Add elements to results, through postFinder if defined
51799 } else {
51800 matcherOut = condense(
51801 matcherOut === results ?
51802 matcherOut.splice( preexisting, matcherOut.length ) :
51803 matcherOut
51804 );
51805 if ( postFinder ) {
51806 postFinder( null, results, matcherOut, xml );
51807 } else {
51808 push.apply( results, matcherOut );
51809 }
51810 }
51811 });
51812 }
51813
51814 function matcherFromTokens( tokens ) {
51815 var checkContext, matcher, j,
51816 len = tokens.length,
51817 leadingRelative = Expr.relative[ tokens[0].type ],
51818 implicitRelative = leadingRelative || Expr.relative[" "],
51819 i = leadingRelative ? 1 : 0,
51820
51821 // The foundational matcher ensures that elements are reachable from top-level context(s)
51822 matchContext = addCombinator( function( elem ) {
51823 return elem === checkContext;
51824 }, implicitRelative, true ),
51825 matchAnyContext = addCombinator( function( elem ) {
51826 return indexOf( checkContext, elem ) > -1;
51827 }, implicitRelative, true ),
51828 matchers = [ function( elem, context, xml ) {
51829 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
51830 (checkContext = context).nodeType ?
51831 matchContext( elem, context, xml ) :
51832 matchAnyContext( elem, context, xml ) );
51833 // Avoid hanging onto element (issue #299)
51834 checkContext = null;
51835 return ret;
51836 } ];
51837
51838 for ( ; i < len; i++ ) {
51839 if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
51840 matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
51841 } else {
51842 matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
51843
51844 // Return special upon seeing a positional matcher
51845 if ( matcher[ expando ] ) {
51846 // Find the next relative operator (if any) for proper handling
51847 j = ++i;
51848 for ( ; j < len; j++ ) {
51849 if ( Expr.relative[ tokens[j].type ] ) {
51850 break;
51851 }
51852 }
51853 return setMatcher(
51854 i > 1 && elementMatcher( matchers ),
51855 i > 1 && toSelector(
51856 // If the preceding token was a descendant combinator, insert an implicit any-element `*`
51857 tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
51858 ).replace( rtrim, "$1" ),
51859 matcher,
51860 i < j && matcherFromTokens( tokens.slice( i, j ) ),
51861 j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
51862 j < len && toSelector( tokens )
51863 );
51864 }
51865 matchers.push( matcher );
51866 }
51867 }
51868
51869 return elementMatcher( matchers );
51870 }
51871
51872 function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
51873 var bySet = setMatchers.length > 0,
51874 byElement = elementMatchers.length > 0,
51875 superMatcher = function( seed, context, xml, results, outermost ) {
51876 var elem, j, matcher,
51877 matchedCount = 0,
51878 i = "0",
51879 unmatched = seed && [],
51880 setMatched = [],
51881 contextBackup = outermostContext,
51882 // We must always have either seed elements or outermost context
51883 elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
51884 // Use integer dirruns iff this is the outermost matcher
51885 dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
51886 len = elems.length;
51887
51888 if ( outermost ) {
51889 outermostContext = context === document || context || outermost;
51890 }
51891
51892 // Add elements passing elementMatchers directly to results
51893 // Support: IE<9, Safari
51894 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
51895 for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
51896 if ( byElement && elem ) {
51897 j = 0;
51898 if ( !context && elem.ownerDocument !== document ) {
51899 setDocument( elem );
51900 xml = !documentIsHTML;
51901 }
51902 while ( (matcher = elementMatchers[j++]) ) {
51903 if ( matcher( elem, context || document, xml) ) {
51904 results.push( elem );
51905 break;
51906 }
51907 }
51908 if ( outermost ) {
51909 dirruns = dirrunsUnique;
51910 }
51911 }
51912
51913 // Track unmatched elements for set filters
51914 if ( bySet ) {
51915 // They will have gone through all possible matchers
51916 if ( (elem = !matcher && elem) ) {
51917 matchedCount--;
51918 }
51919
51920 // Lengthen the array for every element, matched or not
51921 if ( seed ) {
51922 unmatched.push( elem );
51923 }
51924 }
51925 }
51926
51927 // `i` is now the count of elements visited above, and adding it to `matchedCount`
51928 // makes the latter nonnegative.
51929 matchedCount += i;
51930
51931 // Apply set filters to unmatched elements
51932 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
51933 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
51934 // no element matchers and no seed.
51935 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
51936 // case, which will result in a "00" `matchedCount` that differs from `i` but is also
51937 // numerically zero.
51938 if ( bySet && i !== matchedCount ) {
51939 j = 0;
51940 while ( (matcher = setMatchers[j++]) ) {
51941 matcher( unmatched, setMatched, context, xml );
51942 }
51943
51944 if ( seed ) {
51945 // Reintegrate element matches to eliminate the need for sorting
51946 if ( matchedCount > 0 ) {
51947 while ( i-- ) {
51948 if ( !(unmatched[i] || setMatched[i]) ) {
51949 setMatched[i] = pop.call( results );
51950 }
51951 }
51952 }
51953
51954 // Discard index placeholder values to get only actual matches
51955 setMatched = condense( setMatched );
51956 }
51957
51958 // Add matches to results
51959 push.apply( results, setMatched );
51960
51961 // Seedless set matches succeeding multiple successful matchers stipulate sorting
51962 if ( outermost && !seed && setMatched.length > 0 &&
51963 ( matchedCount + setMatchers.length ) > 1 ) {
51964
51965 Sizzle.uniqueSort( results );
51966 }
51967 }
51968
51969 // Override manipulation of globals by nested matchers
51970 if ( outermost ) {
51971 dirruns = dirrunsUnique;
51972 outermostContext = contextBackup;
51973 }
51974
51975 return unmatched;
51976 };
51977
51978 return bySet ?
51979 markFunction( superMatcher ) :
51980 superMatcher;
51981 }
51982
51983 compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
51984 var i,
51985 setMatchers = [],
51986 elementMatchers = [],
51987 cached = compilerCache[ selector + " " ];
51988
51989 if ( !cached ) {
51990 // Generate a function of recursive functions that can be used to check each element
51991 if ( !match ) {
51992 match = tokenize( selector );
51993 }
51994 i = match.length;
51995 while ( i-- ) {
51996 cached = matcherFromTokens( match[i] );
51997 if ( cached[ expando ] ) {
51998 setMatchers.push( cached );
51999 } else {
52000 elementMatchers.push( cached );
52001 }
52002 }
52003
52004 // Cache the compiled function
52005 cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
52006
52007 // Save selector and tokenization
52008 cached.selector = selector;
52009 }
52010 return cached;
52011 };
52012
52013 /**
52014 * A low-level selection function that works with Sizzle's compiled
52015 * selector functions
52016 * @param {String|Function} selector A selector or a pre-compiled
52017 * selector function built with Sizzle.compile
52018 * @param {Element} context
52019 * @param {Array} [results]
52020 * @param {Array} [seed] A set of elements to match against
52021 */
52022 select = Sizzle.select = function( selector, context, results, seed ) {
52023 var i, tokens, token, type, find,
52024 compiled = typeof selector === "function" && selector,
52025 match = !seed && tokenize( (selector = compiled.selector || selector) );
52026
52027 results = results || [];
52028
52029 // Try to minimize operations if there is only one selector in the list and no seed
52030 // (the latter of which guarantees us context)
52031 if ( match.length === 1 ) {
52032
52033 // Reduce context if the leading compound selector is an ID
52034 tokens = match[0] = match[0].slice( 0 );
52035 if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
52036 support.getById && context.nodeType === 9 && documentIsHTML &&
52037 Expr.relative[ tokens[1].type ] ) {
52038
52039 context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
52040 if ( !context ) {
52041 return results;
52042
52043 // Precompiled matchers will still verify ancestry, so step up a level
52044 } else if ( compiled ) {
52045 context = context.parentNode;
52046 }
52047
52048 selector = selector.slice( tokens.shift().value.length );
52049 }
52050
52051 // Fetch a seed set for right-to-left matching
52052 i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
52053 while ( i-- ) {
52054 token = tokens[i];
52055
52056 // Abort if we hit a combinator
52057 if ( Expr.relative[ (type = token.type) ] ) {
52058 break;
52059 }
52060 if ( (find = Expr.find[ type ]) ) {
52061 // Search, expanding context for leading sibling combinators
52062 if ( (seed = find(
52063 token.matches[0].replace( runescape, funescape ),
52064 rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
52065 )) ) {
52066
52067 // If seed is empty or no tokens remain, we can return early
52068 tokens.splice( i, 1 );
52069 selector = seed.length && toSelector( tokens );
52070 if ( !selector ) {
52071 push.apply( results, seed );
52072 return results;
52073 }
52074
52075 break;
52076 }
52077 }
52078 }
52079 }
52080
52081 // Compile and execute a filtering function if one is not provided
52082 // Provide `match` to avoid retokenization if we modified the selector above
52083 ( compiled || compile( selector, match ) )(
52084 seed,
52085 context,
52086 !documentIsHTML,
52087 results,
52088 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
52089 );
52090 return results;
52091 };
52092
52093 // One-time assignments
52094
52095 // Sort stability
52096 support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
52097
52098 // Support: Chrome 14-35+
52099 // Always assume duplicates if they aren't passed to the comparison function
52100 support.detectDuplicates = !!hasDuplicate;
52101
52102 // Initialize against the default document
52103 setDocument();
52104
52105 // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
52106 // Detached nodes confoundingly follow *each other*
52107 support.sortDetached = assert(function( div1 ) {
52108 // Should return 1, but returns 4 (following)
52109 return div1.compareDocumentPosition( document.createElement("div") ) & 1;
52110 });
52111
52112 // Support: IE<8
52113 // Prevent attribute/property "interpolation"
52114 // http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
52115 if ( !assert(function( div ) {
52116 div.innerHTML = "<a href='#'></a>";
52117 return div.firstChild.getAttribute("href") === "#" ;
52118 }) ) {
52119 addHandle( "type|href|height|width", function( elem, name, isXML ) {
52120 if ( !isXML ) {
52121 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
52122 }
52123 });
52124 }
52125
52126 // Support: IE<9
52127 // Use defaultValue in place of getAttribute("value")
52128 if ( !support.attributes || !assert(function( div ) {
52129 div.innerHTML = "<input/>";
52130 div.firstChild.setAttribute( "value", "" );
52131 return div.firstChild.getAttribute( "value" ) === "";
52132 }) ) {
52133 addHandle( "value", function( elem, name, isXML ) {
52134 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
52135 return elem.defaultValue;
52136 }
52137 });
52138 }
52139
52140 // Support: IE<9
52141 // Use getAttributeNode to fetch booleans when getAttribute lies
52142 if ( !assert(function( div ) {
52143 return div.getAttribute("disabled") == null;
52144 }) ) {
52145 addHandle( booleans, function( elem, name, isXML ) {
52146 var val;
52147 if ( !isXML ) {
52148 return elem[ name ] === true ? name.toLowerCase() :
52149 (val = elem.getAttributeNode( name )) && val.specified ?
52150 val.value :
52151 null;
52152 }
52153 });
52154 }
52155
52156 return Sizzle;
52157
52158 })( window );
52159
52160
52161
52162 jQuery.find = Sizzle;
52163 jQuery.expr = Sizzle.selectors;
52164 jQuery.expr[ ":" ] = jQuery.expr.pseudos;
52165 jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
52166 jQuery.text = Sizzle.getText;
52167 jQuery.isXMLDoc = Sizzle.isXML;
52168 jQuery.contains = Sizzle.contains;
52169
52170
52171
52172 var dir = function( elem, dir, until ) {
52173 var matched = [],
52174 truncate = until !== undefined;
52175
52176 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
52177 if ( elem.nodeType === 1 ) {
52178 if ( truncate && jQuery( elem ).is( until ) ) {
52179 break;
52180 }
52181 matched.push( elem );
52182 }
52183 }
52184 return matched;
52185 };
52186
52187
52188 var siblings = function( n, elem ) {
52189 var matched = [];
52190
52191 for ( ; n; n = n.nextSibling ) {
52192 if ( n.nodeType === 1 && n !== elem ) {
52193 matched.push( n );
52194 }
52195 }
52196
52197 return matched;
52198 };
52199
52200
52201 var rneedsContext = jQuery.expr.match.needsContext;
52202
52203 var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
52204
52205
52206
52207 var risSimple = /^.[^:#\[\.,]*$/;
52208
52209 // Implement the identical functionality for filter and not
52210 function winnow( elements, qualifier, not ) {
52211 if ( jQuery.isFunction( qualifier ) ) {
52212 return jQuery.grep( elements, function( elem, i ) {
52213 /* jshint -W018 */
52214 return !!qualifier.call( elem, i, elem ) !== not;
52215 } );
52216
52217 }
52218
52219 if ( qualifier.nodeType ) {
52220 return jQuery.grep( elements, function( elem ) {
52221 return ( elem === qualifier ) !== not;
52222 } );
52223
52224 }
52225
52226 if ( typeof qualifier === "string" ) {
52227 if ( risSimple.test( qualifier ) ) {
52228 return jQuery.filter( qualifier, elements, not );
52229 }
52230
52231 qualifier = jQuery.filter( qualifier, elements );
52232 }
52233
52234 return jQuery.grep( elements, function( elem ) {
52235 return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
52236 } );
52237 }
52238
52239 jQuery.filter = function( expr, elems, not ) {
52240 var elem = elems[ 0 ];
52241
52242 if ( not ) {
52243 expr = ":not(" + expr + ")";
52244 }
52245
52246 return elems.length === 1 && elem.nodeType === 1 ?
52247 jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
52248 jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
52249 return elem.nodeType === 1;
52250 } ) );
52251 };
52252
52253 jQuery.fn.extend( {
52254 find: function( selector ) {
52255 var i,
52256 len = this.length,
52257 ret = [],
52258 self = this;
52259
52260 if ( typeof selector !== "string" ) {
52261 return this.pushStack( jQuery( selector ).filter( function() {
52262 for ( i = 0; i < len; i++ ) {
52263 if ( jQuery.contains( self[ i ], this ) ) {
52264 return true;
52265 }
52266 }
52267 } ) );
52268 }
52269
52270 for ( i = 0; i < len; i++ ) {
52271 jQuery.find( selector, self[ i ], ret );
52272 }
52273
52274 // Needed because $( selector, context ) becomes $( context ).find( selector )
52275 ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
52276 ret.selector = this.selector ? this.selector + " " + selector : selector;
52277 return ret;
52278 },
52279 filter: function( selector ) {
52280 return this.pushStack( winnow( this, selector || [], false ) );
52281 },
52282 not: function( selector ) {
52283 return this.pushStack( winnow( this, selector || [], true ) );
52284 },
52285 is: function( selector ) {
52286 return !!winnow(
52287 this,
52288
52289 // If this is a positional/relative selector, check membership in the returned set
52290 // so $("p:first").is("p:last") won't return true for a doc with two "p".
52291 typeof selector === "string" && rneedsContext.test( selector ) ?
52292 jQuery( selector ) :
52293 selector || [],
52294 false
52295 ).length;
52296 }
52297 } );
52298
52299
52300 // Initialize a jQuery object
52301
52302
52303 // A central reference to the root jQuery(document)
52304 var rootjQuery,
52305
52306 // A simple way to check for HTML strings
52307 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
52308 // Strict HTML recognition (#11290: must start with <)
52309 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
52310
52311 init = jQuery.fn.init = function( selector, context, root ) {
52312 var match, elem;
52313
52314 // HANDLE: $(""), $(null), $(undefined), $(false)
52315 if ( !selector ) {
52316 return this;
52317 }
52318
52319 // Method init() accepts an alternate rootjQuery
52320 // so migrate can support jQuery.sub (gh-2101)
52321 root = root || rootjQuery;
52322
52323 // Handle HTML strings
52324 if ( typeof selector === "string" ) {
52325 if ( selector[ 0 ] === "<" &&
52326 selector[ selector.length - 1 ] === ">" &&
52327 selector.length >= 3 ) {
52328
52329 // Assume that strings that start and end with <> are HTML and skip the regex check
52330 match = [ null, selector, null ];
52331
52332 } else {
52333 match = rquickExpr.exec( selector );
52334 }
52335
52336 // Match html or make sure no context is specified for #id
52337 if ( match && ( match[ 1 ] || !context ) ) {
52338
52339 // HANDLE: $(html) -> $(array)
52340 if ( match[ 1 ] ) {
52341 context = context instanceof jQuery ? context[ 0 ] : context;
52342
52343 // Option to run scripts is true for back-compat
52344 // Intentionally let the error be thrown if parseHTML is not present
52345 jQuery.merge( this, jQuery.parseHTML(
52346 match[ 1 ],
52347 context && context.nodeType ? context.ownerDocument || context : document,
52348 true
52349 ) );
52350
52351 // HANDLE: $(html, props)
52352 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
52353 for ( match in context ) {
52354
52355 // Properties of context are called as methods if possible
52356 if ( jQuery.isFunction( this[ match ] ) ) {
52357 this[ match ]( context[ match ] );
52358
52359 // ...and otherwise set as attributes
52360 } else {
52361 this.attr( match, context[ match ] );
52362 }
52363 }
52364 }
52365
52366 return this;
52367
52368 // HANDLE: $(#id)
52369 } else {
52370 elem = document.getElementById( match[ 2 ] );
52371
52372 // Support: Blackberry 4.6
52373 // gEBID returns nodes no longer in the document (#6963)
52374 if ( elem && elem.parentNode ) {
52375
52376 // Inject the element directly into the jQuery object
52377 this.length = 1;
52378 this[ 0 ] = elem;
52379 }
52380
52381 this.context = document;
52382 this.selector = selector;
52383 return this;
52384 }
52385
52386 // HANDLE: $(expr, $(...))
52387 } else if ( !context || context.jquery ) {
52388 return ( context || root ).find( selector );
52389
52390 // HANDLE: $(expr, context)
52391 // (which is just equivalent to: $(context).find(expr)
52392 } else {
52393 return this.constructor( context ).find( selector );
52394 }
52395
52396 // HANDLE: $(DOMElement)
52397 } else if ( selector.nodeType ) {
52398 this.context = this[ 0 ] = selector;
52399 this.length = 1;
52400 return this;
52401
52402 // HANDLE: $(function)
52403 // Shortcut for document ready
52404 } else if ( jQuery.isFunction( selector ) ) {
52405 return root.ready !== undefined ?
52406 root.ready( selector ) :
52407
52408 // Execute immediately if ready is not present
52409 selector( jQuery );
52410 }
52411
52412 if ( selector.selector !== undefined ) {
52413 this.selector = selector.selector;
52414 this.context = selector.context;
52415 }
52416
52417 return jQuery.makeArray( selector, this );
52418 };
52419
52420 // Give the init function the jQuery prototype for later instantiation
52421 init.prototype = jQuery.fn;
52422
52423 // Initialize central reference
52424 rootjQuery = jQuery( document );
52425
52426
52427 var rparentsprev = /^(?:parents|prev(?:Until|All))/,
52428
52429 // Methods guaranteed to produce a unique set when starting from a unique set
52430 guaranteedUnique = {
52431 children: true,
52432 contents: true,
52433 next: true,
52434 prev: true
52435 };
52436
52437 jQuery.fn.extend( {
52438 has: function( target ) {
52439 var targets = jQuery( target, this ),
52440 l = targets.length;
52441
52442 return this.filter( function() {
52443 var i = 0;
52444 for ( ; i < l; i++ ) {
52445 if ( jQuery.contains( this, targets[ i ] ) ) {
52446 return true;
52447 }
52448 }
52449 } );
52450 },
52451
52452 closest: function( selectors, context ) {
52453 var cur,
52454 i = 0,
52455 l = this.length,
52456 matched = [],
52457 pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
52458 jQuery( selectors, context || this.context ) :
52459 0;
52460
52461 for ( ; i < l; i++ ) {
52462 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
52463
52464 // Always skip document fragments
52465 if ( cur.nodeType < 11 && ( pos ?
52466 pos.index( cur ) > -1 :
52467
52468 // Don't pass non-elements to Sizzle
52469 cur.nodeType === 1 &&
52470 jQuery.find.matchesSelector( cur, selectors ) ) ) {
52471
52472 matched.push( cur );
52473 break;
52474 }
52475 }
52476 }
52477
52478 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
52479 },
52480
52481 // Determine the position of an element within the set
52482 index: function( elem ) {
52483
52484 // No argument, return index in parent
52485 if ( !elem ) {
52486 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
52487 }
52488
52489 // Index in selector
52490 if ( typeof elem === "string" ) {
52491 return indexOf.call( jQuery( elem ), this[ 0 ] );
52492 }
52493
52494 // Locate the position of the desired element
52495 return indexOf.call( this,
52496
52497 // If it receives a jQuery object, the first element is used
52498 elem.jquery ? elem[ 0 ] : elem
52499 );
52500 },
52501
52502 add: function( selector, context ) {
52503 return this.pushStack(
52504 jQuery.uniqueSort(
52505 jQuery.merge( this.get(), jQuery( selector, context ) )
52506 )
52507 );
52508 },
52509
52510 addBack: function( selector ) {
52511 return this.add( selector == null ?
52512 this.prevObject : this.prevObject.filter( selector )
52513 );
52514 }
52515 } );
52516
52517 function sibling( cur, dir ) {
52518 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
52519 return cur;
52520 }
52521
52522 jQuery.each( {
52523 parent: function( elem ) {
52524 var parent = elem.parentNode;
52525 return parent && parent.nodeType !== 11 ? parent : null;
52526 },
52527 parents: function( elem ) {
52528 return dir( elem, "parentNode" );
52529 },
52530 parentsUntil: function( elem, i, until ) {
52531 return dir( elem, "parentNode", until );
52532 },
52533 next: function( elem ) {
52534 return sibling( elem, "nextSibling" );
52535 },
52536 prev: function( elem ) {
52537 return sibling( elem, "previousSibling" );
52538 },
52539 nextAll: function( elem ) {
52540 return dir( elem, "nextSibling" );
52541 },
52542 prevAll: function( elem ) {
52543 return dir( elem, "previousSibling" );
52544 },
52545 nextUntil: function( elem, i, until ) {
52546 return dir( elem, "nextSibling", until );
52547 },
52548 prevUntil: function( elem, i, until ) {
52549 return dir( elem, "previousSibling", until );
52550 },
52551 siblings: function( elem ) {
52552 return siblings( ( elem.parentNode || {} ).firstChild, elem );
52553 },
52554 children: function( elem ) {
52555 return siblings( elem.firstChild );
52556 },
52557 contents: function( elem ) {
52558 return elem.contentDocument || jQuery.merge( [], elem.childNodes );
52559 }
52560 }, function( name, fn ) {
52561 jQuery.fn[ name ] = function( until, selector ) {
52562 var matched = jQuery.map( this, fn, until );
52563
52564 if ( name.slice( -5 ) !== "Until" ) {
52565 selector = until;
52566 }
52567
52568 if ( selector && typeof selector === "string" ) {
52569 matched = jQuery.filter( selector, matched );
52570 }
52571
52572 if ( this.length > 1 ) {
52573
52574 // Remove duplicates
52575 if ( !guaranteedUnique[ name ] ) {
52576 jQuery.uniqueSort( matched );
52577 }
52578
52579 // Reverse order for parents* and prev-derivatives
52580 if ( rparentsprev.test( name ) ) {
52581 matched.reverse();
52582 }
52583 }
52584
52585 return this.pushStack( matched );
52586 };
52587 } );
52588 var rnotwhite = ( /\S+/g );
52589
52590
52591
52592 // Convert String-formatted options into Object-formatted ones
52593 function createOptions( options ) {
52594 var object = {};
52595 jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
52596 object[ flag ] = true;
52597 } );
52598 return object;
52599 }
52600
52601 /*
52602 * Create a callback list using the following parameters:
52603 *
52604 * options: an optional list of space-separated options that will change how
52605 * the callback list behaves or a more traditional option object
52606 *
52607 * By default a callback list will act like an event callback list and can be
52608 * "fired" multiple times.
52609 *
52610 * Possible options:
52611 *
52612 * once: will ensure the callback list can only be fired once (like a Deferred)
52613 *
52614 * memory: will keep track of previous values and will call any callback added
52615 * after the list has been fired right away with the latest "memorized"
52616 * values (like a Deferred)
52617 *
52618 * unique: will ensure a callback can only be added once (no duplicate in the list)
52619 *
52620 * stopOnFalse: interrupt callings when a callback returns false
52621 *
52622 */
52623 jQuery.Callbacks = function( options ) {
52624
52625 // Convert options from String-formatted to Object-formatted if needed
52626 // (we check in cache first)
52627 options = typeof options === "string" ?
52628 createOptions( options ) :
52629 jQuery.extend( {}, options );
52630
52631 var // Flag to know if list is currently firing
52632 firing,
52633
52634 // Last fire value for non-forgettable lists
52635 memory,
52636
52637 // Flag to know if list was already fired
52638 fired,
52639
52640 // Flag to prevent firing
52641 locked,
52642
52643 // Actual callback list
52644 list = [],
52645
52646 // Queue of execution data for repeatable lists
52647 queue = [],
52648
52649 // Index of currently firing callback (modified by add/remove as needed)
52650 firingIndex = -1,
52651
52652 // Fire callbacks
52653 fire = function() {
52654
52655 // Enforce single-firing
52656 locked = options.once;
52657
52658 // Execute callbacks for all pending executions,
52659 // respecting firingIndex overrides and runtime changes
52660 fired = firing = true;
52661 for ( ; queue.length; firingIndex = -1 ) {
52662 memory = queue.shift();
52663 while ( ++firingIndex < list.length ) {
52664
52665 // Run callback and check for early termination
52666 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
52667 options.stopOnFalse ) {
52668
52669 // Jump to end and forget the data so .add doesn't re-fire
52670 firingIndex = list.length;
52671 memory = false;
52672 }
52673 }
52674 }
52675
52676 // Forget the data if we're done with it
52677 if ( !options.memory ) {
52678 memory = false;
52679 }
52680
52681 firing = false;
52682
52683 // Clean up if we're done firing for good
52684 if ( locked ) {
52685
52686 // Keep an empty list if we have data for future add calls
52687 if ( memory ) {
52688 list = [];
52689
52690 // Otherwise, this object is spent
52691 } else {
52692 list = "";
52693 }
52694 }
52695 },
52696
52697 // Actual Callbacks object
52698 self = {
52699
52700 // Add a callback or a collection of callbacks to the list
52701 add: function() {
52702 if ( list ) {
52703
52704 // If we have memory from a past run, we should fire after adding
52705 if ( memory && !firing ) {
52706 firingIndex = list.length - 1;
52707 queue.push( memory );
52708 }
52709
52710 ( function add( args ) {
52711 jQuery.each( args, function( _, arg ) {
52712 if ( jQuery.isFunction( arg ) ) {
52713 if ( !options.unique || !self.has( arg ) ) {
52714 list.push( arg );
52715 }
52716 } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
52717
52718 // Inspect recursively
52719 add( arg );
52720 }
52721 } );
52722 } )( arguments );
52723
52724 if ( memory && !firing ) {
52725 fire();
52726 }
52727 }
52728 return this;
52729 },
52730
52731 // Remove a callback from the list
52732 remove: function() {
52733 jQuery.each( arguments, function( _, arg ) {
52734 var index;
52735 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
52736 list.splice( index, 1 );
52737
52738 // Handle firing indexes
52739 if ( index <= firingIndex ) {
52740 firingIndex--;
52741 }
52742 }
52743 } );
52744 return this;
52745 },
52746
52747 // Check if a given callback is in the list.
52748 // If no argument is given, return whether or not list has callbacks attached.
52749 has: function( fn ) {
52750 return fn ?
52751 jQuery.inArray( fn, list ) > -1 :
52752 list.length > 0;
52753 },
52754
52755 // Remove all callbacks from the list
52756 empty: function() {
52757 if ( list ) {
52758 list = [];
52759 }
52760 return this;
52761 },
52762
52763 // Disable .fire and .add
52764 // Abort any current/pending executions
52765 // Clear all callbacks and values
52766 disable: function() {
52767 locked = queue = [];
52768 list = memory = "";
52769 return this;
52770 },
52771 disabled: function() {
52772 return !list;
52773 },
52774
52775 // Disable .fire
52776 // Also disable .add unless we have memory (since it would have no effect)
52777 // Abort any pending executions
52778 lock: function() {
52779 locked = queue = [];
52780 if ( !memory ) {
52781 list = memory = "";
52782 }
52783 return this;
52784 },
52785 locked: function() {
52786 return !!locked;
52787 },
52788
52789 // Call all callbacks with the given context and arguments
52790 fireWith: function( context, args ) {
52791 if ( !locked ) {
52792 args = args || [];
52793 args = [ context, args.slice ? args.slice() : args ];
52794 queue.push( args );
52795 if ( !firing ) {
52796 fire();
52797 }
52798 }
52799 return this;
52800 },
52801
52802 // Call all the callbacks with the given arguments
52803 fire: function() {
52804 self.fireWith( this, arguments );
52805 return this;
52806 },
52807
52808 // To know if the callbacks have already been called at least once
52809 fired: function() {
52810 return !!fired;
52811 }
52812 };
52813
52814 return self;
52815 };
52816
52817
52818 jQuery.extend( {
52819
52820 Deferred: function( func ) {
52821 var tuples = [
52822
52823 // action, add listener, listener list, final state
52824 [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
52825 [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
52826 [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
52827 ],
52828 state = "pending",
52829 promise = {
52830 state: function() {
52831 return state;
52832 },
52833 always: function() {
52834 deferred.done( arguments ).fail( arguments );
52835 return this;
52836 },
52837 then: function( /* fnDone, fnFail, fnProgress */ ) {
52838 var fns = arguments;
52839 return jQuery.Deferred( function( newDefer ) {
52840 jQuery.each( tuples, function( i, tuple ) {
52841 var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
52842
52843 // deferred[ done | fail | progress ] for forwarding actions to newDefer
52844 deferred[ tuple[ 1 ] ]( function() {
52845 var returned = fn && fn.apply( this, arguments );
52846 if ( returned && jQuery.isFunction( returned.promise ) ) {
52847 returned.promise()
52848 .progress( newDefer.notify )
52849 .done( newDefer.resolve )
52850 .fail( newDefer.reject );
52851 } else {
52852 newDefer[ tuple[ 0 ] + "With" ](
52853 this === promise ? newDefer.promise() : this,
52854 fn ? [ returned ] : arguments
52855 );
52856 }
52857 } );
52858 } );
52859 fns = null;
52860 } ).promise();
52861 },
52862
52863 // Get a promise for this deferred
52864 // If obj is provided, the promise aspect is added to the object
52865 promise: function( obj ) {
52866 return obj != null ? jQuery.extend( obj, promise ) : promise;
52867 }
52868 },
52869 deferred = {};
52870
52871 // Keep pipe for back-compat
52872 promise.pipe = promise.then;
52873
52874 // Add list-specific methods
52875 jQuery.each( tuples, function( i, tuple ) {
52876 var list = tuple[ 2 ],
52877 stateString = tuple[ 3 ];
52878
52879 // promise[ done | fail | progress ] = list.add
52880 promise[ tuple[ 1 ] ] = list.add;
52881
52882 // Handle state
52883 if ( stateString ) {
52884 list.add( function() {
52885
52886 // state = [ resolved | rejected ]
52887 state = stateString;
52888
52889 // [ reject_list | resolve_list ].disable; progress_list.lock
52890 }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
52891 }
52892
52893 // deferred[ resolve | reject | notify ]
52894 deferred[ tuple[ 0 ] ] = function() {
52895 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
52896 return this;
52897 };
52898 deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
52899 } );
52900
52901 // Make the deferred a promise
52902 promise.promise( deferred );
52903
52904 // Call given func if any
52905 if ( func ) {
52906 func.call( deferred, deferred );
52907 }
52908
52909 // All done!
52910 return deferred;
52911 },
52912
52913 // Deferred helper
52914 when: function( subordinate /* , ..., subordinateN */ ) {
52915 var i = 0,
52916 resolveValues = slice.call( arguments ),
52917 length = resolveValues.length,
52918
52919 // the count of uncompleted subordinates
52920 remaining = length !== 1 ||
52921 ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
52922
52923 // the master Deferred.
52924 // If resolveValues consist of only a single Deferred, just use that.
52925 deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
52926
52927 // Update function for both resolve and progress values
52928 updateFunc = function( i, contexts, values ) {
52929 return function( value ) {
52930 contexts[ i ] = this;
52931 values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
52932 if ( values === progressValues ) {
52933 deferred.notifyWith( contexts, values );
52934 } else if ( !( --remaining ) ) {
52935 deferred.resolveWith( contexts, values );
52936 }
52937 };
52938 },
52939
52940 progressValues, progressContexts, resolveContexts;
52941
52942 // Add listeners to Deferred subordinates; treat others as resolved
52943 if ( length > 1 ) {
52944 progressValues = new Array( length );
52945 progressContexts = new Array( length );
52946 resolveContexts = new Array( length );
52947 for ( ; i < length; i++ ) {
52948 if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
52949 resolveValues[ i ].promise()
52950 .progress( updateFunc( i, progressContexts, progressValues ) )
52951 .done( updateFunc( i, resolveContexts, resolveValues ) )
52952 .fail( deferred.reject );
52953 } else {
52954 --remaining;
52955 }
52956 }
52957 }
52958
52959 // If we're not waiting on anything, resolve the master
52960 if ( !remaining ) {
52961 deferred.resolveWith( resolveContexts, resolveValues );
52962 }
52963
52964 return deferred.promise();
52965 }
52966 } );
52967
52968
52969 // The deferred used on DOM ready
52970 var readyList;
52971
52972 jQuery.fn.ready = function( fn ) {
52973
52974 // Add the callback
52975 jQuery.ready.promise().done( fn );
52976
52977 return this;
52978 };
52979
52980 jQuery.extend( {
52981
52982 // Is the DOM ready to be used? Set to true once it occurs.
52983 isReady: false,
52984
52985 // A counter to track how many items to wait for before
52986 // the ready event fires. See #6781
52987 readyWait: 1,
52988
52989 // Hold (or release) the ready event
52990 holdReady: function( hold ) {
52991 if ( hold ) {
52992 jQuery.readyWait++;
52993 } else {
52994 jQuery.ready( true );
52995 }
52996 },
52997
52998 // Handle when the DOM is ready
52999 ready: function( wait ) {
53000
53001 // Abort if there are pending holds or we're already ready
53002 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
53003 return;
53004 }
53005
53006 // Remember that the DOM is ready
53007 jQuery.isReady = true;
53008
53009 // If a normal DOM Ready event fired, decrement, and wait if need be
53010 if ( wait !== true && --jQuery.readyWait > 0 ) {
53011 return;
53012 }
53013
53014 // If there are functions bound, to execute
53015 readyList.resolveWith( document, [ jQuery ] );
53016
53017 // Trigger any bound ready events
53018 if ( jQuery.fn.triggerHandler ) {
53019 jQuery( document ).triggerHandler( "ready" );
53020 jQuery( document ).off( "ready" );
53021 }
53022 }
53023 } );
53024
53025 /**
53026 * The ready event handler and self cleanup method
53027 */
53028 function completed() {
53029 document.removeEventListener( "DOMContentLoaded", completed );
53030 window.removeEventListener( "load", completed );
53031 jQuery.ready();
53032 }
53033
53034 jQuery.ready.promise = function( obj ) {
53035 if ( !readyList ) {
53036
53037 readyList = jQuery.Deferred();
53038
53039 // Catch cases where $(document).ready() is called
53040 // after the browser event has already occurred.
53041 // Support: IE9-10 only
53042 // Older IE sometimes signals "interactive" too soon
53043 if ( document.readyState === "complete" ||
53044 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
53045
53046 // Handle it asynchronously to allow scripts the opportunity to delay ready
53047 window.setTimeout( jQuery.ready );
53048
53049 } else {
53050
53051 // Use the handy event callback
53052 document.addEventListener( "DOMContentLoaded", completed );
53053
53054 // A fallback to window.onload, that will always work
53055 window.addEventListener( "load", completed );
53056 }
53057 }
53058 return readyList.promise( obj );
53059 };
53060
53061 // Kick off the DOM ready check even if the user does not
53062 jQuery.ready.promise();
53063
53064
53065
53066
53067 // Multifunctional method to get and set values of a collection
53068 // The value/s can optionally be executed if it's a function
53069 var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
53070 var i = 0,
53071 len = elems.length,
53072 bulk = key == null;
53073
53074 // Sets many values
53075 if ( jQuery.type( key ) === "object" ) {
53076 chainable = true;
53077 for ( i in key ) {
53078 access( elems, fn, i, key[ i ], true, emptyGet, raw );
53079 }
53080
53081 // Sets one value
53082 } else if ( value !== undefined ) {
53083 chainable = true;
53084
53085 if ( !jQuery.isFunction( value ) ) {
53086 raw = true;
53087 }
53088
53089 if ( bulk ) {
53090
53091 // Bulk operations run against the entire set
53092 if ( raw ) {
53093 fn.call( elems, value );
53094 fn = null;
53095
53096 // ...except when executing function values
53097 } else {
53098 bulk = fn;
53099 fn = function( elem, key, value ) {
53100 return bulk.call( jQuery( elem ), value );
53101 };
53102 }
53103 }
53104
53105 if ( fn ) {
53106 for ( ; i < len; i++ ) {
53107 fn(
53108 elems[ i ], key, raw ?
53109 value :
53110 value.call( elems[ i ], i, fn( elems[ i ], key ) )
53111 );
53112 }
53113 }
53114 }
53115
53116 return chainable ?
53117 elems :
53118
53119 // Gets
53120 bulk ?
53121 fn.call( elems ) :
53122 len ? fn( elems[ 0 ], key ) : emptyGet;
53123 };
53124 var acceptData = function( owner ) {
53125
53126 // Accepts only:
53127 // - Node
53128 // - Node.ELEMENT_NODE
53129 // - Node.DOCUMENT_NODE
53130 // - Object
53131 // - Any
53132 /* jshint -W018 */
53133 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
53134 };
53135
53136
53137
53138
53139 function Data() {
53140 this.expando = jQuery.expando + Data.uid++;
53141 }
53142
53143 Data.uid = 1;
53144
53145 Data.prototype = {
53146
53147 register: function( owner, initial ) {
53148 var value = initial || {};
53149
53150 // If it is a node unlikely to be stringify-ed or looped over
53151 // use plain assignment
53152 if ( owner.nodeType ) {
53153 owner[ this.expando ] = value;
53154
53155 // Otherwise secure it in a non-enumerable, non-writable property
53156 // configurability must be true to allow the property to be
53157 // deleted with the delete operator
53158 } else {
53159 Object.defineProperty( owner, this.expando, {
53160 value: value,
53161 writable: true,
53162 configurable: true
53163 } );
53164 }
53165 return owner[ this.expando ];
53166 },
53167 cache: function( owner ) {
53168
53169 // We can accept data for non-element nodes in modern browsers,
53170 // but we should not, see #8335.
53171 // Always return an empty object.
53172 if ( !acceptData( owner ) ) {
53173 return {};
53174 }
53175
53176 // Check if the owner object already has a cache
53177 var value = owner[ this.expando ];
53178
53179 // If not, create one
53180 if ( !value ) {
53181 value = {};
53182
53183 // We can accept data for non-element nodes in modern browsers,
53184 // but we should not, see #8335.
53185 // Always return an empty object.
53186 if ( acceptData( owner ) ) {
53187
53188 // If it is a node unlikely to be stringify-ed or looped over
53189 // use plain assignment
53190 if ( owner.nodeType ) {
53191 owner[ this.expando ] = value;
53192
53193 // Otherwise secure it in a non-enumerable property
53194 // configurable must be true to allow the property to be
53195 // deleted when data is removed
53196 } else {
53197 Object.defineProperty( owner, this.expando, {
53198 value: value,
53199 configurable: true
53200 } );
53201 }
53202 }
53203 }
53204
53205 return value;
53206 },
53207 set: function( owner, data, value ) {
53208 var prop,
53209 cache = this.cache( owner );
53210
53211 // Handle: [ owner, key, value ] args
53212 if ( typeof data === "string" ) {
53213 cache[ data ] = value;
53214
53215 // Handle: [ owner, { properties } ] args
53216 } else {
53217
53218 // Copy the properties one-by-one to the cache object
53219 for ( prop in data ) {
53220 cache[ prop ] = data[ prop ];
53221 }
53222 }
53223 return cache;
53224 },
53225 get: function( owner, key ) {
53226 return key === undefined ?
53227 this.cache( owner ) :
53228 owner[ this.expando ] && owner[ this.expando ][ key ];
53229 },
53230 access: function( owner, key, value ) {
53231 var stored;
53232
53233 // In cases where either:
53234 //
53235 // 1. No key was specified
53236 // 2. A string key was specified, but no value provided
53237 //
53238 // Take the "read" path and allow the get method to determine
53239 // which value to return, respectively either:
53240 //
53241 // 1. The entire cache object
53242 // 2. The data stored at the key
53243 //
53244 if ( key === undefined ||
53245 ( ( key && typeof key === "string" ) && value === undefined ) ) {
53246
53247 stored = this.get( owner, key );
53248
53249 return stored !== undefined ?
53250 stored : this.get( owner, jQuery.camelCase( key ) );
53251 }
53252
53253 // When the key is not a string, or both a key and value
53254 // are specified, set or extend (existing objects) with either:
53255 //
53256 // 1. An object of properties
53257 // 2. A key and value
53258 //
53259 this.set( owner, key, value );
53260
53261 // Since the "set" path can have two possible entry points
53262 // return the expected data based on which path was taken[*]
53263 return value !== undefined ? value : key;
53264 },
53265 remove: function( owner, key ) {
53266 var i, name, camel,
53267 cache = owner[ this.expando ];
53268
53269 if ( cache === undefined ) {
53270 return;
53271 }
53272
53273 if ( key === undefined ) {
53274 this.register( owner );
53275
53276 } else {
53277
53278 // Support array or space separated string of keys
53279 if ( jQuery.isArray( key ) ) {
53280
53281 // If "name" is an array of keys...
53282 // When data is initially created, via ("key", "val") signature,
53283 // keys will be converted to camelCase.
53284 // Since there is no way to tell _how_ a key was added, remove
53285 // both plain key and camelCase key. #12786
53286 // This will only penalize the array argument path.
53287 name = key.concat( key.map( jQuery.camelCase ) );
53288 } else {
53289 camel = jQuery.camelCase( key );
53290
53291 // Try the string as a key before any manipulation
53292 if ( key in cache ) {
53293 name = [ key, camel ];
53294 } else {
53295
53296 // If a key with the spaces exists, use it.
53297 // Otherwise, create an array by matching non-whitespace
53298 name = camel;
53299 name = name in cache ?
53300 [ name ] : ( name.match( rnotwhite ) || [] );
53301 }
53302 }
53303
53304 i = name.length;
53305
53306 while ( i-- ) {
53307 delete cache[ name[ i ] ];
53308 }
53309 }
53310
53311 // Remove the expando if there's no more data
53312 if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
53313
53314 // Support: Chrome <= 35-45+
53315 // Webkit & Blink performance suffers when deleting properties
53316 // from DOM nodes, so set to undefined instead
53317 // https://code.google.com/p/chromium/issues/detail?id=378607
53318 if ( owner.nodeType ) {
53319 owner[ this.expando ] = undefined;
53320 } else {
53321 delete owner[ this.expando ];
53322 }
53323 }
53324 },
53325 hasData: function( owner ) {
53326 var cache = owner[ this.expando ];
53327 return cache !== undefined && !jQuery.isEmptyObject( cache );
53328 }
53329 };
53330 var dataPriv = new Data();
53331
53332 var dataUser = new Data();
53333
53334
53335
53336 // Implementation Summary
53337 //
53338 // 1. Enforce API surface and semantic compatibility with 1.9.x branch
53339 // 2. Improve the module's maintainability by reducing the storage
53340 // paths to a single mechanism.
53341 // 3. Use the same single mechanism to support "private" and "user" data.
53342 // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
53343 // 5. Avoid exposing implementation details on user objects (eg. expando properties)
53344 // 6. Provide a clear path for implementation upgrade to WeakMap in 2014
53345
53346 var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
53347 rmultiDash = /[A-Z]/g;
53348
53349 function dataAttr( elem, key, data ) {
53350 var name;
53351
53352 // If nothing was found internally, try to fetch any
53353 // data from the HTML5 data-* attribute
53354 if ( data === undefined && elem.nodeType === 1 ) {
53355 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
53356 data = elem.getAttribute( name );
53357
53358 if ( typeof data === "string" ) {
53359 try {
53360 data = data === "true" ? true :
53361 data === "false" ? false :
53362 data === "null" ? null :
53363
53364 // Only convert to a number if it doesn't change the string
53365 +data + "" === data ? +data :
53366 rbrace.test( data ) ? jQuery.parseJSON( data ) :
53367 data;
53368 } catch ( e ) {}
53369
53370 // Make sure we set the data so it isn't changed later
53371 dataUser.set( elem, key, data );
53372 } else {
53373 data = undefined;
53374 }
53375 }
53376 return data;
53377 }
53378
53379 jQuery.extend( {
53380 hasData: function( elem ) {
53381 return dataUser.hasData( elem ) || dataPriv.hasData( elem );
53382 },
53383
53384 data: function( elem, name, data ) {
53385 return dataUser.access( elem, name, data );
53386 },
53387
53388 removeData: function( elem, name ) {
53389 dataUser.remove( elem, name );
53390 },
53391
53392 // TODO: Now that all calls to _data and _removeData have been replaced
53393 // with direct calls to dataPriv methods, these can be deprecated.
53394 _data: function( elem, name, data ) {
53395 return dataPriv.access( elem, name, data );
53396 },
53397
53398 _removeData: function( elem, name ) {
53399 dataPriv.remove( elem, name );
53400 }
53401 } );
53402
53403 jQuery.fn.extend( {
53404 data: function( key, value ) {
53405 var i, name, data,
53406 elem = this[ 0 ],
53407 attrs = elem && elem.attributes;
53408
53409 // Gets all values
53410 if ( key === undefined ) {
53411 if ( this.length ) {
53412 data = dataUser.get( elem );
53413
53414 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
53415 i = attrs.length;
53416 while ( i-- ) {
53417
53418 // Support: IE11+
53419 // The attrs elements can be null (#14894)
53420 if ( attrs[ i ] ) {
53421 name = attrs[ i ].name;
53422 if ( name.indexOf( "data-" ) === 0 ) {
53423 name = jQuery.camelCase( name.slice( 5 ) );
53424 dataAttr( elem, name, data[ name ] );
53425 }
53426 }
53427 }
53428 dataPriv.set( elem, "hasDataAttrs", true );
53429 }
53430 }
53431
53432 return data;
53433 }
53434
53435 // Sets multiple values
53436 if ( typeof key === "object" ) {
53437 return this.each( function() {
53438 dataUser.set( this, key );
53439 } );
53440 }
53441
53442 return access( this, function( value ) {
53443 var data, camelKey;
53444
53445 // The calling jQuery object (element matches) is not empty
53446 // (and therefore has an element appears at this[ 0 ]) and the
53447 // `value` parameter was not undefined. An empty jQuery object
53448 // will result in `undefined` for elem = this[ 0 ] which will
53449 // throw an exception if an attempt to read a data cache is made.
53450 if ( elem && value === undefined ) {
53451
53452 // Attempt to get data from the cache
53453 // with the key as-is
53454 data = dataUser.get( elem, key ) ||
53455
53456 // Try to find dashed key if it exists (gh-2779)
53457 // This is for 2.2.x only
53458 dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
53459
53460 if ( data !== undefined ) {
53461 return data;
53462 }
53463
53464 camelKey = jQuery.camelCase( key );
53465
53466 // Attempt to get data from the cache
53467 // with the key camelized
53468 data = dataUser.get( elem, camelKey );
53469 if ( data !== undefined ) {
53470 return data;
53471 }
53472
53473 // Attempt to "discover" the data in
53474 // HTML5 custom data-* attrs
53475 data = dataAttr( elem, camelKey, undefined );
53476 if ( data !== undefined ) {
53477 return data;
53478 }
53479
53480 // We tried really hard, but the data doesn't exist.
53481 return;
53482 }
53483
53484 // Set the data...
53485 camelKey = jQuery.camelCase( key );
53486 this.each( function() {
53487
53488 // First, attempt to store a copy or reference of any
53489 // data that might've been store with a camelCased key.
53490 var data = dataUser.get( this, camelKey );
53491
53492 // For HTML5 data-* attribute interop, we have to
53493 // store property names with dashes in a camelCase form.
53494 // This might not apply to all properties...*
53495 dataUser.set( this, camelKey, value );
53496
53497 // *... In the case of properties that might _actually_
53498 // have dashes, we need to also store a copy of that
53499 // unchanged property.
53500 if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
53501 dataUser.set( this, key, value );
53502 }
53503 } );
53504 }, null, value, arguments.length > 1, null, true );
53505 },
53506
53507 removeData: function( key ) {
53508 return this.each( function() {
53509 dataUser.remove( this, key );
53510 } );
53511 }
53512 } );
53513
53514
53515 jQuery.extend( {
53516 queue: function( elem, type, data ) {
53517 var queue;
53518
53519 if ( elem ) {
53520 type = ( type || "fx" ) + "queue";
53521 queue = dataPriv.get( elem, type );
53522
53523 // Speed up dequeue by getting out quickly if this is just a lookup
53524 if ( data ) {
53525 if ( !queue || jQuery.isArray( data ) ) {
53526 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
53527 } else {
53528 queue.push( data );
53529 }
53530 }
53531 return queue || [];
53532 }
53533 },
53534
53535 dequeue: function( elem, type ) {
53536 type = type || "fx";
53537
53538 var queue = jQuery.queue( elem, type ),
53539 startLength = queue.length,
53540 fn = queue.shift(),
53541 hooks = jQuery._queueHooks( elem, type ),
53542 next = function() {
53543 jQuery.dequeue( elem, type );
53544 };
53545
53546 // If the fx queue is dequeued, always remove the progress sentinel
53547 if ( fn === "inprogress" ) {
53548 fn = queue.shift();
53549 startLength--;
53550 }
53551
53552 if ( fn ) {
53553
53554 // Add a progress sentinel to prevent the fx queue from being
53555 // automatically dequeued
53556 if ( type === "fx" ) {
53557 queue.unshift( "inprogress" );
53558 }
53559
53560 // Clear up the last queue stop function
53561 delete hooks.stop;
53562 fn.call( elem, next, hooks );
53563 }
53564
53565 if ( !startLength && hooks ) {
53566 hooks.empty.fire();
53567 }
53568 },
53569
53570 // Not public - generate a queueHooks object, or return the current one
53571 _queueHooks: function( elem, type ) {
53572 var key = type + "queueHooks";
53573 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
53574 empty: jQuery.Callbacks( "once memory" ).add( function() {
53575 dataPriv.remove( elem, [ type + "queue", key ] );
53576 } )
53577 } );
53578 }
53579 } );
53580
53581 jQuery.fn.extend( {
53582 queue: function( type, data ) {
53583 var setter = 2;
53584
53585 if ( typeof type !== "string" ) {
53586 data = type;
53587 type = "fx";
53588 setter--;
53589 }
53590
53591 if ( arguments.length < setter ) {
53592 return jQuery.queue( this[ 0 ], type );
53593 }
53594
53595 return data === undefined ?
53596 this :
53597 this.each( function() {
53598 var queue = jQuery.queue( this, type, data );
53599
53600 // Ensure a hooks for this queue
53601 jQuery._queueHooks( this, type );
53602
53603 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
53604 jQuery.dequeue( this, type );
53605 }
53606 } );
53607 },
53608 dequeue: function( type ) {
53609 return this.each( function() {
53610 jQuery.dequeue( this, type );
53611 } );
53612 },
53613 clearQueue: function( type ) {
53614 return this.queue( type || "fx", [] );
53615 },
53616
53617 // Get a promise resolved when queues of a certain type
53618 // are emptied (fx is the type by default)
53619 promise: function( type, obj ) {
53620 var tmp,
53621 count = 1,
53622 defer = jQuery.Deferred(),
53623 elements = this,
53624 i = this.length,
53625 resolve = function() {
53626 if ( !( --count ) ) {
53627 defer.resolveWith( elements, [ elements ] );
53628 }
53629 };
53630
53631 if ( typeof type !== "string" ) {
53632 obj = type;
53633 type = undefined;
53634 }
53635 type = type || "fx";
53636
53637 while ( i-- ) {
53638 tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
53639 if ( tmp && tmp.empty ) {
53640 count++;
53641 tmp.empty.add( resolve );
53642 }
53643 }
53644 resolve();
53645 return defer.promise( obj );
53646 }
53647 } );
53648 var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
53649
53650 var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
53651
53652
53653 var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
53654
53655 var isHidden = function( elem, el ) {
53656
53657 // isHidden might be called from jQuery#filter function;
53658 // in that case, element will be second argument
53659 elem = el || elem;
53660 return jQuery.css( elem, "display" ) === "none" ||
53661 !jQuery.contains( elem.ownerDocument, elem );
53662 };
53663
53664
53665
53666 function adjustCSS( elem, prop, valueParts, tween ) {
53667 var adjusted,
53668 scale = 1,
53669 maxIterations = 20,
53670 currentValue = tween ?
53671 function() { return tween.cur(); } :
53672 function() { return jQuery.css( elem, prop, "" ); },
53673 initial = currentValue(),
53674 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
53675
53676 // Starting value computation is required for potential unit mismatches
53677 initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
53678 rcssNum.exec( jQuery.css( elem, prop ) );
53679
53680 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
53681
53682 // Trust units reported by jQuery.css
53683 unit = unit || initialInUnit[ 3 ];
53684
53685 // Make sure we update the tween properties later on
53686 valueParts = valueParts || [];
53687
53688 // Iteratively approximate from a nonzero starting point
53689 initialInUnit = +initial || 1;
53690
53691 do {
53692
53693 // If previous iteration zeroed out, double until we get *something*.
53694 // Use string for doubling so we don't accidentally see scale as unchanged below
53695 scale = scale || ".5";
53696
53697 // Adjust and apply
53698 initialInUnit = initialInUnit / scale;
53699 jQuery.style( elem, prop, initialInUnit + unit );
53700
53701 // Update scale, tolerating zero or NaN from tween.cur()
53702 // Break the loop if scale is unchanged or perfect, or if we've just had enough.
53703 } while (
53704 scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
53705 );
53706 }
53707
53708 if ( valueParts ) {
53709 initialInUnit = +initialInUnit || +initial || 0;
53710
53711 // Apply relative offset (+=/-=) if specified
53712 adjusted = valueParts[ 1 ] ?
53713 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
53714 +valueParts[ 2 ];
53715 if ( tween ) {
53716 tween.unit = unit;
53717 tween.start = initialInUnit;
53718 tween.end = adjusted;
53719 }
53720 }
53721 return adjusted;
53722 }
53723 var rcheckableType = ( /^(?:checkbox|radio)$/i );
53724
53725 var rtagName = ( /<([\w:-]+)/ );
53726
53727 var rscriptType = ( /^$|\/(?:java|ecma)script/i );
53728
53729
53730
53731 // We have to close these tags to support XHTML (#13200)
53732 var wrapMap = {
53733
53734 // Support: IE9
53735 option: [ 1, "<select multiple='multiple'>", "</select>" ],
53736
53737 // XHTML parsers do not magically insert elements in the
53738 // same way that tag soup parsers do. So we cannot shorten
53739 // this by omitting <tbody> or other required elements.
53740 thead: [ 1, "<table>", "</table>" ],
53741 col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
53742 tr: [ 2, "<table><tbody>", "</tbody></table>" ],
53743 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
53744
53745 _default: [ 0, "", "" ]
53746 };
53747
53748 // Support: IE9
53749 wrapMap.optgroup = wrapMap.option;
53750
53751 wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
53752 wrapMap.th = wrapMap.td;
53753
53754
53755 function getAll( context, tag ) {
53756
53757 // Support: IE9-11+
53758 // Use typeof to avoid zero-argument method invocation on host objects (#15151)
53759 var ret = typeof context.getElementsByTagName !== "undefined" ?
53760 context.getElementsByTagName( tag || "*" ) :
53761 typeof context.querySelectorAll !== "undefined" ?
53762 context.querySelectorAll( tag || "*" ) :
53763 [];
53764
53765 return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
53766 jQuery.merge( [ context ], ret ) :
53767 ret;
53768 }
53769
53770
53771 // Mark scripts as having already been evaluated
53772 function setGlobalEval( elems, refElements ) {
53773 var i = 0,
53774 l = elems.length;
53775
53776 for ( ; i < l; i++ ) {
53777 dataPriv.set(
53778 elems[ i ],
53779 "globalEval",
53780 !refElements || dataPriv.get( refElements[ i ], "globalEval" )
53781 );
53782 }
53783 }
53784
53785
53786 var rhtml = /<|&#?\w+;/;
53787
53788 function buildFragment( elems, context, scripts, selection, ignored ) {
53789 var elem, tmp, tag, wrap, contains, j,
53790 fragment = context.createDocumentFragment(),
53791 nodes = [],
53792 i = 0,
53793 l = elems.length;
53794
53795 for ( ; i < l; i++ ) {
53796 elem = elems[ i ];
53797
53798 if ( elem || elem === 0 ) {
53799
53800 // Add nodes directly
53801 if ( jQuery.type( elem ) === "object" ) {
53802
53803 // Support: Android<4.1, PhantomJS<2
53804 // push.apply(_, arraylike) throws on ancient WebKit
53805 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
53806
53807 // Convert non-html into a text node
53808 } else if ( !rhtml.test( elem ) ) {
53809 nodes.push( context.createTextNode( elem ) );
53810
53811 // Convert html into DOM nodes
53812 } else {
53813 tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
53814
53815 // Deserialize a standard representation
53816 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
53817 wrap = wrapMap[ tag ] || wrapMap._default;
53818 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
53819
53820 // Descend through wrappers to the right content
53821 j = wrap[ 0 ];
53822 while ( j-- ) {
53823 tmp = tmp.lastChild;
53824 }
53825
53826 // Support: Android<4.1, PhantomJS<2
53827 // push.apply(_, arraylike) throws on ancient WebKit
53828 jQuery.merge( nodes, tmp.childNodes );
53829
53830 // Remember the top-level container
53831 tmp = fragment.firstChild;
53832
53833 // Ensure the created nodes are orphaned (#12392)
53834 tmp.textContent = "";
53835 }
53836 }
53837 }
53838
53839 // Remove wrapper from fragment
53840 fragment.textContent = "";
53841
53842 i = 0;
53843 while ( ( elem = nodes[ i++ ] ) ) {
53844
53845 // Skip elements already in the context collection (trac-4087)
53846 if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
53847 if ( ignored ) {
53848 ignored.push( elem );
53849 }
53850 continue;
53851 }
53852
53853 contains = jQuery.contains( elem.ownerDocument, elem );
53854
53855 // Append to fragment
53856 tmp = getAll( fragment.appendChild( elem ), "script" );
53857
53858 // Preserve script evaluation history
53859 if ( contains ) {
53860 setGlobalEval( tmp );
53861 }
53862
53863 // Capture executables
53864 if ( scripts ) {
53865 j = 0;
53866 while ( ( elem = tmp[ j++ ] ) ) {
53867 if ( rscriptType.test( elem.type || "" ) ) {
53868 scripts.push( elem );
53869 }
53870 }
53871 }
53872 }
53873
53874 return fragment;
53875 }
53876
53877
53878 ( function() {
53879 var fragment = document.createDocumentFragment(),
53880 div = fragment.appendChild( document.createElement( "div" ) ),
53881 input = document.createElement( "input" );
53882
53883 // Support: Android 4.0-4.3, Safari<=5.1
53884 // Check state lost if the name is set (#11217)
53885 // Support: Windows Web Apps (WWA)
53886 // `name` and `type` must use .setAttribute for WWA (#14901)
53887 input.setAttribute( "type", "radio" );
53888 input.setAttribute( "checked", "checked" );
53889 input.setAttribute( "name", "t" );
53890
53891 div.appendChild( input );
53892
53893 // Support: Safari<=5.1, Android<4.2
53894 // Older WebKit doesn't clone checked state correctly in fragments
53895 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
53896
53897 // Support: IE<=11+
53898 // Make sure textarea (and checkbox) defaultValue is properly cloned
53899 div.innerHTML = "<textarea>x</textarea>";
53900 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
53901 } )();
53902
53903
53904 var
53905 rkeyEvent = /^key/,
53906 rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
53907 rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
53908
53909 function returnTrue() {
53910 return true;
53911 }
53912
53913 function returnFalse() {
53914 return false;
53915 }
53916
53917 // Support: IE9
53918 // See #13393 for more info
53919 function safeActiveElement() {
53920 try {
53921 return document.activeElement;
53922 } catch ( err ) { }
53923 }
53924
53925 function on( elem, types, selector, data, fn, one ) {
53926 var origFn, type;
53927
53928 // Types can be a map of types/handlers
53929 if ( typeof types === "object" ) {
53930
53931 // ( types-Object, selector, data )
53932 if ( typeof selector !== "string" ) {
53933
53934 // ( types-Object, data )
53935 data = data || selector;
53936 selector = undefined;
53937 }
53938 for ( type in types ) {
53939 on( elem, type, selector, data, types[ type ], one );
53940 }
53941 return elem;
53942 }
53943
53944 if ( data == null && fn == null ) {
53945
53946 // ( types, fn )
53947 fn = selector;
53948 data = selector = undefined;
53949 } else if ( fn == null ) {
53950 if ( typeof selector === "string" ) {
53951
53952 // ( types, selector, fn )
53953 fn = data;
53954 data = undefined;
53955 } else {
53956
53957 // ( types, data, fn )
53958 fn = data;
53959 data = selector;
53960 selector = undefined;
53961 }
53962 }
53963 if ( fn === false ) {
53964 fn = returnFalse;
53965 } else if ( !fn ) {
53966 return elem;
53967 }
53968
53969 if ( one === 1 ) {
53970 origFn = fn;
53971 fn = function( event ) {
53972
53973 // Can use an empty set, since event contains the info
53974 jQuery().off( event );
53975 return origFn.apply( this, arguments );
53976 };
53977
53978 // Use same guid so caller can remove using origFn
53979 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
53980 }
53981 return elem.each( function() {
53982 jQuery.event.add( this, types, fn, data, selector );
53983 } );
53984 }
53985
53986 /*
53987 * Helper functions for managing events -- not part of the public interface.
53988 * Props to Dean Edwards' addEvent library for many of the ideas.
53989 */
53990 jQuery.event = {
53991
53992 global: {},
53993
53994 add: function( elem, types, handler, data, selector ) {
53995
53996 var handleObjIn, eventHandle, tmp,
53997 events, t, handleObj,
53998 special, handlers, type, namespaces, origType,
53999 elemData = dataPriv.get( elem );
54000
54001 // Don't attach events to noData or text/comment nodes (but allow plain objects)
54002 if ( !elemData ) {
54003 return;
54004 }
54005
54006 // Caller can pass in an object of custom data in lieu of the handler
54007 if ( handler.handler ) {
54008 handleObjIn = handler;
54009 handler = handleObjIn.handler;
54010 selector = handleObjIn.selector;
54011 }
54012
54013 // Make sure that the handler has a unique ID, used to find/remove it later
54014 if ( !handler.guid ) {
54015 handler.guid = jQuery.guid++;
54016 }
54017
54018 // Init the element's event structure and main handler, if this is the first
54019 if ( !( events = elemData.events ) ) {
54020 events = elemData.events = {};
54021 }
54022 if ( !( eventHandle = elemData.handle ) ) {
54023 eventHandle = elemData.handle = function( e ) {
54024
54025 // Discard the second event of a jQuery.event.trigger() and
54026 // when an event is called after a page has unloaded
54027 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
54028 jQuery.event.dispatch.apply( elem, arguments ) : undefined;
54029 };
54030 }
54031
54032 // Handle multiple events separated by a space
54033 types = ( types || "" ).match( rnotwhite ) || [ "" ];
54034 t = types.length;
54035 while ( t-- ) {
54036 tmp = rtypenamespace.exec( types[ t ] ) || [];
54037 type = origType = tmp[ 1 ];
54038 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
54039
54040 // There *must* be a type, no attaching namespace-only handlers
54041 if ( !type ) {
54042 continue;
54043 }
54044
54045 // If event changes its type, use the special event handlers for the changed type
54046 special = jQuery.event.special[ type ] || {};
54047
54048 // If selector defined, determine special event api type, otherwise given type
54049 type = ( selector ? special.delegateType : special.bindType ) || type;
54050
54051 // Update special based on newly reset type
54052 special = jQuery.event.special[ type ] || {};
54053
54054 // handleObj is passed to all event handlers
54055 handleObj = jQuery.extend( {
54056 type: type,
54057 origType: origType,
54058 data: data,
54059 handler: handler,
54060 guid: handler.guid,
54061 selector: selector,
54062 needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
54063 namespace: namespaces.join( "." )
54064 }, handleObjIn );
54065
54066 // Init the event handler queue if we're the first
54067 if ( !( handlers = events[ type ] ) ) {
54068 handlers = events[ type ] = [];
54069 handlers.delegateCount = 0;
54070
54071 // Only use addEventListener if the special events handler returns false
54072 if ( !special.setup ||
54073 special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
54074
54075 if ( elem.addEventListener ) {
54076 elem.addEventListener( type, eventHandle );
54077 }
54078 }
54079 }
54080
54081 if ( special.add ) {
54082 special.add.call( elem, handleObj );
54083
54084 if ( !handleObj.handler.guid ) {
54085 handleObj.handler.guid = handler.guid;
54086 }
54087 }
54088
54089 // Add to the element's handler list, delegates in front
54090 if ( selector ) {
54091 handlers.splice( handlers.delegateCount++, 0, handleObj );
54092 } else {
54093 handlers.push( handleObj );
54094 }
54095
54096 // Keep track of which events have ever been used, for event optimization
54097 jQuery.event.global[ type ] = true;
54098 }
54099
54100 },
54101
54102 // Detach an event or set of events from an element
54103 remove: function( elem, types, handler, selector, mappedTypes ) {
54104
54105 var j, origCount, tmp,
54106 events, t, handleObj,
54107 special, handlers, type, namespaces, origType,
54108 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
54109
54110 if ( !elemData || !( events = elemData.events ) ) {
54111 return;
54112 }
54113
54114 // Once for each type.namespace in types; type may be omitted
54115 types = ( types || "" ).match( rnotwhite ) || [ "" ];
54116 t = types.length;
54117 while ( t-- ) {
54118 tmp = rtypenamespace.exec( types[ t ] ) || [];
54119 type = origType = tmp[ 1 ];
54120 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
54121
54122 // Unbind all events (on this namespace, if provided) for the element
54123 if ( !type ) {
54124 for ( type in events ) {
54125 jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
54126 }
54127 continue;
54128 }
54129
54130 special = jQuery.event.special[ type ] || {};
54131 type = ( selector ? special.delegateType : special.bindType ) || type;
54132 handlers = events[ type ] || [];
54133 tmp = tmp[ 2 ] &&
54134 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
54135
54136 // Remove matching events
54137 origCount = j = handlers.length;
54138 while ( j-- ) {
54139 handleObj = handlers[ j ];
54140
54141 if ( ( mappedTypes || origType === handleObj.origType ) &&
54142 ( !handler || handler.guid === handleObj.guid ) &&
54143 ( !tmp || tmp.test( handleObj.namespace ) ) &&
54144 ( !selector || selector === handleObj.selector ||
54145 selector === "**" && handleObj.selector ) ) {
54146 handlers.splice( j, 1 );
54147
54148 if ( handleObj.selector ) {
54149 handlers.delegateCount--;
54150 }
54151 if ( special.remove ) {
54152 special.remove.call( elem, handleObj );
54153 }
54154 }
54155 }
54156
54157 // Remove generic event handler if we removed something and no more handlers exist
54158 // (avoids potential for endless recursion during removal of special event handlers)
54159 if ( origCount && !handlers.length ) {
54160 if ( !special.teardown ||
54161 special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
54162
54163 jQuery.removeEvent( elem, type, elemData.handle );
54164 }
54165
54166 delete events[ type ];
54167 }
54168 }
54169
54170 // Remove data and the expando if it's no longer used
54171 if ( jQuery.isEmptyObject( events ) ) {
54172 dataPriv.remove( elem, "handle events" );
54173 }
54174 },
54175
54176 dispatch: function( event ) {
54177
54178 // Make a writable jQuery.Event from the native event object
54179 event = jQuery.event.fix( event );
54180
54181 var i, j, ret, matched, handleObj,
54182 handlerQueue = [],
54183 args = slice.call( arguments ),
54184 handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
54185 special = jQuery.event.special[ event.type ] || {};
54186
54187 // Use the fix-ed jQuery.Event rather than the (read-only) native event
54188 args[ 0 ] = event;
54189 event.delegateTarget = this;
54190
54191 // Call the preDispatch hook for the mapped type, and let it bail if desired
54192 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
54193 return;
54194 }
54195
54196 // Determine handlers
54197 handlerQueue = jQuery.event.handlers.call( this, event, handlers );
54198
54199 // Run delegates first; they may want to stop propagation beneath us
54200 i = 0;
54201 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
54202 event.currentTarget = matched.elem;
54203
54204 j = 0;
54205 while ( ( handleObj = matched.handlers[ j++ ] ) &&
54206 !event.isImmediatePropagationStopped() ) {
54207
54208 // Triggered event must either 1) have no namespace, or 2) have namespace(s)
54209 // a subset or equal to those in the bound event (both can have no namespace).
54210 if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
54211
54212 event.handleObj = handleObj;
54213 event.data = handleObj.data;
54214
54215 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
54216 handleObj.handler ).apply( matched.elem, args );
54217
54218 if ( ret !== undefined ) {
54219 if ( ( event.result = ret ) === false ) {
54220 event.preventDefault();
54221 event.stopPropagation();
54222 }
54223 }
54224 }
54225 }
54226 }
54227
54228 // Call the postDispatch hook for the mapped type
54229 if ( special.postDispatch ) {
54230 special.postDispatch.call( this, event );
54231 }
54232
54233 return event.result;
54234 },
54235
54236 handlers: function( event, handlers ) {
54237 var i, matches, sel, handleObj,
54238 handlerQueue = [],
54239 delegateCount = handlers.delegateCount,
54240 cur = event.target;
54241
54242 // Support (at least): Chrome, IE9
54243 // Find delegate handlers
54244 // Black-hole SVG <use> instance trees (#13180)
54245 //
54246 // Support: Firefox<=42+
54247 // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
54248 if ( delegateCount && cur.nodeType &&
54249 ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
54250
54251 for ( ; cur !== this; cur = cur.parentNode || this ) {
54252
54253 // Don't check non-elements (#13208)
54254 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
54255 if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
54256 matches = [];
54257 for ( i = 0; i < delegateCount; i++ ) {
54258 handleObj = handlers[ i ];
54259
54260 // Don't conflict with Object.prototype properties (#13203)
54261 sel = handleObj.selector + " ";
54262
54263 if ( matches[ sel ] === undefined ) {
54264 matches[ sel ] = handleObj.needsContext ?
54265 jQuery( sel, this ).index( cur ) > -1 :
54266 jQuery.find( sel, this, null, [ cur ] ).length;
54267 }
54268 if ( matches[ sel ] ) {
54269 matches.push( handleObj );
54270 }
54271 }
54272 if ( matches.length ) {
54273 handlerQueue.push( { elem: cur, handlers: matches } );
54274 }
54275 }
54276 }
54277 }
54278
54279 // Add the remaining (directly-bound) handlers
54280 if ( delegateCount < handlers.length ) {
54281 handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
54282 }
54283
54284 return handlerQueue;
54285 },
54286
54287 // Includes some event props shared by KeyEvent and MouseEvent
54288 props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
54289 "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
54290
54291 fixHooks: {},
54292
54293 keyHooks: {
54294 props: "char charCode key keyCode".split( " " ),
54295 filter: function( event, original ) {
54296
54297 // Add which for key events
54298 if ( event.which == null ) {
54299 event.which = original.charCode != null ? original.charCode : original.keyCode;
54300 }
54301
54302 return event;
54303 }
54304 },
54305
54306 mouseHooks: {
54307 props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
54308 "screenX screenY toElement" ).split( " " ),
54309 filter: function( event, original ) {
54310 var eventDoc, doc, body,
54311 button = original.button;
54312
54313 // Calculate pageX/Y if missing and clientX/Y available
54314 if ( event.pageX == null && original.clientX != null ) {
54315 eventDoc = event.target.ownerDocument || document;
54316 doc = eventDoc.documentElement;
54317 body = eventDoc.body;
54318
54319 event.pageX = original.clientX +
54320 ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
54321 ( doc && doc.clientLeft || body && body.clientLeft || 0 );
54322 event.pageY = original.clientY +
54323 ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
54324 ( doc && doc.clientTop || body && body.clientTop || 0 );
54325 }
54326
54327 // Add which for click: 1 === left; 2 === middle; 3 === right
54328 // Note: button is not normalized, so don't use it
54329 if ( !event.which && button !== undefined ) {
54330 event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
54331 }
54332
54333 return event;
54334 }
54335 },
54336
54337 fix: function( event ) {
54338 if ( event[ jQuery.expando ] ) {
54339 return event;
54340 }
54341
54342 // Create a writable copy of the event object and normalize some properties
54343 var i, prop, copy,
54344 type = event.type,
54345 originalEvent = event,
54346 fixHook = this.fixHooks[ type ];
54347
54348 if ( !fixHook ) {
54349 this.fixHooks[ type ] = fixHook =
54350 rmouseEvent.test( type ) ? this.mouseHooks :
54351 rkeyEvent.test( type ) ? this.keyHooks :
54352 {};
54353 }
54354 copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
54355
54356 event = new jQuery.Event( originalEvent );
54357
54358 i = copy.length;
54359 while ( i-- ) {
54360 prop = copy[ i ];
54361 event[ prop ] = originalEvent[ prop ];
54362 }
54363
54364 // Support: Cordova 2.5 (WebKit) (#13255)
54365 // All events should have a target; Cordova deviceready doesn't
54366 if ( !event.target ) {
54367 event.target = document;
54368 }
54369
54370 // Support: Safari 6.0+, Chrome<28
54371 // Target should not be a text node (#504, #13143)
54372 if ( event.target.nodeType === 3 ) {
54373 event.target = event.target.parentNode;
54374 }
54375
54376 return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
54377 },
54378
54379 special: {
54380 load: {
54381
54382 // Prevent triggered image.load events from bubbling to window.load
54383 noBubble: true
54384 },
54385 focus: {
54386
54387 // Fire native event if possible so blur/focus sequence is correct
54388 trigger: function() {
54389 if ( this !== safeActiveElement() && this.focus ) {
54390 this.focus();
54391 return false;
54392 }
54393 },
54394 delegateType: "focusin"
54395 },
54396 blur: {
54397 trigger: function() {
54398 if ( this === safeActiveElement() && this.blur ) {
54399 this.blur();
54400 return false;
54401 }
54402 },
54403 delegateType: "focusout"
54404 },
54405 click: {
54406
54407 // For checkbox, fire native event so checked state will be right
54408 trigger: function() {
54409 if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
54410 this.click();
54411 return false;
54412 }
54413 },
54414
54415 // For cross-browser consistency, don't fire native .click() on links
54416 _default: function( event ) {
54417 return jQuery.nodeName( event.target, "a" );
54418 }
54419 },
54420
54421 beforeunload: {
54422 postDispatch: function( event ) {
54423
54424 // Support: Firefox 20+
54425 // Firefox doesn't alert if the returnValue field is not set.
54426 if ( event.result !== undefined && event.originalEvent ) {
54427 event.originalEvent.returnValue = event.result;
54428 }
54429 }
54430 }
54431 }
54432 };
54433
54434 jQuery.removeEvent = function( elem, type, handle ) {
54435
54436 // This "if" is needed for plain objects
54437 if ( elem.removeEventListener ) {
54438 elem.removeEventListener( type, handle );
54439 }
54440 };
54441
54442 jQuery.Event = function( src, props ) {
54443
54444 // Allow instantiation without the 'new' keyword
54445 if ( !( this instanceof jQuery.Event ) ) {
54446 return new jQuery.Event( src, props );
54447 }
54448
54449 // Event object
54450 if ( src && src.type ) {
54451 this.originalEvent = src;
54452 this.type = src.type;
54453
54454 // Events bubbling up the document may have been marked as prevented
54455 // by a handler lower down the tree; reflect the correct value.
54456 this.isDefaultPrevented = src.defaultPrevented ||
54457 src.defaultPrevented === undefined &&
54458
54459 // Support: Android<4.0
54460 src.returnValue === false ?
54461 returnTrue :
54462 returnFalse;
54463
54464 // Event type
54465 } else {
54466 this.type = src;
54467 }
54468
54469 // Put explicitly provided properties onto the event object
54470 if ( props ) {
54471 jQuery.extend( this, props );
54472 }
54473
54474 // Create a timestamp if incoming event doesn't have one
54475 this.timeStamp = src && src.timeStamp || jQuery.now();
54476
54477 // Mark it as fixed
54478 this[ jQuery.expando ] = true;
54479 };
54480
54481 // jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
54482 // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
54483 jQuery.Event.prototype = {
54484 constructor: jQuery.Event,
54485 isDefaultPrevented: returnFalse,
54486 isPropagationStopped: returnFalse,
54487 isImmediatePropagationStopped: returnFalse,
54488 isSimulated: false,
54489
54490 preventDefault: function() {
54491 var e = this.originalEvent;
54492
54493 this.isDefaultPrevented = returnTrue;
54494
54495 if ( e && !this.isSimulated ) {
54496 e.preventDefault();
54497 }
54498 },
54499 stopPropagation: function() {
54500 var e = this.originalEvent;
54501
54502 this.isPropagationStopped = returnTrue;
54503
54504 if ( e && !this.isSimulated ) {
54505 e.stopPropagation();
54506 }
54507 },
54508 stopImmediatePropagation: function() {
54509 var e = this.originalEvent;
54510
54511 this.isImmediatePropagationStopped = returnTrue;
54512
54513 if ( e && !this.isSimulated ) {
54514 e.stopImmediatePropagation();
54515 }
54516
54517 this.stopPropagation();
54518 }
54519 };
54520
54521 // Create mouseenter/leave events using mouseover/out and event-time checks
54522 // so that event delegation works in jQuery.
54523 // Do the same for pointerenter/pointerleave and pointerover/pointerout
54524 //
54525 // Support: Safari 7 only
54526 // Safari sends mouseenter too often; see:
54527 // https://code.google.com/p/chromium/issues/detail?id=470258
54528 // for the description of the bug (it existed in older Chrome versions as well).
54529 jQuery.each( {
54530 mouseenter: "mouseover",
54531 mouseleave: "mouseout",
54532 pointerenter: "pointerover",
54533 pointerleave: "pointerout"
54534 }, function( orig, fix ) {
54535 jQuery.event.special[ orig ] = {
54536 delegateType: fix,
54537 bindType: fix,
54538
54539 handle: function( event ) {
54540 var ret,
54541 target = this,
54542 related = event.relatedTarget,
54543 handleObj = event.handleObj;
54544
54545 // For mouseenter/leave call the handler if related is outside the target.
54546 // NB: No relatedTarget if the mouse left/entered the browser window
54547 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
54548 event.type = handleObj.origType;
54549 ret = handleObj.handler.apply( this, arguments );
54550 event.type = fix;
54551 }
54552 return ret;
54553 }
54554 };
54555 } );
54556
54557 jQuery.fn.extend( {
54558 on: function( types, selector, data, fn ) {
54559 return on( this, types, selector, data, fn );
54560 },
54561 one: function( types, selector, data, fn ) {
54562 return on( this, types, selector, data, fn, 1 );
54563 },
54564 off: function( types, selector, fn ) {
54565 var handleObj, type;
54566 if ( types && types.preventDefault && types.handleObj ) {
54567
54568 // ( event ) dispatched jQuery.Event
54569 handleObj = types.handleObj;
54570 jQuery( types.delegateTarget ).off(
54571 handleObj.namespace ?
54572 handleObj.origType + "." + handleObj.namespace :
54573 handleObj.origType,
54574 handleObj.selector,
54575 handleObj.handler
54576 );
54577 return this;
54578 }
54579 if ( typeof types === "object" ) {
54580
54581 // ( types-object [, selector] )
54582 for ( type in types ) {
54583 this.off( type, selector, types[ type ] );
54584 }
54585 return this;
54586 }
54587 if ( selector === false || typeof selector === "function" ) {
54588
54589 // ( types [, fn] )
54590 fn = selector;
54591 selector = undefined;
54592 }
54593 if ( fn === false ) {
54594 fn = returnFalse;
54595 }
54596 return this.each( function() {
54597 jQuery.event.remove( this, types, fn, selector );
54598 } );
54599 }
54600 } );
54601
54602
54603 var
54604 rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
54605
54606 // Support: IE 10-11, Edge 10240+
54607 // In IE/Edge using regex groups here causes severe slowdowns.
54608 // See https://connect.microsoft.com/IE/feedback/details/1736512/
54609 rnoInnerhtml = /<script|<style|<link/i,
54610
54611 // checked="checked" or checked
54612 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
54613 rscriptTypeMasked = /^true\/(.*)/,
54614 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
54615
54616 // Manipulating tables requires a tbody
54617 function manipulationTarget( elem, content ) {
54618 return jQuery.nodeName( elem, "table" ) &&
54619 jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
54620
54621 elem.getElementsByTagName( "tbody" )[ 0 ] ||
54622 elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
54623 elem;
54624 }
54625
54626 // Replace/restore the type attribute of script elements for safe DOM manipulation
54627 function disableScript( elem ) {
54628 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
54629 return elem;
54630 }
54631 function restoreScript( elem ) {
54632 var match = rscriptTypeMasked.exec( elem.type );
54633
54634 if ( match ) {
54635 elem.type = match[ 1 ];
54636 } else {
54637 elem.removeAttribute( "type" );
54638 }
54639
54640 return elem;
54641 }
54642
54643 function cloneCopyEvent( src, dest ) {
54644 var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
54645
54646 if ( dest.nodeType !== 1 ) {
54647 return;
54648 }
54649
54650 // 1. Copy private data: events, handlers, etc.
54651 if ( dataPriv.hasData( src ) ) {
54652 pdataOld = dataPriv.access( src );
54653 pdataCur = dataPriv.set( dest, pdataOld );
54654 events = pdataOld.events;
54655
54656 if ( events ) {
54657 delete pdataCur.handle;
54658 pdataCur.events = {};
54659
54660 for ( type in events ) {
54661 for ( i = 0, l = events[ type ].length; i < l; i++ ) {
54662 jQuery.event.add( dest, type, events[ type ][ i ] );
54663 }
54664 }
54665 }
54666 }
54667
54668 // 2. Copy user data
54669 if ( dataUser.hasData( src ) ) {
54670 udataOld = dataUser.access( src );
54671 udataCur = jQuery.extend( {}, udataOld );
54672
54673 dataUser.set( dest, udataCur );
54674 }
54675 }
54676
54677 // Fix IE bugs, see support tests
54678 function fixInput( src, dest ) {
54679 var nodeName = dest.nodeName.toLowerCase();
54680
54681 // Fails to persist the checked state of a cloned checkbox or radio button.
54682 if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
54683 dest.checked = src.checked;
54684
54685 // Fails to return the selected option to the default selected state when cloning options
54686 } else if ( nodeName === "input" || nodeName === "textarea" ) {
54687 dest.defaultValue = src.defaultValue;
54688 }
54689 }
54690
54691 function domManip( collection, args, callback, ignored ) {
54692
54693 // Flatten any nested arrays
54694 args = concat.apply( [], args );
54695
54696 var fragment, first, scripts, hasScripts, node, doc,
54697 i = 0,
54698 l = collection.length,
54699 iNoClone = l - 1,
54700 value = args[ 0 ],
54701 isFunction = jQuery.isFunction( value );
54702
54703 // We can't cloneNode fragments that contain checked, in WebKit
54704 if ( isFunction ||
54705 ( l > 1 && typeof value === "string" &&
54706 !support.checkClone && rchecked.test( value ) ) ) {
54707 return collection.each( function( index ) {
54708 var self = collection.eq( index );
54709 if ( isFunction ) {
54710 args[ 0 ] = value.call( this, index, self.html() );
54711 }
54712 domManip( self, args, callback, ignored );
54713 } );
54714 }
54715
54716 if ( l ) {
54717 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
54718 first = fragment.firstChild;
54719
54720 if ( fragment.childNodes.length === 1 ) {
54721 fragment = first;
54722 }
54723
54724 // Require either new content or an interest in ignored elements to invoke the callback
54725 if ( first || ignored ) {
54726 scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
54727 hasScripts = scripts.length;
54728
54729 // Use the original fragment for the last item
54730 // instead of the first because it can end up
54731 // being emptied incorrectly in certain situations (#8070).
54732 for ( ; i < l; i++ ) {
54733 node = fragment;
54734
54735 if ( i !== iNoClone ) {
54736 node = jQuery.clone( node, true, true );
54737
54738 // Keep references to cloned scripts for later restoration
54739 if ( hasScripts ) {
54740
54741 // Support: Android<4.1, PhantomJS<2
54742 // push.apply(_, arraylike) throws on ancient WebKit
54743 jQuery.merge( scripts, getAll( node, "script" ) );
54744 }
54745 }
54746
54747 callback.call( collection[ i ], node, i );
54748 }
54749
54750 if ( hasScripts ) {
54751 doc = scripts[ scripts.length - 1 ].ownerDocument;
54752
54753 // Reenable scripts
54754 jQuery.map( scripts, restoreScript );
54755
54756 // Evaluate executable scripts on first document insertion
54757 for ( i = 0; i < hasScripts; i++ ) {
54758 node = scripts[ i ];
54759 if ( rscriptType.test( node.type || "" ) &&
54760 !dataPriv.access( node, "globalEval" ) &&
54761 jQuery.contains( doc, node ) ) {
54762
54763 if ( node.src ) {
54764
54765 // Optional AJAX dependency, but won't run scripts if not present
54766 if ( jQuery._evalUrl ) {
54767 jQuery._evalUrl( node.src );
54768 }
54769 } else {
54770 jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
54771 }
54772 }
54773 }
54774 }
54775 }
54776 }
54777
54778 return collection;
54779 }
54780
54781 function remove( elem, selector, keepData ) {
54782 var node,
54783 nodes = selector ? jQuery.filter( selector, elem ) : elem,
54784 i = 0;
54785
54786 for ( ; ( node = nodes[ i ] ) != null; i++ ) {
54787 if ( !keepData && node.nodeType === 1 ) {
54788 jQuery.cleanData( getAll( node ) );
54789 }
54790
54791 if ( node.parentNode ) {
54792 if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
54793 setGlobalEval( getAll( node, "script" ) );
54794 }
54795 node.parentNode.removeChild( node );
54796 }
54797 }
54798
54799 return elem;
54800 }
54801
54802 jQuery.extend( {
54803 htmlPrefilter: function( html ) {
54804 return html.replace( rxhtmlTag, "<$1></$2>" );
54805 },
54806
54807 clone: function( elem, dataAndEvents, deepDataAndEvents ) {
54808 var i, l, srcElements, destElements,
54809 clone = elem.cloneNode( true ),
54810 inPage = jQuery.contains( elem.ownerDocument, elem );
54811
54812 // Fix IE cloning issues
54813 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
54814 !jQuery.isXMLDoc( elem ) ) {
54815
54816 // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
54817 destElements = getAll( clone );
54818 srcElements = getAll( elem );
54819
54820 for ( i = 0, l = srcElements.length; i < l; i++ ) {
54821 fixInput( srcElements[ i ], destElements[ i ] );
54822 }
54823 }
54824
54825 // Copy the events from the original to the clone
54826 if ( dataAndEvents ) {
54827 if ( deepDataAndEvents ) {
54828 srcElements = srcElements || getAll( elem );
54829 destElements = destElements || getAll( clone );
54830
54831 for ( i = 0, l = srcElements.length; i < l; i++ ) {
54832 cloneCopyEvent( srcElements[ i ], destElements[ i ] );
54833 }
54834 } else {
54835 cloneCopyEvent( elem, clone );
54836 }
54837 }
54838
54839 // Preserve script evaluation history
54840 destElements = getAll( clone, "script" );
54841 if ( destElements.length > 0 ) {
54842 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
54843 }
54844
54845 // Return the cloned set
54846 return clone;
54847 },
54848
54849 cleanData: function( elems ) {
54850 var data, elem, type,
54851 special = jQuery.event.special,
54852 i = 0;
54853
54854 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
54855 if ( acceptData( elem ) ) {
54856 if ( ( data = elem[ dataPriv.expando ] ) ) {
54857 if ( data.events ) {
54858 for ( type in data.events ) {
54859 if ( special[ type ] ) {
54860 jQuery.event.remove( elem, type );
54861
54862 // This is a shortcut to avoid jQuery.event.remove's overhead
54863 } else {
54864 jQuery.removeEvent( elem, type, data.handle );
54865 }
54866 }
54867 }
54868
54869 // Support: Chrome <= 35-45+
54870 // Assign undefined instead of using delete, see Data#remove
54871 elem[ dataPriv.expando ] = undefined;
54872 }
54873 if ( elem[ dataUser.expando ] ) {
54874
54875 // Support: Chrome <= 35-45+
54876 // Assign undefined instead of using delete, see Data#remove
54877 elem[ dataUser.expando ] = undefined;
54878 }
54879 }
54880 }
54881 }
54882 } );
54883
54884 jQuery.fn.extend( {
54885
54886 // Keep domManip exposed until 3.0 (gh-2225)
54887 domManip: domManip,
54888
54889 detach: function( selector ) {
54890 return remove( this, selector, true );
54891 },
54892
54893 remove: function( selector ) {
54894 return remove( this, selector );
54895 },
54896
54897 text: function( value ) {
54898 return access( this, function( value ) {
54899 return value === undefined ?
54900 jQuery.text( this ) :
54901 this.empty().each( function() {
54902 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
54903 this.textContent = value;
54904 }
54905 } );
54906 }, null, value, arguments.length );
54907 },
54908
54909 append: function() {
54910 return domManip( this, arguments, function( elem ) {
54911 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
54912 var target = manipulationTarget( this, elem );
54913 target.appendChild( elem );
54914 }
54915 } );
54916 },
54917
54918 prepend: function() {
54919 return domManip( this, arguments, function( elem ) {
54920 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
54921 var target = manipulationTarget( this, elem );
54922 target.insertBefore( elem, target.firstChild );
54923 }
54924 } );
54925 },
54926
54927 before: function() {
54928 return domManip( this, arguments, function( elem ) {
54929 if ( this.parentNode ) {
54930 this.parentNode.insertBefore( elem, this );
54931 }
54932 } );
54933 },
54934
54935 after: function() {
54936 return domManip( this, arguments, function( elem ) {
54937 if ( this.parentNode ) {
54938 this.parentNode.insertBefore( elem, this.nextSibling );
54939 }
54940 } );
54941 },
54942
54943 empty: function() {
54944 var elem,
54945 i = 0;
54946
54947 for ( ; ( elem = this[ i ] ) != null; i++ ) {
54948 if ( elem.nodeType === 1 ) {
54949
54950 // Prevent memory leaks
54951 jQuery.cleanData( getAll( elem, false ) );
54952
54953 // Remove any remaining nodes
54954 elem.textContent = "";
54955 }
54956 }
54957
54958 return this;
54959 },
54960
54961 clone: function( dataAndEvents, deepDataAndEvents ) {
54962 dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
54963 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
54964
54965 return this.map( function() {
54966 return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
54967 } );
54968 },
54969
54970 html: function( value ) {
54971 return access( this, function( value ) {
54972 var elem = this[ 0 ] || {},
54973 i = 0,
54974 l = this.length;
54975
54976 if ( value === undefined && elem.nodeType === 1 ) {
54977 return elem.innerHTML;
54978 }
54979
54980 // See if we can take a shortcut and just use innerHTML
54981 if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
54982 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
54983
54984 value = jQuery.htmlPrefilter( value );
54985
54986 try {
54987 for ( ; i < l; i++ ) {
54988 elem = this[ i ] || {};
54989
54990 // Remove element nodes and prevent memory leaks
54991 if ( elem.nodeType === 1 ) {
54992 jQuery.cleanData( getAll( elem, false ) );
54993 elem.innerHTML = value;
54994 }
54995 }
54996
54997 elem = 0;
54998
54999 // If using innerHTML throws an exception, use the fallback method
55000 } catch ( e ) {}
55001 }
55002
55003 if ( elem ) {
55004 this.empty().append( value );
55005 }
55006 }, null, value, arguments.length );
55007 },
55008
55009 replaceWith: function() {
55010 var ignored = [];
55011
55012 // Make the changes, replacing each non-ignored context element with the new content
55013 return domManip( this, arguments, function( elem ) {
55014 var parent = this.parentNode;
55015
55016 if ( jQuery.inArray( this, ignored ) < 0 ) {
55017 jQuery.cleanData( getAll( this ) );
55018 if ( parent ) {
55019 parent.replaceChild( elem, this );
55020 }
55021 }
55022
55023 // Force callback invocation
55024 }, ignored );
55025 }
55026 } );
55027
55028 jQuery.each( {
55029 appendTo: "append",
55030 prependTo: "prepend",
55031 insertBefore: "before",
55032 insertAfter: "after",
55033 replaceAll: "replaceWith"
55034 }, function( name, original ) {
55035 jQuery.fn[ name ] = function( selector ) {
55036 var elems,
55037 ret = [],
55038 insert = jQuery( selector ),
55039 last = insert.length - 1,
55040 i = 0;
55041
55042 for ( ; i <= last; i++ ) {
55043 elems = i === last ? this : this.clone( true );
55044 jQuery( insert[ i ] )[ original ]( elems );
55045
55046 // Support: QtWebKit
55047 // .get() because push.apply(_, arraylike) throws
55048 push.apply( ret, elems.get() );
55049 }
55050
55051 return this.pushStack( ret );
55052 };
55053 } );
55054
55055
55056 var iframe,
55057 elemdisplay = {
55058
55059 // Support: Firefox
55060 // We have to pre-define these values for FF (#10227)
55061 HTML: "block",
55062 BODY: "block"
55063 };
55064
55065 /**
55066 * Retrieve the actual display of a element
55067 * @param {String} name nodeName of the element
55068 * @param {Object} doc Document object
55069 */
55070
55071 // Called only from within defaultDisplay
55072 function actualDisplay( name, doc ) {
55073 var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
55074
55075 display = jQuery.css( elem[ 0 ], "display" );
55076
55077 // We don't have any data stored on the element,
55078 // so use "detach" method as fast way to get rid of the element
55079 elem.detach();
55080
55081 return display;
55082 }
55083
55084 /**
55085 * Try to determine the default display value of an element
55086 * @param {String} nodeName
55087 */
55088 function defaultDisplay( nodeName ) {
55089 var doc = document,
55090 display = elemdisplay[ nodeName ];
55091
55092 if ( !display ) {
55093 display = actualDisplay( nodeName, doc );
55094
55095 // If the simple way fails, read from inside an iframe
55096 if ( display === "none" || !display ) {
55097
55098 // Use the already-created iframe if possible
55099 iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
55100 .appendTo( doc.documentElement );
55101
55102 // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
55103 doc = iframe[ 0 ].contentDocument;
55104
55105 // Support: IE
55106 doc.write();
55107 doc.close();
55108
55109 display = actualDisplay( nodeName, doc );
55110 iframe.detach();
55111 }
55112
55113 // Store the correct default display
55114 elemdisplay[ nodeName ] = display;
55115 }
55116
55117 return display;
55118 }
55119 var rmargin = ( /^margin/ );
55120
55121 var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
55122
55123 var getStyles = function( elem ) {
55124
55125 // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
55126 // IE throws on elements created in popups
55127 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
55128 var view = elem.ownerDocument.defaultView;
55129
55130 if ( !view || !view.opener ) {
55131 view = window;
55132 }
55133
55134 return view.getComputedStyle( elem );
55135 };
55136
55137 var swap = function( elem, options, callback, args ) {
55138 var ret, name,
55139 old = {};
55140
55141 // Remember the old values, and insert the new ones
55142 for ( name in options ) {
55143 old[ name ] = elem.style[ name ];
55144 elem.style[ name ] = options[ name ];
55145 }
55146
55147 ret = callback.apply( elem, args || [] );
55148
55149 // Revert the old values
55150 for ( name in options ) {
55151 elem.style[ name ] = old[ name ];
55152 }
55153
55154 return ret;
55155 };
55156
55157
55158 var documentElement = document.documentElement;
55159
55160
55161
55162 ( function() {
55163 var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
55164 container = document.createElement( "div" ),
55165 div = document.createElement( "div" );
55166
55167 // Finish early in limited (non-browser) environments
55168 if ( !div.style ) {
55169 return;
55170 }
55171
55172 // Support: IE9-11+
55173 // Style of cloned element affects source element cloned (#8908)
55174 div.style.backgroundClip = "content-box";
55175 div.cloneNode( true ).style.backgroundClip = "";
55176 support.clearCloneStyle = div.style.backgroundClip === "content-box";
55177
55178 container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
55179 "padding:0;margin-top:1px;position:absolute";
55180 container.appendChild( div );
55181
55182 // Executing both pixelPosition & boxSizingReliable tests require only one layout
55183 // so they're executed at the same time to save the second computation.
55184 function computeStyleTests() {
55185 div.style.cssText =
55186
55187 // Support: Firefox<29, Android 2.3
55188 // Vendor-prefix box-sizing
55189 "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
55190 "position:relative;display:block;" +
55191 "margin:auto;border:1px;padding:1px;" +
55192 "top:1%;width:50%";
55193 div.innerHTML = "";
55194 documentElement.appendChild( container );
55195
55196 var divStyle = window.getComputedStyle( div );
55197 pixelPositionVal = divStyle.top !== "1%";
55198 reliableMarginLeftVal = divStyle.marginLeft === "2px";
55199 boxSizingReliableVal = divStyle.width === "4px";
55200
55201 // Support: Android 4.0 - 4.3 only
55202 // Some styles come back with percentage values, even though they shouldn't
55203 div.style.marginRight = "50%";
55204 pixelMarginRightVal = divStyle.marginRight === "4px";
55205
55206 documentElement.removeChild( container );
55207 }
55208
55209 jQuery.extend( support, {
55210 pixelPosition: function() {
55211
55212 // This test is executed only once but we still do memoizing
55213 // since we can use the boxSizingReliable pre-computing.
55214 // No need to check if the test was already performed, though.
55215 computeStyleTests();
55216 return pixelPositionVal;
55217 },
55218 boxSizingReliable: function() {
55219 if ( boxSizingReliableVal == null ) {
55220 computeStyleTests();
55221 }
55222 return boxSizingReliableVal;
55223 },
55224 pixelMarginRight: function() {
55225
55226 // Support: Android 4.0-4.3
55227 // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
55228 // since that compresses better and they're computed together anyway.
55229 if ( boxSizingReliableVal == null ) {
55230 computeStyleTests();
55231 }
55232 return pixelMarginRightVal;
55233 },
55234 reliableMarginLeft: function() {
55235
55236 // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
55237 if ( boxSizingReliableVal == null ) {
55238 computeStyleTests();
55239 }
55240 return reliableMarginLeftVal;
55241 },
55242 reliableMarginRight: function() {
55243
55244 // Support: Android 2.3
55245 // Check if div with explicit width and no margin-right incorrectly
55246 // gets computed margin-right based on width of container. (#3333)
55247 // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
55248 // This support function is only executed once so no memoizing is needed.
55249 var ret,
55250 marginDiv = div.appendChild( document.createElement( "div" ) );
55251
55252 // Reset CSS: box-sizing; display; margin; border; padding
55253 marginDiv.style.cssText = div.style.cssText =
55254
55255 // Support: Android 2.3
55256 // Vendor-prefix box-sizing
55257 "-webkit-box-sizing:content-box;box-sizing:content-box;" +
55258 "display:block;margin:0;border:0;padding:0";
55259 marginDiv.style.marginRight = marginDiv.style.width = "0";
55260 div.style.width = "1px";
55261 documentElement.appendChild( container );
55262
55263 ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
55264
55265 documentElement.removeChild( container );
55266 div.removeChild( marginDiv );
55267
55268 return ret;
55269 }
55270 } );
55271 } )();
55272
55273
55274 function curCSS( elem, name, computed ) {
55275 var width, minWidth, maxWidth, ret,
55276 style = elem.style;
55277
55278 computed = computed || getStyles( elem );
55279 ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
55280
55281 // Support: Opera 12.1x only
55282 // Fall back to style even without computed
55283 // computed is undefined for elems on document fragments
55284 if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
55285 ret = jQuery.style( elem, name );
55286 }
55287
55288 // Support: IE9
55289 // getPropertyValue is only needed for .css('filter') (#12537)
55290 if ( computed ) {
55291
55292 // A tribute to the "awesome hack by Dean Edwards"
55293 // Android Browser returns percentage for some values,
55294 // but width seems to be reliably pixels.
55295 // This is against the CSSOM draft spec:
55296 // http://dev.w3.org/csswg/cssom/#resolved-values
55297 if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
55298
55299 // Remember the original values
55300 width = style.width;
55301 minWidth = style.minWidth;
55302 maxWidth = style.maxWidth;
55303
55304 // Put in the new values to get a computed value out
55305 style.minWidth = style.maxWidth = style.width = ret;
55306 ret = computed.width;
55307
55308 // Revert the changed values
55309 style.width = width;
55310 style.minWidth = minWidth;
55311 style.maxWidth = maxWidth;
55312 }
55313 }
55314
55315 return ret !== undefined ?
55316
55317 // Support: IE9-11+
55318 // IE returns zIndex value as an integer.
55319 ret + "" :
55320 ret;
55321 }
55322
55323
55324 function addGetHookIf( conditionFn, hookFn ) {
55325
55326 // Define the hook, we'll check on the first run if it's really needed.
55327 return {
55328 get: function() {
55329 if ( conditionFn() ) {
55330
55331 // Hook not needed (or it's not possible to use it due
55332 // to missing dependency), remove it.
55333 delete this.get;
55334 return;
55335 }
55336
55337 // Hook needed; redefine it so that the support test is not executed again.
55338 return ( this.get = hookFn ).apply( this, arguments );
55339 }
55340 };
55341 }
55342
55343
55344 var
55345
55346 // Swappable if display is none or starts with table
55347 // except "table", "table-cell", or "table-caption"
55348 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
55349 rdisplayswap = /^(none|table(?!-c[ea]).+)/,
55350
55351 cssShow = { position: "absolute", visibility: "hidden", display: "block" },
55352 cssNormalTransform = {
55353 letterSpacing: "0",
55354 fontWeight: "400"
55355 },
55356
55357 cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
55358 emptyStyle = document.createElement( "div" ).style;
55359
55360 // Return a css property mapped to a potentially vendor prefixed property
55361 function vendorPropName( name ) {
55362
55363 // Shortcut for names that are not vendor prefixed
55364 if ( name in emptyStyle ) {
55365 return name;
55366 }
55367
55368 // Check for vendor prefixed names
55369 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
55370 i = cssPrefixes.length;
55371
55372 while ( i-- ) {
55373 name = cssPrefixes[ i ] + capName;
55374 if ( name in emptyStyle ) {
55375 return name;
55376 }
55377 }
55378 }
55379
55380 function setPositiveNumber( elem, value, subtract ) {
55381
55382 // Any relative (+/-) values have already been
55383 // normalized at this point
55384 var matches = rcssNum.exec( value );
55385 return matches ?
55386
55387 // Guard against undefined "subtract", e.g., when used as in cssHooks
55388 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
55389 value;
55390 }
55391
55392 function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
55393 var i = extra === ( isBorderBox ? "border" : "content" ) ?
55394
55395 // If we already have the right measurement, avoid augmentation
55396 4 :
55397
55398 // Otherwise initialize for horizontal or vertical properties
55399 name === "width" ? 1 : 0,
55400
55401 val = 0;
55402
55403 for ( ; i < 4; i += 2 ) {
55404
55405 // Both box models exclude margin, so add it if we want it
55406 if ( extra === "margin" ) {
55407 val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
55408 }
55409
55410 if ( isBorderBox ) {
55411
55412 // border-box includes padding, so remove it if we want content
55413 if ( extra === "content" ) {
55414 val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
55415 }
55416
55417 // At this point, extra isn't border nor margin, so remove border
55418 if ( extra !== "margin" ) {
55419 val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
55420 }
55421 } else {
55422
55423 // At this point, extra isn't content, so add padding
55424 val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
55425
55426 // At this point, extra isn't content nor padding, so add border
55427 if ( extra !== "padding" ) {
55428 val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
55429 }
55430 }
55431 }
55432
55433 return val;
55434 }
55435
55436 function getWidthOrHeight( elem, name, extra ) {
55437
55438 // Start with offset property, which is equivalent to the border-box value
55439 var valueIsBorderBox = true,
55440 val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
55441 styles = getStyles( elem ),
55442 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
55443
55444 // Some non-html elements return undefined for offsetWidth, so check for null/undefined
55445 // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
55446 // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
55447 if ( val <= 0 || val == null ) {
55448
55449 // Fall back to computed then uncomputed css if necessary
55450 val = curCSS( elem, name, styles );
55451 if ( val < 0 || val == null ) {
55452 val = elem.style[ name ];
55453 }
55454
55455 // Computed unit is not pixels. Stop here and return.
55456 if ( rnumnonpx.test( val ) ) {
55457 return val;
55458 }
55459
55460 // Check for style in case a browser which returns unreliable values
55461 // for getComputedStyle silently falls back to the reliable elem.style
55462 valueIsBorderBox = isBorderBox &&
55463 ( support.boxSizingReliable() || val === elem.style[ name ] );
55464
55465 // Normalize "", auto, and prepare for extra
55466 val = parseFloat( val ) || 0;
55467 }
55468
55469 // Use the active box-sizing model to add/subtract irrelevant styles
55470 return ( val +
55471 augmentWidthOrHeight(
55472 elem,
55473 name,
55474 extra || ( isBorderBox ? "border" : "content" ),
55475 valueIsBorderBox,
55476 styles
55477 )
55478 ) + "px";
55479 }
55480
55481 function showHide( elements, show ) {
55482 var display, elem, hidden,
55483 values = [],
55484 index = 0,
55485 length = elements.length;
55486
55487 for ( ; index < length; index++ ) {
55488 elem = elements[ index ];
55489 if ( !elem.style ) {
55490 continue;
55491 }
55492
55493 values[ index ] = dataPriv.get( elem, "olddisplay" );
55494 display = elem.style.display;
55495 if ( show ) {
55496
55497 // Reset the inline display of this element to learn if it is
55498 // being hidden by cascaded rules or not
55499 if ( !values[ index ] && display === "none" ) {
55500 elem.style.display = "";
55501 }
55502
55503 // Set elements which have been overridden with display: none
55504 // in a stylesheet to whatever the default browser style is
55505 // for such an element
55506 if ( elem.style.display === "" && isHidden( elem ) ) {
55507 values[ index ] = dataPriv.access(
55508 elem,
55509 "olddisplay",
55510 defaultDisplay( elem.nodeName )
55511 );
55512 }
55513 } else {
55514 hidden = isHidden( elem );
55515
55516 if ( display !== "none" || !hidden ) {
55517 dataPriv.set(
55518 elem,
55519 "olddisplay",
55520 hidden ? display : jQuery.css( elem, "display" )
55521 );
55522 }
55523 }
55524 }
55525
55526 // Set the display of most of the elements in a second loop
55527 // to avoid the constant reflow
55528 for ( index = 0; index < length; index++ ) {
55529 elem = elements[ index ];
55530 if ( !elem.style ) {
55531 continue;
55532 }
55533 if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
55534 elem.style.display = show ? values[ index ] || "" : "none";
55535 }
55536 }
55537
55538 return elements;
55539 }
55540
55541 jQuery.extend( {
55542
55543 // Add in style property hooks for overriding the default
55544 // behavior of getting and setting a style property
55545 cssHooks: {
55546 opacity: {
55547 get: function( elem, computed ) {
55548 if ( computed ) {
55549
55550 // We should always get a number back from opacity
55551 var ret = curCSS( elem, "opacity" );
55552 return ret === "" ? "1" : ret;
55553 }
55554 }
55555 }
55556 },
55557
55558 // Don't automatically add "px" to these possibly-unitless properties
55559 cssNumber: {
55560 "animationIterationCount": true,
55561 "columnCount": true,
55562 "fillOpacity": true,
55563 "flexGrow": true,
55564 "flexShrink": true,
55565 "fontWeight": true,
55566 "lineHeight": true,
55567 "opacity": true,
55568 "order": true,
55569 "orphans": true,
55570 "widows": true,
55571 "zIndex": true,
55572 "zoom": true
55573 },
55574
55575 // Add in properties whose names you wish to fix before
55576 // setting or getting the value
55577 cssProps: {
55578 "float": "cssFloat"
55579 },
55580
55581 // Get and set the style property on a DOM Node
55582 style: function( elem, name, value, extra ) {
55583
55584 // Don't set styles on text and comment nodes
55585 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
55586 return;
55587 }
55588
55589 // Make sure that we're working with the right name
55590 var ret, type, hooks,
55591 origName = jQuery.camelCase( name ),
55592 style = elem.style;
55593
55594 name = jQuery.cssProps[ origName ] ||
55595 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
55596
55597 // Gets hook for the prefixed version, then unprefixed version
55598 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
55599
55600 // Check if we're setting a value
55601 if ( value !== undefined ) {
55602 type = typeof value;
55603
55604 // Convert "+=" or "-=" to relative numbers (#7345)
55605 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
55606 value = adjustCSS( elem, name, ret );
55607
55608 // Fixes bug #9237
55609 type = "number";
55610 }
55611
55612 // Make sure that null and NaN values aren't set (#7116)
55613 if ( value == null || value !== value ) {
55614 return;
55615 }
55616
55617 // If a number was passed in, add the unit (except for certain CSS properties)
55618 if ( type === "number" ) {
55619 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
55620 }
55621
55622 // Support: IE9-11+
55623 // background-* props affect original clone's values
55624 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
55625 style[ name ] = "inherit";
55626 }
55627
55628 // If a hook was provided, use that value, otherwise just set the specified value
55629 if ( !hooks || !( "set" in hooks ) ||
55630 ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
55631
55632 style[ name ] = value;
55633 }
55634
55635 } else {
55636
55637 // If a hook was provided get the non-computed value from there
55638 if ( hooks && "get" in hooks &&
55639 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
55640
55641 return ret;
55642 }
55643
55644 // Otherwise just get the value from the style object
55645 return style[ name ];
55646 }
55647 },
55648
55649 css: function( elem, name, extra, styles ) {
55650 var val, num, hooks,
55651 origName = jQuery.camelCase( name );
55652
55653 // Make sure that we're working with the right name
55654 name = jQuery.cssProps[ origName ] ||
55655 ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
55656
55657 // Try prefixed name followed by the unprefixed name
55658 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
55659
55660 // If a hook was provided get the computed value from there
55661 if ( hooks && "get" in hooks ) {
55662 val = hooks.get( elem, true, extra );
55663 }
55664
55665 // Otherwise, if a way to get the computed value exists, use that
55666 if ( val === undefined ) {
55667 val = curCSS( elem, name, styles );
55668 }
55669
55670 // Convert "normal" to computed value
55671 if ( val === "normal" && name in cssNormalTransform ) {
55672 val = cssNormalTransform[ name ];
55673 }
55674
55675 // Make numeric if forced or a qualifier was provided and val looks numeric
55676 if ( extra === "" || extra ) {
55677 num = parseFloat( val );
55678 return extra === true || isFinite( num ) ? num || 0 : val;
55679 }
55680 return val;
55681 }
55682 } );
55683
55684 jQuery.each( [ "height", "width" ], function( i, name ) {
55685 jQuery.cssHooks[ name ] = {
55686 get: function( elem, computed, extra ) {
55687 if ( computed ) {
55688
55689 // Certain elements can have dimension info if we invisibly show them
55690 // but it must have a current display style that would benefit
55691 return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
55692 elem.offsetWidth === 0 ?
55693 swap( elem, cssShow, function() {
55694 return getWidthOrHeight( elem, name, extra );
55695 } ) :
55696 getWidthOrHeight( elem, name, extra );
55697 }
55698 },
55699
55700 set: function( elem, value, extra ) {
55701 var matches,
55702 styles = extra && getStyles( elem ),
55703 subtract = extra && augmentWidthOrHeight(
55704 elem,
55705 name,
55706 extra,
55707 jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
55708 styles
55709 );
55710
55711 // Convert to pixels if value adjustment is needed
55712 if ( subtract && ( matches = rcssNum.exec( value ) ) &&
55713 ( matches[ 3 ] || "px" ) !== "px" ) {
55714
55715 elem.style[ name ] = value;
55716 value = jQuery.css( elem, name );
55717 }
55718
55719 return setPositiveNumber( elem, value, subtract );
55720 }
55721 };
55722 } );
55723
55724 jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
55725 function( elem, computed ) {
55726 if ( computed ) {
55727 return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
55728 elem.getBoundingClientRect().left -
55729 swap( elem, { marginLeft: 0 }, function() {
55730 return elem.getBoundingClientRect().left;
55731 } )
55732 ) + "px";
55733 }
55734 }
55735 );
55736
55737 // Support: Android 2.3
55738 jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
55739 function( elem, computed ) {
55740 if ( computed ) {
55741 return swap( elem, { "display": "inline-block" },
55742 curCSS, [ elem, "marginRight" ] );
55743 }
55744 }
55745 );
55746
55747 // These hooks are used by animate to expand properties
55748 jQuery.each( {
55749 margin: "",
55750 padding: "",
55751 border: "Width"
55752 }, function( prefix, suffix ) {
55753 jQuery.cssHooks[ prefix + suffix ] = {
55754 expand: function( value ) {
55755 var i = 0,
55756 expanded = {},
55757
55758 // Assumes a single number if not a string
55759 parts = typeof value === "string" ? value.split( " " ) : [ value ];
55760
55761 for ( ; i < 4; i++ ) {
55762 expanded[ prefix + cssExpand[ i ] + suffix ] =
55763 parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
55764 }
55765
55766 return expanded;
55767 }
55768 };
55769
55770 if ( !rmargin.test( prefix ) ) {
55771 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
55772 }
55773 } );
55774
55775 jQuery.fn.extend( {
55776 css: function( name, value ) {
55777 return access( this, function( elem, name, value ) {
55778 var styles, len,
55779 map = {},
55780 i = 0;
55781
55782 if ( jQuery.isArray( name ) ) {
55783 styles = getStyles( elem );
55784 len = name.length;
55785
55786 for ( ; i < len; i++ ) {
55787 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
55788 }
55789
55790 return map;
55791 }
55792
55793 return value !== undefined ?
55794 jQuery.style( elem, name, value ) :
55795 jQuery.css( elem, name );
55796 }, name, value, arguments.length > 1 );
55797 },
55798 show: function() {
55799 return showHide( this, true );
55800 },
55801 hide: function() {
55802 return showHide( this );
55803 },
55804 toggle: function( state ) {
55805 if ( typeof state === "boolean" ) {
55806 return state ? this.show() : this.hide();
55807 }
55808
55809 return this.each( function() {
55810 if ( isHidden( this ) ) {
55811 jQuery( this ).show();
55812 } else {
55813 jQuery( this ).hide();
55814 }
55815 } );
55816 }
55817 } );
55818
55819
55820 function Tween( elem, options, prop, end, easing ) {
55821 return new Tween.prototype.init( elem, options, prop, end, easing );
55822 }
55823 jQuery.Tween = Tween;
55824
55825 Tween.prototype = {
55826 constructor: Tween,
55827 init: function( elem, options, prop, end, easing, unit ) {
55828 this.elem = elem;
55829 this.prop = prop;
55830 this.easing = easing || jQuery.easing._default;
55831 this.options = options;
55832 this.start = this.now = this.cur();
55833 this.end = end;
55834 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
55835 },
55836 cur: function() {
55837 var hooks = Tween.propHooks[ this.prop ];
55838
55839 return hooks && hooks.get ?
55840 hooks.get( this ) :
55841 Tween.propHooks._default.get( this );
55842 },
55843 run: function( percent ) {
55844 var eased,
55845 hooks = Tween.propHooks[ this.prop ];
55846
55847 if ( this.options.duration ) {
55848 this.pos = eased = jQuery.easing[ this.easing ](
55849 percent, this.options.duration * percent, 0, 1, this.options.duration
55850 );
55851 } else {
55852 this.pos = eased = percent;
55853 }
55854 this.now = ( this.end - this.start ) * eased + this.start;
55855
55856 if ( this.options.step ) {
55857 this.options.step.call( this.elem, this.now, this );
55858 }
55859
55860 if ( hooks && hooks.set ) {
55861 hooks.set( this );
55862 } else {
55863 Tween.propHooks._default.set( this );
55864 }
55865 return this;
55866 }
55867 };
55868
55869 Tween.prototype.init.prototype = Tween.prototype;
55870
55871 Tween.propHooks = {
55872 _default: {
55873 get: function( tween ) {
55874 var result;
55875
55876 // Use a property on the element directly when it is not a DOM element,
55877 // or when there is no matching style property that exists.
55878 if ( tween.elem.nodeType !== 1 ||
55879 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
55880 return tween.elem[ tween.prop ];
55881 }
55882
55883 // Passing an empty string as a 3rd parameter to .css will automatically
55884 // attempt a parseFloat and fallback to a string if the parse fails.
55885 // Simple values such as "10px" are parsed to Float;
55886 // complex values such as "rotate(1rad)" are returned as-is.
55887 result = jQuery.css( tween.elem, tween.prop, "" );
55888
55889 // Empty strings, null, undefined and "auto" are converted to 0.
55890 return !result || result === "auto" ? 0 : result;
55891 },
55892 set: function( tween ) {
55893
55894 // Use step hook for back compat.
55895 // Use cssHook if its there.
55896 // Use .style if available and use plain properties where available.
55897 if ( jQuery.fx.step[ tween.prop ] ) {
55898 jQuery.fx.step[ tween.prop ]( tween );
55899 } else if ( tween.elem.nodeType === 1 &&
55900 ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
55901 jQuery.cssHooks[ tween.prop ] ) ) {
55902 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
55903 } else {
55904 tween.elem[ tween.prop ] = tween.now;
55905 }
55906 }
55907 }
55908 };
55909
55910 // Support: IE9
55911 // Panic based approach to setting things on disconnected nodes
55912 Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
55913 set: function( tween ) {
55914 if ( tween.elem.nodeType && tween.elem.parentNode ) {
55915 tween.elem[ tween.prop ] = tween.now;
55916 }
55917 }
55918 };
55919
55920 jQuery.easing = {
55921 linear: function( p ) {
55922 return p;
55923 },
55924 swing: function( p ) {
55925 return 0.5 - Math.cos( p * Math.PI ) / 2;
55926 },
55927 _default: "swing"
55928 };
55929
55930 jQuery.fx = Tween.prototype.init;
55931
55932 // Back Compat <1.8 extension point
55933 jQuery.fx.step = {};
55934
55935
55936
55937
55938 var
55939 fxNow, timerId,
55940 rfxtypes = /^(?:toggle|show|hide)$/,
55941 rrun = /queueHooks$/;
55942
55943 // Animations created synchronously will run synchronously
55944 function createFxNow() {
55945 window.setTimeout( function() {
55946 fxNow = undefined;
55947 } );
55948 return ( fxNow = jQuery.now() );
55949 }
55950
55951 // Generate parameters to create a standard animation
55952 function genFx( type, includeWidth ) {
55953 var which,
55954 i = 0,
55955 attrs = { height: type };
55956
55957 // If we include width, step value is 1 to do all cssExpand values,
55958 // otherwise step value is 2 to skip over Left and Right
55959 includeWidth = includeWidth ? 1 : 0;
55960 for ( ; i < 4 ; i += 2 - includeWidth ) {
55961 which = cssExpand[ i ];
55962 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
55963 }
55964
55965 if ( includeWidth ) {
55966 attrs.opacity = attrs.width = type;
55967 }
55968
55969 return attrs;
55970 }
55971
55972 function createTween( value, prop, animation ) {
55973 var tween,
55974 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
55975 index = 0,
55976 length = collection.length;
55977 for ( ; index < length; index++ ) {
55978 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
55979
55980 // We're done with this property
55981 return tween;
55982 }
55983 }
55984 }
55985
55986 function defaultPrefilter( elem, props, opts ) {
55987 /* jshint validthis: true */
55988 var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
55989 anim = this,
55990 orig = {},
55991 style = elem.style,
55992 hidden = elem.nodeType && isHidden( elem ),
55993 dataShow = dataPriv.get( elem, "fxshow" );
55994
55995 // Handle queue: false promises
55996 if ( !opts.queue ) {
55997 hooks = jQuery._queueHooks( elem, "fx" );
55998 if ( hooks.unqueued == null ) {
55999 hooks.unqueued = 0;
56000 oldfire = hooks.empty.fire;
56001 hooks.empty.fire = function() {
56002 if ( !hooks.unqueued ) {
56003 oldfire();
56004 }
56005 };
56006 }
56007 hooks.unqueued++;
56008
56009 anim.always( function() {
56010
56011 // Ensure the complete handler is called before this completes
56012 anim.always( function() {
56013 hooks.unqueued--;
56014 if ( !jQuery.queue( elem, "fx" ).length ) {
56015 hooks.empty.fire();
56016 }
56017 } );
56018 } );
56019 }
56020
56021 // Height/width overflow pass
56022 if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
56023
56024 // Make sure that nothing sneaks out
56025 // Record all 3 overflow attributes because IE9-10 do not
56026 // change the overflow attribute when overflowX and
56027 // overflowY are set to the same value
56028 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
56029
56030 // Set display property to inline-block for height/width
56031 // animations on inline elements that are having width/height animated
56032 display = jQuery.css( elem, "display" );
56033
56034 // Test default display if display is currently "none"
56035 checkDisplay = display === "none" ?
56036 dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
56037
56038 if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
56039 style.display = "inline-block";
56040 }
56041 }
56042
56043 if ( opts.overflow ) {
56044 style.overflow = "hidden";
56045 anim.always( function() {
56046 style.overflow = opts.overflow[ 0 ];
56047 style.overflowX = opts.overflow[ 1 ];
56048 style.overflowY = opts.overflow[ 2 ];
56049 } );
56050 }
56051
56052 // show/hide pass
56053 for ( prop in props ) {
56054 value = props[ prop ];
56055 if ( rfxtypes.exec( value ) ) {
56056 delete props[ prop ];
56057 toggle = toggle || value === "toggle";
56058 if ( value === ( hidden ? "hide" : "show" ) ) {
56059
56060 // If there is dataShow left over from a stopped hide or show
56061 // and we are going to proceed with show, we should pretend to be hidden
56062 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
56063 hidden = true;
56064 } else {
56065 continue;
56066 }
56067 }
56068 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
56069
56070 // Any non-fx value stops us from restoring the original display value
56071 } else {
56072 display = undefined;
56073 }
56074 }
56075
56076 if ( !jQuery.isEmptyObject( orig ) ) {
56077 if ( dataShow ) {
56078 if ( "hidden" in dataShow ) {
56079 hidden = dataShow.hidden;
56080 }
56081 } else {
56082 dataShow = dataPriv.access( elem, "fxshow", {} );
56083 }
56084
56085 // Store state if its toggle - enables .stop().toggle() to "reverse"
56086 if ( toggle ) {
56087 dataShow.hidden = !hidden;
56088 }
56089 if ( hidden ) {
56090 jQuery( elem ).show();
56091 } else {
56092 anim.done( function() {
56093 jQuery( elem ).hide();
56094 } );
56095 }
56096 anim.done( function() {
56097 var prop;
56098
56099 dataPriv.remove( elem, "fxshow" );
56100 for ( prop in orig ) {
56101 jQuery.style( elem, prop, orig[ prop ] );
56102 }
56103 } );
56104 for ( prop in orig ) {
56105 tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
56106
56107 if ( !( prop in dataShow ) ) {
56108 dataShow[ prop ] = tween.start;
56109 if ( hidden ) {
56110 tween.end = tween.start;
56111 tween.start = prop === "width" || prop === "height" ? 1 : 0;
56112 }
56113 }
56114 }
56115
56116 // If this is a noop like .hide().hide(), restore an overwritten display value
56117 } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
56118 style.display = display;
56119 }
56120 }
56121
56122 function propFilter( props, specialEasing ) {
56123 var index, name, easing, value, hooks;
56124
56125 // camelCase, specialEasing and expand cssHook pass
56126 for ( index in props ) {
56127 name = jQuery.camelCase( index );
56128 easing = specialEasing[ name ];
56129 value = props[ index ];
56130 if ( jQuery.isArray( value ) ) {
56131 easing = value[ 1 ];
56132 value = props[ index ] = value[ 0 ];
56133 }
56134
56135 if ( index !== name ) {
56136 props[ name ] = value;
56137 delete props[ index ];
56138 }
56139
56140 hooks = jQuery.cssHooks[ name ];
56141 if ( hooks && "expand" in hooks ) {
56142 value = hooks.expand( value );
56143 delete props[ name ];
56144
56145 // Not quite $.extend, this won't overwrite existing keys.
56146 // Reusing 'index' because we have the correct "name"
56147 for ( index in value ) {
56148 if ( !( index in props ) ) {
56149 props[ index ] = value[ index ];
56150 specialEasing[ index ] = easing;
56151 }
56152 }
56153 } else {
56154 specialEasing[ name ] = easing;
56155 }
56156 }
56157 }
56158
56159 function Animation( elem, properties, options ) {
56160 var result,
56161 stopped,
56162 index = 0,
56163 length = Animation.prefilters.length,
56164 deferred = jQuery.Deferred().always( function() {
56165
56166 // Don't match elem in the :animated selector
56167 delete tick.elem;
56168 } ),
56169 tick = function() {
56170 if ( stopped ) {
56171 return false;
56172 }
56173 var currentTime = fxNow || createFxNow(),
56174 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
56175
56176 // Support: Android 2.3
56177 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
56178 temp = remaining / animation.duration || 0,
56179 percent = 1 - temp,
56180 index = 0,
56181 length = animation.tweens.length;
56182
56183 for ( ; index < length ; index++ ) {
56184 animation.tweens[ index ].run( percent );
56185 }
56186
56187 deferred.notifyWith( elem, [ animation, percent, remaining ] );
56188
56189 if ( percent < 1 && length ) {
56190 return remaining;
56191 } else {
56192 deferred.resolveWith( elem, [ animation ] );
56193 return false;
56194 }
56195 },
56196 animation = deferred.promise( {
56197 elem: elem,
56198 props: jQuery.extend( {}, properties ),
56199 opts: jQuery.extend( true, {
56200 specialEasing: {},
56201 easing: jQuery.easing._default
56202 }, options ),
56203 originalProperties: properties,
56204 originalOptions: options,
56205 startTime: fxNow || createFxNow(),
56206 duration: options.duration,
56207 tweens: [],
56208 createTween: function( prop, end ) {
56209 var tween = jQuery.Tween( elem, animation.opts, prop, end,
56210 animation.opts.specialEasing[ prop ] || animation.opts.easing );
56211 animation.tweens.push( tween );
56212 return tween;
56213 },
56214 stop: function( gotoEnd ) {
56215 var index = 0,
56216
56217 // If we are going to the end, we want to run all the tweens
56218 // otherwise we skip this part
56219 length = gotoEnd ? animation.tweens.length : 0;
56220 if ( stopped ) {
56221 return this;
56222 }
56223 stopped = true;
56224 for ( ; index < length ; index++ ) {
56225 animation.tweens[ index ].run( 1 );
56226 }
56227
56228 // Resolve when we played the last frame; otherwise, reject
56229 if ( gotoEnd ) {
56230 deferred.notifyWith( elem, [ animation, 1, 0 ] );
56231 deferred.resolveWith( elem, [ animation, gotoEnd ] );
56232 } else {
56233 deferred.rejectWith( elem, [ animation, gotoEnd ] );
56234 }
56235 return this;
56236 }
56237 } ),
56238 props = animation.props;
56239
56240 propFilter( props, animation.opts.specialEasing );
56241
56242 for ( ; index < length ; index++ ) {
56243 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
56244 if ( result ) {
56245 if ( jQuery.isFunction( result.stop ) ) {
56246 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
56247 jQuery.proxy( result.stop, result );
56248 }
56249 return result;
56250 }
56251 }
56252
56253 jQuery.map( props, createTween, animation );
56254
56255 if ( jQuery.isFunction( animation.opts.start ) ) {
56256 animation.opts.start.call( elem, animation );
56257 }
56258
56259 jQuery.fx.timer(
56260 jQuery.extend( tick, {
56261 elem: elem,
56262 anim: animation,
56263 queue: animation.opts.queue
56264 } )
56265 );
56266
56267 // attach callbacks from options
56268 return animation.progress( animation.opts.progress )
56269 .done( animation.opts.done, animation.opts.complete )
56270 .fail( animation.opts.fail )
56271 .always( animation.opts.always );
56272 }
56273
56274 jQuery.Animation = jQuery.extend( Animation, {
56275 tweeners: {
56276 "*": [ function( prop, value ) {
56277 var tween = this.createTween( prop, value );
56278 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
56279 return tween;
56280 } ]
56281 },
56282
56283 tweener: function( props, callback ) {
56284 if ( jQuery.isFunction( props ) ) {
56285 callback = props;
56286 props = [ "*" ];
56287 } else {
56288 props = props.match( rnotwhite );
56289 }
56290
56291 var prop,
56292 index = 0,
56293 length = props.length;
56294
56295 for ( ; index < length ; index++ ) {
56296 prop = props[ index ];
56297 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
56298 Animation.tweeners[ prop ].unshift( callback );
56299 }
56300 },
56301
56302 prefilters: [ defaultPrefilter ],
56303
56304 prefilter: function( callback, prepend ) {
56305 if ( prepend ) {
56306 Animation.prefilters.unshift( callback );
56307 } else {
56308 Animation.prefilters.push( callback );
56309 }
56310 }
56311 } );
56312
56313 jQuery.speed = function( speed, easing, fn ) {
56314 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
56315 complete: fn || !fn && easing ||
56316 jQuery.isFunction( speed ) && speed,
56317 duration: speed,
56318 easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
56319 };
56320
56321 opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
56322 opt.duration : opt.duration in jQuery.fx.speeds ?
56323 jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
56324
56325 // Normalize opt.queue - true/undefined/null -> "fx"
56326 if ( opt.queue == null || opt.queue === true ) {
56327 opt.queue = "fx";
56328 }
56329
56330 // Queueing
56331 opt.old = opt.complete;
56332
56333 opt.complete = function() {
56334 if ( jQuery.isFunction( opt.old ) ) {
56335 opt.old.call( this );
56336 }
56337
56338 if ( opt.queue ) {
56339 jQuery.dequeue( this, opt.queue );
56340 }
56341 };
56342
56343 return opt;
56344 };
56345
56346 jQuery.fn.extend( {
56347 fadeTo: function( speed, to, easing, callback ) {
56348
56349 // Show any hidden elements after setting opacity to 0
56350 return this.filter( isHidden ).css( "opacity", 0 ).show()
56351
56352 // Animate to the value specified
56353 .end().animate( { opacity: to }, speed, easing, callback );
56354 },
56355 animate: function( prop, speed, easing, callback ) {
56356 var empty = jQuery.isEmptyObject( prop ),
56357 optall = jQuery.speed( speed, easing, callback ),
56358 doAnimation = function() {
56359
56360 // Operate on a copy of prop so per-property easing won't be lost
56361 var anim = Animation( this, jQuery.extend( {}, prop ), optall );
56362
56363 // Empty animations, or finishing resolves immediately
56364 if ( empty || dataPriv.get( this, "finish" ) ) {
56365 anim.stop( true );
56366 }
56367 };
56368 doAnimation.finish = doAnimation;
56369
56370 return empty || optall.queue === false ?
56371 this.each( doAnimation ) :
56372 this.queue( optall.queue, doAnimation );
56373 },
56374 stop: function( type, clearQueue, gotoEnd ) {
56375 var stopQueue = function( hooks ) {
56376 var stop = hooks.stop;
56377 delete hooks.stop;
56378 stop( gotoEnd );
56379 };
56380
56381 if ( typeof type !== "string" ) {
56382 gotoEnd = clearQueue;
56383 clearQueue = type;
56384 type = undefined;
56385 }
56386 if ( clearQueue && type !== false ) {
56387 this.queue( type || "fx", [] );
56388 }
56389
56390 return this.each( function() {
56391 var dequeue = true,
56392 index = type != null && type + "queueHooks",
56393 timers = jQuery.timers,
56394 data = dataPriv.get( this );
56395
56396 if ( index ) {
56397 if ( data[ index ] && data[ index ].stop ) {
56398 stopQueue( data[ index ] );
56399 }
56400 } else {
56401 for ( index in data ) {
56402 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
56403 stopQueue( data[ index ] );
56404 }
56405 }
56406 }
56407
56408 for ( index = timers.length; index--; ) {
56409 if ( timers[ index ].elem === this &&
56410 ( type == null || timers[ index ].queue === type ) ) {
56411
56412 timers[ index ].anim.stop( gotoEnd );
56413 dequeue = false;
56414 timers.splice( index, 1 );
56415 }
56416 }
56417
56418 // Start the next in the queue if the last step wasn't forced.
56419 // Timers currently will call their complete callbacks, which
56420 // will dequeue but only if they were gotoEnd.
56421 if ( dequeue || !gotoEnd ) {
56422 jQuery.dequeue( this, type );
56423 }
56424 } );
56425 },
56426 finish: function( type ) {
56427 if ( type !== false ) {
56428 type = type || "fx";
56429 }
56430 return this.each( function() {
56431 var index,
56432 data = dataPriv.get( this ),
56433 queue = data[ type + "queue" ],
56434 hooks = data[ type + "queueHooks" ],
56435 timers = jQuery.timers,
56436 length = queue ? queue.length : 0;
56437
56438 // Enable finishing flag on private data
56439 data.finish = true;
56440
56441 // Empty the queue first
56442 jQuery.queue( this, type, [] );
56443
56444 if ( hooks && hooks.stop ) {
56445 hooks.stop.call( this, true );
56446 }
56447
56448 // Look for any active animations, and finish them
56449 for ( index = timers.length; index--; ) {
56450 if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
56451 timers[ index ].anim.stop( true );
56452 timers.splice( index, 1 );
56453 }
56454 }
56455
56456 // Look for any animations in the old queue and finish them
56457 for ( index = 0; index < length; index++ ) {
56458 if ( queue[ index ] && queue[ index ].finish ) {
56459 queue[ index ].finish.call( this );
56460 }
56461 }
56462
56463 // Turn off finishing flag
56464 delete data.finish;
56465 } );
56466 }
56467 } );
56468
56469 jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
56470 var cssFn = jQuery.fn[ name ];
56471 jQuery.fn[ name ] = function( speed, easing, callback ) {
56472 return speed == null || typeof speed === "boolean" ?
56473 cssFn.apply( this, arguments ) :
56474 this.animate( genFx( name, true ), speed, easing, callback );
56475 };
56476 } );
56477
56478 // Generate shortcuts for custom animations
56479 jQuery.each( {
56480 slideDown: genFx( "show" ),
56481 slideUp: genFx( "hide" ),
56482 slideToggle: genFx( "toggle" ),
56483 fadeIn: { opacity: "show" },
56484 fadeOut: { opacity: "hide" },
56485 fadeToggle: { opacity: "toggle" }
56486 }, function( name, props ) {
56487 jQuery.fn[ name ] = function( speed, easing, callback ) {
56488 return this.animate( props, speed, easing, callback );
56489 };
56490 } );
56491
56492 jQuery.timers = [];
56493 jQuery.fx.tick = function() {
56494 var timer,
56495 i = 0,
56496 timers = jQuery.timers;
56497
56498 fxNow = jQuery.now();
56499
56500 for ( ; i < timers.length; i++ ) {
56501 timer = timers[ i ];
56502
56503 // Checks the timer has not already been removed
56504 if ( !timer() && timers[ i ] === timer ) {
56505 timers.splice( i--, 1 );
56506 }
56507 }
56508
56509 if ( !timers.length ) {
56510 jQuery.fx.stop();
56511 }
56512 fxNow = undefined;
56513 };
56514
56515 jQuery.fx.timer = function( timer ) {
56516 jQuery.timers.push( timer );
56517 if ( timer() ) {
56518 jQuery.fx.start();
56519 } else {
56520 jQuery.timers.pop();
56521 }
56522 };
56523
56524 jQuery.fx.interval = 13;
56525 jQuery.fx.start = function() {
56526 if ( !timerId ) {
56527 timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
56528 }
56529 };
56530
56531 jQuery.fx.stop = function() {
56532 window.clearInterval( timerId );
56533
56534 timerId = null;
56535 };
56536
56537 jQuery.fx.speeds = {
56538 slow: 600,
56539 fast: 200,
56540
56541 // Default speed
56542 _default: 400
56543 };
56544
56545
56546 // Based off of the plugin by Clint Helfers, with permission.
56547 // http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
56548 jQuery.fn.delay = function( time, type ) {
56549 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
56550 type = type || "fx";
56551
56552 return this.queue( type, function( next, hooks ) {
56553 var timeout = window.setTimeout( next, time );
56554 hooks.stop = function() {
56555 window.clearTimeout( timeout );
56556 };
56557 } );
56558 };
56559
56560
56561 ( function() {
56562 var input = document.createElement( "input" ),
56563 select = document.createElement( "select" ),
56564 opt = select.appendChild( document.createElement( "option" ) );
56565
56566 input.type = "checkbox";
56567
56568 // Support: iOS<=5.1, Android<=4.2+
56569 // Default value for a checkbox should be "on"
56570 support.checkOn = input.value !== "";
56571
56572 // Support: IE<=11+
56573 // Must access selectedIndex to make default options select
56574 support.optSelected = opt.selected;
56575
56576 // Support: Android<=2.3
56577 // Options inside disabled selects are incorrectly marked as disabled
56578 select.disabled = true;
56579 support.optDisabled = !opt.disabled;
56580
56581 // Support: IE<=11+
56582 // An input loses its value after becoming a radio
56583 input = document.createElement( "input" );
56584 input.value = "t";
56585 input.type = "radio";
56586 support.radioValue = input.value === "t";
56587 } )();
56588
56589
56590 var boolHook,
56591 attrHandle = jQuery.expr.attrHandle;
56592
56593 jQuery.fn.extend( {
56594 attr: function( name, value ) {
56595 return access( this, jQuery.attr, name, value, arguments.length > 1 );
56596 },
56597
56598 removeAttr: function( name ) {
56599 return this.each( function() {
56600 jQuery.removeAttr( this, name );
56601 } );
56602 }
56603 } );
56604
56605 jQuery.extend( {
56606 attr: function( elem, name, value ) {
56607 var ret, hooks,
56608 nType = elem.nodeType;
56609
56610 // Don't get/set attributes on text, comment and attribute nodes
56611 if ( nType === 3 || nType === 8 || nType === 2 ) {
56612 return;
56613 }
56614
56615 // Fallback to prop when attributes are not supported
56616 if ( typeof elem.getAttribute === "undefined" ) {
56617 return jQuery.prop( elem, name, value );
56618 }
56619
56620 // All attributes are lowercase
56621 // Grab necessary hook if one is defined
56622 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
56623 name = name.toLowerCase();
56624 hooks = jQuery.attrHooks[ name ] ||
56625 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
56626 }
56627
56628 if ( value !== undefined ) {
56629 if ( value === null ) {
56630 jQuery.removeAttr( elem, name );
56631 return;
56632 }
56633
56634 if ( hooks && "set" in hooks &&
56635 ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
56636 return ret;
56637 }
56638
56639 elem.setAttribute( name, value + "" );
56640 return value;
56641 }
56642
56643 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
56644 return ret;
56645 }
56646
56647 ret = jQuery.find.attr( elem, name );
56648
56649 // Non-existent attributes return null, we normalize to undefined
56650 return ret == null ? undefined : ret;
56651 },
56652
56653 attrHooks: {
56654 type: {
56655 set: function( elem, value ) {
56656 if ( !support.radioValue && value === "radio" &&
56657 jQuery.nodeName( elem, "input" ) ) {
56658 var val = elem.value;
56659 elem.setAttribute( "type", value );
56660 if ( val ) {
56661 elem.value = val;
56662 }
56663 return value;
56664 }
56665 }
56666 }
56667 },
56668
56669 removeAttr: function( elem, value ) {
56670 var name, propName,
56671 i = 0,
56672 attrNames = value && value.match( rnotwhite );
56673
56674 if ( attrNames && elem.nodeType === 1 ) {
56675 while ( ( name = attrNames[ i++ ] ) ) {
56676 propName = jQuery.propFix[ name ] || name;
56677
56678 // Boolean attributes get special treatment (#10870)
56679 if ( jQuery.expr.match.bool.test( name ) ) {
56680
56681 // Set corresponding property to false
56682 elem[ propName ] = false;
56683 }
56684
56685 elem.removeAttribute( name );
56686 }
56687 }
56688 }
56689 } );
56690
56691 // Hooks for boolean attributes
56692 boolHook = {
56693 set: function( elem, value, name ) {
56694 if ( value === false ) {
56695
56696 // Remove boolean attributes when set to false
56697 jQuery.removeAttr( elem, name );
56698 } else {
56699 elem.setAttribute( name, name );
56700 }
56701 return name;
56702 }
56703 };
56704 jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
56705 var getter = attrHandle[ name ] || jQuery.find.attr;
56706
56707 attrHandle[ name ] = function( elem, name, isXML ) {
56708 var ret, handle;
56709 if ( !isXML ) {
56710
56711 // Avoid an infinite loop by temporarily removing this function from the getter
56712 handle = attrHandle[ name ];
56713 attrHandle[ name ] = ret;
56714 ret = getter( elem, name, isXML ) != null ?
56715 name.toLowerCase() :
56716 null;
56717 attrHandle[ name ] = handle;
56718 }
56719 return ret;
56720 };
56721 } );
56722
56723
56724
56725
56726 var rfocusable = /^(?:input|select|textarea|button)$/i,
56727 rclickable = /^(?:a|area)$/i;
56728
56729 jQuery.fn.extend( {
56730 prop: function( name, value ) {
56731 return access( this, jQuery.prop, name, value, arguments.length > 1 );
56732 },
56733
56734 removeProp: function( name ) {
56735 return this.each( function() {
56736 delete this[ jQuery.propFix[ name ] || name ];
56737 } );
56738 }
56739 } );
56740
56741 jQuery.extend( {
56742 prop: function( elem, name, value ) {
56743 var ret, hooks,
56744 nType = elem.nodeType;
56745
56746 // Don't get/set properties on text, comment and attribute nodes
56747 if ( nType === 3 || nType === 8 || nType === 2 ) {
56748 return;
56749 }
56750
56751 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
56752
56753 // Fix name and attach hooks
56754 name = jQuery.propFix[ name ] || name;
56755 hooks = jQuery.propHooks[ name ];
56756 }
56757
56758 if ( value !== undefined ) {
56759 if ( hooks && "set" in hooks &&
56760 ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
56761 return ret;
56762 }
56763
56764 return ( elem[ name ] = value );
56765 }
56766
56767 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
56768 return ret;
56769 }
56770
56771 return elem[ name ];
56772 },
56773
56774 propHooks: {
56775 tabIndex: {
56776 get: function( elem ) {
56777
56778 // elem.tabIndex doesn't always return the
56779 // correct value when it hasn't been explicitly set
56780 // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
56781 // Use proper attribute retrieval(#12072)
56782 var tabindex = jQuery.find.attr( elem, "tabindex" );
56783
56784 return tabindex ?
56785 parseInt( tabindex, 10 ) :
56786 rfocusable.test( elem.nodeName ) ||
56787 rclickable.test( elem.nodeName ) && elem.href ?
56788 0 :
56789 -1;
56790 }
56791 }
56792 },
56793
56794 propFix: {
56795 "for": "htmlFor",
56796 "class": "className"
56797 }
56798 } );
56799
56800 // Support: IE <=11 only
56801 // Accessing the selectedIndex property
56802 // forces the browser to respect setting selected
56803 // on the option
56804 // The getter ensures a default option is selected
56805 // when in an optgroup
56806 if ( !support.optSelected ) {
56807 jQuery.propHooks.selected = {
56808 get: function( elem ) {
56809 var parent = elem.parentNode;
56810 if ( parent && parent.parentNode ) {
56811 parent.parentNode.selectedIndex;
56812 }
56813 return null;
56814 },
56815 set: function( elem ) {
56816 var parent = elem.parentNode;
56817 if ( parent ) {
56818 parent.selectedIndex;
56819
56820 if ( parent.parentNode ) {
56821 parent.parentNode.selectedIndex;
56822 }
56823 }
56824 }
56825 };
56826 }
56827
56828 jQuery.each( [
56829 "tabIndex",
56830 "readOnly",
56831 "maxLength",
56832 "cellSpacing",
56833 "cellPadding",
56834 "rowSpan",
56835 "colSpan",
56836 "useMap",
56837 "frameBorder",
56838 "contentEditable"
56839 ], function() {
56840 jQuery.propFix[ this.toLowerCase() ] = this;
56841 } );
56842
56843
56844
56845
56846 var rclass = /[\t\r\n\f]/g;
56847
56848 function getClass( elem ) {
56849 return elem.getAttribute && elem.getAttribute( "class" ) || "";
56850 }
56851
56852 jQuery.fn.extend( {
56853 addClass: function( value ) {
56854 var classes, elem, cur, curValue, clazz, j, finalValue,
56855 i = 0;
56856
56857 if ( jQuery.isFunction( value ) ) {
56858 return this.each( function( j ) {
56859 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
56860 } );
56861 }
56862
56863 if ( typeof value === "string" && value ) {
56864 classes = value.match( rnotwhite ) || [];
56865
56866 while ( ( elem = this[ i++ ] ) ) {
56867 curValue = getClass( elem );
56868 cur = elem.nodeType === 1 &&
56869 ( " " + curValue + " " ).replace( rclass, " " );
56870
56871 if ( cur ) {
56872 j = 0;
56873 while ( ( clazz = classes[ j++ ] ) ) {
56874 if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
56875 cur += clazz + " ";
56876 }
56877 }
56878
56879 // Only assign if different to avoid unneeded rendering.
56880 finalValue = jQuery.trim( cur );
56881 if ( curValue !== finalValue ) {
56882 elem.setAttribute( "class", finalValue );
56883 }
56884 }
56885 }
56886 }
56887
56888 return this;
56889 },
56890
56891 removeClass: function( value ) {
56892 var classes, elem, cur, curValue, clazz, j, finalValue,
56893 i = 0;
56894
56895 if ( jQuery.isFunction( value ) ) {
56896 return this.each( function( j ) {
56897 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
56898 } );
56899 }
56900
56901 if ( !arguments.length ) {
56902 return this.attr( "class", "" );
56903 }
56904
56905 if ( typeof value === "string" && value ) {
56906 classes = value.match( rnotwhite ) || [];
56907
56908 while ( ( elem = this[ i++ ] ) ) {
56909 curValue = getClass( elem );
56910
56911 // This expression is here for better compressibility (see addClass)
56912 cur = elem.nodeType === 1 &&
56913 ( " " + curValue + " " ).replace( rclass, " " );
56914
56915 if ( cur ) {
56916 j = 0;
56917 while ( ( clazz = classes[ j++ ] ) ) {
56918
56919 // Remove *all* instances
56920 while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
56921 cur = cur.replace( " " + clazz + " ", " " );
56922 }
56923 }
56924
56925 // Only assign if different to avoid unneeded rendering.
56926 finalValue = jQuery.trim( cur );
56927 if ( curValue !== finalValue ) {
56928 elem.setAttribute( "class", finalValue );
56929 }
56930 }
56931 }
56932 }
56933
56934 return this;
56935 },
56936
56937 toggleClass: function( value, stateVal ) {
56938 var type = typeof value;
56939
56940 if ( typeof stateVal === "boolean" && type === "string" ) {
56941 return stateVal ? this.addClass( value ) : this.removeClass( value );
56942 }
56943
56944 if ( jQuery.isFunction( value ) ) {
56945 return this.each( function( i ) {
56946 jQuery( this ).toggleClass(
56947 value.call( this, i, getClass( this ), stateVal ),
56948 stateVal
56949 );
56950 } );
56951 }
56952
56953 return this.each( function() {
56954 var className, i, self, classNames;
56955
56956 if ( type === "string" ) {
56957
56958 // Toggle individual class names
56959 i = 0;
56960 self = jQuery( this );
56961 classNames = value.match( rnotwhite ) || [];
56962
56963 while ( ( className = classNames[ i++ ] ) ) {
56964
56965 // Check each className given, space separated list
56966 if ( self.hasClass( className ) ) {
56967 self.removeClass( className );
56968 } else {
56969 self.addClass( className );
56970 }
56971 }
56972
56973 // Toggle whole class name
56974 } else if ( value === undefined || type === "boolean" ) {
56975 className = getClass( this );
56976 if ( className ) {
56977
56978 // Store className if set
56979 dataPriv.set( this, "__className__", className );
56980 }
56981
56982 // If the element has a class name or if we're passed `false`,
56983 // then remove the whole classname (if there was one, the above saved it).
56984 // Otherwise bring back whatever was previously saved (if anything),
56985 // falling back to the empty string if nothing was stored.
56986 if ( this.setAttribute ) {
56987 this.setAttribute( "class",
56988 className || value === false ?
56989 "" :
56990 dataPriv.get( this, "__className__" ) || ""
56991 );
56992 }
56993 }
56994 } );
56995 },
56996
56997 hasClass: function( selector ) {
56998 var className, elem,
56999 i = 0;
57000
57001 className = " " + selector + " ";
57002 while ( ( elem = this[ i++ ] ) ) {
57003 if ( elem.nodeType === 1 &&
57004 ( " " + getClass( elem ) + " " ).replace( rclass, " " )
57005 .indexOf( className ) > -1
57006 ) {
57007 return true;
57008 }
57009 }
57010
57011 return false;
57012 }
57013 } );
57014
57015
57016
57017
57018 var rreturn = /\r/g,
57019 rspaces = /[\x20\t\r\n\f]+/g;
57020
57021 jQuery.fn.extend( {
57022 val: function( value ) {
57023 var hooks, ret, isFunction,
57024 elem = this[ 0 ];
57025
57026 if ( !arguments.length ) {
57027 if ( elem ) {
57028 hooks = jQuery.valHooks[ elem.type ] ||
57029 jQuery.valHooks[ elem.nodeName.toLowerCase() ];
57030
57031 if ( hooks &&
57032 "get" in hooks &&
57033 ( ret = hooks.get( elem, "value" ) ) !== undefined
57034 ) {
57035 return ret;
57036 }
57037
57038 ret = elem.value;
57039
57040 return typeof ret === "string" ?
57041
57042 // Handle most common string cases
57043 ret.replace( rreturn, "" ) :
57044
57045 // Handle cases where value is null/undef or number
57046 ret == null ? "" : ret;
57047 }
57048
57049 return;
57050 }
57051
57052 isFunction = jQuery.isFunction( value );
57053
57054 return this.each( function( i ) {
57055 var val;
57056
57057 if ( this.nodeType !== 1 ) {
57058 return;
57059 }
57060
57061 if ( isFunction ) {
57062 val = value.call( this, i, jQuery( this ).val() );
57063 } else {
57064 val = value;
57065 }
57066
57067 // Treat null/undefined as ""; convert numbers to string
57068 if ( val == null ) {
57069 val = "";
57070
57071 } else if ( typeof val === "number" ) {
57072 val += "";
57073
57074 } else if ( jQuery.isArray( val ) ) {
57075 val = jQuery.map( val, function( value ) {
57076 return value == null ? "" : value + "";
57077 } );
57078 }
57079
57080 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
57081
57082 // If set returns undefined, fall back to normal setting
57083 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
57084 this.value = val;
57085 }
57086 } );
57087 }
57088 } );
57089
57090 jQuery.extend( {
57091 valHooks: {
57092 option: {
57093 get: function( elem ) {
57094
57095 var val = jQuery.find.attr( elem, "value" );
57096 return val != null ?
57097 val :
57098
57099 // Support: IE10-11+
57100 // option.text throws exceptions (#14686, #14858)
57101 // Strip and collapse whitespace
57102 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
57103 jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
57104 }
57105 },
57106 select: {
57107 get: function( elem ) {
57108 var value, option,
57109 options = elem.options,
57110 index = elem.selectedIndex,
57111 one = elem.type === "select-one" || index < 0,
57112 values = one ? null : [],
57113 max = one ? index + 1 : options.length,
57114 i = index < 0 ?
57115 max :
57116 one ? index : 0;
57117
57118 // Loop through all the selected options
57119 for ( ; i < max; i++ ) {
57120 option = options[ i ];
57121
57122 // IE8-9 doesn't update selected after form reset (#2551)
57123 if ( ( option.selected || i === index ) &&
57124
57125 // Don't return options that are disabled or in a disabled optgroup
57126 ( support.optDisabled ?
57127 !option.disabled : option.getAttribute( "disabled" ) === null ) &&
57128 ( !option.parentNode.disabled ||
57129 !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
57130
57131 // Get the specific value for the option
57132 value = jQuery( option ).val();
57133
57134 // We don't need an array for one selects
57135 if ( one ) {
57136 return value;
57137 }
57138
57139 // Multi-Selects return an array
57140 values.push( value );
57141 }
57142 }
57143
57144 return values;
57145 },
57146
57147 set: function( elem, value ) {
57148 var optionSet, option,
57149 options = elem.options,
57150 values = jQuery.makeArray( value ),
57151 i = options.length;
57152
57153 while ( i-- ) {
57154 option = options[ i ];
57155 if ( option.selected =
57156 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
57157 ) {
57158 optionSet = true;
57159 }
57160 }
57161
57162 // Force browsers to behave consistently when non-matching value is set
57163 if ( !optionSet ) {
57164 elem.selectedIndex = -1;
57165 }
57166 return values;
57167 }
57168 }
57169 }
57170 } );
57171
57172 // Radios and checkboxes getter/setter
57173 jQuery.each( [ "radio", "checkbox" ], function() {
57174 jQuery.valHooks[ this ] = {
57175 set: function( elem, value ) {
57176 if ( jQuery.isArray( value ) ) {
57177 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
57178 }
57179 }
57180 };
57181 if ( !support.checkOn ) {
57182 jQuery.valHooks[ this ].get = function( elem ) {
57183 return elem.getAttribute( "value" ) === null ? "on" : elem.value;
57184 };
57185 }
57186 } );
57187
57188
57189
57190
57191 // Return jQuery for attributes-only inclusion
57192
57193
57194 var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
57195
57196 jQuery.extend( jQuery.event, {
57197
57198 trigger: function( event, data, elem, onlyHandlers ) {
57199
57200 var i, cur, tmp, bubbleType, ontype, handle, special,
57201 eventPath = [ elem || document ],
57202 type = hasOwn.call( event, "type" ) ? event.type : event,
57203 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
57204
57205 cur = tmp = elem = elem || document;
57206
57207 // Don't do events on text and comment nodes
57208 if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
57209 return;
57210 }
57211
57212 // focus/blur morphs to focusin/out; ensure we're not firing them right now
57213 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
57214 return;
57215 }
57216
57217 if ( type.indexOf( "." ) > -1 ) {
57218
57219 // Namespaced trigger; create a regexp to match event type in handle()
57220 namespaces = type.split( "." );
57221 type = namespaces.shift();
57222 namespaces.sort();
57223 }
57224 ontype = type.indexOf( ":" ) < 0 && "on" + type;
57225
57226 // Caller can pass in a jQuery.Event object, Object, or just an event type string
57227 event = event[ jQuery.expando ] ?
57228 event :
57229 new jQuery.Event( type, typeof event === "object" && event );
57230
57231 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
57232 event.isTrigger = onlyHandlers ? 2 : 3;
57233 event.namespace = namespaces.join( "." );
57234 event.rnamespace = event.namespace ?
57235 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
57236 null;
57237
57238 // Clean up the event in case it is being reused
57239 event.result = undefined;
57240 if ( !event.target ) {
57241 event.target = elem;
57242 }
57243
57244 // Clone any incoming data and prepend the event, creating the handler arg list
57245 data = data == null ?
57246 [ event ] :
57247 jQuery.makeArray( data, [ event ] );
57248
57249 // Allow special events to draw outside the lines
57250 special = jQuery.event.special[ type ] || {};
57251 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
57252 return;
57253 }
57254
57255 // Determine event propagation path in advance, per W3C events spec (#9951)
57256 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
57257 if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
57258
57259 bubbleType = special.delegateType || type;
57260 if ( !rfocusMorph.test( bubbleType + type ) ) {
57261 cur = cur.parentNode;
57262 }
57263 for ( ; cur; cur = cur.parentNode ) {
57264 eventPath.push( cur );
57265 tmp = cur;
57266 }
57267
57268 // Only add window if we got to document (e.g., not plain obj or detached DOM)
57269 if ( tmp === ( elem.ownerDocument || document ) ) {
57270 eventPath.push( tmp.defaultView || tmp.parentWindow || window );
57271 }
57272 }
57273
57274 // Fire handlers on the event path
57275 i = 0;
57276 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
57277
57278 event.type = i > 1 ?
57279 bubbleType :
57280 special.bindType || type;
57281
57282 // jQuery handler
57283 handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
57284 dataPriv.get( cur, "handle" );
57285 if ( handle ) {
57286 handle.apply( cur, data );
57287 }
57288
57289 // Native handler
57290 handle = ontype && cur[ ontype ];
57291 if ( handle && handle.apply && acceptData( cur ) ) {
57292 event.result = handle.apply( cur, data );
57293 if ( event.result === false ) {
57294 event.preventDefault();
57295 }
57296 }
57297 }
57298 event.type = type;
57299
57300 // If nobody prevented the default action, do it now
57301 if ( !onlyHandlers && !event.isDefaultPrevented() ) {
57302
57303 if ( ( !special._default ||
57304 special._default.apply( eventPath.pop(), data ) === false ) &&
57305 acceptData( elem ) ) {
57306
57307 // Call a native DOM method on the target with the same name name as the event.
57308 // Don't do default actions on window, that's where global variables be (#6170)
57309 if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
57310
57311 // Don't re-trigger an onFOO event when we call its FOO() method
57312 tmp = elem[ ontype ];
57313
57314 if ( tmp ) {
57315 elem[ ontype ] = null;
57316 }
57317
57318 // Prevent re-triggering of the same event, since we already bubbled it above
57319 jQuery.event.triggered = type;
57320 elem[ type ]();
57321 jQuery.event.triggered = undefined;
57322
57323 if ( tmp ) {
57324 elem[ ontype ] = tmp;
57325 }
57326 }
57327 }
57328 }
57329
57330 return event.result;
57331 },
57332
57333 // Piggyback on a donor event to simulate a different one
57334 // Used only for `focus(in | out)` events
57335 simulate: function( type, elem, event ) {
57336 var e = jQuery.extend(
57337 new jQuery.Event(),
57338 event,
57339 {
57340 type: type,
57341 isSimulated: true
57342 }
57343 );
57344
57345 jQuery.event.trigger( e, null, elem );
57346 }
57347
57348 } );
57349
57350 jQuery.fn.extend( {
57351
57352 trigger: function( type, data ) {
57353 return this.each( function() {
57354 jQuery.event.trigger( type, data, this );
57355 } );
57356 },
57357 triggerHandler: function( type, data ) {
57358 var elem = this[ 0 ];
57359 if ( elem ) {
57360 return jQuery.event.trigger( type, data, elem, true );
57361 }
57362 }
57363 } );
57364
57365
57366 jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
57367 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
57368 "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
57369 function( i, name ) {
57370
57371 // Handle event binding
57372 jQuery.fn[ name ] = function( data, fn ) {
57373 return arguments.length > 0 ?
57374 this.on( name, null, data, fn ) :
57375 this.trigger( name );
57376 };
57377 } );
57378
57379 jQuery.fn.extend( {
57380 hover: function( fnOver, fnOut ) {
57381 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
57382 }
57383 } );
57384
57385
57386
57387
57388 support.focusin = "onfocusin" in window;
57389
57390
57391 // Support: Firefox
57392 // Firefox doesn't have focus(in | out) events
57393 // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
57394 //
57395 // Support: Chrome, Safari
57396 // focus(in | out) events fire after focus & blur events,
57397 // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
57398 // Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
57399 if ( !support.focusin ) {
57400 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
57401
57402 // Attach a single capturing handler on the document while someone wants focusin/focusout
57403 var handler = function( event ) {
57404 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
57405 };
57406
57407 jQuery.event.special[ fix ] = {
57408 setup: function() {
57409 var doc = this.ownerDocument || this,
57410 attaches = dataPriv.access( doc, fix );
57411
57412 if ( !attaches ) {
57413 doc.addEventListener( orig, handler, true );
57414 }
57415 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
57416 },
57417 teardown: function() {
57418 var doc = this.ownerDocument || this,
57419 attaches = dataPriv.access( doc, fix ) - 1;
57420
57421 if ( !attaches ) {
57422 doc.removeEventListener( orig, handler, true );
57423 dataPriv.remove( doc, fix );
57424
57425 } else {
57426 dataPriv.access( doc, fix, attaches );
57427 }
57428 }
57429 };
57430 } );
57431 }
57432 var location = window.location;
57433
57434 var nonce = jQuery.now();
57435
57436 var rquery = ( /\?/ );
57437
57438
57439
57440 // Support: Android 2.3
57441 // Workaround failure to string-cast null input
57442 jQuery.parseJSON = function( data ) {
57443 return JSON.parse( data + "" );
57444 };
57445
57446
57447 // Cross-browser xml parsing
57448 jQuery.parseXML = function( data ) {
57449 var xml;
57450 if ( !data || typeof data !== "string" ) {
57451 return null;
57452 }
57453
57454 // Support: IE9
57455 try {
57456 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
57457 } catch ( e ) {
57458 xml = undefined;
57459 }
57460
57461 if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
57462 jQuery.error( "Invalid XML: " + data );
57463 }
57464 return xml;
57465 };
57466
57467
57468 var
57469 rhash = /#.*$/,
57470 rts = /([?&])_=[^&]*/,
57471 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
57472
57473 // #7653, #8125, #8152: local protocol detection
57474 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
57475 rnoContent = /^(?:GET|HEAD)$/,
57476 rprotocol = /^\/\//,
57477
57478 /* Prefilters
57479 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
57480 * 2) These are called:
57481 * - BEFORE asking for a transport
57482 * - AFTER param serialization (s.data is a string if s.processData is true)
57483 * 3) key is the dataType
57484 * 4) the catchall symbol "*" can be used
57485 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
57486 */
57487 prefilters = {},
57488
57489 /* Transports bindings
57490 * 1) key is the dataType
57491 * 2) the catchall symbol "*" can be used
57492 * 3) selection will start with transport dataType and THEN go to "*" if needed
57493 */
57494 transports = {},
57495
57496 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
57497 allTypes = "*/".concat( "*" ),
57498
57499 // Anchor tag for parsing the document origin
57500 originAnchor = document.createElement( "a" );
57501 originAnchor.href = location.href;
57502
57503 // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
57504 function addToPrefiltersOrTransports( structure ) {
57505
57506 // dataTypeExpression is optional and defaults to "*"
57507 return function( dataTypeExpression, func ) {
57508
57509 if ( typeof dataTypeExpression !== "string" ) {
57510 func = dataTypeExpression;
57511 dataTypeExpression = "*";
57512 }
57513
57514 var dataType,
57515 i = 0,
57516 dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
57517
57518 if ( jQuery.isFunction( func ) ) {
57519
57520 // For each dataType in the dataTypeExpression
57521 while ( ( dataType = dataTypes[ i++ ] ) ) {
57522
57523 // Prepend if requested
57524 if ( dataType[ 0 ] === "+" ) {
57525 dataType = dataType.slice( 1 ) || "*";
57526 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
57527
57528 // Otherwise append
57529 } else {
57530 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
57531 }
57532 }
57533 }
57534 };
57535 }
57536
57537 // Base inspection function for prefilters and transports
57538 function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
57539
57540 var inspected = {},
57541 seekingTransport = ( structure === transports );
57542
57543 function inspect( dataType ) {
57544 var selected;
57545 inspected[ dataType ] = true;
57546 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
57547 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
57548 if ( typeof dataTypeOrTransport === "string" &&
57549 !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
57550
57551 options.dataTypes.unshift( dataTypeOrTransport );
57552 inspect( dataTypeOrTransport );
57553 return false;
57554 } else if ( seekingTransport ) {
57555 return !( selected = dataTypeOrTransport );
57556 }
57557 } );
57558 return selected;
57559 }
57560
57561 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
57562 }
57563
57564 // A special extend for ajax options
57565 // that takes "flat" options (not to be deep extended)
57566 // Fixes #9887
57567 function ajaxExtend( target, src ) {
57568 var key, deep,
57569 flatOptions = jQuery.ajaxSettings.flatOptions || {};
57570
57571 for ( key in src ) {
57572 if ( src[ key ] !== undefined ) {
57573 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
57574 }
57575 }
57576 if ( deep ) {
57577 jQuery.extend( true, target, deep );
57578 }
57579
57580 return target;
57581 }
57582
57583 /* Handles responses to an ajax request:
57584 * - finds the right dataType (mediates between content-type and expected dataType)
57585 * - returns the corresponding response
57586 */
57587 function ajaxHandleResponses( s, jqXHR, responses ) {
57588
57589 var ct, type, finalDataType, firstDataType,
57590 contents = s.contents,
57591 dataTypes = s.dataTypes;
57592
57593 // Remove auto dataType and get content-type in the process
57594 while ( dataTypes[ 0 ] === "*" ) {
57595 dataTypes.shift();
57596 if ( ct === undefined ) {
57597 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
57598 }
57599 }
57600
57601 // Check if we're dealing with a known content-type
57602 if ( ct ) {
57603 for ( type in contents ) {
57604 if ( contents[ type ] && contents[ type ].test( ct ) ) {
57605 dataTypes.unshift( type );
57606 break;
57607 }
57608 }
57609 }
57610
57611 // Check to see if we have a response for the expected dataType
57612 if ( dataTypes[ 0 ] in responses ) {
57613 finalDataType = dataTypes[ 0 ];
57614 } else {
57615
57616 // Try convertible dataTypes
57617 for ( type in responses ) {
57618 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
57619 finalDataType = type;
57620 break;
57621 }
57622 if ( !firstDataType ) {
57623 firstDataType = type;
57624 }
57625 }
57626
57627 // Or just use first one
57628 finalDataType = finalDataType || firstDataType;
57629 }
57630
57631 // If we found a dataType
57632 // We add the dataType to the list if needed
57633 // and return the corresponding response
57634 if ( finalDataType ) {
57635 if ( finalDataType !== dataTypes[ 0 ] ) {
57636 dataTypes.unshift( finalDataType );
57637 }
57638 return responses[ finalDataType ];
57639 }
57640 }
57641
57642 /* Chain conversions given the request and the original response
57643 * Also sets the responseXXX fields on the jqXHR instance
57644 */
57645 function ajaxConvert( s, response, jqXHR, isSuccess ) {
57646 var conv2, current, conv, tmp, prev,
57647 converters = {},
57648
57649 // Work with a copy of dataTypes in case we need to modify it for conversion
57650 dataTypes = s.dataTypes.slice();
57651
57652 // Create converters map with lowercased keys
57653 if ( dataTypes[ 1 ] ) {
57654 for ( conv in s.converters ) {
57655 converters[ conv.toLowerCase() ] = s.converters[ conv ];
57656 }
57657 }
57658
57659 current = dataTypes.shift();
57660
57661 // Convert to each sequential dataType
57662 while ( current ) {
57663
57664 if ( s.responseFields[ current ] ) {
57665 jqXHR[ s.responseFields[ current ] ] = response;
57666 }
57667
57668 // Apply the dataFilter if provided
57669 if ( !prev && isSuccess && s.dataFilter ) {
57670 response = s.dataFilter( response, s.dataType );
57671 }
57672
57673 prev = current;
57674 current = dataTypes.shift();
57675
57676 if ( current ) {
57677
57678 // There's only work to do if current dataType is non-auto
57679 if ( current === "*" ) {
57680
57681 current = prev;
57682
57683 // Convert response if prev dataType is non-auto and differs from current
57684 } else if ( prev !== "*" && prev !== current ) {
57685
57686 // Seek a direct converter
57687 conv = converters[ prev + " " + current ] || converters[ "* " + current ];
57688
57689 // If none found, seek a pair
57690 if ( !conv ) {
57691 for ( conv2 in converters ) {
57692
57693 // If conv2 outputs current
57694 tmp = conv2.split( " " );
57695 if ( tmp[ 1 ] === current ) {
57696
57697 // If prev can be converted to accepted input
57698 conv = converters[ prev + " " + tmp[ 0 ] ] ||
57699 converters[ "* " + tmp[ 0 ] ];
57700 if ( conv ) {
57701
57702 // Condense equivalence converters
57703 if ( conv === true ) {
57704 conv = converters[ conv2 ];
57705
57706 // Otherwise, insert the intermediate dataType
57707 } else if ( converters[ conv2 ] !== true ) {
57708 current = tmp[ 0 ];
57709 dataTypes.unshift( tmp[ 1 ] );
57710 }
57711 break;
57712 }
57713 }
57714 }
57715 }
57716
57717 // Apply converter (if not an equivalence)
57718 if ( conv !== true ) {
57719
57720 // Unless errors are allowed to bubble, catch and return them
57721 if ( conv && s.throws ) {
57722 response = conv( response );
57723 } else {
57724 try {
57725 response = conv( response );
57726 } catch ( e ) {
57727 return {
57728 state: "parsererror",
57729 error: conv ? e : "No conversion from " + prev + " to " + current
57730 };
57731 }
57732 }
57733 }
57734 }
57735 }
57736 }
57737
57738 return { state: "success", data: response };
57739 }
57740
57741 jQuery.extend( {
57742
57743 // Counter for holding the number of active queries
57744 active: 0,
57745
57746 // Last-Modified header cache for next request
57747 lastModified: {},
57748 etag: {},
57749
57750 ajaxSettings: {
57751 url: location.href,
57752 type: "GET",
57753 isLocal: rlocalProtocol.test( location.protocol ),
57754 global: true,
57755 processData: true,
57756 async: true,
57757 contentType: "application/x-www-form-urlencoded; charset=UTF-8",
57758 /*
57759 timeout: 0,
57760 data: null,
57761 dataType: null,
57762 username: null,
57763 password: null,
57764 cache: null,
57765 throws: false,
57766 traditional: false,
57767 headers: {},
57768 */
57769
57770 accepts: {
57771 "*": allTypes,
57772 text: "text/plain",
57773 html: "text/html",
57774 xml: "application/xml, text/xml",
57775 json: "application/json, text/javascript"
57776 },
57777
57778 contents: {
57779 xml: /\bxml\b/,
57780 html: /\bhtml/,
57781 json: /\bjson\b/
57782 },
57783
57784 responseFields: {
57785 xml: "responseXML",
57786 text: "responseText",
57787 json: "responseJSON"
57788 },
57789
57790 // Data converters
57791 // Keys separate source (or catchall "*") and destination types with a single space
57792 converters: {
57793
57794 // Convert anything to text
57795 "* text": String,
57796
57797 // Text to html (true = no transformation)
57798 "text html": true,
57799
57800 // Evaluate text as a json expression
57801 "text json": jQuery.parseJSON,
57802
57803 // Parse text as xml
57804 "text xml": jQuery.parseXML
57805 },
57806
57807 // For options that shouldn't be deep extended:
57808 // you can add your own custom options here if
57809 // and when you create one that shouldn't be
57810 // deep extended (see ajaxExtend)
57811 flatOptions: {
57812 url: true,
57813 context: true
57814 }
57815 },
57816
57817 // Creates a full fledged settings object into target
57818 // with both ajaxSettings and settings fields.
57819 // If target is omitted, writes into ajaxSettings.
57820 ajaxSetup: function( target, settings ) {
57821 return settings ?
57822
57823 // Building a settings object
57824 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
57825
57826 // Extending ajaxSettings
57827 ajaxExtend( jQuery.ajaxSettings, target );
57828 },
57829
57830 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
57831 ajaxTransport: addToPrefiltersOrTransports( transports ),
57832
57833 // Main method
57834 ajax: function( url, options ) {
57835
57836 // If url is an object, simulate pre-1.5 signature
57837 if ( typeof url === "object" ) {
57838 options = url;
57839 url = undefined;
57840 }
57841
57842 // Force options to be an object
57843 options = options || {};
57844
57845 var transport,
57846
57847 // URL without anti-cache param
57848 cacheURL,
57849
57850 // Response headers
57851 responseHeadersString,
57852 responseHeaders,
57853
57854 // timeout handle
57855 timeoutTimer,
57856
57857 // Url cleanup var
57858 urlAnchor,
57859
57860 // To know if global events are to be dispatched
57861 fireGlobals,
57862
57863 // Loop variable
57864 i,
57865
57866 // Create the final options object
57867 s = jQuery.ajaxSetup( {}, options ),
57868
57869 // Callbacks context
57870 callbackContext = s.context || s,
57871
57872 // Context for global events is callbackContext if it is a DOM node or jQuery collection
57873 globalEventContext = s.context &&
57874 ( callbackContext.nodeType || callbackContext.jquery ) ?
57875 jQuery( callbackContext ) :
57876 jQuery.event,
57877
57878 // Deferreds
57879 deferred = jQuery.Deferred(),
57880 completeDeferred = jQuery.Callbacks( "once memory" ),
57881
57882 // Status-dependent callbacks
57883 statusCode = s.statusCode || {},
57884
57885 // Headers (they are sent all at once)
57886 requestHeaders = {},
57887 requestHeadersNames = {},
57888
57889 // The jqXHR state
57890 state = 0,
57891
57892 // Default abort message
57893 strAbort = "canceled",
57894
57895 // Fake xhr
57896 jqXHR = {
57897 readyState: 0,
57898
57899 // Builds headers hashtable if needed
57900 getResponseHeader: function( key ) {
57901 var match;
57902 if ( state === 2 ) {
57903 if ( !responseHeaders ) {
57904 responseHeaders = {};
57905 while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
57906 responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
57907 }
57908 }
57909 match = responseHeaders[ key.toLowerCase() ];
57910 }
57911 return match == null ? null : match;
57912 },
57913
57914 // Raw string
57915 getAllResponseHeaders: function() {
57916 return state === 2 ? responseHeadersString : null;
57917 },
57918
57919 // Caches the header
57920 setRequestHeader: function( name, value ) {
57921 var lname = name.toLowerCase();
57922 if ( !state ) {
57923 name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
57924 requestHeaders[ name ] = value;
57925 }
57926 return this;
57927 },
57928
57929 // Overrides response content-type header
57930 overrideMimeType: function( type ) {
57931 if ( !state ) {
57932 s.mimeType = type;
57933 }
57934 return this;
57935 },
57936
57937 // Status-dependent callbacks
57938 statusCode: function( map ) {
57939 var code;
57940 if ( map ) {
57941 if ( state < 2 ) {
57942 for ( code in map ) {
57943
57944 // Lazy-add the new callback in a way that preserves old ones
57945 statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
57946 }
57947 } else {
57948
57949 // Execute the appropriate callbacks
57950 jqXHR.always( map[ jqXHR.status ] );
57951 }
57952 }
57953 return this;
57954 },
57955
57956 // Cancel the request
57957 abort: function( statusText ) {
57958 var finalText = statusText || strAbort;
57959 if ( transport ) {
57960 transport.abort( finalText );
57961 }
57962 done( 0, finalText );
57963 return this;
57964 }
57965 };
57966
57967 // Attach deferreds
57968 deferred.promise( jqXHR ).complete = completeDeferred.add;
57969 jqXHR.success = jqXHR.done;
57970 jqXHR.error = jqXHR.fail;
57971
57972 // Remove hash character (#7531: and string promotion)
57973 // Add protocol if not provided (prefilters might expect it)
57974 // Handle falsy url in the settings object (#10093: consistency with old signature)
57975 // We also use the url parameter if available
57976 s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
57977 .replace( rprotocol, location.protocol + "//" );
57978
57979 // Alias method option to type as per ticket #12004
57980 s.type = options.method || options.type || s.method || s.type;
57981
57982 // Extract dataTypes list
57983 s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
57984
57985 // A cross-domain request is in order when the origin doesn't match the current origin.
57986 if ( s.crossDomain == null ) {
57987 urlAnchor = document.createElement( "a" );
57988
57989 // Support: IE8-11+
57990 // IE throws exception if url is malformed, e.g. http://example.com:80x/
57991 try {
57992 urlAnchor.href = s.url;
57993
57994 // Support: IE8-11+
57995 // Anchor's host property isn't correctly set when s.url is relative
57996 urlAnchor.href = urlAnchor.href;
57997 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
57998 urlAnchor.protocol + "//" + urlAnchor.host;
57999 } catch ( e ) {
58000
58001 // If there is an error parsing the URL, assume it is crossDomain,
58002 // it can be rejected by the transport if it is invalid
58003 s.crossDomain = true;
58004 }
58005 }
58006
58007 // Convert data if not already a string
58008 if ( s.data && s.processData && typeof s.data !== "string" ) {
58009 s.data = jQuery.param( s.data, s.traditional );
58010 }
58011
58012 // Apply prefilters
58013 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
58014
58015 // If request was aborted inside a prefilter, stop there
58016 if ( state === 2 ) {
58017 return jqXHR;
58018 }
58019
58020 // We can fire global events as of now if asked to
58021 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
58022 fireGlobals = jQuery.event && s.global;
58023
58024 // Watch for a new set of requests
58025 if ( fireGlobals && jQuery.active++ === 0 ) {
58026 jQuery.event.trigger( "ajaxStart" );
58027 }
58028
58029 // Uppercase the type
58030 s.type = s.type.toUpperCase();
58031
58032 // Determine if request has content
58033 s.hasContent = !rnoContent.test( s.type );
58034
58035 // Save the URL in case we're toying with the If-Modified-Since
58036 // and/or If-None-Match header later on
58037 cacheURL = s.url;
58038
58039 // More options handling for requests with no content
58040 if ( !s.hasContent ) {
58041
58042 // If data is available, append data to url
58043 if ( s.data ) {
58044 cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
58045
58046 // #9682: remove data so that it's not used in an eventual retry
58047 delete s.data;
58048 }
58049
58050 // Add anti-cache in url if needed
58051 if ( s.cache === false ) {
58052 s.url = rts.test( cacheURL ) ?
58053
58054 // If there is already a '_' parameter, set its value
58055 cacheURL.replace( rts, "$1_=" + nonce++ ) :
58056
58057 // Otherwise add one to the end
58058 cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
58059 }
58060 }
58061
58062 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
58063 if ( s.ifModified ) {
58064 if ( jQuery.lastModified[ cacheURL ] ) {
58065 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
58066 }
58067 if ( jQuery.etag[ cacheURL ] ) {
58068 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
58069 }
58070 }
58071
58072 // Set the correct header, if data is being sent
58073 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
58074 jqXHR.setRequestHeader( "Content-Type", s.contentType );
58075 }
58076
58077 // Set the Accepts header for the server, depending on the dataType
58078 jqXHR.setRequestHeader(
58079 "Accept",
58080 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
58081 s.accepts[ s.dataTypes[ 0 ] ] +
58082 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
58083 s.accepts[ "*" ]
58084 );
58085
58086 // Check for headers option
58087 for ( i in s.headers ) {
58088 jqXHR.setRequestHeader( i, s.headers[ i ] );
58089 }
58090
58091 // Allow custom headers/mimetypes and early abort
58092 if ( s.beforeSend &&
58093 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
58094
58095 // Abort if not done already and return
58096 return jqXHR.abort();
58097 }
58098
58099 // Aborting is no longer a cancellation
58100 strAbort = "abort";
58101
58102 // Install callbacks on deferreds
58103 for ( i in { success: 1, error: 1, complete: 1 } ) {
58104 jqXHR[ i ]( s[ i ] );
58105 }
58106
58107 // Get transport
58108 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
58109
58110 // If no transport, we auto-abort
58111 if ( !transport ) {
58112 done( -1, "No Transport" );
58113 } else {
58114 jqXHR.readyState = 1;
58115
58116 // Send global event
58117 if ( fireGlobals ) {
58118 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
58119 }
58120
58121 // If request was aborted inside ajaxSend, stop there
58122 if ( state === 2 ) {
58123 return jqXHR;
58124 }
58125
58126 // Timeout
58127 if ( s.async && s.timeout > 0 ) {
58128 timeoutTimer = window.setTimeout( function() {
58129 jqXHR.abort( "timeout" );
58130 }, s.timeout );
58131 }
58132
58133 try {
58134 state = 1;
58135 transport.send( requestHeaders, done );
58136 } catch ( e ) {
58137
58138 // Propagate exception as error if not done
58139 if ( state < 2 ) {
58140 done( -1, e );
58141
58142 // Simply rethrow otherwise
58143 } else {
58144 throw e;
58145 }
58146 }
58147 }
58148
58149 // Callback for when everything is done
58150 function done( status, nativeStatusText, responses, headers ) {
58151 var isSuccess, success, error, response, modified,
58152 statusText = nativeStatusText;
58153
58154 // Called once
58155 if ( state === 2 ) {
58156 return;
58157 }
58158
58159 // State is "done" now
58160 state = 2;
58161
58162 // Clear timeout if it exists
58163 if ( timeoutTimer ) {
58164 window.clearTimeout( timeoutTimer );
58165 }
58166
58167 // Dereference transport for early garbage collection
58168 // (no matter how long the jqXHR object will be used)
58169 transport = undefined;
58170
58171 // Cache response headers
58172 responseHeadersString = headers || "";
58173
58174 // Set readyState
58175 jqXHR.readyState = status > 0 ? 4 : 0;
58176
58177 // Determine if successful
58178 isSuccess = status >= 200 && status < 300 || status === 304;
58179
58180 // Get response data
58181 if ( responses ) {
58182 response = ajaxHandleResponses( s, jqXHR, responses );
58183 }
58184
58185 // Convert no matter what (that way responseXXX fields are always set)
58186 response = ajaxConvert( s, response, jqXHR, isSuccess );
58187
58188 // If successful, handle type chaining
58189 if ( isSuccess ) {
58190
58191 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
58192 if ( s.ifModified ) {
58193 modified = jqXHR.getResponseHeader( "Last-Modified" );
58194 if ( modified ) {
58195 jQuery.lastModified[ cacheURL ] = modified;
58196 }
58197 modified = jqXHR.getResponseHeader( "etag" );
58198 if ( modified ) {
58199 jQuery.etag[ cacheURL ] = modified;
58200 }
58201 }
58202
58203 // if no content
58204 if ( status === 204 || s.type === "HEAD" ) {
58205 statusText = "nocontent";
58206
58207 // if not modified
58208 } else if ( status === 304 ) {
58209 statusText = "notmodified";
58210
58211 // If we have data, let's convert it
58212 } else {
58213 statusText = response.state;
58214 success = response.data;
58215 error = response.error;
58216 isSuccess = !error;
58217 }
58218 } else {
58219
58220 // Extract error from statusText and normalize for non-aborts
58221 error = statusText;
58222 if ( status || !statusText ) {
58223 statusText = "error";
58224 if ( status < 0 ) {
58225 status = 0;
58226 }
58227 }
58228 }
58229
58230 // Set data for the fake xhr object
58231 jqXHR.status = status;
58232 jqXHR.statusText = ( nativeStatusText || statusText ) + "";
58233
58234 // Success/Error
58235 if ( isSuccess ) {
58236 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
58237 } else {
58238 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
58239 }
58240
58241 // Status-dependent callbacks
58242 jqXHR.statusCode( statusCode );
58243 statusCode = undefined;
58244
58245 if ( fireGlobals ) {
58246 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
58247 [ jqXHR, s, isSuccess ? success : error ] );
58248 }
58249
58250 // Complete
58251 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
58252
58253 if ( fireGlobals ) {
58254 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
58255
58256 // Handle the global AJAX counter
58257 if ( !( --jQuery.active ) ) {
58258 jQuery.event.trigger( "ajaxStop" );
58259 }
58260 }
58261 }
58262
58263 return jqXHR;
58264 },
58265
58266 getJSON: function( url, data, callback ) {
58267 return jQuery.get( url, data, callback, "json" );
58268 },
58269
58270 getScript: function( url, callback ) {
58271 return jQuery.get( url, undefined, callback, "script" );
58272 }
58273 } );
58274
58275 jQuery.each( [ "get", "post" ], function( i, method ) {
58276 jQuery[ method ] = function( url, data, callback, type ) {
58277
58278 // Shift arguments if data argument was omitted
58279 if ( jQuery.isFunction( data ) ) {
58280 type = type || callback;
58281 callback = data;
58282 data = undefined;
58283 }
58284
58285 // The url can be an options object (which then must have .url)
58286 return jQuery.ajax( jQuery.extend( {
58287 url: url,
58288 type: method,
58289 dataType: type,
58290 data: data,
58291 success: callback
58292 }, jQuery.isPlainObject( url ) && url ) );
58293 };
58294 } );
58295
58296
58297 jQuery._evalUrl = function( url ) {
58298 return jQuery.ajax( {
58299 url: url,
58300
58301 // Make this explicit, since user can override this through ajaxSetup (#11264)
58302 type: "GET",
58303 dataType: "script",
58304 async: false,
58305 global: false,
58306 "throws": true
58307 } );
58308 };
58309
58310
58311 jQuery.fn.extend( {
58312 wrapAll: function( html ) {
58313 var wrap;
58314
58315 if ( jQuery.isFunction( html ) ) {
58316 return this.each( function( i ) {
58317 jQuery( this ).wrapAll( html.call( this, i ) );
58318 } );
58319 }
58320
58321 if ( this[ 0 ] ) {
58322
58323 // The elements to wrap the target around
58324 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
58325
58326 if ( this[ 0 ].parentNode ) {
58327 wrap.insertBefore( this[ 0 ] );
58328 }
58329
58330 wrap.map( function() {
58331 var elem = this;
58332
58333 while ( elem.firstElementChild ) {
58334 elem = elem.firstElementChild;
58335 }
58336
58337 return elem;
58338 } ).append( this );
58339 }
58340
58341 return this;
58342 },
58343
58344 wrapInner: function( html ) {
58345 if ( jQuery.isFunction( html ) ) {
58346 return this.each( function( i ) {
58347 jQuery( this ).wrapInner( html.call( this, i ) );
58348 } );
58349 }
58350
58351 return this.each( function() {
58352 var self = jQuery( this ),
58353 contents = self.contents();
58354
58355 if ( contents.length ) {
58356 contents.wrapAll( html );
58357
58358 } else {
58359 self.append( html );
58360 }
58361 } );
58362 },
58363
58364 wrap: function( html ) {
58365 var isFunction = jQuery.isFunction( html );
58366
58367 return this.each( function( i ) {
58368 jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
58369 } );
58370 },
58371
58372 unwrap: function() {
58373 return this.parent().each( function() {
58374 if ( !jQuery.nodeName( this, "body" ) ) {
58375 jQuery( this ).replaceWith( this.childNodes );
58376 }
58377 } ).end();
58378 }
58379 } );
58380
58381
58382 jQuery.expr.filters.hidden = function( elem ) {
58383 return !jQuery.expr.filters.visible( elem );
58384 };
58385 jQuery.expr.filters.visible = function( elem ) {
58386
58387 // Support: Opera <= 12.12
58388 // Opera reports offsetWidths and offsetHeights less than zero on some elements
58389 // Use OR instead of AND as the element is not visible if either is true
58390 // See tickets #10406 and #13132
58391 return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
58392 };
58393
58394
58395
58396
58397 var r20 = /%20/g,
58398 rbracket = /\[\]$/,
58399 rCRLF = /\r?\n/g,
58400 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
58401 rsubmittable = /^(?:input|select|textarea|keygen)/i;
58402
58403 function buildParams( prefix, obj, traditional, add ) {
58404 var name;
58405
58406 if ( jQuery.isArray( obj ) ) {
58407
58408 // Serialize array item.
58409 jQuery.each( obj, function( i, v ) {
58410 if ( traditional || rbracket.test( prefix ) ) {
58411
58412 // Treat each array item as a scalar.
58413 add( prefix, v );
58414
58415 } else {
58416
58417 // Item is non-scalar (array or object), encode its numeric index.
58418 buildParams(
58419 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
58420 v,
58421 traditional,
58422 add
58423 );
58424 }
58425 } );
58426
58427 } else if ( !traditional && jQuery.type( obj ) === "object" ) {
58428
58429 // Serialize object item.
58430 for ( name in obj ) {
58431 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
58432 }
58433
58434 } else {
58435
58436 // Serialize scalar item.
58437 add( prefix, obj );
58438 }
58439 }
58440
58441 // Serialize an array of form elements or a set of
58442 // key/values into a query string
58443 jQuery.param = function( a, traditional ) {
58444 var prefix,
58445 s = [],
58446 add = function( key, value ) {
58447
58448 // If value is a function, invoke it and return its value
58449 value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
58450 s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
58451 };
58452
58453 // Set traditional to true for jQuery <= 1.3.2 behavior.
58454 if ( traditional === undefined ) {
58455 traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
58456 }
58457
58458 // If an array was passed in, assume that it is an array of form elements.
58459 if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
58460
58461 // Serialize the form elements
58462 jQuery.each( a, function() {
58463 add( this.name, this.value );
58464 } );
58465
58466 } else {
58467
58468 // If traditional, encode the "old" way (the way 1.3.2 or older
58469 // did it), otherwise encode params recursively.
58470 for ( prefix in a ) {
58471 buildParams( prefix, a[ prefix ], traditional, add );
58472 }
58473 }
58474
58475 // Return the resulting serialization
58476 return s.join( "&" ).replace( r20, "+" );
58477 };
58478
58479 jQuery.fn.extend( {
58480 serialize: function() {
58481 return jQuery.param( this.serializeArray() );
58482 },
58483 serializeArray: function() {
58484 return this.map( function() {
58485
58486 // Can add propHook for "elements" to filter or add form elements
58487 var elements = jQuery.prop( this, "elements" );
58488 return elements ? jQuery.makeArray( elements ) : this;
58489 } )
58490 .filter( function() {
58491 var type = this.type;
58492
58493 // Use .is( ":disabled" ) so that fieldset[disabled] works
58494 return this.name && !jQuery( this ).is( ":disabled" ) &&
58495 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
58496 ( this.checked || !rcheckableType.test( type ) );
58497 } )
58498 .map( function( i, elem ) {
58499 var val = jQuery( this ).val();
58500
58501 return val == null ?
58502 null :
58503 jQuery.isArray( val ) ?
58504 jQuery.map( val, function( val ) {
58505 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
58506 } ) :
58507 { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
58508 } ).get();
58509 }
58510 } );
58511
58512
58513 jQuery.ajaxSettings.xhr = function() {
58514 try {
58515 return new window.XMLHttpRequest();
58516 } catch ( e ) {}
58517 };
58518
58519 var xhrSuccessStatus = {
58520
58521 // File protocol always yields status code 0, assume 200
58522 0: 200,
58523
58524 // Support: IE9
58525 // #1450: sometimes IE returns 1223 when it should be 204
58526 1223: 204
58527 },
58528 xhrSupported = jQuery.ajaxSettings.xhr();
58529
58530 support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
58531 support.ajax = xhrSupported = !!xhrSupported;
58532
58533 jQuery.ajaxTransport( function( options ) {
58534 var callback, errorCallback;
58535
58536 // Cross domain only allowed if supported through XMLHttpRequest
58537 if ( support.cors || xhrSupported && !options.crossDomain ) {
58538 return {
58539 send: function( headers, complete ) {
58540 var i,
58541 xhr = options.xhr();
58542
58543 xhr.open(
58544 options.type,
58545 options.url,
58546 options.async,
58547 options.username,
58548 options.password
58549 );
58550
58551 // Apply custom fields if provided
58552 if ( options.xhrFields ) {
58553 for ( i in options.xhrFields ) {
58554 xhr[ i ] = options.xhrFields[ i ];
58555 }
58556 }
58557
58558 // Override mime type if needed
58559 if ( options.mimeType && xhr.overrideMimeType ) {
58560 xhr.overrideMimeType( options.mimeType );
58561 }
58562
58563 // X-Requested-With header
58564 // For cross-domain requests, seeing as conditions for a preflight are
58565 // akin to a jigsaw puzzle, we simply never set it to be sure.
58566 // (it can always be set on a per-request basis or even using ajaxSetup)
58567 // For same-domain requests, won't change header if already provided.
58568 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
58569 headers[ "X-Requested-With" ] = "XMLHttpRequest";
58570 }
58571
58572 // Set headers
58573 for ( i in headers ) {
58574 xhr.setRequestHeader( i, headers[ i ] );
58575 }
58576
58577 // Callback
58578 callback = function( type ) {
58579 return function() {
58580 if ( callback ) {
58581 callback = errorCallback = xhr.onload =
58582 xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
58583
58584 if ( type === "abort" ) {
58585 xhr.abort();
58586 } else if ( type === "error" ) {
58587
58588 // Support: IE9
58589 // On a manual native abort, IE9 throws
58590 // errors on any property access that is not readyState
58591 if ( typeof xhr.status !== "number" ) {
58592 complete( 0, "error" );
58593 } else {
58594 complete(
58595
58596 // File: protocol always yields status 0; see #8605, #14207
58597 xhr.status,
58598 xhr.statusText
58599 );
58600 }
58601 } else {
58602 complete(
58603 xhrSuccessStatus[ xhr.status ] || xhr.status,
58604 xhr.statusText,
58605
58606 // Support: IE9 only
58607 // IE9 has no XHR2 but throws on binary (trac-11426)
58608 // For XHR2 non-text, let the caller handle it (gh-2498)
58609 ( xhr.responseType || "text" ) !== "text" ||
58610 typeof xhr.responseText !== "string" ?
58611 { binary: xhr.response } :
58612 { text: xhr.responseText },
58613 xhr.getAllResponseHeaders()
58614 );
58615 }
58616 }
58617 };
58618 };
58619
58620 // Listen to events
58621 xhr.onload = callback();
58622 errorCallback = xhr.onerror = callback( "error" );
58623
58624 // Support: IE9
58625 // Use onreadystatechange to replace onabort
58626 // to handle uncaught aborts
58627 if ( xhr.onabort !== undefined ) {
58628 xhr.onabort = errorCallback;
58629 } else {
58630 xhr.onreadystatechange = function() {
58631
58632 // Check readyState before timeout as it changes
58633 if ( xhr.readyState === 4 ) {
58634
58635 // Allow onerror to be called first,
58636 // but that will not handle a native abort
58637 // Also, save errorCallback to a variable
58638 // as xhr.onerror cannot be accessed
58639 window.setTimeout( function() {
58640 if ( callback ) {
58641 errorCallback();
58642 }
58643 } );
58644 }
58645 };
58646 }
58647
58648 // Create the abort callback
58649 callback = callback( "abort" );
58650
58651 try {
58652
58653 // Do send the request (this may raise an exception)
58654 xhr.send( options.hasContent && options.data || null );
58655 } catch ( e ) {
58656
58657 // #14683: Only rethrow if this hasn't been notified as an error yet
58658 if ( callback ) {
58659 throw e;
58660 }
58661 }
58662 },
58663
58664 abort: function() {
58665 if ( callback ) {
58666 callback();
58667 }
58668 }
58669 };
58670 }
58671 } );
58672
58673
58674
58675
58676 // Install script dataType
58677 jQuery.ajaxSetup( {
58678 accepts: {
58679 script: "text/javascript, application/javascript, " +
58680 "application/ecmascript, application/x-ecmascript"
58681 },
58682 contents: {
58683 script: /\b(?:java|ecma)script\b/
58684 },
58685 converters: {
58686 "text script": function( text ) {
58687 jQuery.globalEval( text );
58688 return text;
58689 }
58690 }
58691 } );
58692
58693 // Handle cache's special case and crossDomain
58694 jQuery.ajaxPrefilter( "script", function( s ) {
58695 if ( s.cache === undefined ) {
58696 s.cache = false;
58697 }
58698 if ( s.crossDomain ) {
58699 s.type = "GET";
58700 }
58701 } );
58702
58703 // Bind script tag hack transport
58704 jQuery.ajaxTransport( "script", function( s ) {
58705
58706 // This transport only deals with cross domain requests
58707 if ( s.crossDomain ) {
58708 var script, callback;
58709 return {
58710 send: function( _, complete ) {
58711 script = jQuery( "<script>" ).prop( {
58712 charset: s.scriptCharset,
58713 src: s.url
58714 } ).on(
58715 "load error",
58716 callback = function( evt ) {
58717 script.remove();
58718 callback = null;
58719 if ( evt ) {
58720 complete( evt.type === "error" ? 404 : 200, evt.type );
58721 }
58722 }
58723 );
58724
58725 // Use native DOM manipulation to avoid our domManip AJAX trickery
58726 document.head.appendChild( script[ 0 ] );
58727 },
58728 abort: function() {
58729 if ( callback ) {
58730 callback();
58731 }
58732 }
58733 };
58734 }
58735 } );
58736
58737
58738
58739
58740 var oldCallbacks = [],
58741 rjsonp = /(=)\?(?=&|$)|\?\?/;
58742
58743 // Default jsonp settings
58744 jQuery.ajaxSetup( {
58745 jsonp: "callback",
58746 jsonpCallback: function() {
58747 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
58748 this[ callback ] = true;
58749 return callback;
58750 }
58751 } );
58752
58753 // Detect, normalize options and install callbacks for jsonp requests
58754 jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
58755
58756 var callbackName, overwritten, responseContainer,
58757 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
58758 "url" :
58759 typeof s.data === "string" &&
58760 ( s.contentType || "" )
58761 .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
58762 rjsonp.test( s.data ) && "data"
58763 );
58764
58765 // Handle iff the expected data type is "jsonp" or we have a parameter to set
58766 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
58767
58768 // Get callback name, remembering preexisting value associated with it
58769 callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
58770 s.jsonpCallback() :
58771 s.jsonpCallback;
58772
58773 // Insert callback into url or form data
58774 if ( jsonProp ) {
58775 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
58776 } else if ( s.jsonp !== false ) {
58777 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
58778 }
58779
58780 // Use data converter to retrieve json after script execution
58781 s.converters[ "script json" ] = function() {
58782 if ( !responseContainer ) {
58783 jQuery.error( callbackName + " was not called" );
58784 }
58785 return responseContainer[ 0 ];
58786 };
58787
58788 // Force json dataType
58789 s.dataTypes[ 0 ] = "json";
58790
58791 // Install callback
58792 overwritten = window[ callbackName ];
58793 window[ callbackName ] = function() {
58794 responseContainer = arguments;
58795 };
58796
58797 // Clean-up function (fires after converters)
58798 jqXHR.always( function() {
58799
58800 // If previous value didn't exist - remove it
58801 if ( overwritten === undefined ) {
58802 jQuery( window ).removeProp( callbackName );
58803
58804 // Otherwise restore preexisting value
58805 } else {
58806 window[ callbackName ] = overwritten;
58807 }
58808
58809 // Save back as free
58810 if ( s[ callbackName ] ) {
58811
58812 // Make sure that re-using the options doesn't screw things around
58813 s.jsonpCallback = originalSettings.jsonpCallback;
58814
58815 // Save the callback name for future use
58816 oldCallbacks.push( callbackName );
58817 }
58818
58819 // Call if it was a function and we have a response
58820 if ( responseContainer && jQuery.isFunction( overwritten ) ) {
58821 overwritten( responseContainer[ 0 ] );
58822 }
58823
58824 responseContainer = overwritten = undefined;
58825 } );
58826
58827 // Delegate to script
58828 return "script";
58829 }
58830 } );
58831
58832
58833
58834
58835 // Argument "data" should be string of html
58836 // context (optional): If specified, the fragment will be created in this context,
58837 // defaults to document
58838 // keepScripts (optional): If true, will include scripts passed in the html string
58839 jQuery.parseHTML = function( data, context, keepScripts ) {
58840 if ( !data || typeof data !== "string" ) {
58841 return null;
58842 }
58843 if ( typeof context === "boolean" ) {
58844 keepScripts = context;
58845 context = false;
58846 }
58847 context = context || document;
58848
58849 var parsed = rsingleTag.exec( data ),
58850 scripts = !keepScripts && [];
58851
58852 // Single tag
58853 if ( parsed ) {
58854 return [ context.createElement( parsed[ 1 ] ) ];
58855 }
58856
58857 parsed = buildFragment( [ data ], context, scripts );
58858
58859 if ( scripts && scripts.length ) {
58860 jQuery( scripts ).remove();
58861 }
58862
58863 return jQuery.merge( [], parsed.childNodes );
58864 };
58865
58866
58867 // Keep a copy of the old load method
58868 var _load = jQuery.fn.load;
58869
58870 /**
58871 * Load a url into a page
58872 */
58873 jQuery.fn.load = function( url, params, callback ) {
58874 if ( typeof url !== "string" && _load ) {
58875 return _load.apply( this, arguments );
58876 }
58877
58878 var selector, type, response,
58879 self = this,
58880 off = url.indexOf( " " );
58881
58882 if ( off > -1 ) {
58883 selector = jQuery.trim( url.slice( off ) );
58884 url = url.slice( 0, off );
58885 }
58886
58887 // If it's a function
58888 if ( jQuery.isFunction( params ) ) {
58889
58890 // We assume that it's the callback
58891 callback = params;
58892 params = undefined;
58893
58894 // Otherwise, build a param string
58895 } else if ( params && typeof params === "object" ) {
58896 type = "POST";
58897 }
58898
58899 // If we have elements to modify, make the request
58900 if ( self.length > 0 ) {
58901 jQuery.ajax( {
58902 url: url,
58903
58904 // If "type" variable is undefined, then "GET" method will be used.
58905 // Make value of this field explicit since
58906 // user can override it through ajaxSetup method
58907 type: type || "GET",
58908 dataType: "html",
58909 data: params
58910 } ).done( function( responseText ) {
58911
58912 // Save response for use in complete callback
58913 response = arguments;
58914
58915 self.html( selector ?
58916
58917 // If a selector was specified, locate the right elements in a dummy div
58918 // Exclude scripts to avoid IE 'Permission Denied' errors
58919 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
58920
58921 // Otherwise use the full result
58922 responseText );
58923
58924 // If the request succeeds, this function gets "data", "status", "jqXHR"
58925 // but they are ignored because response was set above.
58926 // If it fails, this function gets "jqXHR", "status", "error"
58927 } ).always( callback && function( jqXHR, status ) {
58928 self.each( function() {
58929 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
58930 } );
58931 } );
58932 }
58933
58934 return this;
58935 };
58936
58937
58938
58939
58940 // Attach a bunch of functions for handling common AJAX events
58941 jQuery.each( [
58942 "ajaxStart",
58943 "ajaxStop",
58944 "ajaxComplete",
58945 "ajaxError",
58946 "ajaxSuccess",
58947 "ajaxSend"
58948 ], function( i, type ) {
58949 jQuery.fn[ type ] = function( fn ) {
58950 return this.on( type, fn );
58951 };
58952 } );
58953
58954
58955
58956
58957 jQuery.expr.filters.animated = function( elem ) {
58958 return jQuery.grep( jQuery.timers, function( fn ) {
58959 return elem === fn.elem;
58960 } ).length;
58961 };
58962
58963
58964
58965
58966 /**
58967 * Gets a window from an element
58968 */
58969 function getWindow( elem ) {
58970 return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
58971 }
58972
58973 jQuery.offset = {
58974 setOffset: function( elem, options, i ) {
58975 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
58976 position = jQuery.css( elem, "position" ),
58977 curElem = jQuery( elem ),
58978 props = {};
58979
58980 // Set position first, in-case top/left are set even on static elem
58981 if ( position === "static" ) {
58982 elem.style.position = "relative";
58983 }
58984
58985 curOffset = curElem.offset();
58986 curCSSTop = jQuery.css( elem, "top" );
58987 curCSSLeft = jQuery.css( elem, "left" );
58988 calculatePosition = ( position === "absolute" || position === "fixed" ) &&
58989 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
58990
58991 // Need to be able to calculate position if either
58992 // top or left is auto and position is either absolute or fixed
58993 if ( calculatePosition ) {
58994 curPosition = curElem.position();
58995 curTop = curPosition.top;
58996 curLeft = curPosition.left;
58997
58998 } else {
58999 curTop = parseFloat( curCSSTop ) || 0;
59000 curLeft = parseFloat( curCSSLeft ) || 0;
59001 }
59002
59003 if ( jQuery.isFunction( options ) ) {
59004
59005 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
59006 options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
59007 }
59008
59009 if ( options.top != null ) {
59010 props.top = ( options.top - curOffset.top ) + curTop;
59011 }
59012 if ( options.left != null ) {
59013 props.left = ( options.left - curOffset.left ) + curLeft;
59014 }
59015
59016 if ( "using" in options ) {
59017 options.using.call( elem, props );
59018
59019 } else {
59020 curElem.css( props );
59021 }
59022 }
59023 };
59024
59025 jQuery.fn.extend( {
59026 offset: function( options ) {
59027 if ( arguments.length ) {
59028 return options === undefined ?
59029 this :
59030 this.each( function( i ) {
59031 jQuery.offset.setOffset( this, options, i );
59032 } );
59033 }
59034
59035 var docElem, win,
59036 elem = this[ 0 ],
59037 box = { top: 0, left: 0 },
59038 doc = elem && elem.ownerDocument;
59039
59040 if ( !doc ) {
59041 return;
59042 }
59043
59044 docElem = doc.documentElement;
59045
59046 // Make sure it's not a disconnected DOM node
59047 if ( !jQuery.contains( docElem, elem ) ) {
59048 return box;
59049 }
59050
59051 box = elem.getBoundingClientRect();
59052 win = getWindow( doc );
59053 return {
59054 top: box.top + win.pageYOffset - docElem.clientTop,
59055 left: box.left + win.pageXOffset - docElem.clientLeft
59056 };
59057 },
59058
59059 position: function() {
59060 if ( !this[ 0 ] ) {
59061 return;
59062 }
59063
59064 var offsetParent, offset,
59065 elem = this[ 0 ],
59066 parentOffset = { top: 0, left: 0 };
59067
59068 // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
59069 // because it is its only offset parent
59070 if ( jQuery.css( elem, "position" ) === "fixed" ) {
59071
59072 // Assume getBoundingClientRect is there when computed position is fixed
59073 offset = elem.getBoundingClientRect();
59074
59075 } else {
59076
59077 // Get *real* offsetParent
59078 offsetParent = this.offsetParent();
59079
59080 // Get correct offsets
59081 offset = this.offset();
59082 if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
59083 parentOffset = offsetParent.offset();
59084 }
59085
59086 // Add offsetParent borders
59087 parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
59088 parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
59089 }
59090
59091 // Subtract parent offsets and element margins
59092 return {
59093 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
59094 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
59095 };
59096 },
59097
59098 // This method will return documentElement in the following cases:
59099 // 1) For the element inside the iframe without offsetParent, this method will return
59100 // documentElement of the parent window
59101 // 2) For the hidden or detached element
59102 // 3) For body or html element, i.e. in case of the html node - it will return itself
59103 //
59104 // but those exceptions were never presented as a real life use-cases
59105 // and might be considered as more preferable results.
59106 //
59107 // This logic, however, is not guaranteed and can change at any point in the future
59108 offsetParent: function() {
59109 return this.map( function() {
59110 var offsetParent = this.offsetParent;
59111
59112 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
59113 offsetParent = offsetParent.offsetParent;
59114 }
59115
59116 return offsetParent || documentElement;
59117 } );
59118 }
59119 } );
59120
59121 // Create scrollLeft and scrollTop methods
59122 jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
59123 var top = "pageYOffset" === prop;
59124
59125 jQuery.fn[ method ] = function( val ) {
59126 return access( this, function( elem, method, val ) {
59127 var win = getWindow( elem );
59128
59129 if ( val === undefined ) {
59130 return win ? win[ prop ] : elem[ method ];
59131 }
59132
59133 if ( win ) {
59134 win.scrollTo(
59135 !top ? val : win.pageXOffset,
59136 top ? val : win.pageYOffset
59137 );
59138
59139 } else {
59140 elem[ method ] = val;
59141 }
59142 }, method, val, arguments.length );
59143 };
59144 } );
59145
59146 // Support: Safari<7-8+, Chrome<37-44+
59147 // Add the top/left cssHooks using jQuery.fn.position
59148 // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
59149 // Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
59150 // getComputedStyle returns percent when specified for top/left/bottom/right;
59151 // rather than make the css module depend on the offset module, just check for it here
59152 jQuery.each( [ "top", "left" ], function( i, prop ) {
59153 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
59154 function( elem, computed ) {
59155 if ( computed ) {
59156 computed = curCSS( elem, prop );
59157
59158 // If curCSS returns percentage, fallback to offset
59159 return rnumnonpx.test( computed ) ?
59160 jQuery( elem ).position()[ prop ] + "px" :
59161 computed;
59162 }
59163 }
59164 );
59165 } );
59166
59167
59168 // Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
59169 jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
59170 jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
59171 function( defaultExtra, funcName ) {
59172
59173 // Margin is only for outerHeight, outerWidth
59174 jQuery.fn[ funcName ] = function( margin, value ) {
59175 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
59176 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
59177
59178 return access( this, function( elem, type, value ) {
59179 var doc;
59180
59181 if ( jQuery.isWindow( elem ) ) {
59182
59183 // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
59184 // isn't a whole lot we can do. See pull request at this URL for discussion:
59185 // https://github.com/jquery/jquery/pull/764
59186 return elem.document.documentElement[ "client" + name ];
59187 }
59188
59189 // Get document width or height
59190 if ( elem.nodeType === 9 ) {
59191 doc = elem.documentElement;
59192
59193 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
59194 // whichever is greatest
59195 return Math.max(
59196 elem.body[ "scroll" + name ], doc[ "scroll" + name ],
59197 elem.body[ "offset" + name ], doc[ "offset" + name ],
59198 doc[ "client" + name ]
59199 );
59200 }
59201
59202 return value === undefined ?
59203
59204 // Get width or height on the element, requesting but not forcing parseFloat
59205 jQuery.css( elem, type, extra ) :
59206
59207 // Set width or height on the element
59208 jQuery.style( elem, type, value, extra );
59209 }, type, chainable ? margin : undefined, chainable, null );
59210 };
59211 } );
59212 } );
59213
59214
59215 jQuery.fn.extend( {
59216
59217 bind: function( types, data, fn ) {
59218 return this.on( types, null, data, fn );
59219 },
59220 unbind: function( types, fn ) {
59221 return this.off( types, null, fn );
59222 },
59223
59224 delegate: function( selector, types, data, fn ) {
59225 return this.on( types, selector, data, fn );
59226 },
59227 undelegate: function( selector, types, fn ) {
59228
59229 // ( namespace ) or ( selector, types [, fn] )
59230 return arguments.length === 1 ?
59231 this.off( selector, "**" ) :
59232 this.off( types, selector || "**", fn );
59233 },
59234 size: function() {
59235 return this.length;
59236 }
59237 } );
59238
59239 jQuery.fn.andSelf = jQuery.fn.addBack;
59240
59241
59242
59243
59244 // Register as a named AMD module, since jQuery can be concatenated with other
59245 // files that may use define, but not via a proper concatenation script that
59246 // understands anonymous AMD modules. A named AMD is safest and most robust
59247 // way to register. Lowercase jquery is used because AMD module names are
59248 // derived from file names, and jQuery is normally delivered in a lowercase
59249 // file name. Do this after creating the global so that if an AMD module wants
59250 // to call noConflict to hide this version of jQuery, it will work.
59251
59252 // Note that for maximum portability, libraries that are not jQuery should
59253 // declare themselves as anonymous modules, and avoid setting a global if an
59254 // AMD loader is present. jQuery is a special case. For more information, see
59255 // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
59256
59257 if ( true ) {
59258 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() {
59259 return jQuery;
59260 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
59261 }
59262
59263
59264
59265 var
59266
59267 // Map over jQuery in case of overwrite
59268 _jQuery = window.jQuery,
59269
59270 // Map over the $ in case of overwrite
59271 _$ = window.$;
59272
59273 jQuery.noConflict = function( deep ) {
59274 if ( window.$ === jQuery ) {
59275 window.$ = _$;
59276 }
59277
59278 if ( deep && window.jQuery === jQuery ) {
59279 window.jQuery = _jQuery;
59280 }
59281
59282 return jQuery;
59283 };
59284
59285 // Expose jQuery and $ identifiers, even in AMD
59286 // (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
59287 // and CommonJS for browser emulators (#13566)
59288 if ( !noGlobal ) {
59289 window.jQuery = window.$ = jQuery;
59290 }
59291
59292 return jQuery;
59293 }));
59294
59295
59296/***/ },
59297/* 615 */
59298/***/ function(module, exports, __webpack_require__) {
59299
59300 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
59301 * Bootstrap: alert.js v3.3.7
59302 * http://getbootstrap.com/javascript/#alerts
59303 * ========================================================================
59304 * Copyright 2011-2016 Twitter, Inc.
59305 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
59306 * ======================================================================== */
59307
59308
59309 +function ($) {
59310 'use strict';
59311
59312 // ALERT CLASS DEFINITION
59313 // ======================
59314
59315 var dismiss = '[data-dismiss="alert"]'
59316 var Alert = function (el) {
59317 $(el).on('click', dismiss, this.close)
59318 }
59319
59320 Alert.VERSION = '3.3.7'
59321
59322 Alert.TRANSITION_DURATION = 150
59323
59324 Alert.prototype.close = function (e) {
59325 var $this = $(this)
59326 var selector = $this.attr('data-target')
59327
59328 if (!selector) {
59329 selector = $this.attr('href')
59330 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
59331 }
59332
59333 var $parent = $(selector === '#' ? [] : selector)
59334
59335 if (e) e.preventDefault()
59336
59337 if (!$parent.length) {
59338 $parent = $this.closest('.alert')
59339 }
59340
59341 $parent.trigger(e = $.Event('close.bs.alert'))
59342
59343 if (e.isDefaultPrevented()) return
59344
59345 $parent.removeClass('in')
59346
59347 function removeElement() {
59348 // detach from parent, fire event then clean up data
59349 $parent.detach().trigger('closed.bs.alert').remove()
59350 }
59351
59352 $.support.transition && $parent.hasClass('fade') ?
59353 $parent
59354 .one('bsTransitionEnd', removeElement)
59355 .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
59356 removeElement()
59357 }
59358
59359
59360 // ALERT PLUGIN DEFINITION
59361 // =======================
59362
59363 function Plugin(option) {
59364 return this.each(function () {
59365 var $this = $(this)
59366 var data = $this.data('bs.alert')
59367
59368 if (!data) $this.data('bs.alert', (data = new Alert(this)))
59369 if (typeof option == 'string') data[option].call($this)
59370 })
59371 }
59372
59373 var old = $.fn.alert
59374
59375 $.fn.alert = Plugin
59376 $.fn.alert.Constructor = Alert
59377
59378
59379 // ALERT NO CONFLICT
59380 // =================
59381
59382 $.fn.alert.noConflict = function () {
59383 $.fn.alert = old
59384 return this
59385 }
59386
59387
59388 // ALERT DATA-API
59389 // ==============
59390
59391 $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
59392
59393 }(jQuery);
59394
59395 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
59396
59397/***/ },
59398/* 616 */
59399/***/ function(module, exports, __webpack_require__) {
59400
59401 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
59402 * Bootstrap: button.js v3.3.7
59403 * http://getbootstrap.com/javascript/#buttons
59404 * ========================================================================
59405 * Copyright 2011-2016 Twitter, Inc.
59406 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
59407 * ======================================================================== */
59408
59409
59410 +function ($) {
59411 'use strict';
59412
59413 // BUTTON PUBLIC CLASS DEFINITION
59414 // ==============================
59415
59416 var Button = function (element, options) {
59417 this.$element = $(element)
59418 this.options = $.extend({}, Button.DEFAULTS, options)
59419 this.isLoading = false
59420 }
59421
59422 Button.VERSION = '3.3.7'
59423
59424 Button.DEFAULTS = {
59425 loadingText: 'loading...'
59426 }
59427
59428 Button.prototype.setState = function (state) {
59429 var d = 'disabled'
59430 var $el = this.$element
59431 var val = $el.is('input') ? 'val' : 'html'
59432 var data = $el.data()
59433
59434 state += 'Text'
59435
59436 if (data.resetText == null) $el.data('resetText', $el[val]())
59437
59438 // push to event loop to allow forms to submit
59439 setTimeout($.proxy(function () {
59440 $el[val](data[state] == null ? this.options[state] : data[state])
59441
59442 if (state == 'loadingText') {
59443 this.isLoading = true
59444 $el.addClass(d).attr(d, d).prop(d, true)
59445 } else if (this.isLoading) {
59446 this.isLoading = false
59447 $el.removeClass(d).removeAttr(d).prop(d, false)
59448 }
59449 }, this), 0)
59450 }
59451
59452 Button.prototype.toggle = function () {
59453 var changed = true
59454 var $parent = this.$element.closest('[data-toggle="buttons"]')
59455
59456 if ($parent.length) {
59457 var $input = this.$element.find('input')
59458 if ($input.prop('type') == 'radio') {
59459 if ($input.prop('checked')) changed = false
59460 $parent.find('.active').removeClass('active')
59461 this.$element.addClass('active')
59462 } else if ($input.prop('type') == 'checkbox') {
59463 if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
59464 this.$element.toggleClass('active')
59465 }
59466 $input.prop('checked', this.$element.hasClass('active'))
59467 if (changed) $input.trigger('change')
59468 } else {
59469 this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
59470 this.$element.toggleClass('active')
59471 }
59472 }
59473
59474
59475 // BUTTON PLUGIN DEFINITION
59476 // ========================
59477
59478 function Plugin(option) {
59479 return this.each(function () {
59480 var $this = $(this)
59481 var data = $this.data('bs.button')
59482 var options = typeof option == 'object' && option
59483
59484 if (!data) $this.data('bs.button', (data = new Button(this, options)))
59485
59486 if (option == 'toggle') data.toggle()
59487 else if (option) data.setState(option)
59488 })
59489 }
59490
59491 var old = $.fn.button
59492
59493 $.fn.button = Plugin
59494 $.fn.button.Constructor = Button
59495
59496
59497 // BUTTON NO CONFLICT
59498 // ==================
59499
59500 $.fn.button.noConflict = function () {
59501 $.fn.button = old
59502 return this
59503 }
59504
59505
59506 // BUTTON DATA-API
59507 // ===============
59508
59509 $(document)
59510 .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
59511 var $btn = $(e.target).closest('.btn')
59512 Plugin.call($btn, 'toggle')
59513 if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
59514 // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
59515 e.preventDefault()
59516 // The target component still receive the focus
59517 if ($btn.is('input,button')) $btn.trigger('focus')
59518 else $btn.find('input:visible,button:visible').first().trigger('focus')
59519 }
59520 })
59521 .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
59522 $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
59523 })
59524
59525 }(jQuery);
59526
59527 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
59528
59529/***/ },
59530/* 617 */
59531/***/ function(module, exports, __webpack_require__) {
59532
59533 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
59534 * Bootstrap: carousel.js v3.3.7
59535 * http://getbootstrap.com/javascript/#carousel
59536 * ========================================================================
59537 * Copyright 2011-2016 Twitter, Inc.
59538 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
59539 * ======================================================================== */
59540
59541
59542 +function ($) {
59543 'use strict';
59544
59545 // CAROUSEL CLASS DEFINITION
59546 // =========================
59547
59548 var Carousel = function (element, options) {
59549 this.$element = $(element)
59550 this.$indicators = this.$element.find('.carousel-indicators')
59551 this.options = options
59552 this.paused = null
59553 this.sliding = null
59554 this.interval = null
59555 this.$active = null
59556 this.$items = null
59557
59558 this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
59559
59560 this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
59561 .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
59562 .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
59563 }
59564
59565 Carousel.VERSION = '3.3.7'
59566
59567 Carousel.TRANSITION_DURATION = 600
59568
59569 Carousel.DEFAULTS = {
59570 interval: 5000,
59571 pause: 'hover',
59572 wrap: true,
59573 keyboard: true
59574 }
59575
59576 Carousel.prototype.keydown = function (e) {
59577 if (/input|textarea/i.test(e.target.tagName)) return
59578 switch (e.which) {
59579 case 37: this.prev(); break
59580 case 39: this.next(); break
59581 default: return
59582 }
59583
59584 e.preventDefault()
59585 }
59586
59587 Carousel.prototype.cycle = function (e) {
59588 e || (this.paused = false)
59589
59590 this.interval && clearInterval(this.interval)
59591
59592 this.options.interval
59593 && !this.paused
59594 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
59595
59596 return this
59597 }
59598
59599 Carousel.prototype.getItemIndex = function (item) {
59600 this.$items = item.parent().children('.item')
59601 return this.$items.index(item || this.$active)
59602 }
59603
59604 Carousel.prototype.getItemForDirection = function (direction, active) {
59605 var activeIndex = this.getItemIndex(active)
59606 var willWrap = (direction == 'prev' && activeIndex === 0)
59607 || (direction == 'next' && activeIndex == (this.$items.length - 1))
59608 if (willWrap && !this.options.wrap) return active
59609 var delta = direction == 'prev' ? -1 : 1
59610 var itemIndex = (activeIndex + delta) % this.$items.length
59611 return this.$items.eq(itemIndex)
59612 }
59613
59614 Carousel.prototype.to = function (pos) {
59615 var that = this
59616 var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
59617
59618 if (pos > (this.$items.length - 1) || pos < 0) return
59619
59620 if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
59621 if (activeIndex == pos) return this.pause().cycle()
59622
59623 return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
59624 }
59625
59626 Carousel.prototype.pause = function (e) {
59627 e || (this.paused = true)
59628
59629 if (this.$element.find('.next, .prev').length && $.support.transition) {
59630 this.$element.trigger($.support.transition.end)
59631 this.cycle(true)
59632 }
59633
59634 this.interval = clearInterval(this.interval)
59635
59636 return this
59637 }
59638
59639 Carousel.prototype.next = function () {
59640 if (this.sliding) return
59641 return this.slide('next')
59642 }
59643
59644 Carousel.prototype.prev = function () {
59645 if (this.sliding) return
59646 return this.slide('prev')
59647 }
59648
59649 Carousel.prototype.slide = function (type, next) {
59650 var $active = this.$element.find('.item.active')
59651 var $next = next || this.getItemForDirection(type, $active)
59652 var isCycling = this.interval
59653 var direction = type == 'next' ? 'left' : 'right'
59654 var that = this
59655
59656 if ($next.hasClass('active')) return (this.sliding = false)
59657
59658 var relatedTarget = $next[0]
59659 var slideEvent = $.Event('slide.bs.carousel', {
59660 relatedTarget: relatedTarget,
59661 direction: direction
59662 })
59663 this.$element.trigger(slideEvent)
59664 if (slideEvent.isDefaultPrevented()) return
59665
59666 this.sliding = true
59667
59668 isCycling && this.pause()
59669
59670 if (this.$indicators.length) {
59671 this.$indicators.find('.active').removeClass('active')
59672 var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
59673 $nextIndicator && $nextIndicator.addClass('active')
59674 }
59675
59676 var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
59677 if ($.support.transition && this.$element.hasClass('slide')) {
59678 $next.addClass(type)
59679 $next[0].offsetWidth // force reflow
59680 $active.addClass(direction)
59681 $next.addClass(direction)
59682 $active
59683 .one('bsTransitionEnd', function () {
59684 $next.removeClass([type, direction].join(' ')).addClass('active')
59685 $active.removeClass(['active', direction].join(' '))
59686 that.sliding = false
59687 setTimeout(function () {
59688 that.$element.trigger(slidEvent)
59689 }, 0)
59690 })
59691 .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
59692 } else {
59693 $active.removeClass('active')
59694 $next.addClass('active')
59695 this.sliding = false
59696 this.$element.trigger(slidEvent)
59697 }
59698
59699 isCycling && this.cycle()
59700
59701 return this
59702 }
59703
59704
59705 // CAROUSEL PLUGIN DEFINITION
59706 // ==========================
59707
59708 function Plugin(option) {
59709 return this.each(function () {
59710 var $this = $(this)
59711 var data = $this.data('bs.carousel')
59712 var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
59713 var action = typeof option == 'string' ? option : options.slide
59714
59715 if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
59716 if (typeof option == 'number') data.to(option)
59717 else if (action) data[action]()
59718 else if (options.interval) data.pause().cycle()
59719 })
59720 }
59721
59722 var old = $.fn.carousel
59723
59724 $.fn.carousel = Plugin
59725 $.fn.carousel.Constructor = Carousel
59726
59727
59728 // CAROUSEL NO CONFLICT
59729 // ====================
59730
59731 $.fn.carousel.noConflict = function () {
59732 $.fn.carousel = old
59733 return this
59734 }
59735
59736
59737 // CAROUSEL DATA-API
59738 // =================
59739
59740 var clickHandler = function (e) {
59741 var href
59742 var $this = $(this)
59743 var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
59744 if (!$target.hasClass('carousel')) return
59745 var options = $.extend({}, $target.data(), $this.data())
59746 var slideIndex = $this.attr('data-slide-to')
59747 if (slideIndex) options.interval = false
59748
59749 Plugin.call($target, options)
59750
59751 if (slideIndex) {
59752 $target.data('bs.carousel').to(slideIndex)
59753 }
59754
59755 e.preventDefault()
59756 }
59757
59758 $(document)
59759 .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
59760 .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
59761
59762 $(window).on('load', function () {
59763 $('[data-ride="carousel"]').each(function () {
59764 var $carousel = $(this)
59765 Plugin.call($carousel, $carousel.data())
59766 })
59767 })
59768
59769 }(jQuery);
59770
59771 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
59772
59773/***/ },
59774/* 618 */
59775/***/ function(module, exports, __webpack_require__) {
59776
59777 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
59778 * Bootstrap: collapse.js v3.3.7
59779 * http://getbootstrap.com/javascript/#collapse
59780 * ========================================================================
59781 * Copyright 2011-2016 Twitter, Inc.
59782 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
59783 * ======================================================================== */
59784
59785 /* jshint latedef: false */
59786
59787 +function ($) {
59788 'use strict';
59789
59790 // COLLAPSE PUBLIC CLASS DEFINITION
59791 // ================================
59792
59793 var Collapse = function (element, options) {
59794 this.$element = $(element)
59795 this.options = $.extend({}, Collapse.DEFAULTS, options)
59796 this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
59797 '[data-toggle="collapse"][data-target="#' + element.id + '"]')
59798 this.transitioning = null
59799
59800 if (this.options.parent) {
59801 this.$parent = this.getParent()
59802 } else {
59803 this.addAriaAndCollapsedClass(this.$element, this.$trigger)
59804 }
59805
59806 if (this.options.toggle) this.toggle()
59807 }
59808
59809 Collapse.VERSION = '3.3.7'
59810
59811 Collapse.TRANSITION_DURATION = 350
59812
59813 Collapse.DEFAULTS = {
59814 toggle: true
59815 }
59816
59817 Collapse.prototype.dimension = function () {
59818 var hasWidth = this.$element.hasClass('width')
59819 return hasWidth ? 'width' : 'height'
59820 }
59821
59822 Collapse.prototype.show = function () {
59823 if (this.transitioning || this.$element.hasClass('in')) return
59824
59825 var activesData
59826 var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
59827
59828 if (actives && actives.length) {
59829 activesData = actives.data('bs.collapse')
59830 if (activesData && activesData.transitioning) return
59831 }
59832
59833 var startEvent = $.Event('show.bs.collapse')
59834 this.$element.trigger(startEvent)
59835 if (startEvent.isDefaultPrevented()) return
59836
59837 if (actives && actives.length) {
59838 Plugin.call(actives, 'hide')
59839 activesData || actives.data('bs.collapse', null)
59840 }
59841
59842 var dimension = this.dimension()
59843
59844 this.$element
59845 .removeClass('collapse')
59846 .addClass('collapsing')[dimension](0)
59847 .attr('aria-expanded', true)
59848
59849 this.$trigger
59850 .removeClass('collapsed')
59851 .attr('aria-expanded', true)
59852
59853 this.transitioning = 1
59854
59855 var complete = function () {
59856 this.$element
59857 .removeClass('collapsing')
59858 .addClass('collapse in')[dimension]('')
59859 this.transitioning = 0
59860 this.$element
59861 .trigger('shown.bs.collapse')
59862 }
59863
59864 if (!$.support.transition) return complete.call(this)
59865
59866 var scrollSize = $.camelCase(['scroll', dimension].join('-'))
59867
59868 this.$element
59869 .one('bsTransitionEnd', $.proxy(complete, this))
59870 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
59871 }
59872
59873 Collapse.prototype.hide = function () {
59874 if (this.transitioning || !this.$element.hasClass('in')) return
59875
59876 var startEvent = $.Event('hide.bs.collapse')
59877 this.$element.trigger(startEvent)
59878 if (startEvent.isDefaultPrevented()) return
59879
59880 var dimension = this.dimension()
59881
59882 this.$element[dimension](this.$element[dimension]())[0].offsetHeight
59883
59884 this.$element
59885 .addClass('collapsing')
59886 .removeClass('collapse in')
59887 .attr('aria-expanded', false)
59888
59889 this.$trigger
59890 .addClass('collapsed')
59891 .attr('aria-expanded', false)
59892
59893 this.transitioning = 1
59894
59895 var complete = function () {
59896 this.transitioning = 0
59897 this.$element
59898 .removeClass('collapsing')
59899 .addClass('collapse')
59900 .trigger('hidden.bs.collapse')
59901 }
59902
59903 if (!$.support.transition) return complete.call(this)
59904
59905 this.$element
59906 [dimension](0)
59907 .one('bsTransitionEnd', $.proxy(complete, this))
59908 .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
59909 }
59910
59911 Collapse.prototype.toggle = function () {
59912 this[this.$element.hasClass('in') ? 'hide' : 'show']()
59913 }
59914
59915 Collapse.prototype.getParent = function () {
59916 return $(this.options.parent)
59917 .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
59918 .each($.proxy(function (i, element) {
59919 var $element = $(element)
59920 this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
59921 }, this))
59922 .end()
59923 }
59924
59925 Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
59926 var isOpen = $element.hasClass('in')
59927
59928 $element.attr('aria-expanded', isOpen)
59929 $trigger
59930 .toggleClass('collapsed', !isOpen)
59931 .attr('aria-expanded', isOpen)
59932 }
59933
59934 function getTargetFromTrigger($trigger) {
59935 var href
59936 var target = $trigger.attr('data-target')
59937 || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
59938
59939 return $(target)
59940 }
59941
59942
59943 // COLLAPSE PLUGIN DEFINITION
59944 // ==========================
59945
59946 function Plugin(option) {
59947 return this.each(function () {
59948 var $this = $(this)
59949 var data = $this.data('bs.collapse')
59950 var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
59951
59952 if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
59953 if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
59954 if (typeof option == 'string') data[option]()
59955 })
59956 }
59957
59958 var old = $.fn.collapse
59959
59960 $.fn.collapse = Plugin
59961 $.fn.collapse.Constructor = Collapse
59962
59963
59964 // COLLAPSE NO CONFLICT
59965 // ====================
59966
59967 $.fn.collapse.noConflict = function () {
59968 $.fn.collapse = old
59969 return this
59970 }
59971
59972
59973 // COLLAPSE DATA-API
59974 // =================
59975
59976 $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
59977 var $this = $(this)
59978
59979 if (!$this.attr('data-target')) e.preventDefault()
59980
59981 var $target = getTargetFromTrigger($this)
59982 var data = $target.data('bs.collapse')
59983 var option = data ? 'toggle' : $this.data()
59984
59985 Plugin.call($target, option)
59986 })
59987
59988 }(jQuery);
59989
59990 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
59991
59992/***/ },
59993/* 619 */
59994/***/ function(module, exports, __webpack_require__) {
59995
59996 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
59997 * Bootstrap: dropdown.js v3.3.7
59998 * http://getbootstrap.com/javascript/#dropdowns
59999 * ========================================================================
60000 * Copyright 2011-2016 Twitter, Inc.
60001 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
60002 * ======================================================================== */
60003
60004
60005 +function ($) {
60006 'use strict';
60007
60008 // DROPDOWN CLASS DEFINITION
60009 // =========================
60010
60011 var backdrop = '.dropdown-backdrop'
60012 var toggle = '[data-toggle="dropdown"]'
60013 var Dropdown = function (element) {
60014 $(element).on('click.bs.dropdown', this.toggle)
60015 }
60016
60017 Dropdown.VERSION = '3.3.7'
60018
60019 function getParent($this) {
60020 var selector = $this.attr('data-target')
60021
60022 if (!selector) {
60023 selector = $this.attr('href')
60024 selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
60025 }
60026
60027 var $parent = selector && $(selector)
60028
60029 return $parent && $parent.length ? $parent : $this.parent()
60030 }
60031
60032 function clearMenus(e) {
60033 if (e && e.which === 3) return
60034 $(backdrop).remove()
60035 $(toggle).each(function () {
60036 var $this = $(this)
60037 var $parent = getParent($this)
60038 var relatedTarget = { relatedTarget: this }
60039
60040 if (!$parent.hasClass('open')) return
60041
60042 if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
60043
60044 $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
60045
60046 if (e.isDefaultPrevented()) return
60047
60048 $this.attr('aria-expanded', 'false')
60049 $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
60050 })
60051 }
60052
60053 Dropdown.prototype.toggle = function (e) {
60054 var $this = $(this)
60055
60056 if ($this.is('.disabled, :disabled')) return
60057
60058 var $parent = getParent($this)
60059 var isActive = $parent.hasClass('open')
60060
60061 clearMenus()
60062
60063 if (!isActive) {
60064 if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
60065 // if mobile we use a backdrop because click events don't delegate
60066 $(document.createElement('div'))
60067 .addClass('dropdown-backdrop')
60068 .insertAfter($(this))
60069 .on('click', clearMenus)
60070 }
60071
60072 var relatedTarget = { relatedTarget: this }
60073 $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
60074
60075 if (e.isDefaultPrevented()) return
60076
60077 $this
60078 .trigger('focus')
60079 .attr('aria-expanded', 'true')
60080
60081 $parent
60082 .toggleClass('open')
60083 .trigger($.Event('shown.bs.dropdown', relatedTarget))
60084 }
60085
60086 return false
60087 }
60088
60089 Dropdown.prototype.keydown = function (e) {
60090 if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
60091
60092 var $this = $(this)
60093
60094 e.preventDefault()
60095 e.stopPropagation()
60096
60097 if ($this.is('.disabled, :disabled')) return
60098
60099 var $parent = getParent($this)
60100 var isActive = $parent.hasClass('open')
60101
60102 if (!isActive && e.which != 27 || isActive && e.which == 27) {
60103 if (e.which == 27) $parent.find(toggle).trigger('focus')
60104 return $this.trigger('click')
60105 }
60106
60107 var desc = ' li:not(.disabled):visible a'
60108 var $items = $parent.find('.dropdown-menu' + desc)
60109
60110 if (!$items.length) return
60111
60112 var index = $items.index(e.target)
60113
60114 if (e.which == 38 && index > 0) index-- // up
60115 if (e.which == 40 && index < $items.length - 1) index++ // down
60116 if (!~index) index = 0
60117
60118 $items.eq(index).trigger('focus')
60119 }
60120
60121
60122 // DROPDOWN PLUGIN DEFINITION
60123 // ==========================
60124
60125 function Plugin(option) {
60126 return this.each(function () {
60127 var $this = $(this)
60128 var data = $this.data('bs.dropdown')
60129
60130 if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
60131 if (typeof option == 'string') data[option].call($this)
60132 })
60133 }
60134
60135 var old = $.fn.dropdown
60136
60137 $.fn.dropdown = Plugin
60138 $.fn.dropdown.Constructor = Dropdown
60139
60140
60141 // DROPDOWN NO CONFLICT
60142 // ====================
60143
60144 $.fn.dropdown.noConflict = function () {
60145 $.fn.dropdown = old
60146 return this
60147 }
60148
60149
60150 // APPLY TO STANDARD DROPDOWN ELEMENTS
60151 // ===================================
60152
60153 $(document)
60154 .on('click.bs.dropdown.data-api', clearMenus)
60155 .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
60156 .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
60157 .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
60158 .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
60159
60160 }(jQuery);
60161
60162 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
60163
60164/***/ },
60165/* 620 */
60166/***/ function(module, exports, __webpack_require__) {
60167
60168 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
60169 * Bootstrap: modal.js v3.3.7
60170 * http://getbootstrap.com/javascript/#modals
60171 * ========================================================================
60172 * Copyright 2011-2016 Twitter, Inc.
60173 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
60174 * ======================================================================== */
60175
60176
60177 +function ($) {
60178 'use strict';
60179
60180 // MODAL CLASS DEFINITION
60181 // ======================
60182
60183 var Modal = function (element, options) {
60184 this.options = options
60185 this.$body = $(document.body)
60186 this.$element = $(element)
60187 this.$dialog = this.$element.find('.modal-dialog')
60188 this.$backdrop = null
60189 this.isShown = null
60190 this.originalBodyPad = null
60191 this.scrollbarWidth = 0
60192 this.ignoreBackdropClick = false
60193
60194 if (this.options.remote) {
60195 this.$element
60196 .find('.modal-content')
60197 .load(this.options.remote, $.proxy(function () {
60198 this.$element.trigger('loaded.bs.modal')
60199 }, this))
60200 }
60201 }
60202
60203 Modal.VERSION = '3.3.7'
60204
60205 Modal.TRANSITION_DURATION = 300
60206 Modal.BACKDROP_TRANSITION_DURATION = 150
60207
60208 Modal.DEFAULTS = {
60209 backdrop: true,
60210 keyboard: true,
60211 show: true
60212 }
60213
60214 Modal.prototype.toggle = function (_relatedTarget) {
60215 return this.isShown ? this.hide() : this.show(_relatedTarget)
60216 }
60217
60218 Modal.prototype.show = function (_relatedTarget) {
60219 var that = this
60220 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
60221
60222 this.$element.trigger(e)
60223
60224 if (this.isShown || e.isDefaultPrevented()) return
60225
60226 this.isShown = true
60227
60228 this.checkScrollbar()
60229 this.setScrollbar()
60230 this.$body.addClass('modal-open')
60231
60232 this.escape()
60233 this.resize()
60234
60235 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
60236
60237 this.$dialog.on('mousedown.dismiss.bs.modal', function () {
60238 that.$element.one('mouseup.dismiss.bs.modal', function (e) {
60239 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
60240 })
60241 })
60242
60243 this.backdrop(function () {
60244 var transition = $.support.transition && that.$element.hasClass('fade')
60245
60246 if (!that.$element.parent().length) {
60247 that.$element.appendTo(that.$body) // don't move modals dom position
60248 }
60249
60250 that.$element
60251 .show()
60252 .scrollTop(0)
60253
60254 that.adjustDialog()
60255
60256 if (transition) {
60257 that.$element[0].offsetWidth // force reflow
60258 }
60259
60260 that.$element.addClass('in')
60261
60262 that.enforceFocus()
60263
60264 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
60265
60266 transition ?
60267 that.$dialog // wait for modal to slide in
60268 .one('bsTransitionEnd', function () {
60269 that.$element.trigger('focus').trigger(e)
60270 })
60271 .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
60272 that.$element.trigger('focus').trigger(e)
60273 })
60274 }
60275
60276 Modal.prototype.hide = function (e) {
60277 if (e) e.preventDefault()
60278
60279 e = $.Event('hide.bs.modal')
60280
60281 this.$element.trigger(e)
60282
60283 if (!this.isShown || e.isDefaultPrevented()) return
60284
60285 this.isShown = false
60286
60287 this.escape()
60288 this.resize()
60289
60290 $(document).off('focusin.bs.modal')
60291
60292 this.$element
60293 .removeClass('in')
60294 .off('click.dismiss.bs.modal')
60295 .off('mouseup.dismiss.bs.modal')
60296
60297 this.$dialog.off('mousedown.dismiss.bs.modal')
60298
60299 $.support.transition && this.$element.hasClass('fade') ?
60300 this.$element
60301 .one('bsTransitionEnd', $.proxy(this.hideModal, this))
60302 .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
60303 this.hideModal()
60304 }
60305
60306 Modal.prototype.enforceFocus = function () {
60307 $(document)
60308 .off('focusin.bs.modal') // guard against infinite focus loop
60309 .on('focusin.bs.modal', $.proxy(function (e) {
60310 if (document !== e.target &&
60311 this.$element[0] !== e.target &&
60312 !this.$element.has(e.target).length) {
60313 this.$element.trigger('focus')
60314 }
60315 }, this))
60316 }
60317
60318 Modal.prototype.escape = function () {
60319 if (this.isShown && this.options.keyboard) {
60320 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
60321 e.which == 27 && this.hide()
60322 }, this))
60323 } else if (!this.isShown) {
60324 this.$element.off('keydown.dismiss.bs.modal')
60325 }
60326 }
60327
60328 Modal.prototype.resize = function () {
60329 if (this.isShown) {
60330 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
60331 } else {
60332 $(window).off('resize.bs.modal')
60333 }
60334 }
60335
60336 Modal.prototype.hideModal = function () {
60337 var that = this
60338 this.$element.hide()
60339 this.backdrop(function () {
60340 that.$body.removeClass('modal-open')
60341 that.resetAdjustments()
60342 that.resetScrollbar()
60343 that.$element.trigger('hidden.bs.modal')
60344 })
60345 }
60346
60347 Modal.prototype.removeBackdrop = function () {
60348 this.$backdrop && this.$backdrop.remove()
60349 this.$backdrop = null
60350 }
60351
60352 Modal.prototype.backdrop = function (callback) {
60353 var that = this
60354 var animate = this.$element.hasClass('fade') ? 'fade' : ''
60355
60356 if (this.isShown && this.options.backdrop) {
60357 var doAnimate = $.support.transition && animate
60358
60359 this.$backdrop = $(document.createElement('div'))
60360 .addClass('modal-backdrop ' + animate)
60361 .appendTo(this.$body)
60362
60363 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
60364 if (this.ignoreBackdropClick) {
60365 this.ignoreBackdropClick = false
60366 return
60367 }
60368 if (e.target !== e.currentTarget) return
60369 this.options.backdrop == 'static'
60370 ? this.$element[0].focus()
60371 : this.hide()
60372 }, this))
60373
60374 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
60375
60376 this.$backdrop.addClass('in')
60377
60378 if (!callback) return
60379
60380 doAnimate ?
60381 this.$backdrop
60382 .one('bsTransitionEnd', callback)
60383 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
60384 callback()
60385
60386 } else if (!this.isShown && this.$backdrop) {
60387 this.$backdrop.removeClass('in')
60388
60389 var callbackRemove = function () {
60390 that.removeBackdrop()
60391 callback && callback()
60392 }
60393 $.support.transition && this.$element.hasClass('fade') ?
60394 this.$backdrop
60395 .one('bsTransitionEnd', callbackRemove)
60396 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
60397 callbackRemove()
60398
60399 } else if (callback) {
60400 callback()
60401 }
60402 }
60403
60404 // these following methods are used to handle overflowing modals
60405
60406 Modal.prototype.handleUpdate = function () {
60407 this.adjustDialog()
60408 }
60409
60410 Modal.prototype.adjustDialog = function () {
60411 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
60412
60413 this.$element.css({
60414 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
60415 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
60416 })
60417 }
60418
60419 Modal.prototype.resetAdjustments = function () {
60420 this.$element.css({
60421 paddingLeft: '',
60422 paddingRight: ''
60423 })
60424 }
60425
60426 Modal.prototype.checkScrollbar = function () {
60427 var fullWindowWidth = window.innerWidth
60428 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
60429 var documentElementRect = document.documentElement.getBoundingClientRect()
60430 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
60431 }
60432 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
60433 this.scrollbarWidth = this.measureScrollbar()
60434 }
60435
60436 Modal.prototype.setScrollbar = function () {
60437 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
60438 this.originalBodyPad = document.body.style.paddingRight || ''
60439 if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
60440 }
60441
60442 Modal.prototype.resetScrollbar = function () {
60443 this.$body.css('padding-right', this.originalBodyPad)
60444 }
60445
60446 Modal.prototype.measureScrollbar = function () { // thx walsh
60447 var scrollDiv = document.createElement('div')
60448 scrollDiv.className = 'modal-scrollbar-measure'
60449 this.$body.append(scrollDiv)
60450 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
60451 this.$body[0].removeChild(scrollDiv)
60452 return scrollbarWidth
60453 }
60454
60455
60456 // MODAL PLUGIN DEFINITION
60457 // =======================
60458
60459 function Plugin(option, _relatedTarget) {
60460 return this.each(function () {
60461 var $this = $(this)
60462 var data = $this.data('bs.modal')
60463 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
60464
60465 if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
60466 if (typeof option == 'string') data[option](_relatedTarget)
60467 else if (options.show) data.show(_relatedTarget)
60468 })
60469 }
60470
60471 var old = $.fn.modal
60472
60473 $.fn.modal = Plugin
60474 $.fn.modal.Constructor = Modal
60475
60476
60477 // MODAL NO CONFLICT
60478 // =================
60479
60480 $.fn.modal.noConflict = function () {
60481 $.fn.modal = old
60482 return this
60483 }
60484
60485
60486 // MODAL DATA-API
60487 // ==============
60488
60489 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
60490 var $this = $(this)
60491 var href = $this.attr('href')
60492 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
60493 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
60494
60495 if ($this.is('a')) e.preventDefault()
60496
60497 $target.one('show.bs.modal', function (showEvent) {
60498 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
60499 $target.one('hidden.bs.modal', function () {
60500 $this.is(':visible') && $this.trigger('focus')
60501 })
60502 })
60503 Plugin.call($target, option, this)
60504 })
60505
60506 }(jQuery);
60507
60508 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
60509
60510/***/ },
60511/* 621 */
60512/***/ function(module, exports, __webpack_require__) {
60513
60514 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
60515 * Bootstrap: tooltip.js v3.3.7
60516 * http://getbootstrap.com/javascript/#tooltip
60517 * Inspired by the original jQuery.tipsy by Jason Frame
60518 * ========================================================================
60519 * Copyright 2011-2016 Twitter, Inc.
60520 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
60521 * ======================================================================== */
60522
60523
60524 +function ($) {
60525 'use strict';
60526
60527 // TOOLTIP PUBLIC CLASS DEFINITION
60528 // ===============================
60529
60530 var Tooltip = function (element, options) {
60531 this.type = null
60532 this.options = null
60533 this.enabled = null
60534 this.timeout = null
60535 this.hoverState = null
60536 this.$element = null
60537 this.inState = null
60538
60539 this.init('tooltip', element, options)
60540 }
60541
60542 Tooltip.VERSION = '3.3.7'
60543
60544 Tooltip.TRANSITION_DURATION = 150
60545
60546 Tooltip.DEFAULTS = {
60547 animation: true,
60548 placement: 'top',
60549 selector: false,
60550 template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
60551 trigger: 'hover focus',
60552 title: '',
60553 delay: 0,
60554 html: false,
60555 container: false,
60556 viewport: {
60557 selector: 'body',
60558 padding: 0
60559 }
60560 }
60561
60562 Tooltip.prototype.init = function (type, element, options) {
60563 this.enabled = true
60564 this.type = type
60565 this.$element = $(element)
60566 this.options = this.getOptions(options)
60567 this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
60568 this.inState = { click: false, hover: false, focus: false }
60569
60570 if (this.$element[0] instanceof document.constructor && !this.options.selector) {
60571 throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
60572 }
60573
60574 var triggers = this.options.trigger.split(' ')
60575
60576 for (var i = triggers.length; i--;) {
60577 var trigger = triggers[i]
60578
60579 if (trigger == 'click') {
60580 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
60581 } else if (trigger != 'manual') {
60582 var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
60583 var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
60584
60585 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
60586 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
60587 }
60588 }
60589
60590 this.options.selector ?
60591 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
60592 this.fixTitle()
60593 }
60594
60595 Tooltip.prototype.getDefaults = function () {
60596 return Tooltip.DEFAULTS
60597 }
60598
60599 Tooltip.prototype.getOptions = function (options) {
60600 options = $.extend({}, this.getDefaults(), this.$element.data(), options)
60601
60602 if (options.delay && typeof options.delay == 'number') {
60603 options.delay = {
60604 show: options.delay,
60605 hide: options.delay
60606 }
60607 }
60608
60609 return options
60610 }
60611
60612 Tooltip.prototype.getDelegateOptions = function () {
60613 var options = {}
60614 var defaults = this.getDefaults()
60615
60616 this._options && $.each(this._options, function (key, value) {
60617 if (defaults[key] != value) options[key] = value
60618 })
60619
60620 return options
60621 }
60622
60623 Tooltip.prototype.enter = function (obj) {
60624 var self = obj instanceof this.constructor ?
60625 obj : $(obj.currentTarget).data('bs.' + this.type)
60626
60627 if (!self) {
60628 self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
60629 $(obj.currentTarget).data('bs.' + this.type, self)
60630 }
60631
60632 if (obj instanceof $.Event) {
60633 self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
60634 }
60635
60636 if (self.tip().hasClass('in') || self.hoverState == 'in') {
60637 self.hoverState = 'in'
60638 return
60639 }
60640
60641 clearTimeout(self.timeout)
60642
60643 self.hoverState = 'in'
60644
60645 if (!self.options.delay || !self.options.delay.show) return self.show()
60646
60647 self.timeout = setTimeout(function () {
60648 if (self.hoverState == 'in') self.show()
60649 }, self.options.delay.show)
60650 }
60651
60652 Tooltip.prototype.isInStateTrue = function () {
60653 for (var key in this.inState) {
60654 if (this.inState[key]) return true
60655 }
60656
60657 return false
60658 }
60659
60660 Tooltip.prototype.leave = function (obj) {
60661 var self = obj instanceof this.constructor ?
60662 obj : $(obj.currentTarget).data('bs.' + this.type)
60663
60664 if (!self) {
60665 self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
60666 $(obj.currentTarget).data('bs.' + this.type, self)
60667 }
60668
60669 if (obj instanceof $.Event) {
60670 self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
60671 }
60672
60673 if (self.isInStateTrue()) return
60674
60675 clearTimeout(self.timeout)
60676
60677 self.hoverState = 'out'
60678
60679 if (!self.options.delay || !self.options.delay.hide) return self.hide()
60680
60681 self.timeout = setTimeout(function () {
60682 if (self.hoverState == 'out') self.hide()
60683 }, self.options.delay.hide)
60684 }
60685
60686 Tooltip.prototype.show = function () {
60687 var e = $.Event('show.bs.' + this.type)
60688
60689 if (this.hasContent() && this.enabled) {
60690 this.$element.trigger(e)
60691
60692 var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
60693 if (e.isDefaultPrevented() || !inDom) return
60694 var that = this
60695
60696 var $tip = this.tip()
60697
60698 var tipId = this.getUID(this.type)
60699
60700 this.setContent()
60701 $tip.attr('id', tipId)
60702 this.$element.attr('aria-describedby', tipId)
60703
60704 if (this.options.animation) $tip.addClass('fade')
60705
60706 var placement = typeof this.options.placement == 'function' ?
60707 this.options.placement.call(this, $tip[0], this.$element[0]) :
60708 this.options.placement
60709
60710 var autoToken = /\s?auto?\s?/i
60711 var autoPlace = autoToken.test(placement)
60712 if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
60713
60714 $tip
60715 .detach()
60716 .css({ top: 0, left: 0, display: 'block' })
60717 .addClass(placement)
60718 .data('bs.' + this.type, this)
60719
60720 this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
60721 this.$element.trigger('inserted.bs.' + this.type)
60722
60723 var pos = this.getPosition()
60724 var actualWidth = $tip[0].offsetWidth
60725 var actualHeight = $tip[0].offsetHeight
60726
60727 if (autoPlace) {
60728 var orgPlacement = placement
60729 var viewportDim = this.getPosition(this.$viewport)
60730
60731 placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
60732 placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
60733 placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
60734 placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
60735 placement
60736
60737 $tip
60738 .removeClass(orgPlacement)
60739 .addClass(placement)
60740 }
60741
60742 var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
60743
60744 this.applyPlacement(calculatedOffset, placement)
60745
60746 var complete = function () {
60747 var prevHoverState = that.hoverState
60748 that.$element.trigger('shown.bs.' + that.type)
60749 that.hoverState = null
60750
60751 if (prevHoverState == 'out') that.leave(that)
60752 }
60753
60754 $.support.transition && this.$tip.hasClass('fade') ?
60755 $tip
60756 .one('bsTransitionEnd', complete)
60757 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
60758 complete()
60759 }
60760 }
60761
60762 Tooltip.prototype.applyPlacement = function (offset, placement) {
60763 var $tip = this.tip()
60764 var width = $tip[0].offsetWidth
60765 var height = $tip[0].offsetHeight
60766
60767 // manually read margins because getBoundingClientRect includes difference
60768 var marginTop = parseInt($tip.css('margin-top'), 10)
60769 var marginLeft = parseInt($tip.css('margin-left'), 10)
60770
60771 // we must check for NaN for ie 8/9
60772 if (isNaN(marginTop)) marginTop = 0
60773 if (isNaN(marginLeft)) marginLeft = 0
60774
60775 offset.top += marginTop
60776 offset.left += marginLeft
60777
60778 // $.fn.offset doesn't round pixel values
60779 // so we use setOffset directly with our own function B-0
60780 $.offset.setOffset($tip[0], $.extend({
60781 using: function (props) {
60782 $tip.css({
60783 top: Math.round(props.top),
60784 left: Math.round(props.left)
60785 })
60786 }
60787 }, offset), 0)
60788
60789 $tip.addClass('in')
60790
60791 // check to see if placing tip in new offset caused the tip to resize itself
60792 var actualWidth = $tip[0].offsetWidth
60793 var actualHeight = $tip[0].offsetHeight
60794
60795 if (placement == 'top' && actualHeight != height) {
60796 offset.top = offset.top + height - actualHeight
60797 }
60798
60799 var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
60800
60801 if (delta.left) offset.left += delta.left
60802 else offset.top += delta.top
60803
60804 var isVertical = /top|bottom/.test(placement)
60805 var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
60806 var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
60807
60808 $tip.offset(offset)
60809 this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
60810 }
60811
60812 Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
60813 this.arrow()
60814 .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
60815 .css(isVertical ? 'top' : 'left', '')
60816 }
60817
60818 Tooltip.prototype.setContent = function () {
60819 var $tip = this.tip()
60820 var title = this.getTitle()
60821
60822 $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
60823 $tip.removeClass('fade in top bottom left right')
60824 }
60825
60826 Tooltip.prototype.hide = function (callback) {
60827 var that = this
60828 var $tip = $(this.$tip)
60829 var e = $.Event('hide.bs.' + this.type)
60830
60831 function complete() {
60832 if (that.hoverState != 'in') $tip.detach()
60833 if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
60834 that.$element
60835 .removeAttr('aria-describedby')
60836 .trigger('hidden.bs.' + that.type)
60837 }
60838 callback && callback()
60839 }
60840
60841 this.$element.trigger(e)
60842
60843 if (e.isDefaultPrevented()) return
60844
60845 $tip.removeClass('in')
60846
60847 $.support.transition && $tip.hasClass('fade') ?
60848 $tip
60849 .one('bsTransitionEnd', complete)
60850 .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
60851 complete()
60852
60853 this.hoverState = null
60854
60855 return this
60856 }
60857
60858 Tooltip.prototype.fixTitle = function () {
60859 var $e = this.$element
60860 if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
60861 $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
60862 }
60863 }
60864
60865 Tooltip.prototype.hasContent = function () {
60866 return this.getTitle()
60867 }
60868
60869 Tooltip.prototype.getPosition = function ($element) {
60870 $element = $element || this.$element
60871
60872 var el = $element[0]
60873 var isBody = el.tagName == 'BODY'
60874
60875 var elRect = el.getBoundingClientRect()
60876 if (elRect.width == null) {
60877 // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
60878 elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
60879 }
60880 var isSvg = window.SVGElement && el instanceof window.SVGElement
60881 // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
60882 // See https://github.com/twbs/bootstrap/issues/20280
60883 var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
60884 var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
60885 var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
60886
60887 return $.extend({}, elRect, scroll, outerDims, elOffset)
60888 }
60889
60890 Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
60891 return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
60892 placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
60893 placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
60894 /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
60895
60896 }
60897
60898 Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
60899 var delta = { top: 0, left: 0 }
60900 if (!this.$viewport) return delta
60901
60902 var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
60903 var viewportDimensions = this.getPosition(this.$viewport)
60904
60905 if (/right|left/.test(placement)) {
60906 var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
60907 var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
60908 if (topEdgeOffset < viewportDimensions.top) { // top overflow
60909 delta.top = viewportDimensions.top - topEdgeOffset
60910 } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
60911 delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
60912 }
60913 } else {
60914 var leftEdgeOffset = pos.left - viewportPadding
60915 var rightEdgeOffset = pos.left + viewportPadding + actualWidth
60916 if (leftEdgeOffset < viewportDimensions.left) { // left overflow
60917 delta.left = viewportDimensions.left - leftEdgeOffset
60918 } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
60919 delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
60920 }
60921 }
60922
60923 return delta
60924 }
60925
60926 Tooltip.prototype.getTitle = function () {
60927 var title
60928 var $e = this.$element
60929 var o = this.options
60930
60931 title = $e.attr('data-original-title')
60932 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
60933
60934 return title
60935 }
60936
60937 Tooltip.prototype.getUID = function (prefix) {
60938 do prefix += ~~(Math.random() * 1000000)
60939 while (document.getElementById(prefix))
60940 return prefix
60941 }
60942
60943 Tooltip.prototype.tip = function () {
60944 if (!this.$tip) {
60945 this.$tip = $(this.options.template)
60946 if (this.$tip.length != 1) {
60947 throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
60948 }
60949 }
60950 return this.$tip
60951 }
60952
60953 Tooltip.prototype.arrow = function () {
60954 return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
60955 }
60956
60957 Tooltip.prototype.enable = function () {
60958 this.enabled = true
60959 }
60960
60961 Tooltip.prototype.disable = function () {
60962 this.enabled = false
60963 }
60964
60965 Tooltip.prototype.toggleEnabled = function () {
60966 this.enabled = !this.enabled
60967 }
60968
60969 Tooltip.prototype.toggle = function (e) {
60970 var self = this
60971 if (e) {
60972 self = $(e.currentTarget).data('bs.' + this.type)
60973 if (!self) {
60974 self = new this.constructor(e.currentTarget, this.getDelegateOptions())
60975 $(e.currentTarget).data('bs.' + this.type, self)
60976 }
60977 }
60978
60979 if (e) {
60980 self.inState.click = !self.inState.click
60981 if (self.isInStateTrue()) self.enter(self)
60982 else self.leave(self)
60983 } else {
60984 self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
60985 }
60986 }
60987
60988 Tooltip.prototype.destroy = function () {
60989 var that = this
60990 clearTimeout(this.timeout)
60991 this.hide(function () {
60992 that.$element.off('.' + that.type).removeData('bs.' + that.type)
60993 if (that.$tip) {
60994 that.$tip.detach()
60995 }
60996 that.$tip = null
60997 that.$arrow = null
60998 that.$viewport = null
60999 that.$element = null
61000 })
61001 }
61002
61003
61004 // TOOLTIP PLUGIN DEFINITION
61005 // =========================
61006
61007 function Plugin(option) {
61008 return this.each(function () {
61009 var $this = $(this)
61010 var data = $this.data('bs.tooltip')
61011 var options = typeof option == 'object' && option
61012
61013 if (!data && /destroy|hide/.test(option)) return
61014 if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
61015 if (typeof option == 'string') data[option]()
61016 })
61017 }
61018
61019 var old = $.fn.tooltip
61020
61021 $.fn.tooltip = Plugin
61022 $.fn.tooltip.Constructor = Tooltip
61023
61024
61025 // TOOLTIP NO CONFLICT
61026 // ===================
61027
61028 $.fn.tooltip.noConflict = function () {
61029 $.fn.tooltip = old
61030 return this
61031 }
61032
61033 }(jQuery);
61034
61035 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
61036
61037/***/ },
61038/* 622 */
61039/***/ function(module, exports, __webpack_require__) {
61040
61041 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
61042 * Bootstrap: popover.js v3.3.7
61043 * http://getbootstrap.com/javascript/#popovers
61044 * ========================================================================
61045 * Copyright 2011-2016 Twitter, Inc.
61046 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
61047 * ======================================================================== */
61048
61049
61050 +function ($) {
61051 'use strict';
61052
61053 // POPOVER PUBLIC CLASS DEFINITION
61054 // ===============================
61055
61056 var Popover = function (element, options) {
61057 this.init('popover', element, options)
61058 }
61059
61060 if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
61061
61062 Popover.VERSION = '3.3.7'
61063
61064 Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
61065 placement: 'right',
61066 trigger: 'click',
61067 content: '',
61068 template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
61069 })
61070
61071
61072 // NOTE: POPOVER EXTENDS tooltip.js
61073 // ================================
61074
61075 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
61076
61077 Popover.prototype.constructor = Popover
61078
61079 Popover.prototype.getDefaults = function () {
61080 return Popover.DEFAULTS
61081 }
61082
61083 Popover.prototype.setContent = function () {
61084 var $tip = this.tip()
61085 var title = this.getTitle()
61086 var content = this.getContent()
61087
61088 $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
61089 $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
61090 this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
61091 ](content)
61092
61093 $tip.removeClass('fade top bottom left right in')
61094
61095 // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
61096 // this manually by checking the contents.
61097 if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
61098 }
61099
61100 Popover.prototype.hasContent = function () {
61101 return this.getTitle() || this.getContent()
61102 }
61103
61104 Popover.prototype.getContent = function () {
61105 var $e = this.$element
61106 var o = this.options
61107
61108 return $e.attr('data-content')
61109 || (typeof o.content == 'function' ?
61110 o.content.call($e[0]) :
61111 o.content)
61112 }
61113
61114 Popover.prototype.arrow = function () {
61115 return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
61116 }
61117
61118
61119 // POPOVER PLUGIN DEFINITION
61120 // =========================
61121
61122 function Plugin(option) {
61123 return this.each(function () {
61124 var $this = $(this)
61125 var data = $this.data('bs.popover')
61126 var options = typeof option == 'object' && option
61127
61128 if (!data && /destroy|hide/.test(option)) return
61129 if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
61130 if (typeof option == 'string') data[option]()
61131 })
61132 }
61133
61134 var old = $.fn.popover
61135
61136 $.fn.popover = Plugin
61137 $.fn.popover.Constructor = Popover
61138
61139
61140 // POPOVER NO CONFLICT
61141 // ===================
61142
61143 $.fn.popover.noConflict = function () {
61144 $.fn.popover = old
61145 return this
61146 }
61147
61148 }(jQuery);
61149
61150 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
61151
61152/***/ },
61153/* 623 */
61154/***/ function(module, exports, __webpack_require__) {
61155
61156 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
61157 * Bootstrap: scrollspy.js v3.3.7
61158 * http://getbootstrap.com/javascript/#scrollspy
61159 * ========================================================================
61160 * Copyright 2011-2016 Twitter, Inc.
61161 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
61162 * ======================================================================== */
61163
61164
61165 +function ($) {
61166 'use strict';
61167
61168 // SCROLLSPY CLASS DEFINITION
61169 // ==========================
61170
61171 function ScrollSpy(element, options) {
61172 this.$body = $(document.body)
61173 this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
61174 this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
61175 this.selector = (this.options.target || '') + ' .nav li > a'
61176 this.offsets = []
61177 this.targets = []
61178 this.activeTarget = null
61179 this.scrollHeight = 0
61180
61181 this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
61182 this.refresh()
61183 this.process()
61184 }
61185
61186 ScrollSpy.VERSION = '3.3.7'
61187
61188 ScrollSpy.DEFAULTS = {
61189 offset: 10
61190 }
61191
61192 ScrollSpy.prototype.getScrollHeight = function () {
61193 return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
61194 }
61195
61196 ScrollSpy.prototype.refresh = function () {
61197 var that = this
61198 var offsetMethod = 'offset'
61199 var offsetBase = 0
61200
61201 this.offsets = []
61202 this.targets = []
61203 this.scrollHeight = this.getScrollHeight()
61204
61205 if (!$.isWindow(this.$scrollElement[0])) {
61206 offsetMethod = 'position'
61207 offsetBase = this.$scrollElement.scrollTop()
61208 }
61209
61210 this.$body
61211 .find(this.selector)
61212 .map(function () {
61213 var $el = $(this)
61214 var href = $el.data('target') || $el.attr('href')
61215 var $href = /^#./.test(href) && $(href)
61216
61217 return ($href
61218 && $href.length
61219 && $href.is(':visible')
61220 && [[$href[offsetMethod]().top + offsetBase, href]]) || null
61221 })
61222 .sort(function (a, b) { return a[0] - b[0] })
61223 .each(function () {
61224 that.offsets.push(this[0])
61225 that.targets.push(this[1])
61226 })
61227 }
61228
61229 ScrollSpy.prototype.process = function () {
61230 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
61231 var scrollHeight = this.getScrollHeight()
61232 var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
61233 var offsets = this.offsets
61234 var targets = this.targets
61235 var activeTarget = this.activeTarget
61236 var i
61237
61238 if (this.scrollHeight != scrollHeight) {
61239 this.refresh()
61240 }
61241
61242 if (scrollTop >= maxScroll) {
61243 return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
61244 }
61245
61246 if (activeTarget && scrollTop < offsets[0]) {
61247 this.activeTarget = null
61248 return this.clear()
61249 }
61250
61251 for (i = offsets.length; i--;) {
61252 activeTarget != targets[i]
61253 && scrollTop >= offsets[i]
61254 && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
61255 && this.activate(targets[i])
61256 }
61257 }
61258
61259 ScrollSpy.prototype.activate = function (target) {
61260 this.activeTarget = target
61261
61262 this.clear()
61263
61264 var selector = this.selector +
61265 '[data-target="' + target + '"],' +
61266 this.selector + '[href="' + target + '"]'
61267
61268 var active = $(selector)
61269 .parents('li')
61270 .addClass('active')
61271
61272 if (active.parent('.dropdown-menu').length) {
61273 active = active
61274 .closest('li.dropdown')
61275 .addClass('active')
61276 }
61277
61278 active.trigger('activate.bs.scrollspy')
61279 }
61280
61281 ScrollSpy.prototype.clear = function () {
61282 $(this.selector)
61283 .parentsUntil(this.options.target, '.active')
61284 .removeClass('active')
61285 }
61286
61287
61288 // SCROLLSPY PLUGIN DEFINITION
61289 // ===========================
61290
61291 function Plugin(option) {
61292 return this.each(function () {
61293 var $this = $(this)
61294 var data = $this.data('bs.scrollspy')
61295 var options = typeof option == 'object' && option
61296
61297 if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
61298 if (typeof option == 'string') data[option]()
61299 })
61300 }
61301
61302 var old = $.fn.scrollspy
61303
61304 $.fn.scrollspy = Plugin
61305 $.fn.scrollspy.Constructor = ScrollSpy
61306
61307
61308 // SCROLLSPY NO CONFLICT
61309 // =====================
61310
61311 $.fn.scrollspy.noConflict = function () {
61312 $.fn.scrollspy = old
61313 return this
61314 }
61315
61316
61317 // SCROLLSPY DATA-API
61318 // ==================
61319
61320 $(window).on('load.bs.scrollspy.data-api', function () {
61321 $('[data-spy="scroll"]').each(function () {
61322 var $spy = $(this)
61323 Plugin.call($spy, $spy.data())
61324 })
61325 })
61326
61327 }(jQuery);
61328
61329 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
61330
61331/***/ },
61332/* 624 */
61333/***/ function(module, exports, __webpack_require__) {
61334
61335 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
61336 * Bootstrap: tab.js v3.3.7
61337 * http://getbootstrap.com/javascript/#tabs
61338 * ========================================================================
61339 * Copyright 2011-2016 Twitter, Inc.
61340 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
61341 * ======================================================================== */
61342
61343
61344 +function ($) {
61345 'use strict';
61346
61347 // TAB CLASS DEFINITION
61348 // ====================
61349
61350 var Tab = function (element) {
61351 // jscs:disable requireDollarBeforejQueryAssignment
61352 this.element = $(element)
61353 // jscs:enable requireDollarBeforejQueryAssignment
61354 }
61355
61356 Tab.VERSION = '3.3.7'
61357
61358 Tab.TRANSITION_DURATION = 150
61359
61360 Tab.prototype.show = function () {
61361 var $this = this.element
61362 var $ul = $this.closest('ul:not(.dropdown-menu)')
61363 var selector = $this.data('target')
61364
61365 if (!selector) {
61366 selector = $this.attr('href')
61367 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
61368 }
61369
61370 if ($this.parent('li').hasClass('active')) return
61371
61372 var $previous = $ul.find('.active:last a')
61373 var hideEvent = $.Event('hide.bs.tab', {
61374 relatedTarget: $this[0]
61375 })
61376 var showEvent = $.Event('show.bs.tab', {
61377 relatedTarget: $previous[0]
61378 })
61379
61380 $previous.trigger(hideEvent)
61381 $this.trigger(showEvent)
61382
61383 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
61384
61385 var $target = $(selector)
61386
61387 this.activate($this.closest('li'), $ul)
61388 this.activate($target, $target.parent(), function () {
61389 $previous.trigger({
61390 type: 'hidden.bs.tab',
61391 relatedTarget: $this[0]
61392 })
61393 $this.trigger({
61394 type: 'shown.bs.tab',
61395 relatedTarget: $previous[0]
61396 })
61397 })
61398 }
61399
61400 Tab.prototype.activate = function (element, container, callback) {
61401 var $active = container.find('> .active')
61402 var transition = callback
61403 && $.support.transition
61404 && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
61405
61406 function next() {
61407 $active
61408 .removeClass('active')
61409 .find('> .dropdown-menu > .active')
61410 .removeClass('active')
61411 .end()
61412 .find('[data-toggle="tab"]')
61413 .attr('aria-expanded', false)
61414
61415 element
61416 .addClass('active')
61417 .find('[data-toggle="tab"]')
61418 .attr('aria-expanded', true)
61419
61420 if (transition) {
61421 element[0].offsetWidth // reflow for transition
61422 element.addClass('in')
61423 } else {
61424 element.removeClass('fade')
61425 }
61426
61427 if (element.parent('.dropdown-menu').length) {
61428 element
61429 .closest('li.dropdown')
61430 .addClass('active')
61431 .end()
61432 .find('[data-toggle="tab"]')
61433 .attr('aria-expanded', true)
61434 }
61435
61436 callback && callback()
61437 }
61438
61439 $active.length && transition ?
61440 $active
61441 .one('bsTransitionEnd', next)
61442 .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
61443 next()
61444
61445 $active.removeClass('in')
61446 }
61447
61448
61449 // TAB PLUGIN DEFINITION
61450 // =====================
61451
61452 function Plugin(option) {
61453 return this.each(function () {
61454 var $this = $(this)
61455 var data = $this.data('bs.tab')
61456
61457 if (!data) $this.data('bs.tab', (data = new Tab(this)))
61458 if (typeof option == 'string') data[option]()
61459 })
61460 }
61461
61462 var old = $.fn.tab
61463
61464 $.fn.tab = Plugin
61465 $.fn.tab.Constructor = Tab
61466
61467
61468 // TAB NO CONFLICT
61469 // ===============
61470
61471 $.fn.tab.noConflict = function () {
61472 $.fn.tab = old
61473 return this
61474 }
61475
61476
61477 // TAB DATA-API
61478 // ============
61479
61480 var clickHandler = function (e) {
61481 e.preventDefault()
61482 Plugin.call($(this), 'show')
61483 }
61484
61485 $(document)
61486 .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
61487 .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
61488
61489 }(jQuery);
61490
61491 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
61492
61493/***/ },
61494/* 625 */
61495/***/ function(module, exports, __webpack_require__) {
61496
61497 /* WEBPACK VAR INJECTION */(function(jQuery) {/* ========================================================================
61498 * Bootstrap: affix.js v3.3.7
61499 * http://getbootstrap.com/javascript/#affix
61500 * ========================================================================
61501 * Copyright 2011-2016 Twitter, Inc.
61502 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
61503 * ======================================================================== */
61504
61505
61506 +function ($) {
61507 'use strict';
61508
61509 // AFFIX CLASS DEFINITION
61510 // ======================
61511
61512 var Affix = function (element, options) {
61513 this.options = $.extend({}, Affix.DEFAULTS, options)
61514
61515 this.$target = $(this.options.target)
61516 .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
61517 .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
61518
61519 this.$element = $(element)
61520 this.affixed = null
61521 this.unpin = null
61522 this.pinnedOffset = null
61523
61524 this.checkPosition()
61525 }
61526
61527 Affix.VERSION = '3.3.7'
61528
61529 Affix.RESET = 'affix affix-top affix-bottom'
61530
61531 Affix.DEFAULTS = {
61532 offset: 0,
61533 target: window
61534 }
61535
61536 Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
61537 var scrollTop = this.$target.scrollTop()
61538 var position = this.$element.offset()
61539 var targetHeight = this.$target.height()
61540
61541 if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
61542
61543 if (this.affixed == 'bottom') {
61544 if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
61545 return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
61546 }
61547
61548 var initializing = this.affixed == null
61549 var colliderTop = initializing ? scrollTop : position.top
61550 var colliderHeight = initializing ? targetHeight : height
61551
61552 if (offsetTop != null && scrollTop <= offsetTop) return 'top'
61553 if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
61554
61555 return false
61556 }
61557
61558 Affix.prototype.getPinnedOffset = function () {
61559 if (this.pinnedOffset) return this.pinnedOffset
61560 this.$element.removeClass(Affix.RESET).addClass('affix')
61561 var scrollTop = this.$target.scrollTop()
61562 var position = this.$element.offset()
61563 return (this.pinnedOffset = position.top - scrollTop)
61564 }
61565
61566 Affix.prototype.checkPositionWithEventLoop = function () {
61567 setTimeout($.proxy(this.checkPosition, this), 1)
61568 }
61569
61570 Affix.prototype.checkPosition = function () {
61571 if (!this.$element.is(':visible')) return
61572
61573 var height = this.$element.height()
61574 var offset = this.options.offset
61575 var offsetTop = offset.top
61576 var offsetBottom = offset.bottom
61577 var scrollHeight = Math.max($(document).height(), $(document.body).height())
61578
61579 if (typeof offset != 'object') offsetBottom = offsetTop = offset
61580 if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
61581 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
61582
61583 var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
61584
61585 if (this.affixed != affix) {
61586 if (this.unpin != null) this.$element.css('top', '')
61587
61588 var affixType = 'affix' + (affix ? '-' + affix : '')
61589 var e = $.Event(affixType + '.bs.affix')
61590
61591 this.$element.trigger(e)
61592
61593 if (e.isDefaultPrevented()) return
61594
61595 this.affixed = affix
61596 this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
61597
61598 this.$element
61599 .removeClass(Affix.RESET)
61600 .addClass(affixType)
61601 .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
61602 }
61603
61604 if (affix == 'bottom') {
61605 this.$element.offset({
61606 top: scrollHeight - height - offsetBottom
61607 })
61608 }
61609 }
61610
61611
61612 // AFFIX PLUGIN DEFINITION
61613 // =======================
61614
61615 function Plugin(option) {
61616 return this.each(function () {
61617 var $this = $(this)
61618 var data = $this.data('bs.affix')
61619 var options = typeof option == 'object' && option
61620
61621 if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
61622 if (typeof option == 'string') data[option]()
61623 })
61624 }
61625
61626 var old = $.fn.affix
61627
61628 $.fn.affix = Plugin
61629 $.fn.affix.Constructor = Affix
61630
61631
61632 // AFFIX NO CONFLICT
61633 // =================
61634
61635 $.fn.affix.noConflict = function () {
61636 $.fn.affix = old
61637 return this
61638 }
61639
61640
61641 // AFFIX DATA-API
61642 // ==============
61643
61644 $(window).on('load', function () {
61645 $('[data-spy="affix"]').each(function () {
61646 var $spy = $(this)
61647 var data = $spy.data()
61648
61649 data.offset = data.offset || {}
61650
61651 if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
61652 if (data.offsetTop != null) data.offset.top = data.offsetTop
61653
61654 Plugin.call($spy, data)
61655 })
61656 })
61657
61658 }(jQuery);
61659
61660 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
61661
61662/***/ },
61663/* 626 */
61664/***/ function(module, exports, __webpack_require__) {
61665
61666 // style-loader: Adds some css to the DOM by adding a <style> tag
61667
61668 // load the styles
61669 var content = __webpack_require__(627);
61670 if(typeof content === 'string') content = [[module.id, content, '']];
61671 // add the styles to the DOM
61672 var update = __webpack_require__(611)(content, {});
61673 if(content.locals) module.exports = content.locals;
61674 // Hot Module Replacement
61675 if(false) {
61676 // When the styles change, update the <style> tags
61677 if(!content.locals) {
61678 module.hot.accept("!!./../../../css-loader/index.js!./AdminLTE.min.css", function() {
61679 var newContent = require("!!./../../../css-loader/index.js!./AdminLTE.min.css");
61680 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
61681 update(newContent);
61682 });
61683 }
61684 // When the module is disposed, remove the <style> tags
61685 module.hot.dispose(function() { update(); });
61686 }
61687
61688/***/ },
61689/* 627 */
61690/***/ function(module, exports, __webpack_require__) {
61691
61692 exports = module.exports = __webpack_require__(605)();
61693 // imports
61694 exports.push([module.id, "@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);", ""]);
61695
61696 // module
61697 exports.push([module.id, "/*!\n * AdminLTE v2.3.7\n * Author: Almsaeed Studio\n *\t Website: Almsaeed Studio <http://almsaeedstudio.com>\n * License: Open source - MIT\n * Please visit http://opensource.org/licenses/MIT for more information\n!*/html,body{min-height:100%}.layout-boxed html,.layout-boxed body{height:100%}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;overflow-x:hidden;overflow-y:auto}.wrapper{min-height:100%;position:relative;overflow:hidden}.wrapper:before,.wrapper:after{content:\" \";display:table}.wrapper:after{clear:both}.layout-boxed .wrapper{max-width:1250px;margin:0 auto;min-height:100%;box-shadow:0 0 8px rgba(0,0,0,0.5);position:relative}.layout-boxed{background:url(" + __webpack_require__(628) + ") repeat fixed}.content-wrapper,.right-side,.main-footer{-webkit-transition:-webkit-transform .3s ease-in-out,margin .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,margin .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,margin .3s ease-in-out;transition:transform .3s ease-in-out,margin .3s ease-in-out;margin-left:230px;z-index:820}.layout-top-nav .content-wrapper,.layout-top-nav .right-side,.layout-top-nav .main-footer{margin-left:0}@media (max-width:767px){.content-wrapper,.right-side,.main-footer{margin-left:0}}@media (min-width:768px){.sidebar-collapse .content-wrapper,.sidebar-collapse .right-side,.sidebar-collapse .main-footer{margin-left:0}}@media (max-width:767px){.sidebar-open .content-wrapper,.sidebar-open .right-side,.sidebar-open .main-footer{-webkit-transform:translate(230px, 0);-ms-transform:translate(230px, 0);-o-transform:translate(230px, 0);transform:translate(230px, 0)}}.content-wrapper,.right-side{min-height:100%;background-color:#ecf0f5;z-index:800}.main-footer{background:#fff;padding:15px;color:#444;border-top:1px solid #d2d6de}.fixed .main-header,.fixed .main-sidebar,.fixed .left-side{position:fixed}.fixed .main-header{top:0;right:0;left:0}.fixed .content-wrapper,.fixed .right-side{padding-top:50px}@media (max-width:767px){.fixed .content-wrapper,.fixed .right-side{padding-top:100px}}.fixed.layout-boxed .wrapper{max-width:100%}body.hold-transition .content-wrapper,body.hold-transition .right-side,body.hold-transition .main-footer,body.hold-transition .main-sidebar,body.hold-transition .left-side,body.hold-transition .main-header .navbar,body.hold-transition .main-header .logo{-webkit-transition:none;-o-transition:none;transition:none}.content{min-height:250px;padding:15px;margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',sans-serif}a{color:#3c8dbc}a:hover,a:active,a:focus{outline:none;text-decoration:none;color:#72afd2}.page-header{margin:10px 0 20px 0;font-size:22px}.page-header>small{color:#666;display:block;margin-top:5px}.main-header{position:relative;max-height:100px;z-index:1030}.main-header .navbar{-webkit-transition:margin-left .3s ease-in-out;-o-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-bottom:0;margin-left:230px;border:none;min-height:50px;border-radius:0}.layout-top-nav .main-header .navbar{margin-left:0}.main-header #navbar-search-input.form-control{background:rgba(255,255,255,0.2);border-color:transparent}.main-header #navbar-search-input.form-control:focus,.main-header #navbar-search-input.form-control:active{border-color:rgba(0,0,0,0.1);background:rgba(255,255,255,0.9)}.main-header #navbar-search-input.form-control::-moz-placeholder{color:#ccc;opacity:1}.main-header #navbar-search-input.form-control:-ms-input-placeholder{color:#ccc}.main-header #navbar-search-input.form-control::-webkit-input-placeholder{color:#ccc}.main-header .navbar-custom-menu,.main-header .navbar-right{float:right}@media (max-width:991px){.main-header .navbar-custom-menu a,.main-header .navbar-right a{color:inherit;background:transparent}}@media (max-width:767px){.main-header .navbar-right{float:none}.navbar-collapse .main-header .navbar-right{margin:7.5px -15px}.main-header .navbar-right>li{color:inherit;border:0}}.main-header .sidebar-toggle{float:left;background-color:transparent;background-image:none;padding:15px 15px;font-family:fontAwesome}.main-header .sidebar-toggle:before{content:\"\\F0C9\"}.main-header .sidebar-toggle:hover{color:#fff}.main-header .sidebar-toggle:focus,.main-header .sidebar-toggle:active{background:transparent}.main-header .sidebar-toggle .icon-bar{display:none}.main-header .navbar .nav>li.user>a>.fa,.main-header .navbar .nav>li.user>a>.glyphicon,.main-header .navbar .nav>li.user>a>.ion{margin-right:5px}.main-header .navbar .nav>li>a>.label{position:absolute;top:9px;right:7px;text-align:center;font-size:9px;padding:2px 3px;line-height:.9}.main-header .logo{-webkit-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out;display:block;float:left;height:50px;font-size:20px;line-height:50px;text-align:center;width:230px;font-family:\"Helvetica Neue\",Helvetica,Arial,sans-serif;padding:0 15px;font-weight:300;overflow:hidden}.main-header .logo .logo-lg{display:block}.main-header .logo .logo-mini{display:none}.main-header .navbar-brand{color:#fff}.content-header{position:relative;padding:15px 15px 0 15px}.content-header>h1{margin:0;font-size:24px}.content-header>h1>small{font-size:15px;display:inline-block;padding-left:4px;font-weight:300}.content-header>.breadcrumb{float:right;background:transparent;margin-top:0;margin-bottom:0;font-size:12px;padding:7px 5px;position:absolute;top:15px;right:10px;border-radius:2px}.content-header>.breadcrumb>li>a{color:#444;text-decoration:none;display:inline-block}.content-header>.breadcrumb>li>a>.fa,.content-header>.breadcrumb>li>a>.glyphicon,.content-header>.breadcrumb>li>a>.ion{margin-right:5px}.content-header>.breadcrumb>li+li:before{content:'>\\A0'}@media (max-width:991px){.content-header>.breadcrumb{position:relative;margin-top:5px;top:0;right:0;float:none;background:#d2d6de;padding-left:10px}.content-header>.breadcrumb li:before{color:#97a0b3}}.navbar-toggle{color:#fff;border:0;margin:0;padding:15px 15px}@media (max-width:991px){.navbar-custom-menu .navbar-nav>li{float:left}.navbar-custom-menu .navbar-nav{margin:0;float:left}.navbar-custom-menu .navbar-nav>li>a{padding-top:15px;padding-bottom:15px;line-height:20px}}@media (max-width:767px){.main-header{position:relative}.main-header .logo,.main-header .navbar{width:100%;float:none}.main-header .navbar{margin:0}.main-header .navbar-custom-menu{float:right}}@media (max-width:991px){.navbar-collapse.pull-left{float:none !important}.navbar-collapse.pull-left+.navbar-custom-menu{display:block;position:absolute;top:0;right:40px}}.main-sidebar,.left-side{position:absolute;top:0;left:0;padding-top:50px;min-height:100%;width:230px;z-index:810;-webkit-transition:-webkit-transform .3s ease-in-out,width .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,width .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,width .3s ease-in-out;transition:transform .3s ease-in-out,width .3s ease-in-out}@media (max-width:767px){.main-sidebar,.left-side{padding-top:100px}}@media (max-width:767px){.main-sidebar,.left-side{-webkit-transform:translate(-230px, 0);-ms-transform:translate(-230px, 0);-o-transform:translate(-230px, 0);transform:translate(-230px, 0)}}@media (min-width:768px){.sidebar-collapse .main-sidebar,.sidebar-collapse .left-side{-webkit-transform:translate(-230px, 0);-ms-transform:translate(-230px, 0);-o-transform:translate(-230px, 0);transform:translate(-230px, 0)}}@media (max-width:767px){.sidebar-open .main-sidebar,.sidebar-open .left-side{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}}.sidebar{padding-bottom:10px}.sidebar-form input:focus{border-color:transparent}.user-panel{position:relative;width:100%;padding:10px;overflow:hidden}.user-panel:before,.user-panel:after{content:\" \";display:table}.user-panel:after{clear:both}.user-panel>.image>img{width:100%;max-width:45px;height:auto}.user-panel>.info{padding:5px 5px 5px 15px;line-height:1;position:absolute;left:55px}.user-panel>.info>p{font-weight:600;margin-bottom:9px}.user-panel>.info>a{text-decoration:none;padding-right:5px;margin-top:3px;font-size:11px}.user-panel>.info>a>.fa,.user-panel>.info>a>.ion,.user-panel>.info>a>.glyphicon{margin-right:3px}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu>li{position:relative;margin:0;padding:0}.sidebar-menu>li>a{padding:12px 5px 12px 15px;display:block}.sidebar-menu>li>a>.fa,.sidebar-menu>li>a>.glyphicon,.sidebar-menu>li>a>.ion{width:20px}.sidebar-menu>li .label,.sidebar-menu>li .badge{margin-right:5px}.sidebar-menu>li .badge{margin-top:3px}.sidebar-menu li.header{padding:10px 25px 10px 15px;font-size:12px}.sidebar-menu li>a>.fa-angle-left,.sidebar-menu li>a>.pull-right-container>.fa-angle-left{width:auto;height:auto;padding:0;margin-right:10px}.sidebar-menu li.active>a>.fa-angle-left,.sidebar-menu li.active>a>.pull-right-container>.fa-angle-left{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.sidebar-menu li.active>.treeview-menu{display:block}.sidebar-menu .treeview-menu{display:none;list-style:none;padding:0;margin:0;padding-left:5px}.sidebar-menu .treeview-menu .treeview-menu{padding-left:20px}.sidebar-menu .treeview-menu>li{margin:0}.sidebar-menu .treeview-menu>li>a{padding:5px 5px 5px 15px;display:block;font-size:14px}.sidebar-menu .treeview-menu>li>a>.fa,.sidebar-menu .treeview-menu>li>a>.glyphicon,.sidebar-menu .treeview-menu>li>a>.ion{width:20px}.sidebar-menu .treeview-menu>li>a>.pull-right-container>.fa-angle-left,.sidebar-menu .treeview-menu>li>a>.pull-right-container>.fa-angle-down,.sidebar-menu .treeview-menu>li>a>.fa-angle-left,.sidebar-menu .treeview-menu>li>a>.fa-angle-down{width:auto}@media (min-width:768px){.sidebar-mini.sidebar-collapse .content-wrapper,.sidebar-mini.sidebar-collapse .right-side,.sidebar-mini.sidebar-collapse .main-footer{margin-left:50px !important;z-index:840}.sidebar-mini.sidebar-collapse .main-sidebar{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);width:50px !important;z-index:850}.sidebar-mini.sidebar-collapse .sidebar-menu>li{position:relative}.sidebar-mini.sidebar-collapse .sidebar-menu>li>a{margin-right:0}.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span{border-top-right-radius:4px}.sidebar-mini.sidebar-collapse .sidebar-menu>li:not(.treeview)>a>span{border-bottom-right-radius:4px}.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{padding-top:5px;padding-bottom:5px;border-bottom-right-radius:4px}.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>a>span:not(.pull-right),.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>.treeview-menu{display:block !important;position:absolute;width:180px;left:50px}.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>a>span{top:0;margin-left:-3px;padding:12px 5px 12px 20px;background-color:inherit}.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container{float:right;width:auto!important;left:200px!important;top:10px!important}.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container>.label:not(:first-of-type){display:none}.sidebar-mini.sidebar-collapse .sidebar-menu>li:hover>.treeview-menu{top:44px;margin-left:0}.sidebar-mini.sidebar-collapse .main-sidebar .user-panel>.info,.sidebar-mini.sidebar-collapse .sidebar-form,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span,.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>.pull-right,.sidebar-mini.sidebar-collapse .sidebar-menu li.header{display:none !important;-webkit-transform:translateZ(0)}.sidebar-mini.sidebar-collapse .main-header .logo{width:50px}.sidebar-mini.sidebar-collapse .main-header .logo>.logo-mini{display:block;margin-left:-15px;margin-right:-15px;font-size:18px}.sidebar-mini.sidebar-collapse .main-header .logo>.logo-lg{display:none}.sidebar-mini.sidebar-collapse .main-header .navbar{margin-left:50px}}.sidebar-menu,.main-sidebar .user-panel,.sidebar-menu>li.header{white-space:nowrap;overflow:hidden}.sidebar-menu:hover{overflow:visible}.sidebar-form,.sidebar-menu>li.header{overflow:hidden;text-overflow:clip}.sidebar-menu li>a{position:relative}.sidebar-menu li>a>.pull-right-container{position:absolute;right:10px;top:50%;margin-top:-7px}.control-sidebar-bg{position:fixed;z-index:1000;bottom:0}.control-sidebar-bg,.control-sidebar{top:0;right:-230px;width:230px;-webkit-transition:right .3s ease-in-out;-o-transition:right .3s ease-in-out;transition:right .3s ease-in-out}.control-sidebar{position:absolute;padding-top:50px;z-index:1010}@media (max-width:768px){.control-sidebar{padding-top:100px}}.control-sidebar>.tab-content{padding:10px 15px}.control-sidebar.control-sidebar-open,.control-sidebar.control-sidebar-open+.control-sidebar-bg{right:0}.control-sidebar-open .control-sidebar-bg,.control-sidebar-open .control-sidebar{right:0}@media (min-width:768px){.control-sidebar-open .content-wrapper,.control-sidebar-open .right-side,.control-sidebar-open .main-footer{margin-right:230px}}.nav-tabs.control-sidebar-tabs>li:first-of-type>a,.nav-tabs.control-sidebar-tabs>li:first-of-type>a:hover,.nav-tabs.control-sidebar-tabs>li:first-of-type>a:focus{border-left-width:0}.nav-tabs.control-sidebar-tabs>li>a{border-radius:0}.nav-tabs.control-sidebar-tabs>li>a,.nav-tabs.control-sidebar-tabs>li>a:hover{border-top:none;border-right:none;border-left:1px solid transparent;border-bottom:1px solid transparent}.nav-tabs.control-sidebar-tabs>li>a .icon{font-size:16px}.nav-tabs.control-sidebar-tabs>li.active>a,.nav-tabs.control-sidebar-tabs>li.active>a:hover,.nav-tabs.control-sidebar-tabs>li.active>a:focus,.nav-tabs.control-sidebar-tabs>li.active>a:active{border-top:none;border-right:none;border-bottom:none}@media (max-width:768px){.nav-tabs.control-sidebar-tabs{display:table}.nav-tabs.control-sidebar-tabs>li{display:table-cell}}.control-sidebar-heading{font-weight:400;font-size:16px;padding:10px 0;margin-bottom:10px}.control-sidebar-subheading{display:block;font-weight:400;font-size:14px}.control-sidebar-menu{list-style:none;padding:0;margin:0 -15px}.control-sidebar-menu>li>a{display:block;padding:10px 15px}.control-sidebar-menu>li>a:before,.control-sidebar-menu>li>a:after{content:\" \";display:table}.control-sidebar-menu>li>a:after{clear:both}.control-sidebar-menu>li>a>.control-sidebar-subheading{margin-top:0}.control-sidebar-menu .menu-icon{float:left;width:35px;height:35px;border-radius:50%;text-align:center;line-height:35px}.control-sidebar-menu .menu-info{margin-left:45px;margin-top:3px}.control-sidebar-menu .menu-info>.control-sidebar-subheading{margin:0}.control-sidebar-menu .menu-info>p{margin:0;font-size:11px}.control-sidebar-menu .progress{margin:0}.control-sidebar-dark{color:#b8c7ce}.control-sidebar-dark,.control-sidebar-dark+.control-sidebar-bg{background:#222d32}.control-sidebar-dark .nav-tabs.control-sidebar-tabs{border-bottom:#1c2529}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a{background:#181f23;color:#b8c7ce}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:focus{border-left-color:#141a1d;border-bottom-color:#141a1d}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:focus,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:active{background:#1c2529}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover{color:#fff}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:focus,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:active{background:#222d32;color:#fff}.control-sidebar-dark .control-sidebar-heading,.control-sidebar-dark .control-sidebar-subheading{color:#fff}.control-sidebar-dark .control-sidebar-menu>li>a:hover{background:#1e282c}.control-sidebar-dark .control-sidebar-menu>li>a .menu-info>p{color:#b8c7ce}.control-sidebar-light{color:#5e5e5e}.control-sidebar-light,.control-sidebar-light+.control-sidebar-bg{background:#f9fafc;border-left:1px solid #d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs{border-bottom:#d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a{background:#e8ecf4;color:#444}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:focus{border-left-color:#d2d6de;border-bottom-color:#d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:focus,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:active{background:#eff1f7}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:focus,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:active{background:#f9fafc;color:#111}.control-sidebar-light .control-sidebar-heading,.control-sidebar-light .control-sidebar-subheading{color:#111}.control-sidebar-light .control-sidebar-menu{margin-left:-14px}.control-sidebar-light .control-sidebar-menu>li>a:hover{background:#f4f4f5}.control-sidebar-light .control-sidebar-menu>li>a .menu-info>p{color:#5e5e5e}.dropdown-menu{box-shadow:none;border-color:#eee}.dropdown-menu>li>a{color:#777}.dropdown-menu>li>a>.glyphicon,.dropdown-menu>li>a>.fa,.dropdown-menu>li>a>.ion{margin-right:10px}.dropdown-menu>li>a:hover{background-color:#e1e3e9;color:#333}.dropdown-menu>.divider{background-color:#eee}.navbar-nav>.notifications-menu>.dropdown-menu,.navbar-nav>.messages-menu>.dropdown-menu,.navbar-nav>.tasks-menu>.dropdown-menu{width:280px;padding:0 0 0 0;margin:0;top:100%}.navbar-nav>.notifications-menu>.dropdown-menu>li,.navbar-nav>.messages-menu>.dropdown-menu>li,.navbar-nav>.tasks-menu>.dropdown-menu>li{position:relative}.navbar-nav>.notifications-menu>.dropdown-menu>li.header,.navbar-nav>.messages-menu>.dropdown-menu>li.header,.navbar-nav>.tasks-menu>.dropdown-menu>li.header{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:#ffffff;padding:7px 10px;border-bottom:1px solid #f4f4f4;color:#444444;font-size:14px}.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-size:12px;background-color:#fff;padding:7px 10px;border-bottom:1px solid #eeeeee;color:#444 !important;text-align:center}@media (max-width:991px){.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a{background:#fff !important;color:#444 !important}}.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a:hover,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a:hover,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a:hover{text-decoration:none;font-weight:normal}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu,.navbar-nav>.messages-menu>.dropdown-menu>li .menu,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu{max-height:200px;margin:0;padding:0;list-style:none;overflow-x:hidden}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a{display:block;white-space:nowrap;border-bottom:1px solid #f4f4f4}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a:hover,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:hover,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a:hover{background:#f4f4f4;text-decoration:none}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a{color:#444444;overflow:hidden;text-overflow:ellipsis;padding:10px}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.glyphicon,.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.fa,.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.ion{width:20px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a{margin:0;padding:10px 10px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>div>img{margin:auto 10px auto auto;width:40px;height:40px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>h4{padding:0;margin:0 0 0 45px;color:#444444;font-size:15px;position:relative}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>h4>small{color:#999999;font-size:10px;position:absolute;top:0;right:0}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>p{margin:0 0 0 45px;font-size:12px;color:#888888}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:before,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:after{content:\" \";display:table}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:after{clear:both}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a{padding:10px}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a>h3{font-size:14px;padding:0;margin:0 0 10px 0;color:#666666}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a>.progress{padding:0;margin:0}.navbar-nav>.user-menu>.dropdown-menu{border-top-right-radius:0;border-top-left-radius:0;padding:1px 0 0 0;border-top-width:0;width:280px}.navbar-nav>.user-menu>.dropdown-menu,.navbar-nav>.user-menu>.dropdown-menu>.user-body{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.navbar-nav>.user-menu>.dropdown-menu>li.user-header{height:175px;padding:10px;text-align:center}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>img{z-index:5;height:90px;width:90px;border:3px solid;border-color:transparent;border-color:rgba(255,255,255,0.2)}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>p{z-index:5;color:#fff;color:rgba(255,255,255,0.8);font-size:17px;margin-top:10px}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>p>small{display:block;font-size:12px}.navbar-nav>.user-menu>.dropdown-menu>.user-body{padding:15px;border-bottom:1px solid #f4f4f4;border-top:1px solid #dddddd}.navbar-nav>.user-menu>.dropdown-menu>.user-body:before,.navbar-nav>.user-menu>.dropdown-menu>.user-body:after{content:\" \";display:table}.navbar-nav>.user-menu>.dropdown-menu>.user-body:after{clear:both}.navbar-nav>.user-menu>.dropdown-menu>.user-body a{color:#444 !important}@media (max-width:991px){.navbar-nav>.user-menu>.dropdown-menu>.user-body a{background:#fff !important;color:#444 !important}}.navbar-nav>.user-menu>.dropdown-menu>.user-footer{background-color:#f9f9f9;padding:10px}.navbar-nav>.user-menu>.dropdown-menu>.user-footer:before,.navbar-nav>.user-menu>.dropdown-menu>.user-footer:after{content:\" \";display:table}.navbar-nav>.user-menu>.dropdown-menu>.user-footer:after{clear:both}.navbar-nav>.user-menu>.dropdown-menu>.user-footer .btn-default{color:#666666}@media (max-width:991px){.navbar-nav>.user-menu>.dropdown-menu>.user-footer .btn-default:hover{background-color:#f9f9f9}}.navbar-nav>.user-menu .user-image{float:left;width:25px;height:25px;border-radius:50%;margin-right:10px;margin-top:-2px}@media (max-width:767px){.navbar-nav>.user-menu .user-image{float:none;margin-right:0;margin-top:-8px;line-height:10px}}.open:not(.dropup)>.animated-dropdown-menu{backface-visibility:visible !important;-webkit-animation:flipInX .7s both;-o-animation:flipInX .7s both;animation:flipInX .7s both}@keyframes flipInX{0%{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);transition-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);transition-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}100%{transform:perspective(400px)}}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 90deg);-webkit-transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -20deg);-webkit-transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}100%{-webkit-transform:perspective(400px)}}.navbar-custom-menu>.navbar-nav>li{position:relative}.navbar-custom-menu>.navbar-nav>li>.dropdown-menu{position:absolute;right:0;left:auto}@media (max-width:991px){.navbar-custom-menu>.navbar-nav{float:right}.navbar-custom-menu>.navbar-nav>li{position:static}.navbar-custom-menu>.navbar-nav>li>.dropdown-menu{position:absolute;right:5%;left:auto;border:1px solid #ddd;background:#fff}}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}.form-control:focus{border-color:#3c8dbc;box-shadow:none}.form-control::-moz-placeholder,.form-control:-ms-input-placeholder,.form-control::-webkit-input-placeholder{color:#bbb;opacity:1}.form-control:not(select){-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-group.has-success label{color:#00a65a}.form-group.has-success .form-control,.form-group.has-success .input-group-addon{border-color:#00a65a;box-shadow:none}.form-group.has-success .help-block{color:#00a65a}.form-group.has-warning label{color:#f39c12}.form-group.has-warning .form-control,.form-group.has-warning .input-group-addon{border-color:#f39c12;box-shadow:none}.form-group.has-warning .help-block{color:#f39c12}.form-group.has-error label{color:#dd4b39}.form-group.has-error .form-control,.form-group.has-error .input-group-addon{border-color:#dd4b39;box-shadow:none}.form-group.has-error .help-block{color:#dd4b39}.input-group .input-group-addon{border-radius:0;border-color:#d2d6de;background-color:#fff}.btn-group-vertical .btn.btn-flat:first-of-type,.btn-group-vertical .btn.btn-flat:last-of-type{border-radius:0}.icheck>label{padding-left:0}.form-control-feedback.fa{line-height:34px}.input-lg+.form-control-feedback.fa,.input-group-lg+.form-control-feedback.fa,.form-group-lg .form-control+.form-control-feedback.fa{line-height:46px}.input-sm+.form-control-feedback.fa,.input-group-sm+.form-control-feedback.fa,.form-group-sm .form-control+.form-control-feedback.fa{line-height:30px}.progress,.progress>.progress-bar{-webkit-box-shadow:none;box-shadow:none}.progress,.progress>.progress-bar,.progress .progress-bar,.progress>.progress-bar .progress-bar{border-radius:1px}.progress.sm,.progress-sm{height:10px}.progress.sm,.progress-sm,.progress.sm .progress-bar,.progress-sm .progress-bar{border-radius:1px}.progress.xs,.progress-xs{height:7px}.progress.xs,.progress-xs,.progress.xs .progress-bar,.progress-xs .progress-bar{border-radius:1px}.progress.xxs,.progress-xxs{height:3px}.progress.xxs,.progress-xxs,.progress.xxs .progress-bar,.progress-xxs .progress-bar{border-radius:1px}.progress.vertical{position:relative;width:30px;height:200px;display:inline-block;margin-right:10px}.progress.vertical>.progress-bar{width:100%;position:absolute;bottom:0}.progress.vertical.sm,.progress.vertical.progress-sm{width:20px}.progress.vertical.xs,.progress.vertical.progress-xs{width:10px}.progress.vertical.xxs,.progress.vertical.progress-xxs{width:3px}.progress-group .progress-text{font-weight:600}.progress-group .progress-number{float:right}.table tr>td .progress{margin:0}.progress-bar-light-blue,.progress-bar-primary{background-color:#3c8dbc}.progress-striped .progress-bar-light-blue,.progress-striped .progress-bar-primary{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-green,.progress-bar-success{background-color:#00a65a}.progress-striped .progress-bar-green,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-aqua,.progress-bar-info{background-color:#00c0ef}.progress-striped .progress-bar-aqua,.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-yellow,.progress-bar-warning{background-color:#f39c12}.progress-striped .progress-bar-yellow,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-red,.progress-bar-danger{background-color:#dd4b39}.progress-striped .progress-bar-red,.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.small-box{border-radius:2px;position:relative;display:block;margin-bottom:20px;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.small-box>.inner{padding:10px}.small-box>.small-box-footer{position:relative;text-align:center;padding:3px 0;color:#fff;color:rgba(255,255,255,0.8);display:block;z-index:10;background:rgba(0,0,0,0.1);text-decoration:none}.small-box>.small-box-footer:hover{color:#fff;background:rgba(0,0,0,0.15)}.small-box h3{font-size:38px;font-weight:bold;margin:0 0 10px 0;white-space:nowrap;padding:0}.small-box p{font-size:15px}.small-box p>small{display:block;color:#f9f9f9;font-size:13px;margin-top:5px}.small-box h3,.small-box p{z-index:5}.small-box .icon{-webkit-transition:all .3s linear;-o-transition:all .3s linear;transition:all .3s linear;position:absolute;top:-10px;right:10px;z-index:0;font-size:90px;color:rgba(0,0,0,0.15)}.small-box:hover{text-decoration:none;color:#f9f9f9}.small-box:hover .icon{font-size:95px}@media (max-width:767px){.small-box{text-align:center}.small-box .icon{display:none}.small-box p{font-size:12px}}.box{position:relative;border-radius:3px;background:#ffffff;border-top:3px solid #d2d6de;margin-bottom:20px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.box.box-primary{border-top-color:#3c8dbc}.box.box-info{border-top-color:#00c0ef}.box.box-danger{border-top-color:#dd4b39}.box.box-warning{border-top-color:#f39c12}.box.box-success{border-top-color:#00a65a}.box.box-default{border-top-color:#d2d6de}.box.collapsed-box .box-body,.box.collapsed-box .box-footer{display:none}.box .nav-stacked>li{border-bottom:1px solid #f4f4f4;margin:0}.box .nav-stacked>li:last-of-type{border-bottom:none}.box.height-control .box-body{max-height:300px;overflow:auto}.box .border-right{border-right:1px solid #f4f4f4}.box .border-left{border-left:1px solid #f4f4f4}.box.box-solid{border-top:0}.box.box-solid>.box-header .btn.btn-default{background:transparent}.box.box-solid>.box-header .btn:hover,.box.box-solid>.box-header a:hover{background:rgba(0,0,0,0.1)}.box.box-solid.box-default{border:1px solid #d2d6de}.box.box-solid.box-default>.box-header{color:#444;background:#d2d6de;background-color:#d2d6de}.box.box-solid.box-default>.box-header a,.box.box-solid.box-default>.box-header .btn{color:#444}.box.box-solid.box-primary{border:1px solid #3c8dbc}.box.box-solid.box-primary>.box-header{color:#fff;background:#3c8dbc;background-color:#3c8dbc}.box.box-solid.box-primary>.box-header a,.box.box-solid.box-primary>.box-header .btn{color:#fff}.box.box-solid.box-info{border:1px solid #00c0ef}.box.box-solid.box-info>.box-header{color:#fff;background:#00c0ef;background-color:#00c0ef}.box.box-solid.box-info>.box-header a,.box.box-solid.box-info>.box-header .btn{color:#fff}.box.box-solid.box-danger{border:1px solid #dd4b39}.box.box-solid.box-danger>.box-header{color:#fff;background:#dd4b39;background-color:#dd4b39}.box.box-solid.box-danger>.box-header a,.box.box-solid.box-danger>.box-header .btn{color:#fff}.box.box-solid.box-warning{border:1px solid #f39c12}.box.box-solid.box-warning>.box-header{color:#fff;background:#f39c12;background-color:#f39c12}.box.box-solid.box-warning>.box-header a,.box.box-solid.box-warning>.box-header .btn{color:#fff}.box.box-solid.box-success{border:1px solid #00a65a}.box.box-solid.box-success>.box-header{color:#fff;background:#00a65a;background-color:#00a65a}.box.box-solid.box-success>.box-header a,.box.box-solid.box-success>.box-header .btn{color:#fff}.box.box-solid>.box-header>.box-tools .btn{border:0;box-shadow:none}.box.box-solid[class*='bg']>.box-header{color:#fff}.box .box-group>.box{margin-bottom:5px}.box .knob-label{text-align:center;color:#333;font-weight:100;font-size:12px;margin-bottom:0.3em}.box>.overlay,.overlay-wrapper>.overlay,.box>.loading-img,.overlay-wrapper>.loading-img{position:absolute;top:0;left:0;width:100%;height:100%}.box .overlay,.overlay-wrapper .overlay{z-index:50;background:rgba(255,255,255,0.7);border-radius:3px}.box .overlay>.fa,.overlay-wrapper .overlay>.fa{position:absolute;top:50%;left:50%;margin-left:-15px;margin-top:-15px;color:#000;font-size:30px}.box .overlay.dark,.overlay-wrapper .overlay.dark{background:rgba(0,0,0,0.5)}.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after{content:\" \";display:table}.box-header:after,.box-body:after,.box-footer:after{clear:both}.box-header{color:#444;display:block;padding:10px;position:relative}.box-header.with-border{border-bottom:1px solid #f4f4f4}.collapsed-box .box-header.with-border{border-bottom:none}.box-header>.fa,.box-header>.glyphicon,.box-header>.ion,.box-header .box-title{display:inline-block;font-size:18px;margin:0;line-height:1}.box-header>.fa,.box-header>.glyphicon,.box-header>.ion{margin-right:5px}.box-header>.box-tools{position:absolute;right:10px;top:5px}.box-header>.box-tools [data-toggle=\"tooltip\"]{position:relative}.box-header>.box-tools.pull-right .dropdown-menu{right:0;left:auto}.btn-box-tool{padding:5px;font-size:12px;background:transparent;color:#97a0b3}.open .btn-box-tool,.btn-box-tool:hover{color:#606c84}.btn-box-tool.btn:active{box-shadow:none}.box-body{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px}.no-header .box-body{border-top-right-radius:3px;border-top-left-radius:3px}.box-body>.table{margin-bottom:0}.box-body .fc{margin-top:5px}.box-body .full-width-chart{margin:-19px}.box-body.no-padding .full-width-chart{margin:-9px}.box-body .box-pane{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:3px}.box-body .box-pane-right{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:0}.box-footer{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-top:1px solid #f4f4f4;padding:10px;background-color:#fff}.chart-legend{margin:10px 0}@media (max-width:991px){.chart-legend>li{float:left;margin-right:10px}}.box-comments{background:#f7f7f7}.box-comments .box-comment{padding:8px 0;border-bottom:1px solid #eee}.box-comments .box-comment:before,.box-comments .box-comment:after{content:\" \";display:table}.box-comments .box-comment:after{clear:both}.box-comments .box-comment:last-of-type{border-bottom:0}.box-comments .box-comment:first-of-type{padding-top:0}.box-comments .box-comment img{float:left}.box-comments .comment-text{margin-left:40px;color:#555}.box-comments .username{color:#444;display:block;font-weight:600}.box-comments .text-muted{font-weight:400;font-size:12px}.todo-list{margin:0;padding:0;list-style:none;overflow:auto}.todo-list>li{border-radius:2px;padding:10px;background:#f4f4f4;margin-bottom:2px;border-left:2px solid #e6e7e8;color:#444}.todo-list>li:last-of-type{margin-bottom:0}.todo-list>li>input[type='checkbox']{margin:0 10px 0 5px}.todo-list>li .text{display:inline-block;margin-left:5px;font-weight:600}.todo-list>li .label{margin-left:10px;font-size:9px}.todo-list>li .tools{display:none;float:right;color:#dd4b39}.todo-list>li .tools>.fa,.todo-list>li .tools>.glyphicon,.todo-list>li .tools>.ion{margin-right:5px;cursor:pointer}.todo-list>li:hover .tools{display:inline-block}.todo-list>li.done{color:#999}.todo-list>li.done .text{text-decoration:line-through;font-weight:500}.todo-list>li.done .label{background:#d2d6de !important}.todo-list .danger{border-left-color:#dd4b39}.todo-list .warning{border-left-color:#f39c12}.todo-list .info{border-left-color:#00c0ef}.todo-list .success{border-left-color:#00a65a}.todo-list .primary{border-left-color:#3c8dbc}.todo-list .handle{display:inline-block;cursor:move;margin:0 5px}.chat{padding:5px 20px 5px 10px}.chat .item{margin-bottom:10px}.chat .item:before,.chat .item:after{content:\" \";display:table}.chat .item:after{clear:both}.chat .item>img{width:40px;height:40px;border:2px solid transparent;border-radius:50%}.chat .item>.online{border:2px solid #00a65a}.chat .item>.offline{border:2px solid #dd4b39}.chat .item>.message{margin-left:55px;margin-top:-40px}.chat .item>.message>.name{display:block;font-weight:600}.chat .item>.attachment{border-radius:3px;background:#f4f4f4;margin-left:65px;margin-right:15px;padding:10px}.chat .item>.attachment>h4{margin:0 0 5px 0;font-weight:600;font-size:14px}.chat .item>.attachment>p,.chat .item>.attachment>.filename{font-weight:600;font-size:13px;font-style:italic;margin:0}.chat .item>.attachment:before,.chat .item>.attachment:after{content:\" \";display:table}.chat .item>.attachment:after{clear:both}.box-input{max-width:200px}.modal .panel-body{color:#444}.info-box{display:block;min-height:90px;background:#fff;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:2px;margin-bottom:15px}.info-box small{font-size:14px}.info-box .progress{background:rgba(0,0,0,0.2);margin:5px -10px 5px -10px;height:2px}.info-box .progress,.info-box .progress .progress-bar{border-radius:0}.info-box .progress .progress-bar{background:#fff}.info-box-icon{border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px;display:block;float:left;height:90px;width:90px;text-align:center;font-size:45px;line-height:90px;background:rgba(0,0,0,0.2)}.info-box-icon>img{max-width:100%}.info-box-content{padding:5px 10px;margin-left:90px}.info-box-number{display:block;font-weight:bold;font-size:18px}.progress-description,.info-box-text{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info-box-text{text-transform:uppercase}.info-box-more{display:block}.progress-description{margin:0}.timeline{position:relative;margin:0 0 30px 0;padding:0;list-style:none}.timeline:before{content:'';position:absolute;top:0;bottom:0;width:4px;background:#ddd;left:31px;margin:0;border-radius:2px}.timeline>li{position:relative;margin-right:10px;margin-bottom:15px}.timeline>li:before,.timeline>li:after{content:\" \";display:table}.timeline>li:after{clear:both}.timeline>li>.timeline-item{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1);box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px;margin-top:0;background:#fff;color:#444;margin-left:60px;margin-right:15px;padding:0;position:relative}.timeline>li>.timeline-item>.time{color:#999;float:right;padding:10px;font-size:12px}.timeline>li>.timeline-item>.timeline-header{margin:0;color:#555;border-bottom:1px solid #f4f4f4;padding:10px;font-size:16px;line-height:1.1}.timeline>li>.timeline-item>.timeline-header>a{font-weight:600}.timeline>li>.timeline-item>.timeline-body,.timeline>li>.timeline-item>.timeline-footer{padding:10px}.timeline>li>.fa,.timeline>li>.glyphicon,.timeline>li>.ion{width:30px;height:30px;font-size:15px;line-height:30px;position:absolute;color:#666;background:#d2d6de;border-radius:50%;text-align:center;left:18px;top:0}.timeline>.time-label>span{font-weight:600;padding:5px;display:inline-block;background-color:#fff;border-radius:4px}.timeline-inverse>li>.timeline-item{background:#f0f0f0;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none}.timeline-inverse>li>.timeline-item>.timeline-header{border-bottom-color:#ddd}.btn{border-radius:3px;-webkit-box-shadow:none;box-shadow:none;border:1px solid transparent}.btn.uppercase{text-transform:uppercase}.btn.btn-flat{border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-width:1px}.btn:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn:focus{outline:none}.btn.btn-file{position:relative;overflow:hidden}.btn.btn-file>input[type='file']{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;opacity:0;filter:alpha(opacity=0);outline:none;background:white;cursor:inherit;display:block}.btn-default{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-default:hover,.btn-default:active,.btn-default.hover{background-color:#e7e7e7}.btn-primary{background-color:#3c8dbc;border-color:#367fa9}.btn-primary:hover,.btn-primary:active,.btn-primary.hover{background-color:#367fa9}.btn-success{background-color:#00a65a;border-color:#008d4c}.btn-success:hover,.btn-success:active,.btn-success.hover{background-color:#008d4c}.btn-info{background-color:#00c0ef;border-color:#00acd6}.btn-info:hover,.btn-info:active,.btn-info.hover{background-color:#00acd6}.btn-danger{background-color:#dd4b39;border-color:#d73925}.btn-danger:hover,.btn-danger:active,.btn-danger.hover{background-color:#d73925}.btn-warning{background-color:#f39c12;border-color:#e08e0b}.btn-warning:hover,.btn-warning:active,.btn-warning.hover{background-color:#e08e0b}.btn-outline{border:1px solid #fff;background:transparent;color:#fff}.btn-outline:hover,.btn-outline:focus,.btn-outline:active{color:rgba(255,255,255,0.7);border-color:rgba(255,255,255,0.7)}.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn[class*='bg-']:hover{-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,0.2);box-shadow:inset 0 0 100px rgba(0,0,0,0.2)}.btn-app{border-radius:3px;position:relative;padding:15px 5px;margin:0 0 10px 10px;min-width:80px;height:60px;text-align:center;color:#666;border:1px solid #ddd;background-color:#f4f4f4;font-size:12px}.btn-app>.fa,.btn-app>.glyphicon,.btn-app>.ion{font-size:20px;display:block}.btn-app:hover{background:#f4f4f4;color:#444;border-color:#aaa}.btn-app:active,.btn-app:focus{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-app>.badge{position:absolute;top:-3px;right:-10px;font-size:10px;font-weight:400}.callout{border-radius:3px;margin:0 0 20px 0;padding:15px 30px 15px 15px;border-left:5px solid #eee}.callout a{color:#fff;text-decoration:underline}.callout a:hover{color:#eee}.callout h4{margin-top:0;font-weight:600}.callout p:last-child{margin-bottom:0}.callout code,.callout .highlight{background-color:#fff}.callout.callout-danger{border-color:#c23321}.callout.callout-warning{border-color:#c87f0a}.callout.callout-info{border-color:#0097bc}.callout.callout-success{border-color:#00733e}.alert{border-radius:3px}.alert h4{font-weight:600}.alert .icon{margin-right:10px}.alert .close{color:#000;opacity:.2;filter:alpha(opacity=20)}.alert .close:hover{opacity:.5;filter:alpha(opacity=50)}.alert a{color:#fff;text-decoration:underline}.alert-success{border-color:#008d4c}.alert-danger,.alert-error{border-color:#d73925}.alert-warning{border-color:#e08e0b}.alert-info{border-color:#00acd6}.nav>li>a:hover,.nav>li>a:active,.nav>li>a:focus{color:#444;background:#f7f7f7}.nav-pills>li>a{border-radius:0;border-top:3px solid transparent;color:#444}.nav-pills>li>a>.fa,.nav-pills>li>a>.glyphicon,.nav-pills>li>a>.ion{margin-right:5px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{border-top-color:#3c8dbc}.nav-pills>li.active>a{font-weight:600}.nav-stacked>li>a{border-radius:0;border-top:0;border-left:3px solid transparent;color:#444}.nav-stacked>li.active>a,.nav-stacked>li.active>a:hover{background:transparent;color:#444;border-top:0;border-left-color:#3c8dbc}.nav-stacked>li.header{border-bottom:1px solid #ddd;color:#777;margin-bottom:10px;padding:5px 10px;text-transform:uppercase}.nav-tabs-custom{margin-bottom:20px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px}.nav-tabs-custom>.nav-tabs{margin:0;border-bottom-color:#f4f4f4;border-top-right-radius:3px;border-top-left-radius:3px}.nav-tabs-custom>.nav-tabs>li{border-top:3px solid transparent;margin-bottom:-2px;margin-right:5px}.nav-tabs-custom>.nav-tabs>li>a{color:#444;border-radius:0}.nav-tabs-custom>.nav-tabs>li>a.text-muted{color:#999}.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover{background:transparent;margin:0}.nav-tabs-custom>.nav-tabs>li>a:hover{color:#999}.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active{border-color:transparent}.nav-tabs-custom>.nav-tabs>li.active{border-top-color:#3c8dbc}.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a{background-color:#fff;color:#444}.nav-tabs-custom>.nav-tabs>li.active>a{border-top-color:transparent;border-left-color:#f4f4f4;border-right-color:#f4f4f4}.nav-tabs-custom>.nav-tabs>li:first-of-type{margin-left:0}.nav-tabs-custom>.nav-tabs>li:first-of-type.active>a{border-left-color:transparent}.nav-tabs-custom>.nav-tabs.pull-right{float:none !important}.nav-tabs-custom>.nav-tabs.pull-right>li{float:right}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type{margin-right:0}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type>a{border-left-width:1px}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type.active>a{border-left-color:#f4f4f4;border-right-color:transparent}.nav-tabs-custom>.nav-tabs>li.header{line-height:35px;padding:0 10px;font-size:20px;color:#444}.nav-tabs-custom>.nav-tabs>li.header>.fa,.nav-tabs-custom>.nav-tabs>li.header>.glyphicon,.nav-tabs-custom>.nav-tabs>li.header>.ion{margin-right:5px}.nav-tabs-custom>.tab-content{background:#fff;padding:10px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.nav-tabs-custom .dropdown.open>a:active,.nav-tabs-custom .dropdown.open>a:focus{background:transparent;color:#999}.nav-tabs-custom.tab-primary>.nav-tabs>li.active{border-top-color:#3c8dbc}.nav-tabs-custom.tab-info>.nav-tabs>li.active{border-top-color:#00c0ef}.nav-tabs-custom.tab-danger>.nav-tabs>li.active{border-top-color:#dd4b39}.nav-tabs-custom.tab-warning>.nav-tabs>li.active{border-top-color:#f39c12}.nav-tabs-custom.tab-success>.nav-tabs>li.active{border-top-color:#00a65a}.nav-tabs-custom.tab-default>.nav-tabs>li.active{border-top-color:#d2d6de}.pagination>li>a{background:#fafafa;color:#666}.pagination.pagination-flat>li>a{border-radius:0 !important}.products-list{list-style:none;margin:0;padding:0}.products-list>.item{border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1);box-shadow:0 1px 1px rgba(0,0,0,0.1);padding:10px 0;background:#fff}.products-list>.item:before,.products-list>.item:after{content:\" \";display:table}.products-list>.item:after{clear:both}.products-list .product-img{float:left}.products-list .product-img img{width:50px;height:50px}.products-list .product-info{margin-left:60px}.products-list .product-title{font-weight:600}.products-list .product-description{display:block;color:#999;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-list-in-box>.item{-webkit-box-shadow:none;box-shadow:none;border-radius:0;border-bottom:1px solid #f4f4f4}.product-list-in-box>.item:last-of-type{border-bottom-width:0}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{border-top:1px solid #f4f4f4}.table>thead>tr>th{border-bottom:2px solid #f4f4f4}.table tr td .progress{margin-top:5px}.table-bordered{border:1px solid #f4f4f4}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #f4f4f4}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table.no-border,.table.no-border td,.table.no-border th{border:0}table.text-center,table.text-center td,table.text-center th{text-align:center}.table.align th{text-align:left}.table.align td{text-align:right}.label-default{background-color:#d2d6de;color:#444}.direct-chat .box-body{border-bottom-right-radius:0;border-bottom-left-radius:0;position:relative;overflow-x:hidden;padding:0}.direct-chat.chat-pane-open .direct-chat-contacts{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.direct-chat-messages{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);padding:10px;height:250px;overflow:auto}.direct-chat-msg,.direct-chat-text{display:block}.direct-chat-msg{margin-bottom:10px}.direct-chat-msg:before,.direct-chat-msg:after{content:\" \";display:table}.direct-chat-msg:after{clear:both}.direct-chat-messages,.direct-chat-contacts{-webkit-transition:-webkit-transform .5s ease-in-out;-moz-transition:-moz-transform .5s ease-in-out;-o-transition:-o-transform .5s ease-in-out;transition:transform .5s ease-in-out}.direct-chat-text{border-radius:5px;position:relative;padding:5px 10px;background:#d2d6de;border:1px solid #d2d6de;margin:5px 0 0 50px;color:#444}.direct-chat-text:after,.direct-chat-text:before{position:absolute;right:100%;top:15px;border:solid transparent;border-right-color:#d2d6de;content:' ';height:0;width:0;pointer-events:none}.direct-chat-text:after{border-width:5px;margin-top:-5px}.direct-chat-text:before{border-width:6px;margin-top:-6px}.right .direct-chat-text{margin-right:50px;margin-left:0}.right .direct-chat-text:after,.right .direct-chat-text:before{right:auto;left:100%;border-right-color:transparent;border-left-color:#d2d6de}.direct-chat-img{border-radius:50%;float:left;width:40px;height:40px}.right .direct-chat-img{float:right}.direct-chat-info{display:block;margin-bottom:2px;font-size:12px}.direct-chat-name{font-weight:600}.direct-chat-timestamp{color:#999}.direct-chat-contacts-open .direct-chat-contacts{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.direct-chat-contacts{-webkit-transform:translate(101%, 0);-ms-transform:translate(101%, 0);-o-transform:translate(101%, 0);transform:translate(101%, 0);position:absolute;top:0;bottom:0;height:250px;width:100%;background:#222d32;color:#fff;overflow:auto}.contacts-list>li{border-bottom:1px solid rgba(0,0,0,0.2);padding:10px;margin:0}.contacts-list>li:before,.contacts-list>li:after{content:\" \";display:table}.contacts-list>li:after{clear:both}.contacts-list>li:last-of-type{border-bottom:none}.contacts-list-img{border-radius:50%;width:40px;float:left}.contacts-list-info{margin-left:45px;color:#fff}.contacts-list-name,.contacts-list-status{display:block}.contacts-list-name{font-weight:600}.contacts-list-status{font-size:12px}.contacts-list-date{color:#aaa;font-weight:normal}.contacts-list-msg{color:#999}.direct-chat-danger .right>.direct-chat-text{background:#dd4b39;border-color:#dd4b39;color:#fff}.direct-chat-danger .right>.direct-chat-text:after,.direct-chat-danger .right>.direct-chat-text:before{border-left-color:#dd4b39}.direct-chat-primary .right>.direct-chat-text{background:#3c8dbc;border-color:#3c8dbc;color:#fff}.direct-chat-primary .right>.direct-chat-text:after,.direct-chat-primary .right>.direct-chat-text:before{border-left-color:#3c8dbc}.direct-chat-warning .right>.direct-chat-text{background:#f39c12;border-color:#f39c12;color:#fff}.direct-chat-warning .right>.direct-chat-text:after,.direct-chat-warning .right>.direct-chat-text:before{border-left-color:#f39c12}.direct-chat-info .right>.direct-chat-text{background:#00c0ef;border-color:#00c0ef;color:#fff}.direct-chat-info .right>.direct-chat-text:after,.direct-chat-info .right>.direct-chat-text:before{border-left-color:#00c0ef}.direct-chat-success .right>.direct-chat-text{background:#00a65a;border-color:#00a65a;color:#fff}.direct-chat-success .right>.direct-chat-text:after,.direct-chat-success .right>.direct-chat-text:before{border-left-color:#00a65a}.users-list>li{width:25%;float:left;padding:10px;text-align:center}.users-list>li img{border-radius:50%;max-width:100%;height:auto}.users-list>li>a:hover,.users-list>li>a:hover .users-list-name{color:#999}.users-list-name,.users-list-date{display:block}.users-list-name{font-weight:600;color:#444;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.users-list-date{color:#999;font-size:12px}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.modal{background:rgba(0,0,0,0.3)}.modal-content{border-radius:0;-webkit-box-shadow:0 2px 3px rgba(0,0,0,0.125);box-shadow:0 2px 3px rgba(0,0,0,0.125);border:0}@media (min-width:768px){.modal-content{-webkit-box-shadow:0 2px 3px rgba(0,0,0,0.125);box-shadow:0 2px 3px rgba(0,0,0,0.125)}}.modal-header{border-bottom-color:#f4f4f4}.modal-footer{border-top-color:#f4f4f4}.modal-primary .modal-header,.modal-primary .modal-footer{border-color:#307095}.modal-warning .modal-header,.modal-warning .modal-footer{border-color:#c87f0a}.modal-info .modal-header,.modal-info .modal-footer{border-color:#0097bc}.modal-success .modal-header,.modal-success .modal-footer{border-color:#00733e}.modal-danger .modal-header,.modal-danger .modal-footer{border-color:#c23321}.box-widget{border:none;position:relative}.widget-user .widget-user-header{padding:20px;height:120px;border-top-right-radius:3px;border-top-left-radius:3px}.widget-user .widget-user-username{margin-top:0;margin-bottom:5px;font-size:25px;font-weight:300;text-shadow:0 1px 1px rgba(0,0,0,0.2)}.widget-user .widget-user-desc{margin-top:0}.widget-user .widget-user-image{position:absolute;top:65px;left:50%;margin-left:-45px}.widget-user .widget-user-image>img{width:90px;height:auto;border:3px solid #fff}.widget-user .box-footer{padding-top:30px}.widget-user-2 .widget-user-header{padding:20px;border-top-right-radius:3px;border-top-left-radius:3px}.widget-user-2 .widget-user-username{margin-top:5px;margin-bottom:5px;font-size:25px;font-weight:300}.widget-user-2 .widget-user-desc{margin-top:0}.widget-user-2 .widget-user-username,.widget-user-2 .widget-user-desc{margin-left:75px}.widget-user-2 .widget-user-image>img{width:65px;height:auto;float:left}.mailbox-messages>.table{margin:0}.mailbox-controls{padding:5px}.mailbox-controls.with-border{border-bottom:1px solid #f4f4f4}.mailbox-read-info{border-bottom:1px solid #f4f4f4;padding:10px}.mailbox-read-info h3{font-size:20px;margin:0}.mailbox-read-info h5{margin:0;padding:5px 0 0 0}.mailbox-read-time{color:#999;font-size:13px}.mailbox-read-message{padding:10px}.mailbox-attachments li{float:left;width:200px;border:1px solid #eee;margin-bottom:10px;margin-right:10px}.mailbox-attachment-name{font-weight:bold;color:#666}.mailbox-attachment-icon,.mailbox-attachment-info,.mailbox-attachment-size{display:block}.mailbox-attachment-info{padding:10px;background:#f4f4f4}.mailbox-attachment-size{color:#999;font-size:12px}.mailbox-attachment-icon{text-align:center;font-size:65px;color:#666;padding:20px 10px}.mailbox-attachment-icon.has-img{padding:0}.mailbox-attachment-icon.has-img>img{max-width:100%;height:auto}.lockscreen{background:#d2d6de}.lockscreen-logo{font-size:35px;text-align:center;margin-bottom:25px;font-weight:300}.lockscreen-logo a{color:#444}.lockscreen-wrapper{max-width:400px;margin:0 auto;margin-top:10%}.lockscreen .lockscreen-name{text-align:center;font-weight:600}.lockscreen-item{border-radius:4px;padding:0;background:#fff;position:relative;margin:10px auto 30px auto;width:290px}.lockscreen-image{border-radius:50%;position:absolute;left:-10px;top:-25px;background:#fff;padding:5px;z-index:10}.lockscreen-image>img{border-radius:50%;width:70px;height:70px}.lockscreen-credentials{margin-left:70px}.lockscreen-credentials .form-control{border:0}.lockscreen-credentials .btn{background-color:#fff;border:0;padding:0 10px}.lockscreen-footer{margin-top:10px}.login-logo,.register-logo{font-size:35px;text-align:center;margin-bottom:25px;font-weight:300}.login-logo a,.register-logo a{color:#444}.login-page,.register-page{background:#d2d6de}.login-box,.register-box{width:360px;margin:7% auto}@media (max-width:768px){.login-box,.register-box{width:90%;margin-top:20px}}.login-box-body,.register-box-body{background:#fff;padding:20px;border-top:0;color:#666}.login-box-body .form-control-feedback,.register-box-body .form-control-feedback{color:#777}.login-box-msg,.register-box-msg{margin:0;text-align:center;padding:0 20px 20px 20px}.social-auth-links{margin:10px 0}.error-page{width:600px;margin:20px auto 0 auto}@media (max-width:991px){.error-page{width:100%}}.error-page>.headline{float:left;font-size:100px;font-weight:300}@media (max-width:991px){.error-page>.headline{float:none;text-align:center}}.error-page>.error-content{margin-left:190px;display:block}@media (max-width:991px){.error-page>.error-content{margin-left:0}}.error-page>.error-content>h3{font-weight:300;font-size:25px}@media (max-width:991px){.error-page>.error-content>h3{text-align:center}}.invoice{position:relative;background:#fff;border:1px solid #f4f4f4;padding:20px;margin:10px 25px}.invoice-title{margin-top:0}.profile-user-img{margin:0 auto;width:100px;padding:3px;border:3px solid #d2d6de}.profile-username{font-size:21px;margin-top:5px}.post{border-bottom:1px solid #d2d6de;margin-bottom:15px;padding-bottom:15px;color:#666}.post:last-of-type{border-bottom:0;margin-bottom:0;padding-bottom:0}.post .user-block{margin-bottom:15px}.btn-social{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-social>:first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}.btn-social.btn-lg{padding-left:61px}.btn-social.btn-lg>:first-child{line-height:45px;width:45px;font-size:1.8em}.btn-social.btn-sm{padding-left:38px}.btn-social.btn-sm>:first-child{line-height:28px;width:28px;font-size:1.4em}.btn-social.btn-xs{padding-left:30px}.btn-social.btn-xs>:first-child{line-height:20px;width:20px;font-size:1.2em}.btn-social-icon{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:34px;width:34px;padding:0}.btn-social-icon>:first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}.btn-social-icon.btn-lg{padding-left:61px}.btn-social-icon.btn-lg>:first-child{line-height:45px;width:45px;font-size:1.8em}.btn-social-icon.btn-sm{padding-left:38px}.btn-social-icon.btn-sm>:first-child{line-height:28px;width:28px;font-size:1.4em}.btn-social-icon.btn-xs{padding-left:30px}.btn-social-icon.btn-xs>:first-child{line-height:20px;width:20px;font-size:1.2em}.btn-social-icon>:first-child{border:none;text-align:center;width:100%}.btn-social-icon.btn-lg{height:45px;width:45px;padding-left:0;padding-right:0}.btn-social-icon.btn-sm{height:30px;width:30px;padding-left:0;padding-right:0}.btn-social-icon.btn-xs{height:22px;width:22px;padding-left:0;padding-right:0}.btn-adn{color:#fff;background-color:#d87a68;border-color:rgba(0,0,0,0.2)}.btn-adn:focus,.btn-adn.focus{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:hover{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:active,.btn-adn.active,.open>.dropdown-toggle.btn-adn{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:active,.btn-adn.active,.open>.dropdown-toggle.btn-adn{background-image:none}.btn-adn .badge{color:#d87a68;background-color:#fff}.btn-bitbucket{color:#fff;background-color:#205081;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:focus,.btn-bitbucket.focus{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:hover{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:active,.btn-bitbucket.active,.open>.dropdown-toggle.btn-bitbucket{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:active,.btn-bitbucket.active,.open>.dropdown-toggle.btn-bitbucket{background-image:none}.btn-bitbucket .badge{color:#205081;background-color:#fff}.btn-dropbox{color:#fff;background-color:#1087dd;border-color:rgba(0,0,0,0.2)}.btn-dropbox:focus,.btn-dropbox.focus{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:hover{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:active,.btn-dropbox.active,.open>.dropdown-toggle.btn-dropbox{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:active,.btn-dropbox.active,.open>.dropdown-toggle.btn-dropbox{background-image:none}.btn-dropbox .badge{color:#1087dd;background-color:#fff}.btn-facebook{color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)}.btn-facebook:focus,.btn-facebook.focus{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:hover{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:active,.btn-facebook.active,.open>.dropdown-toggle.btn-facebook{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:active,.btn-facebook.active,.open>.dropdown-toggle.btn-facebook{background-image:none}.btn-facebook .badge{color:#3b5998;background-color:#fff}.btn-flickr{color:#fff;background-color:#ff0084;border-color:rgba(0,0,0,0.2)}.btn-flickr:focus,.btn-flickr.focus{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:hover{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:active,.btn-flickr.active,.open>.dropdown-toggle.btn-flickr{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:active,.btn-flickr.active,.open>.dropdown-toggle.btn-flickr{background-image:none}.btn-flickr .badge{color:#ff0084;background-color:#fff}.btn-foursquare{color:#fff;background-color:#f94877;border-color:rgba(0,0,0,0.2)}.btn-foursquare:focus,.btn-foursquare.focus{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:hover{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:active,.btn-foursquare.active,.open>.dropdown-toggle.btn-foursquare{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:active,.btn-foursquare.active,.open>.dropdown-toggle.btn-foursquare{background-image:none}.btn-foursquare .badge{color:#f94877;background-color:#fff}.btn-github{color:#fff;background-color:#444;border-color:rgba(0,0,0,0.2)}.btn-github:focus,.btn-github.focus{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:hover{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:active,.btn-github.active,.open>.dropdown-toggle.btn-github{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:active,.btn-github.active,.open>.dropdown-toggle.btn-github{background-image:none}.btn-github .badge{color:#444;background-color:#fff}.btn-google{color:#fff;background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}.btn-google:focus,.btn-google.focus{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:hover{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:active,.btn-google.active,.open>.dropdown-toggle.btn-google{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:active,.btn-google.active,.open>.dropdown-toggle.btn-google{background-image:none}.btn-google .badge{color:#dd4b39;background-color:#fff}.btn-instagram{color:#fff;background-color:#3f729b;border-color:rgba(0,0,0,0.2)}.btn-instagram:focus,.btn-instagram.focus{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:hover{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:active,.btn-instagram.active,.open>.dropdown-toggle.btn-instagram{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:active,.btn-instagram.active,.open>.dropdown-toggle.btn-instagram{background-image:none}.btn-instagram .badge{color:#3f729b;background-color:#fff}.btn-linkedin{color:#fff;background-color:#007bb6;border-color:rgba(0,0,0,0.2)}.btn-linkedin:focus,.btn-linkedin.focus{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:hover{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:active,.btn-linkedin.active,.open>.dropdown-toggle.btn-linkedin{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:active,.btn-linkedin.active,.open>.dropdown-toggle.btn-linkedin{background-image:none}.btn-linkedin .badge{color:#007bb6;background-color:#fff}.btn-microsoft{color:#fff;background-color:#2672ec;border-color:rgba(0,0,0,0.2)}.btn-microsoft:focus,.btn-microsoft.focus{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:hover{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:active,.btn-microsoft.active,.open>.dropdown-toggle.btn-microsoft{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:active,.btn-microsoft.active,.open>.dropdown-toggle.btn-microsoft{background-image:none}.btn-microsoft .badge{color:#2672ec;background-color:#fff}.btn-openid{color:#fff;background-color:#f7931e;border-color:rgba(0,0,0,0.2)}.btn-openid:focus,.btn-openid.focus{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:hover{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:active,.btn-openid.active,.open>.dropdown-toggle.btn-openid{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:active,.btn-openid.active,.open>.dropdown-toggle.btn-openid{background-image:none}.btn-openid .badge{color:#f7931e;background-color:#fff}.btn-pinterest{color:#fff;background-color:#cb2027;border-color:rgba(0,0,0,0.2)}.btn-pinterest:focus,.btn-pinterest.focus{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:hover{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:active,.btn-pinterest.active,.open>.dropdown-toggle.btn-pinterest{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:active,.btn-pinterest.active,.open>.dropdown-toggle.btn-pinterest{background-image:none}.btn-pinterest .badge{color:#cb2027;background-color:#fff}.btn-reddit{color:#000;background-color:#eff7ff;border-color:rgba(0,0,0,0.2)}.btn-reddit:focus,.btn-reddit.focus{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:hover{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:active,.btn-reddit.active,.open>.dropdown-toggle.btn-reddit{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:active,.btn-reddit.active,.open>.dropdown-toggle.btn-reddit{background-image:none}.btn-reddit .badge{color:#eff7ff;background-color:#000}.btn-soundcloud{color:#fff;background-color:#f50;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:focus,.btn-soundcloud.focus{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:hover{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:active,.btn-soundcloud.active,.open>.dropdown-toggle.btn-soundcloud{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:active,.btn-soundcloud.active,.open>.dropdown-toggle.btn-soundcloud{background-image:none}.btn-soundcloud .badge{color:#f50;background-color:#fff}.btn-tumblr{color:#fff;background-color:#2c4762;border-color:rgba(0,0,0,0.2)}.btn-tumblr:focus,.btn-tumblr.focus{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:hover{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:active,.btn-tumblr.active,.open>.dropdown-toggle.btn-tumblr{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:active,.btn-tumblr.active,.open>.dropdown-toggle.btn-tumblr{background-image:none}.btn-tumblr .badge{color:#2c4762;background-color:#fff}.btn-twitter{color:#fff;background-color:#55acee;border-color:rgba(0,0,0,0.2)}.btn-twitter:focus,.btn-twitter.focus{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:hover{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:active,.btn-twitter.active,.open>.dropdown-toggle.btn-twitter{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:active,.btn-twitter.active,.open>.dropdown-toggle.btn-twitter{background-image:none}.btn-twitter .badge{color:#55acee;background-color:#fff}.btn-vimeo{color:#fff;background-color:#1ab7ea;border-color:rgba(0,0,0,0.2)}.btn-vimeo:focus,.btn-vimeo.focus{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:hover{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:active,.btn-vimeo.active,.open>.dropdown-toggle.btn-vimeo{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:active,.btn-vimeo.active,.open>.dropdown-toggle.btn-vimeo{background-image:none}.btn-vimeo .badge{color:#1ab7ea;background-color:#fff}.btn-vk{color:#fff;background-color:#587ea3;border-color:rgba(0,0,0,0.2)}.btn-vk:focus,.btn-vk.focus{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:hover{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:active,.btn-vk.active,.open>.dropdown-toggle.btn-vk{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:active,.btn-vk.active,.open>.dropdown-toggle.btn-vk{background-image:none}.btn-vk .badge{color:#587ea3;background-color:#fff}.btn-yahoo{color:#fff;background-color:#720e9e;border-color:rgba(0,0,0,0.2)}.btn-yahoo:focus,.btn-yahoo.focus{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:hover{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:active,.btn-yahoo.active,.open>.dropdown-toggle.btn-yahoo{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:active,.btn-yahoo.active,.open>.dropdown-toggle.btn-yahoo{background-image:none}.btn-yahoo .badge{color:#720e9e;background-color:#fff}.fc-button{background:#f4f4f4;background-image:none;color:#444;border-color:#ddd;border-bottom-color:#ddd}.fc-button:hover,.fc-button:active,.fc-button.hover{background-color:#e9e9e9}.fc-header-title h2{font-size:15px;line-height:1.6em;color:#666;margin-left:10px}.fc-header-right{padding-right:10px}.fc-header-left{padding-left:10px}.fc-widget-header{background:#fafafa}.fc-grid{width:100%;border:0}.fc-widget-header:first-of-type,.fc-widget-content:first-of-type{border-left:0;border-right:0}.fc-widget-header:last-of-type,.fc-widget-content:last-of-type{border-right:0}.fc-toolbar{padding:10px;margin:0}.fc-day-number{font-size:20px;font-weight:300;padding-right:10px}.fc-color-picker{list-style:none;margin:0;padding:0}.fc-color-picker>li{float:left;font-size:30px;margin-right:5px;line-height:30px}.fc-color-picker>li .fa{-webkit-transition:-webkit-transform linear .3s;-moz-transition:-moz-transform linear .3s;-o-transition:-o-transform linear .3s;transition:transform linear .3s}.fc-color-picker>li .fa:hover{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);-o-transform:rotate(30deg);transform:rotate(30deg)}#add-new-event{-webkit-transition:all linear .3s;-o-transition:all linear .3s;transition:all linear .3s}.external-event{padding:5px 10px;font-weight:bold;margin-bottom:4px;box-shadow:0 1px 1px rgba(0,0,0,0.1);text-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px;cursor:move}.external-event:hover{box-shadow:inset 0 0 90px rgba(0,0,0,0.2)}.select2-container--default.select2-container--focus,.select2-selection.select2-container--focus,.select2-container--default:focus,.select2-selection:focus,.select2-container--default:active,.select2-selection:active{outline:none}.select2-container--default .select2-selection--single,.select2-selection .select2-selection--single{border:1px solid #d2d6de;border-radius:0;padding:6px 12px;height:34px}.select2-container--default.select2-container--open{border-color:#3c8dbc}.select2-dropdown{border:1px solid #d2d6de;border-radius:0}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#3c8dbc;color:white}.select2-results__option{padding:6px 12px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{padding-left:0;padding-right:0;height:auto;margin-top:-4px}.select2-container[dir=\"rtl\"] .select2-selection--single .select2-selection__rendered{padding-right:6px;padding-left:20px}.select2-container--default .select2-selection--single .select2-selection__arrow{height:28px;right:3px}.select2-container--default .select2-selection--single .select2-selection__arrow b{margin-top:0}.select2-dropdown .select2-search__field,.select2-search--inline .select2-search__field{border:1px solid #d2d6de}.select2-dropdown .select2-search__field:focus,.select2-search--inline .select2-search__field:focus{outline:none;border:1px solid #3c8dbc}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option[aria-selected=true],.select2-container--default .select2-results__option[aria-selected=true]:hover{color:#444}.select2-container--default .select2-selection--multiple{border:1px solid #d2d6de;border-radius:0}.select2-container--default .select2-selection--multiple:focus{border-color:#3c8dbc}.select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#d2d6de}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#3c8dbc;border-color:#367fa9;padding:1px 10px;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{margin-right:5px;color:rgba(255,255,255,0.7)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#fff}.select2-container .select2-selection--single .select2-selection__rendered{padding-right:10px}.pad{padding:10px}.margin{margin:10px}.margin-bottom{margin-bottom:20px}.margin-bottom-none{margin-bottom:0}.margin-r-5{margin-right:5px}.inline{display:inline}.description-block{display:block;margin:10px 0;text-align:center}.description-block.margin-bottom{margin-bottom:25px}.description-block>.description-header{margin:0;padding:0;font-weight:600;font-size:16px}.description-block>.description-text{text-transform:uppercase}.bg-red,.bg-yellow,.bg-aqua,.bg-blue,.bg-light-blue,.bg-green,.bg-navy,.bg-teal,.bg-olive,.bg-lime,.bg-orange,.bg-fuchsia,.bg-purple,.bg-maroon,.bg-black,.bg-red-active,.bg-yellow-active,.bg-aqua-active,.bg-blue-active,.bg-light-blue-active,.bg-green-active,.bg-navy-active,.bg-teal-active,.bg-olive-active,.bg-lime-active,.bg-orange-active,.bg-fuchsia-active,.bg-purple-active,.bg-maroon-active,.bg-black-active,.callout.callout-danger,.callout.callout-warning,.callout.callout-info,.callout.callout-success,.alert-success,.alert-danger,.alert-error,.alert-warning,.alert-info,.label-danger,.label-info,.label-warning,.label-primary,.label-success,.modal-primary .modal-body,.modal-primary .modal-header,.modal-primary .modal-footer,.modal-warning .modal-body,.modal-warning .modal-header,.modal-warning .modal-footer,.modal-info .modal-body,.modal-info .modal-header,.modal-info .modal-footer,.modal-success .modal-body,.modal-success .modal-header,.modal-success .modal-footer,.modal-danger .modal-body,.modal-danger .modal-header,.modal-danger .modal-footer{color:#fff !important}.bg-gray{color:#000;background-color:#d2d6de !important}.bg-gray-light{background-color:#f7f7f7}.bg-black{background-color:#111 !important}.bg-red,.callout.callout-danger,.alert-danger,.alert-error,.label-danger,.modal-danger .modal-body{background-color:#dd4b39 !important}.bg-yellow,.callout.callout-warning,.alert-warning,.label-warning,.modal-warning .modal-body{background-color:#f39c12 !important}.bg-aqua,.callout.callout-info,.alert-info,.label-info,.modal-info .modal-body{background-color:#00c0ef !important}.bg-blue{background-color:#0073b7 !important}.bg-light-blue,.label-primary,.modal-primary .modal-body{background-color:#3c8dbc !important}.bg-green,.callout.callout-success,.alert-success,.label-success,.modal-success .modal-body{background-color:#00a65a !important}.bg-navy{background-color:#001f3f !important}.bg-teal{background-color:#39cccc !important}.bg-olive{background-color:#3d9970 !important}.bg-lime{background-color:#01ff70 !important}.bg-orange{background-color:#ff851b !important}.bg-fuchsia{background-color:#f012be !important}.bg-purple{background-color:#605ca8 !important}.bg-maroon{background-color:#d81b60 !important}.bg-gray-active{color:#000;background-color:#b5bbc8 !important}.bg-black-active{background-color:#000 !important}.bg-red-active,.modal-danger .modal-header,.modal-danger .modal-footer{background-color:#d33724 !important}.bg-yellow-active,.modal-warning .modal-header,.modal-warning .modal-footer{background-color:#db8b0b !important}.bg-aqua-active,.modal-info .modal-header,.modal-info .modal-footer{background-color:#00a7d0 !important}.bg-blue-active{background-color:#005384 !important}.bg-light-blue-active,.modal-primary .modal-header,.modal-primary .modal-footer{background-color:#357ca5 !important}.bg-green-active,.modal-success .modal-header,.modal-success .modal-footer{background-color:#008d4c !important}.bg-navy-active{background-color:#001a35 !important}.bg-teal-active{background-color:#30bbbb !important}.bg-olive-active{background-color:#368763 !important}.bg-lime-active{background-color:#00e765 !important}.bg-orange-active{background-color:#ff7701 !important}.bg-fuchsia-active{background-color:#db0ead !important}.bg-purple-active{background-color:#555299 !important}.bg-maroon-active{background-color:#ca195a !important}[class^=\"bg-\"].disabled{opacity:.65;filter:alpha(opacity=65)}.text-red{color:#dd4b39 !important}.text-yellow{color:#f39c12 !important}.text-aqua{color:#00c0ef !important}.text-blue{color:#0073b7 !important}.text-black{color:#111 !important}.text-light-blue{color:#3c8dbc !important}.text-green{color:#00a65a !important}.text-gray{color:#d2d6de !important}.text-navy{color:#001f3f !important}.text-teal{color:#39cccc !important}.text-olive{color:#3d9970 !important}.text-lime{color:#01ff70 !important}.text-orange{color:#ff851b !important}.text-fuchsia{color:#f012be !important}.text-purple{color:#605ca8 !important}.text-maroon{color:#d81b60 !important}.link-muted{color:#7a869d}.link-muted:hover,.link-muted:focus{color:#606c84}.link-black{color:#666}.link-black:hover,.link-black:focus{color:#999}.hide{display:none !important}.no-border{border:0 !important}.no-padding{padding:0 !important}.no-margin{margin:0 !important}.no-shadow{box-shadow:none !important}.list-unstyled,.chart-legend,.contacts-list,.users-list,.mailbox-attachments{list-style:none;margin:0;padding:0}.list-group-unbordered>.list-group-item{border-left:0;border-right:0;border-radius:0;padding-left:0;padding-right:0}.flat{border-radius:0 !important}.text-bold,.text-bold.table td,.text-bold.table th{font-weight:700}.text-sm{font-size:12px}.jqstooltip{padding:5px !important;width:auto !important;height:auto !important}.bg-teal-gradient{background:#39cccc !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #39cccc), color-stop(1, #7adddd)) !important;background:-ms-linear-gradient(bottom, #39cccc, #7adddd) !important;background:-moz-linear-gradient(center bottom, #39cccc 0, #7adddd 100%) !important;background:-o-linear-gradient(#7adddd, #39cccc) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39cccc', GradientType=0) !important;color:#fff}.bg-light-blue-gradient{background:#3c8dbc !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important;background:-ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important;background:-moz-linear-gradient(center bottom, #3c8dbc 0, #67a8ce 100%) !important;background:-o-linear-gradient(#67a8ce, #3c8dbc) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important;color:#fff}.bg-blue-gradient{background:#0073b7 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important;background:-ms-linear-gradient(bottom, #0073b7, #0089db) !important;background:-moz-linear-gradient(center bottom, #0073b7 0, #0089db 100%) !important;background:-o-linear-gradient(#0089db, #0073b7) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important;color:#fff}.bg-aqua-gradient{background:#00c0ef !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important;background:-ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important;background:-moz-linear-gradient(center bottom, #00c0ef 0, #14d1ff 100%) !important;background:-o-linear-gradient(#14d1ff, #00c0ef) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important;color:#fff}.bg-yellow-gradient{background:#f39c12 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important;background:-ms-linear-gradient(bottom, #f39c12, #f7bc60) !important;background:-moz-linear-gradient(center bottom, #f39c12 0, #f7bc60 100%) !important;background:-o-linear-gradient(#f7bc60, #f39c12) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important;color:#fff}.bg-purple-gradient{background:#605ca8 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important;background:-ms-linear-gradient(bottom, #605ca8, #9491c4) !important;background:-moz-linear-gradient(center bottom, #605ca8 0, #9491c4 100%) !important;background:-o-linear-gradient(#9491c4, #605ca8) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important;color:#fff}.bg-green-gradient{background:#00a65a !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important;background:-ms-linear-gradient(bottom, #00a65a, #00ca6d) !important;background:-moz-linear-gradient(center bottom, #00a65a 0, #00ca6d 100%) !important;background:-o-linear-gradient(#00ca6d, #00a65a) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important;color:#fff}.bg-red-gradient{background:#dd4b39 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important;background:-ms-linear-gradient(bottom, #dd4b39, #e47365) !important;background:-moz-linear-gradient(center bottom, #dd4b39 0, #e47365 100%) !important;background:-o-linear-gradient(#e47365, #dd4b39) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important;color:#fff}.bg-black-gradient{background:#111 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #111), color-stop(1, #2b2b2b)) !important;background:-ms-linear-gradient(bottom, #111, #2b2b2b) !important;background:-moz-linear-gradient(center bottom, #111 0, #2b2b2b 100%) !important;background:-o-linear-gradient(#2b2b2b, #111) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111111', GradientType=0) !important;color:#fff}.bg-maroon-gradient{background:#d81b60 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #d81b60), color-stop(1, #e73f7c)) !important;background:-ms-linear-gradient(bottom, #d81b60, #e73f7c) !important;background:-moz-linear-gradient(center bottom, #d81b60 0, #e73f7c 100%) !important;background:-o-linear-gradient(#e73f7c, #d81b60) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#d81b60', GradientType=0) !important;color:#fff}.description-block .description-icon{font-size:16px}.no-pad-top{padding-top:0}.position-static{position:static !important}.list-header{font-size:15px;padding:10px 4px;font-weight:bold;color:#666}.list-seperator{height:1px;background:#f4f4f4;margin:15px 0 9px 0}.list-link>a{padding:4px;color:#777}.list-link>a:hover{color:#222}.font-light{font-weight:300}.user-block:before,.user-block:after{content:\" \";display:table}.user-block:after{clear:both}.user-block img{width:40px;height:40px;float:left}.user-block .username,.user-block .description,.user-block .comment{display:block;margin-left:50px}.user-block .username{font-size:16px;font-weight:600}.user-block .description{color:#999;font-size:13px}.user-block.user-block-sm .username,.user-block.user-block-sm .description,.user-block.user-block-sm .comment{margin-left:40px}.user-block.user-block-sm .username{font-size:14px}.img-sm,.img-md,.img-lg,.box-comments .box-comment img,.user-block.user-block-sm img{float:left}.img-sm,.box-comments .box-comment img,.user-block.user-block-sm img{width:30px !important;height:30px !important}.img-sm+.img-push{margin-left:40px}.img-md{width:60px;height:60px}.img-md+.img-push{margin-left:70px}.img-lg{width:100px;height:100px}.img-lg+.img-push{margin-left:110px}.img-bordered{border:3px solid #d2d6de;padding:3px}.img-bordered-sm{border:2px solid #d2d6de;padding:2px}.attachment-block{border:1px solid #f4f4f4;padding:5px;margin-bottom:10px;background:#f7f7f7}.attachment-block .attachment-img{max-width:100px;max-height:100px;height:auto;float:left}.attachment-block .attachment-pushed{margin-left:110px}.attachment-block .attachment-heading{margin:0}.attachment-block .attachment-text{color:#555}.connectedSortable{min-height:100px}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sort-highlight{background:#f4f4f4;border:1px dashed #ddd;margin-bottom:10px}.full-opacity-hover{opacity:.65;filter:alpha(opacity=65)}.full-opacity-hover:hover{opacity:1;filter:alpha(opacity=100)}.chart{position:relative;overflow:hidden;width:100%}.chart svg,.chart canvas{width:100% !important}@media print{.no-print,.main-sidebar,.left-side,.main-header,.content-header{display:none !important}.content-wrapper,.right-side,.main-footer{margin-left:0 !important;min-height:0 !important;-webkit-transform:translate(0, 0) !important;-ms-transform:translate(0, 0) !important;-o-transform:translate(0, 0) !important;transform:translate(0, 0) !important}.fixed .content-wrapper,.fixed .right-side{padding-top:0 !important}.invoice{width:100%;border:0;margin:0;padding:0}.invoice-col{float:left;width:33.3333333%}.table-responsive{overflow:auto}.table-responsive>.table tr th,.table-responsive>.table tr td{white-space:normal !important}}", ""]);
61698
61699 // exports
61700
61701
61702/***/ },
61703/* 628 */
61704/***/ function(module, exports, __webpack_require__) {
61705
61706 module.exports = __webpack_require__.p + "7799dece2c79854f63f09e7dfa528b88.jpg";
61707
61708/***/ },
61709/* 629 */
61710/***/ function(module, exports, __webpack_require__) {
61711
61712 'use strict';
61713
61714 exports.__esModule = true;
61715 exports.connect = exports.Provider = undefined;
61716
61717 var _Provider = __webpack_require__(630);
61718
61719 var _Provider2 = _interopRequireDefault(_Provider);
61720
61721 var _connect = __webpack_require__(633);
61722
61723 var _connect2 = _interopRequireDefault(_connect);
61724
61725 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
61726
61727 exports.Provider = _Provider2["default"];
61728 exports.connect = _connect2["default"];
61729
61730/***/ },
61731/* 630 */
61732/***/ function(module, exports, __webpack_require__) {
61733
61734 'use strict';
61735
61736 exports.__esModule = true;
61737 exports["default"] = undefined;
61738
61739 var _react = __webpack_require__(89);
61740
61741 var _storeShape = __webpack_require__(631);
61742
61743 var _storeShape2 = _interopRequireDefault(_storeShape);
61744
61745 var _warning = __webpack_require__(632);
61746
61747 var _warning2 = _interopRequireDefault(_warning);
61748
61749 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
61750
61751 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
61752
61753 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; }
61754
61755 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; }
61756
61757 var didWarnAboutReceivingStore = false;
61758 function warnAboutReceivingStore() {
61759 if (didWarnAboutReceivingStore) {
61760 return;
61761 }
61762 didWarnAboutReceivingStore = true;
61763
61764 (0, _warning2["default"])('<Provider> does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reactjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
61765 }
61766
61767 var Provider = function (_Component) {
61768 _inherits(Provider, _Component);
61769
61770 Provider.prototype.getChildContext = function getChildContext() {
61771 return { store: this.store };
61772 };
61773
61774 function Provider(props, context) {
61775 _classCallCheck(this, Provider);
61776
61777 var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
61778
61779 _this.store = props.store;
61780 return _this;
61781 }
61782
61783 Provider.prototype.render = function render() {
61784 var children = this.props.children;
61785
61786 return _react.Children.only(children);
61787 };
61788
61789 return Provider;
61790 }(_react.Component);
61791
61792 exports["default"] = Provider;
61793
61794 if ((undefined) !== 'production') {
61795 Provider.prototype.componentWillReceiveProps = function (nextProps) {
61796 var store = this.store;
61797 var nextStore = nextProps.store;
61798
61799 if (store !== nextStore) {
61800 warnAboutReceivingStore();
61801 }
61802 };
61803 }
61804
61805 Provider.propTypes = {
61806 store: _storeShape2["default"].isRequired,
61807 children: _react.PropTypes.element.isRequired
61808 };
61809 Provider.childContextTypes = {
61810 store: _storeShape2["default"].isRequired
61811 };
61812
61813/***/ },
61814/* 631 */
61815/***/ function(module, exports, __webpack_require__) {
61816
61817 'use strict';
61818
61819 exports.__esModule = true;
61820
61821 var _react = __webpack_require__(89);
61822
61823 exports["default"] = _react.PropTypes.shape({
61824 subscribe: _react.PropTypes.func.isRequired,
61825 dispatch: _react.PropTypes.func.isRequired,
61826 getState: _react.PropTypes.func.isRequired
61827 });
61828
61829/***/ },
61830/* 632 */
61831/***/ function(module, exports) {
61832
61833 'use strict';
61834
61835 exports.__esModule = true;
61836 exports["default"] = warning;
61837 /**
61838 * Prints a warning in the console if it exists.
61839 *
61840 * @param {String} message The warning message.
61841 * @returns {void}
61842 */
61843 function warning(message) {
61844 /* eslint-disable no-console */
61845 if (typeof console !== 'undefined' && typeof console.error === 'function') {
61846 console.error(message);
61847 }
61848 /* eslint-enable no-console */
61849 try {
61850 // This error was thrown as a convenience so that you can use this stack
61851 // to find the callsite that caused this warning to fire.
61852 throw new Error(message);
61853 /* eslint-disable no-empty */
61854 } catch (e) {}
61855 /* eslint-enable no-empty */
61856 }
61857
61858/***/ },
61859/* 633 */
61860/***/ function(module, exports, __webpack_require__) {
61861
61862 'use strict';
61863
61864 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
61865
61866 exports.__esModule = true;
61867 exports["default"] = connect;
61868
61869 var _react = __webpack_require__(89);
61870
61871 var _storeShape = __webpack_require__(631);
61872
61873 var _storeShape2 = _interopRequireDefault(_storeShape);
61874
61875 var _shallowEqual = __webpack_require__(634);
61876
61877 var _shallowEqual2 = _interopRequireDefault(_shallowEqual);
61878
61879 var _wrapActionCreators = __webpack_require__(635);
61880
61881 var _wrapActionCreators2 = _interopRequireDefault(_wrapActionCreators);
61882
61883 var _warning = __webpack_require__(632);
61884
61885 var _warning2 = _interopRequireDefault(_warning);
61886
61887 var _isPlainObject = __webpack_require__(638);
61888
61889 var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
61890
61891 var _hoistNonReactStatics = __webpack_require__(303);
61892
61893 var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
61894
61895 var _invariant = __webpack_require__(268);
61896
61897 var _invariant2 = _interopRequireDefault(_invariant);
61898
61899 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
61900
61901 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
61902
61903 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; }
61904
61905 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; }
61906
61907 var defaultMapStateToProps = function defaultMapStateToProps(state) {
61908 return {};
61909 }; // eslint-disable-line no-unused-vars
61910 var defaultMapDispatchToProps = function defaultMapDispatchToProps(dispatch) {
61911 return { dispatch: dispatch };
61912 };
61913 var defaultMergeProps = function defaultMergeProps(stateProps, dispatchProps, parentProps) {
61914 return _extends({}, parentProps, stateProps, dispatchProps);
61915 };
61916
61917 function getDisplayName(WrappedComponent) {
61918 return WrappedComponent.displayName || WrappedComponent.name || 'Component';
61919 }
61920
61921 var errorObject = { value: null };
61922 function tryCatch(fn, ctx) {
61923 try {
61924 return fn.apply(ctx);
61925 } catch (e) {
61926 errorObject.value = e;
61927 return errorObject;
61928 }
61929 }
61930
61931 // Helps track hot reloading.
61932 var nextVersion = 0;
61933
61934 function connect(mapStateToProps, mapDispatchToProps, mergeProps) {
61935 var options = arguments.length <= 3 || arguments[3] === undefined ? {} : arguments[3];
61936
61937 var shouldSubscribe = Boolean(mapStateToProps);
61938 var mapState = mapStateToProps || defaultMapStateToProps;
61939
61940 var mapDispatch = undefined;
61941 if (typeof mapDispatchToProps === 'function') {
61942 mapDispatch = mapDispatchToProps;
61943 } else if (!mapDispatchToProps) {
61944 mapDispatch = defaultMapDispatchToProps;
61945 } else {
61946 mapDispatch = (0, _wrapActionCreators2["default"])(mapDispatchToProps);
61947 }
61948
61949 var finalMergeProps = mergeProps || defaultMergeProps;
61950 var _options$pure = options.pure;
61951 var pure = _options$pure === undefined ? true : _options$pure;
61952 var _options$withRef = options.withRef;
61953 var withRef = _options$withRef === undefined ? false : _options$withRef;
61954
61955 var checkMergedEquals = pure && finalMergeProps !== defaultMergeProps;
61956
61957 // Helps track hot reloading.
61958 var version = nextVersion++;
61959
61960 return function wrapWithConnect(WrappedComponent) {
61961 var connectDisplayName = 'Connect(' + getDisplayName(WrappedComponent) + ')';
61962
61963 function checkStateShape(props, methodName) {
61964 if (!(0, _isPlainObject2["default"])(props)) {
61965 (0, _warning2["default"])(methodName + '() in ' + connectDisplayName + ' must return a plain object. ' + ('Instead received ' + props + '.'));
61966 }
61967 }
61968
61969 function computeMergedProps(stateProps, dispatchProps, parentProps) {
61970 var mergedProps = finalMergeProps(stateProps, dispatchProps, parentProps);
61971 if ((undefined) !== 'production') {
61972 checkStateShape(mergedProps, 'mergeProps');
61973 }
61974 return mergedProps;
61975 }
61976
61977 var Connect = function (_Component) {
61978 _inherits(Connect, _Component);
61979
61980 Connect.prototype.shouldComponentUpdate = function shouldComponentUpdate() {
61981 return !pure || this.haveOwnPropsChanged || this.hasStoreStateChanged;
61982 };
61983
61984 function Connect(props, context) {
61985 _classCallCheck(this, Connect);
61986
61987 var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
61988
61989 _this.version = version;
61990 _this.store = props.store || context.store;
61991
61992 (0, _invariant2["default"])(_this.store, 'Could not find "store" in either the context or ' + ('props of "' + connectDisplayName + '". ') + 'Either wrap the root component in a <Provider>, ' + ('or explicitly pass "store" as a prop to "' + connectDisplayName + '".'));
61993
61994 var storeState = _this.store.getState();
61995 _this.state = { storeState: storeState };
61996 _this.clearCache();
61997 return _this;
61998 }
61999
62000 Connect.prototype.computeStateProps = function computeStateProps(store, props) {
62001 if (!this.finalMapStateToProps) {
62002 return this.configureFinalMapState(store, props);
62003 }
62004
62005 var state = store.getState();
62006 var stateProps = this.doStatePropsDependOnOwnProps ? this.finalMapStateToProps(state, props) : this.finalMapStateToProps(state);
62007
62008 if ((undefined) !== 'production') {
62009 checkStateShape(stateProps, 'mapStateToProps');
62010 }
62011 return stateProps;
62012 };
62013
62014 Connect.prototype.configureFinalMapState = function configureFinalMapState(store, props) {
62015 var mappedState = mapState(store.getState(), props);
62016 var isFactory = typeof mappedState === 'function';
62017
62018 this.finalMapStateToProps = isFactory ? mappedState : mapState;
62019 this.doStatePropsDependOnOwnProps = this.finalMapStateToProps.length !== 1;
62020
62021 if (isFactory) {
62022 return this.computeStateProps(store, props);
62023 }
62024
62025 if ((undefined) !== 'production') {
62026 checkStateShape(mappedState, 'mapStateToProps');
62027 }
62028 return mappedState;
62029 };
62030
62031 Connect.prototype.computeDispatchProps = function computeDispatchProps(store, props) {
62032 if (!this.finalMapDispatchToProps) {
62033 return this.configureFinalMapDispatch(store, props);
62034 }
62035
62036 var dispatch = store.dispatch;
62037
62038 var dispatchProps = this.doDispatchPropsDependOnOwnProps ? this.finalMapDispatchToProps(dispatch, props) : this.finalMapDispatchToProps(dispatch);
62039
62040 if ((undefined) !== 'production') {
62041 checkStateShape(dispatchProps, 'mapDispatchToProps');
62042 }
62043 return dispatchProps;
62044 };
62045
62046 Connect.prototype.configureFinalMapDispatch = function configureFinalMapDispatch(store, props) {
62047 var mappedDispatch = mapDispatch(store.dispatch, props);
62048 var isFactory = typeof mappedDispatch === 'function';
62049
62050 this.finalMapDispatchToProps = isFactory ? mappedDispatch : mapDispatch;
62051 this.doDispatchPropsDependOnOwnProps = this.finalMapDispatchToProps.length !== 1;
62052
62053 if (isFactory) {
62054 return this.computeDispatchProps(store, props);
62055 }
62056
62057 if ((undefined) !== 'production') {
62058 checkStateShape(mappedDispatch, 'mapDispatchToProps');
62059 }
62060 return mappedDispatch;
62061 };
62062
62063 Connect.prototype.updateStatePropsIfNeeded = function updateStatePropsIfNeeded() {
62064 var nextStateProps = this.computeStateProps(this.store, this.props);
62065 if (this.stateProps && (0, _shallowEqual2["default"])(nextStateProps, this.stateProps)) {
62066 return false;
62067 }
62068
62069 this.stateProps = nextStateProps;
62070 return true;
62071 };
62072
62073 Connect.prototype.updateDispatchPropsIfNeeded = function updateDispatchPropsIfNeeded() {
62074 var nextDispatchProps = this.computeDispatchProps(this.store, this.props);
62075 if (this.dispatchProps && (0, _shallowEqual2["default"])(nextDispatchProps, this.dispatchProps)) {
62076 return false;
62077 }
62078
62079 this.dispatchProps = nextDispatchProps;
62080 return true;
62081 };
62082
62083 Connect.prototype.updateMergedPropsIfNeeded = function updateMergedPropsIfNeeded() {
62084 var nextMergedProps = computeMergedProps(this.stateProps, this.dispatchProps, this.props);
62085 if (this.mergedProps && checkMergedEquals && (0, _shallowEqual2["default"])(nextMergedProps, this.mergedProps)) {
62086 return false;
62087 }
62088
62089 this.mergedProps = nextMergedProps;
62090 return true;
62091 };
62092
62093 Connect.prototype.isSubscribed = function isSubscribed() {
62094 return typeof this.unsubscribe === 'function';
62095 };
62096
62097 Connect.prototype.trySubscribe = function trySubscribe() {
62098 if (shouldSubscribe && !this.unsubscribe) {
62099 this.unsubscribe = this.store.subscribe(this.handleChange.bind(this));
62100 this.handleChange();
62101 }
62102 };
62103
62104 Connect.prototype.tryUnsubscribe = function tryUnsubscribe() {
62105 if (this.unsubscribe) {
62106 this.unsubscribe();
62107 this.unsubscribe = null;
62108 }
62109 };
62110
62111 Connect.prototype.componentDidMount = function componentDidMount() {
62112 this.trySubscribe();
62113 };
62114
62115 Connect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
62116 if (!pure || !(0, _shallowEqual2["default"])(nextProps, this.props)) {
62117 this.haveOwnPropsChanged = true;
62118 }
62119 };
62120
62121 Connect.prototype.componentWillUnmount = function componentWillUnmount() {
62122 this.tryUnsubscribe();
62123 this.clearCache();
62124 };
62125
62126 Connect.prototype.clearCache = function clearCache() {
62127 this.dispatchProps = null;
62128 this.stateProps = null;
62129 this.mergedProps = null;
62130 this.haveOwnPropsChanged = true;
62131 this.hasStoreStateChanged = true;
62132 this.haveStatePropsBeenPrecalculated = false;
62133 this.statePropsPrecalculationError = null;
62134 this.renderedElement = null;
62135 this.finalMapDispatchToProps = null;
62136 this.finalMapStateToProps = null;
62137 };
62138
62139 Connect.prototype.handleChange = function handleChange() {
62140 if (!this.unsubscribe) {
62141 return;
62142 }
62143
62144 var storeState = this.store.getState();
62145 var prevStoreState = this.state.storeState;
62146 if (pure && prevStoreState === storeState) {
62147 return;
62148 }
62149
62150 if (pure && !this.doStatePropsDependOnOwnProps) {
62151 var haveStatePropsChanged = tryCatch(this.updateStatePropsIfNeeded, this);
62152 if (!haveStatePropsChanged) {
62153 return;
62154 }
62155 if (haveStatePropsChanged === errorObject) {
62156 this.statePropsPrecalculationError = errorObject.value;
62157 }
62158 this.haveStatePropsBeenPrecalculated = true;
62159 }
62160
62161 this.hasStoreStateChanged = true;
62162 this.setState({ storeState: storeState });
62163 };
62164
62165 Connect.prototype.getWrappedInstance = function getWrappedInstance() {
62166 (0, _invariant2["default"])(withRef, 'To access the wrapped instance, you need to specify ' + '{ withRef: true } as the fourth argument of the connect() call.');
62167
62168 return this.refs.wrappedInstance;
62169 };
62170
62171 Connect.prototype.render = function render() {
62172 var haveOwnPropsChanged = this.haveOwnPropsChanged;
62173 var hasStoreStateChanged = this.hasStoreStateChanged;
62174 var haveStatePropsBeenPrecalculated = this.haveStatePropsBeenPrecalculated;
62175 var statePropsPrecalculationError = this.statePropsPrecalculationError;
62176 var renderedElement = this.renderedElement;
62177
62178 this.haveOwnPropsChanged = false;
62179 this.hasStoreStateChanged = false;
62180 this.haveStatePropsBeenPrecalculated = false;
62181 this.statePropsPrecalculationError = null;
62182
62183 if (statePropsPrecalculationError) {
62184 throw statePropsPrecalculationError;
62185 }
62186
62187 var shouldUpdateStateProps = true;
62188 var shouldUpdateDispatchProps = true;
62189 if (pure && renderedElement) {
62190 shouldUpdateStateProps = hasStoreStateChanged || haveOwnPropsChanged && this.doStatePropsDependOnOwnProps;
62191 shouldUpdateDispatchProps = haveOwnPropsChanged && this.doDispatchPropsDependOnOwnProps;
62192 }
62193
62194 var haveStatePropsChanged = false;
62195 var haveDispatchPropsChanged = false;
62196 if (haveStatePropsBeenPrecalculated) {
62197 haveStatePropsChanged = true;
62198 } else if (shouldUpdateStateProps) {
62199 haveStatePropsChanged = this.updateStatePropsIfNeeded();
62200 }
62201 if (shouldUpdateDispatchProps) {
62202 haveDispatchPropsChanged = this.updateDispatchPropsIfNeeded();
62203 }
62204
62205 var haveMergedPropsChanged = true;
62206 if (haveStatePropsChanged || haveDispatchPropsChanged || haveOwnPropsChanged) {
62207 haveMergedPropsChanged = this.updateMergedPropsIfNeeded();
62208 } else {
62209 haveMergedPropsChanged = false;
62210 }
62211
62212 if (!haveMergedPropsChanged && renderedElement) {
62213 return renderedElement;
62214 }
62215
62216 if (withRef) {
62217 this.renderedElement = (0, _react.createElement)(WrappedComponent, _extends({}, this.mergedProps, {
62218 ref: 'wrappedInstance'
62219 }));
62220 } else {
62221 this.renderedElement = (0, _react.createElement)(WrappedComponent, this.mergedProps);
62222 }
62223
62224 return this.renderedElement;
62225 };
62226
62227 return Connect;
62228 }(_react.Component);
62229
62230 Connect.displayName = connectDisplayName;
62231 Connect.WrappedComponent = WrappedComponent;
62232 Connect.contextTypes = {
62233 store: _storeShape2["default"]
62234 };
62235 Connect.propTypes = {
62236 store: _storeShape2["default"]
62237 };
62238
62239 if ((undefined) !== 'production') {
62240 Connect.prototype.componentWillUpdate = function componentWillUpdate() {
62241 if (this.version === version) {
62242 return;
62243 }
62244
62245 // We are hot reloading!
62246 this.version = version;
62247 this.trySubscribe();
62248 this.clearCache();
62249 };
62250 }
62251
62252 return (0, _hoistNonReactStatics2["default"])(Connect, WrappedComponent);
62253 };
62254 }
62255
62256/***/ },
62257/* 634 */
62258/***/ function(module, exports) {
62259
62260 "use strict";
62261
62262 exports.__esModule = true;
62263 exports["default"] = shallowEqual;
62264 function shallowEqual(objA, objB) {
62265 if (objA === objB) {
62266 return true;
62267 }
62268
62269 var keysA = Object.keys(objA);
62270 var keysB = Object.keys(objB);
62271
62272 if (keysA.length !== keysB.length) {
62273 return false;
62274 }
62275
62276 // Test for A's keys different from B.
62277 var hasOwn = Object.prototype.hasOwnProperty;
62278 for (var i = 0; i < keysA.length; i++) {
62279 if (!hasOwn.call(objB, keysA[i]) || objA[keysA[i]] !== objB[keysA[i]]) {
62280 return false;
62281 }
62282 }
62283
62284 return true;
62285 }
62286
62287/***/ },
62288/* 635 */
62289/***/ function(module, exports, __webpack_require__) {
62290
62291 'use strict';
62292
62293 exports.__esModule = true;
62294 exports["default"] = wrapActionCreators;
62295
62296 var _redux = __webpack_require__(636);
62297
62298 function wrapActionCreators(actionCreators) {
62299 return function (dispatch) {
62300 return (0, _redux.bindActionCreators)(actionCreators, dispatch);
62301 };
62302 }
62303
62304/***/ },
62305/* 636 */
62306/***/ function(module, exports, __webpack_require__) {
62307
62308 'use strict';
62309
62310 exports.__esModule = true;
62311 exports.compose = exports.applyMiddleware = exports.bindActionCreators = exports.combineReducers = exports.createStore = undefined;
62312
62313 var _createStore = __webpack_require__(637);
62314
62315 var _createStore2 = _interopRequireDefault(_createStore);
62316
62317 var _combineReducers = __webpack_require__(646);
62318
62319 var _combineReducers2 = _interopRequireDefault(_combineReducers);
62320
62321 var _bindActionCreators = __webpack_require__(648);
62322
62323 var _bindActionCreators2 = _interopRequireDefault(_bindActionCreators);
62324
62325 var _applyMiddleware = __webpack_require__(649);
62326
62327 var _applyMiddleware2 = _interopRequireDefault(_applyMiddleware);
62328
62329 var _compose = __webpack_require__(650);
62330
62331 var _compose2 = _interopRequireDefault(_compose);
62332
62333 var _warning = __webpack_require__(647);
62334
62335 var _warning2 = _interopRequireDefault(_warning);
62336
62337 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
62338
62339 /*
62340 * This is a dummy function to check if the function name has been altered by minification.
62341 * If the function has been minified and NODE_ENV !== 'production', warn the user.
62342 */
62343 function isCrushed() {}
62344
62345 if ((undefined) !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
62346 (0, _warning2['default'])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');
62347 }
62348
62349 exports.createStore = _createStore2['default'];
62350 exports.combineReducers = _combineReducers2['default'];
62351 exports.bindActionCreators = _bindActionCreators2['default'];
62352 exports.applyMiddleware = _applyMiddleware2['default'];
62353 exports.compose = _compose2['default'];
62354
62355/***/ },
62356/* 637 */
62357/***/ function(module, exports, __webpack_require__) {
62358
62359 'use strict';
62360
62361 exports.__esModule = true;
62362 exports.ActionTypes = undefined;
62363 exports['default'] = createStore;
62364
62365 var _isPlainObject = __webpack_require__(638);
62366
62367 var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
62368
62369 var _symbolObservable = __webpack_require__(642);
62370
62371 var _symbolObservable2 = _interopRequireDefault(_symbolObservable);
62372
62373 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
62374
62375 /**
62376 * These are private action types reserved by Redux.
62377 * For any unknown actions, you must return the current state.
62378 * If the current state is undefined, you must return the initial state.
62379 * Do not reference these action types directly in your code.
62380 */
62381 var ActionTypes = exports.ActionTypes = {
62382 INIT: '@@redux/INIT'
62383 };
62384
62385 /**
62386 * Creates a Redux store that holds the state tree.
62387 * The only way to change the data in the store is to call `dispatch()` on it.
62388 *
62389 * There should only be a single store in your app. To specify how different
62390 * parts of the state tree respond to actions, you may combine several reducers
62391 * into a single reducer function by using `combineReducers`.
62392 *
62393 * @param {Function} reducer A function that returns the next state tree, given
62394 * the current state tree and the action to handle.
62395 *
62396 * @param {any} [preloadedState] The initial state. You may optionally specify it
62397 * to hydrate the state from the server in universal apps, or to restore a
62398 * previously serialized user session.
62399 * If you use `combineReducers` to produce the root reducer function, this must be
62400 * an object with the same shape as `combineReducers` keys.
62401 *
62402 * @param {Function} enhancer The store enhancer. You may optionally specify it
62403 * to enhance the store with third-party capabilities such as middleware,
62404 * time travel, persistence, etc. The only store enhancer that ships with Redux
62405 * is `applyMiddleware()`.
62406 *
62407 * @returns {Store} A Redux store that lets you read the state, dispatch actions
62408 * and subscribe to changes.
62409 */
62410 function createStore(reducer, preloadedState, enhancer) {
62411 var _ref2;
62412
62413 if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
62414 enhancer = preloadedState;
62415 preloadedState = undefined;
62416 }
62417
62418 if (typeof enhancer !== 'undefined') {
62419 if (typeof enhancer !== 'function') {
62420 throw new Error('Expected the enhancer to be a function.');
62421 }
62422
62423 return enhancer(createStore)(reducer, preloadedState);
62424 }
62425
62426 if (typeof reducer !== 'function') {
62427 throw new Error('Expected the reducer to be a function.');
62428 }
62429
62430 var currentReducer = reducer;
62431 var currentState = preloadedState;
62432 var currentListeners = [];
62433 var nextListeners = currentListeners;
62434 var isDispatching = false;
62435
62436 function ensureCanMutateNextListeners() {
62437 if (nextListeners === currentListeners) {
62438 nextListeners = currentListeners.slice();
62439 }
62440 }
62441
62442 /**
62443 * Reads the state tree managed by the store.
62444 *
62445 * @returns {any} The current state tree of your application.
62446 */
62447 function getState() {
62448 return currentState;
62449 }
62450
62451 /**
62452 * Adds a change listener. It will be called any time an action is dispatched,
62453 * and some part of the state tree may potentially have changed. You may then
62454 * call `getState()` to read the current state tree inside the callback.
62455 *
62456 * You may call `dispatch()` from a change listener, with the following
62457 * caveats:
62458 *
62459 * 1. The subscriptions are snapshotted just before every `dispatch()` call.
62460 * If you subscribe or unsubscribe while the listeners are being invoked, this
62461 * will not have any effect on the `dispatch()` that is currently in progress.
62462 * However, the next `dispatch()` call, whether nested or not, will use a more
62463 * recent snapshot of the subscription list.
62464 *
62465 * 2. The listener should not expect to see all state changes, as the state
62466 * might have been updated multiple times during a nested `dispatch()` before
62467 * the listener is called. It is, however, guaranteed that all subscribers
62468 * registered before the `dispatch()` started will be called with the latest
62469 * state by the time it exits.
62470 *
62471 * @param {Function} listener A callback to be invoked on every dispatch.
62472 * @returns {Function} A function to remove this change listener.
62473 */
62474 function subscribe(listener) {
62475 if (typeof listener !== 'function') {
62476 throw new Error('Expected listener to be a function.');
62477 }
62478
62479 var isSubscribed = true;
62480
62481 ensureCanMutateNextListeners();
62482 nextListeners.push(listener);
62483
62484 return function unsubscribe() {
62485 if (!isSubscribed) {
62486 return;
62487 }
62488
62489 isSubscribed = false;
62490
62491 ensureCanMutateNextListeners();
62492 var index = nextListeners.indexOf(listener);
62493 nextListeners.splice(index, 1);
62494 };
62495 }
62496
62497 /**
62498 * Dispatches an action. It is the only way to trigger a state change.
62499 *
62500 * The `reducer` function, used to create the store, will be called with the
62501 * current state tree and the given `action`. Its return value will
62502 * be considered the **next** state of the tree, and the change listeners
62503 * will be notified.
62504 *
62505 * The base implementation only supports plain object actions. If you want to
62506 * dispatch a Promise, an Observable, a thunk, or something else, you need to
62507 * wrap your store creating function into the corresponding middleware. For
62508 * example, see the documentation for the `redux-thunk` package. Even the
62509 * middleware will eventually dispatch plain object actions using this method.
62510 *
62511 * @param {Object} action A plain object representing “what changed”. It is
62512 * a good idea to keep actions serializable so you can record and replay user
62513 * sessions, or use the time travelling `redux-devtools`. An action must have
62514 * a `type` property which may not be `undefined`. It is a good idea to use
62515 * string constants for action types.
62516 *
62517 * @returns {Object} For convenience, the same action object you dispatched.
62518 *
62519 * Note that, if you use a custom middleware, it may wrap `dispatch()` to
62520 * return something else (for example, a Promise you can await).
62521 */
62522 function dispatch(action) {
62523 if (!(0, _isPlainObject2['default'])(action)) {
62524 throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
62525 }
62526
62527 if (typeof action.type === 'undefined') {
62528 throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
62529 }
62530
62531 if (isDispatching) {
62532 throw new Error('Reducers may not dispatch actions.');
62533 }
62534
62535 try {
62536 isDispatching = true;
62537 currentState = currentReducer(currentState, action);
62538 } finally {
62539 isDispatching = false;
62540 }
62541
62542 var listeners = currentListeners = nextListeners;
62543 for (var i = 0; i < listeners.length; i++) {
62544 listeners[i]();
62545 }
62546
62547 return action;
62548 }
62549
62550 /**
62551 * Replaces the reducer currently used by the store to calculate the state.
62552 *
62553 * You might need this if your app implements code splitting and you want to
62554 * load some of the reducers dynamically. You might also need this if you
62555 * implement a hot reloading mechanism for Redux.
62556 *
62557 * @param {Function} nextReducer The reducer for the store to use instead.
62558 * @returns {void}
62559 */
62560 function replaceReducer(nextReducer) {
62561 if (typeof nextReducer !== 'function') {
62562 throw new Error('Expected the nextReducer to be a function.');
62563 }
62564
62565 currentReducer = nextReducer;
62566 dispatch({ type: ActionTypes.INIT });
62567 }
62568
62569 /**
62570 * Interoperability point for observable/reactive libraries.
62571 * @returns {observable} A minimal observable of state changes.
62572 * For more information, see the observable proposal:
62573 * https://github.com/zenparsing/es-observable
62574 */
62575 function observable() {
62576 var _ref;
62577
62578 var outerSubscribe = subscribe;
62579 return _ref = {
62580 /**
62581 * The minimal observable subscription method.
62582 * @param {Object} observer Any object that can be used as an observer.
62583 * The observer object should have a `next` method.
62584 * @returns {subscription} An object with an `unsubscribe` method that can
62585 * be used to unsubscribe the observable from the store, and prevent further
62586 * emission of values from the observable.
62587 */
62588 subscribe: function subscribe(observer) {
62589 if (typeof observer !== 'object') {
62590 throw new TypeError('Expected the observer to be an object.');
62591 }
62592
62593 function observeState() {
62594 if (observer.next) {
62595 observer.next(getState());
62596 }
62597 }
62598
62599 observeState();
62600 var unsubscribe = outerSubscribe(observeState);
62601 return { unsubscribe: unsubscribe };
62602 }
62603 }, _ref[_symbolObservable2['default']] = function () {
62604 return this;
62605 }, _ref;
62606 }
62607
62608 // When a store is created, an "INIT" action is dispatched so that every
62609 // reducer returns their initial state. This effectively populates
62610 // the initial state tree.
62611 dispatch({ type: ActionTypes.INIT });
62612
62613 return _ref2 = {
62614 dispatch: dispatch,
62615 subscribe: subscribe,
62616 getState: getState,
62617 replaceReducer: replaceReducer
62618 }, _ref2[_symbolObservable2['default']] = observable, _ref2;
62619 }
62620
62621/***/ },
62622/* 638 */
62623/***/ function(module, exports, __webpack_require__) {
62624
62625 var getPrototype = __webpack_require__(639),
62626 isObjectLike = __webpack_require__(641);
62627
62628 /** `Object#toString` result references. */
62629 var objectTag = '[object Object]';
62630
62631 /** Used for built-in method references. */
62632 var funcProto = Function.prototype,
62633 objectProto = Object.prototype;
62634
62635 /** Used to resolve the decompiled source of functions. */
62636 var funcToString = funcProto.toString;
62637
62638 /** Used to check objects for own properties. */
62639 var hasOwnProperty = objectProto.hasOwnProperty;
62640
62641 /** Used to infer the `Object` constructor. */
62642 var objectCtorString = funcToString.call(Object);
62643
62644 /**
62645 * Used to resolve the
62646 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
62647 * of values.
62648 */
62649 var objectToString = objectProto.toString;
62650
62651 /**
62652 * Checks if `value` is a plain object, that is, an object created by the
62653 * `Object` constructor or one with a `[[Prototype]]` of `null`.
62654 *
62655 * @static
62656 * @memberOf _
62657 * @since 0.8.0
62658 * @category Lang
62659 * @param {*} value The value to check.
62660 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
62661 * @example
62662 *
62663 * function Foo() {
62664 * this.a = 1;
62665 * }
62666 *
62667 * _.isPlainObject(new Foo);
62668 * // => false
62669 *
62670 * _.isPlainObject([1, 2, 3]);
62671 * // => false
62672 *
62673 * _.isPlainObject({ 'x': 0, 'y': 0 });
62674 * // => true
62675 *
62676 * _.isPlainObject(Object.create(null));
62677 * // => true
62678 */
62679 function isPlainObject(value) {
62680 if (!isObjectLike(value) || objectToString.call(value) != objectTag) {
62681 return false;
62682 }
62683 var proto = getPrototype(value);
62684 if (proto === null) {
62685 return true;
62686 }
62687 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
62688 return (typeof Ctor == 'function' &&
62689 Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
62690 }
62691
62692 module.exports = isPlainObject;
62693
62694
62695/***/ },
62696/* 639 */
62697/***/ function(module, exports, __webpack_require__) {
62698
62699 var overArg = __webpack_require__(640);
62700
62701 /** Built-in value references. */
62702 var getPrototype = overArg(Object.getPrototypeOf, Object);
62703
62704 module.exports = getPrototype;
62705
62706
62707/***/ },
62708/* 640 */
62709/***/ function(module, exports) {
62710
62711 /**
62712 * Creates a unary function that invokes `func` with its argument transformed.
62713 *
62714 * @private
62715 * @param {Function} func The function to wrap.
62716 * @param {Function} transform The argument transform.
62717 * @returns {Function} Returns the new function.
62718 */
62719 function overArg(func, transform) {
62720 return function(arg) {
62721 return func(transform(arg));
62722 };
62723 }
62724
62725 module.exports = overArg;
62726
62727
62728/***/ },
62729/* 641 */
62730/***/ function(module, exports) {
62731
62732 /**
62733 * Checks if `value` is object-like. A value is object-like if it's not `null`
62734 * and has a `typeof` result of "object".
62735 *
62736 * @static
62737 * @memberOf _
62738 * @since 4.0.0
62739 * @category Lang
62740 * @param {*} value The value to check.
62741 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
62742 * @example
62743 *
62744 * _.isObjectLike({});
62745 * // => true
62746 *
62747 * _.isObjectLike([1, 2, 3]);
62748 * // => true
62749 *
62750 * _.isObjectLike(_.noop);
62751 * // => false
62752 *
62753 * _.isObjectLike(null);
62754 * // => false
62755 */
62756 function isObjectLike(value) {
62757 return value != null && typeof value == 'object';
62758 }
62759
62760 module.exports = isObjectLike;
62761
62762
62763/***/ },
62764/* 642 */
62765/***/ function(module, exports, __webpack_require__) {
62766
62767 module.exports = __webpack_require__(643);
62768
62769
62770/***/ },
62771/* 643 */
62772/***/ function(module, exports, __webpack_require__) {
62773
62774 /* WEBPACK VAR INJECTION */(function(global, module) {'use strict';
62775
62776 Object.defineProperty(exports, "__esModule", {
62777 value: true
62778 });
62779
62780 var _ponyfill = __webpack_require__(645);
62781
62782 var _ponyfill2 = _interopRequireDefault(_ponyfill);
62783
62784 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
62785
62786 var root; /* global window */
62787
62788
62789 if (typeof self !== 'undefined') {
62790 root = self;
62791 } else if (typeof window !== 'undefined') {
62792 root = window;
62793 } else if (typeof global !== 'undefined') {
62794 root = global;
62795 } else if (true) {
62796 root = module;
62797 } else {
62798 root = Function('return this')();
62799 }
62800
62801 var result = (0, _ponyfill2['default'])(root);
62802 exports['default'] = result;
62803 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(644)(module)))
62804
62805/***/ },
62806/* 644 */
62807/***/ function(module, exports) {
62808
62809 module.exports = function(module) {
62810 if(!module.webpackPolyfill) {
62811 module.deprecate = function() {};
62812 module.paths = [];
62813 // module.parent = undefined by default
62814 module.children = [];
62815 module.webpackPolyfill = 1;
62816 }
62817 return module;
62818 }
62819
62820
62821/***/ },
62822/* 645 */
62823/***/ function(module, exports) {
62824
62825 'use strict';
62826
62827 Object.defineProperty(exports, "__esModule", {
62828 value: true
62829 });
62830 exports['default'] = symbolObservablePonyfill;
62831 function symbolObservablePonyfill(root) {
62832 var result;
62833 var _Symbol = root.Symbol;
62834
62835 if (typeof _Symbol === 'function') {
62836 if (_Symbol.observable) {
62837 result = _Symbol.observable;
62838 } else {
62839 result = _Symbol('observable');
62840 _Symbol.observable = result;
62841 }
62842 } else {
62843 result = '@@observable';
62844 }
62845
62846 return result;
62847 };
62848
62849/***/ },
62850/* 646 */
62851/***/ function(module, exports, __webpack_require__) {
62852
62853 'use strict';
62854
62855 exports.__esModule = true;
62856 exports['default'] = combineReducers;
62857
62858 var _createStore = __webpack_require__(637);
62859
62860 var _isPlainObject = __webpack_require__(638);
62861
62862 var _isPlainObject2 = _interopRequireDefault(_isPlainObject);
62863
62864 var _warning = __webpack_require__(647);
62865
62866 var _warning2 = _interopRequireDefault(_warning);
62867
62868 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
62869
62870 function getUndefinedStateErrorMessage(key, action) {
62871 var actionType = action && action.type;
62872 var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
62873
62874 return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
62875 }
62876
62877 function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
62878 var reducerKeys = Object.keys(reducers);
62879 var argumentName = action && action.type === _createStore.ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
62880
62881 if (reducerKeys.length === 0) {
62882 return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
62883 }
62884
62885 if (!(0, _isPlainObject2['default'])(inputState)) {
62886 return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
62887 }
62888
62889 var unexpectedKeys = Object.keys(inputState).filter(function (key) {
62890 return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
62891 });
62892
62893 unexpectedKeys.forEach(function (key) {
62894 unexpectedKeyCache[key] = true;
62895 });
62896
62897 if (unexpectedKeys.length > 0) {
62898 return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
62899 }
62900 }
62901
62902 function assertReducerSanity(reducers) {
62903 Object.keys(reducers).forEach(function (key) {
62904 var reducer = reducers[key];
62905 var initialState = reducer(undefined, { type: _createStore.ActionTypes.INIT });
62906
62907 if (typeof initialState === 'undefined') {
62908 throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
62909 }
62910
62911 var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
62912 if (typeof reducer(undefined, { type: type }) === 'undefined') {
62913 throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore.ActionTypes.INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
62914 }
62915 });
62916 }
62917
62918 /**
62919 * Turns an object whose values are different reducer functions, into a single
62920 * reducer function. It will call every child reducer, and gather their results
62921 * into a single state object, whose keys correspond to the keys of the passed
62922 * reducer functions.
62923 *
62924 * @param {Object} reducers An object whose values correspond to different
62925 * reducer functions that need to be combined into one. One handy way to obtain
62926 * it is to use ES6 `import * as reducers` syntax. The reducers may never return
62927 * undefined for any action. Instead, they should return their initial state
62928 * if the state passed to them was undefined, and the current state for any
62929 * unrecognized action.
62930 *
62931 * @returns {Function} A reducer function that invokes every reducer inside the
62932 * passed object, and builds a state object with the same shape.
62933 */
62934 function combineReducers(reducers) {
62935 var reducerKeys = Object.keys(reducers);
62936 var finalReducers = {};
62937 for (var i = 0; i < reducerKeys.length; i++) {
62938 var key = reducerKeys[i];
62939
62940 if ((undefined) !== 'production') {
62941 if (typeof reducers[key] === 'undefined') {
62942 (0, _warning2['default'])('No reducer provided for key "' + key + '"');
62943 }
62944 }
62945
62946 if (typeof reducers[key] === 'function') {
62947 finalReducers[key] = reducers[key];
62948 }
62949 }
62950 var finalReducerKeys = Object.keys(finalReducers);
62951
62952 if ((undefined) !== 'production') {
62953 var unexpectedKeyCache = {};
62954 }
62955
62956 var sanityError;
62957 try {
62958 assertReducerSanity(finalReducers);
62959 } catch (e) {
62960 sanityError = e;
62961 }
62962
62963 return function combination() {
62964 var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
62965 var action = arguments[1];
62966
62967 if (sanityError) {
62968 throw sanityError;
62969 }
62970
62971 if ((undefined) !== 'production') {
62972 var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
62973 if (warningMessage) {
62974 (0, _warning2['default'])(warningMessage);
62975 }
62976 }
62977
62978 var hasChanged = false;
62979 var nextState = {};
62980 for (var i = 0; i < finalReducerKeys.length; i++) {
62981 var key = finalReducerKeys[i];
62982 var reducer = finalReducers[key];
62983 var previousStateForKey = state[key];
62984 var nextStateForKey = reducer(previousStateForKey, action);
62985 if (typeof nextStateForKey === 'undefined') {
62986 var errorMessage = getUndefinedStateErrorMessage(key, action);
62987 throw new Error(errorMessage);
62988 }
62989 nextState[key] = nextStateForKey;
62990 hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
62991 }
62992 return hasChanged ? nextState : state;
62993 };
62994 }
62995
62996/***/ },
62997/* 647 */
62998/***/ function(module, exports) {
62999
63000 'use strict';
63001
63002 exports.__esModule = true;
63003 exports['default'] = warning;
63004 /**
63005 * Prints a warning in the console if it exists.
63006 *
63007 * @param {String} message The warning message.
63008 * @returns {void}
63009 */
63010 function warning(message) {
63011 /* eslint-disable no-console */
63012 if (typeof console !== 'undefined' && typeof console.error === 'function') {
63013 console.error(message);
63014 }
63015 /* eslint-enable no-console */
63016 try {
63017 // This error was thrown as a convenience so that if you enable
63018 // "break on all exceptions" in your console,
63019 // it would pause the execution at this line.
63020 throw new Error(message);
63021 /* eslint-disable no-empty */
63022 } catch (e) {}
63023 /* eslint-enable no-empty */
63024 }
63025
63026/***/ },
63027/* 648 */
63028/***/ function(module, exports) {
63029
63030 'use strict';
63031
63032 exports.__esModule = true;
63033 exports['default'] = bindActionCreators;
63034 function bindActionCreator(actionCreator, dispatch) {
63035 return function () {
63036 return dispatch(actionCreator.apply(undefined, arguments));
63037 };
63038 }
63039
63040 /**
63041 * Turns an object whose values are action creators, into an object with the
63042 * same keys, but with every function wrapped into a `dispatch` call so they
63043 * may be invoked directly. This is just a convenience method, as you can call
63044 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
63045 *
63046 * For convenience, you can also pass a single function as the first argument,
63047 * and get a function in return.
63048 *
63049 * @param {Function|Object} actionCreators An object whose values are action
63050 * creator functions. One handy way to obtain it is to use ES6 `import * as`
63051 * syntax. You may also pass a single function.
63052 *
63053 * @param {Function} dispatch The `dispatch` function available on your Redux
63054 * store.
63055 *
63056 * @returns {Function|Object} The object mimicking the original object, but with
63057 * every action creator wrapped into the `dispatch` call. If you passed a
63058 * function as `actionCreators`, the return value will also be a single
63059 * function.
63060 */
63061 function bindActionCreators(actionCreators, dispatch) {
63062 if (typeof actionCreators === 'function') {
63063 return bindActionCreator(actionCreators, dispatch);
63064 }
63065
63066 if (typeof actionCreators !== 'object' || actionCreators === null) {
63067 throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
63068 }
63069
63070 var keys = Object.keys(actionCreators);
63071 var boundActionCreators = {};
63072 for (var i = 0; i < keys.length; i++) {
63073 var key = keys[i];
63074 var actionCreator = actionCreators[key];
63075 if (typeof actionCreator === 'function') {
63076 boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
63077 }
63078 }
63079 return boundActionCreators;
63080 }
63081
63082/***/ },
63083/* 649 */
63084/***/ function(module, exports, __webpack_require__) {
63085
63086 'use strict';
63087
63088 exports.__esModule = true;
63089
63090 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
63091
63092 exports['default'] = applyMiddleware;
63093
63094 var _compose = __webpack_require__(650);
63095
63096 var _compose2 = _interopRequireDefault(_compose);
63097
63098 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
63099
63100 /**
63101 * Creates a store enhancer that applies middleware to the dispatch method
63102 * of the Redux store. This is handy for a variety of tasks, such as expressing
63103 * asynchronous actions in a concise manner, or logging every action payload.
63104 *
63105 * See `redux-thunk` package as an example of the Redux middleware.
63106 *
63107 * Because middleware is potentially asynchronous, this should be the first
63108 * store enhancer in the composition chain.
63109 *
63110 * Note that each middleware will be given the `dispatch` and `getState` functions
63111 * as named arguments.
63112 *
63113 * @param {...Function} middlewares The middleware chain to be applied.
63114 * @returns {Function} A store enhancer applying the middleware.
63115 */
63116 function applyMiddleware() {
63117 for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
63118 middlewares[_key] = arguments[_key];
63119 }
63120
63121 return function (createStore) {
63122 return function (reducer, preloadedState, enhancer) {
63123 var store = createStore(reducer, preloadedState, enhancer);
63124 var _dispatch = store.dispatch;
63125 var chain = [];
63126
63127 var middlewareAPI = {
63128 getState: store.getState,
63129 dispatch: function dispatch(action) {
63130 return _dispatch(action);
63131 }
63132 };
63133 chain = middlewares.map(function (middleware) {
63134 return middleware(middlewareAPI);
63135 });
63136 _dispatch = _compose2['default'].apply(undefined, chain)(store.dispatch);
63137
63138 return _extends({}, store, {
63139 dispatch: _dispatch
63140 });
63141 };
63142 };
63143 }
63144
63145/***/ },
63146/* 650 */
63147/***/ function(module, exports) {
63148
63149 "use strict";
63150
63151 exports.__esModule = true;
63152 exports["default"] = compose;
63153 /**
63154 * Composes single-argument functions from right to left. The rightmost
63155 * function can take multiple arguments as it provides the signature for
63156 * the resulting composite function.
63157 *
63158 * @param {...Function} funcs The functions to compose.
63159 * @returns {Function} A function obtained by composing the argument functions
63160 * from right to left. For example, compose(f, g, h) is identical to doing
63161 * (...args) => f(g(h(...args))).
63162 */
63163
63164 function compose() {
63165 for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
63166 funcs[_key] = arguments[_key];
63167 }
63168
63169 if (funcs.length === 0) {
63170 return function (arg) {
63171 return arg;
63172 };
63173 }
63174
63175 if (funcs.length === 1) {
63176 return funcs[0];
63177 }
63178
63179 var last = funcs[funcs.length - 1];
63180 var rest = funcs.slice(0, -1);
63181 return function () {
63182 return rest.reduceRight(function (composed, f) {
63183 return f(composed);
63184 }, last.apply(undefined, arguments));
63185 };
63186 }
63187
63188/***/ },
63189/* 651 */
63190/***/ function(module, exports, __webpack_require__) {
63191
63192 'use strict';
63193
63194 Object.defineProperty(exports, "__esModule", {
63195 value: true
63196 });
63197
63198 var _react = __webpack_require__(89);
63199
63200 var _react2 = _interopRequireDefault(_react);
63201
63202 var _reactRouter = __webpack_require__(260);
63203
63204 var _App = __webpack_require__(652);
63205
63206 var _App2 = _interopRequireDefault(_App);
63207
63208 var _ContentWrapper = __webpack_require__(681);
63209
63210 var _ContentWrapper2 = _interopRequireDefault(_ContentWrapper);
63211
63212 var _HomePage = __webpack_require__(682);
63213
63214 var _HomePage2 = _interopRequireDefault(_HomePage);
63215
63216 var _OrganizationPage = __webpack_require__(684);
63217
63218 var _OrganizationPage2 = _interopRequireDefault(_OrganizationPage);
63219
63220 var _OrganizationsPage = __webpack_require__(710);
63221
63222 var _OrganizationsPage2 = _interopRequireDefault(_OrganizationsPage);
63223
63224 var _ProfilePage = __webpack_require__(716);
63225
63226 var _ProfilePage2 = _interopRequireDefault(_ProfilePage);
63227
63228 var _ProjectPage = __webpack_require__(719);
63229
63230 var _ProjectPage2 = _interopRequireDefault(_ProjectPage);
63231
63232 var _ProjectsPage = __webpack_require__(746);
63233
63234 var _ProjectsPage2 = _interopRequireDefault(_ProjectsPage);
63235
63236 var _UserPage = __webpack_require__(753);
63237
63238 var _UserPage2 = _interopRequireDefault(_UserPage);
63239
63240 var _UsersPage = __webpack_require__(755);
63241
63242 var _UsersPage2 = _interopRequireDefault(_UsersPage);
63243
63244 var _NewUserPage = __webpack_require__(761);
63245
63246 var _NewUserPage2 = _interopRequireDefault(_NewUserPage);
63247
63248 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63249
63250 var basePath = document.getElementById('baseUrlHolder').getAttribute('data');
63251 // Self-defined
63252 /* global document */
63253
63254 /**
63255 * Routes for main app
63256 * @author patrickkerrypei / https://github.com/patrickkerrypei
63257 */
63258
63259 // Libraries
63260 exports.default = _react2.default.createElement(
63261 _reactRouter.Route,
63262 { path: basePath, component: _App2.default, basePath: basePath },
63263 _react2.default.createElement(_reactRouter.IndexRedirect, { to: 'home' }),
63264 _react2.default.createElement(
63265 _reactRouter.Route,
63266 { component: _ContentWrapper2.default },
63267 _react2.default.createElement(_reactRouter.Route, { path: 'home', component: _HomePage2.default }),
63268 _react2.default.createElement(_reactRouter.Route, { path: 'organizations', component: _OrganizationsPage2.default }),
63269 _react2.default.createElement(_reactRouter.Route, { path: 'organizations/:organizationId', component: _OrganizationPage2.default }),
63270 _react2.default.createElement(_reactRouter.Route, { path: 'profile', component: _ProfilePage2.default }),
63271 _react2.default.createElement(_reactRouter.Route, { path: 'projects', component: _ProjectsPage2.default }),
63272 _react2.default.createElement(_reactRouter.Route, { path: 'projects/:ownerId', component: _ProjectsPage2.default }),
63273 _react2.default.createElement(_reactRouter.Route, { path: 'projects/:ownerId/:projectName', component: _ProjectPage2.default }),
63274 _react2.default.createElement(_reactRouter.Route, { path: 'users', component: _UsersPage2.default }),
63275 _react2.default.createElement(_reactRouter.Route, { path: 'users/:userId', component: _UserPage2.default }),
63276 _react2.default.createElement(_reactRouter.Route, { path: 'newuser', component: _NewUserPage2.default })
63277 )
63278 );
63279
63280/***/ },
63281/* 652 */
63282/***/ function(module, exports, __webpack_require__) {
63283
63284 'use strict';
63285
63286 Object.defineProperty(exports, "__esModule", {
63287 value: true
63288 });
63289
63290 var _reactRedux = __webpack_require__(629);
63291
63292 var _App = __webpack_require__(653);
63293
63294 var _App2 = _interopRequireDefault(_App);
63295
63296 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63297
63298 /**
63299 * App container
63300 * @author patrickkerrypei / https://github.com/patrickkerrypei
63301 */
63302
63303 // Libraries
63304 var mapStateToProps = function mapStateToProps(state) {
63305 // Default blue
63306 var themeColor = 'blue';
63307
63308 if (state.user.user.settings && state.user.user.settings.hasOwnProperty('WebGMEProfilePage')) {
63309 themeColor = state.user.user.settings.WebGMEProfilePage.themeColor || 'blue';
63310 }
63311
63312 return {
63313 themeColor: themeColor
63314 };
63315 };
63316 // Self-defined
63317 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_App2.default);
63318
63319/***/ },
63320/* 653 */
63321/***/ function(module, exports, __webpack_require__) {
63322
63323 'use strict';
63324
63325 Object.defineProperty(exports, "__esModule", {
63326 value: true
63327 });
63328
63329 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; }; }();
63330
63331 var _react = __webpack_require__(89);
63332
63333 var _react2 = _interopRequireDefault(_react);
63334
63335 var _Footer = __webpack_require__(654);
63336
63337 var _Footer2 = _interopRequireDefault(_Footer);
63338
63339 var _Header = __webpack_require__(655);
63340
63341 var _Header2 = _interopRequireDefault(_Header);
63342
63343 var _restClient = __webpack_require__(675);
63344
63345 var _restClient2 = _interopRequireDefault(_restClient);
63346
63347 var _SideBar = __webpack_require__(676);
63348
63349 var _SideBar2 = _interopRequireDefault(_SideBar);
63350
63351 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63352
63353 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
63354
63355 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; }
63356
63357 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; } /**
63358 * Main app for SPA (Single Page Application)
63359 * @author patrickkerrypei / https://github.com/patrickkerrypei
63360 */
63361
63362 // Libraries
63363
63364 // Self-defined
63365
63366
63367 var App = function (_Component) {
63368 _inherits(App, _Component);
63369
63370 function App(props) {
63371 _classCallCheck(this, App);
63372
63373 var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this, props));
63374
63375 _this.restClient = new _restClient2.default();
63376 // Set the referrer in the session store (if not already set)
63377 if (typeof window.sessionStorage.getItem('originalReferrer') !== 'string') {
63378 // Use top in case embedded in iframe.
63379 window.sessionStorage.setItem('originalReferrer', window.top.document.referrer);
63380 }
63381 return _this;
63382 }
63383
63384 _createClass(App, [{
63385 key: 'render',
63386 value: function render() {
63387 var _this2 = this;
63388
63389 var themeColor = this.props.themeColor;
63390 var pathname = this.props.location.pathname;
63391
63392 // Passing props through the route
63393
63394 var ContentWrapperWithRestClient = _react2.default.Children.map(this.props.children, function (child) {
63395 return _react2.default.cloneElement(child, {
63396 pathname: pathname,
63397 restClient: _this2.restClient
63398 });
63399 });
63400
63401 // Wrapper can be "skin-blue, skin-black, skin-purple, skin-yellow, skin-red, or skin-green"
63402 return _react2.default.createElement(
63403 'div',
63404 { className: 'wrapper skin-' + themeColor },
63405 _react2.default.createElement(_Header2.default, { basePath: this.props.route.basePath,
63406 pathname: pathname }),
63407 _react2.default.createElement(_SideBar2.default, { pathname: pathname }),
63408 ContentWrapperWithRestClient,
63409 _react2.default.createElement(_Footer2.default, null)
63410 );
63411 }
63412 }]);
63413
63414 return App;
63415 }(_react.Component);
63416
63417 exports.default = App;
63418
63419
63420 App.propTypes = {
63421 themeColor: _react.PropTypes.string.isRequired
63422 };
63423
63424/***/ },
63425/* 654 */
63426/***/ function(module, exports, __webpack_require__) {
63427
63428 'use strict';
63429
63430 Object.defineProperty(exports, "__esModule", {
63431 value: true
63432 });
63433
63434 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; }; }();
63435
63436 var _react = __webpack_require__(89);
63437
63438 var _react2 = _interopRequireDefault(_react);
63439
63440 var _style = __webpack_require__(598);
63441
63442 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63443
63444 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
63445
63446 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; }
63447
63448 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; } /**
63449 * Footer component (copyright, version#)
63450 * @author patrickkerrypei / https://github.com/patrickkerrypei
63451 */
63452
63453 // Libraries
63454
63455 // Style
63456
63457
63458 var Footer = function (_Component) {
63459 _inherits(Footer, _Component);
63460
63461 function Footer(props) {
63462 _classCallCheck(this, Footer);
63463
63464 return _possibleConstructorReturn(this, (Footer.__proto__ || Object.getPrototypeOf(Footer)).call(this, props));
63465 }
63466
63467 _createClass(Footer, [{
63468 key: 'render',
63469 value: function render() {
63470 return _react2.default.createElement(
63471 'footer',
63472 { className: 'main-footer', style: _style.Footer.mainFooter },
63473 _react2.default.createElement(
63474 'strong',
63475 { style: _style.Footer.footerLeft },
63476 '\xA9 2017',
63477 _react2.default.createElement(
63478 'a',
63479 { href: 'https://www.vanderbilt.edu', target: '_blank' },
63480 '\xA0Vanderbilt University'
63481 ),
63482 _react2.default.createElement(
63483 'a',
63484 { href: 'https://www.isis.vanderbilt.edu', target: '_blank' },
63485 '\xA0ISIS'
63486 ),
63487 _react2.default.createElement(
63488 'a',
63489 { href: 'https://www.webgme.org', target: '_blank' },
63490 '\xA0WebGME'
63491 )
63492 ),
63493 _react2.default.createElement(
63494 'span',
63495 { className: 'pull-right hidden-xs', style: _style.Footer.footerRight },
63496 _react2.default.createElement(
63497 'a',
63498 { href: 'https://github.com/webgme/user-management-page/releases', target: '_blank' },
63499 'v0.3.1'
63500 )
63501 )
63502 );
63503 }
63504 }]);
63505
63506 return Footer;
63507 }(_react.Component);
63508
63509 exports.default = Footer;
63510
63511/***/ },
63512/* 655 */
63513/***/ function(module, exports, __webpack_require__) {
63514
63515 'use strict';
63516
63517 Object.defineProperty(exports, "__esModule", {
63518 value: true
63519 });
63520
63521 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; }; }();
63522
63523 var _react = __webpack_require__(89);
63524
63525 var _react2 = _interopRequireDefault(_react);
63526
63527 var _reactRouter = __webpack_require__(260);
63528
63529 var _ColorMenu = __webpack_require__(656);
63530
63531 var _ColorMenu2 = _interopRequireDefault(_ColorMenu);
63532
63533 var _Refresh = __webpack_require__(663);
63534
63535 var _Refresh2 = _interopRequireDefault(_Refresh);
63536
63537 var _UserMenu = __webpack_require__(672);
63538
63539 var _UserMenu2 = _interopRequireDefault(_UserMenu);
63540
63541 var _utils = __webpack_require__(658);
63542
63543 var _style = __webpack_require__(598);
63544
63545 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63546
63547 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
63548
63549 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; }
63550
63551 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; } /* global window */
63552
63553 /**
63554 * Header component
63555 * @author patrickkerrypei / https://github.com/patrickkerrypei
63556 */
63557
63558 // Libraries
63559
63560 // Self defined
63561
63562 // import SettingsMenu from './navigation_bar/SettingsMenu';
63563
63564
63565 var Header = function (_React$Component) {
63566 _inherits(Header, _React$Component);
63567
63568 function Header(props) {
63569 _classCallCheck(this, Header);
63570
63571 return _possibleConstructorReturn(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props));
63572 }
63573
63574 _createClass(Header, [{
63575 key: 'render',
63576 value: function render() {
63577 var _props = this.props;
63578 var basePath = _props.basePath;
63579 var pathname = _props.pathname;
63580
63581
63582 var breadcrumbs = [],
63583 pathWithoutBase = pathname.replace(basePath, ''),
63584 parameters = pathWithoutBase.split('/');
63585
63586 // Always have home
63587 // breadcrumbs.push(
63588 // <li style={STYLE.breadCrumbListItem} key={0}>
63589 // <Link to={basePath} style={STYLE.breadCrumbLink}>
63590 // <i className="fa fa-home" style={STYLE.breadCrumbIcon}/>
63591 // </Link>
63592 // </li>
63593 // );
63594
63595 var rest = parameters[0] === 'home' ? parameters.slice(1) : parameters;
63596 var cumulative = '';
63597 rest.forEach(function (oneParam, index) {
63598 breadcrumbs.push(_react2.default.createElement(
63599 'li',
63600 { style: _style.Header.breadCrumbListItem, key: index + 1 },
63601 _react2.default.createElement(
63602 _reactRouter.Link,
63603 { to: '' + basePath + cumulative + oneParam, style: _style.Header.breadCrumbLink },
63604 index === 0 ? (0, _utils.capitalizeFirstLetter)(rest[index]) : rest[index]
63605 )
63606 ));
63607 cumulative += oneParam + '/';
63608 });
63609
63610 for (var i = 1; i < breadcrumbs.length; i += 2) {
63611 breadcrumbs.splice(i, 0, _react2.default.createElement(
63612 'span',
63613 { style: _style.Header.breadCrumbLink, key: i + 100 },
63614 '\xA0\xA0\xA0 > \xA0\xA0\xA0'
63615 ));
63616 }
63617
63618 return _react2.default.createElement(
63619 'header',
63620 { className: 'main-header' },
63621 _react2.default.createElement(
63622 _reactRouter.Link,
63623 { to: '' + basePath, className: 'logo', style: { textDecoration: "none" } },
63624 _react2.default.createElement(
63625 'span',
63626 { className: 'logo-mini' },
63627 _react2.default.createElement(
63628 'b',
63629 null,
63630 'GME'
63631 )
63632 ),
63633 _react2.default.createElement(
63634 'span',
63635 { className: 'logo-lg' },
63636 _react2.default.createElement(
63637 'b',
63638 null,
63639 'GME'
63640 ),
63641 'Profile'
63642 )
63643 ),
63644 _react2.default.createElement(
63645 'nav',
63646 { className: 'navbar navbar-static-top', role: 'navigation' },
63647 _react2.default.createElement(
63648 'a',
63649 { href: '#', className: 'sidebar-toggle', 'data-toggle': 'offcanvas', role: 'button' },
63650 _react2.default.createElement(
63651 'span',
63652 { className: 'sr-only' },
63653 'Toggle navigation'
63654 )
63655 ),
63656 _react2.default.createElement(
63657 'ol',
63658 { className: 'dropdown messages-menu hidden-xs', style: _style.Header.breadCrumb },
63659 breadcrumbs
63660 ),
63661 _react2.default.createElement(
63662 'div',
63663 { className: 'navbar-custom-menu' },
63664 _react2.default.createElement(
63665 'ul',
63666 { className: 'nav navbar-nav' },
63667 _react2.default.createElement(_Refresh2.default, null),
63668 _react2.default.createElement(_ColorMenu2.default, null),
63669 _react2.default.createElement(_UserMenu2.default, null)
63670 )
63671 )
63672 )
63673 );
63674 }
63675 }]);
63676
63677 return Header;
63678 }(_react2.default.Component);
63679
63680 exports.default = Header;
63681
63682/***/ },
63683/* 656 */
63684/***/ function(module, exports, __webpack_require__) {
63685
63686 'use strict';
63687
63688 Object.defineProperty(exports, "__esModule", {
63689 value: true
63690 });
63691
63692 var _reactRedux = __webpack_require__(629);
63693
63694 var _ColorMenu = __webpack_require__(657);
63695
63696 var _ColorMenu2 = _interopRequireDefault(_ColorMenu);
63697
63698 var _user = __webpack_require__(661);
63699
63700 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63701
63702 // Self-defined
63703 var mapDispatchToProps = function mapDispatchToProps(dispatch) {
63704 return {
63705 changeThemeColor: function changeThemeColor(event) {
63706 var themeColor = event.target.getAttribute('data-color');
63707 dispatch((0, _user.setThemeColor)(themeColor));
63708 }
63709 };
63710 }; /**
63711 * Color menu functionality
63712 * @author patrickkerrypei / https://github.com/patrickkerrypei
63713 */
63714
63715 // Libraries
63716 exports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_ColorMenu2.default);
63717
63718/***/ },
63719/* 657 */
63720/***/ function(module, exports, __webpack_require__) {
63721
63722 'use strict';
63723
63724 Object.defineProperty(exports, "__esModule", {
63725 value: true
63726 });
63727
63728 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; }; }();
63729
63730 var _react = __webpack_require__(89);
63731
63732 var _react2 = _interopRequireDefault(_react);
63733
63734 var _utils = __webpack_require__(658);
63735
63736 var _constants = __webpack_require__(660);
63737
63738 var _style = __webpack_require__(598);
63739
63740 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63741
63742 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
63743
63744 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; }
63745
63746 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; } /**
63747 * Color selection dropdown of the header component
63748 * @author patrickkerrypei / https://github.com/patrickkerrypei
63749 */
63750
63751 // Libraries
63752
63753 // Self-defined
63754
63755
63756 var ColorMenu = function (_Component) {
63757 _inherits(ColorMenu, _Component);
63758
63759 function ColorMenu() {
63760 _classCallCheck(this, ColorMenu);
63761
63762 return _possibleConstructorReturn(this, (ColorMenu.__proto__ || Object.getPrototypeOf(ColorMenu)).apply(this, arguments));
63763 }
63764
63765 _createClass(ColorMenu, [{
63766 key: 'render',
63767 value: function render() {
63768 var changeThemeColor = this.props.changeThemeColor;
63769
63770
63771 var formattedColors = [];
63772 Object.keys(_constants.THEME_COLORS).forEach(function (color, index) {
63773 var colorBoxStyle = {
63774 width: 10,
63775 height: 10,
63776 display: "inline-block",
63777 backgroundColor: _constants.THEME_COLORS[color]
63778 };
63779 formattedColors.push(_react2.default.createElement(
63780 'li',
63781 { 'data-color': color, key: index, onClick: changeThemeColor },
63782 _react2.default.createElement(
63783 'a',
63784 { href: '#', style: { padding: "6px 10px" }, 'data-color': color },
63785 _react2.default.createElement(
63786 'div',
63787 { className: 'pull-left' },
63788 _react2.default.createElement('div', { className: 'color-box', style: colorBoxStyle, 'data-color': color })
63789 ),
63790 _react2.default.createElement(
63791 'h4',
63792 { 'data-color': color },
63793 (0, _utils.capitalizeFirstLetter)(color)
63794 )
63795 )
63796 ));
63797 });
63798
63799 return _react2.default.createElement(
63800 'li',
63801 { className: 'dropdown messages-menu hidden-xs' },
63802 _react2.default.createElement(
63803 'a',
63804 { href: '#', className: 'dropdown-toggle', 'data-toggle': 'dropdown' },
63805 _react2.default.createElement('i', { className: 'fa fa-paint-brush', style: { fontSize: "20px" } })
63806 ),
63807 _react2.default.createElement(
63808 'ul',
63809 { className: 'dropdown-menu', style: _style.ColorMenu.dropdownMenu },
63810 _react2.default.createElement(
63811 'li',
63812 { className: 'header', style: _style.ColorMenu.menuHeader },
63813 _react2.default.createElement(
63814 'span',
63815 { style: { fontWeight: 700 } },
63816 'Color Theme'
63817 )
63818 ),
63819 _react2.default.createElement(
63820 'li',
63821 null,
63822 _react2.default.createElement(
63823 'ul',
63824 { className: 'menu', style: _style.ColorMenu.colorMenu },
63825 formattedColors
63826 )
63827 )
63828 )
63829 );
63830 }
63831 }]);
63832
63833 return ColorMenu;
63834 }(_react.Component);
63835
63836 exports.default = ColorMenu;
63837
63838/***/ },
63839/* 658 */
63840/***/ function(module, exports, __webpack_require__) {
63841
63842 'use strict';
63843
63844 Object.defineProperty(exports, "__esModule", {
63845 value: true
63846 });
63847 exports.getUserIconSource = exports.processProjectCommitsDoughnut = exports.processProjectCommitsLine = exports.getDefaultDoughnutData = exports.getDefaultDataset = exports.processProjectsCommitsLine = exports.processCommitsBar = undefined;
63848 exports.capitalizeFirstLetter = capitalizeFirstLetter;
63849 exports.convertHexToRGBA = convertHexToRGBA;
63850 exports.getPastWeeksDays = getPastWeeksDays;
63851 exports.getRandomColorHex = getRandomColorHex;
63852 exports.isEmpty = isEmpty;
63853 exports.multiselectFormat = multiselectFormat;
63854 exports.shadeColor = shadeColor;
63855 exports.sortObjectArrayByField = sortObjectArrayByField;
63856 exports.sortObjectArrayByNestedDateField = sortObjectArrayByNestedDateField;
63857 exports.timeAgo = timeAgo;
63858 exports.formatRightsOrigin = formatRightsOrigin;
63859 exports.sortWithChecks = sortWithChecks;
63860
63861 var _react = __webpack_require__(89);
63862
63863 var _react2 = _interopRequireDefault(_react);
63864
63865 var _blockies = __webpack_require__(659);
63866
63867 var _blockies2 = _interopRequireDefault(_blockies);
63868
63869 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
63870
63871 /**
63872 * Format string so that only first letter is capitalized
63873 * Note: String.prototype.charAt & String.prototype.slice handle out of bounds
63874 * @param word - word to be formatted
63875 * @returns {string} - formatted word
63876 */
63877 /* globals document */
63878 /**
63879 * Utility functions
63880 * @author patrickkerrypei / https://github.com/patrickkerrypei
63881 */
63882
63883 function capitalizeFirstLetter(word) {
63884 return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
63885 }
63886
63887 /**
63888 * Convert hex and opacity into a RGBA value
63889 * @param {string} hex - hex value
63890 * @param {Number} opacity - percent opacity (scale of 1 to 100)
63891 * @return {string} - returns the rgba ex. rgba(r,g,b,0.a)
63892 */
63893 function convertHexToRGBA(hex, opacity) {
63894 hex = hex.replace('#', '');
63895 var r = parseInt(hex.substring(0, 2), 16);
63896 var g = parseInt(hex.substring(2, 4), 16);
63897 var b = parseInt(hex.substring(4, 6), 16);
63898
63899 return 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
63900 }
63901
63902 /**
63903 * Returns an array of the past 7 days of the week
63904 * @return {Array} - Array of the names of the past 7 days of the week
63905 */
63906 function getPastWeeksDays() {
63907 var DAYS = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
63908 var result = [];
63909 for (var i = 0; i < 7; i++) {
63910 result.push(DAYS[(i + new Date().getDay()) % 7]);
63911 }
63912 return result;
63913 }
63914
63915 /**
63916 * Gets the hex of a random color
63917 * @return {string} - hex value for a random color in the format #XXXXXX
63918 */
63919 function getRandomColorHex() {
63920 var possibleInHex = '21A2B3C'.split(''),
63921 result = '#';
63922
63923 for (var i = 0; i < 6; i++) {
63924 result += possibleInHex[Math.floor(Math.random() * possibleInHex.length)];
63925 }
63926 return result;
63927 }
63928
63929 /**
63930 * Check if an object is empty
63931 * @param {Object} object - object to be checked
63932 * @return {boolean} - returns whether or not the object is 'empty'
63933 */
63934 function isEmpty(object) {
63935
63936 if (object === null) {
63937 return true;
63938 }
63939
63940 for (var key in object) {
63941 if (object.hasOwnProperty(key)) {
63942 return false;
63943 }
63944 }
63945 return true;
63946 }
63947
63948 /**
63949 * Formats an array of objects to be sent to the multiselect drop-down list
63950 * @param {Array} allOfOneThing - array of one kind of objects(users/organizations)
63951 * @return {Object|*|Array} - Formatted array for use with react-select
63952 */
63953 function multiselectFormat(allOfOneThing) {
63954 return allOfOneThing.map(function (oneThing) {
63955 return Object.assign({}, {
63956 label: oneThing._id,
63957 value: oneThing._id
63958 });
63959 });
63960 }
63961
63962 /**
63963 * Lightens or darkens a color by a specified percentage
63964 * @param {string} color - hex value of color to be changed - ex. #XXXXXX
63965 * @param {number} percent - from -100 to 100
63966 * @return {string} - new hex value
63967 */
63968 function shadeColor(color, percent) {
63969
63970 var R = parseInt(color.substring(1, 3), 16);
63971 var G = parseInt(color.substring(3, 5), 16);
63972 var B = parseInt(color.substring(5, 7), 16);
63973
63974 R = parseInt(R * (100 + percent) / 100, 10);
63975 G = parseInt(G * (100 + percent) / 100, 10);
63976 B = parseInt(B * (100 + percent) / 100, 10);
63977
63978 R = R < 255 ? R : 255;
63979 G = G < 255 ? G : 255;
63980 B = B < 255 ? B : 255;
63981
63982 var RR = R.toString(16).length === 1 ? '0' + R.toString(16) : R.toString(16);
63983 var GG = G.toString(16).length === 1 ? '0' + G.toString(16) : G.toString(16);
63984 var BB = B.toString(16).length === 1 ? '0' + B.toString(16) : B.toString(16);
63985
63986 return '#' + RR + GG + BB;
63987 }
63988
63989 /**
63990 * Custom sort method to sort objects by a chosen field
63991 * @param {string} field - field of object to be sorted by
63992 * @return {Function} - to be used as callback for javascript's native sort method
63993 */
63994 function sortObjectArrayByField(field) {
63995 return function (a, b) {
63996 var aVal = a[field];
63997 var bVal = b[field];
63998
63999 if (typeof aVal === 'string' && typeof bVal === 'string') {
64000 aVal = aVal.toLowerCase();
64001 bVal = bVal.toLowerCase();
64002 }
64003
64004 if (aVal > bVal) {
64005 return 1;
64006 } else if (aVal < bVal) {
64007 return -1;
64008 }
64009
64010 return 0;
64011 };
64012 }
64013
64014 /**
64015 * Custom sort method to sort objects by nested properties
64016 * @param {string} first - first field to search
64017 * @param {string} second - second field to search
64018 * @return {Function} - to be used as callback for javascript's native sort method
64019 */
64020 function sortObjectArrayByNestedDateField(first, second) {
64021 return function (a, b) {
64022 return new Date(b[first][second]) - new Date(a[first][second]);
64023 };
64024 }
64025
64026 // Date functions
64027 /**
64028 * Returns a string of how long ago
64029 * @param {string} isoDate - date in JS ISO format: Ex: 2016-06-13T14:21:56.877Z
64030 * @return {string} - how long ago
64031 */
64032 function timeAgo(isoDate) {
64033
64034 var target = Date.parse(isoDate),
64035 // this is in milliseconds
64036 current = new Date().getTime(),
64037 difference = current - target,
64038 result = '';
64039
64040 if (difference < 0) {
64041 result = 'just now';
64042 } else if (within(difference, 1000 * 60)) {
64043 result = timeOutput(difference, 1000, 'seconds');
64044 } else if (within(difference, 1000 * 60 * 60)) {
64045 result = timeOutput(difference, 1000 * 60, 'minutes');
64046 } else if (within(difference, 1000 * 60 * 60 * 24)) {
64047 result = timeOutput(difference, 1000 * 60 * 60, 'hours');
64048 } else if (within(difference, 1000 * 60 * 60 * 24 * 7)) {
64049 result = timeOutput(difference, 1000 * 60 * 60 * 24, 'days');
64050 } else if (within(difference, 1000 * 60 * 60 * 24 * 30)) {
64051 result = timeOutput(difference, 1000 * 60 * 60 * 24 * 7, 'weeks');
64052 } else if (within(difference, 1000 * 60 * 60 * 24 * 365)) {
64053 result = timeOutput(difference, 1000 * 60 * 60 * 24 * 30, 'months');
64054 } else {
64055 result = timeOutput(difference, 1000 * 60 * 60 * 24 * 365, 'years');
64056 }
64057
64058 return result;
64059 }
64060
64061 /**
64062 * Simple helper to see if the difference is within a certain range
64063 * @param {Number} difference - difference in milliseconds
64064 * @param {Number} range - range in milliseconds
64065 * @return {boolean} returns true or false if the value is within the range
64066 */
64067 function within(difference, range) {
64068 return difference < range;
64069 }
64070
64071 /**
64072 * Returns string value of the output
64073 * @param {Number} difference - difference from current in milliseconds
64074 * @param {Number} timeValue - unit being calculated ex. seconds: 1000
64075 * @param {string} pluralTimeName - plural name of time value ex. 'seconds'
64076 * @return {string} string of how long ago ex. '1 second ago' or '5 minutes ago'
64077 */
64078 function timeOutput(difference, timeValue, pluralTimeName) {
64079 var result = '';
64080 if (Math.round(difference / timeValue) === 1) {
64081 result = '1 ' + pluralTimeName.substring(0, pluralTimeName.length - 1) + ' ago';
64082 } else {
64083 result = Math.round(difference / timeValue) + ' ' + pluralTimeName + ' ago';
64084 }
64085 return result;
64086 }
64087
64088 /**
64089 * Collaborator table's rightsOrigin helper
64090 * @param {Array} arr - arr to be sifted through (user / orgs) rights
64091 * @return {Array} - formatted JSX of rights
64092 */
64093 function formatRightsOrigin(arr) {
64094 var result = [];
64095
64096 arr.forEach(function (right, index) {
64097 result.push(_react2.default.createElement(
64098 'div',
64099 { key: index + 1 },
64100 right
64101 ));
64102 });
64103
64104 return result;
64105 }
64106
64107 /**
64108 * Custom sort method for table sorting
64109 * @param {Array} arr - input array
64110 * @param {string|Array} sortCategory - sortCategory
64111 * @param {boolean} sortedForward - sortedForward
64112 * @return {Array} - custom sorted array
64113 */
64114 function sortWithChecks(arr, sortCategory, sortedForward) {
64115 if (typeof sortCategory === 'string') {
64116 return sortedForward ? arr.sort(sortObjectArrayByField(sortCategory)) : arr.sort(sortObjectArrayByField(sortCategory)).reverse();
64117 } else if (Array.isArray(sortCategory)) {
64118 return sortedForward ? arr.sort(sortObjectArrayByNestedDateField(sortCategory[0], sortCategory[1])) : arr.sort(sortObjectArrayByNestedDateField(sortCategory[0], sortCategory[1])).reverse();
64119 }
64120 }
64121
64122 /**
64123 * Processes the commits to the bar chart's format
64124 * @param {Array} commits - commits
64125 * @return {{labels: Array, datasets: *[]}} - object that describes the bar chart
64126 */
64127 var processCommitsBar = exports.processCommitsBar = function processCommitsBar(commits) {
64128 var updaters = {};
64129
64130 commits.forEach(function (commit) {
64131 if (updaters[commit.updater[0]]) {
64132 updaters[commit.updater[0]] += 1;
64133 } else {
64134 updaters[commit.updater[0]] = 1;
64135 }
64136 });
64137
64138 var randomColor = getRandomColorHex(),
64139 labels = [],
64140 data = [];
64141
64142 Object.keys(updaters).forEach(function (updater) {
64143 labels.push(updater);
64144 data.push(updaters[updater]);
64145 });
64146
64147 return {
64148 labels: labels,
64149 datasets: [{
64150 fillColor: convertHexToRGBA(randomColor, 20),
64151 strokeColor: convertHexToRGBA(randomColor, 100),
64152 pointColor: convertHexToRGBA(randomColor, 100),
64153 pointStrokeColor: shadeColor(randomColor, 50),
64154 pointHighlightFill: shadeColor(randomColor, 50),
64155 pointHighlightStroke: convertHexToRGBA(randomColor, 100),
64156 data: data
64157 }]
64158 };
64159 };
64160
64161 /**
64162 * Old processing for all projects (DEPRECATED)
64163 * @param {Array} commits - commits
64164 * @param {string} userId - userId
64165 * @param {Number} display - 1 for total, 2 for only user
64166 * @return {{labels: Array, datasets: Array}} projects linechart data
64167 */
64168 var processProjectsCommitsLine = exports.processProjectsCommitsLine = function processProjectsCommitsLine(commits, userId, display) {
64169 var timesCommitted = {};
64170 Object.keys(commits).forEach(function (projectName) {
64171
64172 var filteredCommits = commits[projectName];
64173 // If requested, only the ones the user committed
64174 if (display === 2) {
64175 filteredCommits = filteredCommits.filter(function (eachCommit) {
64176 return eachCommit.updater.indexOf(userId) !== -1;
64177 });
64178 }
64179
64180 timesCommitted[projectName] = filteredCommits.map(function (oneCommit) {
64181 return oneCommit.time;
64182 });
64183 });
64184
64185 // Processing times
64186 var datasets = [];
64187 Object.keys(timesCommitted).forEach(function (projectName) {
64188 timesCommitted[projectName].sort();
64189 var eachProjectData = Array(7).fill(0),
64190 // TODO: extend this to be flexible with user selected timeframe
64191 timeNow = new Date().getTime(),
64192 millisecondsInADay = 60 * 60 * 24 * 1000,
64193 bounds = [];
64194 for (var i = 7; i >= 0; i--) {
64195 bounds.push(timeNow - i * millisecondsInADay);
64196 }
64197
64198 var index = 0,
64199 boundsIndex = 0;
64200 while (index < timesCommitted[projectName].length && boundsIndex < bounds.length) {
64201 if (timesCommitted[projectName][index] >= bounds[boundsIndex] && timesCommitted[projectName][index] < bounds[boundsIndex + 1]) {
64202 eachProjectData[boundsIndex] += 1;
64203 index++;
64204 } else if (timesCommitted[projectName][index] < bounds[boundsIndex]) {
64205 index++;
64206 } else {
64207 boundsIndex++;
64208 }
64209 }
64210
64211 var randomColor = getRandomColorHex();
64212 datasets.push({
64213 label: projectName, // this is the name of the project
64214 fillColor: convertHexToRGBA(randomColor, 20),
64215 strokeColor: convertHexToRGBA(randomColor, 100),
64216 pointColor: convertHexToRGBA(randomColor, 100),
64217 pointStrokeColor: shadeColor(randomColor, 50), // Lightened because its the shading
64218 pointHighlightFill: shadeColor(randomColor, 50), // Lightened because its the shading
64219 pointHighlightStroke: convertHexToRGBA(randomColor, 100),
64220 data: eachProjectData
64221 });
64222 });
64223
64224 return {
64225 labels: getPastWeeksDays(),
64226 datasets: datasets
64227 };
64228 };
64229
64230 /**
64231 * Helper function to get index into processProjectsCommitsLine's dataset time array
64232 * Note: it is already checked as to whether it is within the selected timeframe (It will be in a partition)
64233 * @param {number} time - time to be classified
64234 * @param {Number } now - now in milliseconds from epoch
64235 * @param {number} partitionSize - size of each partition in milliseconds (Ex. 60 * 60 * 24 * 1000 for a day)
64236 * @param {number} numPartitions - number of partitions: (Ex. over past week = 7)
64237 * @return {number} - index into time array of commit counts
64238 */
64239 var getIndexIntoTimeArray = function getIndexIntoTimeArray(time, now, partitionSize, numPartitions) {
64240 var difference = now - time;
64241 // Needs integer division
64242 var index = numPartitions - 1 - Math.floor(difference / partitionSize);
64243
64244 return index;
64245 };
64246
64247 /**
64248 * Helper to get default state for commit line chart
64249 * @param {Number} numPartitions - number of partitions
64250 * @return {Array} default data
64251 */
64252 var getDefaultDataset = exports.getDefaultDataset = function getDefaultDataset(numPartitions) {
64253 var randomColor = getRandomColorHex();
64254 return [{
64255 label: 'None',
64256 fillColor: convertHexToRGBA(randomColor, 20),
64257 strokeColor: convertHexToRGBA(randomColor, 100),
64258 pointColor: convertHexToRGBA(randomColor, 100),
64259 pointStrokeColor: shadeColor(randomColor, 50), // Lightened because its the shading
64260 pointHighlightFill: shadeColor(randomColor, 50), // Lightened because its the shading
64261 pointHighlightStroke: convertHexToRGBA(randomColor, 100),
64262 data: Array(numPartitions).fill(0)
64263 }];
64264 };
64265
64266 /**
64267 * Helper to get default state for commit doughnut chart
64268 * @return {Array} default doughnut chart data
64269 */
64270 var getDefaultDoughnutData = exports.getDefaultDoughnutData = function getDefaultDoughnutData() {
64271 var randomColor = getRandomColorHex();
64272 return [{
64273 label: 'No commits available',
64274 value: 1,
64275 color: randomColor,
64276 highlight: shadeColor(randomColor, 20)
64277 }];
64278 };
64279
64280 // TODO: allow users to change timeframe (Right now only for the past week)
64281 /**
64282 * Commit processing for an individual project
64283 * @param {Array} commits - commits
64284 * @return {{labels: Array, datasets: Array}} (Structure of react-chartjs)
64285 */
64286 var processProjectCommitsLine = exports.processProjectCommitsLine = function processProjectCommitsLine(commits) {
64287 // Map userIds to an array of commit counts
64288 var userIdToCommitCount = {},
64289 now = new Date().getTime(),
64290 millisecondsInADay = 60 * 60 * 24 * 1000,
64291 millisecondsInAWeek = millisecondsInADay * 7,
64292 numPartitions = 7;
64293
64294 commits.filter(function (commit) {
64295 return commit.time >= now - millisecondsInAWeek;
64296 }).forEach(function (commit) {
64297 if (userIdToCommitCount[commit.updater[0]]) {
64298 userIdToCommitCount[commit.updater[0]][getIndexIntoTimeArray(commit.time, now, millisecondsInADay, numPartitions)]++; // eslint-disable-line max-len
64299 } else {
64300 userIdToCommitCount[commit.updater[0]] = Array(numPartitions).fill(0);
64301 }
64302 });
64303
64304 var datasets = [];
64305 Object.keys(userIdToCommitCount).forEach(function (userId) {
64306 var randomColor = getRandomColorHex();
64307 datasets.push({
64308 label: userId,
64309 fillColor: convertHexToRGBA(randomColor, 20),
64310 strokeColor: convertHexToRGBA(randomColor, 100),
64311 pointColor: convertHexToRGBA(randomColor, 100),
64312 pointStrokeColor: shadeColor(randomColor, 50), // Lightened because its the shading
64313 pointHighlightFill: shadeColor(randomColor, 50), // Lightened because its the shading
64314 pointHighlightStroke: convertHexToRGBA(randomColor, 100),
64315 data: userIdToCommitCount[userId]
64316 });
64317 });
64318
64319 return {
64320 labels: getPastWeeksDays(),
64321 datasets: datasets.length > 0 ? datasets : getDefaultDataset(numPartitions)
64322 };
64323 };
64324
64325 /**
64326 * Helper to process commits for the doughnut chart data
64327 * @param {Array} commits - commits
64328 * @return {Array} Doughnut data if valid - else default "No commit" data
64329 */
64330 var processProjectCommitsDoughnut = exports.processProjectCommitsDoughnut = function processProjectCommitsDoughnut(commits) {
64331 var userIdToCommitCount = {};
64332
64333 commits.forEach(function (commit) {
64334 if (userIdToCommitCount[commit.updater[0]]) {
64335 userIdToCommitCount[commit.updater[0]]++;
64336 } else {
64337 userIdToCommitCount[commit.updater[0]] = 1;
64338 }
64339 });
64340
64341 var data = [];
64342 Object.keys(userIdToCommitCount).forEach(function (userId) {
64343 var randomColor = getRandomColorHex();
64344 data.push({
64345 label: userId,
64346 value: userIdToCommitCount[userId],
64347 color: randomColor,
64348 highlight: shadeColor(randomColor, 20)
64349 });
64350 });
64351
64352 return data.length ? data : getDefaultDoughnutData();
64353 };
64354
64355 /**
64356 * Gets the image URI for a user's icon
64357 * @param {string} userId - userId to be used as the randomized seed
64358 * @return {string} - image source
64359 */
64360 var getUserIconSource = exports.getUserIconSource = function getUserIconSource(userId) {
64361 var icon;
64362 if (userId) {
64363 icon = (0, _blockies2.default)({ // All options are optional
64364 seed: userId, // seed used to generate icon data, default: random
64365 // color: '#dfe', // to manually specify the icon color, default: random
64366 // bgcolor: '#aaa', // choose a different background color, default: random
64367 size: 6, // width/height of the icon in blocks, default: 8
64368 scale: 8 // width/height of each block in pixels, default: 4
64369 // spotcolor: '#000' // each pixel has a 13% chance of being of a third color,
64370 // default: random. Set to -1 to disable it. These "spots" create structures
64371 // that look like eyes, mouths and noses.
64372 });
64373 } else {
64374 icon = document.createElement('canvas');
64375 icon.width = icon.height = 6 * 8;
64376 }
64377
64378 return icon.toDataURL();
64379 };
64380
64381/***/ },
64382/* 659 */
64383/***/ function(module, exports) {
64384
64385 module.exports=function(){function r(r){for(var t=0;t<l.length;t++)l[t]=0;for(var t=0;t<r.length;t++)l[t%4]=(l[t%4]<<5)-l[t%4]+r.charCodeAt(t)}function t(){var r=l[0]^l[0]<<11;return l[0]=l[1],l[1]=l[2],l[2]=l[3],l[3]=l[3]^l[3]>>19^r^r>>8,(l[3]>>>0)/(1<<31>>>0)}function e(){var r=Math.floor(360*t()),e=60*t()+40+"%",o=25*(t()+t()+t()+t())+"%",n="hsl("+r+","+e+","+o+")";return n}function o(r){for(var e=r,o=r,n=Math.ceil(e/2),a=e-n,l=[],f=0;o>f;f++){for(var h=[],c=0;n>c;c++)h[c]=Math.floor(2.3*t());var i=h.slice(0,a);i.reverse(),h=h.concat(i);for(var v=0;v<h.length;v++)l.push(h[v])}return l}function n(r,t,e,o,n){var a=document.createElement("canvas"),l=Math.sqrt(r.length);a.width=a.height=l*e;var f=a.getContext("2d");f.fillStyle=o,f.fillRect(0,0,a.width,a.height),f.fillStyle=t;for(var h=0;h<r.length;h++){var c=Math.floor(h/l),i=h%l;f.fillStyle=1==r[h]?t:n,r[h]&&f.fillRect(i*e,c*e,e,e)}return a}function a(t){t=t||{};var a=t.size||8,l=t.scale||4,f=t.seed||Math.floor(Math.random()*Math.pow(10,16)).toString(16);r(f);var h=t.color||e(),c=t.bgcolor||e(),i=t.spotcolor||e(),v=o(a),u=n(v,h,l,c,i);return u}var l=Array(4);return a}();
64386
64387/***/ },
64388/* 660 */
64389/***/ function(module, exports) {
64390
64391 'use strict';
64392
64393 Object.defineProperty(exports, "__esModule", {
64394 value: true
64395 });
64396 /**
64397 * Hold constants
64398 * @author patrickkerrypei / https://github.com/patrickkerrypei
64399 */
64400
64401 // Theme colors:
64402 var THEME_COLORS = exports.THEME_COLORS = {
64403 blue: 'rgb(60, 141, 188)',
64404 green: 'rgb(0, 166, 90)',
64405 purple: 'rgb(96, 92, 168)',
64406 red: 'rgb(221, 75, 57)',
64407 yellow: 'rgb(243, 156, 18)'
64408 };
64409
64410 var DEFAULT_DATE = new Date(1447879297957);
64411
64412 var DEFAULT_ISODATE = exports.DEFAULT_ISODATE = DEFAULT_DATE.toISOString();
64413
64414 var TABLE_FIELDS = exports.TABLE_FIELDS = {
64415 organizationMembers: {
64416 User: 'name',
64417 Admin: 'isAdmin'
64418 },
64419 organizations: {
64420 "Organization Name": "name"
64421 },
64422 projectUser: {
64423 Access: "rights",
64424 User: "name"
64425 },
64426 projectOrg: {
64427 Organization: "name",
64428 Access: "rights"
64429 },
64430 projects: {
64431 "Created At": ["info", "createdAt"],
64432 "Last Changed": ["info", "modifiedAt"],
64433 "Last Viewed": ["info", "viewedAt"],
64434 "Owner": "owner",
64435 "Project Name": "name"
64436 },
64437 users: {
64438 User: "_id"
64439 }
64440 };
64441
64442/***/ },
64443/* 661 */
64444/***/ function(module, exports, __webpack_require__) {
64445
64446 'use strict';
64447
64448 Object.defineProperty(exports, "__esModule", {
64449 value: true
64450 });
64451 exports.setThemeColor = exports.fetchUserIfNeeded = exports.fetchUser = exports.receiveUser = exports.requestUser = exports.SET_COLOR_THEME = exports.RECEIVE_USER = exports.REQUEST_USER_SUCCESS = exports.REQUEST_USER_FAILURE = exports.REQUEST_USER = undefined;
64452
64453 var _userClient = __webpack_require__(662);
64454
64455 var _userClient2 = _interopRequireDefault(_userClient);
64456
64457 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64458
64459 var userClient = new _userClient2.default(); /**
64460 * User actions
64461 * @author patrickkerrypei / https://github.com/patrickkerrypei
64462 */
64463
64464 // Self-defined
64465 var REQUEST_USER = exports.REQUEST_USER = 'REQUEST_USER';
64466 var REQUEST_USER_FAILURE = exports.REQUEST_USER_FAILURE = 'REQUEST_USER_FAILURE';
64467 var REQUEST_USER_SUCCESS = exports.REQUEST_USER_SUCCESS = 'REQUEST_USER_SUCCESS';
64468 var RECEIVE_USER = exports.RECEIVE_USER = 'RECEIVE_USER';
64469
64470 var SET_COLOR_THEME = exports.SET_COLOR_THEME = 'SET_COLOR_THEME';
64471
64472 var requestUser = exports.requestUser = function requestUser() {
64473 return {
64474 type: REQUEST_USER
64475 };
64476 };
64477
64478 var receiveUser = exports.receiveUser = function receiveUser(user) {
64479 return {
64480 type: RECEIVE_USER,
64481 user: user
64482 };
64483 };
64484
64485 var shouldFetchUser = function shouldFetchUser(state) {
64486 var _state$user = state.user;
64487 var hasFetched = _state$user.hasFetched;
64488 var isFetching = _state$user.isFetching;
64489
64490
64491 var shouldFetch = true;
64492 if (hasFetched || isFetching) {
64493 shouldFetch = false;
64494 }
64495
64496 return shouldFetch;
64497 };
64498
64499 var fetchUser = exports.fetchUser = function fetchUser() {
64500 return function (dispatch) {
64501 dispatch(requestUser());
64502 return userClient.getCurrentUser().then(function (user) {
64503 dispatch(receiveUser(user));
64504 });
64505 };
64506 };
64507
64508 var fetchUserIfNeeded = exports.fetchUserIfNeeded = function fetchUserIfNeeded() {
64509 return function (dispatch, getState) {
64510 if (shouldFetchUser(getState())) {
64511 return dispatch(fetchUser());
64512 }
64513 };
64514 };
64515
64516 var setThemeColor = exports.setThemeColor = function setThemeColor(themeColor) {
64517 return function (dispatch) {
64518 return userClient.updateCurrentUserSettings({
64519 themeColor: themeColor
64520 }, 'WebGMEProfilePage').then(function () {
64521 dispatch(fetchUser());
64522 });
64523 };
64524 };
64525
64526/***/ },
64527/* 662 */
64528/***/ function(module, exports, __webpack_require__) {
64529
64530 'use strict';
64531
64532 Object.defineProperty(exports, "__esModule", {
64533 value: true
64534 });
64535
64536 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; }; }();
64537
64538 var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
64539
64540 var _baseClient = __webpack_require__(326);
64541
64542 var _baseClient2 = _interopRequireDefault(_baseClient);
64543
64544 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64545
64546 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64547
64548 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; }
64549
64550 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; } /**
64551 * User client - all rest calls for api/user
64552 * @author patrickkerrypei / https://github.com/patrickkerrypei
64553 */
64554
64555 var UserClient = function (_BaseClient) {
64556 _inherits(UserClient, _BaseClient);
64557
64558 function UserClient() {
64559 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/';
64560
64561 _classCallCheck(this, UserClient);
64562
64563 return _possibleConstructorReturn(this, (UserClient.__proto__ || Object.getPrototypeOf(UserClient)).call(this, baseUrl));
64564 }
64565
64566 /**
64567 * Gets the current user
64568 * @return {Promise} //TODO: How to document the resolved value.
64569 */
64570
64571
64572 _createClass(UserClient, [{
64573 key: 'getCurrentUser',
64574 value: function getCurrentUser() {
64575 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'get', this).call(this, ['user']);
64576 }
64577
64578 /**
64579 * TODO: WebGme needs API doc update on patch requests for user (currently exists in the implementation)
64580 * @param {object} parameters - Specifies the user info to be updated
64581 * @param {string} parameters.email - New user email
64582 * @param {string} parameters.password - New user password
64583 * @param {boolean} parameters.canCreate - Boolean to indicate whether or not a user can create
64584 * @param {boolean} parameters.siteAdmin - Boolean to indicate whether or not a user is site admin
64585 * @param {object} parameters.data - New user data
64586 * @param {object} parameters.settings - New user settings
64587 * @return {Promise} //TODO: How to document the resolved value.
64588 */
64589
64590 }, {
64591 key: 'updateCurrentUser',
64592 value: function updateCurrentUser(parameters) {
64593 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'patch', this).call(this, ['user'], parameters);
64594 }
64595
64596 /**
64597 * Deletes the current user
64598 * @return {Promise} //TODO: How to document the resolved value.
64599 */
64600
64601 }, {
64602 key: 'deleteCurrentUser',
64603 value: function deleteCurrentUser() {
64604 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'delete', this).call(this, ['user']);
64605 }
64606
64607 /**
64608 * Gets the current user's data
64609 * @return {Promise} //TODO: How to document the resolved value.
64610 */
64611
64612 }, {
64613 key: 'getCurrentUserData',
64614 value: function getCurrentUserData() {
64615 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'get', this).call(this, ['user', 'data']);
64616 }
64617
64618 /**
64619 * Sets the current user's data
64620 * @param {object} value - The new user data
64621 * @return {Promise} //TODO: How to document the resolved value.
64622 */
64623
64624 }, {
64625 key: 'setCurrentUserData',
64626 value: function setCurrentUserData(value) {
64627 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'put', this).call(this, ['user', 'data'], value);
64628 }
64629
64630 /**
64631 * Updates the current user's data
64632 * @param {object} value - The updated user data
64633 * @return {Promise} //TODO: How to document the resolved value.
64634 */
64635
64636 }, {
64637 key: 'updateCurrentUserData',
64638 value: function updateCurrentUserData(value) {
64639 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'patch', this).call(this, ['user', 'data'], value);
64640 }
64641
64642 /**
64643 * Deletes the current user's data
64644 * @return {Promise} //TODO: How to document the resolved value.
64645 */
64646
64647 }, {
64648 key: 'deleteCurrentUserData',
64649 value: function deleteCurrentUserData() {
64650 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'delete', this).call(this, ['user', 'data']);
64651 }
64652 }, {
64653 key: 'getCurrentUserSettings',
64654 value: function getCurrentUserSettings(componentId) {
64655 var path = componentId ? ['user', 'settings', componentId] : ['user', 'settings'];
64656
64657 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'get', this).call(this, path);
64658 }
64659 }, {
64660 key: 'setCurrentUserSettings',
64661 value: function setCurrentUserSettings(value, componentId) {
64662 var path = componentId ? ['user', 'settings', componentId] : ['user', 'settings'];
64663
64664 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'put', this).call(this, path, value);
64665 }
64666 }, {
64667 key: 'updateCurrentUserSettings',
64668 value: function updateCurrentUserSettings(value, componentId) {
64669 var path = componentId ? ['user', 'settings', componentId] : ['user', 'settings'];
64670
64671 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'patch', this).call(this, path, value);
64672 }
64673 }, {
64674 key: 'deleteCurrentUserSettings',
64675 value: function deleteCurrentUserSettings(componentId) {
64676 var path = componentId ? ['user', 'settings', componentId] : ['user', 'settings'];
64677
64678 return _get(UserClient.prototype.__proto__ || Object.getPrototypeOf(UserClient.prototype), 'delete', this).call(this, path);
64679 }
64680 }]);
64681
64682 return UserClient;
64683 }(_baseClient2.default);
64684
64685 exports.default = UserClient;
64686
64687/***/ },
64688/* 663 */
64689/***/ function(module, exports, __webpack_require__) {
64690
64691 'use strict';
64692
64693 Object.defineProperty(exports, "__esModule", {
64694 value: true
64695 });
64696
64697 var _reactRedux = __webpack_require__(629);
64698
64699 var _Refresh = __webpack_require__(664);
64700
64701 var _Refresh2 = _interopRequireDefault(_Refresh);
64702
64703 var _user = __webpack_require__(661);
64704
64705 var _users = __webpack_require__(665);
64706
64707 var _projects = __webpack_require__(667);
64708
64709 var _organizations = __webpack_require__(669);
64710
64711 var _tables = __webpack_require__(671);
64712
64713 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64714
64715 // Self-defined
64716 var actions = [_user.fetchUser, _users.fetchUsers, _projects.fetchProjects, _organizations.fetchOrganizations, _tables.refreshTables]; /* global window */
64717
64718 /**
64719 * Refresh container
64720 * @author patrickkerrypei / https://github.com/patrickkerrypei
64721 */
64722
64723 // Libraries
64724
64725
64726 var mapDispatchToProps = function mapDispatchToProps(dispatch) {
64727 return {
64728 refresh: function refresh(event) {
64729 // Release focus
64730 event.target.blur();
64731
64732 actions.forEach(function (action) {
64733 dispatch(action());
64734 });
64735
64736 // Refresh the commits if in singular project page
64737 var pathname = window.location.pathname;
64738
64739 if (/projects\/\S+\/\S+$/.test(pathname)) {
64740 var pathParams = pathname.split('/');
64741 var projectName = pathParams.pop();
64742 var ownerId = pathParams.pop();
64743 dispatch((0, _projects.fetchCommits)(ownerId, projectName));
64744 }
64745 }
64746 };
64747 };
64748
64749 exports.default = (0, _reactRedux.connect)(null, mapDispatchToProps)(_Refresh2.default);
64750
64751/***/ },
64752/* 664 */
64753/***/ function(module, exports, __webpack_require__) {
64754
64755 "use strict";
64756
64757 Object.defineProperty(exports, "__esModule", {
64758 value: true
64759 });
64760
64761 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; }; }();
64762
64763 var _react = __webpack_require__(89);
64764
64765 var _react2 = _interopRequireDefault(_react);
64766
64767 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64768
64769 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64770
64771 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; }
64772
64773 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; } /**
64774 * Refresh component
64775 * @author patrickkerrypei / https://github.com/patrickkerrypei
64776 */
64777
64778 var Refresh = function (_Component) {
64779 _inherits(Refresh, _Component);
64780
64781 function Refresh() {
64782 _classCallCheck(this, Refresh);
64783
64784 return _possibleConstructorReturn(this, (Refresh.__proto__ || Object.getPrototypeOf(Refresh)).apply(this, arguments));
64785 }
64786
64787 _createClass(Refresh, [{
64788 key: "render",
64789 value: function render() {
64790 var refresh = this.props.refresh;
64791
64792
64793 return _react2.default.createElement(
64794 "li",
64795 { className: "nondropdown settings-menu", onClick: refresh },
64796 _react2.default.createElement(
64797 "a",
64798 { href: "#", "data-toggle": "control-sidebar" },
64799 _react2.default.createElement("i", { className: "fa fa-refresh", style: { pointerEvents: "none" } })
64800 )
64801 );
64802 }
64803 }]);
64804
64805 return Refresh;
64806 }(_react.Component);
64807
64808 exports.default = Refresh;
64809
64810/***/ },
64811/* 665 */
64812/***/ function(module, exports, __webpack_require__) {
64813
64814 'use strict';
64815
64816 Object.defineProperty(exports, "__esModule", {
64817 value: true
64818 });
64819 exports.fetchUsersIfNeeded = exports.fetchUsers = exports.receiveUsers = exports.requestUsers = exports.RECEIVE_USERS = exports.REQUEST_USERS_SUCCESS = exports.REQUEST_USERS_FAILURE = exports.REQUEST_USERS = undefined;
64820
64821 var _usersClient = __webpack_require__(666);
64822
64823 var _usersClient2 = _interopRequireDefault(_usersClient);
64824
64825 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64826
64827 var usersClient = new _usersClient2.default(); /**
64828 * Users actions
64829 * @author patrickkerrypei / https://github.com/patrickkerrypei
64830 */
64831
64832 // Self-defined
64833 var REQUEST_USERS = exports.REQUEST_USERS = 'REQUEST_USERS';
64834 var REQUEST_USERS_FAILURE = exports.REQUEST_USERS_FAILURE = 'REQUEST_USERS_FAILURE';
64835 var REQUEST_USERS_SUCCESS = exports.REQUEST_USERS_SUCCESS = 'REQUEST_USERS_SUCCESS';
64836 var RECEIVE_USERS = exports.RECEIVE_USERS = 'RECEIVE_USERS';
64837
64838 var requestUsers = exports.requestUsers = function requestUsers() {
64839 return {
64840 type: REQUEST_USERS
64841 };
64842 };
64843
64844 var receiveUsers = exports.receiveUsers = function receiveUsers(users) {
64845 return {
64846 type: RECEIVE_USERS,
64847 users: users
64848 };
64849 };
64850
64851 var shouldFetchUsers = function shouldFetchUsers(state) {
64852 var _state$users = state.users;
64853 var hasFetched = _state$users.hasFetched;
64854 var isFetching = _state$users.isFetching;
64855
64856
64857 var shouldFetch = true;
64858 if (hasFetched || isFetching) {
64859 shouldFetch = false;
64860 }
64861
64862 return shouldFetch;
64863 };
64864
64865 var fetchUsers = exports.fetchUsers = function fetchUsers() {
64866 return function (dispatch) {
64867 dispatch(requestUsers());
64868 return usersClient.getAllUsers(true).then(function (users) {
64869 dispatch(receiveUsers(users));
64870 });
64871 };
64872 };
64873
64874 var fetchUsersIfNeeded = exports.fetchUsersIfNeeded = function fetchUsersIfNeeded() {
64875 return function (dispatch, getState) {
64876 if (shouldFetchUsers(getState())) {
64877 return dispatch(fetchUsers());
64878 }
64879 };
64880 };
64881
64882/***/ },
64883/* 666 */
64884/***/ function(module, exports, __webpack_require__) {
64885
64886 'use strict';
64887
64888 Object.defineProperty(exports, "__esModule", {
64889 value: true
64890 });
64891
64892 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; }; }();
64893
64894 var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
64895
64896 var _baseClient = __webpack_require__(326);
64897
64898 var _baseClient2 = _interopRequireDefault(_baseClient);
64899
64900 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
64901
64902 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
64903
64904 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; }
64905
64906 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; } /**
64907 * Users client - all rest calls for api/users
64908 * @author patrickkerrypei / https://github.com/patrickkerrypei
64909 */
64910
64911 var UsersClient = function (_BaseClient) {
64912 _inherits(UsersClient, _BaseClient);
64913
64914 function UsersClient() {
64915 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/';
64916
64917 _classCallCheck(this, UsersClient);
64918
64919 return _possibleConstructorReturn(this, (UsersClient.__proto__ || Object.getPrototypeOf(UsersClient)).call(this, baseUrl));
64920 }
64921
64922 /**
64923 * Gets all the users on the server
64924 * @param {boolean} [includeDisabled=false] - include the disabled users.
64925 * @return {Promise} //TODO: How to document the resolved value.
64926 */
64927
64928
64929 _createClass(UsersClient, [{
64930 key: 'getAllUsers',
64931 value: function getAllUsers(includeDisabled) {
64932 var query = includeDisabled ? { includeDisabled: true } : null;
64933 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'get', this).call(this, ['users'], query);
64934 }
64935
64936 /**
64937 * Gets specific user by username
64938 * @param {string} username - username of user requested
64939 * @return {Promise} //TODO: How to document the resolved value.
64940 */
64941
64942 }, {
64943 key: 'getUser',
64944 value: function getUser(username) {
64945 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'get', this).call(this, ['users', username]);
64946 }
64947
64948 /**
64949 * Adds a user (Requires user.siteAdmin)
64950 * @param {string} username - username of user to be created
64951 * @param {object} userObj - contains info of the new user
64952 * @return {Promise} //TODO: How to document the resolved value.
64953 */
64954
64955 }, {
64956 key: 'addUser',
64957 value: function addUser(username, userObj) {
64958 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'put', this).call(this, ['users', username], userObj);
64959 }
64960
64961 /**
64962 * @param {string} username - username of user to be updated
64963 * @param {object} userObj - info of user that needs updating
64964 * @return {Promise} //TODO: How to document the resolved value.
64965 */
64966
64967 }, {
64968 key: 'updateUser',
64969 value: function updateUser(username, userObj) {
64970 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'patch', this).call(this, ['users', username], userObj);
64971 }
64972
64973 /**
64974 * Deletes the user specified (requires is current user or user.siteAdmin)
64975 * @param {string} username - username of user to be deleted
64976 * @param {boolean} [force] - if true will remove the user from the database.
64977 * @return {Promise} //TODO: How to document the resolved value.
64978 */
64979
64980 }, {
64981 key: 'deleteUser',
64982 value: function deleteUser(username, force) {
64983 var query = force ? { force: true } : null;
64984
64985 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'delete', this).call(this, ['users', username], query);
64986 }
64987
64988 /**
64989 * Gets the data of specified user
64990 * @param {string} username - username of user whose data is being requested
64991 * @return {Promise} //TODO: How to document the resolved value.
64992 */
64993
64994 }, {
64995 key: 'getUserData',
64996 value: function getUserData(username) {
64997 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'get', this).call(this, ['users', username, 'data']);
64998 }
64999
65000 /**
65001 * Sets the specified user's data
65002 * @param {string} username - name of user whose data is being set
65003 * @param {object} userData - the created data
65004 * @return {Promise} //TODO: How to document the resolved value.
65005 */
65006
65007 }, {
65008 key: 'setUserData',
65009 value: function setUserData(username, userData) {
65010 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'put', this).call(this, ['users', username, 'data'], userData);
65011 }
65012
65013 /**
65014 * Updates the specified user's data
65015 * @param {string} username - name of user whose data is being updated
65016 * @param {object} userData - the new data
65017 * @return {Promise} //TODO: How to document the resolved value.
65018 */
65019
65020 }, {
65021 key: 'updateUserData',
65022 value: function updateUserData(username, userData) {
65023 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'patch', this).call(this, ['users', username, 'data'], userData);
65024 }
65025
65026 /**
65027 * Deletes the specified user's data
65028 * @param {string} username - username of user whose data is being deleted
65029 * @return {Promise} //TODO: How to document the resolved value.
65030 */
65031
65032 }, {
65033 key: 'deleteUserData',
65034 value: function deleteUserData(username) {
65035 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'delete', this).call(this, ['users', username, 'data']);
65036 }
65037 }, {
65038 key: 'getUserSettings',
65039 value: function getUserSettings(username, componentId) {
65040 var path = componentId ? ['users', username, 'settings', componentId] : ['users', username, 'settings'];
65041
65042 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'get', this).call(this, path);
65043 }
65044 }, {
65045 key: 'setUserSettings',
65046 value: function setUserSettings(username, value, componentId) {
65047 var path = componentId ? ['users', username, 'settings', componentId] : ['users', username, 'settings'];
65048
65049 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'put', this).call(this, path, value);
65050 }
65051 }, {
65052 key: 'updateUserSettings',
65053 value: function updateUserSettings(value, componentId) {
65054 var path = componentId ? ['users', username, 'settings', componentId] : ['users', username, 'settings'];
65055
65056 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'patch', this).call(this, path, value);
65057 }
65058 }, {
65059 key: 'deleteUserSettings',
65060 value: function deleteUserSettings(componentId) {
65061 var path = componentId ? ['users', username, 'settings', componentId] : ['users', username, 'settings'];
65062
65063 return _get(UsersClient.prototype.__proto__ || Object.getPrototypeOf(UsersClient.prototype), 'delete', this).call(this, path);
65064 }
65065 }]);
65066
65067 return UsersClient;
65068 }(_baseClient2.default);
65069
65070 exports.default = UsersClient;
65071
65072/***/ },
65073/* 667 */
65074/***/ function(module, exports, __webpack_require__) {
65075
65076 'use strict';
65077
65078 Object.defineProperty(exports, "__esModule", {
65079 value: true
65080 });
65081 exports.fetchCommitsIfNeeded = exports.fetchCommits = exports.receiveCommits = exports.requestCommits = exports.fetchProjectsIfNeeded = exports.fetchProjects = exports.receiveProjects = exports.requestProjects = exports.RECEIVE_COMMITS = exports.REQUEST_COMMITS_SUCCESS = exports.REQUEST_COMMITS_FAILURE = exports.REQUEST_COMMITS = exports.RECEIVE_PROJECTS = exports.REQUEST_PROJECTS_SUCCESS = exports.REQUEST_PROJECTS_FAILURE = exports.REQUEST_PROJECTS = undefined;
65082
65083 var _projectsClient = __webpack_require__(668);
65084
65085 var _projectsClient2 = _interopRequireDefault(_projectsClient);
65086
65087 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65088
65089 var projectsClient = new _projectsClient2.default(); /**
65090 * Projects actions
65091 * @author patrickkerrypei / https://github.com/patrickkerrypei
65092 */
65093
65094 // Self-defined
65095 var REQUEST_PROJECTS = exports.REQUEST_PROJECTS = 'REQUEST_PROJECTS';
65096 var REQUEST_PROJECTS_FAILURE = exports.REQUEST_PROJECTS_FAILURE = 'REQUEST_PROJECTS_FAILURE';
65097 var REQUEST_PROJECTS_SUCCESS = exports.REQUEST_PROJECTS_SUCCESS = 'REQUEST_PROJECTS_SUCCESS';
65098 var RECEIVE_PROJECTS = exports.RECEIVE_PROJECTS = 'RECEIVE_PROJECTS';
65099
65100 var REQUEST_COMMITS = exports.REQUEST_COMMITS = 'REQUEST_COMMITS';
65101 var REQUEST_COMMITS_FAILURE = exports.REQUEST_COMMITS_FAILURE = 'REQUEST_COMMITS_FAILURE';
65102 var REQUEST_COMMITS_SUCCESS = exports.REQUEST_COMMITS_SUCCESS = 'REQUEST_COMMITS_SUCCESS';
65103 var RECEIVE_COMMITS = exports.RECEIVE_COMMITS = 'RECEIVE_COMMITS';
65104
65105 var requestProjects = exports.requestProjects = function requestProjects() {
65106 return {
65107 type: REQUEST_PROJECTS
65108 };
65109 };
65110
65111 var receiveProjects = exports.receiveProjects = function receiveProjects(projects) {
65112 return {
65113 type: RECEIVE_PROJECTS,
65114 projects: projects
65115 };
65116 };
65117
65118 var shouldFetchProjects = function shouldFetchProjects(state) {
65119 var _state$projects = state.projects;
65120 var hasFetched = _state$projects.hasFetched;
65121 var isFetching = _state$projects.isFetching;
65122
65123
65124 var shouldFetch = true;
65125 if (hasFetched || isFetching) {
65126 shouldFetch = false;
65127 }
65128
65129 return shouldFetch;
65130 };
65131
65132 var fetchProjects = exports.fetchProjects = function fetchProjects() {
65133 return function (dispatch) {
65134 dispatch(requestProjects());
65135 return projectsClient.getAllProjects().then(function (projects) {
65136 dispatch(receiveProjects(projects));
65137 });
65138 };
65139 };
65140
65141 var fetchProjectsIfNeeded = exports.fetchProjectsIfNeeded = function fetchProjectsIfNeeded() {
65142 return function (dispatch, getState) {
65143 if (shouldFetchProjects(getState())) {
65144 return dispatch(fetchProjects());
65145 }
65146 };
65147 };
65148
65149 var requestCommits = exports.requestCommits = function requestCommits(ownerId, projectName, numCommits) {
65150 return {
65151 type: REQUEST_COMMITS,
65152 numCommits: numCommits,
65153 ownerId: ownerId,
65154 projectName: projectName
65155 };
65156 };
65157
65158 var receiveCommits = exports.receiveCommits = function receiveCommits(ownerId, projectName, commits) {
65159 return {
65160 type: RECEIVE_COMMITS,
65161 commits: commits,
65162 ownerId: ownerId,
65163 projectName: projectName
65164 };
65165 };
65166
65167 var shouldFetchCommits = function shouldFetchCommits(ownerId, projectName, numCommits, state) {
65168 var _ref = state.projects.commits[ownerId + '+' + projectName] ? state.projects.commits[ownerId + '+' + projectName] : {
65169 commits: [],
65170 hasFetched: false,
65171 isFetching: false
65172 };
65173
65174 var commits = _ref.commits;
65175 var hasFetched = _ref.hasFetched;
65176 var isFetching = _ref.isFetching;
65177
65178
65179 var shouldFetch = true;
65180 if (hasFetched || isFetching || commits.length >= numCommits) {
65181 shouldFetch = false;
65182 }
65183
65184 return shouldFetch;
65185 };
65186
65187 var fetchCommits = exports.fetchCommits = function fetchCommits(ownerId, projectName) {
65188 var numCommits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
65189
65190 return function (dispatch) {
65191 dispatch(requestCommits(ownerId, projectName, numCommits));
65192 return projectsClient.getLatestCommits(ownerId, projectName, numCommits).then(function (commits) {
65193 dispatch(receiveCommits(ownerId, projectName, commits));
65194 });
65195 };
65196 };
65197
65198 var fetchCommitsIfNeeded = exports.fetchCommitsIfNeeded = function fetchCommitsIfNeeded(ownerId, projectName, numCommits) {
65199 return function (dispatch, getState) {
65200 if (shouldFetchCommits(ownerId, projectName, numCommits, getState())) {
65201 return dispatch(fetchCommits(ownerId, projectName, numCommits));
65202 }
65203 };
65204 };
65205
65206/***/ },
65207/* 668 */
65208/***/ function(module, exports, __webpack_require__) {
65209
65210 'use strict';
65211
65212 Object.defineProperty(exports, "__esModule", {
65213 value: true
65214 });
65215
65216 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; }; }();
65217
65218 var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
65219
65220 var _baseClient = __webpack_require__(326);
65221
65222 var _baseClient2 = _interopRequireDefault(_baseClient);
65223
65224 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65225
65226 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
65227
65228 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; }
65229
65230 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; } /**
65231 * Projects client - all rest calls for api/projects
65232 * @author patrickkerrypei / https://github.com/patrickkerrypei
65233 */
65234
65235 var ProjectsClient = function (_BaseClient) {
65236 _inherits(ProjectsClient, _BaseClient);
65237
65238 function ProjectsClient() {
65239 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/';
65240
65241 _classCallCheck(this, ProjectsClient);
65242
65243 return _possibleConstructorReturn(this, (ProjectsClient.__proto__ || Object.getPrototypeOf(ProjectsClient)).call(this, baseUrl));
65244 }
65245
65246 /**
65247 * Gets a list of all the projects (only lists the projects where the user has at least read access)
65248 * @return {Promise} //TODO: How to document the resolved value.
65249 */
65250
65251
65252 _createClass(ProjectsClient, [{
65253 key: 'getAllProjects',
65254 value: function getAllProjects() {
65255 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects']);
65256 }
65257
65258 /**
65259 * Gets specific project
65260 * @param {string} ownerId - id of owner
65261 * @param {string} projectName - name of project
65262 * @return {Promise} //TODO: How to document the resolved value.
65263 */
65264
65265 }, {
65266 key: 'getProject',
65267 value: function getProject(ownerId, projectName) {
65268 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName]);
65269 }
65270
65271 /**
65272 * Creates a new project.
65273 * @param {string} ownerId - owner's Id
65274 * @param {string} projectName - name of project
65275 * @param {object} parameters - Specifies where the seed is coming from. //TODO: WebGME needs to update these!
65276 * @param {string} parameters.type - Which type of seeding should be used.
65277 * @param {string} parameters.seedName - Name of the seed.
65278 * @param {string} parameters.seedBranch - Name of branch if seeding from existing project.
65279 * @param {string} parameters.ownerId - ID of owner
65280 * @return {Promise} //TODO: How to document the resolved value.
65281 */
65282
65283 }, {
65284 key: 'addProject',
65285 value: function addProject(ownerId, projectName, parameters) {
65286 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'put', this).call(this, ['projects', ownerId, projectName], parameters);
65287 }
65288
65289 /**
65290 * Updates the metadata info of a specific project.
65291 * Requires write access (FIXME: webgme should consider to only allow siteAdmins to do this).
65292 * TODO: webgme should consider adding a description field.
65293 * @param {string} ownerId - id of owner
65294 * @param {string} projectName - name of project
65295 * @param {object} info - object containing project info data to be updated.
65296 * @param {string} [info.viewedAt] - Sets the last viewed time.
65297 * @param {string} [info.viewer] - Sets the last user who viewed the project.
65298 * @param {string} [info.modifiedAt] - Sets the last modified time.
65299 * @param {string} [info.modifier] - Sets the last user who modified the project.
65300 * @param {string} [info.createdAt] - Sets the creator of the project.
65301 * @param {string} [info.creator] - Sets the user who created the project.
65302 * @param {string} [info.kind] - Sets the kind of the project.
65303 * @return {Promise} //TODO: How to document the resolved value.
65304 */
65305
65306 }, {
65307 key: 'updateProject',
65308 value: function updateProject(ownerId, projectName, info) {
65309 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'patch', this).call(this, ['projects', ownerId, projectName], info);
65310 }
65311
65312 /**
65313 * Deletes a specific project.
65314 * Requires delete access.
65315 * @param {string} ownerId - id of owner
65316 * @param {string} projectName - name of project
65317 * @return {Promise} //TODO: How to document the resolved value.
65318 */
65319
65320 }, {
65321 key: 'deleteProject',
65322 value: function deleteProject(ownerId, projectName) {
65323 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'delete', this).call(this, ['projects', ownerId, projectName]);
65324 }
65325
65326 /**
65327 * Removes a user or organization's right to a project.
65328 * Requires ownership, admin in org with ownership, or siteAdmin.
65329 * @param {string} ownerId - id of owner
65330 * @param {string} projectName - name of project
65331 * @param {string} userOrOrgId - id of user or org losing rights to project
65332 * @return {Promise} //TODO: How to document the resolved value.
65333 */
65334
65335 }, {
65336 key: 'removeRightsToProject',
65337 value: function removeRightsToProject(ownerId, projectName, userOrOrgId) {
65338 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'delete', this).call(this, ['projects', ownerId, projectName, 'authorize', userOrOrgId]);
65339 }
65340
65341 /**
65342 * Grants a user or organization rights to a project.
65343 * Requires ownership, admin in org with ownership, or siteAdmin.
65344 * @param {string} ownerId - id of owner
65345 * @param {string} projectName - name of project
65346 * @param {string} userOrOrgId - id of user or org gaining rights to project
65347 * @param {string} rights - combination of r,w,d (read, write, delete)
65348 * @return {Promise} //TODO: How to document the resolved value.
65349 */
65350
65351 }, {
65352 key: 'grantRightsToProject',
65353 value: function grantRightsToProject(ownerId, projectName, userOrOrgId, rights) {
65354 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'put', this).call(this, ['projects', ownerId, projectName, 'authorize', userOrOrgId, rights]);
65355 }
65356
65357 /**
65358 * Transfers a project to an organization
65359 * Requires delete access, admin in org other than owner, or siteAdmin.
65360 * @param {string} ownerId - id of owner
65361 * @param {string} projectName - name of project
65362 * @param {string} userOrOrgId - id of org gaining ownership of project
65363 * @return {Promise} //TODO: How to document the resolved value.
65364 */
65365
65366 }, {
65367 key: 'transferProject',
65368 value: function transferProject(ownerId, projectName, userOrOrgId) {
65369 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'post', this).call(this, ['projects', ownerId, projectName, 'transfer', userOrOrgId]);
65370 }
65371
65372 /**
65373 * Gets the latest commits for the project.
65374 * Requires read access.
65375 * @param {string} ownerId - owner's id
65376 * @param {string} projectName = name of project
65377 * @param {number} [numCommits=100] - Maximum number of commits to retrieve.
65378 * @return {Promise} //TODO: How to document the resolved value.
65379 */
65380
65381 }, {
65382 key: 'getLatestCommits',
65383 value: function getLatestCommits(ownerId, projectName) {
65384 var numCommits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
65385
65386 var query = {
65387 n: numCommits
65388 };
65389
65390 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'commits'], query);
65391 }
65392
65393 /**
65394 * Retrieves commit object associated with commitId.
65395 * Requires read access.
65396 * @param {string} ownerId - owner's id
65397 * @param {string} projectName = name of project
65398 * @param {string} commitId - commit hash, with or w/o URL-enconded '#'
65399 * @return {Promise} //TODO: How to document the resolved value.
65400 */
65401
65402 }, {
65403 key: 'getCommitById',
65404 value: function getCommitById(ownerId, projectName, commitId) {
65405 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'commits', commitId]);
65406 }
65407
65408 /**
65409 * Retrieves the raw data object at given path within the project tree. Requires read access for project.
65410 * @param {string} ownerId - owner's id
65411 * @param {string} projectName = name of project
65412 * @param {string} commitId - commit hash, with or w/o URL-enconded '#'
65413 * @param {string} nodePath - path of node: ex. 1563412505/5585498754
65414 * @return {Promise} //TODO: How to document the resolved value.
65415 */
65416
65417 }, {
65418 key: 'getRawDataAtPath',
65419 value: function getRawDataAtPath(ownerId, projectName, commitId, nodePath) {
65420 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'commits', commitId, 'tree', nodePath]);
65421 }
65422
65423 /**
65424 * Compares two branches or commits for a project
65425 * @param {string} ownerId - owner's id
65426 * @param {string} projectName = name of project
65427 * @param {string} branchOrCommitA - branch/commit of one
65428 * @param {string} branchOrCommitB - other branch/commit
65429 * @return {Promise} //TODO: How to document the resolved value.
65430 */
65431
65432 }, {
65433 key: 'getBranchOrCommitComparison',
65434 value: function getBranchOrCommitComparison(ownerId, projectName, branchOrCommitA, branchOrCommitB) {
65435 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'compare', branchOrCommitA, '...', branchOrCommitB]);
65436 }
65437
65438 /**
65439 * Get a list of branches.
65440 * Requires read access.
65441 * @param {string} ownerId - owner's id
65442 * @param {string} projectName = name of project
65443 * @return {Promise} //TODO: How to document the resolved value.
65444 */
65445
65446 }, {
65447 key: 'getAllBranches',
65448 value: function getAllBranches(ownerId, projectName) {
65449 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'branches']);
65450 }
65451
65452 /**
65453 * Get a specific branch. Requires read access for project.
65454 * @param {string} ownerId - owner's id
65455 * @param {string} projectName = name of project
65456 * @param {string} branchId - id of branch: ex. master
65457 * @return {Promise} //TODO: How to document the resolved value.
65458 */
65459
65460 }, {
65461 key: 'getBranch',
65462 value: function getBranch(ownerId, projectName, branchId) {
65463 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'branches', branchId]);
65464 }
65465
65466 /**
65467 * Adds a new branch to WebGME. Requires write access for project.
65468 * @param {string} ownerId - owner's id
65469 * @param {string} projectName = name of project
65470 * @param {string} branchId - id of branch: ex. master
65471 * @param {object} branchObj - ex: {"hash": "#f2a624d9cfbf883c927b04dd45800ba55537dff5"}
65472 * @return {Promise} //TODO: How to document the resolved value.
65473 */
65474
65475 }, {
65476 key: 'addBranch',
65477 value: function addBranch(ownerId, projectName, branchId, branchObj) {
65478 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'put', this).call(this, ['projects', ownerId, projectName, 'branches', branchId], branchObj);
65479 }
65480
65481 /**
65482 * Updates a branch to WebGME. Requires write access for project.
65483 * @param {string} ownerId - owner's id
65484 * @param {string} projectName = name of project
65485 * @param {string} branchId - id of branch: ex. master
65486 * @param {object} branchObj - ex: {"oldHash": "#actualOldHash","newHash": "#actualNewHash"}
65487 * @return {Promise} //TODO: How to document the resolved value.
65488 */
65489
65490 }, {
65491 key: 'updateBranch',
65492 value: function updateBranch(ownerId, projectName, branchId, branchObj) {
65493 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'patch', this).call(this, ['projects', ownerId, projectName, 'branches', branchId], branchObj);
65494 }
65495
65496 /**
65497 * Delete branch from WebGME. Requires write access for project.
65498 * @param {string} ownerId - owner's id
65499 * @param {string} projectName = name of project
65500 * @param {string} branchId - id of branch: ex. master
65501 * @return {Promise} //TODO: How to document the resolved value.
65502 */
65503
65504 }, {
65505 key: 'deleteBranch',
65506 value: function deleteBranch(ownerId, projectName, branchId) {
65507 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'delete', this).call(this, ['projects', ownerId, projectName, 'branches', branchId]);
65508 }
65509
65510 /**
65511 * Retrives an array of the commit history for the branch. Requires read access for project.
65512 * @param {string} ownerId - owner's id
65513 * @param {string} projectName = name of project
65514 * @param {string} branchId - id of branch: ex. master
65515 * @param {number} numCommits - maximum to retrieve (default 100)
65516 * @return {Promise} //TODO: How to document the resolved value.
65517 */
65518
65519 }, {
65520 key: 'getLatestCommitsByBranch',
65521 value: function getLatestCommitsByBranch(ownerId, projectName, branchId) {
65522 var numCommits = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 100;
65523
65524 var query = {
65525 n: numCommits
65526 };
65527
65528 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'branches', branchId, 'commits'], query);
65529 }
65530
65531 /**
65532 * Retrieves the raw data object at given path within the project tree. Requires read access for project.
65533 * @param {string} ownerId - owner's id
65534 * @param {string} projectName = name of project
65535 * @param {string} branchId - id of branch: ex. master
65536 * @param {string} nodePath - ex. 1563412505/5585498754
65537 * @return {Promise} //TODO: How to document the resolved value.
65538 */
65539
65540 }, {
65541 key: 'getRawDataAtPathAtBranch',
65542 value: function getRawDataAtPathAtBranch(ownerId, projectName, branchId, nodePath) {
65543 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'branches', branchId, 'tree', nodePath]);
65544 }
65545
65546 /**
65547 * Get a list of tags. Requires read access for project.
65548 * @param {string} ownerId - owner's id
65549 * @param {string} projectName = name of project
65550 * @return {Promise} //TODO: How to document the resolved value.
65551 */
65552
65553 }, {
65554 key: 'getProjectTags',
65555 value: function getProjectTags(ownerId, projectName) {
65556 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'tags']);
65557 }
65558
65559 /**
65560 * Get the tag. Requires read access for project.
65561 * @param {string} ownerId - owner's id
65562 * @param {string} projectName = name of project
65563 * @param {string} tagId - ex. myTag
65564 * @return {Promise} //TODO: How to document the resolved value.
65565 */
65566
65567 }, {
65568 key: 'getTag',
65569 value: function getTag(ownerId, projectName, tagId) {
65570 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'get', this).call(this, ['projects', ownerId, projectName, 'tags', tagId]);
65571 }
65572
65573 /**
65574 * Adds tag to project. Requires write access for project.
65575 * @param {string} ownerId - owner's id
65576 * @param {string} projectName = name of project
65577 * @param {string} tagId - ex. myTag
65578 * @param {object} tagObj - ex. {"hash": "#actualHash"}
65579 * @return {Promise} //TODO: How to document the resolved value.
65580 */
65581
65582 }, {
65583 key: 'addTag',
65584 value: function addTag(ownerId, projectName, tagId, tagObj) {
65585 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'put', this).call(this, ['projects', ownerId, projectName, 'tags', tagId], tagObj);
65586 }
65587
65588 /**
65589 * Updates tag. Requires delete access for project.
65590 * @param {string} ownerId - owner's id
65591 * @param {string} projectName = name of project
65592 * @param {string} tagId - ex. myTag
65593 * @param {object} tagObj - ex. {"hash": "#newHash"}
65594 * @return {Promise} //TODO: How to document the resolved value.
65595 */
65596
65597 }, {
65598 key: 'updateTag',
65599 value: function updateTag(ownerId, projectName, tagId, tagObj) {
65600 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'patch', this).call(this, ['projects', ownerId, projectName, 'tags', tagId], tagObj);
65601 }
65602
65603 /**
65604 * Deletes tag. Requires delete access for project.
65605 * @param {string} ownerId - owner's id
65606 * @param {string} projectName = name of project
65607 * @param {string} tagId - ex. myTag
65608 * @return {Promise} //TODO: How to document the resolved value.
65609 */
65610
65611 }, {
65612 key: 'deleteTag',
65613 value: function deleteTag(ownerId, projectName, tagId) {
65614 return _get(ProjectsClient.prototype.__proto__ || Object.getPrototypeOf(ProjectsClient.prototype), 'delete', this).call(this, ['projects', ownerId, projectName, 'tags', tagId]);
65615 }
65616 }]);
65617
65618 return ProjectsClient;
65619 }(_baseClient2.default);
65620
65621 exports.default = ProjectsClient;
65622
65623/***/ },
65624/* 669 */
65625/***/ function(module, exports, __webpack_require__) {
65626
65627 'use strict';
65628
65629 Object.defineProperty(exports, "__esModule", {
65630 value: true
65631 });
65632 exports.fetchOrganizationsIfNeeded = exports.fetchOrganizations = exports.receiveOrganizations = exports.requestOrganizations = exports.RECEIVE_ORGANIZATIONS = exports.REQUEST_ORGANIZATIONS_SUCCESS = exports.REQUEST_ORGANIZATIONS_FAILURE = exports.REQUEST_ORGANIZATIONS = undefined;
65633
65634 var _organizationsClient = __webpack_require__(670);
65635
65636 var _organizationsClient2 = _interopRequireDefault(_organizationsClient);
65637
65638 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65639
65640 var organizationsClient = new _organizationsClient2.default(); /**
65641 * Organizations actions
65642 * @author patrickkerrypei / https://github.com/patrickkerrypei
65643 */
65644
65645 // Self-defined
65646 var REQUEST_ORGANIZATIONS = exports.REQUEST_ORGANIZATIONS = 'REQUEST_ORGANIZATIONS';
65647 var REQUEST_ORGANIZATIONS_FAILURE = exports.REQUEST_ORGANIZATIONS_FAILURE = 'REQUEST_ORGANIZATIONS_FAILURE';
65648 var REQUEST_ORGANIZATIONS_SUCCESS = exports.REQUEST_ORGANIZATIONS_SUCCESS = 'REQUEST_ORGANIZATIONS_SUCCESS';
65649 var RECEIVE_ORGANIZATIONS = exports.RECEIVE_ORGANIZATIONS = 'RECEIVE_ORGANIZATIONS';
65650
65651 var requestOrganizations = exports.requestOrganizations = function requestOrganizations() {
65652 return {
65653 type: REQUEST_ORGANIZATIONS
65654 };
65655 };
65656
65657 var receiveOrganizations = exports.receiveOrganizations = function receiveOrganizations(organizations) {
65658 return {
65659 type: RECEIVE_ORGANIZATIONS,
65660 organizations: organizations
65661 };
65662 };
65663
65664 var shouldFetchOrganizations = function shouldFetchOrganizations(state) {
65665 var _state$organizations = state.organizations;
65666 var hasFetched = _state$organizations.hasFetched;
65667 var isFetching = _state$organizations.isFetching;
65668
65669
65670 var shouldFetch = true;
65671 if (hasFetched || isFetching) {
65672 shouldFetch = false;
65673 }
65674
65675 return shouldFetch;
65676 };
65677
65678 var fetchOrganizations = exports.fetchOrganizations = function fetchOrganizations() {
65679 return function (dispatch) {
65680 dispatch(requestOrganizations());
65681 return organizationsClient.getAllOrganizations(true).then(function (organizations) {
65682 dispatch(receiveOrganizations(organizations));
65683 });
65684 };
65685 };
65686
65687 var fetchOrganizationsIfNeeded = exports.fetchOrganizationsIfNeeded = function fetchOrganizationsIfNeeded() {
65688 return function (dispatch, getState) {
65689 if (shouldFetchOrganizations(getState())) {
65690 return dispatch(fetchOrganizations());
65691 }
65692 };
65693 };
65694
65695/***/ },
65696/* 670 */
65697/***/ function(module, exports, __webpack_require__) {
65698
65699 'use strict';
65700
65701 Object.defineProperty(exports, "__esModule", {
65702 value: true
65703 });
65704
65705 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; }; }();
65706
65707 var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
65708
65709 var _baseClient = __webpack_require__(326);
65710
65711 var _baseClient2 = _interopRequireDefault(_baseClient);
65712
65713 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65714
65715 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
65716
65717 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; }
65718
65719 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; } /**
65720 * Organizations client - all rest calls for api/orgs
65721 * @author patrickkerrypei / https://github.com/patrickkerrypei
65722 */
65723
65724 var OrganizationsClient = function (_BaseClient) {
65725 _inherits(OrganizationsClient, _BaseClient);
65726
65727 function OrganizationsClient() {
65728 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/';
65729
65730 _classCallCheck(this, OrganizationsClient);
65731
65732 return _possibleConstructorReturn(this, (OrganizationsClient.__proto__ || Object.getPrototypeOf(OrganizationsClient)).call(this, baseUrl));
65733 }
65734
65735 /**
65736 * Gets a list of all organizations
65737 * @param {boolean} [includeDisabled=false] - include the disabled orgs.
65738 * @return {Promise} //TODO: How to document the resolved value.
65739 */
65740
65741
65742 _createClass(OrganizationsClient, [{
65743 key: 'getAllOrganizations',
65744 value: function getAllOrganizations(includeDisabled) {
65745 var query = includeDisabled ? { includeDisabled: includeDisabled } : null;
65746 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'get', this).call(this, ['orgs'], query);
65747 }
65748
65749 /**
65750 * Gets a data of specified organization
65751 * @param {string} organizationName - name of organization
65752 * @return {Promise} //TODO: How to document the resolved value.
65753 */
65754
65755 }, {
65756 key: 'getOrganization',
65757 value: function getOrganization(organizationName) {
65758 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'get', this).call(this, ['orgs', organizationName]);
65759 }
65760
65761 /**
65762 * Creates an organization
65763 * @param {string} organizationName - name of organization
65764 * @param {object} organizationObj - object containing org data
65765 * @return {Promise} //TODO: How to document the resolved value.
65766 */
65767
65768 }, {
65769 key: 'createOrganization',
65770 value: function createOrganization(organizationName) {
65771 var organizationObj = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
65772
65773 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'put', this).call(this, ['orgs', organizationName], organizationObj);
65774 }
65775
65776 /**
65777 * Deletes specified organization
65778 * @param {string} organizationName - name of organization
65779 * @param {boolean} [force] - if true will remove the organization from the database.
65780 * @return {Promise} //TODO: How to document the resolved value.
65781 */
65782
65783 }, {
65784 key: 'deleteOrganization',
65785 value: function deleteOrganization(organizationName, force) {
65786 var query = force ? { force: true } : null;
65787
65788 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'delete', this).call(this, ['orgs', organizationName], query);
65789 }
65790
65791 /**
65792 * Adds user to specified organization
65793 * @param {string} organizationName - name of organization
65794 * @param {string} username - username of user to be added to the org
65795 * @return {Promise} //TODO: How to document the resolved value.
65796 */
65797
65798 }, {
65799 key: 'addUserToOrganization',
65800 value: function addUserToOrganization(organizationName, username) {
65801 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'put', this).call(this, ['orgs', organizationName, 'users', username]);
65802 }
65803
65804 /**
65805 * Deletes user from specified organization
65806 * @param {string} organizationName - name of organization
65807 * @param {string} username - username of user to be deleted from the org
65808 * @return {Promise} //TODO: How to document the resolved value.
65809 */
65810
65811 }, {
65812 key: 'deleteUserFromOrganization',
65813 value: function deleteUserFromOrganization(organizationName, username) {
65814 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'delete', this).call(this, ['orgs', organizationName, 'users', username]);
65815 }
65816
65817 /**
65818 * Makes user as admin of specified organization
65819 * @param {string} organizationName - name of organization
65820 * @param {string} username - username of user to be made admin of org
65821 * @return {Promise} //TODO: How to document the resolved value.
65822 */
65823
65824 }, {
65825 key: 'makeAdminOfOrganization',
65826 value: function makeAdminOfOrganization(organizationName, username) {
65827 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'put', this).call(this, ['orgs', organizationName, 'admins', username]);
65828 }
65829
65830 /**
65831 * Removes user as admin of specified organization
65832 * @param {string} organizationName - name of organization
65833 * @param {string} username - username of user to be removed as admin of org
65834 * @return {Promise} //TODO: How to document the resolved value.
65835 */
65836
65837 }, {
65838 key: 'removeAdminOfOrganization',
65839 value: function removeAdminOfOrganization(organizationName, username) {
65840 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'delete', this).call(this, ['orgs', organizationName, 'admins', username]);
65841 }
65842 }, {
65843 key: 'updateOrganization',
65844 value: function updateOrganization(organizationName, data) {
65845 return _get(OrganizationsClient.prototype.__proto__ || Object.getPrototypeOf(OrganizationsClient.prototype), 'patch', this).call(this, ['orgs', organizationName], data);
65846 }
65847 }]);
65848
65849 return OrganizationsClient;
65850 }(_baseClient2.default);
65851
65852 exports.default = OrganizationsClient;
65853
65854/***/ },
65855/* 671 */
65856/***/ function(module, exports) {
65857
65858 'use strict';
65859
65860 Object.defineProperty(exports, "__esModule", {
65861 value: true
65862 });
65863 /**
65864 * Tables actions
65865 * @author patrickkerrypei / https://github.com/patrickkerrypei
65866 */
65867
65868 var REFRESH_TABLES = exports.REFRESH_TABLES = 'REFRESH_TABLES';
65869 var SORT_CATEGORY = exports.SORT_CATEGORY = 'SORT_CATEGORY';
65870 var SET_PAGE_NUMBER = exports.SET_PAGE_NUMBER = 'SET_PAGE_NUMBER';
65871 var SET_SEARCH_TEXT = exports.SET_SEARCH_TEXT = 'SET_SEARCH_TEXT';
65872 var SET_SELECT_VALUE = exports.SET_SELECT_VALUE = 'SET_SELECT_VALUE';
65873
65874 var refreshTables = exports.refreshTables = function refreshTables() {
65875 return {
65876 type: REFRESH_TABLES
65877 };
65878 };
65879
65880 var sortBy = exports.sortBy = function sortBy(table, sortCategory) {
65881 return {
65882 type: SORT_CATEGORY,
65883 table: table,
65884 sortCategory: sortCategory
65885 };
65886 };
65887
65888 var setPageNumber = exports.setPageNumber = function setPageNumber(table) {
65889 var pageNumber = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
65890
65891 return {
65892 type: SET_PAGE_NUMBER,
65893 table: table,
65894 pageNumber: pageNumber
65895 };
65896 };
65897
65898 var setSearchText = exports.setSearchText = function setSearchText(table, searchText) {
65899 return {
65900 type: SET_SEARCH_TEXT,
65901 table: table,
65902 searchText: searchText
65903 };
65904 };
65905
65906 var setSelectValue = exports.setSelectValue = function setSelectValue(table, selectValue) {
65907 return {
65908 type: SET_SELECT_VALUE,
65909 table: table,
65910 selectValue: selectValue
65911 };
65912 };
65913
65914/***/ },
65915/* 672 */
65916/***/ function(module, exports, __webpack_require__) {
65917
65918 'use strict';
65919
65920 Object.defineProperty(exports, "__esModule", {
65921 value: true
65922 });
65923
65924 var _reactRedux = __webpack_require__(629);
65925
65926 var _UserMenu = __webpack_require__(673);
65927
65928 var _UserMenu2 = _interopRequireDefault(_UserMenu);
65929
65930 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65931
65932 /**
65933 * User menu container
65934 * @author patrickkerrypei / https://github.com/patrickkerrypei
65935 */
65936
65937 // Libraries
65938 var mapStateToProps = function mapStateToProps(state) {
65939 var user = state.user.user;
65940 var basePath = state.basePath.basePath;
65941
65942
65943 return {
65944 user: user,
65945 basePath: basePath
65946 };
65947 };
65948 // Self-defined
65949 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_UserMenu2.default);
65950
65951/***/ },
65952/* 673 */
65953/***/ function(module, exports, __webpack_require__) {
65954
65955 'use strict';
65956
65957 Object.defineProperty(exports, "__esModule", {
65958 value: true
65959 });
65960
65961 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; }; }();
65962
65963 var _react = __webpack_require__(89);
65964
65965 var _react2 = _interopRequireDefault(_react);
65966
65967 var _reactBootstrap = __webpack_require__(334);
65968
65969 var _user = __webpack_require__(661);
65970
65971 var _general = __webpack_require__(674);
65972
65973 var _utils = __webpack_require__(658);
65974
65975 var _style = __webpack_require__(598);
65976
65977 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
65978
65979 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
65980
65981 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; }
65982
65983 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; } /* global window*/
65984 /**
65985 * User menu container
65986 * @author patrickkerrypei / https://github.com/patrickkerrypei
65987 */
65988
65989 // Libraries
65990
65991 // Self-defined
65992
65993
65994 var UserMenu = function (_Component) {
65995 _inherits(UserMenu, _Component);
65996
65997 function UserMenu(props) {
65998 _classCallCheck(this, UserMenu);
65999
66000 var _this = _possibleConstructorReturn(this, (UserMenu.__proto__ || Object.getPrototypeOf(UserMenu)).call(this, props));
66001
66002 _this.onSignOutBtnClick = _this.onSignOutBtnClick.bind(_this);
66003 return _this;
66004 }
66005
66006 _createClass(UserMenu, [{
66007 key: 'componentDidMount',
66008 value: function componentDidMount() {
66009 var dispatch = this.props.dispatch;
66010
66011 dispatch((0, _user.fetchUserIfNeeded)());
66012 }
66013 }, {
66014 key: 'onSignOutBtnClick',
66015 value: function onSignOutBtnClick() {
66016 var dispatch = this.props.dispatch;
66017
66018
66019 dispatch((0, _general.userLogout)());
66020
66021 // The redirect target should be the _top so we need to add a temporary anchor..
66022 var tempAnchor = document.createElement('a');
66023 var referrer = window.sessionStorage.getItem('originalReferrer');
66024
66025 tempAnchor.target = '_top';
66026
66027 if (referrer) {
66028 tempAnchor.href = '/logout?redirectUrl=' + referrer;
66029 } else {
66030 tempAnchor.href = '/logout';
66031 }
66032
66033 document.body.appendChild(tempAnchor);
66034 tempAnchor.click();
66035 }
66036 }, {
66037 key: 'render',
66038 value: function render() {
66039 var user = this.props.user;
66040
66041
66042 return _react2.default.createElement(
66043 'li',
66044 { className: 'dropdown user user-menu' },
66045 _react2.default.createElement(
66046 'a',
66047 { href: '#', className: 'dropdown-toggle', 'data-toggle': 'dropdown' },
66048 _react2.default.createElement('img', { src: (0, _utils.getUserIconSource)(user._id),
66049 className: 'user-image',
66050 alt: 'User Image',
66051 style: _style.ProfileImage }),
66052 _react2.default.createElement(
66053 'span',
66054 { className: 'hidden-xs' },
66055 user.siteAdmin ? _react2.default.createElement('i', { className: 'fa fa-graduation-cap' }) : null,
66056 ' ' + user._id
66057 )
66058 ),
66059 _react2.default.createElement(
66060 'ul',
66061 { className: 'dropdown-menu' },
66062 _react2.default.createElement(
66063 'li',
66064 { className: 'user-header', style: _style.UserMenu.userHeader },
66065 _react2.default.createElement('img', { src: (0, _utils.getUserIconSource)(user._id),
66066 className: 'img-circle',
66067 alt: 'User Image',
66068 style: _style.ProfileImage }),
66069 _react2.default.createElement(
66070 'p',
66071 null,
66072 user._id
66073 )
66074 ),
66075 _react2.default.createElement(
66076 'li',
66077 { className: 'user-footer', style: _style.UserMenu.logoutAreaBorder },
66078 _react2.default.createElement(
66079 'div',
66080 { className: 'col-xs-4 text-center', style: _style.UserMenu.logoutButtonPadding },
66081 _react2.default.createElement(
66082 _reactBootstrap.Button,
66083 { style: _style.UserMenu.logoutButtonBorder, onClick: this.onSignOutBtnClick },
66084 'Sign Out'
66085 )
66086 )
66087 )
66088 )
66089 );
66090 }
66091 }]);
66092
66093 return UserMenu;
66094 }(_react.Component);
66095
66096 exports.default = UserMenu;
66097
66098
66099 UserMenu.propTypes = {
66100 user: _react.PropTypes.object.isRequired
66101 };
66102
66103/***/ },
66104/* 674 */
66105/***/ function(module, exports, __webpack_require__) {
66106
66107 'use strict';
66108
66109 Object.defineProperty(exports, "__esModule", {
66110 value: true
66111 });
66112 exports.userLogout = exports.fetchConfigIfNeeded = exports.fetchConfig = exports.receiveConfig = exports.requestConfig = exports.REQUEST_CONFIG = exports.RECEIVE_CONFIG = exports.USER_LOGOUT = undefined;
66113
66114 var _loginClient = __webpack_require__(325);
66115
66116 var _loginClient2 = _interopRequireDefault(_loginClient);
66117
66118 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66119
66120 var loginClient = new _loginClient2.default(); /**
66121 * @author pmeijer / https://github.com/pmeijer
66122 */
66123
66124 // Self-defined
66125 var USER_LOGOUT = exports.USER_LOGOUT = 'USER_LOGOUT';
66126
66127 var RECEIVE_CONFIG = exports.RECEIVE_CONFIG = 'RECEIVE_CONFIG';
66128 var REQUEST_CONFIG = exports.REQUEST_CONFIG = 'REQUEST_CONFIG';
66129
66130 var requestConfig = exports.requestConfig = function requestConfig() {
66131 return {
66132 type: REQUEST_CONFIG
66133 };
66134 };
66135
66136 var receiveConfig = exports.receiveConfig = function receiveConfig(config) {
66137 return {
66138 type: RECEIVE_CONFIG,
66139 config: config
66140 };
66141 };
66142
66143 var shouldFetchConfig = function shouldFetchConfig(state) {
66144 var _state$general$config = state.general.config;
66145 var hasFetched = _state$general$config.hasFetched;
66146 var isFetching = _state$general$config.isFetching;
66147
66148
66149 var shouldFetch = true;
66150 if (hasFetched || isFetching) {
66151 shouldFetch = false;
66152 }
66153
66154 return shouldFetch;
66155 };
66156
66157 var fetchConfig = exports.fetchConfig = function fetchConfig() {
66158 return function (dispatch) {
66159 dispatch(requestConfig());
66160 return loginClient.getGmeConfig().then(function (config) {
66161 dispatch(receiveConfig(config));
66162 });
66163 };
66164 };
66165
66166 var fetchConfigIfNeeded = exports.fetchConfigIfNeeded = function fetchConfigIfNeeded() {
66167 return function (dispatch, getState) {
66168 if (shouldFetchConfig(getState())) {
66169 return dispatch(fetchConfig());
66170 }
66171 };
66172 };
66173
66174 var userLogout = exports.userLogout = function userLogout() {
66175 return function (dispatch) {
66176 dispatch({
66177 type: USER_LOGOUT
66178 });
66179 };
66180 };
66181
66182/***/ },
66183/* 675 */
66184/***/ function(module, exports, __webpack_require__) {
66185
66186 'use strict';
66187
66188 var _organizationsClient = __webpack_require__(670);
66189
66190 var _organizationsClient2 = _interopRequireDefault(_organizationsClient);
66191
66192 var _projectsClient = __webpack_require__(668);
66193
66194 var _projectsClient2 = _interopRequireDefault(_projectsClient);
66195
66196 var _userClient = __webpack_require__(662);
66197
66198 var _userClient2 = _interopRequireDefault(_userClient);
66199
66200 var _usersClient = __webpack_require__(666);
66201
66202 var _usersClient2 = _interopRequireDefault(_usersClient);
66203
66204 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66205
66206 /**
66207 * Single rest clients that contains user, users, projects, and orgs clients
66208 * @param {string} baseUrl - the base url
66209 */
66210 /**
66211 * Single client - holds all clients & other methods
66212 * @author patrickkerrypei / https://github.com/patrickkerrypei
66213 */
66214
66215 function RestClient() {
66216 var baseUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/api/';
66217
66218
66219 this.organizations = new _organizationsClient2.default(baseUrl);
66220 this.projects = new _projectsClient2.default(baseUrl);
66221 this.user = new _userClient2.default(baseUrl);
66222 this.users = new _usersClient2.default(baseUrl);
66223 }
66224
66225 module.exports = RestClient;
66226
66227/***/ },
66228/* 676 */
66229/***/ function(module, exports, __webpack_require__) {
66230
66231 'use strict';
66232
66233 Object.defineProperty(exports, "__esModule", {
66234 value: true
66235 });
66236
66237 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; }; }();
66238
66239 var _react = __webpack_require__(89);
66240
66241 var _react2 = _interopRequireDefault(_react);
66242
66243 var _SideBarMenu = __webpack_require__(677);
66244
66245 var _SideBarMenu2 = _interopRequireDefault(_SideBarMenu);
66246
66247 var _SideBarUserPanel = __webpack_require__(679);
66248
66249 var _SideBarUserPanel2 = _interopRequireDefault(_SideBarUserPanel);
66250
66251 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66252
66253 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66254
66255 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; }
66256
66257 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; } /**
66258 * Sidebar component
66259 * @author patrickkerrypei / https://github.com/patrickkerrypei
66260 */
66261
66262 // Libraries
66263
66264 // Self-defined components
66265
66266
66267 var SideBar = function (_Component) {
66268 _inherits(SideBar, _Component);
66269
66270 function SideBar() {
66271 _classCallCheck(this, SideBar);
66272
66273 return _possibleConstructorReturn(this, (SideBar.__proto__ || Object.getPrototypeOf(SideBar)).apply(this, arguments));
66274 }
66275
66276 _createClass(SideBar, [{
66277 key: 'render',
66278 value: function render() {
66279 var pathname = this.props.pathname;
66280
66281
66282 return _react2.default.createElement(
66283 'aside',
66284 { className: 'main-sidebar' },
66285 _react2.default.createElement(
66286 'section',
66287 { className: 'sidebar' },
66288 _react2.default.createElement(_SideBarUserPanel2.default, null),
66289 _react2.default.createElement(_SideBarMenu2.default, { pathname: pathname })
66290 )
66291 );
66292 }
66293 }]);
66294
66295 return SideBar;
66296 }(_react.Component);
66297
66298 exports.default = SideBar;
66299
66300/***/ },
66301/* 677 */
66302/***/ function(module, exports, __webpack_require__) {
66303
66304 'use strict';
66305
66306 Object.defineProperty(exports, "__esModule", {
66307 value: true
66308 });
66309
66310 var _reactRedux = __webpack_require__(629);
66311
66312 var _SideBarMenu = __webpack_require__(678);
66313
66314 var _SideBarMenu2 = _interopRequireDefault(_SideBarMenu);
66315
66316 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66317
66318 /**
66319 * SideBarMenu container
66320 * @author patrickkerrypei / https://github.com/patrickkerrypei
66321 */
66322
66323 // Libraries
66324 var mapStateToProps = function mapStateToProps(state) {
66325 return {
66326 basePath: state.basePath
66327 };
66328 };
66329 // Self-defined
66330 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_SideBarMenu2.default);
66331
66332/***/ },
66333/* 678 */
66334/***/ function(module, exports, __webpack_require__) {
66335
66336 'use strict';
66337
66338 Object.defineProperty(exports, "__esModule", {
66339 value: true
66340 });
66341
66342 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; }; }();
66343
66344 var _react = __webpack_require__(89);
66345
66346 var _react2 = _interopRequireDefault(_react);
66347
66348 var _reactRouter = __webpack_require__(260);
66349
66350 var _style = __webpack_require__(598);
66351
66352 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66353
66354 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66355
66356 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; }
66357
66358 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; } /**
66359 * Menu items of sidebar
66360 * @author patrickkerrypei / https://github.com/patrickkerrypei
66361 */
66362
66363 // Libraries
66364
66365 // Style
66366
66367
66368 var SideBarMenu = function (_Component) {
66369 _inherits(SideBarMenu, _Component);
66370
66371 function SideBarMenu() {
66372 _classCallCheck(this, SideBarMenu);
66373
66374 return _possibleConstructorReturn(this, (SideBarMenu.__proto__ || Object.getPrototypeOf(SideBarMenu)).apply(this, arguments));
66375 }
66376
66377 _createClass(SideBarMenu, [{
66378 key: 'render',
66379 value: function render() {
66380 var _props = this.props;
66381 var basePath = _props.basePath;
66382 var pathname = _props.pathname;
66383
66384
66385 return _react2.default.createElement(
66386 'ul',
66387 { className: 'sidebar-menu', style: _style.SideBarMenu.sidebarCategoryStyle },
66388 _react2.default.createElement(
66389 'li',
66390 { className: 'header' },
66391 'Site Navigation'
66392 ),
66393 _react2.default.createElement(
66394 'li',
66395 { className: /home$/.test(pathname) ? 'active' : '' },
66396 _react2.default.createElement(
66397 _reactRouter.Link,
66398 { to: basePath + 'home', style: { textDecoration: "none" } },
66399 _react2.default.createElement('i', { className: 'fa fa-home' }),
66400 _react2.default.createElement(
66401 'span',
66402 null,
66403 'Home'
66404 )
66405 )
66406 ),
66407 _react2.default.createElement(
66408 'li',
66409 { className: /profile$/.test(pathname) ? 'active' : '' },
66410 _react2.default.createElement(
66411 _reactRouter.Link,
66412 { to: basePath + 'profile', style: { textDecoration: "none" } },
66413 _react2.default.createElement('i', { className: 'fa fa-user' }),
66414 _react2.default.createElement(
66415 'span',
66416 null,
66417 'Profile'
66418 )
66419 )
66420 ),
66421 _react2.default.createElement(
66422 'li',
66423 { className: /projects/.test(pathname) ? 'active' : '' },
66424 _react2.default.createElement(
66425 _reactRouter.Link,
66426 { to: basePath + 'projects', style: { textDecoration: "none" } },
66427 _react2.default.createElement('i', { className: 'fa fa-cubes' }),
66428 _react2.default.createElement(
66429 'span',
66430 null,
66431 ' Projects'
66432 )
66433 )
66434 ),
66435 _react2.default.createElement(
66436 'li',
66437 { className: /organizations/.test(pathname) ? 'active' : '' },
66438 _react2.default.createElement(
66439 _reactRouter.Link,
66440 { to: basePath + 'organizations', style: { textDecoration: "none" } },
66441 _react2.default.createElement('i', { className: 'fa fa-university' }),
66442 _react2.default.createElement(
66443 'span',
66444 null,
66445 'Organizations'
66446 )
66447 )
66448 ),
66449 _react2.default.createElement(
66450 'li',
66451 { className: /users/.test(pathname) ? 'active' : '' },
66452 _react2.default.createElement(
66453 _reactRouter.Link,
66454 { to: basePath + 'users', style: { textDecoration: "none" } },
66455 _react2.default.createElement('i', { className: 'fa fa-users' }),
66456 _react2.default.createElement(
66457 'span',
66458 null,
66459 'Users'
66460 )
66461 )
66462 )
66463 );
66464 }
66465 }]);
66466
66467 return SideBarMenu;
66468 }(_react.Component);
66469
66470 exports.default = SideBarMenu;
66471
66472
66473 SideBarMenu.propTypes = {
66474 basePath: _react.PropTypes.string.isRequired
66475 };
66476
66477/***/ },
66478/* 679 */
66479/***/ function(module, exports, __webpack_require__) {
66480
66481 'use strict';
66482
66483 Object.defineProperty(exports, "__esModule", {
66484 value: true
66485 });
66486
66487 var _reactRedux = __webpack_require__(629);
66488
66489 var _SideBarUserPanel = __webpack_require__(680);
66490
66491 var _SideBarUserPanel2 = _interopRequireDefault(_SideBarUserPanel);
66492
66493 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66494
66495 /**
66496 * Sidebar user panel container
66497 * @author patrickkerrypei / https://github.com/patrickkerrypei
66498 */
66499
66500 // Libraries
66501 var mapStateToProps = function mapStateToProps(state) {
66502 var user = state.user.user;
66503
66504
66505 return {
66506 user: user
66507 };
66508 };
66509 // Self-defined
66510 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_SideBarUserPanel2.default);
66511
66512/***/ },
66513/* 680 */
66514/***/ function(module, exports, __webpack_require__) {
66515
66516 'use strict';
66517
66518 Object.defineProperty(exports, "__esModule", {
66519 value: true
66520 });
66521
66522 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; }; }();
66523
66524 var _react = __webpack_require__(89);
66525
66526 var _react2 = _interopRequireDefault(_react);
66527
66528 var _reactRouter = __webpack_require__(260);
66529
66530 var _user = __webpack_require__(661);
66531
66532 var _utils = __webpack_require__(658);
66533
66534 var _style = __webpack_require__(598);
66535
66536 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66537
66538 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66539
66540 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; }
66541
66542 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; } /* global window */
66543
66544 /**
66545 * Sidebar user panel container
66546 * @author patrickkerrypei / https://github.com/patrickkerrypei
66547 */
66548
66549 // Libraries
66550
66551 // Self-defined
66552
66553 // Style
66554
66555
66556 var SideBarUserPanel = function (_Component) {
66557 _inherits(SideBarUserPanel, _Component);
66558
66559 function SideBarUserPanel() {
66560 _classCallCheck(this, SideBarUserPanel);
66561
66562 return _possibleConstructorReturn(this, (SideBarUserPanel.__proto__ || Object.getPrototypeOf(SideBarUserPanel)).apply(this, arguments));
66563 }
66564
66565 _createClass(SideBarUserPanel, [{
66566 key: 'componentDidMount',
66567 value: function componentDidMount() {
66568 var dispatch = this.props.dispatch;
66569
66570
66571 dispatch((0, _user.fetchUserIfNeeded)());
66572 }
66573 }, {
66574 key: 'goToEditor',
66575 value: function goToEditor() {
66576 _reactRouter.browserHistory.push('/');
66577 window.location.reload();
66578 }
66579 }, {
66580 key: 'render',
66581 value: function render() {
66582 var user = this.props.user;
66583
66584
66585 return _react2.default.createElement(
66586 'div',
66587 { className: 'user-panel', style: _style.SideBarUserPanel.panel },
66588 _react2.default.createElement(
66589 'div',
66590 { className: 'pull-left image', style: { cursor: "pointer" } },
66591 _react2.default.createElement('img', { alt: 'User Image',
66592 className: 'img-circle',
66593 onClick: this.goToEditor,
66594 src: (0, _utils.getUserIconSource)(user._id),
66595 style: _style.SideBarUserPanel.imageIcon })
66596 ),
66597 _react2.default.createElement(
66598 'div',
66599 { className: 'pull-left info' },
66600 _react2.default.createElement(
66601 'p',
66602 { style: _style.SideBarUserPanel.name },
66603 user.siteAdmin ? _react2.default.createElement('i', { className: 'fa fa-graduation-cap' }) : null,
66604 ' ' + user._id
66605 ),
66606 _react2.default.createElement(
66607 'span',
66608 { style: _style.SideBarUserPanel.status },
66609 _react2.default.createElement('i', { className: 'fa fa-circle text-success' }),
66610 ' Online'
66611 )
66612 )
66613 );
66614 }
66615 }]);
66616
66617 return SideBarUserPanel;
66618 }(_react.Component);
66619
66620 exports.default = SideBarUserPanel;
66621
66622
66623 SideBarUserPanel.propTypes = {
66624 user: _react.PropTypes.object.isRequired
66625 };
66626
66627/***/ },
66628/* 681 */
66629/***/ function(module, exports, __webpack_require__) {
66630
66631 "use strict";
66632
66633 Object.defineProperty(exports, "__esModule", {
66634 value: true
66635 });
66636
66637 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; }; }();
66638
66639 var _react = __webpack_require__(89);
66640
66641 var _react2 = _interopRequireDefault(_react);
66642
66643 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66644
66645 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66646
66647 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; }
66648
66649 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; } /**
66650 * Content Wrapper - holds all the individual pages
66651 * @author patrickkerrypei / https://github.com/patrickkerrypei
66652 */
66653
66654 // Libraries
66655
66656
66657 var ContentWrapper = function (_Component) {
66658 _inherits(ContentWrapper, _Component);
66659
66660 function ContentWrapper() {
66661 _classCallCheck(this, ContentWrapper);
66662
66663 return _possibleConstructorReturn(this, (ContentWrapper.__proto__ || Object.getPrototypeOf(ContentWrapper)).apply(this, arguments));
66664 }
66665
66666 _createClass(ContentWrapper, [{
66667 key: "render",
66668 value: function render() {
66669 var _props = this.props;
66670 var pathname = _props.pathname;
66671 var restClient = _props.restClient;
66672
66673
66674 var PageWithRestClient = _react2.default.cloneElement(this.props.children, {
66675 pathname: pathname,
66676 restClient: restClient
66677 });
66678
66679 return _react2.default.createElement(
66680 "div",
66681 { className: "content-wrapper" },
66682 _react2.default.createElement("section", { className: "content-header" }),
66683 PageWithRestClient
66684 );
66685 }
66686 }]);
66687
66688 return ContentWrapper;
66689 }(_react.Component);
66690
66691 exports.default = ContentWrapper;
66692
66693/***/ },
66694/* 682 */
66695/***/ function(module, exports, __webpack_require__) {
66696
66697 'use strict';
66698
66699 Object.defineProperty(exports, "__esModule", {
66700 value: true
66701 });
66702
66703 var _reactRedux = __webpack_require__(629);
66704
66705 var _HomePage = __webpack_require__(683);
66706
66707 var _HomePage2 = _interopRequireDefault(_HomePage);
66708
66709 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66710
66711 /**
66712 * Home page container
66713 * @author patrickkerrypei / https://github.com/patrickkerrypei
66714 */
66715
66716 // Libraries
66717 var mapStateToProps = function mapStateToProps(state) {
66718 var basePath = state.basePath;
66719 var projects = state.projects.projects;
66720 var user = state.user.user;
66721 var users = state.users.users;
66722 var organizations = state.organizations.organizations;
66723
66724 var enabledUsers = users.filter(function (user) {
66725 return !user.disabled;
66726 });
66727 var enabledOrgs = organizations.filter(function (org) {
66728 return !org.disabled;
66729 });
66730
66731 return {
66732 basePath: basePath,
66733 projects: projects,
66734 user: user,
66735 users: enabledUsers,
66736 organizations: enabledOrgs
66737 };
66738 };
66739 // Self-defined
66740 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_HomePage2.default);
66741
66742/***/ },
66743/* 683 */
66744/***/ function(module, exports, __webpack_require__) {
66745
66746 'use strict';
66747
66748 Object.defineProperty(exports, "__esModule", {
66749 value: true
66750 });
66751
66752 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; }; }();
66753
66754 var _react = __webpack_require__(89);
66755
66756 var _react2 = _interopRequireDefault(_react);
66757
66758 var _reactBootstrap = __webpack_require__(334);
66759
66760 var _reactRouter = __webpack_require__(260);
66761
66762 var _user = __webpack_require__(661);
66763
66764 var _projects = __webpack_require__(667);
66765
66766 var _users = __webpack_require__(665);
66767
66768 var _organizations = __webpack_require__(669);
66769
66770 var _utils = __webpack_require__(658);
66771
66772 var _style = __webpack_require__(598);
66773
66774 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
66775
66776 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
66777
66778 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; }
66779
66780 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; } /**
66781 * Home page container
66782 * @author patrickkerrypei / https://github.com/patrickkerrypei
66783 */
66784
66785 // Libraries
66786
66787 // Self-defined
66788
66789 // Style
66790
66791
66792 var IMG_CONTAINER_STYLE = {
66793 textAlign: "center",
66794 display: "flex",
66795 marginTop: "30px"
66796 };
66797
66798 var LINK_STYLE = {
66799 fontSize: "24px",
66800 fontWeight: "500",
66801 color: "#333333",
66802 textDecoration: "none"
66803 };
66804
66805 var HomePage = function (_Component) {
66806 _inherits(HomePage, _Component);
66807
66808 function HomePage() {
66809 _classCallCheck(this, HomePage);
66810
66811 return _possibleConstructorReturn(this, (HomePage.__proto__ || Object.getPrototypeOf(HomePage)).apply(this, arguments));
66812 }
66813
66814 _createClass(HomePage, [{
66815 key: 'componentDidMount',
66816 value: function componentDidMount() {
66817 var dispatch = this.props.dispatch;
66818
66819
66820 dispatch((0, _user.fetchUserIfNeeded)());
66821 dispatch((0, _projects.fetchProjectsIfNeeded)());
66822 dispatch((0, _users.fetchUsersIfNeeded)());
66823 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
66824 }
66825 }, {
66826 key: 'render',
66827 value: function render() {
66828 var _props = this.props;
66829 var basePath = _props.basePath;
66830 var projects = _props.projects;
66831 var user = _props.user;
66832 var users = _props.users;
66833
66834
66835 var numOwnedProjects = user.projects ? Object.keys(user.projects).length : 0,
66836 numViewableProjects = projects.length,
66837 numUsers = users.length,
66838 numOrganizations = user.orgs ? user.orgs.length : 0; // TODO: check for admin
66839
66840 return _react2.default.createElement(
66841 'section',
66842 { className: 'content', style: _style.HomePage.profileBox },
66843 _react2.default.createElement(
66844 'div',
66845 { className: 'row' },
66846 _react2.default.createElement(
66847 'div',
66848 { className: 'col-sm-10' },
66849 _react2.default.createElement(
66850 _reactBootstrap.Jumbotron,
66851 null,
66852 _react2.default.createElement(
66853 'h1',
66854 null,
66855 'Hello ',
66856 user._id,
66857 ' !'
66858 ),
66859 _react2.default.createElement(
66860 _reactBootstrap.Media,
66861 null,
66862 _react2.default.createElement(
66863 _reactBootstrap.Media.Left,
66864 null,
66865 _react2.default.createElement(
66866 'a',
66867 { href: '/', style: LINK_STYLE },
66868 _react2.default.createElement('img', { width: '128', height: '128', src: '/img/webgme-icon.png', alt: 'Image',
66869 style: { margin: "5px 10px 10px 10px" } })
66870 )
66871 ),
66872 _react2.default.createElement(
66873 _reactBootstrap.Media.Body,
66874 null,
66875 _react2.default.createElement(
66876 'p',
66877 null,
66878 'You are currently at the profile page for webgme.'
66879 ),
66880 _react2.default.createElement(
66881 'p',
66882 null,
66883 'Here can you view and control the access level of your webgme projects, see what other users are present on this deployment and add them to your organizations.'
66884 ),
66885 _react2.default.createElement(
66886 'p',
66887 null,
66888 'To start using the editor click the icon to the left or go to your project listing to open a specific one.'
66889 )
66890 )
66891 )
66892 )
66893 )
66894 ),
66895 _react2.default.createElement(
66896 'div',
66897 { className: 'row' },
66898 _react2.default.createElement(
66899 'div',
66900 { className: 'col-sm-4' },
66901 _react2.default.createElement(
66902 'div',
66903 { className: 'small-box bg-light-blue' },
66904 _react2.default.createElement(
66905 'div',
66906 { className: 'inner' },
66907 _react2.default.createElement(
66908 'h3',
66909 { style: _style.HomePage.widgetBox },
66910 numViewableProjects
66911 ),
66912 _react2.default.createElement(
66913 'p',
66914 null,
66915 'Collaborator on Projects'
66916 )
66917 ),
66918 _react2.default.createElement(
66919 'div',
66920 { className: 'icon' },
66921 _react2.default.createElement('i', { className: 'fa fa-cubes' })
66922 ),
66923 _react2.default.createElement(
66924 _reactRouter.Link,
66925 { to: basePath + 'projects',
66926 className: 'small-box-footer' },
66927 'Show Projects ',
66928 _react2.default.createElement('i', { className: 'fa fa-arrow-circle-right' })
66929 )
66930 )
66931 ),
66932 _react2.default.createElement(
66933 'div',
66934 { className: 'col-sm-4' },
66935 _react2.default.createElement(
66936 'div',
66937 { className: 'small-box bg-green' },
66938 _react2.default.createElement(
66939 'div',
66940 { className: 'inner' },
66941 _react2.default.createElement(
66942 'h3',
66943 { style: _style.HomePage.widgetBox },
66944 numOrganizations
66945 ),
66946 _react2.default.createElement(
66947 'p',
66948 null,
66949 'Membership(s) in Organizations'
66950 )
66951 ),
66952 _react2.default.createElement(
66953 'div',
66954 { className: 'icon' },
66955 _react2.default.createElement('i', { className: 'fa fa-institution' })
66956 ),
66957 _react2.default.createElement(
66958 _reactRouter.Link,
66959 { to: basePath + 'organizations',
66960 className: 'small-box-footer' },
66961 'Show Organizations ',
66962 _react2.default.createElement('i', { className: 'fa fa-arrow-circle-right' })
66963 )
66964 )
66965 ),
66966 _react2.default.createElement(
66967 'div',
66968 { className: 'col-sm-4' },
66969 _react2.default.createElement(
66970 'div',
66971 { className: 'small-box bg-red' },
66972 _react2.default.createElement(
66973 'div',
66974 { className: 'inner' },
66975 _react2.default.createElement(
66976 'h3',
66977 { style: _style.HomePage.widgetBox },
66978 numUsers
66979 ),
66980 _react2.default.createElement(
66981 'p',
66982 null,
66983 'Users on the Deployment'
66984 )
66985 ),
66986 _react2.default.createElement(
66987 'div',
66988 { className: 'icon' },
66989 _react2.default.createElement('i', { className: 'fa fa-users' })
66990 ),
66991 _react2.default.createElement(
66992 _reactRouter.Link,
66993 { to: basePath + 'users',
66994 className: 'small-box-footer' },
66995 'Show Users ',
66996 _react2.default.createElement('i', { className: 'fa fa-arrow-circle-right' })
66997 )
66998 )
66999 )
67000 )
67001 );
67002 }
67003 }]);
67004
67005 return HomePage;
67006 }(_react.Component);
67007
67008 exports.default = HomePage;
67009
67010
67011 HomePage.propTypes = {
67012 basePath: _react.PropTypes.string.isRequired,
67013 dispatch: _react.PropTypes.func.isRequired,
67014 projects: _react.PropTypes.array.isRequired,
67015 user: _react.PropTypes.object.isRequired
67016 };
67017
67018/***/ },
67019/* 684 */
67020/***/ function(module, exports, __webpack_require__) {
67021
67022 'use strict';
67023
67024 Object.defineProperty(exports, "__esModule", {
67025 value: true
67026 });
67027
67028 var _reactRedux = __webpack_require__(629);
67029
67030 var _OrganizationPage = __webpack_require__(685);
67031
67032 var _OrganizationPage2 = _interopRequireDefault(_OrganizationPage);
67033
67034 var _restUtils = __webpack_require__(709);
67035
67036 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67037
67038 // Self defined
67039 var mapStateToProps = function mapStateToProps(state, ownProps) {
67040 var organizations = state.organizations.organizations;
67041 var projects = state.projects.projects;
67042 var user = state.user.user;
67043 var organizationId = ownProps.params.organizationId;
67044 var basePath = state.basePath;
67045
67046
67047 var canAuthorize = (0, _restUtils.canUserAuthorize)(user, organizations, organizationId);
67048
67049 var ownedProjects = projects.filter(function (project) {
67050 return project.owner === organizationId;
67051 });
67052
67053 var organizationExists = false;
67054 var organization = organizations.find(function (org) {
67055 return org._id === organizationId;
67056 });
67057
67058 if (organization) {
67059 organizationExists = true;
67060 }
67061
67062 return {
67063 basePath: basePath,
67064 canAuthorize: canAuthorize,
67065 ownedProjects: ownedProjects,
67066 organizationExists: organizationExists,
67067 organization: organization,
67068 user: user
67069 };
67070 }; /**
67071 * Individual organization page
67072 * @author patrickkerrypei / https://github.com/patrickkerrypei
67073 */
67074
67075 // Libraries
67076 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationPage2.default);
67077
67078/***/ },
67079/* 685 */
67080/***/ function(module, exports, __webpack_require__) {
67081
67082 'use strict';
67083
67084 Object.defineProperty(exports, "__esModule", {
67085 value: true
67086 });
67087
67088 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; }; }();
67089
67090 var _react = __webpack_require__(89);
67091
67092 var _react2 = _interopRequireDefault(_react);
67093
67094 var _reactRouter = __webpack_require__(260);
67095
67096 var _reactBootstrap = __webpack_require__(334);
67097
67098 var _OrganizationAuthorizationWidget = __webpack_require__(686);
67099
67100 var _OrganizationAuthorizationWidget2 = _interopRequireDefault(_OrganizationAuthorizationWidget);
67101
67102 var _OrganizationTable = __webpack_require__(701);
67103
67104 var _OrganizationTable2 = _interopRequireDefault(_OrganizationTable);
67105
67106 var _CustomModal = __webpack_require__(708);
67107
67108 var _CustomModal2 = _interopRequireDefault(_CustomModal);
67109
67110 var _organizations = __webpack_require__(669);
67111
67112 var _user = __webpack_require__(661);
67113
67114 var _users = __webpack_require__(665);
67115
67116 var _projects = __webpack_require__(667);
67117
67118 var _style = __webpack_require__(598);
67119
67120 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67121
67122 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67123
67124 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; }
67125
67126 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; } /**
67127 * Individual organization page
67128 * @author patrickkerrypei / https://github.com/patrickkerrypei
67129 */
67130
67131 // Libraries
67132
67133 // Self defined
67134
67135
67136 var OrganizationPage = function (_Component) {
67137 _inherits(OrganizationPage, _Component);
67138
67139 function OrganizationPage(props) {
67140 _classCallCheck(this, OrganizationPage);
67141
67142 var _this = _possibleConstructorReturn(this, (OrganizationPage.__proto__ || Object.getPrototypeOf(OrganizationPage)).call(this, props));
67143
67144 _this.state = {
67145 showModal: false,
67146 showModalEnableOrg: false
67147 };
67148
67149 _this.deleteOrganization = _this.deleteOrganization.bind(_this);
67150 _this.showModal = _this.showModal.bind(_this);
67151 _this.hideModal = _this.hideModal.bind(_this);
67152 _this.confirmModal = _this.confirmModal.bind(_this);
67153
67154 _this.showModalEnableOrg = _this.showModalEnableOrg.bind(_this);
67155 _this.hideModalEnableOrg = _this.hideModalEnableOrg.bind(_this);
67156 _this.confirmModalEnableOrg = _this.confirmModalEnableOrg.bind(_this);
67157 return _this;
67158 }
67159
67160 _createClass(OrganizationPage, [{
67161 key: 'componentDidMount',
67162 value: function componentDidMount() {
67163 var dispatch = this.props.dispatch;
67164
67165
67166 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
67167 dispatch((0, _projects.fetchProjectsIfNeeded)());
67168 dispatch((0, _user.fetchUserIfNeeded)());
67169 }
67170 }, {
67171 key: 'deleteOrganization',
67172 value: function deleteOrganization() {
67173 var dispatch = this.props.dispatch;
67174
67175 var forceDelete = this.props.organization.disabled && this.props.user.siteAdmin;
67176 this.props.restClient.organizations.deleteOrganization(this.props.params.organizationId, forceDelete).then(function () {
67177 dispatch((0, _organizations.fetchOrganizations)());
67178 dispatch((0, _users.fetchUsers)());
67179 }).catch(function () {
67180 dispatch((0, _organizations.fetchOrganizations)());
67181 });
67182 }
67183 }, {
67184 key: 'reEnableOrg',
67185 value: function reEnableOrg() {
67186 var dispatch = this.props.dispatch;
67187
67188 this.props.restClient.organizations.updateOrganization(this.props.params.organizationId, { disabled: false }).then(function () {
67189 dispatch((0, _organizations.fetchOrganizations)());
67190 }).catch(function () {
67191 dispatch((0, _organizations.fetchOrganizations)());
67192 });
67193 }
67194 }, {
67195 key: 'showModal',
67196 value: function showModal() {
67197 this.setState({
67198 showModal: true
67199 });
67200 }
67201 }, {
67202 key: 'hideModal',
67203 value: function hideModal() {
67204 this.setState({
67205 showModal: false
67206 });
67207 }
67208 }, {
67209 key: 'confirmModal',
67210 value: function confirmModal() {
67211 this.setState({
67212 showModal: false
67213 }, this.deleteOrganization());
67214 }
67215 }, {
67216 key: 'showModalEnableOrg',
67217 value: function showModalEnableOrg() {
67218 this.setState({
67219 showModalEnableOrg: true
67220 });
67221 }
67222 }, {
67223 key: 'hideModalEnableOrg',
67224 value: function hideModalEnableOrg() {
67225 this.setState({
67226 showModalEnableOrg: false
67227 });
67228 }
67229 }, {
67230 key: 'confirmModalEnableOrg',
67231 value: function confirmModalEnableOrg(event) {
67232 this.setState({
67233 showModalEnableOrg: false
67234 }, this.reEnableOrg(event));
67235 }
67236 }, {
67237 key: 'render',
67238 value: function render() {
67239 var _props = this.props;
67240 var basePath = _props.basePath;
67241 var canAuthorize = _props.canAuthorize;
67242 var organizationExists = _props.organizationExists;
67243 var user = _props.user;
67244 var ownedProjects = _props.ownedProjects;
67245
67246 var canDelete = user.siteAdmin === true,
67247 disabledAndSiteAdmin = organizationExists && this.props.organization.disabled && user.siteAdmin,
67248 nbrOfOwnedProjects = ownedProjects.length;
67249
67250 if (!organizationExists) {
67251 return _react2.default.createElement(
67252 'section',
67253 { className: 'content' },
67254 _react2.default.createElement(
67255 _reactRouter.Link,
67256 { to: this.props.basePath + 'organizations' },
67257 'No such organization \'' + this.props.params.organizationId + '\', back to organizations ...'
67258 )
67259 );
67260 }
67261
67262 return _react2.default.createElement(
67263 'section',
67264 { className: 'content' },
67265 _react2.default.createElement(
67266 'div',
67267 { className: 'box box-primary', style: _style.ProjectPage.titleBox },
67268 _react2.default.createElement(
67269 'div',
67270 { className: 'row' },
67271 _react2.default.createElement(
67272 'div',
67273 { className: 'col-md-12', style: _style.ProjectPage.titleContainer },
67274 _react2.default.createElement(
67275 'div',
67276 { style: _style.ProjectPage.projectTitle },
67277 _react2.default.createElement('i', { className: 'fa fa-university' }),
67278 ' ' + this.props.params.organizationId
67279 )
67280 )
67281 )
67282 ),
67283 _react2.default.createElement(
67284 'div',
67285 { className: 'row' },
67286 _react2.default.createElement(
67287 'div',
67288 { className: 'col-md-6' },
67289 _react2.default.createElement(
67290 'div',
67291 { className: 'box box-primary' },
67292 _react2.default.createElement(_OrganizationTable2.default, { canAuthorize: disabledAndSiteAdmin ? false : canAuthorize,
67293 organizationId: this.props.params.organizationId,
67294 ownerId: this.props.params.ownerId,
67295 restClient: this.props.restClient })
67296 )
67297 ),
67298 _react2.default.createElement(
67299 'div',
67300 { className: 'col-md-6' },
67301 _react2.default.createElement(_OrganizationAuthorizationWidget2.default, { canAuthorize: disabledAndSiteAdmin ? false : canAuthorize,
67302 organizationId: this.props.params.organizationId,
67303 restClient: this.props.restClient })
67304 ),
67305 _react2.default.createElement(
67306 'div',
67307 { className: 'col-md-6' },
67308 _react2.default.createElement(
67309 'div',
67310 { className: 'small-box bg-light-blue' },
67311 _react2.default.createElement(
67312 'div',
67313 { className: 'inner' },
67314 _react2.default.createElement(
67315 'h3',
67316 { style: _style.HomePage.widgetBox },
67317 this.props.ownedProjects.length
67318 ),
67319 _react2.default.createElement(
67320 'p',
67321 null,
67322 this.props.ownedProjects.length > 0 ? 'Projects Owned by Organization' : 'No Projects Associated with Organization'
67323 )
67324 ),
67325 _react2.default.createElement(
67326 'div',
67327 { className: 'icon' },
67328 _react2.default.createElement('i', { className: 'fa fa-cubes' })
67329 ),
67330 _react2.default.createElement(
67331 _reactRouter.Link,
67332 { to: basePath + 'projects/' + this.props.params.organizationId,
67333 className: 'small-box-footer' },
67334 'Show Projects ',
67335 _react2.default.createElement('i', { className: 'fa fa-arrow-circle-right' })
67336 )
67337 )
67338 )
67339 ),
67340 canDelete ? _react2.default.createElement(
67341 _reactBootstrap.Button,
67342 { bsStyle: 'danger',
67343 onClick: this.showModal,
67344 style: _style.ProfileBox.deleteButton },
67345 disabledAndSiteAdmin ? 'Force ' : '',
67346 ' Delete ...'
67347 ) : null,
67348 disabledAndSiteAdmin ? _react2.default.createElement(
67349 _reactBootstrap.Button,
67350 { bsStyle: 'primary',
67351 onClick: this.showModalEnableOrg,
67352 style: _style.ProfileBox.updateButton },
67353 'Enable Organization ...'
67354 ) : null,
67355 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
67356 cancelButtonStyle: 'default',
67357 closeHandler: this.hideModal,
67358 confirmButtonMessage: 'OK',
67359 confirmButtonStyle: 'danger',
67360 confirmHandler: this.confirmModal,
67361 confirmId: this.props.params.organizationId,
67362 modalMessage: disabledAndSiteAdmin ? 'Are you really sure that you forcefully want to delete ' + this.props.params.organizationId + '? After the ' + 'deletion there will no longer be any stored data for the organization. ' + 'If any projects are owned by "' + this.props.params.organizationId + '" these would be owned by any new user or ' + 'organization created at the now would be available id.' : 'Are you sure you want to delete ' + this.props.params.organizationId + '?' + ' This organization owns ' + nbrOfOwnedProjects + ' project(s).' + (nbrOfOwnedProjects > 0 ? ' Check projects table filtered by owner for full list. ' : ' ') + 'Deleted organizations still reside in the database with the extra property' + ' "disabled: true" and can be recovered manually.',
67363 showModal: this.state.showModal,
67364 title: 'Delete Organization' }),
67365 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
67366 cancelButtonStyle: 'default',
67367 closeHandler: this.hideModalEnableOrg,
67368 confirmButtonMessage: 'OK',
67369 confirmButtonStyle: 'danger',
67370 confirmHandler: this.confirmModalEnableOrg,
67371 confirmId: this.props.params.organizationId,
67372 modalMessage: 'Are you sure you want to re-enable the deleted organization "' + this.props.params.organizationId + '"?',
67373 showModal: this.state.showModalEnableOrg,
67374 title: "Enable Organization" })
67375 );
67376 }
67377 }]);
67378
67379 return OrganizationPage;
67380 }(_react.Component);
67381
67382 exports.default = OrganizationPage;
67383
67384
67385 OrganizationPage.propTypes = {
67386 basePath: _react.PropTypes.string.isRequired,
67387 canAuthorize: _react.PropTypes.bool.isRequired,
67388 ownedProjects: _react.PropTypes.array.isRequired,
67389 params: _react.PropTypes.shape({
67390 organizationId: _react2.default.PropTypes.string.isRequired
67391 })
67392 };
67393
67394/***/ },
67395/* 686 */
67396/***/ function(module, exports, __webpack_require__) {
67397
67398 'use strict';
67399
67400 Object.defineProperty(exports, "__esModule", {
67401 value: true
67402 });
67403
67404 var _reactRedux = __webpack_require__(629);
67405
67406 var _OrganizationAuthorizationWidget = __webpack_require__(687);
67407
67408 var _OrganizationAuthorizationWidget2 = _interopRequireDefault(_OrganizationAuthorizationWidget);
67409
67410 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67411
67412 /**
67413 * Separate component to hold the authorization widget for the organization page
67414 * @author patrickkerrypei / https://github.com/patrickkerrypei
67415 */
67416
67417 // Libraries
67418 var mapStateToProps = function mapStateToProps(state) {
67419 var users = state.users.users;
67420
67421 var enabledUsers = users.filter(function (user) {
67422 return !user.disabled;
67423 });
67424
67425 return {
67426 users: enabledUsers
67427 };
67428 };
67429 // Self defined
67430 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationAuthorizationWidget2.default);
67431
67432/***/ },
67433/* 687 */
67434/***/ function(module, exports, __webpack_require__) {
67435
67436 'use strict';
67437
67438 Object.defineProperty(exports, "__esModule", {
67439 value: true
67440 });
67441
67442 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; }; }();
67443
67444 var _react = __webpack_require__(89);
67445
67446 var _react2 = _interopRequireDefault(_react);
67447
67448 var _AuthorizationWidget = __webpack_require__(688);
67449
67450 var _AuthorizationWidget2 = _interopRequireDefault(_AuthorizationWidget);
67451
67452 var _utils = __webpack_require__(658);
67453
67454 var _users = __webpack_require__(665);
67455
67456 var _organizations = __webpack_require__(669);
67457
67458 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67459
67460 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67461
67462 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; }
67463
67464 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; } /**
67465 * Separate component to hold the authorization widget for the organization page
67466 * @author patrickkerrypei / https://github.com/patrickkerrypei
67467 */
67468
67469 // Libraries
67470
67471 // Self defined
67472
67473
67474 var OrganizationAuthorizationWidget = function (_Component) {
67475 _inherits(OrganizationAuthorizationWidget, _Component);
67476
67477 function OrganizationAuthorizationWidget(props) {
67478 _classCallCheck(this, OrganizationAuthorizationWidget);
67479
67480 var _this = _possibleConstructorReturn(this, (OrganizationAuthorizationWidget.__proto__ || Object.getPrototypeOf(OrganizationAuthorizationWidget)).call(this, props));
67481
67482 _this.state = {
67483 valuesInMultiselect: ''
67484 };
67485 // Event Handlers
67486 _this.handleMultiselectChange = _this.handleMultiselectChange.bind(_this);
67487 _this.handleSubmitAuthorization = _this.handleSubmitAuthorization.bind(_this);
67488 return _this;
67489 }
67490
67491 _createClass(OrganizationAuthorizationWidget, [{
67492 key: 'componentDidMount',
67493 value: function componentDidMount() {
67494 var _props = this.props;
67495 var dispatch = _props.dispatch;
67496 var users = _props.users;
67497
67498 dispatch((0, _users.fetchUsersIfNeeded)());
67499
67500 var multiselectOptions = (0, _utils.multiselectFormat)(users.sort((0, _utils.sortObjectArrayByField)('_id')));
67501 this.setState({
67502 multiselectOptions: multiselectOptions
67503 });
67504 }
67505 }, {
67506 key: 'componentWillReceiveProps',
67507 value: function componentWillReceiveProps(nextProps) {
67508 var users = nextProps.users;
67509
67510
67511 var multiselectOptions = (0, _utils.multiselectFormat)(users.sort((0, _utils.sortObjectArrayByField)('_id')));
67512 this.setState({
67513 multiselectOptions: multiselectOptions
67514 });
67515 }
67516 }, {
67517 key: 'handleMultiselectChange',
67518 value: function handleMultiselectChange(value) {
67519 this.setState({
67520 valuesInMultiselect: value || ''
67521 });
67522 }
67523 }, {
67524 key: 'handleSubmitAuthorization',
67525 value: function handleSubmitAuthorization(event) {
67526 var _this2 = this;
67527
67528 var dispatch = this.props.dispatch;
67529
67530 var promiseArrayToGrant = [];
67531
67532 if (this.state.valuesInMultiselect !== '') {
67533 this.state.valuesInMultiselect.split(',').forEach(function (username) {
67534 promiseArrayToGrant.push(_this2.props.restClient.organizations.addUserToOrganization(_this2.props.organizationId, username));
67535 });
67536 }
67537
67538 Promise.all(promiseArrayToGrant).then(function () {
67539 // Have to update the list after authorization rights change
67540 dispatch((0, _users.fetchUsers)());
67541 dispatch((0, _organizations.fetchOrganizations)());
67542 }).catch(function (err) {
67543 console.error(err); // eslint-disable-line no-console
67544 });
67545
67546 // Empty multiselect after submission
67547 this.setState({
67548 valuesInMultiselect: ''
67549 });
67550 }
67551 }, {
67552 key: 'render',
67553 value: function render() {
67554 var canAuthorize = this.props.canAuthorize;
67555
67556
67557 var authorizationWidgetData = {
67558 submitButtons: [{
67559 onChange: this.handleSubmitAuthorization,
67560 text: 'Submit',
67561 state: 'primary',
67562 disabled: this.state.valuesInMultiselect === ''
67563 }]
67564 };
67565
67566 return canAuthorize ? _react2.default.createElement(_AuthorizationWidget2.default, { boxSize: '12',
67567 disableLast: true,
67568 handleMultiselectChange: this.handleMultiselectChange,
67569 label: "Add Members",
67570 multi: true,
67571 multiselectOptions: this.state.multiselectOptions,
67572 noneSelected: this.state.valuesInMultiselect === '',
67573 submitButtons: authorizationWidgetData.submitButtons,
67574 valuesInMultiselect: this.state.valuesInMultiselect }) : null;
67575 }
67576 }]);
67577
67578 return OrganizationAuthorizationWidget;
67579 }(_react.Component);
67580
67581 exports.default = OrganizationAuthorizationWidget;
67582
67583
67584 OrganizationAuthorizationWidget.propTypes = {
67585 users: _react.PropTypes.array.isRequired
67586 };
67587
67588/***/ },
67589/* 688 */
67590/***/ function(module, exports, __webpack_require__) {
67591
67592 'use strict';
67593
67594 Object.defineProperty(exports, "__esModule", {
67595 value: true
67596 });
67597
67598 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; }; }();
67599
67600 var _react = __webpack_require__(89);
67601
67602 var _react2 = _interopRequireDefault(_react);
67603
67604 var _reactBootstrap = __webpack_require__(334);
67605
67606 var _Multiselect = __webpack_require__(689);
67607
67608 var _Multiselect2 = _interopRequireDefault(_Multiselect);
67609
67610 var _style = __webpack_require__(598);
67611
67612 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67613
67614 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67615
67616 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; }
67617
67618 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; } /**
67619 * Authorization widget
67620 * @author patrickkerrypei / https://github.com/patrickkerrypei
67621 */
67622
67623 // Libraries
67624
67625 // Self-defined
67626
67627 // Style
67628
67629
67630 var AuthorizationWidget = function (_Component) {
67631 _inherits(AuthorizationWidget, _Component);
67632
67633 function AuthorizationWidget() {
67634 _classCallCheck(this, AuthorizationWidget);
67635
67636 return _possibleConstructorReturn(this, (AuthorizationWidget.__proto__ || Object.getPrototypeOf(AuthorizationWidget)).apply(this, arguments));
67637 }
67638
67639 _createClass(AuthorizationWidget, [{
67640 key: 'render',
67641 value: function render() {
67642 var _this2 = this;
67643
67644 // Selectable buttons
67645 var selectableButtons = [];
67646 Object.keys(this.props.selectableButtons).forEach(function (key, index) {
67647 selectableButtons.push(_react2.default.createElement(
67648 _reactBootstrap.Button,
67649 { bsStyle: _this2.props.selectableButtons[index].state,
67650 onClick: _this2.props.selectableButtons[index].onChange,
67651 bsSize: 'small',
67652 key: index },
67653 _this2.props.selectableButtons[index].text
67654 ));
67655 });
67656
67657 // Submit buttons
67658 var submitButtons = [];
67659 this.props.submitButtons.forEach(function (button, index) {
67660 if (!(_this2.props.disableLast && index === _this2.props.submitButtons.length - 1 && _this2.props.noneSelected)) {
67661 submitButtons.push(_react2.default.createElement(
67662 _reactBootstrap.Button,
67663 { bsStyle: button.state,
67664 className: _this2.props.disableLast && index === _this2.props.submitButtons.length - 1 && button.disabled ? "disabled" : "",
67665 key: index,
67666
67667 onClick: _this2.props.disableLast && index === _this2.props.submitButtons.length - 1 && _this2.props.noneSelected ? function (event) {
67668 return event.target.blur();
67669 } : button.onChange },
67670 button.text
67671 ));
67672 }
67673 });
67674
67675 return _react2.default.createElement(
67676 'div',
67677 { className: 'row' },
67678 _react2.default.createElement(
67679 'div',
67680 { className: 'col-md-' + this.props.boxSize },
67681 _react2.default.createElement(
67682 'div',
67683 { className: 'box' },
67684 _react2.default.createElement(
67685 'div',
67686 { className: 'box-header with-border' },
67687 _react2.default.createElement(
67688 'div',
67689 { className: 'row' },
67690 _react2.default.createElement(
67691 'div',
67692 { className: 'col-sm-8' },
67693 _react2.default.createElement(_Multiselect2.default, {
67694 label: this.props.label,
67695 multi: this.props.multi,
67696 onChange: this.props.handleMultiselectChange,
67697 options: this.props.multiselectOptions,
67698 placeholder: this.props.placeholder,
67699 valuesInMultiselect: this.props.valuesInMultiselect })
67700 ),
67701 _react2.default.createElement(
67702 'div',
67703 { className: 'col-sm-4', style: _style.AuthorizationWidget.selectableButtonGroup },
67704 _react2.default.createElement(
67705 _reactBootstrap.OverlayTrigger,
67706 { key: 'pop-over-buttons',
67707 trigger: ["hover", "focus"],
67708 placement: 'top',
67709 delayShow: 1000,
67710 overlay: _react2.default.createElement(
67711 _reactBootstrap.Popover,
67712 { title: this.props.selectableButtonsHelperTitle, id: 'btn-pop' },
67713 this.props.selectableButtonsHelperText
67714 ) },
67715 _react2.default.createElement(
67716 _reactBootstrap.ButtonGroup,
67717 null,
67718 selectableButtons
67719 )
67720 )
67721 )
67722 ),
67723 _react2.default.createElement(
67724 'div',
67725 { className: 'row', style: _style.AuthorizationWidget.submitButtonGroup },
67726 _react2.default.createElement(
67727 _reactBootstrap.ButtonGroup,
67728 null,
67729 submitButtons
67730 )
67731 )
67732 )
67733 )
67734 )
67735 );
67736 }
67737 }]);
67738
67739 return AuthorizationWidget;
67740 }(_react.Component);
67741
67742 exports.default = AuthorizationWidget;
67743
67744
67745 AuthorizationWidget.defaultProps = {
67746 selectableButtons: [],
67747 submitButtons: []
67748 };
67749
67750/***/ },
67751/* 689 */
67752/***/ function(module, exports, __webpack_require__) {
67753
67754 'use strict';
67755
67756 Object.defineProperty(exports, "__esModule", {
67757 value: true
67758 });
67759
67760 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; }; }();
67761
67762 var _react = __webpack_require__(89);
67763
67764 var _react2 = _interopRequireDefault(_react);
67765
67766 var _reactSelect = __webpack_require__(690);
67767
67768 var _reactSelect2 = _interopRequireDefault(_reactSelect);
67769
67770 var _style = __webpack_require__(598);
67771
67772 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
67773
67774 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
67775
67776 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; }
67777
67778 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; } /**
67779 * Custom multiselect dropdown (typing enabled) widget
67780 * @author patrickkerrypei / https://github.com/patrickkerrypei
67781 */
67782
67783 // Libraries
67784
67785 // Style
67786
67787
67788 var MultiSelect = function (_Component) {
67789 _inherits(MultiSelect, _Component);
67790
67791 function MultiSelect(props) {
67792 _classCallCheck(this, MultiSelect);
67793
67794 var _this = _possibleConstructorReturn(this, (MultiSelect.__proto__ || Object.getPrototypeOf(MultiSelect)).call(this, props));
67795
67796 _this.state = {
67797 options: [],
67798 value: []
67799 };
67800 _this.handleSelectChange = _this.handleSelectChange.bind(_this);
67801 return _this;
67802 }
67803
67804 _createClass(MultiSelect, [{
67805 key: 'handleSelectChange',
67806 value: function handleSelectChange(value) {
67807 this.props.onChange(value);
67808 }
67809 }, {
67810 key: 'render',
67811 value: function render() {
67812
67813 return _react2.default.createElement(
67814 'div',
67815 { className: 'section', style: _style.Multiselect },
67816 _react2.default.createElement(
67817 'h3',
67818 { className: 'section-heading' },
67819 this.props.label
67820 ),
67821 _react2.default.createElement(_reactSelect2.default, { multi: this.props.multi,
67822 onChange: this.handleSelectChange,
67823 options: this.props.options,
67824 placeholder: this.props.placeholder,
67825 simpleValue: true,
67826 value: this.props.valuesInMultiselect })
67827 );
67828 }
67829 }]);
67830
67831 return MultiSelect;
67832 }(_react.Component);
67833
67834 exports.default = MultiSelect;
67835
67836/***/ },
67837/* 690 */
67838/***/ function(module, exports, __webpack_require__) {
67839
67840 /*!
67841 Copyright (c) 2016 Jed Watson.
67842 Licensed under the MIT License (MIT), see
67843 http://jedwatson.github.io/react-select
67844 */
67845
67846 'use strict';
67847
67848 Object.defineProperty(exports, '__esModule', {
67849 value: true
67850 });
67851
67852 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
67853
67854 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
67855
67856 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
67857
67858 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; }
67859
67860 var _react = __webpack_require__(89);
67861
67862 var _react2 = _interopRequireDefault(_react);
67863
67864 var _reactDom = __webpack_require__(122);
67865
67866 var _reactDom2 = _interopRequireDefault(_reactDom);
67867
67868 var _reactInputAutosize = __webpack_require__(691);
67869
67870 var _reactInputAutosize2 = _interopRequireDefault(_reactInputAutosize);
67871
67872 var _classnames = __webpack_require__(356);
67873
67874 var _classnames2 = _interopRequireDefault(_classnames);
67875
67876 var _utilsDefaultArrowRenderer = __webpack_require__(692);
67877
67878 var _utilsDefaultArrowRenderer2 = _interopRequireDefault(_utilsDefaultArrowRenderer);
67879
67880 var _utilsDefaultFilterOptions = __webpack_require__(693);
67881
67882 var _utilsDefaultFilterOptions2 = _interopRequireDefault(_utilsDefaultFilterOptions);
67883
67884 var _utilsDefaultMenuRenderer = __webpack_require__(695);
67885
67886 var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer);
67887
67888 var _Async = __webpack_require__(696);
67889
67890 var _Async2 = _interopRequireDefault(_Async);
67891
67892 var _AsyncCreatable = __webpack_require__(697);
67893
67894 var _AsyncCreatable2 = _interopRequireDefault(_AsyncCreatable);
67895
67896 var _Creatable = __webpack_require__(698);
67897
67898 var _Creatable2 = _interopRequireDefault(_Creatable);
67899
67900 var _Option = __webpack_require__(699);
67901
67902 var _Option2 = _interopRequireDefault(_Option);
67903
67904 var _Value = __webpack_require__(700);
67905
67906 var _Value2 = _interopRequireDefault(_Value);
67907
67908 function stringifyValue(value) {
67909 var valueType = typeof value;
67910 if (valueType === 'string') {
67911 return value;
67912 } else if (valueType === 'object') {
67913 return JSON.stringify(value);
67914 } else if (valueType === 'number' || valueType === 'boolean') {
67915 return String(value);
67916 } else {
67917 return '';
67918 }
67919 }
67920
67921 var stringOrNode = _react2['default'].PropTypes.oneOfType([_react2['default'].PropTypes.string, _react2['default'].PropTypes.node]);
67922
67923 var instanceId = 1;
67924
67925 var Select = _react2['default'].createClass({
67926
67927 displayName: 'Select',
67928
67929 propTypes: {
67930 addLabelText: _react2['default'].PropTypes.string, // placeholder displayed when you want to add a label on a multi-value input
67931 'aria-label': _react2['default'].PropTypes.string, // Aria label (for assistive tech)
67932 'aria-labelledby': _react2['default'].PropTypes.string, // HTML ID of an element that should be used as the label (for assistive tech)
67933 arrowRenderer: _react2['default'].PropTypes.func, // Create drop-down caret element
67934 autoBlur: _react2['default'].PropTypes.bool, // automatically blur the component when an option is selected
67935 autofocus: _react2['default'].PropTypes.bool, // autofocus the component on mount
67936 autosize: _react2['default'].PropTypes.bool, // whether to enable autosizing or not
67937 backspaceRemoves: _react2['default'].PropTypes.bool, // whether backspace removes an item if there is no text input
67938 backspaceToRemoveMessage: _react2['default'].PropTypes.string, // Message to use for screenreaders to press backspace to remove the current item - {label} is replaced with the item label
67939 className: _react2['default'].PropTypes.string, // className for the outer element
67940 clearAllText: stringOrNode, // title for the "clear" control when multi: true
67941 clearValueText: stringOrNode, // title for the "clear" control
67942 clearable: _react2['default'].PropTypes.bool, // should it be possible to reset value
67943 delimiter: _react2['default'].PropTypes.string, // delimiter to use to join multiple values for the hidden field value
67944 disabled: _react2['default'].PropTypes.bool, // whether the Select is disabled or not
67945 escapeClearsValue: _react2['default'].PropTypes.bool, // whether escape clears the value when the menu is closed
67946 filterOption: _react2['default'].PropTypes.func, // method to filter a single option (option, filterString)
67947 filterOptions: _react2['default'].PropTypes.any, // boolean to enable default filtering or function to filter the options array ([options], filterString, [values])
67948 ignoreAccents: _react2['default'].PropTypes.bool, // whether to strip diacritics when filtering
67949 ignoreCase: _react2['default'].PropTypes.bool, // whether to perform case-insensitive filtering
67950 inputProps: _react2['default'].PropTypes.object, // custom attributes for the Input
67951 inputRenderer: _react2['default'].PropTypes.func, // returns a custom input component
67952 instanceId: _react2['default'].PropTypes.string, // set the components instanceId
67953 isLoading: _react2['default'].PropTypes.bool, // whether the Select is loading externally or not (such as options being loaded)
67954 joinValues: _react2['default'].PropTypes.bool, // joins multiple values into a single form field with the delimiter (legacy mode)
67955 labelKey: _react2['default'].PropTypes.string, // path of the label value in option objects
67956 matchPos: _react2['default'].PropTypes.string, // (any|start) match the start or entire string when filtering
67957 matchProp: _react2['default'].PropTypes.string, // (any|label|value) which option property to filter on
67958 menuBuffer: _react2['default'].PropTypes.number, // optional buffer (in px) between the bottom of the viewport and the bottom of the menu
67959 menuContainerStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu container
67960 menuRenderer: _react2['default'].PropTypes.func, // renders a custom menu with options
67961 menuStyle: _react2['default'].PropTypes.object, // optional style to apply to the menu
67962 multi: _react2['default'].PropTypes.bool, // multi-value input
67963 name: _react2['default'].PropTypes.string, // generates a hidden <input /> tag with this field name for html forms
67964 noResultsText: stringOrNode, // placeholder displayed when there are no matching search results
67965 onBlur: _react2['default'].PropTypes.func, // onBlur handler: function (event) {}
67966 onBlurResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared on blur
67967 onChange: _react2['default'].PropTypes.func, // onChange handler: function (newValue) {}
67968 onClose: _react2['default'].PropTypes.func, // fires when the menu is closed
67969 onCloseResetsInput: _react2['default'].PropTypes.bool, // whether input is cleared when menu is closed through the arrow
67970 onFocus: _react2['default'].PropTypes.func, // onFocus handler: function (event) {}
67971 onInputChange: _react2['default'].PropTypes.func, // onInputChange handler: function (inputValue) {}
67972 onInputKeyDown: _react2['default'].PropTypes.func, // input keyDown handler: function (event) {}
67973 onMenuScrollToBottom: _react2['default'].PropTypes.func, // fires when the menu is scrolled to the bottom; can be used to paginate options
67974 onOpen: _react2['default'].PropTypes.func, // fires when the menu is opened
67975 onValueClick: _react2['default'].PropTypes.func, // onClick handler for value labels: function (value, event) {}
67976 openAfterFocus: _react2['default'].PropTypes.bool, // boolean to enable opening dropdown when focused
67977 openOnFocus: _react2['default'].PropTypes.bool, // always open options menu on focus
67978 optionClassName: _react2['default'].PropTypes.string, // additional class(es) to apply to the <Option /> elements
67979 optionComponent: _react2['default'].PropTypes.func, // option component to render in dropdown
67980 optionRenderer: _react2['default'].PropTypes.func, // optionRenderer: function (option) {}
67981 options: _react2['default'].PropTypes.array, // array of options
67982 pageSize: _react2['default'].PropTypes.number, // number of entries to page when using page up/down keys
67983 placeholder: stringOrNode, // field placeholder, displayed when there's no value
67984 required: _react2['default'].PropTypes.bool, // applies HTML5 required attribute when needed
67985 resetValue: _react2['default'].PropTypes.any, // value to use when you clear the control
67986 scrollMenuIntoView: _react2['default'].PropTypes.bool, // boolean to enable the viewport to shift so that the full menu fully visible when engaged
67987 searchable: _react2['default'].PropTypes.bool, // whether to enable searching feature or not
67988 simpleValue: _react2['default'].PropTypes.bool, // pass the value to onChange as a simple value (legacy pre 1.0 mode), defaults to false
67989 style: _react2['default'].PropTypes.object, // optional style to apply to the control
67990 tabIndex: _react2['default'].PropTypes.string, // optional tab index of the control
67991 tabSelectsValue: _react2['default'].PropTypes.bool, // whether to treat tabbing out while focused to be value selection
67992 value: _react2['default'].PropTypes.any, // initial field value
67993 valueComponent: _react2['default'].PropTypes.func, // value component to render
67994 valueKey: _react2['default'].PropTypes.string, // path of the label value in option objects
67995 valueRenderer: _react2['default'].PropTypes.func, // valueRenderer: function (option) {}
67996 wrapperStyle: _react2['default'].PropTypes.object },
67997
67998 // optional style to apply to the component wrapper
67999 statics: { Async: _Async2['default'], AsyncCreatable: _AsyncCreatable2['default'], Creatable: _Creatable2['default'] },
68000
68001 getDefaultProps: function getDefaultProps() {
68002 return {
68003 addLabelText: 'Add "{label}"?',
68004 arrowRenderer: _utilsDefaultArrowRenderer2['default'],
68005 autosize: true,
68006 backspaceRemoves: true,
68007 backspaceToRemoveMessage: 'Press backspace to remove {label}',
68008 clearable: true,
68009 clearAllText: 'Clear all',
68010 clearValueText: 'Clear value',
68011 delimiter: ',',
68012 disabled: false,
68013 escapeClearsValue: true,
68014 filterOptions: _utilsDefaultFilterOptions2['default'],
68015 ignoreAccents: true,
68016 ignoreCase: true,
68017 inputProps: {},
68018 isLoading: false,
68019 joinValues: false,
68020 labelKey: 'label',
68021 matchPos: 'any',
68022 matchProp: 'any',
68023 menuBuffer: 0,
68024 menuRenderer: _utilsDefaultMenuRenderer2['default'],
68025 multi: false,
68026 noResultsText: 'No results found',
68027 onBlurResetsInput: true,
68028 onCloseResetsInput: true,
68029 openAfterFocus: false,
68030 optionComponent: _Option2['default'],
68031 pageSize: 5,
68032 placeholder: 'Select...',
68033 required: false,
68034 scrollMenuIntoView: true,
68035 searchable: true,
68036 simpleValue: false,
68037 tabSelectsValue: true,
68038 valueComponent: _Value2['default'],
68039 valueKey: 'value'
68040 };
68041 },
68042
68043 getInitialState: function getInitialState() {
68044 return {
68045 inputValue: '',
68046 isFocused: false,
68047 isOpen: false,
68048 isPseudoFocused: false,
68049 required: false
68050 };
68051 },
68052
68053 componentWillMount: function componentWillMount() {
68054 this._instancePrefix = 'react-select-' + (this.props.instanceId || ++instanceId) + '-';
68055 var valueArray = this.getValueArray(this.props.value);
68056
68057 if (this.props.required) {
68058 this.setState({
68059 required: this.handleRequired(valueArray[0], this.props.multi)
68060 });
68061 }
68062 },
68063
68064 componentDidMount: function componentDidMount() {
68065 if (this.props.autofocus) {
68066 this.focus();
68067 }
68068 },
68069
68070 componentWillReceiveProps: function componentWillReceiveProps(nextProps) {
68071 var valueArray = this.getValueArray(nextProps.value, nextProps);
68072
68073 if (nextProps.required) {
68074 this.setState({
68075 required: this.handleRequired(valueArray[0], nextProps.multi)
68076 });
68077 }
68078 },
68079
68080 componentWillUpdate: function componentWillUpdate(nextProps, nextState) {
68081 if (nextState.isOpen !== this.state.isOpen) {
68082 this.toggleTouchOutsideEvent(nextState.isOpen);
68083 var handler = nextState.isOpen ? nextProps.onOpen : nextProps.onClose;
68084 handler && handler();
68085 }
68086 },
68087
68088 componentDidUpdate: function componentDidUpdate(prevProps, prevState) {
68089 // focus to the selected option
68090 if (this.menu && this.focused && this.state.isOpen && !this.hasScrolledToOption) {
68091 var focusedOptionNode = _reactDom2['default'].findDOMNode(this.focused);
68092 var menuNode = _reactDom2['default'].findDOMNode(this.menu);
68093 menuNode.scrollTop = focusedOptionNode.offsetTop;
68094 this.hasScrolledToOption = true;
68095 } else if (!this.state.isOpen) {
68096 this.hasScrolledToOption = false;
68097 }
68098
68099 if (this._scrollToFocusedOptionOnUpdate && this.focused && this.menu) {
68100 this._scrollToFocusedOptionOnUpdate = false;
68101 var focusedDOM = _reactDom2['default'].findDOMNode(this.focused);
68102 var menuDOM = _reactDom2['default'].findDOMNode(this.menu);
68103 var focusedRect = focusedDOM.getBoundingClientRect();
68104 var menuRect = menuDOM.getBoundingClientRect();
68105 if (focusedRect.bottom > menuRect.bottom || focusedRect.top < menuRect.top) {
68106 menuDOM.scrollTop = focusedDOM.offsetTop + focusedDOM.clientHeight - menuDOM.offsetHeight;
68107 }
68108 }
68109 if (this.props.scrollMenuIntoView && this.menuContainer) {
68110 var menuContainerRect = this.menuContainer.getBoundingClientRect();
68111 if (window.innerHeight < menuContainerRect.bottom + this.props.menuBuffer) {
68112 window.scrollBy(0, menuContainerRect.bottom + this.props.menuBuffer - window.innerHeight);
68113 }
68114 }
68115 if (prevProps.disabled !== this.props.disabled) {
68116 this.setState({ isFocused: false }); // eslint-disable-line react/no-did-update-set-state
68117 this.closeMenu();
68118 }
68119 },
68120
68121 componentWillUnmount: function componentWillUnmount() {
68122 document.removeEventListener('touchstart', this.handleTouchOutside);
68123 },
68124
68125 toggleTouchOutsideEvent: function toggleTouchOutsideEvent(enabled) {
68126 if (enabled) {
68127 document.addEventListener('touchstart', this.handleTouchOutside);
68128 } else {
68129 document.removeEventListener('touchstart', this.handleTouchOutside);
68130 }
68131 },
68132
68133 handleTouchOutside: function handleTouchOutside(event) {
68134 // handle touch outside on ios to dismiss menu
68135 if (this.wrapper && !this.wrapper.contains(event.target)) {
68136 this.closeMenu();
68137 }
68138 },
68139
68140 focus: function focus() {
68141 if (!this.input) return;
68142 this.input.focus();
68143
68144 if (this.props.openAfterFocus) {
68145 this.setState({
68146 isOpen: true
68147 });
68148 }
68149 },
68150
68151 blurInput: function blurInput() {
68152 if (!this.input) return;
68153 this.input.blur();
68154 },
68155
68156 handleTouchMove: function handleTouchMove(event) {
68157 // Set a flag that the view is being dragged
68158 this.dragging = true;
68159 },
68160
68161 handleTouchStart: function handleTouchStart(event) {
68162 // Set a flag that the view is not being dragged
68163 this.dragging = false;
68164 },
68165
68166 handleTouchEnd: function handleTouchEnd(event) {
68167 // Check if the view is being dragged, In this case
68168 // we don't want to fire the click event (because the user only wants to scroll)
68169 if (this.dragging) return;
68170
68171 // Fire the mouse events
68172 this.handleMouseDown(event);
68173 },
68174
68175 handleTouchEndClearValue: function handleTouchEndClearValue(event) {
68176 // Check if the view is being dragged, In this case
68177 // we don't want to fire the click event (because the user only wants to scroll)
68178 if (this.dragging) return;
68179
68180 // Clear the value
68181 this.clearValue(event);
68182 },
68183
68184 handleMouseDown: function handleMouseDown(event) {
68185 // if the event was triggered by a mousedown and not the primary
68186 // button, or if the component is disabled, ignore it.
68187 if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {
68188 return;
68189 }
68190
68191 if (event.target.tagName === 'INPUT') {
68192 return;
68193 }
68194
68195 // prevent default event handlers
68196 event.stopPropagation();
68197 event.preventDefault();
68198
68199 // for the non-searchable select, toggle the menu
68200 if (!this.props.searchable) {
68201 this.focus();
68202 return this.setState({
68203 isOpen: !this.state.isOpen
68204 });
68205 }
68206
68207 if (this.state.isFocused) {
68208 // On iOS, we can get into a state where we think the input is focused but it isn't really,
68209 // since iOS ignores programmatic calls to input.focus() that weren't triggered by a click event.
68210 // Call focus() again here to be safe.
68211 this.focus();
68212
68213 var input = this.input;
68214 if (typeof input.getInput === 'function') {
68215 // Get the actual DOM input if the ref is an <AutosizeInput /> component
68216 input = input.getInput();
68217 }
68218
68219 // clears the value so that the cursor will be at the end of input when the component re-renders
68220 input.value = '';
68221
68222 // if the input is focused, ensure the menu is open
68223 this.setState({
68224 isOpen: true,
68225 isPseudoFocused: false
68226 });
68227 } else {
68228 // otherwise, focus the input and open the menu
68229 this._openAfterFocus = true;
68230 this.focus();
68231 }
68232 },
68233
68234 handleMouseDownOnArrow: function handleMouseDownOnArrow(event) {
68235 // if the event was triggered by a mousedown and not the primary
68236 // button, or if the component is disabled, ignore it.
68237 if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {
68238 return;
68239 }
68240 // If the menu isn't open, let the event bubble to the main handleMouseDown
68241 if (!this.state.isOpen) {
68242 return;
68243 }
68244 // prevent default event handlers
68245 event.stopPropagation();
68246 event.preventDefault();
68247 // close the menu
68248 this.closeMenu();
68249 },
68250
68251 handleMouseDownOnMenu: function handleMouseDownOnMenu(event) {
68252 // if the event was triggered by a mousedown and not the primary
68253 // button, or if the component is disabled, ignore it.
68254 if (this.props.disabled || event.type === 'mousedown' && event.button !== 0) {
68255 return;
68256 }
68257 event.stopPropagation();
68258 event.preventDefault();
68259
68260 this._openAfterFocus = true;
68261 this.focus();
68262 },
68263
68264 closeMenu: function closeMenu() {
68265 if (this.props.onCloseResetsInput) {
68266 this.setState({
68267 isOpen: false,
68268 isPseudoFocused: this.state.isFocused && !this.props.multi,
68269 inputValue: ''
68270 });
68271 } else {
68272 this.setState({
68273 isOpen: false,
68274 isPseudoFocused: this.state.isFocused && !this.props.multi,
68275 inputValue: this.state.inputValue
68276 });
68277 }
68278 this.hasScrolledToOption = false;
68279 },
68280
68281 handleInputFocus: function handleInputFocus(event) {
68282 if (this.props.disabled) return;
68283 var isOpen = this.state.isOpen || this._openAfterFocus || this.props.openOnFocus;
68284 if (this.props.onFocus) {
68285 this.props.onFocus(event);
68286 }
68287 this.setState({
68288 isFocused: true,
68289 isOpen: isOpen
68290 });
68291 this._openAfterFocus = false;
68292 },
68293
68294 handleInputBlur: function handleInputBlur(event) {
68295 // The check for menu.contains(activeElement) is necessary to prevent IE11's scrollbar from closing the menu in certain contexts.
68296 if (this.menu && (this.menu === document.activeElement || this.menu.contains(document.activeElement))) {
68297 this.focus();
68298 return;
68299 }
68300
68301 if (this.props.onBlur) {
68302 this.props.onBlur(event);
68303 }
68304 var onBlurredState = {
68305 isFocused: false,
68306 isOpen: false,
68307 isPseudoFocused: false
68308 };
68309 if (this.props.onBlurResetsInput) {
68310 onBlurredState.inputValue = '';
68311 }
68312 this.setState(onBlurredState);
68313 },
68314
68315 handleInputChange: function handleInputChange(event) {
68316 var newInputValue = event.target.value;
68317
68318 if (this.state.inputValue !== event.target.value && this.props.onInputChange) {
68319 var nextState = this.props.onInputChange(newInputValue);
68320 // Note: != used deliberately here to catch undefined and null
68321 if (nextState != null && typeof nextState !== 'object') {
68322 newInputValue = '' + nextState;
68323 }
68324 }
68325
68326 this.setState({
68327 isOpen: true,
68328 isPseudoFocused: false,
68329 inputValue: newInputValue
68330 });
68331 },
68332
68333 handleKeyDown: function handleKeyDown(event) {
68334 if (this.props.disabled) return;
68335
68336 if (typeof this.props.onInputKeyDown === 'function') {
68337 this.props.onInputKeyDown(event);
68338 if (event.defaultPrevented) {
68339 return;
68340 }
68341 }
68342
68343 switch (event.keyCode) {
68344 case 8:
68345 // backspace
68346 if (!this.state.inputValue && this.props.backspaceRemoves) {
68347 event.preventDefault();
68348 this.popValue();
68349 }
68350 return;
68351 case 9:
68352 // tab
68353 if (event.shiftKey || !this.state.isOpen || !this.props.tabSelectsValue) {
68354 return;
68355 }
68356 this.selectFocusedOption();
68357 return;
68358 case 13:
68359 // enter
68360 if (!this.state.isOpen) return;
68361 event.stopPropagation();
68362 this.selectFocusedOption();
68363 break;
68364 case 27:
68365 // escape
68366 if (this.state.isOpen) {
68367 this.closeMenu();
68368 event.stopPropagation();
68369 } else if (this.props.clearable && this.props.escapeClearsValue) {
68370 this.clearValue(event);
68371 event.stopPropagation();
68372 }
68373 break;
68374 case 38:
68375 // up
68376 this.focusPreviousOption();
68377 break;
68378 case 40:
68379 // down
68380 this.focusNextOption();
68381 break;
68382 case 33:
68383 // page up
68384 this.focusPageUpOption();
68385 break;
68386 case 34:
68387 // page down
68388 this.focusPageDownOption();
68389 break;
68390 case 35:
68391 // end key
68392 if (event.shiftKey) {
68393 return;
68394 }
68395 this.focusEndOption();
68396 break;
68397 case 36:
68398 // home key
68399 if (event.shiftKey) {
68400 return;
68401 }
68402 this.focusStartOption();
68403 break;
68404 default:
68405 return;
68406 }
68407 event.preventDefault();
68408 },
68409
68410 handleValueClick: function handleValueClick(option, event) {
68411 if (!this.props.onValueClick) return;
68412 this.props.onValueClick(option, event);
68413 },
68414
68415 handleMenuScroll: function handleMenuScroll(event) {
68416 if (!this.props.onMenuScrollToBottom) return;
68417 var target = event.target;
68418
68419 if (target.scrollHeight > target.offsetHeight && !(target.scrollHeight - target.offsetHeight - target.scrollTop)) {
68420 this.props.onMenuScrollToBottom();
68421 }
68422 },
68423
68424 handleRequired: function handleRequired(value, multi) {
68425 if (!value) return true;
68426 return multi ? value.length === 0 : Object.keys(value).length === 0;
68427 },
68428
68429 getOptionLabel: function getOptionLabel(op) {
68430 return op[this.props.labelKey];
68431 },
68432
68433 /**
68434 * Turns a value into an array from the given options
68435 * @param {String|Number|Array} value - the value of the select input
68436 * @param {Object} nextProps - optionally specify the nextProps so the returned array uses the latest configuration
68437 * @returns {Array} the value of the select represented in an array
68438 */
68439 getValueArray: function getValueArray(value, nextProps) {
68440 var _this = this;
68441
68442 /** support optionally passing in the `nextProps` so `componentWillReceiveProps` updates will function as expected */
68443 var props = typeof nextProps === 'object' ? nextProps : this.props;
68444 if (props.multi) {
68445 if (typeof value === 'string') value = value.split(props.delimiter);
68446 if (!Array.isArray(value)) {
68447 if (value === null || value === undefined) return [];
68448 value = [value];
68449 }
68450 return value.map(function (value) {
68451 return _this.expandValue(value, props);
68452 }).filter(function (i) {
68453 return i;
68454 });
68455 }
68456 var expandedValue = this.expandValue(value, props);
68457 return expandedValue ? [expandedValue] : [];
68458 },
68459
68460 /**
68461 * Retrieve a value from the given options and valueKey
68462 * @param {String|Number|Array} value - the selected value(s)
68463 * @param {Object} props - the Select component's props (or nextProps)
68464 */
68465 expandValue: function expandValue(value, props) {
68466 var valueType = typeof value;
68467 if (valueType !== 'string' && valueType !== 'number' && valueType !== 'boolean') return value;
68468 var options = props.options;
68469 var valueKey = props.valueKey;
68470
68471 if (!options) return;
68472 for (var i = 0; i < options.length; i++) {
68473 if (options[i][valueKey] === value) return options[i];
68474 }
68475 },
68476
68477 setValue: function setValue(value) {
68478 var _this2 = this;
68479
68480 if (this.props.autoBlur) {
68481 this.blurInput();
68482 }
68483 if (!this.props.onChange) return;
68484 if (this.props.required) {
68485 var required = this.handleRequired(value, this.props.multi);
68486 this.setState({ required: required });
68487 }
68488 if (this.props.simpleValue && value) {
68489 value = this.props.multi ? value.map(function (i) {
68490 return i[_this2.props.valueKey];
68491 }).join(this.props.delimiter) : value[this.props.valueKey];
68492 }
68493 this.props.onChange(value);
68494 },
68495
68496 selectValue: function selectValue(value) {
68497 var _this3 = this;
68498
68499 //NOTE: update value in the callback to make sure the input value is empty so that there are no styling issues (Chrome had issue otherwise)
68500 this.hasScrolledToOption = false;
68501 if (this.props.multi) {
68502 this.setState({
68503 inputValue: '',
68504 focusedIndex: null
68505 }, function () {
68506 _this3.addValue(value);
68507 });
68508 } else {
68509 this.setState({
68510 isOpen: false,
68511 inputValue: '',
68512 isPseudoFocused: this.state.isFocused
68513 }, function () {
68514 _this3.setValue(value);
68515 });
68516 }
68517 },
68518
68519 addValue: function addValue(value) {
68520 var valueArray = this.getValueArray(this.props.value);
68521 this.setValue(valueArray.concat(value));
68522 },
68523
68524 popValue: function popValue() {
68525 var valueArray = this.getValueArray(this.props.value);
68526 if (!valueArray.length) return;
68527 if (valueArray[valueArray.length - 1].clearableValue === false) return;
68528 this.setValue(valueArray.slice(0, valueArray.length - 1));
68529 },
68530
68531 removeValue: function removeValue(value) {
68532 var valueArray = this.getValueArray(this.props.value);
68533 this.setValue(valueArray.filter(function (i) {
68534 return i !== value;
68535 }));
68536 this.focus();
68537 },
68538
68539 clearValue: function clearValue(event) {
68540 // if the event was triggered by a mousedown and not the primary
68541 // button, ignore it.
68542 if (event && event.type === 'mousedown' && event.button !== 0) {
68543 return;
68544 }
68545 event.stopPropagation();
68546 event.preventDefault();
68547 this.setValue(this.getResetValue());
68548 this.setState({
68549 isOpen: false,
68550 inputValue: ''
68551 }, this.focus);
68552 },
68553
68554 getResetValue: function getResetValue() {
68555 if (this.props.resetValue !== undefined) {
68556 return this.props.resetValue;
68557 } else if (this.props.multi) {
68558 return [];
68559 } else {
68560 return null;
68561 }
68562 },
68563
68564 focusOption: function focusOption(option) {
68565 this.setState({
68566 focusedOption: option
68567 });
68568 },
68569
68570 focusNextOption: function focusNextOption() {
68571 this.focusAdjacentOption('next');
68572 },
68573
68574 focusPreviousOption: function focusPreviousOption() {
68575 this.focusAdjacentOption('previous');
68576 },
68577
68578 focusPageUpOption: function focusPageUpOption() {
68579 this.focusAdjacentOption('page_up');
68580 },
68581
68582 focusPageDownOption: function focusPageDownOption() {
68583 this.focusAdjacentOption('page_down');
68584 },
68585
68586 focusStartOption: function focusStartOption() {
68587 this.focusAdjacentOption('start');
68588 },
68589
68590 focusEndOption: function focusEndOption() {
68591 this.focusAdjacentOption('end');
68592 },
68593
68594 focusAdjacentOption: function focusAdjacentOption(dir) {
68595 var options = this._visibleOptions.map(function (option, index) {
68596 return { option: option, index: index };
68597 }).filter(function (option) {
68598 return !option.option.disabled;
68599 });
68600 this._scrollToFocusedOptionOnUpdate = true;
68601 if (!this.state.isOpen) {
68602 this.setState({
68603 isOpen: true,
68604 inputValue: '',
68605 focusedOption: this._focusedOption || options[dir === 'next' ? 0 : options.length - 1].option
68606 });
68607 return;
68608 }
68609 if (!options.length) return;
68610 var focusedIndex = -1;
68611 for (var i = 0; i < options.length; i++) {
68612 if (this._focusedOption === options[i].option) {
68613 focusedIndex = i;
68614 break;
68615 }
68616 }
68617 if (dir === 'next' && focusedIndex !== -1) {
68618 focusedIndex = (focusedIndex + 1) % options.length;
68619 } else if (dir === 'previous') {
68620 if (focusedIndex > 0) {
68621 focusedIndex = focusedIndex - 1;
68622 } else {
68623 focusedIndex = options.length - 1;
68624 }
68625 } else if (dir === 'start') {
68626 focusedIndex = 0;
68627 } else if (dir === 'end') {
68628 focusedIndex = options.length - 1;
68629 } else if (dir === 'page_up') {
68630 var potentialIndex = focusedIndex - this.props.pageSize;
68631 if (potentialIndex < 0) {
68632 focusedIndex = 0;
68633 } else {
68634 focusedIndex = potentialIndex;
68635 }
68636 } else if (dir === 'page_down') {
68637 var potentialIndex = focusedIndex + this.props.pageSize;
68638 if (potentialIndex > options.length - 1) {
68639 focusedIndex = options.length - 1;
68640 } else {
68641 focusedIndex = potentialIndex;
68642 }
68643 }
68644
68645 if (focusedIndex === -1) {
68646 focusedIndex = 0;
68647 }
68648
68649 this.setState({
68650 focusedIndex: options[focusedIndex].index,
68651 focusedOption: options[focusedIndex].option
68652 });
68653 },
68654
68655 getFocusedOption: function getFocusedOption() {
68656 return this._focusedOption;
68657 },
68658
68659 getInputValue: function getInputValue() {
68660 return this.state.inputValue;
68661 },
68662
68663 selectFocusedOption: function selectFocusedOption() {
68664 if (this._focusedOption) {
68665 return this.selectValue(this._focusedOption);
68666 }
68667 },
68668
68669 renderLoading: function renderLoading() {
68670 if (!this.props.isLoading) return;
68671 return _react2['default'].createElement(
68672 'span',
68673 { className: 'Select-loading-zone', 'aria-hidden': 'true' },
68674 _react2['default'].createElement('span', { className: 'Select-loading' })
68675 );
68676 },
68677
68678 renderValue: function renderValue(valueArray, isOpen) {
68679 var _this4 = this;
68680
68681 var renderLabel = this.props.valueRenderer || this.getOptionLabel;
68682 var ValueComponent = this.props.valueComponent;
68683 if (!valueArray.length) {
68684 return !this.state.inputValue ? _react2['default'].createElement(
68685 'div',
68686 { className: 'Select-placeholder' },
68687 this.props.placeholder
68688 ) : null;
68689 }
68690 var onClick = this.props.onValueClick ? this.handleValueClick : null;
68691 if (this.props.multi) {
68692 return valueArray.map(function (value, i) {
68693 return _react2['default'].createElement(
68694 ValueComponent,
68695 {
68696 id: _this4._instancePrefix + '-value-' + i,
68697 instancePrefix: _this4._instancePrefix,
68698 disabled: _this4.props.disabled || value.clearableValue === false,
68699 key: 'value-' + i + '-' + value[_this4.props.valueKey],
68700 onClick: onClick,
68701 onRemove: _this4.removeValue,
68702 value: value
68703 },
68704 renderLabel(value, i),
68705 _react2['default'].createElement(
68706 'span',
68707 { className: 'Select-aria-only' },
68708 ' '
68709 )
68710 );
68711 });
68712 } else if (!this.state.inputValue) {
68713 if (isOpen) onClick = null;
68714 return _react2['default'].createElement(
68715 ValueComponent,
68716 {
68717 id: this._instancePrefix + '-value-item',
68718 disabled: this.props.disabled,
68719 instancePrefix: this._instancePrefix,
68720 onClick: onClick,
68721 value: valueArray[0]
68722 },
68723 renderLabel(valueArray[0])
68724 );
68725 }
68726 },
68727
68728 renderInput: function renderInput(valueArray, focusedOptionIndex) {
68729 var _this5 = this;
68730
68731 if (this.props.inputRenderer) {
68732 return this.props.inputRenderer();
68733 } else {
68734 var _classNames;
68735
68736 var className = (0, _classnames2['default'])('Select-input', this.props.inputProps.className);
68737 var isOpen = !!this.state.isOpen;
68738
68739 var ariaOwns = (0, _classnames2['default'])((_classNames = {}, _defineProperty(_classNames, this._instancePrefix + '-list', isOpen), _defineProperty(_classNames, this._instancePrefix + '-backspace-remove-message', this.props.multi && !this.props.disabled && this.state.isFocused && !this.state.inputValue), _classNames));
68740
68741 // TODO: Check how this project includes Object.assign()
68742 var inputProps = _extends({}, this.props.inputProps, {
68743 role: 'combobox',
68744 'aria-expanded': '' + isOpen,
68745 'aria-owns': ariaOwns,
68746 'aria-haspopup': '' + isOpen,
68747 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
68748 'aria-labelledby': this.props['aria-labelledby'],
68749 'aria-label': this.props['aria-label'],
68750 className: className,
68751 tabIndex: this.props.tabIndex,
68752 onBlur: this.handleInputBlur,
68753 onChange: this.handleInputChange,
68754 onFocus: this.handleInputFocus,
68755 ref: function ref(_ref) {
68756 return _this5.input = _ref;
68757 },
68758 required: this.state.required,
68759 value: this.state.inputValue
68760 });
68761
68762 if (this.props.disabled || !this.props.searchable) {
68763 var _props$inputProps = this.props.inputProps;
68764 var inputClassName = _props$inputProps.inputClassName;
68765
68766 var divProps = _objectWithoutProperties(_props$inputProps, ['inputClassName']);
68767
68768 return _react2['default'].createElement('div', _extends({}, divProps, {
68769 role: 'combobox',
68770 'aria-expanded': isOpen,
68771 'aria-owns': isOpen ? this._instancePrefix + '-list' : this._instancePrefix + '-value',
68772 'aria-activedescendant': isOpen ? this._instancePrefix + '-option-' + focusedOptionIndex : this._instancePrefix + '-value',
68773 className: className,
68774 tabIndex: this.props.tabIndex || 0,
68775 onBlur: this.handleInputBlur,
68776 onFocus: this.handleInputFocus,
68777 ref: function (ref) {
68778 return _this5.input = ref;
68779 },
68780 'aria-readonly': '' + !!this.props.disabled,
68781 style: { border: 0, width: 1, display: 'inline-block' } }));
68782 }
68783
68784 if (this.props.autosize) {
68785 return _react2['default'].createElement(_reactInputAutosize2['default'], _extends({}, inputProps, { minWidth: '5px' }));
68786 }
68787 return _react2['default'].createElement(
68788 'div',
68789 { className: className },
68790 _react2['default'].createElement('input', inputProps)
68791 );
68792 }
68793 },
68794
68795 renderClear: function renderClear() {
68796 if (!this.props.clearable || !this.props.value || this.props.value === 0 || this.props.multi && !this.props.value.length || this.props.disabled || this.props.isLoading) return;
68797 return _react2['default'].createElement(
68798 'span',
68799 { className: 'Select-clear-zone', title: this.props.multi ? this.props.clearAllText : this.props.clearValueText,
68800 'aria-label': this.props.multi ? this.props.clearAllText : this.props.clearValueText,
68801 onMouseDown: this.clearValue,
68802 onTouchStart: this.handleTouchStart,
68803 onTouchMove: this.handleTouchMove,
68804 onTouchEnd: this.handleTouchEndClearValue
68805 },
68806 _react2['default'].createElement('span', { className: 'Select-clear', dangerouslySetInnerHTML: { __html: '&times;' } })
68807 );
68808 },
68809
68810 renderArrow: function renderArrow() {
68811 var onMouseDown = this.handleMouseDownOnArrow;
68812 var arrow = this.props.arrowRenderer({ onMouseDown: onMouseDown });
68813
68814 return _react2['default'].createElement(
68815 'span',
68816 {
68817 className: 'Select-arrow-zone',
68818 onMouseDown: onMouseDown
68819 },
68820 arrow
68821 );
68822 },
68823
68824 filterOptions: function filterOptions(excludeOptions) {
68825 var filterValue = this.state.inputValue;
68826 var options = this.props.options || [];
68827 if (this.props.filterOptions) {
68828 // Maintain backwards compatibility with boolean attribute
68829 var filterOptions = typeof this.props.filterOptions === 'function' ? this.props.filterOptions : _utilsDefaultFilterOptions2['default'];
68830
68831 return filterOptions(options, filterValue, excludeOptions, {
68832 filterOption: this.props.filterOption,
68833 ignoreAccents: this.props.ignoreAccents,
68834 ignoreCase: this.props.ignoreCase,
68835 labelKey: this.props.labelKey,
68836 matchPos: this.props.matchPos,
68837 matchProp: this.props.matchProp,
68838 valueKey: this.props.valueKey
68839 });
68840 } else {
68841 return options;
68842 }
68843 },
68844
68845 onOptionRef: function onOptionRef(ref, isFocused) {
68846 if (isFocused) {
68847 this.focused = ref;
68848 }
68849 },
68850
68851 renderMenu: function renderMenu(options, valueArray, focusedOption) {
68852 if (options && options.length) {
68853 return this.props.menuRenderer({
68854 focusedOption: focusedOption,
68855 focusOption: this.focusOption,
68856 instancePrefix: this._instancePrefix,
68857 labelKey: this.props.labelKey,
68858 onFocus: this.focusOption,
68859 onSelect: this.selectValue,
68860 optionClassName: this.props.optionClassName,
68861 optionComponent: this.props.optionComponent,
68862 optionRenderer: this.props.optionRenderer || this.getOptionLabel,
68863 options: options,
68864 selectValue: this.selectValue,
68865 valueArray: valueArray,
68866 valueKey: this.props.valueKey,
68867 onOptionRef: this.onOptionRef
68868 });
68869 } else if (this.props.noResultsText) {
68870 return _react2['default'].createElement(
68871 'div',
68872 { className: 'Select-noresults' },
68873 this.props.noResultsText
68874 );
68875 } else {
68876 return null;
68877 }
68878 },
68879
68880 renderHiddenField: function renderHiddenField(valueArray) {
68881 var _this6 = this;
68882
68883 if (!this.props.name) return;
68884 if (this.props.joinValues) {
68885 var value = valueArray.map(function (i) {
68886 return stringifyValue(i[_this6.props.valueKey]);
68887 }).join(this.props.delimiter);
68888 return _react2['default'].createElement('input', {
68889 type: 'hidden',
68890 ref: function (ref) {
68891 return _this6.value = ref;
68892 },
68893 name: this.props.name,
68894 value: value,
68895 disabled: this.props.disabled });
68896 }
68897 return valueArray.map(function (item, index) {
68898 return _react2['default'].createElement('input', { key: 'hidden.' + index,
68899 type: 'hidden',
68900 ref: 'value' + index,
68901 name: _this6.props.name,
68902 value: stringifyValue(item[_this6.props.valueKey]),
68903 disabled: _this6.props.disabled });
68904 });
68905 },
68906
68907 getFocusableOptionIndex: function getFocusableOptionIndex(selectedOption) {
68908 var options = this._visibleOptions;
68909 if (!options.length) return null;
68910
68911 var focusedOption = this.state.focusedOption || selectedOption;
68912 if (focusedOption && !focusedOption.disabled) {
68913 var focusedOptionIndex = options.indexOf(focusedOption);
68914 if (focusedOptionIndex !== -1) {
68915 return focusedOptionIndex;
68916 }
68917 }
68918
68919 for (var i = 0; i < options.length; i++) {
68920 if (!options[i].disabled) return i;
68921 }
68922 return null;
68923 },
68924
68925 renderOuter: function renderOuter(options, valueArray, focusedOption) {
68926 var _this7 = this;
68927
68928 var menu = this.renderMenu(options, valueArray, focusedOption);
68929 if (!menu) {
68930 return null;
68931 }
68932
68933 return _react2['default'].createElement(
68934 'div',
68935 { ref: function (ref) {
68936 return _this7.menuContainer = ref;
68937 }, className: 'Select-menu-outer', style: this.props.menuContainerStyle },
68938 _react2['default'].createElement(
68939 'div',
68940 { ref: function (ref) {
68941 return _this7.menu = ref;
68942 }, role: 'listbox', className: 'Select-menu', id: this._instancePrefix + '-list',
68943 style: this.props.menuStyle,
68944 onScroll: this.handleMenuScroll,
68945 onMouseDown: this.handleMouseDownOnMenu },
68946 menu
68947 )
68948 );
68949 },
68950
68951 render: function render() {
68952 var _this8 = this;
68953
68954 var valueArray = this.getValueArray(this.props.value);
68955 var options = this._visibleOptions = this.filterOptions(this.props.multi ? this.getValueArray(this.props.value) : null);
68956 var isOpen = this.state.isOpen;
68957 if (this.props.multi && !options.length && valueArray.length && !this.state.inputValue) isOpen = false;
68958 var focusedOptionIndex = this.getFocusableOptionIndex(valueArray[0]);
68959
68960 var focusedOption = null;
68961 if (focusedOptionIndex !== null) {
68962 focusedOption = this._focusedOption = options[focusedOptionIndex];
68963 } else {
68964 focusedOption = this._focusedOption = null;
68965 }
68966 var className = (0, _classnames2['default'])('Select', this.props.className, {
68967 'Select--multi': this.props.multi,
68968 'Select--single': !this.props.multi,
68969 'is-disabled': this.props.disabled,
68970 'is-focused': this.state.isFocused,
68971 'is-loading': this.props.isLoading,
68972 'is-open': isOpen,
68973 'is-pseudo-focused': this.state.isPseudoFocused,
68974 'is-searchable': this.props.searchable,
68975 'has-value': valueArray.length
68976 });
68977
68978 var removeMessage = null;
68979 if (this.props.multi && !this.props.disabled && valueArray.length && !this.state.inputValue && this.state.isFocused && this.props.backspaceRemoves) {
68980 removeMessage = _react2['default'].createElement(
68981 'span',
68982 { id: this._instancePrefix + '-backspace-remove-message', className: 'Select-aria-only', 'aria-live': 'assertive' },
68983 this.props.backspaceToRemoveMessage.replace('{label}', valueArray[valueArray.length - 1][this.props.labelKey])
68984 );
68985 }
68986
68987 return _react2['default'].createElement(
68988 'div',
68989 { ref: function (ref) {
68990 return _this8.wrapper = ref;
68991 },
68992 className: className,
68993 style: this.props.wrapperStyle },
68994 this.renderHiddenField(valueArray),
68995 _react2['default'].createElement(
68996 'div',
68997 { ref: function (ref) {
68998 return _this8.control = ref;
68999 },
69000 className: 'Select-control',
69001 style: this.props.style,
69002 onKeyDown: this.handleKeyDown,
69003 onMouseDown: this.handleMouseDown,
69004 onTouchEnd: this.handleTouchEnd,
69005 onTouchStart: this.handleTouchStart,
69006 onTouchMove: this.handleTouchMove
69007 },
69008 _react2['default'].createElement(
69009 'span',
69010 { className: 'Select-multi-value-wrapper', id: this._instancePrefix + '-value' },
69011 this.renderValue(valueArray, isOpen),
69012 this.renderInput(valueArray, focusedOptionIndex)
69013 ),
69014 removeMessage,
69015 this.renderLoading(),
69016 this.renderClear(),
69017 this.renderArrow()
69018 ),
69019 isOpen ? this.renderOuter(options, !this.props.multi ? valueArray : null, focusedOption) : null
69020 );
69021 }
69022
69023 });
69024
69025 exports['default'] = Select;
69026 module.exports = exports['default'];
69027
69028/***/ },
69029/* 691 */
69030/***/ function(module, exports, __webpack_require__) {
69031
69032 'use strict';
69033
69034 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
69035
69036 var React = __webpack_require__(89);
69037
69038 var sizerStyle = { position: 'absolute', top: 0, left: 0, visibility: 'hidden', height: 0, overflow: 'scroll', whiteSpace: 'pre' };
69039
69040 var AutosizeInput = React.createClass({
69041 displayName: 'AutosizeInput',
69042
69043 propTypes: {
69044 className: React.PropTypes.string, // className for the outer element
69045 defaultValue: React.PropTypes.any, // default field value
69046 inputClassName: React.PropTypes.string, // className for the input element
69047 inputStyle: React.PropTypes.object, // css styles for the input element
69048 minWidth: React.PropTypes.oneOfType([// minimum width for input element
69049 React.PropTypes.number, React.PropTypes.string]),
69050 onChange: React.PropTypes.func, // onChange handler: function(newValue) {}
69051 placeholder: React.PropTypes.string, // placeholder text
69052 placeholderIsMinWidth: React.PropTypes.bool, // don't collapse size to less than the placeholder
69053 style: React.PropTypes.object, // css styles for the outer element
69054 value: React.PropTypes.any },
69055 // field value
69056 getDefaultProps: function getDefaultProps() {
69057 return {
69058 minWidth: 1
69059 };
69060 },
69061 getInitialState: function getInitialState() {
69062 return {
69063 inputWidth: this.props.minWidth
69064 };
69065 },
69066 componentDidMount: function componentDidMount() {
69067 this.copyInputStyles();
69068 this.updateInputWidth();
69069 },
69070 componentDidUpdate: function componentDidUpdate() {
69071 this.updateInputWidth();
69072 },
69073 copyInputStyles: function copyInputStyles() {
69074 if (!this.isMounted() || !window.getComputedStyle) {
69075 return;
69076 }
69077 var inputStyle = window.getComputedStyle(this.refs.input);
69078 if (!inputStyle) {
69079 return;
69080 }
69081 var widthNode = this.refs.sizer;
69082 widthNode.style.fontSize = inputStyle.fontSize;
69083 widthNode.style.fontFamily = inputStyle.fontFamily;
69084 widthNode.style.fontWeight = inputStyle.fontWeight;
69085 widthNode.style.fontStyle = inputStyle.fontStyle;
69086 widthNode.style.letterSpacing = inputStyle.letterSpacing;
69087 if (this.props.placeholder) {
69088 var placeholderNode = this.refs.placeholderSizer;
69089 placeholderNode.style.fontSize = inputStyle.fontSize;
69090 placeholderNode.style.fontFamily = inputStyle.fontFamily;
69091 placeholderNode.style.fontWeight = inputStyle.fontWeight;
69092 placeholderNode.style.fontStyle = inputStyle.fontStyle;
69093 placeholderNode.style.letterSpacing = inputStyle.letterSpacing;
69094 }
69095 },
69096 updateInputWidth: function updateInputWidth() {
69097 if (!this.isMounted() || typeof this.refs.sizer.scrollWidth === 'undefined') {
69098 return;
69099 }
69100 var newInputWidth = undefined;
69101 if (this.props.placeholder && (!this.props.value || this.props.value && this.props.placeholderIsMinWidth)) {
69102 newInputWidth = Math.max(this.refs.sizer.scrollWidth, this.refs.placeholderSizer.scrollWidth) + 2;
69103 } else {
69104 newInputWidth = this.refs.sizer.scrollWidth + 2;
69105 }
69106 if (newInputWidth < this.props.minWidth) {
69107 newInputWidth = this.props.minWidth;
69108 }
69109 if (newInputWidth !== this.state.inputWidth) {
69110 this.setState({
69111 inputWidth: newInputWidth
69112 });
69113 }
69114 },
69115 getInput: function getInput() {
69116 return this.refs.input;
69117 },
69118 focus: function focus() {
69119 this.refs.input.focus();
69120 },
69121 blur: function blur() {
69122 this.refs.input.blur();
69123 },
69124 select: function select() {
69125 this.refs.input.select();
69126 },
69127 render: function render() {
69128 var sizerValue = this.props.defaultValue || this.props.value || '';
69129 var wrapperStyle = this.props.style || {};
69130 if (!wrapperStyle.display) wrapperStyle.display = 'inline-block';
69131 var inputStyle = _extends({}, this.props.inputStyle);
69132 inputStyle.width = this.state.inputWidth + 'px';
69133 inputStyle.boxSizing = 'content-box';
69134 var inputProps = _extends({}, this.props);
69135 inputProps.className = this.props.inputClassName;
69136 inputProps.style = inputStyle;
69137 // ensure props meant for `AutosizeInput` don't end up on the `input`
69138 delete inputProps.inputClassName;
69139 delete inputProps.inputStyle;
69140 delete inputProps.minWidth;
69141 delete inputProps.placeholderIsMinWidth;
69142 return React.createElement(
69143 'div',
69144 { className: this.props.className, style: wrapperStyle },
69145 React.createElement('input', _extends({}, inputProps, { ref: 'input' })),
69146 React.createElement(
69147 'div',
69148 { ref: 'sizer', style: sizerStyle },
69149 sizerValue
69150 ),
69151 this.props.placeholder ? React.createElement(
69152 'div',
69153 { ref: 'placeholderSizer', style: sizerStyle },
69154 this.props.placeholder
69155 ) : null
69156 );
69157 }
69158 });
69159
69160 module.exports = AutosizeInput;
69161
69162/***/ },
69163/* 692 */
69164/***/ function(module, exports, __webpack_require__) {
69165
69166 "use strict";
69167
69168 Object.defineProperty(exports, "__esModule", {
69169 value: true
69170 });
69171 exports["default"] = arrowRenderer;
69172
69173 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
69174
69175 var _react = __webpack_require__(89);
69176
69177 var _react2 = _interopRequireDefault(_react);
69178
69179 function arrowRenderer(_ref) {
69180 var onMouseDown = _ref.onMouseDown;
69181
69182 return _react2["default"].createElement("span", {
69183 className: "Select-arrow",
69184 onMouseDown: onMouseDown
69185 });
69186 }
69187
69188 ;
69189 module.exports = exports["default"];
69190
69191/***/ },
69192/* 693 */
69193/***/ function(module, exports, __webpack_require__) {
69194
69195 'use strict';
69196
69197 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69198
69199 var _stripDiacritics = __webpack_require__(694);
69200
69201 var _stripDiacritics2 = _interopRequireDefault(_stripDiacritics);
69202
69203 function filterOptions(options, filterValue, excludeOptions, props) {
69204 var _this = this;
69205
69206 if (props.ignoreAccents) {
69207 filterValue = (0, _stripDiacritics2['default'])(filterValue);
69208 }
69209
69210 if (props.ignoreCase) {
69211 filterValue = filterValue.toLowerCase();
69212 }
69213
69214 if (excludeOptions) excludeOptions = excludeOptions.map(function (i) {
69215 return i[props.valueKey];
69216 });
69217
69218 return options.filter(function (option) {
69219 if (excludeOptions && excludeOptions.indexOf(option[props.valueKey]) > -1) return false;
69220 if (props.filterOption) return props.filterOption.call(_this, option, filterValue);
69221 if (!filterValue) return true;
69222 var valueTest = String(option[props.valueKey]);
69223 var labelTest = String(option[props.labelKey]);
69224 if (props.ignoreAccents) {
69225 if (props.matchProp !== 'label') valueTest = (0, _stripDiacritics2['default'])(valueTest);
69226 if (props.matchProp !== 'value') labelTest = (0, _stripDiacritics2['default'])(labelTest);
69227 }
69228 if (props.ignoreCase) {
69229 if (props.matchProp !== 'label') valueTest = valueTest.toLowerCase();
69230 if (props.matchProp !== 'value') labelTest = labelTest.toLowerCase();
69231 }
69232 return props.matchPos === 'start' ? props.matchProp !== 'label' && valueTest.substr(0, filterValue.length) === filterValue || props.matchProp !== 'value' && labelTest.substr(0, filterValue.length) === filterValue : props.matchProp !== 'label' && valueTest.indexOf(filterValue) >= 0 || props.matchProp !== 'value' && labelTest.indexOf(filterValue) >= 0;
69233 });
69234 }
69235
69236 module.exports = filterOptions;
69237
69238/***/ },
69239/* 694 */
69240/***/ function(module, exports) {
69241
69242 'use strict';
69243
69244 var map = [{ 'base': 'A', 'letters': /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g }, { 'base': 'AA', 'letters': /[\uA732]/g }, { 'base': 'AE', 'letters': /[\u00C6\u01FC\u01E2]/g }, { 'base': 'AO', 'letters': /[\uA734]/g }, { 'base': 'AU', 'letters': /[\uA736]/g }, { 'base': 'AV', 'letters': /[\uA738\uA73A]/g }, { 'base': 'AY', 'letters': /[\uA73C]/g }, { 'base': 'B', 'letters': /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g }, { 'base': 'C', 'letters': /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g }, { 'base': 'D', 'letters': /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g }, { 'base': 'DZ', 'letters': /[\u01F1\u01C4]/g }, { 'base': 'Dz', 'letters': /[\u01F2\u01C5]/g }, { 'base': 'E', 'letters': /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g }, { 'base': 'F', 'letters': /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g }, { 'base': 'G', 'letters': /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g }, { 'base': 'H', 'letters': /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g }, { 'base': 'I', 'letters': /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g }, { 'base': 'J', 'letters': /[\u004A\u24BF\uFF2A\u0134\u0248]/g }, { 'base': 'K', 'letters': /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g }, { 'base': 'L', 'letters': /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g }, { 'base': 'LJ', 'letters': /[\u01C7]/g }, { 'base': 'Lj', 'letters': /[\u01C8]/g }, { 'base': 'M', 'letters': /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g }, { 'base': 'N', 'letters': /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g }, { 'base': 'NJ', 'letters': /[\u01CA]/g }, { 'base': 'Nj', 'letters': /[\u01CB]/g }, { 'base': 'O', 'letters': /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g }, { 'base': 'OI', 'letters': /[\u01A2]/g }, { 'base': 'OO', 'letters': /[\uA74E]/g }, { 'base': 'OU', 'letters': /[\u0222]/g }, { 'base': 'P', 'letters': /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g }, { 'base': 'Q', 'letters': /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g }, { 'base': 'R', 'letters': /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g }, { 'base': 'S', 'letters': /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g }, { 'base': 'T', 'letters': /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g }, { 'base': 'TZ', 'letters': /[\uA728]/g }, { 'base': 'U', 'letters': /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g }, { 'base': 'V', 'letters': /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g }, { 'base': 'VY', 'letters': /[\uA760]/g }, { 'base': 'W', 'letters': /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g }, { 'base': 'X', 'letters': /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g }, { 'base': 'Y', 'letters': /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g }, { 'base': 'Z', 'letters': /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g }, { 'base': 'a', 'letters': /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g }, { 'base': 'aa', 'letters': /[\uA733]/g }, { 'base': 'ae', 'letters': /[\u00E6\u01FD\u01E3]/g }, { 'base': 'ao', 'letters': /[\uA735]/g }, { 'base': 'au', 'letters': /[\uA737]/g }, { 'base': 'av', 'letters': /[\uA739\uA73B]/g }, { 'base': 'ay', 'letters': /[\uA73D]/g }, { 'base': 'b', 'letters': /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g }, { 'base': 'c', 'letters': /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g }, { 'base': 'd', 'letters': /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g }, { 'base': 'dz', 'letters': /[\u01F3\u01C6]/g }, { 'base': 'e', 'letters': /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g }, { 'base': 'f', 'letters': /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g }, { 'base': 'g', 'letters': /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g }, { 'base': 'h', 'letters': /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g }, { 'base': 'hv', 'letters': /[\u0195]/g }, { 'base': 'i', 'letters': /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g }, { 'base': 'j', 'letters': /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g }, { 'base': 'k', 'letters': /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g }, { 'base': 'l', 'letters': /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g }, { 'base': 'lj', 'letters': /[\u01C9]/g }, { 'base': 'm', 'letters': /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g }, { 'base': 'n', 'letters': /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g }, { 'base': 'nj', 'letters': /[\u01CC]/g }, { 'base': 'o', 'letters': /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g }, { 'base': 'oi', 'letters': /[\u01A3]/g }, { 'base': 'ou', 'letters': /[\u0223]/g }, { 'base': 'oo', 'letters': /[\uA74F]/g }, { 'base': 'p', 'letters': /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g }, { 'base': 'q', 'letters': /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g }, { 'base': 'r', 'letters': /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g }, { 'base': 's', 'letters': /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g }, { 'base': 't', 'letters': /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g }, { 'base': 'tz', 'letters': /[\uA729]/g }, { 'base': 'u', 'letters': /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g }, { 'base': 'v', 'letters': /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g }, { 'base': 'vy', 'letters': /[\uA761]/g }, { 'base': 'w', 'letters': /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g }, { 'base': 'x', 'letters': /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g }, { 'base': 'y', 'letters': /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g }, { 'base': 'z', 'letters': /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g }];
69245
69246 module.exports = function stripDiacritics(str) {
69247 for (var i = 0; i < map.length; i++) {
69248 str = str.replace(map[i].letters, map[i].base);
69249 }
69250 return str;
69251 };
69252
69253/***/ },
69254/* 695 */
69255/***/ function(module, exports, __webpack_require__) {
69256
69257 'use strict';
69258
69259 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69260
69261 var _classnames = __webpack_require__(356);
69262
69263 var _classnames2 = _interopRequireDefault(_classnames);
69264
69265 var _react = __webpack_require__(89);
69266
69267 var _react2 = _interopRequireDefault(_react);
69268
69269 function menuRenderer(_ref) {
69270 var focusedOption = _ref.focusedOption;
69271 var instancePrefix = _ref.instancePrefix;
69272 var labelKey = _ref.labelKey;
69273 var onFocus = _ref.onFocus;
69274 var onSelect = _ref.onSelect;
69275 var optionClassName = _ref.optionClassName;
69276 var optionComponent = _ref.optionComponent;
69277 var optionRenderer = _ref.optionRenderer;
69278 var options = _ref.options;
69279 var valueArray = _ref.valueArray;
69280 var valueKey = _ref.valueKey;
69281 var onOptionRef = _ref.onOptionRef;
69282
69283 var Option = optionComponent;
69284
69285 return options.map(function (option, i) {
69286 var isSelected = valueArray && valueArray.indexOf(option) > -1;
69287 var isFocused = option === focusedOption;
69288 var optionClass = (0, _classnames2['default'])(optionClassName, {
69289 'Select-option': true,
69290 'is-selected': isSelected,
69291 'is-focused': isFocused,
69292 'is-disabled': option.disabled
69293 });
69294
69295 return _react2['default'].createElement(
69296 Option,
69297 {
69298 className: optionClass,
69299 instancePrefix: instancePrefix,
69300 isDisabled: option.disabled,
69301 isFocused: isFocused,
69302 isSelected: isSelected,
69303 key: 'option-' + i + '-' + option[valueKey],
69304 onFocus: onFocus,
69305 onSelect: onSelect,
69306 option: option,
69307 optionIndex: i,
69308 ref: function (ref) {
69309 onOptionRef(ref, isFocused);
69310 }
69311 },
69312 optionRenderer(option, i)
69313 );
69314 });
69315 }
69316
69317 module.exports = menuRenderer;
69318
69319/***/ },
69320/* 696 */
69321/***/ function(module, exports, __webpack_require__) {
69322
69323 'use strict';
69324
69325 Object.defineProperty(exports, '__esModule', {
69326 value: true
69327 });
69328
69329 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
69330
69331 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; }; })();
69332
69333 var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
69334
69335 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69336
69337 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; }
69338
69339 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
69340
69341 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; }
69342
69343 var _react = __webpack_require__(89);
69344
69345 var _react2 = _interopRequireDefault(_react);
69346
69347 var _Select = __webpack_require__(690);
69348
69349 var _Select2 = _interopRequireDefault(_Select);
69350
69351 var _utilsStripDiacritics = __webpack_require__(694);
69352
69353 var _utilsStripDiacritics2 = _interopRequireDefault(_utilsStripDiacritics);
69354
69355 var propTypes = {
69356 autoload: _react2['default'].PropTypes.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
69357 cache: _react2['default'].PropTypes.any, // object to use to cache results; set to null/false to disable caching
69358 children: _react2['default'].PropTypes.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
69359 ignoreAccents: _react2['default'].PropTypes.bool, // strip diacritics when filtering; defaults to true
69360 ignoreCase: _react2['default'].PropTypes.bool, // perform case-insensitive filtering; defaults to true
69361 loadingPlaceholder: _react.PropTypes.string.isRequired, // replaces the placeholder while options are loading
69362 loadOptions: _react2['default'].PropTypes.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
69363 options: _react.PropTypes.array.isRequired, // array of options
69364 placeholder: _react2['default'].PropTypes.oneOfType([// field placeholder, displayed when there's no value (shared with Select)
69365 _react2['default'].PropTypes.string, _react2['default'].PropTypes.node]),
69366 searchPromptText: _react2['default'].PropTypes.oneOfType([// label to prompt for search input
69367 _react2['default'].PropTypes.string, _react2['default'].PropTypes.node])
69368 };
69369
69370 var defaultProps = {
69371 autoload: true,
69372 cache: {},
69373 children: defaultChildren,
69374 ignoreAccents: true,
69375 ignoreCase: true,
69376 loadingPlaceholder: 'Loading...',
69377 options: [],
69378 searchPromptText: 'Type to search'
69379 };
69380
69381 var Async = (function (_Component) {
69382 _inherits(Async, _Component);
69383
69384 function Async(props, context) {
69385 _classCallCheck(this, Async);
69386
69387 _get(Object.getPrototypeOf(Async.prototype), 'constructor', this).call(this, props, context);
69388
69389 this.state = {
69390 isLoading: false,
69391 options: props.options
69392 };
69393
69394 this._onInputChange = this._onInputChange.bind(this);
69395 }
69396
69397 _createClass(Async, [{
69398 key: 'componentDidMount',
69399 value: function componentDidMount() {
69400 var autoload = this.props.autoload;
69401
69402 if (autoload) {
69403 this.loadOptions('');
69404 }
69405 }
69406 }, {
69407 key: 'componentWillUpdate',
69408 value: function componentWillUpdate(nextProps, nextState) {
69409 var _this = this;
69410
69411 var propertiesToSync = ['options'];
69412 propertiesToSync.forEach(function (prop) {
69413 if (_this.props[prop] !== nextProps[prop]) {
69414 _this.setState(_defineProperty({}, prop, nextProps[prop]));
69415 }
69416 });
69417 }
69418 }, {
69419 key: 'loadOptions',
69420 value: function loadOptions(inputValue) {
69421 var _this2 = this;
69422
69423 var _props = this.props;
69424 var cache = _props.cache;
69425 var loadOptions = _props.loadOptions;
69426
69427 if (cache && cache.hasOwnProperty(inputValue)) {
69428 this.setState({
69429 options: cache[inputValue]
69430 });
69431
69432 return;
69433 }
69434
69435 var callback = function callback(error, data) {
69436 if (callback === _this2._callback) {
69437 _this2._callback = null;
69438
69439 var options = data && data.options || [];
69440
69441 if (cache) {
69442 cache[inputValue] = options;
69443 }
69444
69445 _this2.setState({
69446 isLoading: false,
69447 options: options
69448 });
69449 }
69450 };
69451
69452 // Ignore all but the most recent request
69453 this._callback = callback;
69454
69455 var promise = loadOptions(inputValue, callback);
69456 if (promise) {
69457 promise.then(function (data) {
69458 return callback(null, data);
69459 }, function (error) {
69460 return callback(error);
69461 });
69462 }
69463
69464 if (this._callback && !this.state.isLoading) {
69465 this.setState({
69466 isLoading: true
69467 });
69468 }
69469
69470 return inputValue;
69471 }
69472 }, {
69473 key: '_onInputChange',
69474 value: function _onInputChange(inputValue) {
69475 var _props2 = this.props;
69476 var ignoreAccents = _props2.ignoreAccents;
69477 var ignoreCase = _props2.ignoreCase;
69478
69479 if (ignoreAccents) {
69480 inputValue = (0, _utilsStripDiacritics2['default'])(inputValue);
69481 }
69482
69483 if (ignoreCase) {
69484 inputValue = inputValue.toLowerCase();
69485 }
69486
69487 return this.loadOptions(inputValue);
69488 }
69489 }, {
69490 key: 'render',
69491 value: function render() {
69492 var _props3 = this.props;
69493 var children = _props3.children;
69494 var loadingPlaceholder = _props3.loadingPlaceholder;
69495 var placeholder = _props3.placeholder;
69496 var searchPromptText = _props3.searchPromptText;
69497 var _state = this.state;
69498 var isLoading = _state.isLoading;
69499 var options = _state.options;
69500
69501 var props = {
69502 noResultsText: isLoading ? loadingPlaceholder : searchPromptText,
69503 placeholder: isLoading ? loadingPlaceholder : placeholder,
69504 options: isLoading ? [] : options
69505 };
69506
69507 return children(_extends({}, this.props, props, {
69508 isLoading: isLoading,
69509 onInputChange: this._onInputChange
69510 }));
69511 }
69512 }]);
69513
69514 return Async;
69515 })(_react.Component);
69516
69517 exports['default'] = Async;
69518
69519 Async.propTypes = propTypes;
69520 Async.defaultProps = defaultProps;
69521
69522 function defaultChildren(props) {
69523 return _react2['default'].createElement(_Select2['default'], props);
69524 };
69525 module.exports = exports['default'];
69526
69527/***/ },
69528/* 697 */
69529/***/ function(module, exports, __webpack_require__) {
69530
69531 'use strict';
69532
69533 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
69534
69535 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69536
69537 var _react = __webpack_require__(89);
69538
69539 var _react2 = _interopRequireDefault(_react);
69540
69541 var _Select = __webpack_require__(690);
69542
69543 var _Select2 = _interopRequireDefault(_Select);
69544
69545 var AsyncCreatable = _react2['default'].createClass({
69546 displayName: 'AsyncCreatableSelect',
69547
69548 render: function render() {
69549 var _this = this;
69550
69551 return _react2['default'].createElement(
69552 _Select2['default'].Async,
69553 this.props,
69554 function (asyncProps) {
69555 return _react2['default'].createElement(
69556 _Select2['default'].Creatable,
69557 _this.props,
69558 function (creatableProps) {
69559 return _react2['default'].createElement(_Select2['default'], _extends({}, asyncProps, creatableProps, {
69560 onInputChange: function (input) {
69561 creatableProps.onInputChange(input);
69562 return asyncProps.onInputChange(input);
69563 }
69564 }));
69565 }
69566 );
69567 }
69568 );
69569 }
69570 });
69571
69572 module.exports = AsyncCreatable;
69573
69574/***/ },
69575/* 698 */
69576/***/ function(module, exports, __webpack_require__) {
69577
69578 'use strict';
69579
69580 var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
69581
69582 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69583
69584 function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
69585
69586 var _react = __webpack_require__(89);
69587
69588 var _react2 = _interopRequireDefault(_react);
69589
69590 var _Select = __webpack_require__(690);
69591
69592 var _Select2 = _interopRequireDefault(_Select);
69593
69594 var _utilsDefaultFilterOptions = __webpack_require__(693);
69595
69596 var _utilsDefaultFilterOptions2 = _interopRequireDefault(_utilsDefaultFilterOptions);
69597
69598 var _utilsDefaultMenuRenderer = __webpack_require__(695);
69599
69600 var _utilsDefaultMenuRenderer2 = _interopRequireDefault(_utilsDefaultMenuRenderer);
69601
69602 var Creatable = _react2['default'].createClass({
69603 displayName: 'CreatableSelect',
69604
69605 propTypes: {
69606 // Child function responsible for creating the inner Select component
69607 // This component can be used to compose HOCs (eg Creatable and Async)
69608 // (props: Object): PropTypes.element
69609 children: _react2['default'].PropTypes.func,
69610
69611 // See Select.propTypes.filterOptions
69612 filterOptions: _react2['default'].PropTypes.any,
69613
69614 // Searches for any matching option within the set of options.
69615 // This function prevents duplicate options from being created.
69616 // ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
69617 isOptionUnique: _react2['default'].PropTypes.func,
69618
69619 // Determines if the current input text represents a valid option.
69620 // ({ label: string }): boolean
69621 isValidNewOption: _react2['default'].PropTypes.func,
69622
69623 // See Select.propTypes.menuRenderer
69624 menuRenderer: _react2['default'].PropTypes.any,
69625
69626 // Factory to create new option.
69627 // ({ label: string, labelKey: string, valueKey: string }): Object
69628 newOptionCreator: _react2['default'].PropTypes.func,
69629
69630 // See Select.propTypes.options
69631 options: _react2['default'].PropTypes.array,
69632
69633 // Creates prompt/placeholder option text.
69634 // (filterText: string): string
69635 promptTextCreator: _react2['default'].PropTypes.func,
69636
69637 // Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
69638 shouldKeyDownEventCreateNewOption: _react2['default'].PropTypes.func
69639 },
69640
69641 // Default prop methods
69642 statics: {
69643 isOptionUnique: isOptionUnique,
69644 isValidNewOption: isValidNewOption,
69645 newOptionCreator: newOptionCreator,
69646 promptTextCreator: promptTextCreator,
69647 shouldKeyDownEventCreateNewOption: shouldKeyDownEventCreateNewOption
69648 },
69649
69650 getDefaultProps: function getDefaultProps() {
69651 return {
69652 filterOptions: _utilsDefaultFilterOptions2['default'],
69653 isOptionUnique: isOptionUnique,
69654 isValidNewOption: isValidNewOption,
69655 menuRenderer: _utilsDefaultMenuRenderer2['default'],
69656 newOptionCreator: newOptionCreator,
69657 promptTextCreator: promptTextCreator,
69658 shouldKeyDownEventCreateNewOption: shouldKeyDownEventCreateNewOption
69659 };
69660 },
69661
69662 createNewOption: function createNewOption() {
69663 var _props = this.props;
69664 var isValidNewOption = _props.isValidNewOption;
69665 var newOptionCreator = _props.newOptionCreator;
69666 var _props$options = _props.options;
69667 var options = _props$options === undefined ? [] : _props$options;
69668 var shouldKeyDownEventCreateNewOption = _props.shouldKeyDownEventCreateNewOption;
69669
69670 if (isValidNewOption({ label: this.inputValue })) {
69671 var option = newOptionCreator({ label: this.inputValue, labelKey: this.labelKey, valueKey: this.valueKey });
69672 var _isOptionUnique = this.isOptionUnique({ option: option });
69673
69674 // Don't add the same option twice.
69675 if (_isOptionUnique) {
69676 options.unshift(option);
69677
69678 this.select.selectValue(option);
69679 }
69680 }
69681 },
69682
69683 filterOptions: function filterOptions() {
69684 var _props2 = this.props;
69685 var filterOptions = _props2.filterOptions;
69686 var isValidNewOption = _props2.isValidNewOption;
69687 var options = _props2.options;
69688 var promptTextCreator = _props2.promptTextCreator;
69689
69690 // TRICKY Check currently selected options as well.
69691 // Don't display a create-prompt for a value that's selected.
69692 // This covers async edge-cases where a newly-created Option isn't yet in the async-loaded array.
69693 var excludeOptions = arguments[2] || [];
69694
69695 var filteredOptions = filterOptions.apply(undefined, arguments) || [];
69696
69697 if (isValidNewOption({ label: this.inputValue })) {
69698 var _newOptionCreator = this.props.newOptionCreator;
69699
69700 var option = _newOptionCreator({
69701 label: this.inputValue,
69702 labelKey: this.labelKey,
69703 valueKey: this.valueKey
69704 });
69705
69706 // TRICKY Compare to all options (not just filtered options) in case option has already been selected).
69707 // For multi-selects, this would remove it from the filtered list.
69708 var _isOptionUnique2 = this.isOptionUnique({
69709 option: option,
69710 options: excludeOptions.concat(filteredOptions)
69711 });
69712
69713 if (_isOptionUnique2) {
69714 var _prompt = promptTextCreator(this.inputValue);
69715
69716 this._createPlaceholderOption = _newOptionCreator({
69717 label: _prompt,
69718 labelKey: this.labelKey,
69719 valueKey: this.valueKey
69720 });
69721
69722 filteredOptions.unshift(this._createPlaceholderOption);
69723 }
69724 }
69725
69726 return filteredOptions;
69727 },
69728
69729 isOptionUnique: function isOptionUnique(_ref2) {
69730 var option = _ref2.option;
69731 var options = _ref2.options;
69732 var isOptionUnique = this.props.isOptionUnique;
69733
69734 options = options || this.select.filterOptions();
69735
69736 return isOptionUnique({
69737 labelKey: this.labelKey,
69738 option: option,
69739 options: options,
69740 valueKey: this.valueKey
69741 });
69742 },
69743
69744 menuRenderer: function menuRenderer(params) {
69745 var menuRenderer = this.props.menuRenderer;
69746
69747 return menuRenderer(_extends({}, params, {
69748 onSelect: this.onOptionSelect
69749 }));
69750 },
69751
69752 onInputChange: function onInputChange(input) {
69753 // This value may be needed in between Select mounts (when this.select is null)
69754 this.inputValue = input;
69755 },
69756
69757 onInputKeyDown: function onInputKeyDown(event) {
69758 var shouldKeyDownEventCreateNewOption = this.props.shouldKeyDownEventCreateNewOption;
69759
69760 var focusedOption = this.select.getFocusedOption();
69761
69762 if (focusedOption && focusedOption === this._createPlaceholderOption && shouldKeyDownEventCreateNewOption({ keyCode: event.keyCode })) {
69763 this.createNewOption();
69764
69765 // Prevent decorated Select from doing anything additional with this keyDown event
69766 event.preventDefault();
69767 }
69768 },
69769
69770 onOptionSelect: function onOptionSelect(option, event) {
69771 if (option === this._createPlaceholderOption) {
69772 this.createNewOption();
69773 } else {
69774 this.select.selectValue(option);
69775 }
69776 },
69777
69778 render: function render() {
69779 var _this = this;
69780
69781 var _props3 = this.props;
69782 var _props3$children = _props3.children;
69783 var children = _props3$children === undefined ? defaultChildren : _props3$children;
69784 var newOptionCreator = _props3.newOptionCreator;
69785 var shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption;
69786
69787 var restProps = _objectWithoutProperties(_props3, ['children', 'newOptionCreator', 'shouldKeyDownEventCreateNewOption']);
69788
69789 var props = _extends({}, restProps, {
69790 allowCreate: true,
69791 filterOptions: this.filterOptions,
69792 menuRenderer: this.menuRenderer,
69793 onInputChange: this.onInputChange,
69794 onInputKeyDown: this.onInputKeyDown,
69795 ref: function ref(_ref) {
69796 _this.select = _ref;
69797
69798 // These values may be needed in between Select mounts (when this.select is null)
69799 if (_ref) {
69800 _this.labelKey = _ref.props.labelKey;
69801 _this.valueKey = _ref.props.valueKey;
69802 }
69803 }
69804 });
69805
69806 return children(props);
69807 }
69808 });
69809
69810 function defaultChildren(props) {
69811 return _react2['default'].createElement(_Select2['default'], props);
69812 };
69813
69814 function isOptionUnique(_ref3) {
69815 var option = _ref3.option;
69816 var options = _ref3.options;
69817 var labelKey = _ref3.labelKey;
69818 var valueKey = _ref3.valueKey;
69819
69820 return options.filter(function (existingOption) {
69821 return existingOption[labelKey] === option[labelKey] || existingOption[valueKey] === option[valueKey];
69822 }).length === 0;
69823 };
69824
69825 function isValidNewOption(_ref4) {
69826 var label = _ref4.label;
69827
69828 return !!label;
69829 };
69830
69831 function newOptionCreator(_ref5) {
69832 var label = _ref5.label;
69833 var labelKey = _ref5.labelKey;
69834 var valueKey = _ref5.valueKey;
69835
69836 var option = {};
69837 option[valueKey] = label;
69838 option[labelKey] = label;
69839 option.className = 'Select-create-option-placeholder';
69840 return option;
69841 };
69842
69843 function promptTextCreator(label) {
69844 return 'Create option "' + label + '"';
69845 }
69846
69847 function shouldKeyDownEventCreateNewOption(_ref6) {
69848 var keyCode = _ref6.keyCode;
69849
69850 switch (keyCode) {
69851 case 9: // TAB
69852 case 13: // ENTER
69853 case 188:
69854 // COMMA
69855 return true;
69856 }
69857
69858 return false;
69859 };
69860
69861 module.exports = Creatable;
69862
69863/***/ },
69864/* 699 */
69865/***/ function(module, exports, __webpack_require__) {
69866
69867 'use strict';
69868
69869 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69870
69871 var _react = __webpack_require__(89);
69872
69873 var _react2 = _interopRequireDefault(_react);
69874
69875 var _classnames = __webpack_require__(356);
69876
69877 var _classnames2 = _interopRequireDefault(_classnames);
69878
69879 var Option = _react2['default'].createClass({
69880 displayName: 'Option',
69881
69882 propTypes: {
69883 children: _react2['default'].PropTypes.node,
69884 className: _react2['default'].PropTypes.string, // className (based on mouse position)
69885 instancePrefix: _react2['default'].PropTypes.string.isRequired, // unique prefix for the ids (used for aria)
69886 isDisabled: _react2['default'].PropTypes.bool, // the option is disabled
69887 isFocused: _react2['default'].PropTypes.bool, // the option is focused
69888 isSelected: _react2['default'].PropTypes.bool, // the option is selected
69889 onFocus: _react2['default'].PropTypes.func, // method to handle mouseEnter on option element
69890 onSelect: _react2['default'].PropTypes.func, // method to handle click on option element
69891 onUnfocus: _react2['default'].PropTypes.func, // method to handle mouseLeave on option element
69892 option: _react2['default'].PropTypes.object.isRequired, // object that is base for that option
69893 optionIndex: _react2['default'].PropTypes.number },
69894 // index of the option, used to generate unique ids for aria
69895 blockEvent: function blockEvent(event) {
69896 event.preventDefault();
69897 event.stopPropagation();
69898 if (event.target.tagName !== 'A' || !('href' in event.target)) {
69899 return;
69900 }
69901 if (event.target.target) {
69902 window.open(event.target.href, event.target.target);
69903 } else {
69904 window.location.href = event.target.href;
69905 }
69906 },
69907
69908 handleMouseDown: function handleMouseDown(event) {
69909 event.preventDefault();
69910 event.stopPropagation();
69911 this.props.onSelect(this.props.option, event);
69912 },
69913
69914 handleMouseEnter: function handleMouseEnter(event) {
69915 this.onFocus(event);
69916 },
69917
69918 handleMouseMove: function handleMouseMove(event) {
69919 this.onFocus(event);
69920 },
69921
69922 handleTouchEnd: function handleTouchEnd(event) {
69923 // Check if the view is being dragged, In this case
69924 // we don't want to fire the click event (because the user only wants to scroll)
69925 if (this.dragging) return;
69926
69927 this.handleMouseDown(event);
69928 },
69929
69930 handleTouchMove: function handleTouchMove(event) {
69931 // Set a flag that the view is being dragged
69932 this.dragging = true;
69933 },
69934
69935 handleTouchStart: function handleTouchStart(event) {
69936 // Set a flag that the view is not being dragged
69937 this.dragging = false;
69938 },
69939
69940 onFocus: function onFocus(event) {
69941 if (!this.props.isFocused) {
69942 this.props.onFocus(this.props.option, event);
69943 }
69944 },
69945 render: function render() {
69946 var _props = this.props;
69947 var option = _props.option;
69948 var instancePrefix = _props.instancePrefix;
69949 var optionIndex = _props.optionIndex;
69950
69951 var className = (0, _classnames2['default'])(this.props.className, option.className);
69952
69953 return option.disabled ? _react2['default'].createElement(
69954 'div',
69955 { className: className,
69956 onMouseDown: this.blockEvent,
69957 onClick: this.blockEvent },
69958 this.props.children
69959 ) : _react2['default'].createElement(
69960 'div',
69961 { className: className,
69962 style: option.style,
69963 role: 'option',
69964 onMouseDown: this.handleMouseDown,
69965 onMouseEnter: this.handleMouseEnter,
69966 onMouseMove: this.handleMouseMove,
69967 onTouchStart: this.handleTouchStart,
69968 onTouchMove: this.handleTouchMove,
69969 onTouchEnd: this.handleTouchEnd,
69970 id: instancePrefix + '-option-' + optionIndex,
69971 title: option.title },
69972 this.props.children
69973 );
69974 }
69975 });
69976
69977 module.exports = Option;
69978
69979/***/ },
69980/* 700 */
69981/***/ function(module, exports, __webpack_require__) {
69982
69983 'use strict';
69984
69985 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
69986
69987 var _react = __webpack_require__(89);
69988
69989 var _react2 = _interopRequireDefault(_react);
69990
69991 var _classnames = __webpack_require__(356);
69992
69993 var _classnames2 = _interopRequireDefault(_classnames);
69994
69995 var Value = _react2['default'].createClass({
69996
69997 displayName: 'Value',
69998
69999 propTypes: {
70000 children: _react2['default'].PropTypes.node,
70001 disabled: _react2['default'].PropTypes.bool, // disabled prop passed to ReactSelect
70002 id: _react2['default'].PropTypes.string, // Unique id for the value - used for aria
70003 onClick: _react2['default'].PropTypes.func, // method to handle click on value label
70004 onRemove: _react2['default'].PropTypes.func, // method to handle removal of the value
70005 value: _react2['default'].PropTypes.object.isRequired },
70006
70007 // the option object for this value
70008 handleMouseDown: function handleMouseDown(event) {
70009 if (event.type === 'mousedown' && event.button !== 0) {
70010 return;
70011 }
70012 if (this.props.onClick) {
70013 event.stopPropagation();
70014 this.props.onClick(this.props.value, event);
70015 return;
70016 }
70017 if (this.props.value.href) {
70018 event.stopPropagation();
70019 }
70020 },
70021
70022 onRemove: function onRemove(event) {
70023 event.preventDefault();
70024 event.stopPropagation();
70025 this.props.onRemove(this.props.value);
70026 },
70027
70028 handleTouchEndRemove: function handleTouchEndRemove(event) {
70029 // Check if the view is being dragged, In this case
70030 // we don't want to fire the click event (because the user only wants to scroll)
70031 if (this.dragging) return;
70032
70033 // Fire the mouse events
70034 this.onRemove(event);
70035 },
70036
70037 handleTouchMove: function handleTouchMove(event) {
70038 // Set a flag that the view is being dragged
70039 this.dragging = true;
70040 },
70041
70042 handleTouchStart: function handleTouchStart(event) {
70043 // Set a flag that the view is not being dragged
70044 this.dragging = false;
70045 },
70046
70047 renderRemoveIcon: function renderRemoveIcon() {
70048 if (this.props.disabled || !this.props.onRemove) return;
70049 return _react2['default'].createElement(
70050 'span',
70051 { className: 'Select-value-icon',
70052 'aria-hidden': 'true',
70053 onMouseDown: this.onRemove,
70054 onTouchEnd: this.handleTouchEndRemove,
70055 onTouchStart: this.handleTouchStart,
70056 onTouchMove: this.handleTouchMove },
70057 '×'
70058 );
70059 },
70060
70061 renderLabel: function renderLabel() {
70062 var className = 'Select-value-label';
70063 return this.props.onClick || this.props.value.href ? _react2['default'].createElement(
70064 'a',
70065 { className: className, href: this.props.value.href, target: this.props.value.target, onMouseDown: this.handleMouseDown, onTouchEnd: this.handleMouseDown },
70066 this.props.children
70067 ) : _react2['default'].createElement(
70068 'span',
70069 { className: className, role: 'option', 'aria-selected': 'true', id: this.props.id },
70070 this.props.children
70071 );
70072 },
70073
70074 render: function render() {
70075 return _react2['default'].createElement(
70076 'div',
70077 { className: (0, _classnames2['default'])('Select-value', this.props.value.className),
70078 style: this.props.value.style,
70079 title: this.props.value.title
70080 },
70081 this.renderRemoveIcon(),
70082 this.renderLabel()
70083 );
70084 }
70085
70086 });
70087
70088 module.exports = Value;
70089
70090/***/ },
70091/* 701 */
70092/***/ function(module, exports, __webpack_require__) {
70093
70094 'use strict';
70095
70096 Object.defineProperty(exports, "__esModule", {
70097 value: true
70098 });
70099
70100 var _reactRedux = __webpack_require__(629);
70101
70102 var _OrganizationTable = __webpack_require__(702);
70103
70104 var _OrganizationTable2 = _interopRequireDefault(_OrganizationTable);
70105
70106 var _restUtils = __webpack_require__(709);
70107
70108 var _utils = __webpack_require__(658);
70109
70110 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70111
70112 /* global */
70113
70114 /**
70115 * Container widget for the single organization table
70116 * @author patrickkerrypei / https://github.com/patrickkerrypei
70117 */
70118
70119 // Libraries
70120 var mapStateToProps = function mapStateToProps(state, ownProps) {
70121 var organizations = state.organizations.organizations;
70122 var _state$tables$organiz = state.tables.organizationMembers;
70123 var sortCategory = _state$tables$organiz.sortCategory;
70124 var sortedForward = _state$tables$organiz.sortedForward;
70125 var organizationId = ownProps.organizationId;
70126
70127
70128 var members = (0, _restUtils.retrieveMembersAndAdmins)(organizations, organizationId);
70129
70130 return {
70131 members: sortedForward ? members.sort((0, _utils.sortObjectArrayByField)(sortCategory)) : members.sort((0, _utils.sortObjectArrayByField)(sortCategory)).reverse()
70132 };
70133 };
70134 // Self-defined
70135 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationTable2.default);
70136
70137/***/ },
70138/* 702 */
70139/***/ function(module, exports, __webpack_require__) {
70140
70141 'use strict';
70142
70143 Object.defineProperty(exports, "__esModule", {
70144 value: true
70145 });
70146
70147 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; }; }();
70148
70149 var _react = __webpack_require__(89);
70150
70151 var _react2 = _interopRequireDefault(_react);
70152
70153 var _DataTable = __webpack_require__(703);
70154
70155 var _DataTable2 = _interopRequireDefault(_DataTable);
70156
70157 var _OrganizationDataTableEntry = __webpack_require__(707);
70158
70159 var _OrganizationDataTableEntry2 = _interopRequireDefault(_OrganizationDataTableEntry);
70160
70161 var _organizations = __webpack_require__(669);
70162
70163 var _users = __webpack_require__(665);
70164
70165 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70166
70167 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
70168
70169 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; }
70170
70171 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; } /* global */
70172
70173 /**
70174 * Container widget for the single organization table
70175 * @author patrickkerrypei / https://github.com/patrickkerrypei
70176 */
70177
70178 // Libraries
70179
70180 // Self-defined
70181
70182
70183 var OrganizationTable = function (_Component) {
70184 _inherits(OrganizationTable, _Component);
70185
70186 function OrganizationTable(props) {
70187 _classCallCheck(this, OrganizationTable);
70188
70189 // Event handlers
70190 var _this = _possibleConstructorReturn(this, (OrganizationTable.__proto__ || Object.getPrototypeOf(OrganizationTable)).call(this, props));
70191
70192 _this.removeMember = _this.removeMember.bind(_this);
70193 _this.setAdmin = _this.setAdmin.bind(_this);
70194 return _this;
70195 }
70196
70197 _createClass(OrganizationTable, [{
70198 key: 'componentDidMount',
70199 value: function componentDidMount() {
70200 var dispatch = this.props.dispatch;
70201
70202
70203 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
70204 }
70205 }, {
70206 key: 'removeMember',
70207 value: function removeMember(event) {
70208 var dispatch = this.props.dispatch;
70209
70210 var userId = event.target.id;
70211
70212 this.props.restClient.organizations.deleteUserFromOrganization(this.props.organizationId, userId).then(function () {
70213 dispatch((0, _users.fetchUsers)());
70214 dispatch((0, _organizations.fetchOrganizations)());
70215 });
70216 }
70217 }, {
70218 key: 'setAdmin',
70219 value: function setAdmin(event) {
70220 var dispatch = this.props.dispatch;
70221
70222
70223 var actionType = event.target.getAttribute('action'),
70224 userId = event.target.id;
70225
70226 event.preventDefault();
70227 event.stopPropagation();
70228
70229 if (actionType === 'removeAdmin') {
70230 this.props.restClient.organizations.removeAdminOfOrganization(this.props.organizationId, userId).then(function () {
70231 dispatch((0, _organizations.fetchOrganizations)());
70232 });
70233 } else if (actionType === 'makeAdmin') {
70234 this.props.restClient.organizations.makeAdminOfOrganization(this.props.organizationId, userId).then(function () {
70235 dispatch((0, _organizations.fetchOrganizations)());
70236 });
70237 }
70238 }
70239 }, {
70240 key: 'render',
70241 value: function render() {
70242 var _props = this.props;
70243 var canAuthorize = _props.canAuthorize;
70244 var members = _props.members;
70245
70246
70247 var categories = [{ id: 1, name: 'User' }, { id: 2, name: 'Admin' }];
70248
70249 return _react2.default.createElement(
70250 'div',
70251 null,
70252 _react2.default.createElement(
70253 'div',
70254 { className: 'box-header', style: { paddingBottom: 0 } },
70255 _react2.default.createElement(
70256 'h3',
70257 { className: 'box-title', style: { fontSize: 28 } },
70258 _react2.default.createElement('i', { className: this.props.iconClass }),
70259 ' ',
70260 ' Members'
70261 )
70262 ),
70263 _react2.default.createElement(
70264 _DataTable2.default,
70265 { categories: categories,
70266 entries: members,
70267 orderEntries: this.handleOrderEntries,
70268 reducerTableName: 'organizationMembers',
70269 sortable: true },
70270 _react2.default.createElement(_OrganizationDataTableEntry2.default, { canAuthorize: canAuthorize,
70271 removeMember: this.removeMember,
70272 setAdmin: this.setAdmin
70273 })
70274 )
70275 );
70276 }
70277 }]);
70278
70279 return OrganizationTable;
70280 }(_react.Component);
70281
70282 exports.default = OrganizationTable;
70283
70284
70285 OrganizationTable.propTypes = {
70286 members: _react.PropTypes.array.isRequired
70287 };
70288
70289/***/ },
70290/* 703 */
70291/***/ function(module, exports, __webpack_require__) {
70292
70293 'use strict';
70294
70295 Object.defineProperty(exports, "__esModule", {
70296 value: true
70297 });
70298
70299 var _reactRedux = __webpack_require__(629);
70300
70301 var _DataTable = __webpack_require__(704);
70302
70303 var _DataTable2 = _interopRequireDefault(_DataTable);
70304
70305 var _utils = __webpack_require__(658);
70306
70307 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70308
70309 // Self-defined
70310 var mapStateToProps = function mapStateToProps(state, ownProps) {
70311 var reducerTableName = ownProps.reducerTableName;
70312 var tableOptions = state.tables[reducerTableName];
70313
70314 return {
70315 tableOptions: tableOptions
70316 };
70317 }; /* global */
70318
70319 /**
70320 * Container widget for the general table
70321 * @author patrickkerrypei / https://github.com/patrickkerrypei
70322 */
70323
70324 // Libraries
70325 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_DataTable2.default);
70326
70327/***/ },
70328/* 704 */
70329/***/ function(module, exports, __webpack_require__) {
70330
70331 'use strict';
70332
70333 Object.defineProperty(exports, "__esModule", {
70334 value: true
70335 });
70336
70337 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; }; }();
70338
70339 var _react = __webpack_require__(89);
70340
70341 var _react2 = _interopRequireDefault(_react);
70342
70343 var _DataTableCategory = __webpack_require__(705);
70344
70345 var _DataTableCategory2 = _interopRequireDefault(_DataTableCategory);
70346
70347 var _DataTablePagination = __webpack_require__(706);
70348
70349 var _DataTablePagination2 = _interopRequireDefault(_DataTablePagination);
70350
70351 var _tables = __webpack_require__(671);
70352
70353 var _constants = __webpack_require__(660);
70354
70355 var _style = __webpack_require__(598);
70356
70357 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70358
70359 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
70360
70361 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; }
70362
70363 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; } /**
70364 * Reusable data table widget
70365 * @author patrickkerrypei / https://github.com/patrickkerrypei
70366 */
70367
70368 // Libraries
70369
70370 // Self-defined
70371
70372 // Style
70373
70374
70375 var DataTable = function (_Component) {
70376 _inherits(DataTable, _Component);
70377
70378 function DataTable(props) {
70379 _classCallCheck(this, DataTable);
70380
70381 // Event handlers
70382 var _this = _possibleConstructorReturn(this, (DataTable.__proto__ || Object.getPrototypeOf(DataTable)).call(this, props));
70383
70384 _this.handleOrderEntries = _this.handleOrderEntries.bind(_this);
70385 _this.handlePagination = _this.handlePagination.bind(_this);
70386 _this.handleSearch = _this.handleSearch.bind(_this);
70387 _this.handleSelect = _this.handleSelect.bind(_this);
70388 return _this;
70389 }
70390
70391 _createClass(DataTable, [{
70392 key: 'handleOrderEntries',
70393 value: function handleOrderEntries(event) {
70394 var _props = this.props;
70395 var dispatch = _props.dispatch;
70396 var reducerTableName = _props.reducerTableName;
70397 var category = event.target.innerText;
70398
70399 if (!category) {
70400 return;
70401 }
70402
70403 var newSortCategory = _constants.TABLE_FIELDS[reducerTableName][category];
70404
70405 dispatch((0, _tables.sortBy)(reducerTableName, newSortCategory));
70406 }
70407 }, {
70408 key: 'handlePagination',
70409 value: function handlePagination(event) {
70410 // Release focus
70411 event.target.blur();
70412 var _props2 = this.props;
70413 var dispatch = _props2.dispatch;
70414 var reducerTableName = _props2.reducerTableName;
70415
70416
70417 var displayPageNumber = parseInt(event.target.dataset.page, 10),
70418 newPageNumber = parseInt(event.target.dataset.page, 10);
70419
70420 var parsedText = event.target.innerHTML.trim();
70421 switch (parsedText) {
70422 case 'Next':
70423 newPageNumber += 1;
70424 break;
70425 case 'Previous':
70426 newPageNumber -= 1;
70427 break;
70428 default:
70429 newPageNumber = parseInt(parsedText, 10);
70430 break;
70431 }
70432
70433 if (newPageNumber !== displayPageNumber) {
70434 dispatch((0, _tables.setPageNumber)(reducerTableName, newPageNumber));
70435 }
70436 }
70437 }, {
70438 key: 'handleSearch',
70439 value: function handleSearch(event) {
70440 var _props3 = this.props;
70441 var dispatch = _props3.dispatch;
70442 var reducerTableName = _props3.reducerTableName;
70443
70444 var currentSearchText = this.props.tableOptions.searchText;
70445 var newSearchText = event.target.value.toLowerCase();
70446
70447 if (newSearchText !== currentSearchText) {
70448 dispatch((0, _tables.setSearchText)(reducerTableName, newSearchText));
70449 }
70450 }
70451 }, {
70452 key: 'handleSelect',
70453 value: function handleSelect(event) {
70454 // Release focus
70455 event.target.blur();
70456
70457 var _props4 = this.props;
70458 var dispatch = _props4.dispatch;
70459 var reducerTableName = _props4.reducerTableName;
70460
70461 var currentSelectValue = this.props.tableOptions.selectValue;
70462 var newSelectValue = parseInt(event.target.value.trim(), 10);
70463
70464 if (newSelectValue !== currentSelectValue) {
70465 dispatch((0, _tables.setSelectValue)(reducerTableName, newSelectValue));
70466 dispatch((0, _tables.setPageNumber)(reducerTableName, 1));
70467 }
70468 }
70469 }, {
70470 key: 'render',
70471 value: function render() {
70472 var _this2 = this;
70473
70474 var _props5 = this.props;
70475 var categories = _props5.categories;
70476 var entries = _props5.entries;
70477 var _props$tableOptions = this.props.tableOptions;
70478 var pageNumber = _props$tableOptions.pageNumber;
70479 var searchText = _props$tableOptions.searchText;
70480 var selectValue = _props$tableOptions.selectValue;
70481 var sortedForward = _props$tableOptions.sortedForward;
70482
70483 // Formatting table categories
70484
70485 var formattedCategories = [];
70486 categories.forEach(function (category) {
70487 return formattedCategories.push(_react2.default.createElement(_DataTableCategory2.default, { className: category.className,
70488 key: category.id,
70489 name: category.name,
70490 orderEntries: _this2.handleOrderEntries,
70491 sortable: _this2.props.sortable,
70492 sortedForward: sortedForward,
70493 isSorted: category.isSorted,
70494 style: category.style }));
70495 });
70496
70497 // Filter out nodes..
70498 var entriesList = entries.filter(function (oneEntry) {
70499 var filterRegex = new RegExp(searchText);
70500 return filterRegex.test(oneEntry.name.toLowerCase());
70501 });
70502
70503 // Formatting pagination buttons
70504 var formattedPaginationButtons = [],
70505 numPages = Math.floor(entriesList.length / selectValue) + 1,
70506 startPage = void 0,
70507 displayedPageNumber = void 0,
70508 endPage = void 0;
70509
70510 if (pageNumber > numPages) {
70511 // Make sure the pageNumber actually exists, if not fall back to first
70512 displayedPageNumber = 1;
70513 } else {
70514 displayedPageNumber = pageNumber;
70515 }
70516
70517 if (numPages <= 3) {
70518 startPage = 1;
70519 endPage = numPages;
70520 } else if (displayedPageNumber === 1) {
70521 startPage = 1;
70522 endPage = 3;
70523 } else if (displayedPageNumber === numPages) {
70524 startPage = numPages - 2;
70525 endPage = numPages;
70526 } else {
70527 startPage = displayedPageNumber - 1;
70528 endPage = displayedPageNumber + 1;
70529 }
70530
70531 for (var i = startPage; i <= endPage; i++) {
70532 formattedPaginationButtons.push(_react2.default.createElement(
70533 'li',
70534 { className: displayedPageNumber === i ? "paginate_button active" : "paginate_button ", key: i },
70535 _react2.default.createElement(
70536 'a',
70537 { href: '#',
70538 'data-page': displayedPageNumber,
70539 onClick: this.handlePagination,
70540 style: _style.DataTable.paginationButtons.buttons },
70541 i
70542 )
70543 ));
70544 }
70545
70546 // Putting together "show string"
70547
70548 var startIndexInProjects = (displayedPageNumber - 1) * selectValue,
70549 displayNumStart = startIndexInProjects + 1,
70550 displayNumEnd,
70551 showString,
70552 totalNbrOfEntries = this.props.entries.length;
70553
70554 if (entriesList.length > startIndexInProjects + selectValue) {
70555 displayNumEnd = startIndexInProjects + selectValue;
70556 } else {
70557 displayNumEnd = entriesList.length;
70558 }
70559
70560 if (searchText) {
70561 showString = displayNumStart + ' - ' + displayNumEnd + ' of ' + entriesList.length + ' (' + totalNbrOfEntries + ')';
70562 } else {
70563 showString = displayNumStart + ' - ' + displayNumEnd + ' of ' + totalNbrOfEntries;
70564 }
70565
70566 if (displayNumStart > entriesList.length) {
70567 showString = 'Nothing to show.';
70568 }
70569
70570 // Formatting table entries
70571 var formattedEntries = [];
70572
70573 var _loop = function _loop(_i) {
70574 var properties = {};
70575 Object.keys(entriesList[_i]).forEach(function (prop) {
70576 properties[prop] = entriesList[_i][prop];
70577 properties.key = _i;
70578 properties.searchText = searchText;
70579 });
70580 formattedEntries.push(_react2.default.cloneElement(_this2.props.children, properties));
70581 };
70582
70583 for (var _i = displayNumStart - 1; _i < displayNumEnd; _i++) {
70584 _loop(_i);
70585 }
70586
70587 // Formatting selections (can make more efficient later)
70588 var formattedSelectOptions = [];
70589 var selectOptions = [10, 25, 50, 100];
70590 selectOptions.forEach(function (opt, index) {
70591 return formattedSelectOptions.push(_react2.default.createElement(
70592 'option',
70593 { value: String(opt), key: index },
70594 opt
70595 ));
70596 });
70597
70598 // Setting up minimum height of table
70599 var minHeight = 70 + 35 * (this.props.entries.length < selectValue ? entriesList.length : selectValue),
70600 tableMinHeight = {
70601 minHeight: minHeight + "px"
70602 };
70603
70604 // Rules for showing showString, pagination, and select options
70605 var showBasedOnRawData = this.props.entries.length > selectOptions[0];
70606 var showPagination = selectValue < entriesList.length;
70607
70608 return _react2.default.createElement(
70609 'div',
70610 { className: 'box-body' },
70611 _react2.default.createElement(
70612 'div',
70613 { className: 'row' },
70614 _react2.default.createElement(
70615 'div',
70616 { className: 'col-sm-6', style: { paddingTop: "8px" } },
70617 _react2.default.createElement(
70618 'strong',
70619 null,
70620 this.props.showOtherTitle ? this.props.content : ''
70621 )
70622 ),
70623 _react2.default.createElement(
70624 'div',
70625 { className: 'col-sm-6' },
70626 _react2.default.createElement(
70627 'div',
70628 { style: { float: "right" } },
70629 _react2.default.createElement(
70630 'label',
70631 null,
70632 _react2.default.createElement('input', { type: 'text',
70633 className: 'form-control input-sm',
70634 placeholder: 'Filter...',
70635 style: { display: totalNbrOfEntries <= 10 && searchText === '' ? 'none' : 'inline-block' },
70636 value: searchText,
70637 onChange: this.handleSearch })
70638 )
70639 )
70640 )
70641 ),
70642 this.props.entries.length === 0 ? _react2.default.createElement(
70643 'div',
70644 { style: _style.DataTable.noEntriesLabel },
70645 'No ',
70646 this.props.content,
70647 '...'
70648 ) : _react2.default.createElement(
70649 'div',
70650 { className: 'row' },
70651 _react2.default.createElement(
70652 'div',
70653 { className: 'col-sm-12', style: tableMinHeight },
70654 _react2.default.createElement(
70655 'table',
70656 { className: 'table table-bordered table-striped dataTable' },
70657 _react2.default.createElement(
70658 'thead',
70659 null,
70660 _react2.default.createElement(
70661 'tr',
70662 { role: 'row' },
70663 formattedCategories
70664 )
70665 ),
70666 _react2.default.createElement(
70667 'tbody',
70668 null,
70669 formattedEntries
70670 )
70671 )
70672 )
70673 ),
70674 _react2.default.createElement(
70675 'div',
70676 { className: 'row' },
70677 _react2.default.createElement(
70678 'div',
70679 { className: 'col-sm-3' },
70680 showBasedOnRawData ? _react2.default.createElement(
70681 'div',
70682 { className: 'dataTables_info', id: 'example1_info', role: 'status' },
70683 _react2.default.createElement(
70684 'div',
70685 null,
70686 _react2.default.createElement(
70687 'label',
70688 { style: _style.DataTable.showString },
70689 showString
70690 )
70691 )
70692 ) : null
70693 ),
70694 _react2.default.createElement(
70695 'div',
70696 { className: 'col-sm-6', style: _style.DataTable.paginationButtons.column },
70697 showPagination ? _react2.default.createElement(_DataTablePagination2.default, { clickHandler: this.handlePagination,
70698 formattedPaginationButtons: formattedPaginationButtons,
70699 numPages: numPages,
70700 pageNumber: displayedPageNumber }) : null
70701 ),
70702 _react2.default.createElement(
70703 'div',
70704 { className: 'col-sm-3', style: _style.DataTable.selectDropdown.column },
70705 showBasedOnRawData ? _react2.default.createElement(
70706 'div',
70707 null,
70708 _react2.default.createElement(
70709 'label',
70710 { style: _style.DataTable.selectDropdown.label },
70711 'Items per page:',
70712 _react2.default.createElement(
70713 'select',
70714 { className: 'form-control input-sm',
70715 onChange: this.handleSelect,
70716 value: selectValue,
70717 style: _style.DataTable.selectDropdown.options },
70718 formattedSelectOptions
70719 )
70720 )
70721 ) : null
70722 )
70723 )
70724 );
70725 }
70726 }]);
70727
70728 return DataTable;
70729 }(_react.Component);
70730
70731 exports.default = DataTable;
70732
70733/***/ },
70734/* 705 */
70735/***/ function(module, exports, __webpack_require__) {
70736
70737 'use strict';
70738
70739 Object.defineProperty(exports, "__esModule", {
70740 value: true
70741 });
70742
70743 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; }; }();
70744
70745 var _react = __webpack_require__(89);
70746
70747 var _react2 = _interopRequireDefault(_react);
70748
70749 var _style = __webpack_require__(598);
70750
70751 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70752
70753 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
70754
70755 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; }
70756
70757 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; } /**
70758 * Formatting for data table widget's headers
70759 * @author patrickkerrypei / https://github.com/patrickkerrypei
70760 */
70761
70762 // Libraries
70763
70764 // Style
70765
70766
70767 var DataTableCategories = function (_Component) {
70768 _inherits(DataTableCategories, _Component);
70769
70770 function DataTableCategories() {
70771 _classCallCheck(this, DataTableCategories);
70772
70773 return _possibleConstructorReturn(this, (DataTableCategories.__proto__ || Object.getPrototypeOf(DataTableCategories)).apply(this, arguments));
70774 }
70775
70776 _createClass(DataTableCategories, [{
70777 key: 'render',
70778 value: function render() {
70779 var _this2 = this;
70780
70781 return _react2.default.createElement(
70782 'th',
70783 { className: this.props.className || '',
70784 style: Object.assign(_style.Unselectable, this.props.style) },
70785 _react2.default.createElement(
70786 'div',
70787 { onClick: this.props.sortable ? this.props.orderEntries : function () {},
70788 style: this.props.sortable ? { cursor: 'pointer', float: 'left' } : { float: 'left' } },
70789 this.props.name,
70790 function () {
70791 if (_this2.props.isSorted) {
70792 var className = _this2.props.sortedForward ? 'fa fa-sort-alpha-asc' : 'fa fa-sort-alpha-desc';
70793
70794 return _react2.default.createElement('i', { className: className, style: { marginLeft: '5px' } });
70795 } else {
70796 return null;
70797 }
70798 }()
70799 )
70800 );
70801 }
70802 }]);
70803
70804 return DataTableCategories;
70805 }(_react.Component);
70806
70807 exports.default = DataTableCategories;
70808
70809
70810 DataTableCategories.propTypes = {
70811 name: _react.PropTypes.string.isRequired,
70812 isSorted: _react.PropTypes.bool,
70813 sortedForward: _react.PropTypes.bool,
70814 sortable: _react.PropTypes.bool,
70815 orderEntries: _react.PropTypes.function,
70816 className: _react.PropTypes.string
70817 };
70818
70819/***/ },
70820/* 706 */
70821/***/ function(module, exports, __webpack_require__) {
70822
70823 'use strict';
70824
70825 Object.defineProperty(exports, "__esModule", {
70826 value: true
70827 });
70828
70829 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; }; }();
70830
70831 var _react = __webpack_require__(89);
70832
70833 var _react2 = _interopRequireDefault(_react);
70834
70835 var _style = __webpack_require__(598);
70836
70837 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70838
70839 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
70840
70841 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; }
70842
70843 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; } /**
70844 * Pagination for data table widget
70845 * @author patrickkerrypei / https://github.com/patrickkerrypei
70846 */
70847
70848 // Libraries
70849
70850 // Style
70851
70852
70853 var DataTableEntry = function (_Component) {
70854 _inherits(DataTableEntry, _Component);
70855
70856 function DataTableEntry() {
70857 _classCallCheck(this, DataTableEntry);
70858
70859 return _possibleConstructorReturn(this, (DataTableEntry.__proto__ || Object.getPrototypeOf(DataTableEntry)).apply(this, arguments));
70860 }
70861
70862 _createClass(DataTableEntry, [{
70863 key: 'render',
70864 value: function render() {
70865 return _react2.default.createElement(
70866 'div',
70867 { className: 'dataTables_paginate paging_simple_numbers',
70868 style: { fontSize: "12px" } },
70869 _react2.default.createElement(
70870 'ul',
70871 { className: 'pagination', style: { margin: 0 } },
70872 _react2.default.createElement(
70873 'li',
70874 { id: 'example1_previous',
70875 className: this.props.pageNumber === 1 ? "paginate_button previous disabled" : "paginate_button previous",
70876 onClick: this.props.pageNumber === 1 ? null : this.props.clickHandler },
70877 _react2.default.createElement(
70878 'a',
70879 { href: '#', 'data-page': this.props.pageNumber, style: _style.DataTablePagination.unselectable },
70880 'Previous'
70881 )
70882 ),
70883 this.props.formattedPaginationButtons,
70884 _react2.default.createElement(
70885 'li',
70886 { id: 'example1_next',
70887 className: this.props.pageNumber === this.props.numPages ? "paginate_button next disabled" : "paginate_button next",
70888 onClick: this.props.pageNumber === this.props.numPages ? null : this.props.clickHandler },
70889 _react2.default.createElement(
70890 'a',
70891 { href: '#', 'data-page': this.props.pageNumber, style: _style.DataTablePagination.unselectable },
70892 'Next'
70893 )
70894 )
70895 )
70896 );
70897 }
70898 }]);
70899
70900 return DataTableEntry;
70901 }(_react.Component);
70902
70903 exports.default = DataTableEntry;
70904
70905/***/ },
70906/* 707 */
70907/***/ function(module, exports, __webpack_require__) {
70908
70909 'use strict';
70910
70911 Object.defineProperty(exports, "__esModule", {
70912 value: true
70913 });
70914
70915 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; }; }();
70916
70917 var _react = __webpack_require__(89);
70918
70919 var _react2 = _interopRequireDefault(_react);
70920
70921 var _reactBootstrap = __webpack_require__(334);
70922
70923 var _CustomModal = __webpack_require__(708);
70924
70925 var _CustomModal2 = _interopRequireDefault(_CustomModal);
70926
70927 var _style = __webpack_require__(598);
70928
70929 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
70930
70931 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
70932
70933 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; }
70934
70935 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; } /**
70936 * Custom entries for the organization data table
70937 * @author patrickkerrypei / https://github.com/patrickkerrypei
70938 */
70939
70940 // Libraries
70941
70942
70943 // Self-defined
70944
70945 // Style
70946
70947
70948 var OrganizationDataTableEntry = function (_Component) {
70949 _inherits(OrganizationDataTableEntry, _Component);
70950
70951 function OrganizationDataTableEntry(props) {
70952 _classCallCheck(this, OrganizationDataTableEntry);
70953
70954 var _this = _possibleConstructorReturn(this, (OrganizationDataTableEntry.__proto__ || Object.getPrototypeOf(OrganizationDataTableEntry)).call(this, props));
70955
70956 _this.state = {
70957 showModal: false
70958 };
70959
70960 _this.close = _this.close.bind(_this);
70961 _this.confirm = _this.confirm.bind(_this);
70962 _this.open = _this.open.bind(_this);
70963 _this.getAdminElem = _this.getAdminElem.bind(_this);
70964 return _this;
70965 }
70966
70967 _createClass(OrganizationDataTableEntry, [{
70968 key: 'open',
70969 value: function open() {
70970 this.setState({
70971 showModal: true
70972 });
70973 }
70974 }, {
70975 key: 'close',
70976 value: function close() {
70977 this.setState({
70978 showModal: false
70979 });
70980 }
70981 }, {
70982 key: 'confirm',
70983 value: function confirm(event) {
70984 this.setState({
70985 showModal: false
70986 }, this.props.removeMember(event));
70987 }
70988 }, {
70989 key: 'getAdminElem',
70990 value: function getAdminElem() {
70991 var result = [];
70992 var _props = this.props;
70993 var name = _props.name;
70994 var isMember = _props.isMember;
70995 var isAdmin = _props.isAdmin;
70996 var canAuthorize = _props.canAuthorize;
70997
70998 if (isAdmin) {
70999 if (canAuthorize) {
71000 result.push(_react2.default.createElement(
71001 _reactBootstrap.OverlayTrigger,
71002 { key: 'pop-over-admin', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
71003 _reactBootstrap.Popover,
71004 { title: 'Revoke Admin', id: 'admin' },
71005 'Click to remove \'' + name + '\' admin rights from organization.'
71006 ) },
71007 _react2.default.createElement('i', { key: 'admin',
71008 action: 'removeAdmin',
71009 id: name,
71010 onClick: this.props.setAdmin,
71011 className: 'fa fa-check-circle',
71012 style: _style.AdminBadge.isAdmin })
71013 ));
71014 } else {
71015 result.push(_react2.default.createElement('i', { key: 'admin', className: 'fa fa-check-circle', style: { color: 'green' } }));
71016 }
71017
71018 if (!isMember) {
71019 result.push(_react2.default.createElement(
71020 _reactBootstrap.OverlayTrigger,
71021 { key: 'pop-over', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
71022 _reactBootstrap.Popover,
71023 { title: 'Admin not a Member', id: 'admin' },
71024 'User \'' + name + '\' is an admin but not a member.'
71025 ) },
71026 _react2.default.createElement(
71027 'span',
71028 { className: 'admin-not-member' },
71029 ' ! '
71030 )
71031 ));
71032 }
71033 } else if (canAuthorize) {
71034 result.push(_react2.default.createElement(
71035 _reactBootstrap.OverlayTrigger,
71036 { key: 'pop-over', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
71037 _reactBootstrap.Popover,
71038 { title: 'Assign Admin', id: 'admin' },
71039 'Click to add \'' + name + '\' as an admin for the organization.'
71040 ) },
71041 _react2.default.createElement('i', { key: 'admin',
71042 action: 'makeAdmin',
71043 id: name,
71044 onClick: this.props.setAdmin,
71045 className: 'fa fa-times-circle',
71046 style: _style.AdminBadge.isNotAdmin })
71047 ));
71048 } else {
71049 result.push(_react2.default.createElement('i', { key: 'admin', className: 'fa fa-times-circle', style: { color: 'red' } }));
71050 }
71051
71052 return result;
71053 }
71054 }, {
71055 key: 'render',
71056 value: function render() {
71057 var _props2 = this.props;
71058 var name = _props2.name;
71059 var isMember = _props2.isMember;
71060
71061
71062 return _react2.default.createElement(
71063 'tr',
71064 { role: 'row', className: 'odd' },
71065 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
71066 cancelButtonStyle: 'default',
71067 closeHandler: this.close,
71068 confirmButtonMessage: 'OK',
71069 confirmButtonStyle: 'danger',
71070 confirmHandler: this.confirm,
71071 confirmId: name,
71072 modalMessage: 'Are you sure you want to remove ' + name + ' from the organization?',
71073 showModal: this.state.showModal,
71074 title: 'Remove Member' }),
71075 _react2.default.createElement(
71076 'td',
71077 null,
71078 name,
71079 this.props.canAuthorize && isMember ? _react2.default.createElement('i', { className: 'fa fa-remove',
71080 id: this.props.name,
71081 onClick: this.open,
71082 style: { cursor: "pointer", float: "right", fontSize: "15px" } }) : null
71083 ),
71084 _react2.default.createElement(
71085 'td',
71086 { style: { width: '10%', textAlign: 'center' } },
71087 this.getAdminElem()
71088 )
71089 );
71090 }
71091 }]);
71092
71093 return OrganizationDataTableEntry;
71094 }(_react.Component);
71095
71096 exports.default = OrganizationDataTableEntry;
71097
71098/***/ },
71099/* 708 */
71100/***/ function(module, exports, __webpack_require__) {
71101
71102 'use strict';
71103
71104 Object.defineProperty(exports, "__esModule", {
71105 value: true
71106 });
71107
71108 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; }; }();
71109
71110 var _react = __webpack_require__(89);
71111
71112 var _react2 = _interopRequireDefault(_react);
71113
71114 var _reactBootstrap = __webpack_require__(334);
71115
71116 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71117
71118 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
71119
71120 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; }
71121
71122 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; } /**
71123 * Custom modal widget
71124 * @author patrickkerrypei / https://github.com/patrickkerrypei
71125 */
71126
71127 // Libraries
71128
71129
71130 var CustomModal = function (_Component) {
71131 _inherits(CustomModal, _Component);
71132
71133 function CustomModal() {
71134 _classCallCheck(this, CustomModal);
71135
71136 return _possibleConstructorReturn(this, (CustomModal.__proto__ || Object.getPrototypeOf(CustomModal)).apply(this, arguments));
71137 }
71138
71139 _createClass(CustomModal, [{
71140 key: 'render',
71141 value: function render() {
71142 return _react2.default.createElement(
71143 _reactBootstrap.Modal,
71144 { show: this.props.showModal, onHide: this.props.closeHandler,
71145 style: this.props.style },
71146 _react2.default.createElement(
71147 _reactBootstrap.Modal.Header,
71148 { closeButton: true },
71149 _react2.default.createElement(
71150 _reactBootstrap.Modal.Title,
71151 null,
71152 _react2.default.createElement(
71153 'strong',
71154 null,
71155 this.props.title
71156 )
71157 )
71158 ),
71159 _react2.default.createElement(
71160 _reactBootstrap.Modal.Body,
71161 null,
71162 _react2.default.createElement(
71163 'h4',
71164 null,
71165 this.props.modalMessage
71166 )
71167 ),
71168 this.props.children,
71169 _react2.default.createElement(
71170 _reactBootstrap.Modal.Footer,
71171 null,
71172 _react2.default.createElement(
71173 _reactBootstrap.Button,
71174 { bsStyle: this.props.confirmButtonStyle,
71175 id: this.props.confirmId,
71176 onClick: this.props.confirmHandler },
71177 this.props.confirmButtonMessage
71178 ),
71179 _react2.default.createElement(
71180 _reactBootstrap.Button,
71181 { bsStyle: this.props.cancelButtonStyle,
71182 onClick: this.props.closeHandler },
71183 this.props.cancelButtonMessage
71184 )
71185 )
71186 );
71187 }
71188 }]);
71189
71190 return CustomModal;
71191 }(_react.Component);
71192
71193 exports.default = CustomModal;
71194
71195
71196 CustomModal.propTypes = {
71197 cancelButtonMessage: _react.PropTypes.string.isRequired,
71198 cancelButtonStyle: _react.PropTypes.string.isRequired,
71199 closeHandler: _react.PropTypes.func.isRequired,
71200 confirmButtonMessage: _react.PropTypes.string.isRequired,
71201 confirmButtonStyle: _react.PropTypes.string.isRequired,
71202 confirmHandler: _react.PropTypes.func.isRequired,
71203 confirmId: _react.PropTypes.string,
71204 modalMessage: _react.PropTypes.string,
71205 showModal: _react.PropTypes.bool.isRequired,
71206 style: _react.PropTypes.object,
71207 title: _react.PropTypes.string
71208 };
71209
71210/***/ },
71211/* 709 */
71212/***/ function(module, exports, __webpack_require__) {
71213
71214 'use strict';
71215
71216 Object.defineProperty(exports, "__esModule", {
71217 value: true
71218 });
71219 exports.canUserTransfer = exports.getOrgsCanTransferToTo = exports.getOrgsUserIsAdminOf = undefined;
71220 exports.canUserAuthorize = canUserAuthorize;
71221 exports.getUsersWithAccess = getUsersWithAccess;
71222 exports.getOrganizationsWithAccess = getOrganizationsWithAccess;
71223 exports.getUsersInOrganizationsWithAccess = getUsersInOrganizationsWithAccess;
71224 exports.retrieveCollaborators = retrieveCollaborators;
71225 exports.retrieveMembersAndAdmins = retrieveMembersAndAdmins;
71226
71227 var _utils = __webpack_require__(658);
71228
71229 /**
71230 * Gets the organizations the specified user is an admin of
71231 * @param {Array} orgs - organizations
71232 * @param {string} userId - userId
71233 * @return {Array.<T>} returns the organizations user specified is admin of
71234 */
71235 var getOrgsUserIsAdminOf = exports.getOrgsUserIsAdminOf = function getOrgsUserIsAdminOf(orgs, userId) {
71236 return orgs.filter(function (org) {
71237 return org.admins.indexOf(userId) > -1;
71238 }).map(function (org) {
71239 return org._id;
71240 });
71241 };
71242
71243 /**
71244 * Gets the organizations the specified user can transfer to
71245 * @param {Array} organizations - organizations
71246 * @param {string} userId - userId
71247 * @param {string} currentProjectOwnerId - currentProjectOwnerId
71248 * @return {Array.<T>} array of organizations the user specified can transfer to
71249 */
71250 /**
71251 * Utility functions for rest client
71252 * @author patrickkerrypei / https://github.com/patrickkerrypei
71253 */
71254
71255 var getOrgsCanTransferToTo = exports.getOrgsCanTransferToTo = function getOrgsCanTransferToTo(organizations, userId, currentProjectOwnerId) {
71256 // Exclude current project's owner
71257 return getOrgsUserIsAdminOf(organizations, userId).filter(function (orgId) {
71258 return orgId !== currentProjectOwnerId;
71259 });
71260 };
71261
71262 /**
71263 * Returns a boolean for if the current user can authorize others to the project
71264 * @param {Object} user - user object
71265 * @param {Array} orgs - array of orgs
71266 * @param {string} ownerId - id of owner
71267 * @return {boolean} - Boolean on if authorized!
71268 */
71269 function canUserAuthorize(user, orgs, ownerId) {
71270 return user.siteAdmin || user._id === ownerId || orgs.some(function (org) {
71271 return org._id === ownerId && org.admins.indexOf(user._id) !== -1;
71272 });
71273 }
71274
71275 var canUserTransfer = exports.canUserTransfer = function canUserTransfer(organizations, users, ownerId, projectId, user) {
71276 var collaborators = retrieveCollaborators(organizations, users, projectId);
71277 var userCollaborator = collaborators.userCollaborators.find(function (userCollaborator) {
71278 return userCollaborator.name === user._id;
71279 }) || {};
71280 var rights = userCollaborator.rights || '';
71281
71282 var orgsCanTransferTo = getOrgsCanTransferToTo(organizations, user._id, ownerId);
71283
71284 return user.siteAdmin || orgsCanTransferTo.length && rights.toLowerCase().indexOf('delete') > -1;
71285 };
71286
71287 /**
71288 * Maps usernames of users with access to a specified project to their respective rights
71289 * @param {Array} users - all users
71290 * @param {string} projectId - Id of project
71291 * @return {Map} map of users to their rights to a specified projects
71292 */
71293 function getUsersWithAccess(users, projectId) {
71294 var userMap = {};
71295 users.forEach(function (user) {
71296 if (user.projects.hasOwnProperty(projectId)) {
71297
71298 // Building rights string
71299 var userRightsOrigin = '';
71300 if (user.projects[projectId].read) {
71301 userRightsOrigin += 'Read ';
71302 }
71303 if (user.projects[projectId].write) {
71304 userRightsOrigin += 'Write ';
71305 }
71306 if (user.projects[projectId].delete) {
71307 userRightsOrigin += 'Delete ';
71308 }
71309
71310 userMap[user._id] = {
71311 read: user.projects[projectId].read,
71312 write: user.projects[projectId].write,
71313 delete: user.projects[projectId].delete,
71314 inOrg: false,
71315 userRightsOrigin: [userRightsOrigin],
71316 orgsRightsOrigin: []
71317 };
71318 }
71319 });
71320 return userMap;
71321 }
71322
71323 /**
71324 ) * Hashes the names of all organizations with access to their respective rights
71325 * @param {Array} orgs - array of all orgs
71326 * @param {string} projectId - id of project
71327 * @return {Map} (Had to resolve the map to use it in parallel with another async function)
71328 */
71329 function getOrganizationsWithAccess(orgs, projectId) {
71330 var orgToRights = {};
71331
71332 orgs.forEach(function (org) {
71333 if (org.projects.hasOwnProperty(projectId)) {
71334
71335 var orgsRightsOrigin = '';
71336 if (org.projects[projectId].read) {
71337 orgsRightsOrigin += 'Read ';
71338 }
71339 if (org.projects[projectId].write) {
71340 orgsRightsOrigin += 'Write ';
71341 }
71342 if (org.projects[projectId].delete) {
71343 orgsRightsOrigin += 'Delete ';
71344 }
71345
71346 orgToRights[org._id] = JSON.parse(JSON.stringify(org.projects[projectId]));
71347 orgToRights[org._id].orgsRightsOrigin = orgToRights[org._id].orgsRightsOrigin ? orgToRights[org._id].orgsRightsOrigin.concat([org._id + ': ' + orgsRightsOrigin]) : [org._id + ': ' + orgsRightsOrigin]; // eslint-disable-line max-len
71348 }
71349 });
71350 return orgToRights;
71351 }
71352
71353 /**
71354 * Hashes the names of users in specified list of organizations to their respective rights
71355 * @param {Array} orgs - array of all orgs
71356 * @param {string} projectId - id of project
71357 * @return {Map} returns map of the users in the specified list of organizations (names to rights)
71358 */
71359 function getUsersInOrganizationsWithAccess(orgs, projectId) {
71360 var userToOrgsRights = {};
71361
71362 orgs.forEach(function (org) {
71363 if (org.projects.hasOwnProperty(projectId)) {
71364 (function () {
71365
71366 var orgsRightsOrigin = '';
71367 if (org.projects[projectId].read) {
71368 orgsRightsOrigin += 'Read ';
71369 }
71370 if (org.projects[projectId].write) {
71371 orgsRightsOrigin += 'Write ';
71372 }
71373 if (org.projects[projectId].delete) {
71374 orgsRightsOrigin += 'Delete ';
71375 }
71376
71377 org.users.forEach(function (user) {
71378 if (userToOrgsRights[user]) {
71379 // If in multiple organizations
71380 userToOrgsRights[user] = {
71381 read: userToOrgsRights[user].read || org.projects[projectId].read,
71382 write: userToOrgsRights[user].write || org.projects[projectId].write,
71383 delete: userToOrgsRights[user].delete || org.projects[projectId].delete,
71384 orgsRightsOrigin: userToOrgsRights[user].orgsRightsOrigin.concat([org._id + ': ' + orgsRightsOrigin]) // eslint-disable-line max-len
71385 };
71386 } else {
71387 userToOrgsRights[user] = JSON.parse(JSON.stringify(org.projects[projectId]));
71388 userToOrgsRights[user].inOrg = true;
71389 userToOrgsRights[user].orgsRightsOrigin = userToOrgsRights[user].orgsRightsOrigin ? userToOrgsRights[user].orgsRightsOrigin.concat([org._id + ': ' + orgsRightsOrigin]) : [org._id + ': ' + orgsRightsOrigin]; // eslint-disable-line max-len
71390 }
71391 });
71392 })();
71393 }
71394 });
71395 return userToOrgsRights;
71396 }
71397
71398 /**
71399 * Retrieves collaborators of a specified project
71400 * @param {Array} organizations - list of all orgs
71401 * @param {Array} users - list of all users
71402 * @param {string} projectId - projectId
71403 * @return {{userCollaborators: Array.<Object>, organizationCollaborators: Array.<Object>}} - computed collaborators
71404 */
71405 function retrieveCollaborators(organizations, users, projectId) {
71406
71407 var usersWithAccess = getUsersWithAccess(users, projectId),
71408 usersInOrganizationsWithAccess = getUsersInOrganizationsWithAccess(organizations, projectId),
71409 organizationsWithAccess = getOrganizationsWithAccess(organizations, projectId);
71410
71411 // Union of rights if in organization
71412 if ((0, _utils.isEmpty)(usersInOrganizationsWithAccess)) {
71413 // Do nothing because then usersWithAccess is just self and does not need to be modified
71414 } else {
71415 Object.keys(usersInOrganizationsWithAccess).forEach(function (user) {
71416 if (usersWithAccess[user]) {
71417 usersWithAccess[user].read = usersWithAccess[user].read || usersInOrganizationsWithAccess[user].read; // eslint-disable-line max-len
71418 usersWithAccess[user].write = usersWithAccess[user].write || usersInOrganizationsWithAccess[user].write; // eslint-disable-line max-len
71419 usersWithAccess[user].delete = usersWithAccess[user].delete || usersInOrganizationsWithAccess[user].delete; // eslint-disable-line max-len
71420 usersWithAccess[user].inOrg = usersWithAccess[user].inOrg || usersInOrganizationsWithAccess[user].inOrg; // eslint-disable-line max-len
71421 usersWithAccess[user].orgsRightsOrigin = usersInOrganizationsWithAccess[user].orgsRightsOrigin;
71422 } else {
71423 usersWithAccess[user] = JSON.parse(JSON.stringify(usersInOrganizationsWithAccess[user]));
71424 }
71425 });
71426 }
71427
71428 var userCollaborators = [];
71429 var organizationCollaborators = [];
71430 Object.keys(usersWithAccess).forEach(function (user) {
71431 userCollaborators.push({
71432 inOrg: usersWithAccess[user].inOrg,
71433 name: user,
71434 orgsRightsOrigin: usersWithAccess[user].orgsRightsOrigin,
71435 rights: usersWithAccess[user].delete ? 'Read Write Delete' : // eslint-disable-line no-nested-ternary
71436 usersWithAccess[user].write ? 'Read Write' : // eslint-disable-line no-nested-ternary
71437 usersWithAccess[user].read ? 'Read' : '',
71438 userRightsOrigin: usersWithAccess[user].userRightsOrigin
71439 });
71440 });
71441
71442 Object.keys(organizationsWithAccess).forEach(function (organization) {
71443 organizationCollaborators.push({
71444 inOrg: organizationsWithAccess[organization].inOrg,
71445 isOrg: true,
71446 name: organization,
71447 orgsRightsOrigin: organizationsWithAccess[organization].orgsRightsOrigin,
71448 rights: organizationsWithAccess[organization].delete ? 'Read Write Delete' : // eslint-disable-line no-nested-ternary, max-len
71449 organizationsWithAccess[organization].write ? 'Read Write' : // eslint-disable-line no-nested-ternary, max-len
71450 organizationsWithAccess[organization].read ? 'Read' : ''
71451 });
71452 });
71453
71454 return {
71455 userCollaborators: userCollaborators,
71456 organizationCollaborators: organizationCollaborators
71457 };
71458 }
71459
71460 /**
71461 * Retrieve members and admins
71462 * @param {Array} orgs - list of organizations
71463 * @param {string} orgId - organization id
71464 * @return {Array} data containing members and admins
71465 */
71466 function retrieveMembersAndAdmins(orgs, orgId) {
71467 // Get the pertinent organization
71468 var org = null;
71469 var members = {};
71470 var result = [];
71471
71472 for (var i = 0; i < orgs.length; i += 1) {
71473 if (orgs[i]._id === orgId) {
71474 org = orgs[i];
71475 break;
71476 }
71477 }
71478
71479 if (org) {
71480 // Add all members.
71481 result = org.users.map(function (user) {
71482 members[user] = true;
71483 return {
71484 name: user,
71485 isMember: true,
71486 isAdmin: org.admins.indexOf(user) !== -1
71487 };
71488 });
71489
71490 // See if there are any admins that aren't members - if so add them.
71491 org.admins.forEach(function (admin) {
71492 if (members[admin] !== true) {
71493 result.push({
71494 name: admin,
71495 isMember: false,
71496 isAdmin: true
71497 });
71498 }
71499 });
71500 }
71501
71502 return result;
71503 }
71504
71505/***/ },
71506/* 710 */
71507/***/ function(module, exports, __webpack_require__) {
71508
71509 'use strict';
71510
71511 Object.defineProperty(exports, "__esModule", {
71512 value: true
71513 });
71514
71515 var _reactRedux = __webpack_require__(629);
71516
71517 var _OrganizationsPage = __webpack_require__(711);
71518
71519 var _OrganizationsPage2 = _interopRequireDefault(_OrganizationsPage);
71520
71521 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71522
71523 /**
71524 * Organizations page
71525 * @author patrickkerrypei / https://github.com/patrickkerrypei
71526 */
71527
71528 // Libraries
71529 var mapStateToProps = function mapStateToProps(state) {
71530 var basePath = state.basePath;
71531
71532
71533 return {
71534 basePath: basePath
71535 };
71536 };
71537 // Self defined
71538 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationsPage2.default);
71539
71540/***/ },
71541/* 711 */
71542/***/ function(module, exports, __webpack_require__) {
71543
71544 /* WEBPACK VAR INJECTION */(function($) {'use strict';
71545
71546 Object.defineProperty(exports, "__esModule", {
71547 value: true
71548 });
71549
71550 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; }; }();
71551
71552 var _react = __webpack_require__(89);
71553
71554 var _react2 = _interopRequireDefault(_react);
71555
71556 var _OrganizationsTable = __webpack_require__(712);
71557
71558 var _OrganizationsTable2 = _interopRequireDefault(_OrganizationsTable);
71559
71560 var _loginUtils = __webpack_require__(601);
71561
71562 var _organizations = __webpack_require__(669);
71563
71564 var _user = __webpack_require__(661);
71565
71566 var _style = __webpack_require__(598);
71567
71568 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71569
71570 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
71571
71572 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; }
71573
71574 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; } /* global $ */
71575
71576 /**
71577 * Organizations page
71578 * @author patrickkerrypei / https://github.com/patrickkerrypei
71579 */
71580
71581 // Libraries
71582
71583 // Self defined
71584
71585 // Style
71586
71587
71588 var OrganizationsPage = function (_Component) {
71589 _inherits(OrganizationsPage, _Component);
71590
71591 function OrganizationsPage(props) {
71592 _classCallCheck(this, OrganizationsPage);
71593
71594 var _this = _possibleConstructorReturn(this, (OrganizationsPage.__proto__ || Object.getPrototypeOf(OrganizationsPage)).call(this, props));
71595
71596 _this.state = {
71597 createOrganizationInvalidMessage: 'Organization name must only contain letters, numbers, and' + ' the underscore and must be at least 3 characters long',
71598 newOrganizationName: '',
71599 showCreateOrganizationModal: false,
71600 validOrganizationName: true
71601 };
71602 // Event handlers
71603 _this.checkOrganizationName = _this.checkOrganizationName.bind(_this);
71604 _this.closeCreateOrganization = _this.closeCreateOrganization.bind(_this);
71605 _this.createOrganization = _this.createOrganization.bind(_this);
71606 _this.onCreateOrganizationNameChange = _this.onCreateOrganizationNameChange.bind(_this);
71607 _this.openCreateOrganization = _this.openCreateOrganization.bind(_this);
71608 return _this;
71609 }
71610
71611 _createClass(OrganizationsPage, [{
71612 key: 'checkOrganizationName',
71613 value: function checkOrganizationName() {
71614 this.setState({
71615 validOrganizationName: (0, _loginUtils.verifyUserOrOrganizationId)(this.state.newOrganizationName)
71616 });
71617 }
71618 }, {
71619 key: 'closeCreateOrganization',
71620 value: function closeCreateOrganization() {
71621 this.setState({
71622 newOrganizationName: '',
71623 showCreateOrganizationModal: false,
71624 validOrganizationName: true
71625 });
71626 }
71627 }, {
71628 key: 'createOrganization',
71629 value: function createOrganization() {
71630 var _this2 = this;
71631
71632 var dispatch = this.props.dispatch;
71633
71634
71635 Promise.resolve(this.checkOrganizationName()).then(function () {
71636 if (_this2.state.validOrganizationName) {
71637 _this2.props.restClient.organizations.createOrganization(_this2.state.newOrganizationName).then(function () {
71638 _this2.setState({
71639 newOrganizationName: '',
71640 showCreateOrganizationModal: false
71641 });
71642 // Refresh table
71643 dispatch((0, _organizations.fetchOrganizations)());
71644 // Refresh user for user.orgs
71645 dispatch((0, _user.fetchUser)());
71646 }).catch(function (err) {
71647 if (err.status === 400) {
71648 _this2.setState({
71649 createOrganizationInvalidMessage: 'Name already taken',
71650 validOrganizationName: false
71651 });
71652 }
71653 console.error(err); // eslint-disable-line no-console
71654 });
71655 }
71656 });
71657 }
71658 }, {
71659 key: 'onCreateOrganizationNameChange',
71660 value: function onCreateOrganizationNameChange(event) {
71661 this.setState({
71662 newOrganizationName: event.target.value
71663 });
71664 }
71665 }, {
71666 key: 'openCreateOrganization',
71667 value: function openCreateOrganization() {
71668 Promise.resolve(this.setState({
71669 showCreateOrganizationModal: true
71670 })).then(function () {
71671 Object.keys(_style.OrganizationsPage.modalDialog).forEach(function (property) {
71672 $('.modal-dialog')[0].style[property] = _style.OrganizationsPage.modalDialog[property];
71673 });
71674 });
71675 }
71676 }, {
71677 key: 'render',
71678 value: function render() {
71679 return _react2.default.createElement(
71680 'section',
71681 { className: 'content' },
71682 _react2.default.createElement(
71683 'div',
71684 { className: 'row' },
71685 _react2.default.createElement(
71686 'div',
71687 { className: 'col-md-8 col-md-offset-2' },
71688 _react2.default.createElement(
71689 'div',
71690 { className: 'box box-primary' },
71691 _react2.default.createElement(_OrganizationsTable2.default, { checkOrganizationName: this.checkOrganizationName,
71692 closeCreateOrganization: this.closeCreateOrganization,
71693 createOrganization: this.createOrganization,
71694 createOrganizationInvalidMessage: this.state.createOrganizationInvalidMessage,
71695 newOrganizationName: this.state.newOrganizationName,
71696 onCreateOrganizationNameChange: this.onCreateOrganizationNameChange,
71697 openCreateOrganization: this.openCreateOrganization,
71698 showCreateOrganizationModal: this.state.showCreateOrganizationModal,
71699 validOrganizationName: this.state.validOrganizationName })
71700 )
71701 )
71702 )
71703 );
71704 }
71705 }]);
71706
71707 return OrganizationsPage;
71708 }(_react.Component);
71709
71710 exports.default = OrganizationsPage;
71711 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
71712
71713/***/ },
71714/* 712 */
71715/***/ function(module, exports, __webpack_require__) {
71716
71717 'use strict';
71718
71719 Object.defineProperty(exports, "__esModule", {
71720 value: true
71721 });
71722
71723 var _reactRedux = __webpack_require__(629);
71724
71725 var _OrganizationsTable = __webpack_require__(713);
71726
71727 var _OrganizationsTable2 = _interopRequireDefault(_OrganizationsTable);
71728
71729 var _utils = __webpack_require__(658);
71730
71731 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71732
71733 // Self-defined
71734 var mapStateToProps = function mapStateToProps(state) {
71735 var organizations = state.organizations.organizations;
71736 var _state$tables$organiz = state.tables.organizations;
71737 var sortCategory = _state$tables$organiz.sortCategory;
71738 var sortedForward = _state$tables$organiz.sortedForward;
71739 var user = state.user.user;
71740
71741
71742 var adminOrganizations = {};
71743 var formattedOrganizations = [];
71744 organizations.forEach(function (org) {
71745 if (org.admins.indexOf(user._id) !== -1 || user.siteAdmin) {
71746 formattedOrganizations.push(Object.assign(org, {
71747 name: org._id
71748 }));
71749 adminOrganizations[org._id] = true;
71750 } else if (org.users.indexOf(user._id) !== -1) {
71751 formattedOrganizations.push(Object.assign(org, {
71752 name: org._id
71753 }));
71754 adminOrganizations[org._id] = false;
71755 }
71756 });
71757
71758 return {
71759 organizations: sortedForward ? formattedOrganizations.sort((0, _utils.sortObjectArrayByField)(sortCategory)) : formattedOrganizations.sort((0, _utils.sortObjectArrayByField)(sortCategory)).reverse(),
71760 sortCategory: sortCategory,
71761 sortedForward: sortedForward,
71762 user: user,
71763 adminOrganizations: adminOrganizations
71764 };
71765 }; /* global */
71766
71767 /**
71768 * Container widget for the organizations table widget
71769 * @author patrickkerrypei / https://github.com/patrickkerrypei
71770 */
71771
71772 // Libraries
71773 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationsTable2.default);
71774
71775/***/ },
71776/* 713 */
71777/***/ function(module, exports, __webpack_require__) {
71778
71779 'use strict';
71780
71781 Object.defineProperty(exports, "__esModule", {
71782 value: true
71783 });
71784
71785 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; }; }();
71786
71787 var _react = __webpack_require__(89);
71788
71789 var _react2 = _interopRequireDefault(_react);
71790
71791 var _reactBootstrap = __webpack_require__(334);
71792
71793 var _CustomModal = __webpack_require__(708);
71794
71795 var _CustomModal2 = _interopRequireDefault(_CustomModal);
71796
71797 var _DataTable = __webpack_require__(703);
71798
71799 var _DataTable2 = _interopRequireDefault(_DataTable);
71800
71801 var _LoginField = __webpack_require__(597);
71802
71803 var _LoginField2 = _interopRequireDefault(_LoginField);
71804
71805 var _OrganizationsDataTableEntry = __webpack_require__(714);
71806
71807 var _OrganizationsDataTableEntry2 = _interopRequireDefault(_OrganizationsDataTableEntry);
71808
71809 var _organizations = __webpack_require__(669);
71810
71811 var _user = __webpack_require__(661);
71812
71813 var _style = __webpack_require__(598);
71814
71815 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71816
71817 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
71818
71819 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; }
71820
71821 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; } /* global */
71822
71823 /**
71824 * Container widget for the organizations table widget
71825 * @author patrickkerrypei / https://github.com/patrickkerrypei
71826 */
71827
71828 // Libraries
71829
71830 // Self-defined
71831
71832 // Style
71833
71834
71835 var OrganizationsTable = function (_Component) {
71836 _inherits(OrganizationsTable, _Component);
71837
71838 function OrganizationsTable(props) {
71839 _classCallCheck(this, OrganizationsTable);
71840
71841 return _possibleConstructorReturn(this, (OrganizationsTable.__proto__ || Object.getPrototypeOf(OrganizationsTable)).call(this, props));
71842 }
71843
71844 _createClass(OrganizationsTable, [{
71845 key: 'componentDidMount',
71846 value: function componentDidMount() {
71847 var dispatch = this.props.dispatch;
71848
71849
71850 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
71851 dispatch((0, _user.fetchUserIfNeeded)());
71852 }
71853 }, {
71854 key: 'render',
71855 value: function render() {
71856 var _props = this.props;
71857 var organizations = _props.organizations;
71858 var adminOrganizations = _props.adminOrganizations;
71859 var user = _props.user;
71860
71861
71862 var categories = [{ id: 1, name: 'Organization Name' }];
71863
71864 return _react2.default.createElement(
71865 'div',
71866 null,
71867 _react2.default.createElement(
71868 'div',
71869 { className: 'box-header',
71870 style: { paddingBottom: "0px" } },
71871 _react2.default.createElement(
71872 'h3',
71873 { className: 'box-title', style: { fontSize: 28 } },
71874 _react2.default.createElement('i', { className: 'fa fa-institution' }),
71875 ' ',
71876 ' Organizations'
71877 ),
71878 user.siteAdmin || user.canCreate ? _react2.default.createElement(
71879 _reactBootstrap.Button,
71880 { className: 'pull-right',
71881 bsStyle: 'primary',
71882 bsSize: 'small',
71883 onClick: this.props.openCreateOrganization },
71884 'Add +'
71885 ) : null
71886 ),
71887 _react2.default.createElement(
71888 _DataTable2.default,
71889 { categories: categories,
71890 content: 'Organizations',
71891 entries: organizations,
71892 orderEntries: this.handleOrderEntries,
71893 reducerTableName: 'organizations',
71894 sortable: true },
71895 _react2.default.createElement(_OrganizationsDataTableEntry2.default, { adminOrganizations: adminOrganizations })
71896 ),
71897 _react2.default.createElement(
71898 _CustomModal2.default,
71899 { cancelButtonMessage: 'Cancel',
71900 cancelButtonStyle: 'default',
71901 closeHandler: this.props.closeCreateOrganization,
71902 confirmButtonMessage: 'Create',
71903 confirmButtonStyle: 'primary',
71904 confirmHandler: this.props.createOrganization,
71905 modalMessage: 'Please enter the name of the organization you wish to create',
71906 showModal: this.props.showCreateOrganizationModal,
71907 style: _style.OrganizationsTable.createOrganizationModal,
71908 title: 'Create an organization' },
71909 _react2.default.createElement(_LoginField2.default, { autoFocus: true,
71910 hint: 'Organization Name',
71911 iconClass: 'fa fa-institution',
71912 name: 'organization',
71913 onBlur: this.props.checkOrganizationName,
71914 onEnter: this.props.createOrganization,
71915 onInputChange: this.props.onCreateOrganizationNameChange,
71916 indentStyle: _style.OrganizationsTable.modalDialogTextField,
71917 invalidMessage: this.props.createOrganizationInvalidMessage,
71918 valid: this.props.validOrganizationName,
71919 value: this.props.newOrganizationName,
71920 warning: !this.props.validOrganizationName })
71921 )
71922 );
71923 }
71924 }]);
71925
71926 return OrganizationsTable;
71927 }(_react.Component);
71928
71929 exports.default = OrganizationsTable;
71930
71931
71932 OrganizationsTable.propTypes = {
71933 organizations: _react.PropTypes.array.isRequired,
71934 user: _react.PropTypes.object.isRequired
71935 };
71936
71937/***/ },
71938/* 714 */
71939/***/ function(module, exports, __webpack_require__) {
71940
71941 'use strict';
71942
71943 Object.defineProperty(exports, "__esModule", {
71944 value: true
71945 });
71946
71947 var _reactRedux = __webpack_require__(629);
71948
71949 var _OrganizationsDataTableEntry = __webpack_require__(715);
71950
71951 var _OrganizationsDataTableEntry2 = _interopRequireDefault(_OrganizationsDataTableEntry);
71952
71953 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71954
71955 /**
71956 * OrganizationsDataTableEntry container
71957 * @author patrickkerrypei / https://github.com/patrickkerrypei
71958 */
71959
71960 // Libraries
71961 var mapStateToProps = function mapStateToProps(state) {
71962 return {
71963 basePath: state.basePath
71964 };
71965 };
71966 // Self-defined
71967 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_OrganizationsDataTableEntry2.default);
71968
71969/***/ },
71970/* 715 */
71971/***/ function(module, exports, __webpack_require__) {
71972
71973 'use strict';
71974
71975 Object.defineProperty(exports, "__esModule", {
71976 value: true
71977 });
71978
71979 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; }; }();
71980
71981 var _react = __webpack_require__(89);
71982
71983 var _react2 = _interopRequireDefault(_react);
71984
71985 var _reactBootstrap = __webpack_require__(334);
71986
71987 var _reactRouter = __webpack_require__(260);
71988
71989 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
71990
71991 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
71992
71993 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; }
71994
71995 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; } /**
71996 * Custom entries for the organizations data table
71997 * @author patrickkerrypei / https://github.com/patrickkerrypei
71998 */
71999
72000 // Libraries
72001
72002
72003 var OrganizationsDataTableEntry = function (_Component) {
72004 _inherits(OrganizationsDataTableEntry, _Component);
72005
72006 function OrganizationsDataTableEntry() {
72007 _classCallCheck(this, OrganizationsDataTableEntry);
72008
72009 return _possibleConstructorReturn(this, (OrganizationsDataTableEntry.__proto__ || Object.getPrototypeOf(OrganizationsDataTableEntry)).apply(this, arguments));
72010 }
72011
72012 _createClass(OrganizationsDataTableEntry, [{
72013 key: 'render',
72014 value: function render() {
72015 var _props = this.props;
72016 var basePath = _props.basePath;
72017 var adminOrganizations = _props.adminOrganizations;
72018 var disabled = _props.disabled;
72019 var _id = _props._id;
72020
72021
72022 var buildLink = basePath + 'organizations/' + this.props._id;
72023
72024 return _react2.default.createElement(
72025 'tr',
72026 { role: 'row', className: 'odd' },
72027 _react2.default.createElement(
72028 'td',
72029 { className: 'sorting_1' },
72030 _react2.default.createElement(
72031 _reactRouter.Link,
72032 { to: buildLink, style: disabled ? { color: 'grey' } : {} },
72033 _id
72034 ),
72035 disabled ? _react2.default.createElement(
72036 _reactBootstrap.OverlayTrigger,
72037 { key: 'pop-over-disabled', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
72038 _reactBootstrap.Popover,
72039 { title: 'Organization Disabled', id: 'disabled' },
72040 '\'' + _id + '\' is disabled.'
72041 ) },
72042 _react2.default.createElement('i', { className: 'fa fa-ban pull-right', style: { color: 'grey' } })
72043 ) : adminOrganizations[_id] ? _react2.default.createElement(
72044 _reactBootstrap.OverlayTrigger,
72045 { key: 'pop-over-admin', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
72046 _reactBootstrap.Popover,
72047 { title: 'Admin', id: 'admin' },
72048 'You have admin rights to \'' + _id + '\'.'
72049 ) },
72050 _react2.default.createElement('i', { className: 'fa fa-graduation-cap pull-right' })
72051 ) : null
72052 )
72053 );
72054 }
72055 }]);
72056
72057 return OrganizationsDataTableEntry;
72058 }(_react.Component);
72059
72060 exports.default = OrganizationsDataTableEntry;
72061
72062
72063 OrganizationsDataTableEntry.propTypes = {
72064 basePath: _react.PropTypes.string.isRequired
72065 };
72066
72067/***/ },
72068/* 716 */
72069/***/ function(module, exports, __webpack_require__) {
72070
72071 'use strict';
72072
72073 Object.defineProperty(exports, "__esModule", {
72074 value: true
72075 });
72076
72077 var _reactRedux = __webpack_require__(629);
72078
72079 var _ProfilePage = __webpack_require__(717);
72080
72081 var _ProfilePage2 = _interopRequireDefault(_ProfilePage);
72082
72083 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72084
72085 /**
72086 * Profile page container
72087 * @author patrickkerrypei / https://github.com/patrickkerrypei
72088 */
72089
72090 // Libraries
72091 var mapStateToProps = function mapStateToProps(state) {
72092 var user = state.user.user;
72093 var config = state.general.config.config;
72094
72095
72096 return {
72097 user: user,
72098 config: config
72099 };
72100 };
72101 // Self-defined
72102 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProfilePage2.default);
72103
72104/***/ },
72105/* 717 */
72106/***/ function(module, exports, __webpack_require__) {
72107
72108 'use strict';
72109
72110 Object.defineProperty(exports, "__esModule", {
72111 value: true
72112 });
72113
72114 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; }; }();
72115
72116 var _react = __webpack_require__(89);
72117
72118 var _react2 = _interopRequireDefault(_react);
72119
72120 var _ProfileBox = __webpack_require__(718);
72121
72122 var _ProfileBox2 = _interopRequireDefault(_ProfileBox);
72123
72124 var _user = __webpack_require__(661);
72125
72126 var _general = __webpack_require__(674);
72127
72128 var _style = __webpack_require__(598);
72129
72130 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72131
72132 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
72133
72134 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; }
72135
72136 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; } /**
72137 * Profile page container
72138 * @author patrickkerrypei / https://github.com/patrickkerrypei
72139 */
72140
72141 // Libraries
72142
72143 // Self-defined
72144
72145 // Style
72146
72147
72148 var ProfilePage = function (_Component) {
72149 _inherits(ProfilePage, _Component);
72150
72151 function ProfilePage() {
72152 _classCallCheck(this, ProfilePage);
72153
72154 return _possibleConstructorReturn(this, (ProfilePage.__proto__ || Object.getPrototypeOf(ProfilePage)).apply(this, arguments));
72155 }
72156
72157 _createClass(ProfilePage, [{
72158 key: 'componentDidMount',
72159 value: function componentDidMount() {
72160 var dispatch = this.props.dispatch;
72161
72162
72163 dispatch((0, _user.fetchUserIfNeeded)());
72164 dispatch((0, _general.fetchConfigIfNeeded)());
72165 }
72166 }, {
72167 key: 'render',
72168 value: function render() {
72169 var _props = this.props;
72170 var dispatch = _props.dispatch;
72171 var restClient = _props.restClient;
72172 var user = _props.user;
72173
72174
72175 return _react2.default.createElement(
72176 'section',
72177 { className: 'content', style: _style.ProfilePage.profileBox },
72178 _react2.default.createElement(_ProfileBox2.default, { dispatch: dispatch,
72179 editable: true,
72180 isCurrentUser: true,
72181 config: this.props.config,
72182 restClient: restClient,
72183 currentUser: user,
72184 user: user })
72185 );
72186 }
72187 }]);
72188
72189 return ProfilePage;
72190 }(_react.Component);
72191
72192 exports.default = ProfilePage;
72193
72194
72195 ProfilePage.propTypes = {
72196 user: _react.PropTypes.object.isRequired
72197 };
72198
72199/***/ },
72200/* 718 */
72201/***/ function(module, exports, __webpack_require__) {
72202
72203 'use strict';
72204
72205 Object.defineProperty(exports, "__esModule", {
72206 value: true
72207 });
72208
72209 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; }; }();
72210
72211 var _react = __webpack_require__(89);
72212
72213 var _react2 = _interopRequireDefault(_react);
72214
72215 var _reactBootstrap = __webpack_require__(334);
72216
72217 var _LoginField = __webpack_require__(597);
72218
72219 var _LoginField2 = _interopRequireDefault(_LoginField);
72220
72221 var _user = __webpack_require__(661);
72222
72223 var _users = __webpack_require__(665);
72224
72225 var _organizations = __webpack_require__(669);
72226
72227 var _loginUtils = __webpack_require__(601);
72228
72229 var _utils = __webpack_require__(658);
72230
72231 var _CustomModal = __webpack_require__(708);
72232
72233 var _CustomModal2 = _interopRequireDefault(_CustomModal);
72234
72235 var _style = __webpack_require__(598);
72236
72237 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72238
72239 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
72240
72241 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; }
72242
72243 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; } /**
72244 * Reusable profile box
72245 * @author patrickkerrypei / https://github.com/patrickkerrypei
72246 */
72247
72248 // Libraries
72249
72250 // Self-defined
72251
72252
72253 // Style
72254
72255
72256 var ProfileBox = function (_Component) {
72257 _inherits(ProfileBox, _Component);
72258
72259 function ProfileBox(props) {
72260 _classCallCheck(this, ProfileBox);
72261
72262 var _this = _possibleConstructorReturn(this, (ProfileBox.__proto__ || Object.getPrototypeOf(ProfileBox)).call(this, props));
72263
72264 _this.state = {
72265 confirmPassword: '',
72266 email: _this.props.user ? _this.props.user.email : '',
72267 invalidMessage: {
72268 confirmPassword: "Passwords must match",
72269 email: "Invalid email",
72270 password: "Password must be at least 3 characters long and must not be " + "a poor password such as 'password'"
72271 },
72272 password: '',
72273 siteAdmin: _this.props.user.siteAdmin || false,
72274 canCreate: _this.props.user.canCreate || false,
72275 validCredentials: {
72276 confirmPassword: true,
72277 email: true,
72278 password: true
72279 },
72280 hasEdits: false,
72281 showModal: false,
72282 showModelEnableUser: false,
72283
72284 showEditData: false,
72285 showEditSettings: false,
72286 editDataValue: JSON.stringify(_this.props.user.data, null, 2),
72287 editSettingsValue: JSON.stringify(_this.props.user.settings, null, 2)
72288 };
72289 // Event handlers
72290 _this.checkAllFields = _this.checkAllFields.bind(_this);
72291 _this.checkConfirmPassword = _this.checkConfirmPassword.bind(_this);
72292 _this.checkEmail = _this.checkEmail.bind(_this);
72293 _this.checkPassword = _this.checkPassword.bind(_this);
72294 _this.onConfirmPasswordChange = _this.onConfirmPasswordChange.bind(_this);
72295 _this.onEmailChange = _this.onEmailChange.bind(_this);
72296 _this.onPasswordChange = _this.onPasswordChange.bind(_this);
72297 _this.onSiteAdminChange = _this.onSiteAdminChange.bind(_this);
72298 _this.onCanCreateChange = _this.onCanCreateChange.bind(_this);
72299 _this.onUpdate = _this.onUpdate.bind(_this);
72300
72301 _this.showModal = _this.showModal.bind(_this);
72302 _this.hideModal = _this.hideModal.bind(_this);
72303 _this.confirmModal = _this.confirmModal.bind(_this);
72304
72305 _this.showModalEnableUser = _this.showModalEnableUser.bind(_this);
72306 _this.hideModalEnableUser = _this.hideModalEnableUser.bind(_this);
72307 _this.confirmModalEnableUser = _this.confirmModalEnableUser.bind(_this);
72308
72309 _this.showEditInline = _this.showEditInline.bind(_this);
72310 _this.cancelEditInline = _this.cancelEditInline.bind(_this);
72311 _this.onEditInlineChange = _this.onEditInlineChange.bind(_this);
72312 return _this;
72313 }
72314
72315 _createClass(ProfileBox, [{
72316 key: 'componentWillReceiveProps',
72317 value: function componentWillReceiveProps(nextProps) {
72318 this.setState({
72319 email: nextProps.user.email,
72320 siteAdmin: nextProps.user.siteAdmin
72321 });
72322 }
72323 }, {
72324 key: 'checkAllFields',
72325 value: function checkAllFields() {
72326 this.setState({
72327 validCredentials: {
72328 confirmPassword: this.state.password === this.state.confirmPassword,
72329 email: (0, _loginUtils.verifyEmail)(this.state.email),
72330 password: (0, _loginUtils.verifyPassword)(this.state.password) || this.state.password === ''
72331 }
72332 });
72333 }
72334 }, {
72335 key: 'checkConfirmPassword',
72336 value: function checkConfirmPassword() {
72337 this.setState({
72338 validCredentials: {
72339 confirmPassword: this.state.validCredentials.password && this.state.password === this.state.confirmPassword,
72340 email: this.state.validCredentials.email,
72341 password: this.state.validCredentials.password
72342 }
72343 });
72344 }
72345 }, {
72346 key: 'checkEmail',
72347 value: function checkEmail() {
72348 this.setState({
72349 validCredentials: {
72350 confirmPassword: this.state.validCredentials.confirmPassword,
72351 email: (0, _loginUtils.verifyEmail)(this.state.email),
72352 password: this.state.validCredentials.password
72353 }
72354 });
72355 }
72356 }, {
72357 key: 'checkPassword',
72358 value: function checkPassword() {
72359 this.setState({
72360 validCredentials: {
72361 confirmPassword: this.state.validCredentials.confirmPassword,
72362 email: this.state.validCredentials.email,
72363 password: (0, _loginUtils.verifyPassword)(this.state.password)
72364 }
72365 });
72366 }
72367 }, {
72368 key: 'onConfirmPasswordChange',
72369 value: function onConfirmPasswordChange(event) {
72370 this.setState({
72371 confirmPassword: event.target.value,
72372 hasEdits: true
72373 });
72374 }
72375 }, {
72376 key: 'onEmailChange',
72377 value: function onEmailChange(event) {
72378 this.setState({
72379 email: event.target.value,
72380 hasEdits: true
72381 });
72382 }
72383 }, {
72384 key: 'onPasswordChange',
72385 value: function onPasswordChange(event) {
72386 this.setState({
72387 password: event.target.value,
72388 hasEdits: true
72389 });
72390 }
72391 }, {
72392 key: 'onSiteAdminChange',
72393 value: function onSiteAdminChange(event) {
72394 // Release focus
72395 event.target.blur();
72396
72397 this.setState({
72398 siteAdmin: event.target.checked,
72399 hasEdits: true
72400 });
72401 }
72402 }, {
72403 key: 'onCanCreateChange',
72404 value: function onCanCreateChange(event) {
72405 // Release focus
72406 event.target.blur();
72407
72408 this.setState({
72409 canCreate: event.target.checked,
72410 hasEdits: true
72411 });
72412 }
72413 }, {
72414 key: 'deleteUser',
72415 value: function deleteUser() {
72416 var dispatch = this.props.dispatch;
72417
72418 this.props.restClient.users.deleteUser(this.props.user._id, this.props.user.disabled).then(function () {
72419 dispatch((0, _users.fetchUsers)());
72420 dispatch((0, _organizations.fetchOrganizations)());
72421 }).catch(function () {
72422 dispatch((0, _users.fetchUsers)());
72423 });
72424 }
72425 }, {
72426 key: 'reEnableUser',
72427 value: function reEnableUser() {
72428 var dispatch = this.props.dispatch;
72429
72430 this.props.restClient.users.updateUser(this.props.user._id, { disabled: false }).then(function () {
72431 dispatch((0, _users.fetchUsers)());
72432 }).catch(function () {
72433 dispatch((0, _users.fetchUsers)());
72434 });
72435 }
72436
72437 // Confirmation modals
72438
72439 }, {
72440 key: 'showModal',
72441 value: function showModal() {
72442 this.setState({
72443 showModal: true
72444 });
72445 }
72446 }, {
72447 key: 'hideModal',
72448 value: function hideModal() {
72449 this.setState({
72450 showModal: false
72451 });
72452 }
72453 }, {
72454 key: 'confirmModal',
72455 value: function confirmModal(event) {
72456 this.setState({
72457 showModal: false
72458 }, this.deleteUser(event));
72459 }
72460 }, {
72461 key: 'showModalEnableUser',
72462 value: function showModalEnableUser() {
72463 this.setState({
72464 showModalEnableUser: true
72465 });
72466 }
72467 }, {
72468 key: 'hideModalEnableUser',
72469 value: function hideModalEnableUser() {
72470 this.setState({
72471 showModalEnableUser: false
72472 });
72473 }
72474 }, {
72475 key: 'confirmModalEnableUser',
72476 value: function confirmModalEnableUser(event) {
72477 this.setState({
72478 showModalEnableUser: false
72479 }, this.reEnableUser(event));
72480 }
72481
72482 // Data/Settings forms
72483
72484 }, {
72485 key: 'showEditInline',
72486 value: function showEditInline(event) {
72487 debugger;
72488 if (event.target.id === 'user-data-edit') {
72489 this.setState({
72490 showEditData: true
72491 });
72492 } else {
72493 this.setState({
72494 showEditSettings: true
72495 });
72496 }
72497 }
72498 }, {
72499 key: 'cancelEditInline',
72500 value: function cancelEditInline(event) {
72501 debugger;
72502 event.preventDefault();
72503 if (event.target.id === 'user-data-form') {
72504 this.setState({
72505 showEditData: false,
72506 editDataValue: JSON.stringify(this.props.user.data, null, 2)
72507 });
72508 } else {
72509 this.setState({
72510 showEditSettings: false,
72511 editSettingsValue: JSON.stringify(this.props.user.settings, null, 2)
72512 });
72513 }
72514 }
72515 }, {
72516 key: 'onEditInlineChange',
72517 value: function onEditInlineChange(event) {
72518 debugger;
72519 if (event.target.id === 'user-data-text') {
72520 this.setState({
72521 editDataValue: event.target.value,
72522 hasEdits: true
72523 });
72524 } else {
72525 this.setState({
72526 editSettingsValue: event.target.value,
72527 hasEdits: true
72528 });
72529 }
72530 }
72531 }, {
72532 key: 'onUpdate',
72533 value: function onUpdate(event) {
72534 var _this2 = this;
72535
72536 // Release focus
72537 event.target.blur();
72538
72539 var _props = this.props;
72540 var dispatch = _props.dispatch;
72541 var editable = _props.editable;
72542 var user = _props.user;
72543
72544
72545 Promise.resolve(this.checkAllFields()).then(function () {
72546 var valid = Object.keys(_this2.state.validCredentials).every(function (key) {
72547 return _this2.state.validCredentials[key];
72548 });
72549
72550 if (valid) {
72551 (function () {
72552 var updatedUser = {
72553 email: _this2.state.email
72554 };
72555 if (_this2.state.password !== '') {
72556 updatedUser.password = _this2.state.password;
72557 }
72558 if (_this2.props.currentUser.siteAdmin) {
72559 updatedUser.siteAdmin = _this2.state.siteAdmin;
72560 }
72561 if (_this2.props.currentUser.siteAdmin) {
72562 updatedUser.canCreate = _this2.state.canCreate;
72563 }
72564
72565 if (_this2.props.isCurrentUser && !_this2.props.currentUser.siteAdmin) {
72566 _this2.props.restClient.user.updateCurrentUser(updatedUser).then(function () {
72567 _this2.setState({
72568 password: '',
72569 confirmPassword: '',
72570 validCredentials: {
72571 confirmPassword: _this2.state.password === _this2.state.confirmPassword,
72572 email: true,
72573 password: true
72574 },
72575 hasEdits: false
72576 });
72577 // Refresh user
72578 dispatch((0, _user.fetchUser)());
72579 dispatch((0, _users.fetchUsers)());
72580 }).catch(function (err) {
72581 console.error('Error:', err); // eslint-disable-line no-console
72582 dispatch((0, _user.fetchUser)());
72583 dispatch((0, _users.fetchUsers)());
72584 });
72585 } else {
72586 try {
72587 var newData = JSON.parse(_this2.state.editDataValue);
72588 if (JSON.stringify(newData) !== JSON.stringify(_this2.props.user.data)) {
72589 // data valid and not the same
72590 updatedUser.data = newData;
72591 }
72592 } catch (e) {
72593 console.error(e);
72594 }
72595
72596 try {
72597 var newSettings = JSON.parse(_this2.state.editSettingsValue);
72598 if (JSON.stringify(newSettings) !== JSON.stringify(_this2.props.user.settings)) {
72599 // data valid and not the same
72600 updatedUser.settings = newSettings;
72601 }
72602 } catch (e) {
72603 console.error(e);
72604 }
72605
72606 _this2.props.restClient.users.updateUser(user._id, updatedUser).then(function () {
72607 _this2.setState({
72608 password: '',
72609 confirmPassword: '',
72610 validCredentials: {
72611 confirmPassword: _this2.state.password === _this2.state.confirmPassword,
72612 email: true,
72613 password: true
72614 },
72615 hasEdits: false,
72616 showEditData: false,
72617 showEditSettings: false,
72618 editDataValue: JSON.stringify(updatedUser.data || _this2.props.user.data, null, 2),
72619 editSettingsValue: JSON.stringify(updatedUser.settings || _this2.props.user.settings, null, 2)
72620 });
72621 // Refresh user
72622 dispatch((0, _user.fetchUser)());
72623 dispatch((0, _users.fetchUsers)());
72624 }).catch(function (err) {
72625 console.error('Error:', err); // eslint-disable-line no-console
72626 dispatch((0, _user.fetchUser)());
72627 dispatch((0, _users.fetchUsers)());
72628 });
72629 }
72630 })();
72631 } else {
72632 // Reset fields
72633 _this2.setState({
72634 confirmPassword: '',
72635 email: _this2.state.validCredentials.email ? _this2.state.email : '',
72636 password: ''
72637 });
72638 }
72639 });
72640 }
72641 }, {
72642 key: 'render',
72643 value: function render() {
72644 var _props2 = this.props;
72645 var editable = _props2.editable;
72646 var user = _props2.user;
72647 var config = _props2.config;
72648 var isCurrentUser = _props2.isCurrentUser;
72649 var currentUser = _props2.currentUser;
72650
72651 var isGuest = user._id === config.authentication.guestAccount,
72652 nbrOfOwnedProjects = Object.keys(user.projects).filter(function (projectId) {
72653 // FIXME: Do not rely on split
72654 return projectId.split('+')[0] === user._id;
72655 }).length;
72656
72657 return _react2.default.createElement(
72658 'div',
72659 { className: 'box box-primary', style: _style.ProfileBox.profileBoxBorder },
72660 _react2.default.createElement(
72661 'div',
72662 { className: 'box-body box-profile' },
72663 _react2.default.createElement('img', { className: 'profile-user-img img-responsive img-circle',
72664 src: (0, _utils.getUserIconSource)(user._id),
72665 alt: 'User profile picture',
72666 style: _style.ProfileImage }),
72667 _react2.default.createElement(
72668 'h3',
72669 { className: 'profile-username text-center', style: user.disabled ? { color: 'grey' } : {} },
72670 '\xA0',
72671 user._id + (user.disabled ? ' (Disabled)' : ''),
72672 '\xA0'
72673 ),
72674 _react2.default.createElement(
72675 'ul',
72676 { className: 'list-group list-group-unbordered' },
72677 _react2.default.createElement(_LoginField2.default, { disabled: true,
72678 iconClass: 'glyphicon glyphicon-user',
72679 name: 'username',
72680 readOnly: true,
72681 valid: true,
72682 value: 'UserID: ' + (user._id ? user._id : '') }),
72683 isGuest ? null : _react2.default.createElement(
72684 'div',
72685 null,
72686 _react2.default.createElement(
72687 'div',
72688 { className: 'input-group' },
72689 _react2.default.createElement(
72690 'span',
72691 { className: 'input-group-addon' },
72692 _react2.default.createElement('i', { className: 'glyphicon glyphicon-check' })
72693 ),
72694 _react2.default.createElement('input', { className: 'form-control',
72695 readOnly: true,
72696 disabled: !editable || this.props.isCurrentUser ? true : undefined,
72697 value: 'Site Admin' }),
72698 _react2.default.createElement(
72699 'span',
72700 { className: 'input-group-addon' },
72701 _react2.default.createElement('input', { type: 'checkbox',
72702 onChange: this.onSiteAdminChange,
72703 disabled: !editable || this.props.isCurrentUser ? true : undefined,
72704 readOnly: !editable || this.props.isCurrentUser ? true : undefined,
72705 checked: this.state.siteAdmin,
72706 'aria-label': 'Checkbox for following text input' })
72707 )
72708 ),
72709 _react2.default.createElement('br', null)
72710 ),
72711 editable && !this.props.isCurrentUser ? _react2.default.createElement(
72712 'div',
72713 null,
72714 _react2.default.createElement(
72715 'div',
72716 { className: 'input-group' },
72717 _react2.default.createElement(
72718 'span',
72719 { className: 'input-group-addon' },
72720 _react2.default.createElement('i', { className: 'glyphicon glyphicon-check' })
72721 ),
72722 _react2.default.createElement('input', { className: 'form-control',
72723 readOnly: true,
72724 value: 'Can Create' }),
72725 _react2.default.createElement(
72726 'span',
72727 { className: 'input-group-addon' },
72728 _react2.default.createElement('input', { type: 'checkbox',
72729 onChange: this.onCanCreateChange,
72730 checked: this.state.canCreate,
72731 'aria-label': 'Checkbox for following text input' })
72732 )
72733 ),
72734 _react2.default.createElement('br', null)
72735 ) : null,
72736 isGuest ? null : _react2.default.createElement(_LoginField2.default, { disabled: !editable,
72737 hint: 'Email',
72738 iconClass: 'glyphicon glyphicon-envelope',
72739 invalidMessage: this.state.invalidMessage.email,
72740 onBlur: this.checkEmail,
72741 onInputChange: this.onEmailChange,
72742 valid: this.state.validCredentials.email,
72743 value: this.state.email ? this.state.email : '' }),
72744 editable && !isGuest ? _react2.default.createElement(_LoginField2.default, { hint: 'New Password',
72745 iconClass: 'glyphicon glyphicon-lock',
72746 invalidMessage: this.state.invalidMessage.password,
72747 name: 'password',
72748 onBlur: this.checkPassword,
72749 onInputChange: this.onPasswordChange,
72750 textType: 'password',
72751 valid: this.state.validCredentials.password,
72752 value: this.state.password }) : null,
72753 editable && !isGuest ? _react2.default.createElement(_LoginField2.default, { hint: 'Confirm New Password',
72754 iconClass: 'glyphicon glyphicon-log-in',
72755 invalidMessage: this.state.invalidMessage.confirmPassword,
72756 name: 'confirm-password',
72757 onBlur: this.checkConfirmPassword,
72758 onInputChange: this.onConfirmPasswordChange,
72759 textType: 'password',
72760 valid: this.state.validCredentials.confirmPassword,
72761 value: this.state.confirmPassword }) : null
72762 ),
72763 currentUser.siteAdmin ? _react2.default.createElement(
72764 'div',
72765 null,
72766 _react2.default.createElement(
72767 'div',
72768 { style: _style.ProfileBox.infoTitle },
72769 'DATA',
72770 user.disabled ? null : _react2.default.createElement('i', { id: 'user-data-edit', className: 'fa fa-cog pull-right',
72771 style: { cursor: 'pointer' },
72772 onClick: this.showEditInline })
72773 ),
72774 this.state.showEditData ? _react2.default.createElement(
72775 'form',
72776 { id: 'user-data-form', onSubmit: this.cancelEditInline },
72777 _react2.default.createElement('textarea', { id: 'user-data-text', value: this.state.editDataValue,
72778 style: _style.ProfileBox.textArea,
72779 onChange: this.onEditInlineChange }),
72780 _react2.default.createElement('input', { className: 'btn btn-default btn-xs', type: 'submit', value: 'Cancel' })
72781 ) : _react2.default.createElement(
72782 'pre',
72783 { style: _style.ProfileBox.preTextArea },
72784 JSON.stringify(user.data, null, 2)
72785 ),
72786 _react2.default.createElement('br', null),
72787 _react2.default.createElement(
72788 'div',
72789 { style: _style.ProfileBox.infoTitle },
72790 'SETTINGS',
72791 user.disabled ? null : _react2.default.createElement('i', { id: 'user-settings-edit', className: 'fa fa-cog pull-right',
72792 style: { cursor: 'pointer' },
72793 onClick: this.showEditInline })
72794 ),
72795 this.state.showEditSettings ? _react2.default.createElement(
72796 'form',
72797 { id: 'user-settings-form', onSubmit: this.cancelEditInline },
72798 _react2.default.createElement('textarea', { id: 'user-settings-text', value: this.state.editSettingsValue,
72799 style: _style.ProfileBox.textArea,
72800 onChange: this.onEditInlineChange }),
72801 _react2.default.createElement('input', { className: 'btn btn-default btn-xs', type: 'submit', value: 'Cancel' })
72802 ) : _react2.default.createElement(
72803 'pre',
72804 { style: _style.ProfileBox.preTextArea },
72805 JSON.stringify(user.settings, null, 2)
72806 ),
72807 _react2.default.createElement('br', null)
72808 ) : null,
72809 currentUser.siteAdmin && !isCurrentUser && !isGuest ? _react2.default.createElement(
72810 _reactBootstrap.Button,
72811 { bsStyle: 'danger',
72812 onClick: this.showModal,
72813 style: _style.ProfileBox.deleteButton },
72814 user.disabled ? 'Force' : '',
72815 ' Delete ...'
72816 ) : null,
72817 currentUser.siteAdmin && user.disabled ? _react2.default.createElement(
72818 _reactBootstrap.Button,
72819 { bsStyle: 'primary',
72820 onClick: this.showModalEnableUser,
72821 style: _style.ProfileBox.updateButton },
72822 'Enable User ...'
72823 ) : null,
72824 editable && this.state.hasEdits ? _react2.default.createElement(
72825 _reactBootstrap.Button,
72826 { bsStyle: 'primary',
72827 onClick: this.onUpdate,
72828 style: _style.ProfileBox.updateButton },
72829 'Update'
72830 ) : null
72831 ),
72832 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
72833 cancelButtonStyle: 'default',
72834 closeHandler: this.hideModal,
72835 confirmButtonMessage: 'OK',
72836 confirmButtonStyle: 'danger',
72837 confirmHandler: this.confirmModal,
72838 confirmId: user._id,
72839 modalMessage: user.disabled ? 'Are you really sure that you forcefully want to delete ' + user._id + '? After the ' + 'deletion there will no longer be any stored data for the user. If this user was ever ' + 'logged in and a new users registers under the same id - the previous user might ' + 'have sessions stored allowing him to identify as the new user! Additionaly if any ' + 'projects are owned by "' + user._id + '" these would be owned by any new user or ' + 'organization created at the now would be available id.' : 'Are you sure you want to delete ' + user._id + '? This user owns ' + nbrOfOwnedProjects + ' project(s).' + (nbrOfOwnedProjects > 0 ? ' Check projects table filtered by owner for full list. ' : ' ') + 'Deleted users still reside in the database with the extra property "disabled: true"' + ' and can be recovered manually.',
72840 showModal: this.state.showModal,
72841 title: user.disabled ? "Forcefully Delete User" : "Delete User" }),
72842 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
72843 cancelButtonStyle: 'default',
72844 closeHandler: this.hideModalEnableUser,
72845 confirmButtonMessage: 'OK',
72846 confirmButtonStyle: 'danger',
72847 confirmHandler: this.confirmModalEnableUser,
72848 confirmId: user._id,
72849 modalMessage: 'Are you sure you want to re-enable the deleted user "' + user._id + '"? After ' + 're-enabling the user the account will be active and the user will be able to log in ' + 'with the user-id and password stored.',
72850 showModal: this.state.showModalEnableUser,
72851 title: "Enable User" })
72852 );
72853 }
72854 }]);
72855
72856 return ProfileBox;
72857 }(_react.Component);
72858
72859 exports.default = ProfileBox;
72860
72861
72862 ProfileBox.propTypes = {
72863 dispatch: _react.PropTypes.func.isRequired,
72864 editable: _react.PropTypes.bool,
72865 isCurrentUser: _react.PropTypes.bool,
72866 restClient: _react.PropTypes.object.isRequired,
72867 user: _react.PropTypes.object.isRequired
72868 };
72869
72870/***/ },
72871/* 719 */
72872/***/ function(module, exports, __webpack_require__) {
72873
72874 'use strict';
72875
72876 Object.defineProperty(exports, "__esModule", {
72877 value: true
72878 });
72879
72880 var _reactRedux = __webpack_require__(629);
72881
72882 var _ProjectPage = __webpack_require__(720);
72883
72884 var _ProjectPage2 = _interopRequireDefault(_ProjectPage);
72885
72886 var _restUtils = __webpack_require__(709);
72887
72888 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72889
72890 // Self defined
72891 var mapStateToProps = function mapStateToProps(state, ownProps) {
72892 var organizations = state.organizations.organizations;
72893 var user = state.user.user;
72894 var users = state.users.users;
72895 var _ownProps$params = ownProps.params;
72896 var ownerId = _ownProps$params.ownerId;
72897 var projectName = _ownProps$params.projectName;
72898
72899 var projectId = ownerId + '+' + projectName;
72900
72901 var canAuthorize = (0, _restUtils.canUserAuthorize)(user, organizations, ownerId);
72902 var canTransfer = (0, _restUtils.canUserTransfer)(organizations, users, ownerId, projectId, user) || false;
72903
72904 // let enabledUsers = users.filter((user) => {
72905 // return !user.disabled;
72906 // });
72907
72908 return {
72909 canAuthorize: canAuthorize,
72910 canTransfer: canTransfer,
72911 user: user
72912 };
72913 }; /* global window */
72914
72915 /**
72916 * Individual project page
72917 * @author patrickkerrypei / https://github.com/patrickkerrypei
72918 */
72919
72920 // Libraries
72921 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectPage2.default);
72922
72923/***/ },
72924/* 720 */
72925/***/ function(module, exports, __webpack_require__) {
72926
72927 'use strict';
72928
72929 Object.defineProperty(exports, "__esModule", {
72930 value: true
72931 });
72932
72933 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; }; }();
72934
72935 var _react = __webpack_require__(89);
72936
72937 var _react2 = _interopRequireDefault(_react);
72938
72939 var _reactBootstrap = __webpack_require__(334);
72940
72941 var _ProjectAuthorizationWidget = __webpack_require__(721);
72942
72943 var _ProjectAuthorizationWidget2 = _interopRequireDefault(_ProjectAuthorizationWidget);
72944
72945 var _ProjectCollaboratorTable = __webpack_require__(723);
72946
72947 var _ProjectCollaboratorTable2 = _interopRequireDefault(_ProjectCollaboratorTable);
72948
72949 var _ProjectSelectableChart = __webpack_require__(726);
72950
72951 var _ProjectSelectableChart2 = _interopRequireDefault(_ProjectSelectableChart);
72952
72953 var _ProjectTransferWidget = __webpack_require__(744);
72954
72955 var _ProjectTransferWidget2 = _interopRequireDefault(_ProjectTransferWidget);
72956
72957 var _organizations = __webpack_require__(669);
72958
72959 var _user = __webpack_require__(661);
72960
72961 var _users = __webpack_require__(665);
72962
72963 var _style = __webpack_require__(598);
72964
72965 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
72966
72967 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
72968
72969 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; }
72970
72971 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; } /* global window */
72972
72973 /**
72974 * Individual project page
72975 * @author patrickkerrypei / https://github.com/patrickkerrypei
72976 */
72977
72978 // Libraries
72979
72980 // Self defined
72981
72982
72983 var ProjectPage = function (_Component) {
72984 _inherits(ProjectPage, _Component);
72985
72986 function ProjectPage(props) {
72987 _classCallCheck(this, ProjectPage);
72988
72989 return _possibleConstructorReturn(this, (ProjectPage.__proto__ || Object.getPrototypeOf(ProjectPage)).call(this, props));
72990 }
72991
72992 _createClass(ProjectPage, [{
72993 key: 'componentDidMount',
72994 value: function componentDidMount() {
72995 var dispatch = this.props.dispatch;
72996
72997
72998 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
72999 dispatch((0, _user.fetchUserIfNeeded)());
73000 dispatch((0, _users.fetchUsersIfNeeded)());
73001 }
73002 }, {
73003 key: 'render',
73004 value: function render() {
73005 var _props = this.props;
73006 var canAuthorize = _props.canAuthorize;
73007 var canTransfer = _props.canTransfer;
73008 var _props$params = this.props.params;
73009 var ownerId = _props$params.ownerId;
73010 var projectName = _props$params.projectName;
73011 var _props2 = this.props;
73012 var user = _props2.user;
73013 var restClient = _props2.restClient;
73014
73015
73016 return _react2.default.createElement(
73017 'section',
73018 { className: 'content' },
73019 _react2.default.createElement(
73020 'div',
73021 { className: 'box box-primary', style: _style.ProjectPage.titleBox },
73022 _react2.default.createElement(
73023 'div',
73024 { className: 'row' },
73025 _react2.default.createElement(
73026 'div',
73027 { className: 'col-md-12', style: _style.ProjectPage.titleContainer },
73028 _react2.default.createElement(
73029 'div',
73030 { style: _style.ProjectPage.projectTitle },
73031 _react2.default.createElement('i', { className: 'fa fa-cube' }),
73032 ' ' + ownerId + ' / ' + projectName
73033 ),
73034 _react2.default.createElement(
73035 'a',
73036 { className: 'pull-right', href: "/?project=" + window.encodeURIComponent(ownerId + '+' + projectName) },
73037 _react2.default.createElement(
73038 _reactBootstrap.Button,
73039 { bsStyle: 'primary', style: _style.ProjectPage.viewInEditor.button },
73040 'View in editor'
73041 )
73042 )
73043 )
73044 )
73045 ),
73046 _react2.default.createElement(
73047 'div',
73048 { className: 'row' },
73049 _react2.default.createElement(
73050 'div',
73051 { className: 'col-md-6' },
73052 _react2.default.createElement(_ProjectCollaboratorTable2.default, { canAuthorize: canAuthorize,
73053 ownerId: ownerId,
73054 projectName: projectName,
73055 restClient: restClient })
73056 ),
73057 _react2.default.createElement(
73058 'div',
73059 { className: 'col-md-6' },
73060 _react2.default.createElement(_ProjectAuthorizationWidget2.default, { canAuthorize: canAuthorize,
73061 ownerId: ownerId,
73062 projectName: projectName,
73063 restClient: restClient }),
73064 _react2.default.createElement(_ProjectTransferWidget2.default, { canTransfer: canTransfer,
73065 ownerId: ownerId,
73066 projectName: projectName,
73067 restClient: restClient,
73068 userId: user ? user._id : '' }),
73069 _react2.default.createElement(_ProjectSelectableChart2.default, { ownerId: ownerId,
73070 height: 300,
73071 width: 500,
73072 projectName: projectName })
73073 )
73074 )
73075 );
73076 }
73077 }]);
73078
73079 return ProjectPage;
73080 }(_react.Component);
73081
73082 exports.default = ProjectPage;
73083
73084
73085 ProjectPage.propTypes = {
73086 canAuthorize: _react.PropTypes.bool.isRequired,
73087 canTransfer: _react.PropTypes.bool.isRequired,
73088 user: _react.PropTypes.object.isRequired
73089 };
73090
73091/***/ },
73092/* 721 */
73093/***/ function(module, exports, __webpack_require__) {
73094
73095 'use strict';
73096
73097 Object.defineProperty(exports, "__esModule", {
73098 value: true
73099 });
73100
73101 var _reactRedux = __webpack_require__(629);
73102
73103 var _ProjectAuthorizationWidget = __webpack_require__(722);
73104
73105 var _ProjectAuthorizationWidget2 = _interopRequireDefault(_ProjectAuthorizationWidget);
73106
73107 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73108
73109 /**
73110 * Separate component to hold the authorization widget for the project page
73111 * @author patrickkerrypei / https://github.com/patrickkerrypei
73112 */
73113
73114 // Libraries
73115 var mapStateToProps = function mapStateToProps(state) {
73116 var organizations = state.organizations.organizations;
73117 var users = state.users.users;
73118
73119
73120 var enabledUsers = users.filter(function (user) {
73121 return !user.disabled;
73122 });
73123
73124 var enabledOrgs = organizations.filter(function (org) {
73125 return !org.disabled;
73126 });
73127
73128 return {
73129 organizations: enabledOrgs,
73130 users: enabledUsers
73131 };
73132 };
73133 // Self defined
73134 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectAuthorizationWidget2.default);
73135
73136/***/ },
73137/* 722 */
73138/***/ function(module, exports, __webpack_require__) {
73139
73140 'use strict';
73141
73142 Object.defineProperty(exports, "__esModule", {
73143 value: true
73144 });
73145
73146 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; }; }();
73147
73148 var _react = __webpack_require__(89);
73149
73150 var _react2 = _interopRequireDefault(_react);
73151
73152 var _AuthorizationWidget = __webpack_require__(688);
73153
73154 var _AuthorizationWidget2 = _interopRequireDefault(_AuthorizationWidget);
73155
73156 var _utils = __webpack_require__(658);
73157
73158 var _organizations = __webpack_require__(669);
73159
73160 var _users = __webpack_require__(665);
73161
73162 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73163
73164 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
73165
73166 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; }
73167
73168 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; } /**
73169 * Separate component to hold the authorization widget for the project page
73170 * @author patrickkerrypei / https://github.com/patrickkerrypei
73171 */
73172
73173 // Libraries
73174
73175 // Self defined
73176
73177
73178 var ProjectAuthorizationWidget = function (_Component) {
73179 _inherits(ProjectAuthorizationWidget, _Component);
73180
73181 function ProjectAuthorizationWidget(props) {
73182 _classCallCheck(this, ProjectAuthorizationWidget);
73183
73184 var _this = _possibleConstructorReturn(this, (ProjectAuthorizationWidget.__proto__ || Object.getPrototypeOf(ProjectAuthorizationWidget)).call(this, props));
73185
73186 _this.state = {
73187 authorizeButtonGroup: { r: true, w: false, d: false },
73188 multiselectOptions: [],
73189 valuesInMultiselect: ''
73190 };
73191 // Event Handlers
73192 _this.handleAuthorizationChange = _this.handleAuthorizationChange.bind(_this);
73193 _this.handleMultiselectChange = _this.handleMultiselectChange.bind(_this);
73194 _this.handleSubmitAuthorization = _this.handleSubmitAuthorization.bind(_this);
73195 return _this;
73196 }
73197
73198 _createClass(ProjectAuthorizationWidget, [{
73199 key: 'componentDidMount',
73200 value: function componentDidMount() {
73201 var _props = this.props;
73202 var dispatch = _props.dispatch;
73203 var organizations = _props.organizations;
73204 var users = _props.users;
73205
73206
73207 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
73208 dispatch((0, _users.fetchUsersIfNeeded)());
73209
73210 var multiselectOptions = (0, _utils.multiselectFormat)(users.concat(organizations).sort((0, _utils.sortObjectArrayByField)('_id')));
73211 this.setState({
73212 multiselectOptions: multiselectOptions
73213 });
73214 }
73215 }, {
73216 key: 'componentWillReceiveProps',
73217 value: function componentWillReceiveProps(nextProps) {
73218 var organizations = nextProps.organizations;
73219 var users = nextProps.users;
73220
73221
73222 var multiselectOptions = (0, _utils.multiselectFormat)(users.concat(organizations).sort((0, _utils.sortObjectArrayByField)('_id')));
73223 this.setState({
73224 multiselectOptions: multiselectOptions
73225 });
73226 }
73227 }, {
73228 key: 'handleAuthorizationChange',
73229 value: function handleAuthorizationChange(event) {
73230 // Release focus
73231 event.target.blur();
73232
73233 var buttonClicked = event.target.innerHTML.toLowerCase(),
73234 authorizeButtonGroup = this.state.authorizeButtonGroup;
73235
73236 // Radio buttons
73237 Object.keys(this.state.authorizeButtonGroup).forEach(function (right) {
73238 authorizeButtonGroup[right] = right === buttonClicked;
73239 });
73240
73241 this.setState({
73242 authorizeButtonGroup: authorizeButtonGroup
73243 });
73244 }
73245 }, {
73246 key: 'handleMultiselectChange',
73247 value: function handleMultiselectChange(value) {
73248 this.setState({
73249 valuesInMultiselect: value || ''
73250 });
73251 }
73252 }, {
73253 key: 'handleSubmitAuthorization',
73254 value: function handleSubmitAuthorization(event) {
73255 var _this2 = this;
73256
73257 var dispatch = this.props.dispatch;
73258 // Release focus
73259
73260 event.target.blur();
73261
73262 // Check if the user chose to authorize users or organizations
73263 var projectRights = '';
73264 if (this.state.authorizeButtonGroup.r) {
73265 projectRights = 'r';
73266 } else if (this.state.authorizeButtonGroup.w) {
73267 projectRights = 'rw';
73268 } else if (this.state.authorizeButtonGroup.d) {
73269 projectRights = 'rwd';
73270 }
73271
73272 var promiseArrayToGrant = [];
73273 if (this.state.valuesInMultiselect !== '') {
73274 this.state.valuesInMultiselect.split(',').forEach(function (userOrOrgName) {
73275 promiseArrayToGrant.push(_this2.props.restClient.projects.grantRightsToProject(_this2.props.ownerId, _this2.props.projectName, userOrOrgName, projectRights));
73276 });
73277 }
73278
73279 Promise.all(promiseArrayToGrant).then(function () {
73280 dispatch((0, _organizations.fetchOrganizations)());
73281 dispatch((0, _users.fetchUsers)());
73282 }).catch(function (err) {
73283 console.error(err); // eslint-disable-line no-console
73284 });
73285
73286 // Reset fields after submitting
73287 this.setState({
73288 authorizeButtonGroup: { r: true, w: false, d: false },
73289 valuesInMultiselect: ''
73290 });
73291 }
73292 }, {
73293 key: 'render',
73294 value: function render() {
73295 var canAuthorize = this.props.canAuthorize;
73296
73297
73298 var authorizationWidgetData = {
73299 selectableButtons: [{
73300 onChange: this.handleAuthorizationChange,
73301 text: 'R',
73302 state: this.state.authorizeButtonGroup.r ? 'success' : null
73303 }, {
73304 onChange: this.handleAuthorizationChange,
73305 text: 'W',
73306 state: this.state.authorizeButtonGroup.w ? 'success' : null
73307 }, {
73308 onChange: this.handleAuthorizationChange,
73309 text: 'D',
73310 state: this.state.authorizeButtonGroup.d ? 'success' : null
73311 }],
73312 submitButtons: [{
73313 disabled: this.state.valuesInMultiselect === '',
73314 onChange: this.handleSubmitAuthorization,
73315 state: 'primary',
73316 text: 'Submit'
73317
73318 }]
73319 };
73320
73321 return canAuthorize ? _react2.default.createElement(_AuthorizationWidget2.default, { boxSize: '12',
73322 disableLast: true,
73323 handleMultiselectChange: this.handleMultiselectChange,
73324 label: "Add Collaborators",
73325 multi: true,
73326 multiselectOptions: this.state.multiselectOptions,
73327 noneSelected: this.state.valuesInMultiselect === '',
73328 placeholder: 'Select one or more (type to search)',
73329 selectableButtons: authorizationWidgetData.selectableButtons,
73330 selectableButtonsChange: this.handleAuthorizationChange,
73331 selectableButtonsHelperTitle: 'Select Access Level',
73332 selectableButtonsHelperText: 'R - Read, W - Write, D - Delete',
73333 submitButtons: authorizationWidgetData.submitButtons,
73334 valuesInMultiselect: this.state.valuesInMultiselect }) : null;
73335 }
73336 }]);
73337
73338 return ProjectAuthorizationWidget;
73339 }(_react.Component);
73340
73341 exports.default = ProjectAuthorizationWidget;
73342
73343
73344 ProjectAuthorizationWidget.propTypes = {
73345 organizations: _react.PropTypes.array.isRequired,
73346 users: _react.PropTypes.array.isRequired
73347 };
73348
73349/***/ },
73350/* 723 */
73351/***/ function(module, exports, __webpack_require__) {
73352
73353 'use strict';
73354
73355 Object.defineProperty(exports, "__esModule", {
73356 value: true
73357 });
73358
73359 var _reactRedux = __webpack_require__(629);
73360
73361 var _ProjectCollaboratorTable = __webpack_require__(724);
73362
73363 var _ProjectCollaboratorTable2 = _interopRequireDefault(_ProjectCollaboratorTable);
73364
73365 var _utils = __webpack_require__(658);
73366
73367 var _restUtils = __webpack_require__(709);
73368
73369 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73370
73371 /**
73372 * Container widget for the project collaborator table widget
73373 * @author patrickkerrypei / https://github.com/patrickkerrypei
73374 */
73375
73376 // Libraries
73377 var mapStateToProps = function mapStateToProps(state, ownProps) {
73378 var organizations = state.organizations.organizations;
73379 var users = state.users.users;
73380 var ownerId = ownProps.ownerId;
73381 var projectName = ownProps.projectName;
73382
73383 var projectId = ownerId + '+' + projectName;
73384
73385 // Retrieving collaborators
73386 var collaborators = (0, _restUtils.retrieveCollaborators)(organizations, users, projectId);
73387
73388 // Sorting collaborators
73389 var userSortCategory = state.tables.projectUser.sortCategory;
73390 var userSortedForward = state.tables.projectUser.sortedForward;
73391 var orgSortCategory = state.tables.projectOrg.sortCategory;
73392 var orgSortedForward = state.tables.projectOrg.sortedForward;
73393
73394 collaborators = {
73395 userCollaborators: (0, _utils.sortWithChecks)(collaborators.userCollaborators, userSortCategory, userSortedForward),
73396 organizationCollaborators: (0, _utils.sortWithChecks)(collaborators.organizationCollaborators, orgSortCategory, orgSortedForward) // eslint-disable-line max-len
73397 };
73398
73399 return {
73400 collaborators: collaborators,
73401 orgSortedForward: orgSortedForward,
73402 userSortedForward: userSortedForward
73403 };
73404 };
73405 // Self-defined
73406 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectCollaboratorTable2.default);
73407
73408/***/ },
73409/* 724 */
73410/***/ function(module, exports, __webpack_require__) {
73411
73412 'use strict';
73413
73414 Object.defineProperty(exports, "__esModule", {
73415 value: true
73416 });
73417
73418 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; }; }();
73419
73420 var _react = __webpack_require__(89);
73421
73422 var _react2 = _interopRequireDefault(_react);
73423
73424 var _DataTable = __webpack_require__(703);
73425
73426 var _DataTable2 = _interopRequireDefault(_DataTable);
73427
73428 var _ProjectDataTableEntry = __webpack_require__(725);
73429
73430 var _ProjectDataTableEntry2 = _interopRequireDefault(_ProjectDataTableEntry);
73431
73432 var _organizations = __webpack_require__(669);
73433
73434 var _users = __webpack_require__(665);
73435
73436 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73437
73438 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
73439
73440 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; }
73441
73442 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; } /**
73443 * Container widget for the project collaborator table widget
73444 * @author patrickkerrypei / https://github.com/patrickkerrypei
73445 */
73446
73447 // Libraries
73448
73449 // Self-defined
73450
73451
73452 var ProjectCollaboratorTable = function (_Component) {
73453 _inherits(ProjectCollaboratorTable, _Component);
73454
73455 function ProjectCollaboratorTable(props) {
73456 _classCallCheck(this, ProjectCollaboratorTable);
73457
73458 // Event handlers
73459 var _this = _possibleConstructorReturn(this, (ProjectCollaboratorTable.__proto__ || Object.getPrototypeOf(ProjectCollaboratorTable)).call(this, props));
73460
73461 _this.onRevoke = _this.onRevoke.bind(_this);
73462 return _this;
73463 }
73464
73465 _createClass(ProjectCollaboratorTable, [{
73466 key: 'componentDidMount',
73467 value: function componentDidMount() {
73468 var dispatch = this.props.dispatch;
73469
73470
73471 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
73472 dispatch((0, _users.fetchUsersIfNeeded)());
73473 }
73474 }, {
73475 key: 'onRevoke',
73476 value: function onRevoke(event) {
73477 var dispatch = this.props.dispatch;
73478
73479
73480 this.props.restClient.projects.removeRightsToProject(this.props.ownerId, this.props.projectName, event.target.id).then(function () {
73481 dispatch((0, _users.fetchUsers)()); // Re-render after revoking rights
73482 dispatch((0, _organizations.fetchOrganizations)()); // Re-render after revoking rights
73483 });
73484 }
73485 }, {
73486 key: 'render',
73487 value: function render() {
73488 var _props = this.props;
73489 var canAuthorize = _props.canAuthorize;
73490 var collaborators = _props.collaborators;
73491 var ownerId = _props.ownerId;
73492 var projectName = _props.projectName;
73493
73494
73495 var dataTableData = {
73496 categories: {
73497 users: [{ id: 1, name: 'User' }, { id: 2, name: 'Access' }],
73498 organizations: [{ id: 1, name: 'Organization' }, { id: 2, name: 'Access' }]
73499 }
73500 };
73501
73502 return _react2.default.createElement(
73503 'div',
73504 null,
73505 _react2.default.createElement(
73506 'div',
73507 { className: 'box' },
73508 _react2.default.createElement(
73509 'div',
73510 { className: 'box-header', style: { paddingBottom: 0 } },
73511 _react2.default.createElement(
73512 'h3',
73513 { className: 'box-title', style: { fontSize: 18 } },
73514 _react2.default.createElement('i', { className: this.props.iconClass }),
73515 ' ',
73516 ' Collaborators'
73517 )
73518 ),
73519 _react2.default.createElement(
73520 _DataTable2.default,
73521 { categories: dataTableData.categories.users,
73522 categoryStyle: { width: "50%" },
73523 content: 'Users',
73524 entries: collaborators.userCollaborators,
73525 orderEntries: this.onOrderUserEntries,
73526 reducerTableName: 'projectUser',
73527 sortable: true },
73528 _react2.default.createElement(_ProjectDataTableEntry2.default, { canAuthorize: canAuthorize,
73529 handleRevoke: this.onRevoke,
73530 ownerId: ownerId,
73531 projectName: projectName })
73532 ),
73533 _react2.default.createElement(
73534 _DataTable2.default,
73535 { categories: dataTableData.categories.organizations,
73536 categoryStyle: { width: "50%" },
73537 content: 'Organizations',
73538 entries: collaborators.organizationCollaborators,
73539 orderEntries: this.onOrderOrganizationEntries,
73540 reducerTableName: 'projectOrg',
73541 sortable: true },
73542 _react2.default.createElement(_ProjectDataTableEntry2.default, { canAuthorize: canAuthorize,
73543 handleRevoke: this.onRevoke,
73544 ownerId: ownerId,
73545 projectName: projectName })
73546 )
73547 )
73548 );
73549 }
73550 }]);
73551
73552 return ProjectCollaboratorTable;
73553 }(_react.Component);
73554
73555 exports.default = ProjectCollaboratorTable;
73556
73557
73558 ProjectCollaboratorTable.propTypes = {
73559 collaborators: _react.PropTypes.shape({
73560 userCollaborators: _react.PropTypes.array.isRequired,
73561 organizationCollaborators: _react.PropTypes.array.isRequired
73562 }),
73563 orgSortedForward: _react.PropTypes.bool.isRequired,
73564 userSortedForward: _react.PropTypes.bool.isRequired
73565 };
73566
73567/***/ },
73568/* 725 */
73569/***/ function(module, exports, __webpack_require__) {
73570
73571 'use strict';
73572
73573 Object.defineProperty(exports, "__esModule", {
73574 value: true
73575 });
73576
73577 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; }; }();
73578
73579 var _react = __webpack_require__(89);
73580
73581 var _react2 = _interopRequireDefault(_react);
73582
73583 var _reactBootstrap = __webpack_require__(334);
73584
73585 var _CustomModal = __webpack_require__(708);
73586
73587 var _CustomModal2 = _interopRequireDefault(_CustomModal);
73588
73589 var _utils = __webpack_require__(658);
73590
73591 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73592
73593 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
73594
73595 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; }
73596
73597 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; } /**
73598 * Custom entries for the project data table
73599 * @author patrickkerrypei / https://github.com/patrickkerrypei
73600 */
73601
73602 // Libraries
73603
73604 // Self-defined
73605
73606
73607 var ProjectDataTableEntry = function (_Component) {
73608 _inherits(ProjectDataTableEntry, _Component);
73609
73610 function ProjectDataTableEntry(props) {
73611 _classCallCheck(this, ProjectDataTableEntry);
73612
73613 var _this = _possibleConstructorReturn(this, (ProjectDataTableEntry.__proto__ || Object.getPrototypeOf(ProjectDataTableEntry)).call(this, props));
73614
73615 _this.state = {
73616 hover: false,
73617 showModal: false
73618 };
73619 _this.close = _this.close.bind(_this);
73620 _this.confirm = _this.confirm.bind(_this);
73621 _this.open = _this.open.bind(_this);
73622 _this.toggleHover = _this.toggleHover.bind(_this);
73623 return _this;
73624 }
73625
73626 _createClass(ProjectDataTableEntry, [{
73627 key: 'close',
73628 value: function close() {
73629 this.setState({
73630 showModal: false
73631 });
73632 }
73633 }, {
73634 key: 'confirm',
73635 value: function confirm(event) {
73636 this.setState({
73637 showModal: false
73638 }, this.props.handleRevoke(event));
73639 }
73640 }, {
73641 key: 'open',
73642 value: function open() {
73643 this.setState({
73644 showModal: true
73645 });
73646 }
73647 }, {
73648 key: 'toggleHover',
73649 value: function toggleHover() {
73650 this.setState({
73651 hover: !this.state.hover
73652 });
73653 }
73654 }, {
73655 key: 'render',
73656 value: function render() {
73657
73658 // Building popover
73659 var userRightsOrigin = [_react2.default.createElement(
73660 'div',
73661 { key: 0 },
73662 _react2.default.createElement(
73663 'strong',
73664 null,
73665 'From User'
73666 )
73667 )],
73668 orgsRightsOrigin = [_react2.default.createElement(
73669 'div',
73670 { key: 0 },
73671 _react2.default.createElement(
73672 'strong',
73673 null,
73674 'From Organization'
73675 )
73676 )];
73677
73678 if (this.props.userRightsOrigin) {
73679 userRightsOrigin = userRightsOrigin.concat((0, _utils.formatRightsOrigin)(this.props.userRightsOrigin));
73680 } else {
73681 userRightsOrigin.push(_react2.default.createElement(
73682 'div',
73683 { key: 1 },
73684 'None'
73685 ));
73686 }
73687
73688 if (this.props.orgsRightsOrigin.length > 0) {
73689 orgsRightsOrigin = orgsRightsOrigin.concat((0, _utils.formatRightsOrigin)(this.props.orgsRightsOrigin));
73690 } else {
73691 orgsRightsOrigin.push(_react2.default.createElement(
73692 'div',
73693 { key: 1 },
73694 'None'
73695 ));
73696 }
73697
73698 return _react2.default.createElement(
73699 'tr',
73700 { role: 'row', className: 'odd' },
73701 _react2.default.createElement(_CustomModal2.default, { cancelButtonMessage: 'Cancel',
73702 cancelButtonStyle: 'default',
73703 closeHandler: this.close,
73704 confirmButtonMessage: 'OK',
73705 confirmButtonStyle: 'danger',
73706 confirmHandler: this.confirm,
73707 confirmId: this.props.name,
73708 modalMessage: 'Are you sure you want to remove ' + this.props.name + '\'s access to ' + this.props.ownerId + ' / ' + this.props.projectName + '?',
73709 showModal: this.state.showModal,
73710 title: 'Remove Collaborator' }),
73711 _react2.default.createElement(
73712 'td',
73713 null,
73714 this.props.isOrg ? _react2.default.createElement(
73715 'div',
73716 { style: { float: "left" } },
73717 _react2.default.createElement('i', { className: 'fa fa-university', style: { fontSize: "15px", float: "left" } }),
73718 _react2.default.createElement(
73719 'span',
73720 { style: { paddingLeft: "8px" } },
73721 this.props.name
73722 )
73723 ) : _react2.default.createElement(
73724 _reactBootstrap.OverlayTrigger,
73725 { trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
73726 _reactBootstrap.Popover,
73727 { title: 'Access Origin', id: 'Rights Origin' },
73728 userRightsOrigin,
73729 _react2.default.createElement('br', null),
73730 orgsRightsOrigin
73731 ) },
73732 _react2.default.createElement(
73733 'div',
73734 { style: { float: "left" } },
73735 _react2.default.createElement('i', { className: 'fa fa-user' + (this.props.userRightsOrigin ? '' : '-times'),
73736 style: { fontSize: "15px", float: "left" } }),
73737 _react2.default.createElement(
73738 'span',
73739 { style: { paddingLeft: "8px" } },
73740 this.props.name
73741 )
73742 )
73743 )
73744 ),
73745 _react2.default.createElement(
73746 'td',
73747 null,
73748 this.props.rights,
73749 this.props.canAuthorize && (this.props.isOrg || this.props.userRightsOrigin) ? this.props.ownerId === this.props.name ? _react2.default.createElement(
73750 _reactBootstrap.OverlayTrigger,
73751 { overlay: _react2.default.createElement(
73752 _reactBootstrap.Popover,
73753 { id: '1' },
73754 _react2.default.createElement(
73755 'strong',
73756 null,
73757 'This is the owner'
73758 )
73759 ),
73760 placement: 'top',
73761 rootClose: true,
73762 trigger: ["click"] },
73763 _react2.default.createElement('i', { className: 'fa fa-tag',
73764 onMouseEnter: this.toggleHover,
73765 onMouseLeave: this.toggleHover,
73766 style: { cursor: "pointer",
73767 float: "right",
73768 fontSize: "15px" } })
73769 ) : _react2.default.createElement('i', { className: 'fa fa-remove',
73770 id: this.props.name,
73771 onClick: this.open,
73772 onMouseEnter: this.toggleHover,
73773 onMouseLeave: this.toggleHover,
73774 style: { color: this.state.hover ? "red" : "",
73775 cursor: "pointer",
73776 float: "right",
73777 fontSize: "15px" } }) : null
73778 )
73779 );
73780 }
73781 }]);
73782
73783 return ProjectDataTableEntry;
73784 }(_react.Component);
73785
73786 exports.default = ProjectDataTableEntry;
73787
73788/***/ },
73789/* 726 */
73790/***/ function(module, exports, __webpack_require__) {
73791
73792 'use strict';
73793
73794 Object.defineProperty(exports, "__esModule", {
73795 value: true
73796 });
73797
73798 var _reactRedux = __webpack_require__(629);
73799
73800 var _ProjectSelectableCharts = __webpack_require__(727);
73801
73802 var _ProjectSelectableCharts2 = _interopRequireDefault(_ProjectSelectableCharts);
73803
73804 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73805
73806 /**
73807 * Container for CollaboratorsCommitBarChart
73808 * @author patrickkerrypei / https://github.com/patrickkerrypei
73809 */
73810
73811 // Libraries:
73812 var mapStateToProps = function mapStateToProps(state, ownProps) {
73813 var ownerId = ownProps.ownerId;
73814 var projectName = ownProps.projectName;
73815
73816 var projectId = ownerId + '+' + projectName;
73817
73818 // Get project info
73819 var thisProject = state.projects.projects.find(function (project) {
73820 return project._id === projectId;
73821 });
73822 var info = thisProject ? thisProject.info : {};
73823
73824 return {
73825 info: info
73826 };
73827 };
73828 // Self defined:
73829 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectSelectableCharts2.default);
73830
73831/***/ },
73832/* 727 */
73833/***/ function(module, exports, __webpack_require__) {
73834
73835 'use strict';
73836
73837 Object.defineProperty(exports, "__esModule", {
73838 value: true
73839 });
73840
73841 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; }; }();
73842
73843 var _react = __webpack_require__(89);
73844
73845 var _react2 = _interopRequireDefault(_react);
73846
73847 var _reactBootstrap = __webpack_require__(334);
73848
73849 var _CollaboratorsCommitsBarChart = __webpack_require__(728);
73850
73851 var _CollaboratorsCommitsBarChart2 = _interopRequireDefault(_CollaboratorsCommitsBarChart);
73852
73853 var _CommitsDoughnutChart = __webpack_require__(740);
73854
73855 var _CommitsDoughnutChart2 = _interopRequireDefault(_CommitsDoughnutChart);
73856
73857 var _ProjectCommitsLineChart = __webpack_require__(742);
73858
73859 var _ProjectCommitsLineChart2 = _interopRequireDefault(_ProjectCommitsLineChart);
73860
73861 var _utils = __webpack_require__(658);
73862
73863 var _constants = __webpack_require__(660);
73864
73865 var _projects = __webpack_require__(667);
73866
73867 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
73868
73869 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
73870
73871 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; }
73872
73873 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; } /**
73874 * LineChart widget for Commits
73875 * @author patrickkerrypei / https://github.com/patrickkerrypei
73876 */
73877
73878 // Libraries
73879
73880 // Self-defined
73881
73882
73883 var CHART_TITLES = {
73884 Bar: 'Latest Commits',
73885 Line: 'Timeline of Latest Commits',
73886 Doughnut: 'Latest Commits'
73887 };
73888
73889 var ProjectSelectableCharts = function (_Component) {
73890 _inherits(ProjectSelectableCharts, _Component);
73891
73892 function ProjectSelectableCharts(props) {
73893 _classCallCheck(this, ProjectSelectableCharts);
73894
73895 var _this = _possibleConstructorReturn(this, (ProjectSelectableCharts.__proto__ || Object.getPrototypeOf(ProjectSelectableCharts)).call(this, props));
73896
73897 _this.state = {
73898 chart: 'Bar',
73899 componentWidth: _this.props.width
73900 };
73901 // Event handlers
73902 _this.onChartChange = _this.onChartChange.bind(_this);
73903 return _this;
73904 }
73905
73906 _createClass(ProjectSelectableCharts, [{
73907 key: 'componentDidMount',
73908 value: function componentDidMount() {
73909 var dispatch = this.props.dispatch;
73910
73911
73912 dispatch((0, _projects.fetchProjectsIfNeeded)());
73913 this.setState({
73914 componentWidth: document.getElementById("selectableChartBox").offsetWidth
73915 });
73916 }
73917 }, {
73918 key: 'componentDidUpdate',
73919 value: function componentDidUpdate() {
73920 var newWidth = document.getElementById("selectableChartBox").offsetWidth;
73921
73922 if (newWidth !== this.state.componentWidth) {
73923 this.setState({
73924 componentWidth: document.getElementById("selectableChartBox").offsetWidth
73925 });
73926 }
73927 }
73928 }, {
73929 key: 'onChartChange',
73930 value: function onChartChange(event) {
73931 // Release focus
73932 event.target.blur();
73933
73934 this.setState({
73935 chart: event.target.value
73936 });
73937 }
73938 }, {
73939 key: 'render',
73940 value: function render() {
73941 var _state = this.state;
73942 var chart = _state.chart;
73943 var componentWidth = _state.componentWidth;
73944 var _props = this.props;
73945 var info = _props.info;
73946 var ownerId = _props.ownerId;
73947 var projectName = _props.projectName;
73948 var unavailable = _props.unavailable;
73949 var height = _props.height;
73950 var width = _props.width;
73951
73952 var displayInfoInline = componentWidth > width + 100;
73953
73954 return _react2.default.createElement(
73955 'div',
73956 { className: 'row hidden-xs', id: 'selectableChartBox' },
73957 _react2.default.createElement(
73958 'div',
73959 { className: 'col-md-12' },
73960 _react2.default.createElement(
73961 'div',
73962 { className: 'box' },
73963 _react2.default.createElement(
73964 'div',
73965 { className: 'box-header with-border' },
73966 _react2.default.createElement(
73967 'h3',
73968 { className: 'box-title' },
73969 CHART_TITLES[chart]
73970 ),
73971 _react2.default.createElement(
73972 'div',
73973 { className: 'box-tools pull-right' },
73974 _react2.default.createElement(
73975 'div',
73976 { className: 'box-tools pull-right' },
73977 _react2.default.createElement(
73978 'select',
73979 { onChange: this.onChartChange, value: chart },
73980 _react2.default.createElement(
73981 'option',
73982 { value: 'Bar' },
73983 'Bar Chart'
73984 ),
73985 _react2.default.createElement(
73986 'option',
73987 { value: 'Line' },
73988 'Line Chart'
73989 ),
73990 _react2.default.createElement(
73991 'option',
73992 { value: 'Doughnut' },
73993 'Doughnut Chart'
73994 )
73995 )
73996 )
73997 )
73998 ),
73999 _react2.default.createElement(
74000 'div',
74001 { className: 'row' },
74002 _react2.default.createElement(
74003 'div',
74004 { className: 'col-md-' + (displayInfoInline ? 9 : 12) },
74005 _react2.default.createElement(
74006 'div',
74007 { className: 'box-body' },
74008 chart === 'Bar' ? _react2.default.createElement(_CollaboratorsCommitsBarChart2.default, { height: height,
74009 ownerId: ownerId,
74010 projectName: projectName,
74011 width: componentWidth }) : null,
74012 chart === 'Line' ? _react2.default.createElement(_ProjectCommitsLineChart2.default, { height: height,
74013 ownerId: ownerId,
74014 projectName: projectName,
74015 width: width }) : null,
74016 chart === 'Doughnut' ? _react2.default.createElement(_CommitsDoughnutChart2.default, { height: height,
74017 ownerId: ownerId,
74018 projectName: projectName,
74019 width: width }) : null
74020 )
74021 ),
74022 displayInfoInline ? _react2.default.createElement(
74023 'div',
74024 { className: 'col-md-3', style: { textAlign: "-webkit-center" } },
74025 _react2.default.createElement('br', null),
74026 _react2.default.createElement(
74027 'strong',
74028 null,
74029 'Last Modified'
74030 ),
74031 _react2.default.createElement('br', null),
74032 _react2.default.createElement(
74033 'i',
74034 null,
74035 info.modifiedAt ? (0, _utils.timeAgo)(info.modifiedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74036 _react2.default.createElement('br', null),
74037 'by ' + (info.modifier ? info.modifier : unavailable)
74038 ),
74039 _react2.default.createElement('br', null),
74040 _react2.default.createElement('br', null),
74041 _react2.default.createElement('br', null),
74042 _react2.default.createElement(
74043 'strong',
74044 null,
74045 'Last Viewed'
74046 ),
74047 _react2.default.createElement('br', null),
74048 _react2.default.createElement(
74049 'i',
74050 null,
74051 info.viewedAt ? (0, _utils.timeAgo)(info.viewedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74052 _react2.default.createElement('br', null),
74053 'by ' + (info.viewer ? info.viewer : unavailable)
74054 ),
74055 _react2.default.createElement('br', null),
74056 _react2.default.createElement('br', null),
74057 _react2.default.createElement('br', null),
74058 _react2.default.createElement(
74059 'strong',
74060 null,
74061 'Created At'
74062 ),
74063 _react2.default.createElement('br', null),
74064 _react2.default.createElement(
74065 'i',
74066 null,
74067 info.createdAt ? (0, _utils.timeAgo)(info.createdAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74068 _react2.default.createElement('br', null),
74069 'by ' + (info.creator ? info.creator : unavailable)
74070 ),
74071 _react2.default.createElement('br', null),
74072 _react2.default.createElement('br', null),
74073 _react2.default.createElement('br', null)
74074 ) : _react2.default.createElement(
74075 'div',
74076 { className: 'col-md-12', style: { textAlign: "-webkit-center" } },
74077 _react2.default.createElement(
74078 'div',
74079 { className: 'row' },
74080 _react2.default.createElement(
74081 'div',
74082 { className: 'col-md-4' },
74083 _react2.default.createElement(
74084 'strong',
74085 null,
74086 'Last Modified'
74087 ),
74088 _react2.default.createElement('br', null),
74089 _react2.default.createElement(
74090 'i',
74091 null,
74092 info.modifiedAt ? (0, _utils.timeAgo)(info.modifiedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74093 _react2.default.createElement('br', null),
74094 'by ' + (info.modifier ? info.modifier : unavailable)
74095 )
74096 ),
74097 _react2.default.createElement(
74098 'div',
74099 { className: 'col-md-4' },
74100 _react2.default.createElement(
74101 'strong',
74102 null,
74103 'Last Viewed'
74104 ),
74105 _react2.default.createElement('br', null),
74106 _react2.default.createElement(
74107 'i',
74108 null,
74109 info.viewedAt ? (0, _utils.timeAgo)(info.viewedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74110 _react2.default.createElement('br', null),
74111 'by ' + (info.viewer ? info.viewer : unavailable)
74112 )
74113 ),
74114 _react2.default.createElement(
74115 'div',
74116 { className: 'col-md-4' },
74117 _react2.default.createElement(
74118 'strong',
74119 null,
74120 'Created At'
74121 ),
74122 _react2.default.createElement('br', null),
74123 _react2.default.createElement(
74124 'i',
74125 null,
74126 info.createdAt ? (0, _utils.timeAgo)(info.createdAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE),
74127 _react2.default.createElement('br', null),
74128 'by ' + (info.creator ? info.creator : unavailable)
74129 )
74130 )
74131 )
74132 )
74133 )
74134 )
74135 )
74136 );
74137 }
74138 }]);
74139
74140 return ProjectSelectableCharts;
74141 }(_react.Component);
74142
74143 exports.default = ProjectSelectableCharts;
74144
74145
74146 ProjectSelectableCharts.propTypes = {
74147 info: _react.PropTypes.shape({
74148 createdAt: _react.PropTypes.string,
74149 viewedAt: _react.PropTypes.string,
74150 modifiedAt: _react.PropTypes.string,
74151 creator: _react.PropTypes.string,
74152 viewer: _react.PropTypes.string,
74153 modifier: _react.PropTypes.string
74154 }).isRequired
74155 };
74156
74157 ProjectSelectableCharts.defaultProps = {
74158 unavailable: "Unavailable"
74159 };
74160
74161/***/ },
74162/* 728 */
74163/***/ function(module, exports, __webpack_require__) {
74164
74165 'use strict';
74166
74167 Object.defineProperty(exports, "__esModule", {
74168 value: true
74169 });
74170
74171 var _reactRedux = __webpack_require__(629);
74172
74173 var _CollaboratorsCommitsBarChart = __webpack_require__(729);
74174
74175 var _CollaboratorsCommitsBarChart2 = _interopRequireDefault(_CollaboratorsCommitsBarChart);
74176
74177 var _utils = __webpack_require__(658);
74178
74179 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
74180
74181 // Self defined:
74182 var mapStateToProps = function mapStateToProps(state, ownProps) {
74183 var ownerId = ownProps.ownerId;
74184 var projectName = ownProps.projectName;
74185
74186 var projectId = ownerId + '+' + projectName;
74187
74188 // Could be fetching
74189 var commits = state.projects.commits[projectId] ? state.projects.commits[projectId].commits || [] : [];
74190 var data = (0, _utils.processCommitsBar)(commits.slice());
74191
74192 return {
74193 data: data
74194 };
74195 }; /**
74196 * Container for CollaboratorsCommitBarChart
74197 * @author patrickkerrypei / https://github.com/patrickkerrypei
74198 */
74199
74200 // Libraries:
74201 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_CollaboratorsCommitsBarChart2.default);
74202
74203/***/ },
74204/* 729 */
74205/***/ function(module, exports, __webpack_require__) {
74206
74207 'use strict';
74208
74209 Object.defineProperty(exports, "__esModule", {
74210 value: true
74211 });
74212
74213 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; }; }();
74214
74215 var _react = __webpack_require__(89);
74216
74217 var _react2 = _interopRequireDefault(_react);
74218
74219 var _reactChartjs = __webpack_require__(730);
74220
74221 var _projects = __webpack_require__(667);
74222
74223 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
74224
74225 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
74226
74227 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; }
74228
74229 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; } /**
74230 * BarGraph for 'commits by collaborators' widget
74231 * @author patrickkerrypei / https://github.com/patrickkerrypei
74232 */
74233
74234 // Libraries:
74235
74236 // Self defined:
74237
74238
74239 var CollaboratorsCommitsBarGraph = function (_Component) {
74240 _inherits(CollaboratorsCommitsBarGraph, _Component);
74241
74242 function CollaboratorsCommitsBarGraph(props) {
74243 _classCallCheck(this, CollaboratorsCommitsBarGraph);
74244
74245 var _this = _possibleConstructorReturn(this, (CollaboratorsCommitsBarGraph.__proto__ || Object.getPrototypeOf(CollaboratorsCommitsBarGraph)).call(this, props));
74246
74247 _this.state = {
74248 numCommits: 100
74249 };
74250 return _this;
74251 }
74252
74253 _createClass(CollaboratorsCommitsBarGraph, [{
74254 key: 'componentDidMount',
74255 value: function componentDidMount() {
74256 var dispatch = this.props.dispatch;
74257 var _props = this.props;
74258 var ownerId = _props.ownerId;
74259 var projectName = _props.projectName;
74260
74261
74262 dispatch((0, _projects.fetchCommitsIfNeeded)(ownerId, projectName, this.state.numCommits));
74263 }
74264 }, {
74265 key: 'shouldComponentUpdate',
74266 value: function shouldComponentUpdate(nextProps /* , nextState */) {
74267 return this.props.data !== nextProps.data;
74268 }
74269 }, {
74270 key: 'render',
74271 value: function render() {
74272 var _props2 = this.props;
74273 var data = _props2.data;
74274 var options = _props2.options;
74275 var _props3 = this.props;
74276 var height = _props3.height;
74277 var width = _props3.width;
74278
74279
74280 return _react2.default.createElement(_reactChartjs.Bar, { data: data,
74281 height: height,
74282 width: width,
74283 options: options || {},
74284 redraw: true });
74285 }
74286 }]);
74287
74288 return CollaboratorsCommitsBarGraph;
74289 }(_react.Component);
74290
74291 exports.default = CollaboratorsCommitsBarGraph;
74292
74293
74294 CollaboratorsCommitsBarGraph.propTypes = {
74295 data: _react.PropTypes.object.isRequired
74296 };
74297
74298 CollaboratorsCommitsBarGraph.defaultProps = {
74299 unavailable: "Unavailable"
74300 };
74301
74302/***/ },
74303/* 730 */
74304/***/ function(module, exports, __webpack_require__) {
74305
74306 module.exports = {
74307 Bar: __webpack_require__(731),
74308 Doughnut: __webpack_require__(735),
74309 Line: __webpack_require__(736),
74310 Pie: __webpack_require__(737),
74311 PolarArea: __webpack_require__(738),
74312 Radar: __webpack_require__(739),
74313 createClass: __webpack_require__(732).createClass
74314 };
74315
74316
74317/***/ },
74318/* 731 */
74319/***/ function(module, exports, __webpack_require__) {
74320
74321 var vars = __webpack_require__(732);
74322
74323 module.exports = vars.createClass('Bar', ['getBarsAtEvent']);
74324
74325
74326/***/ },
74327/* 732 */
74328/***/ function(module, exports, __webpack_require__) {
74329
74330 var React = __webpack_require__(89);
74331 var ReactDOM = __webpack_require__(122);
74332
74333 module.exports = {
74334 createClass: function(chartType, methodNames, dataKey) {
74335 var classData = {
74336 displayName: chartType + 'Chart',
74337 getInitialState: function() { return {}; },
74338 render: function() {
74339 var _props = {
74340 ref: 'canvass'
74341 };
74342 for (var name in this.props) {
74343 if (this.props.hasOwnProperty(name)) {
74344 if (name !== 'data' && name !== 'options') {
74345 _props[name] = this.props[name];
74346 }
74347 }
74348 }
74349 return React.createElement('canvas', _props);
74350 }
74351 };
74352
74353 var extras = ['clear', 'stop', 'resize', 'toBase64Image', 'generateLegend', 'update', 'addData', 'removeData'];
74354 function extra(type) {
74355 classData[type] = function() {
74356 return this.state.chart[type].apply(this.state.chart, arguments);
74357 };
74358 }
74359
74360 classData.componentDidMount = function() {
74361 this.initializeChart(this.props);
74362 };
74363
74364 classData.componentWillUnmount = function() {
74365 var chart = this.state.chart;
74366 chart.destroy();
74367 };
74368
74369 classData.componentWillReceiveProps = function(nextProps) {
74370 var chart = this.state.chart;
74371 if (nextProps.redraw) {
74372 chart.destroy();
74373 this.initializeChart(nextProps);
74374 } else {
74375 dataKey = dataKey || dataKeys[chart.name];
74376 updatePoints(nextProps, chart, dataKey);
74377 if (chart.scale) {
74378 chart.scale.xLabels = nextProps.data.labels;
74379 chart.scale.calculateXLabelRotation();
74380 }
74381 chart.update();
74382 }
74383 };
74384
74385 classData.initializeChart = function(nextProps) {
74386 var Chart = __webpack_require__(733);
74387 var el = ReactDOM.findDOMNode(this);
74388 var ctx = el.getContext("2d");
74389 var chart = new Chart(ctx)[chartType](nextProps.data, nextProps.options || {});
74390 this.state.chart = chart;
74391 };
74392
74393 // return the chartjs instance
74394 classData.getChart = function() {
74395 return this.state.chart;
74396 };
74397
74398 // return the canvass element that contains the chart
74399 classData.getCanvass = function() {
74400 return this.refs.canvass;
74401 };
74402
74403 classData.getCanvas = classData.getCanvass;
74404
74405 var i;
74406 for (i=0; i<extras.length; i++) {
74407 extra(extras[i]);
74408 }
74409 for (i=0; i<methodNames.length; i++) {
74410 extra(methodNames[i]);
74411 }
74412
74413 return React.createClass(classData);
74414 }
74415 };
74416
74417 var dataKeys = {
74418 'Line': 'points',
74419 'Radar': 'points',
74420 'Bar': 'bars'
74421 };
74422
74423 var updatePoints = function(nextProps, chart, dataKey) {
74424 var name = chart.name;
74425
74426 if (name === 'PolarArea' || name === 'Pie' || name === 'Doughnut') {
74427 nextProps.data.forEach(function(segment, segmentIndex) {
74428 if (!chart.segments[segmentIndex]) {
74429 chart.addData(segment);
74430 } else {
74431 Object.keys(segment).forEach(function (key) {
74432 chart.segments[segmentIndex][key] = segment[key];
74433 });
74434 }
74435 });
74436 } else {
74437 while (chart.scale.xLabels.length > nextProps.data.labels.length) {
74438 chart.removeData();
74439 }
74440 nextProps.data.datasets.forEach(function(set, setIndex) {
74441 set.data.forEach(function(val, pointIndex) {
74442 if (typeof(chart.datasets[setIndex][dataKey][pointIndex]) == "undefined") {
74443 addData(nextProps, chart, setIndex, pointIndex);
74444 } else {
74445 chart.datasets[setIndex][dataKey][pointIndex].value = val;
74446 }
74447 });
74448 });
74449 }
74450 };
74451
74452 var addData = function(nextProps, chart, setIndex, pointIndex) {
74453 var values = [];
74454 nextProps.data.datasets.forEach(function(set) {
74455 values.push(set.data[pointIndex]);
74456 });
74457 chart.addData(values, nextProps.data.labels[setIndex]);
74458 };
74459
74460
74461/***/ },
74462/* 733 */
74463/***/ function(module, exports, __webpack_require__) {
74464
74465 var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
74466 * Chart.js
74467 * http://chartjs.org/
74468 * Version: 1.1.1
74469 *
74470 * Copyright 2015 Nick Downie
74471 * Released under the MIT license
74472 * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md
74473 */
74474
74475
74476 (function(){
74477
74478 "use strict";
74479
74480 //Declare root variable - window in the browser, global on the server
74481 var root = this,
74482 previous = root.Chart;
74483
74484 //Occupy the global variable of Chart, and create a simple base class
74485 var Chart = function(context){
74486 var chart = this;
74487 this.canvas = context.canvas;
74488
74489 this.ctx = context;
74490
74491 //Variables global to the chart
74492 var computeDimension = function(element,dimension)
74493 {
74494 if (element['offset'+dimension])
74495 {
74496 return element['offset'+dimension];
74497 }
74498 else
74499 {
74500 return document.defaultView.getComputedStyle(element).getPropertyValue(dimension);
74501 }
74502 };
74503
74504 var width = this.width = computeDimension(context.canvas,'Width') || context.canvas.width;
74505 var height = this.height = computeDimension(context.canvas,'Height') || context.canvas.height;
74506
74507 this.aspectRatio = this.width / this.height;
74508 //High pixel density displays - multiply the size of the canvas height/width by the device pixel ratio, then scale.
74509 helpers.retinaScale(this);
74510
74511 return this;
74512 };
74513 //Globally expose the defaults to allow for user updating/changing
74514 Chart.defaults = {
74515 global: {
74516 // Boolean - Whether to animate the chart
74517 animation: true,
74518
74519 // Number - Number of animation steps
74520 animationSteps: 60,
74521
74522 // String - Animation easing effect
74523 animationEasing: "easeOutQuart",
74524
74525 // Boolean - If we should show the scale at all
74526 showScale: true,
74527
74528 // Boolean - If we want to override with a hard coded scale
74529 scaleOverride: false,
74530
74531 // ** Required if scaleOverride is true **
74532 // Number - The number of steps in a hard coded scale
74533 scaleSteps: null,
74534 // Number - The value jump in the hard coded scale
74535 scaleStepWidth: null,
74536 // Number - The scale starting value
74537 scaleStartValue: null,
74538
74539 // String - Colour of the scale line
74540 scaleLineColor: "rgba(0,0,0,.1)",
74541
74542 // Number - Pixel width of the scale line
74543 scaleLineWidth: 1,
74544
74545 // Boolean - Whether to show labels on the scale
74546 scaleShowLabels: true,
74547
74548 // Interpolated JS string - can access value
74549 scaleLabel: "<%=value%>",
74550
74551 // Boolean - Whether the scale should stick to integers, and not show any floats even if drawing space is there
74552 scaleIntegersOnly: true,
74553
74554 // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
74555 scaleBeginAtZero: false,
74556
74557 // String - Scale label font declaration for the scale label
74558 scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
74559
74560 // Number - Scale label font size in pixels
74561 scaleFontSize: 12,
74562
74563 // String - Scale label font weight style
74564 scaleFontStyle: "normal",
74565
74566 // String - Scale label font colour
74567 scaleFontColor: "#666",
74568
74569 // Boolean - whether or not the chart should be responsive and resize when the browser does.
74570 responsive: false,
74571
74572 // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container
74573 maintainAspectRatio: true,
74574
74575 // Boolean - Determines whether to draw tooltips on the canvas or not - attaches events to touchmove & mousemove
74576 showTooltips: true,
74577
74578 // Boolean - Determines whether to draw built-in tooltip or call custom tooltip function
74579 customTooltips: false,
74580
74581 // Array - Array of string names to attach tooltip events
74582 tooltipEvents: ["mousemove", "touchstart", "touchmove", "mouseout"],
74583
74584 // String - Tooltip background colour
74585 tooltipFillColor: "rgba(0,0,0,0.8)",
74586
74587 // String - Tooltip label font declaration for the scale label
74588 tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
74589
74590 // Number - Tooltip label font size in pixels
74591 tooltipFontSize: 14,
74592
74593 // String - Tooltip font weight style
74594 tooltipFontStyle: "normal",
74595
74596 // String - Tooltip label font colour
74597 tooltipFontColor: "#fff",
74598
74599 // String - Tooltip title font declaration for the scale label
74600 tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
74601
74602 // Number - Tooltip title font size in pixels
74603 tooltipTitleFontSize: 14,
74604
74605 // String - Tooltip title font weight style
74606 tooltipTitleFontStyle: "bold",
74607
74608 // String - Tooltip title font colour
74609 tooltipTitleFontColor: "#fff",
74610
74611 // String - Tooltip title template
74612 tooltipTitleTemplate: "<%= label%>",
74613
74614 // Number - pixel width of padding around tooltip text
74615 tooltipYPadding: 6,
74616
74617 // Number - pixel width of padding around tooltip text
74618 tooltipXPadding: 6,
74619
74620 // Number - Size of the caret on the tooltip
74621 tooltipCaretSize: 8,
74622
74623 // Number - Pixel radius of the tooltip border
74624 tooltipCornerRadius: 6,
74625
74626 // Number - Pixel offset from point x to tooltip edge
74627 tooltipXOffset: 10,
74628
74629 // String - Template string for single tooltips
74630 tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
74631
74632 // String - Template string for single tooltips
74633 multiTooltipTemplate: "<%= datasetLabel %>: <%= value %>",
74634
74635 // String - Colour behind the legend colour block
74636 multiTooltipKeyBackground: '#fff',
74637
74638 // Array - A list of colors to use as the defaults
74639 segmentColorDefault: ["#A6CEE3", "#1F78B4", "#B2DF8A", "#33A02C", "#FB9A99", "#E31A1C", "#FDBF6F", "#FF7F00", "#CAB2D6", "#6A3D9A", "#B4B482", "#B15928" ],
74640
74641 // Array - A list of highlight colors to use as the defaults
74642 segmentHighlightColorDefaults: [ "#CEF6FF", "#47A0DC", "#DAFFB2", "#5BC854", "#FFC2C1", "#FF4244", "#FFE797", "#FFA728", "#F2DAFE", "#9265C2", "#DCDCAA", "#D98150" ],
74643
74644 // Function - Will fire on animation progression.
74645 onAnimationProgress: function(){},
74646
74647 // Function - Will fire on animation completion.
74648 onAnimationComplete: function(){}
74649
74650 }
74651 };
74652
74653 //Create a dictionary of chart types, to allow for extension of existing types
74654 Chart.types = {};
74655
74656 //Global Chart helpers object for utility methods and classes
74657 var helpers = Chart.helpers = {};
74658
74659 //-- Basic js utility methods
74660 var each = helpers.each = function(loopable,callback,self){
74661 var additionalArgs = Array.prototype.slice.call(arguments, 3);
74662 // Check to see if null or undefined firstly.
74663 if (loopable){
74664 if (loopable.length === +loopable.length){
74665 var i;
74666 for (i=0; i<loopable.length; i++){
74667 callback.apply(self,[loopable[i], i].concat(additionalArgs));
74668 }
74669 }
74670 else{
74671 for (var item in loopable){
74672 callback.apply(self,[loopable[item],item].concat(additionalArgs));
74673 }
74674 }
74675 }
74676 },
74677 clone = helpers.clone = function(obj){
74678 var objClone = {};
74679 each(obj,function(value,key){
74680 if (obj.hasOwnProperty(key)){
74681 objClone[key] = value;
74682 }
74683 });
74684 return objClone;
74685 },
74686 extend = helpers.extend = function(base){
74687 each(Array.prototype.slice.call(arguments,1), function(extensionObject) {
74688 each(extensionObject,function(value,key){
74689 if (extensionObject.hasOwnProperty(key)){
74690 base[key] = value;
74691 }
74692 });
74693 });
74694 return base;
74695 },
74696 merge = helpers.merge = function(base,master){
74697 //Merge properties in left object over to a shallow clone of object right.
74698 var args = Array.prototype.slice.call(arguments,0);
74699 args.unshift({});
74700 return extend.apply(null, args);
74701 },
74702 indexOf = helpers.indexOf = function(arrayToSearch, item){
74703 if (Array.prototype.indexOf) {
74704 return arrayToSearch.indexOf(item);
74705 }
74706 else{
74707 for (var i = 0; i < arrayToSearch.length; i++) {
74708 if (arrayToSearch[i] === item) return i;
74709 }
74710 return -1;
74711 }
74712 },
74713 where = helpers.where = function(collection, filterCallback){
74714 var filtered = [];
74715
74716 helpers.each(collection, function(item){
74717 if (filterCallback(item)){
74718 filtered.push(item);
74719 }
74720 });
74721
74722 return filtered;
74723 },
74724 findNextWhere = helpers.findNextWhere = function(arrayToSearch, filterCallback, startIndex){
74725 // Default to start of the array
74726 if (!startIndex){
74727 startIndex = -1;
74728 }
74729 for (var i = startIndex + 1; i < arrayToSearch.length; i++) {
74730 var currentItem = arrayToSearch[i];
74731 if (filterCallback(currentItem)){
74732 return currentItem;
74733 }
74734 }
74735 },
74736 findPreviousWhere = helpers.findPreviousWhere = function(arrayToSearch, filterCallback, startIndex){
74737 // Default to end of the array
74738 if (!startIndex){
74739 startIndex = arrayToSearch.length;
74740 }
74741 for (var i = startIndex - 1; i >= 0; i--) {
74742 var currentItem = arrayToSearch[i];
74743 if (filterCallback(currentItem)){
74744 return currentItem;
74745 }
74746 }
74747 },
74748 inherits = helpers.inherits = function(extensions){
74749 //Basic javascript inheritance based on the model created in Backbone.js
74750 var parent = this;
74751 var ChartElement = (extensions && extensions.hasOwnProperty("constructor")) ? extensions.constructor : function(){ return parent.apply(this, arguments); };
74752
74753 var Surrogate = function(){ this.constructor = ChartElement;};
74754 Surrogate.prototype = parent.prototype;
74755 ChartElement.prototype = new Surrogate();
74756
74757 ChartElement.extend = inherits;
74758
74759 if (extensions) extend(ChartElement.prototype, extensions);
74760
74761 ChartElement.__super__ = parent.prototype;
74762
74763 return ChartElement;
74764 },
74765 noop = helpers.noop = function(){},
74766 uid = helpers.uid = (function(){
74767 var id=0;
74768 return function(){
74769 return "chart-" + id++;
74770 };
74771 })(),
74772 warn = helpers.warn = function(str){
74773 //Method for warning of errors
74774 if (window.console && typeof window.console.warn === "function") console.warn(str);
74775 },
74776 amd = helpers.amd = ("function" === 'function' && __webpack_require__(734)),
74777 //-- Math methods
74778 isNumber = helpers.isNumber = function(n){
74779 return !isNaN(parseFloat(n)) && isFinite(n);
74780 },
74781 max = helpers.max = function(array){
74782 return Math.max.apply( Math, array );
74783 },
74784 min = helpers.min = function(array){
74785 return Math.min.apply( Math, array );
74786 },
74787 cap = helpers.cap = function(valueToCap,maxValue,minValue){
74788 if(isNumber(maxValue)) {
74789 if( valueToCap > maxValue ) {
74790 return maxValue;
74791 }
74792 }
74793 else if(isNumber(minValue)){
74794 if ( valueToCap < minValue ){
74795 return minValue;
74796 }
74797 }
74798 return valueToCap;
74799 },
74800 getDecimalPlaces = helpers.getDecimalPlaces = function(num){
74801 if (num%1!==0 && isNumber(num)){
74802 var s = num.toString();
74803 if(s.indexOf("e-") < 0){
74804 // no exponent, e.g. 0.01
74805 return s.split(".")[1].length;
74806 }
74807 else if(s.indexOf(".") < 0) {
74808 // no decimal point, e.g. 1e-9
74809 return parseInt(s.split("e-")[1]);
74810 }
74811 else {
74812 // exponent and decimal point, e.g. 1.23e-9
74813 var parts = s.split(".")[1].split("e-");
74814 return parts[0].length + parseInt(parts[1]);
74815 }
74816 }
74817 else {
74818 return 0;
74819 }
74820 },
74821 toRadians = helpers.radians = function(degrees){
74822 return degrees * (Math.PI/180);
74823 },
74824 // Gets the angle from vertical upright to the point about a centre.
74825 getAngleFromPoint = helpers.getAngleFromPoint = function(centrePoint, anglePoint){
74826 var distanceFromXCenter = anglePoint.x - centrePoint.x,
74827 distanceFromYCenter = anglePoint.y - centrePoint.y,
74828 radialDistanceFromCenter = Math.sqrt( distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);
74829
74830
74831 var angle = Math.PI * 2 + Math.atan2(distanceFromYCenter, distanceFromXCenter);
74832
74833 //If the segment is in the top left quadrant, we need to add another rotation to the angle
74834 if (distanceFromXCenter < 0 && distanceFromYCenter < 0){
74835 angle += Math.PI*2;
74836 }
74837
74838 return {
74839 angle: angle,
74840 distance: radialDistanceFromCenter
74841 };
74842 },
74843 aliasPixel = helpers.aliasPixel = function(pixelWidth){
74844 return (pixelWidth % 2 === 0) ? 0 : 0.5;
74845 },
74846 splineCurve = helpers.splineCurve = function(FirstPoint,MiddlePoint,AfterPoint,t){
74847 //Props to Rob Spencer at scaled innovation for his post on splining between points
74848 //http://scaledinnovation.com/analytics/splines/aboutSplines.html
74849 var d01=Math.sqrt(Math.pow(MiddlePoint.x-FirstPoint.x,2)+Math.pow(MiddlePoint.y-FirstPoint.y,2)),
74850 d12=Math.sqrt(Math.pow(AfterPoint.x-MiddlePoint.x,2)+Math.pow(AfterPoint.y-MiddlePoint.y,2)),
74851 fa=t*d01/(d01+d12),// scaling factor for triangle Ta
74852 fb=t*d12/(d01+d12);
74853 return {
74854 inner : {
74855 x : MiddlePoint.x-fa*(AfterPoint.x-FirstPoint.x),
74856 y : MiddlePoint.y-fa*(AfterPoint.y-FirstPoint.y)
74857 },
74858 outer : {
74859 x: MiddlePoint.x+fb*(AfterPoint.x-FirstPoint.x),
74860 y : MiddlePoint.y+fb*(AfterPoint.y-FirstPoint.y)
74861 }
74862 };
74863 },
74864 calculateOrderOfMagnitude = helpers.calculateOrderOfMagnitude = function(val){
74865 return Math.floor(Math.log(val) / Math.LN10);
74866 },
74867 calculateScaleRange = helpers.calculateScaleRange = function(valuesArray, drawingSize, textSize, startFromZero, integersOnly){
74868
74869 //Set a minimum step of two - a point at the top of the graph, and a point at the base
74870 var minSteps = 2,
74871 maxSteps = Math.floor(drawingSize/(textSize * 1.5)),
74872 skipFitting = (minSteps >= maxSteps);
74873
74874 // Filter out null values since these would min() to zero
74875 var values = [];
74876 each(valuesArray, function( v ){
74877 v == null || values.push( v );
74878 });
74879 var minValue = min(values),
74880 maxValue = max(values);
74881
74882 // We need some degree of separation here to calculate the scales if all the values are the same
74883 // Adding/minusing 0.5 will give us a range of 1.
74884 if (maxValue === minValue){
74885 maxValue += 0.5;
74886 // So we don't end up with a graph with a negative start value if we've said always start from zero
74887 if (minValue >= 0.5 && !startFromZero){
74888 minValue -= 0.5;
74889 }
74890 else{
74891 // Make up a whole number above the values
74892 maxValue += 0.5;
74893 }
74894 }
74895
74896 var valueRange = Math.abs(maxValue - minValue),
74897 rangeOrderOfMagnitude = calculateOrderOfMagnitude(valueRange),
74898 graphMax = Math.ceil(maxValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
74899 graphMin = (startFromZero) ? 0 : Math.floor(minValue / (1 * Math.pow(10, rangeOrderOfMagnitude))) * Math.pow(10, rangeOrderOfMagnitude),
74900 graphRange = graphMax - graphMin,
74901 stepValue = Math.pow(10, rangeOrderOfMagnitude),
74902 numberOfSteps = Math.round(graphRange / stepValue);
74903
74904 //If we have more space on the graph we'll use it to give more definition to the data
74905 while((numberOfSteps > maxSteps || (numberOfSteps * 2) < maxSteps) && !skipFitting) {
74906 if(numberOfSteps > maxSteps){
74907 stepValue *=2;
74908 numberOfSteps = Math.round(graphRange/stepValue);
74909 // Don't ever deal with a decimal number of steps - cancel fitting and just use the minimum number of steps.
74910 if (numberOfSteps % 1 !== 0){
74911 skipFitting = true;
74912 }
74913 }
74914 //We can fit in double the amount of scale points on the scale
74915 else{
74916 //If user has declared ints only, and the step value isn't a decimal
74917 if (integersOnly && rangeOrderOfMagnitude >= 0){
74918 //If the user has said integers only, we need to check that making the scale more granular wouldn't make it a float
74919 if(stepValue/2 % 1 === 0){
74920 stepValue /=2;
74921 numberOfSteps = Math.round(graphRange/stepValue);
74922 }
74923 //If it would make it a float break out of the loop
74924 else{
74925 break;
74926 }
74927 }
74928 //If the scale doesn't have to be an int, make the scale more granular anyway.
74929 else{
74930 stepValue /=2;
74931 numberOfSteps = Math.round(graphRange/stepValue);
74932 }
74933
74934 }
74935 }
74936
74937 if (skipFitting){
74938 numberOfSteps = minSteps;
74939 stepValue = graphRange / numberOfSteps;
74940 }
74941
74942 return {
74943 steps : numberOfSteps,
74944 stepValue : stepValue,
74945 min : graphMin,
74946 max : graphMin + (numberOfSteps * stepValue)
74947 };
74948
74949 },
74950 /* jshint ignore:start */
74951 // Blows up jshint errors based on the new Function constructor
74952 //Templating methods
74953 //Javascript micro templating by John Resig - source at http://ejohn.org/blog/javascript-micro-templating/
74954 template = helpers.template = function(templateString, valuesObject){
74955
74956 // If templateString is function rather than string-template - call the function for valuesObject
74957
74958 if(templateString instanceof Function){
74959 return templateString(valuesObject);
74960 }
74961
74962 var cache = {};
74963 function tmpl(str, data){
74964 // Figure out if we're getting a template, or if we need to
74965 // load the template - and be sure to cache the result.
74966 var fn = !/\W/.test(str) ?
74967 cache[str] = cache[str] :
74968
74969 // Generate a reusable function that will serve as a template
74970 // generator (and which will be cached).
74971 new Function("obj",
74972 "var p=[],print=function(){p.push.apply(p,arguments);};" +
74973
74974 // Introduce the data as local variables using with(){}
74975 "with(obj){p.push('" +
74976
74977 // Convert the template into pure JavaScript
74978 str
74979 .replace(/[\r\t\n]/g, " ")
74980 .split("<%").join("\t")
74981 .replace(/((^|%>)[^\t]*)'/g, "$1\r")
74982 .replace(/\t=(.*?)%>/g, "',$1,'")
74983 .split("\t").join("');")
74984 .split("%>").join("p.push('")
74985 .split("\r").join("\\'") +
74986 "');}return p.join('');"
74987 );
74988
74989 // Provide some basic currying to the user
74990 return data ? fn( data ) : fn;
74991 }
74992 return tmpl(templateString,valuesObject);
74993 },
74994 /* jshint ignore:end */
74995 generateLabels = helpers.generateLabels = function(templateString,numberOfSteps,graphMin,stepValue){
74996 var labelsArray = new Array(numberOfSteps);
74997 if (templateString){
74998 each(labelsArray,function(val,index){
74999 labelsArray[index] = template(templateString,{value: (graphMin + (stepValue*(index+1)))});
75000 });
75001 }
75002 return labelsArray;
75003 },
75004 //--Animation methods
75005 //Easing functions adapted from Robert Penner's easing equations
75006 //http://www.robertpenner.com/easing/
75007 easingEffects = helpers.easingEffects = {
75008 linear: function (t) {
75009 return t;
75010 },
75011 easeInQuad: function (t) {
75012 return t * t;
75013 },
75014 easeOutQuad: function (t) {
75015 return -1 * t * (t - 2);
75016 },
75017 easeInOutQuad: function (t) {
75018 if ((t /= 1 / 2) < 1){
75019 return 1 / 2 * t * t;
75020 }
75021 return -1 / 2 * ((--t) * (t - 2) - 1);
75022 },
75023 easeInCubic: function (t) {
75024 return t * t * t;
75025 },
75026 easeOutCubic: function (t) {
75027 return 1 * ((t = t / 1 - 1) * t * t + 1);
75028 },
75029 easeInOutCubic: function (t) {
75030 if ((t /= 1 / 2) < 1){
75031 return 1 / 2 * t * t * t;
75032 }
75033 return 1 / 2 * ((t -= 2) * t * t + 2);
75034 },
75035 easeInQuart: function (t) {
75036 return t * t * t * t;
75037 },
75038 easeOutQuart: function (t) {
75039 return -1 * ((t = t / 1 - 1) * t * t * t - 1);
75040 },
75041 easeInOutQuart: function (t) {
75042 if ((t /= 1 / 2) < 1){
75043 return 1 / 2 * t * t * t * t;
75044 }
75045 return -1 / 2 * ((t -= 2) * t * t * t - 2);
75046 },
75047 easeInQuint: function (t) {
75048 return 1 * (t /= 1) * t * t * t * t;
75049 },
75050 easeOutQuint: function (t) {
75051 return 1 * ((t = t / 1 - 1) * t * t * t * t + 1);
75052 },
75053 easeInOutQuint: function (t) {
75054 if ((t /= 1 / 2) < 1){
75055 return 1 / 2 * t * t * t * t * t;
75056 }
75057 return 1 / 2 * ((t -= 2) * t * t * t * t + 2);
75058 },
75059 easeInSine: function (t) {
75060 return -1 * Math.cos(t / 1 * (Math.PI / 2)) + 1;
75061 },
75062 easeOutSine: function (t) {
75063 return 1 * Math.sin(t / 1 * (Math.PI / 2));
75064 },
75065 easeInOutSine: function (t) {
75066 return -1 / 2 * (Math.cos(Math.PI * t / 1) - 1);
75067 },
75068 easeInExpo: function (t) {
75069 return (t === 0) ? 1 : 1 * Math.pow(2, 10 * (t / 1 - 1));
75070 },
75071 easeOutExpo: function (t) {
75072 return (t === 1) ? 1 : 1 * (-Math.pow(2, -10 * t / 1) + 1);
75073 },
75074 easeInOutExpo: function (t) {
75075 if (t === 0){
75076 return 0;
75077 }
75078 if (t === 1){
75079 return 1;
75080 }
75081 if ((t /= 1 / 2) < 1){
75082 return 1 / 2 * Math.pow(2, 10 * (t - 1));
75083 }
75084 return 1 / 2 * (-Math.pow(2, -10 * --t) + 2);
75085 },
75086 easeInCirc: function (t) {
75087 if (t >= 1){
75088 return t;
75089 }
75090 return -1 * (Math.sqrt(1 - (t /= 1) * t) - 1);
75091 },
75092 easeOutCirc: function (t) {
75093 return 1 * Math.sqrt(1 - (t = t / 1 - 1) * t);
75094 },
75095 easeInOutCirc: function (t) {
75096 if ((t /= 1 / 2) < 1){
75097 return -1 / 2 * (Math.sqrt(1 - t * t) - 1);
75098 }
75099 return 1 / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1);
75100 },
75101 easeInElastic: function (t) {
75102 var s = 1.70158;
75103 var p = 0;
75104 var a = 1;
75105 if (t === 0){
75106 return 0;
75107 }
75108 if ((t /= 1) == 1){
75109 return 1;
75110 }
75111 if (!p){
75112 p = 1 * 0.3;
75113 }
75114 if (a < Math.abs(1)) {
75115 a = 1;
75116 s = p / 4;
75117 } else{
75118 s = p / (2 * Math.PI) * Math.asin(1 / a);
75119 }
75120 return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));
75121 },
75122 easeOutElastic: function (t) {
75123 var s = 1.70158;
75124 var p = 0;
75125 var a = 1;
75126 if (t === 0){
75127 return 0;
75128 }
75129 if ((t /= 1) == 1){
75130 return 1;
75131 }
75132 if (!p){
75133 p = 1 * 0.3;
75134 }
75135 if (a < Math.abs(1)) {
75136 a = 1;
75137 s = p / 4;
75138 } else{
75139 s = p / (2 * Math.PI) * Math.asin(1 / a);
75140 }
75141 return a * Math.pow(2, -10 * t) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) + 1;
75142 },
75143 easeInOutElastic: function (t) {
75144 var s = 1.70158;
75145 var p = 0;
75146 var a = 1;
75147 if (t === 0){
75148 return 0;
75149 }
75150 if ((t /= 1 / 2) == 2){
75151 return 1;
75152 }
75153 if (!p){
75154 p = 1 * (0.3 * 1.5);
75155 }
75156 if (a < Math.abs(1)) {
75157 a = 1;
75158 s = p / 4;
75159 } else {
75160 s = p / (2 * Math.PI) * Math.asin(1 / a);
75161 }
75162 if (t < 1){
75163 return -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p));}
75164 return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * 1 - s) * (2 * Math.PI) / p) * 0.5 + 1;
75165 },
75166 easeInBack: function (t) {
75167 var s = 1.70158;
75168 return 1 * (t /= 1) * t * ((s + 1) * t - s);
75169 },
75170 easeOutBack: function (t) {
75171 var s = 1.70158;
75172 return 1 * ((t = t / 1 - 1) * t * ((s + 1) * t + s) + 1);
75173 },
75174 easeInOutBack: function (t) {
75175 var s = 1.70158;
75176 if ((t /= 1 / 2) < 1){
75177 return 1 / 2 * (t * t * (((s *= (1.525)) + 1) * t - s));
75178 }
75179 return 1 / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);
75180 },
75181 easeInBounce: function (t) {
75182 return 1 - easingEffects.easeOutBounce(1 - t);
75183 },
75184 easeOutBounce: function (t) {
75185 if ((t /= 1) < (1 / 2.75)) {
75186 return 1 * (7.5625 * t * t);
75187 } else if (t < (2 / 2.75)) {
75188 return 1 * (7.5625 * (t -= (1.5 / 2.75)) * t + 0.75);
75189 } else if (t < (2.5 / 2.75)) {
75190 return 1 * (7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375);
75191 } else {
75192 return 1 * (7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375);
75193 }
75194 },
75195 easeInOutBounce: function (t) {
75196 if (t < 1 / 2){
75197 return easingEffects.easeInBounce(t * 2) * 0.5;
75198 }
75199 return easingEffects.easeOutBounce(t * 2 - 1) * 0.5 + 1 * 0.5;
75200 }
75201 },
75202 //Request animation polyfill - http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
75203 requestAnimFrame = helpers.requestAnimFrame = (function(){
75204 return window.requestAnimationFrame ||
75205 window.webkitRequestAnimationFrame ||
75206 window.mozRequestAnimationFrame ||
75207 window.oRequestAnimationFrame ||
75208 window.msRequestAnimationFrame ||
75209 function(callback) {
75210 return window.setTimeout(callback, 1000 / 60);
75211 };
75212 })(),
75213 cancelAnimFrame = helpers.cancelAnimFrame = (function(){
75214 return window.cancelAnimationFrame ||
75215 window.webkitCancelAnimationFrame ||
75216 window.mozCancelAnimationFrame ||
75217 window.oCancelAnimationFrame ||
75218 window.msCancelAnimationFrame ||
75219 function(callback) {
75220 return window.clearTimeout(callback, 1000 / 60);
75221 };
75222 })(),
75223 animationLoop = helpers.animationLoop = function(callback,totalSteps,easingString,onProgress,onComplete,chartInstance){
75224
75225 var currentStep = 0,
75226 easingFunction = easingEffects[easingString] || easingEffects.linear;
75227
75228 var animationFrame = function(){
75229 currentStep++;
75230 var stepDecimal = currentStep/totalSteps;
75231 var easeDecimal = easingFunction(stepDecimal);
75232
75233 callback.call(chartInstance,easeDecimal,stepDecimal, currentStep);
75234 onProgress.call(chartInstance,easeDecimal,stepDecimal);
75235 if (currentStep < totalSteps){
75236 chartInstance.animationFrame = requestAnimFrame(animationFrame);
75237 } else{
75238 onComplete.apply(chartInstance);
75239 }
75240 };
75241 requestAnimFrame(animationFrame);
75242 },
75243 //-- DOM methods
75244 getRelativePosition = helpers.getRelativePosition = function(evt){
75245 var mouseX, mouseY;
75246 var e = evt.originalEvent || evt,
75247 canvas = evt.currentTarget || evt.srcElement,
75248 boundingRect = canvas.getBoundingClientRect();
75249
75250 if (e.touches){
75251 mouseX = e.touches[0].clientX - boundingRect.left;
75252 mouseY = e.touches[0].clientY - boundingRect.top;
75253
75254 }
75255 else{
75256 mouseX = e.clientX - boundingRect.left;
75257 mouseY = e.clientY - boundingRect.top;
75258 }
75259
75260 return {
75261 x : mouseX,
75262 y : mouseY
75263 };
75264
75265 },
75266 addEvent = helpers.addEvent = function(node,eventType,method){
75267 if (node.addEventListener){
75268 node.addEventListener(eventType,method);
75269 } else if (node.attachEvent){
75270 node.attachEvent("on"+eventType, method);
75271 } else {
75272 node["on"+eventType] = method;
75273 }
75274 },
75275 removeEvent = helpers.removeEvent = function(node, eventType, handler){
75276 if (node.removeEventListener){
75277 node.removeEventListener(eventType, handler, false);
75278 } else if (node.detachEvent){
75279 node.detachEvent("on"+eventType,handler);
75280 } else{
75281 node["on" + eventType] = noop;
75282 }
75283 },
75284 bindEvents = helpers.bindEvents = function(chartInstance, arrayOfEvents, handler){
75285 // Create the events object if it's not already present
75286 if (!chartInstance.events) chartInstance.events = {};
75287
75288 each(arrayOfEvents,function(eventName){
75289 chartInstance.events[eventName] = function(){
75290 handler.apply(chartInstance, arguments);
75291 };
75292 addEvent(chartInstance.chart.canvas,eventName,chartInstance.events[eventName]);
75293 });
75294 },
75295 unbindEvents = helpers.unbindEvents = function (chartInstance, arrayOfEvents) {
75296 each(arrayOfEvents, function(handler,eventName){
75297 removeEvent(chartInstance.chart.canvas, eventName, handler);
75298 });
75299 },
75300 getMaximumWidth = helpers.getMaximumWidth = function(domNode){
75301 var container = domNode.parentNode,
75302 padding = parseInt(getStyle(container, 'padding-left')) + parseInt(getStyle(container, 'padding-right'));
75303 // TODO = check cross browser stuff with this.
75304 return container ? container.clientWidth - padding : 0;
75305 },
75306 getMaximumHeight = helpers.getMaximumHeight = function(domNode){
75307 var container = domNode.parentNode,
75308 padding = parseInt(getStyle(container, 'padding-bottom')) + parseInt(getStyle(container, 'padding-top'));
75309 // TODO = check cross browser stuff with this.
75310 return container ? container.clientHeight - padding : 0;
75311 },
75312 getStyle = helpers.getStyle = function (el, property) {
75313 return el.currentStyle ?
75314 el.currentStyle[property] :
75315 document.defaultView.getComputedStyle(el, null).getPropertyValue(property);
75316 },
75317 getMaximumSize = helpers.getMaximumSize = helpers.getMaximumWidth, // legacy support
75318 retinaScale = helpers.retinaScale = function(chart){
75319 var ctx = chart.ctx,
75320 width = chart.canvas.width,
75321 height = chart.canvas.height;
75322
75323 if (window.devicePixelRatio) {
75324 ctx.canvas.style.width = width + "px";
75325 ctx.canvas.style.height = height + "px";
75326 ctx.canvas.height = height * window.devicePixelRatio;
75327 ctx.canvas.width = width * window.devicePixelRatio;
75328 ctx.scale(window.devicePixelRatio, window.devicePixelRatio);
75329 }
75330 },
75331 //-- Canvas methods
75332 clear = helpers.clear = function(chart){
75333 chart.ctx.clearRect(0,0,chart.width,chart.height);
75334 },
75335 fontString = helpers.fontString = function(pixelSize,fontStyle,fontFamily){
75336 return fontStyle + " " + pixelSize+"px " + fontFamily;
75337 },
75338 longestText = helpers.longestText = function(ctx,font,arrayOfStrings){
75339 ctx.font = font;
75340 var longest = 0;
75341 each(arrayOfStrings,function(string){
75342 var textWidth = ctx.measureText(string).width;
75343 longest = (textWidth > longest) ? textWidth : longest;
75344 });
75345 return longest;
75346 },
75347 drawRoundedRectangle = helpers.drawRoundedRectangle = function(ctx,x,y,width,height,radius){
75348 ctx.beginPath();
75349 ctx.moveTo(x + radius, y);
75350 ctx.lineTo(x + width - radius, y);
75351 ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
75352 ctx.lineTo(x + width, y + height - radius);
75353 ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
75354 ctx.lineTo(x + radius, y + height);
75355 ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
75356 ctx.lineTo(x, y + radius);
75357 ctx.quadraticCurveTo(x, y, x + radius, y);
75358 ctx.closePath();
75359 };
75360
75361
75362 //Store a reference to each instance - allowing us to globally resize chart instances on window resize.
75363 //Destroy method on the chart will remove the instance of the chart from this reference.
75364 Chart.instances = {};
75365
75366 Chart.Type = function(data,options,chart){
75367 this.options = options;
75368 this.chart = chart;
75369 this.id = uid();
75370 //Add the chart instance to the global namespace
75371 Chart.instances[this.id] = this;
75372
75373 // Initialize is always called when a chart type is created
75374 // By default it is a no op, but it should be extended
75375 if (options.responsive){
75376 this.resize();
75377 }
75378 this.initialize.call(this,data);
75379 };
75380
75381 //Core methods that'll be a part of every chart type
75382 extend(Chart.Type.prototype,{
75383 initialize : function(){return this;},
75384 clear : function(){
75385 clear(this.chart);
75386 return this;
75387 },
75388 stop : function(){
75389 // Stops any current animation loop occuring
75390 Chart.animationService.cancelAnimation(this);
75391 return this;
75392 },
75393 resize : function(callback){
75394 this.stop();
75395 var canvas = this.chart.canvas,
75396 newWidth = getMaximumWidth(this.chart.canvas),
75397 newHeight = this.options.maintainAspectRatio ? newWidth / this.chart.aspectRatio : getMaximumHeight(this.chart.canvas);
75398
75399 canvas.width = this.chart.width = newWidth;
75400 canvas.height = this.chart.height = newHeight;
75401
75402 retinaScale(this.chart);
75403
75404 if (typeof callback === "function"){
75405 callback.apply(this, Array.prototype.slice.call(arguments, 1));
75406 }
75407 return this;
75408 },
75409 reflow : noop,
75410 render : function(reflow){
75411 if (reflow){
75412 this.reflow();
75413 }
75414
75415 if (this.options.animation && !reflow){
75416 var animation = new Chart.Animation();
75417 animation.numSteps = this.options.animationSteps;
75418 animation.easing = this.options.animationEasing;
75419
75420 // render function
75421 animation.render = function(chartInstance, animationObject) {
75422 var easingFunction = helpers.easingEffects[animationObject.easing];
75423 var stepDecimal = animationObject.currentStep / animationObject.numSteps;
75424 var easeDecimal = easingFunction(stepDecimal);
75425
75426 chartInstance.draw(easeDecimal, stepDecimal, animationObject.currentStep);
75427 };
75428
75429 // user events
75430 animation.onAnimationProgress = this.options.onAnimationProgress;
75431 animation.onAnimationComplete = this.options.onAnimationComplete;
75432
75433 Chart.animationService.addAnimation(this, animation);
75434 }
75435 else{
75436 this.draw();
75437 this.options.onAnimationComplete.call(this);
75438 }
75439 return this;
75440 },
75441 generateLegend : function(){
75442 return helpers.template(this.options.legendTemplate, this);
75443 },
75444 destroy : function(){
75445 this.stop();
75446 this.clear();
75447 unbindEvents(this, this.events);
75448 var canvas = this.chart.canvas;
75449
75450 // Reset canvas height/width attributes starts a fresh with the canvas context
75451 canvas.width = this.chart.width;
75452 canvas.height = this.chart.height;
75453
75454 // < IE9 doesn't support removeProperty
75455 if (canvas.style.removeProperty) {
75456 canvas.style.removeProperty('width');
75457 canvas.style.removeProperty('height');
75458 } else {
75459 canvas.style.removeAttribute('width');
75460 canvas.style.removeAttribute('height');
75461 }
75462
75463 delete Chart.instances[this.id];
75464 },
75465 showTooltip : function(ChartElements, forceRedraw){
75466 // Only redraw the chart if we've actually changed what we're hovering on.
75467 if (typeof this.activeElements === 'undefined') this.activeElements = [];
75468
75469 var isChanged = (function(Elements){
75470 var changed = false;
75471
75472 if (Elements.length !== this.activeElements.length){
75473 changed = true;
75474 return changed;
75475 }
75476
75477 each(Elements, function(element, index){
75478 if (element !== this.activeElements[index]){
75479 changed = true;
75480 }
75481 }, this);
75482 return changed;
75483 }).call(this, ChartElements);
75484
75485 if (!isChanged && !forceRedraw){
75486 return;
75487 }
75488 else{
75489 this.activeElements = ChartElements;
75490 }
75491 this.draw();
75492 if(this.options.customTooltips){
75493 this.options.customTooltips(false);
75494 }
75495 if (ChartElements.length > 0){
75496 // If we have multiple datasets, show a MultiTooltip for all of the data points at that index
75497 if (this.datasets && this.datasets.length > 1) {
75498 var dataArray,
75499 dataIndex;
75500
75501 for (var i = this.datasets.length - 1; i >= 0; i--) {
75502 dataArray = this.datasets[i].points || this.datasets[i].bars || this.datasets[i].segments;
75503 dataIndex = indexOf(dataArray, ChartElements[0]);
75504 if (dataIndex !== -1){
75505 break;
75506 }
75507 }
75508 var tooltipLabels = [],
75509 tooltipColors = [],
75510 medianPosition = (function(index) {
75511
75512 // Get all the points at that particular index
75513 var Elements = [],
75514 dataCollection,
75515 xPositions = [],
75516 yPositions = [],
75517 xMax,
75518 yMax,
75519 xMin,
75520 yMin;
75521 helpers.each(this.datasets, function(dataset){
75522 dataCollection = dataset.points || dataset.bars || dataset.segments;
75523 if (dataCollection[dataIndex] && dataCollection[dataIndex].hasValue()){
75524 Elements.push(dataCollection[dataIndex]);
75525 }
75526 });
75527
75528 helpers.each(Elements, function(element) {
75529 xPositions.push(element.x);
75530 yPositions.push(element.y);
75531
75532
75533 //Include any colour information about the element
75534 tooltipLabels.push(helpers.template(this.options.multiTooltipTemplate, element));
75535 tooltipColors.push({
75536 fill: element._saved.fillColor || element.fillColor,
75537 stroke: element._saved.strokeColor || element.strokeColor
75538 });
75539
75540 }, this);
75541
75542 yMin = min(yPositions);
75543 yMax = max(yPositions);
75544
75545 xMin = min(xPositions);
75546 xMax = max(xPositions);
75547
75548 return {
75549 x: (xMin > this.chart.width/2) ? xMin : xMax,
75550 y: (yMin + yMax)/2
75551 };
75552 }).call(this, dataIndex);
75553
75554 new Chart.MultiTooltip({
75555 x: medianPosition.x,
75556 y: medianPosition.y,
75557 xPadding: this.options.tooltipXPadding,
75558 yPadding: this.options.tooltipYPadding,
75559 xOffset: this.options.tooltipXOffset,
75560 fillColor: this.options.tooltipFillColor,
75561 textColor: this.options.tooltipFontColor,
75562 fontFamily: this.options.tooltipFontFamily,
75563 fontStyle: this.options.tooltipFontStyle,
75564 fontSize: this.options.tooltipFontSize,
75565 titleTextColor: this.options.tooltipTitleFontColor,
75566 titleFontFamily: this.options.tooltipTitleFontFamily,
75567 titleFontStyle: this.options.tooltipTitleFontStyle,
75568 titleFontSize: this.options.tooltipTitleFontSize,
75569 cornerRadius: this.options.tooltipCornerRadius,
75570 labels: tooltipLabels,
75571 legendColors: tooltipColors,
75572 legendColorBackground : this.options.multiTooltipKeyBackground,
75573 title: template(this.options.tooltipTitleTemplate,ChartElements[0]),
75574 chart: this.chart,
75575 ctx: this.chart.ctx,
75576 custom: this.options.customTooltips
75577 }).draw();
75578
75579 } else {
75580 each(ChartElements, function(Element) {
75581 var tooltipPosition = Element.tooltipPosition();
75582 new Chart.Tooltip({
75583 x: Math.round(tooltipPosition.x),
75584 y: Math.round(tooltipPosition.y),
75585 xPadding: this.options.tooltipXPadding,
75586 yPadding: this.options.tooltipYPadding,
75587 fillColor: this.options.tooltipFillColor,
75588 textColor: this.options.tooltipFontColor,
75589 fontFamily: this.options.tooltipFontFamily,
75590 fontStyle: this.options.tooltipFontStyle,
75591 fontSize: this.options.tooltipFontSize,
75592 caretHeight: this.options.tooltipCaretSize,
75593 cornerRadius: this.options.tooltipCornerRadius,
75594 text: template(this.options.tooltipTemplate, Element),
75595 chart: this.chart,
75596 custom: this.options.customTooltips
75597 }).draw();
75598 }, this);
75599 }
75600 }
75601 return this;
75602 },
75603 toBase64Image : function(){
75604 return this.chart.canvas.toDataURL.apply(this.chart.canvas, arguments);
75605 }
75606 });
75607
75608 Chart.Type.extend = function(extensions){
75609
75610 var parent = this;
75611
75612 var ChartType = function(){
75613 return parent.apply(this,arguments);
75614 };
75615
75616 //Copy the prototype object of the this class
75617 ChartType.prototype = clone(parent.prototype);
75618 //Now overwrite some of the properties in the base class with the new extensions
75619 extend(ChartType.prototype, extensions);
75620
75621 ChartType.extend = Chart.Type.extend;
75622
75623 if (extensions.name || parent.prototype.name){
75624
75625 var chartName = extensions.name || parent.prototype.name;
75626 //Assign any potential default values of the new chart type
75627
75628 //If none are defined, we'll use a clone of the chart type this is being extended from.
75629 //I.e. if we extend a line chart, we'll use the defaults from the line chart if our new chart
75630 //doesn't define some defaults of their own.
75631
75632 var baseDefaults = (Chart.defaults[parent.prototype.name]) ? clone(Chart.defaults[parent.prototype.name]) : {};
75633
75634 Chart.defaults[chartName] = extend(baseDefaults,extensions.defaults);
75635
75636 Chart.types[chartName] = ChartType;
75637
75638 //Register this new chart type in the Chart prototype
75639 Chart.prototype[chartName] = function(data,options){
75640 var config = merge(Chart.defaults.global, Chart.defaults[chartName], options || {});
75641 return new ChartType(data,config,this);
75642 };
75643 } else{
75644 warn("Name not provided for this chart, so it hasn't been registered");
75645 }
75646 return parent;
75647 };
75648
75649 Chart.Element = function(configuration){
75650 extend(this,configuration);
75651 this.initialize.apply(this,arguments);
75652 this.save();
75653 };
75654 extend(Chart.Element.prototype,{
75655 initialize : function(){},
75656 restore : function(props){
75657 if (!props){
75658 extend(this,this._saved);
75659 } else {
75660 each(props,function(key){
75661 this[key] = this._saved[key];
75662 },this);
75663 }
75664 return this;
75665 },
75666 save : function(){
75667 this._saved = clone(this);
75668 delete this._saved._saved;
75669 return this;
75670 },
75671 update : function(newProps){
75672 each(newProps,function(value,key){
75673 this._saved[key] = this[key];
75674 this[key] = value;
75675 },this);
75676 return this;
75677 },
75678 transition : function(props,ease){
75679 each(props,function(value,key){
75680 this[key] = ((value - this._saved[key]) * ease) + this._saved[key];
75681 },this);
75682 return this;
75683 },
75684 tooltipPosition : function(){
75685 return {
75686 x : this.x,
75687 y : this.y
75688 };
75689 },
75690 hasValue: function(){
75691 return isNumber(this.value);
75692 }
75693 });
75694
75695 Chart.Element.extend = inherits;
75696
75697
75698 Chart.Point = Chart.Element.extend({
75699 display: true,
75700 inRange: function(chartX,chartY){
75701 var hitDetectionRange = this.hitDetectionRadius + this.radius;
75702 return ((Math.pow(chartX-this.x, 2)+Math.pow(chartY-this.y, 2)) < Math.pow(hitDetectionRange,2));
75703 },
75704 draw : function(){
75705 if (this.display){
75706 var ctx = this.ctx;
75707 ctx.beginPath();
75708
75709 ctx.arc(this.x, this.y, this.radius, 0, Math.PI*2);
75710 ctx.closePath();
75711
75712 ctx.strokeStyle = this.strokeColor;
75713 ctx.lineWidth = this.strokeWidth;
75714
75715 ctx.fillStyle = this.fillColor;
75716
75717 ctx.fill();
75718 ctx.stroke();
75719 }
75720
75721
75722 //Quick debug for bezier curve splining
75723 //Highlights control points and the line between them.
75724 //Handy for dev - stripped in the min version.
75725
75726 // ctx.save();
75727 // ctx.fillStyle = "black";
75728 // ctx.strokeStyle = "black"
75729 // ctx.beginPath();
75730 // ctx.arc(this.controlPoints.inner.x,this.controlPoints.inner.y, 2, 0, Math.PI*2);
75731 // ctx.fill();
75732
75733 // ctx.beginPath();
75734 // ctx.arc(this.controlPoints.outer.x,this.controlPoints.outer.y, 2, 0, Math.PI*2);
75735 // ctx.fill();
75736
75737 // ctx.moveTo(this.controlPoints.inner.x,this.controlPoints.inner.y);
75738 // ctx.lineTo(this.x, this.y);
75739 // ctx.lineTo(this.controlPoints.outer.x,this.controlPoints.outer.y);
75740 // ctx.stroke();
75741
75742 // ctx.restore();
75743
75744
75745
75746 }
75747 });
75748
75749 Chart.Arc = Chart.Element.extend({
75750 inRange : function(chartX,chartY){
75751
75752 var pointRelativePosition = helpers.getAngleFromPoint(this, {
75753 x: chartX,
75754 y: chartY
75755 });
75756
75757 // Normalize all angles to 0 - 2*PI (0 - 360°)
75758 var pointRelativeAngle = pointRelativePosition.angle % (Math.PI * 2),
75759 startAngle = (Math.PI * 2 + this.startAngle) % (Math.PI * 2),
75760 endAngle = (Math.PI * 2 + this.endAngle) % (Math.PI * 2) || 360;
75761
75762 // Calculate wether the pointRelativeAngle is between the start and the end angle
75763 var betweenAngles = (endAngle < startAngle) ?
75764 pointRelativeAngle <= endAngle || pointRelativeAngle >= startAngle:
75765 pointRelativeAngle >= startAngle && pointRelativeAngle <= endAngle;
75766
75767 //Check if within the range of the open/close angle
75768 var withinRadius = (pointRelativePosition.distance >= this.innerRadius && pointRelativePosition.distance <= this.outerRadius);
75769
75770 return (betweenAngles && withinRadius);
75771 //Ensure within the outside of the arc centre, but inside arc outer
75772 },
75773 tooltipPosition : function(){
75774 var centreAngle = this.startAngle + ((this.endAngle - this.startAngle) / 2),
75775 rangeFromCentre = (this.outerRadius - this.innerRadius) / 2 + this.innerRadius;
75776 return {
75777 x : this.x + (Math.cos(centreAngle) * rangeFromCentre),
75778 y : this.y + (Math.sin(centreAngle) * rangeFromCentre)
75779 };
75780 },
75781 draw : function(animationPercent){
75782
75783 var easingDecimal = animationPercent || 1;
75784
75785 var ctx = this.ctx;
75786
75787 ctx.beginPath();
75788
75789 ctx.arc(this.x, this.y, this.outerRadius < 0 ? 0 : this.outerRadius, this.startAngle, this.endAngle);
75790
75791 ctx.arc(this.x, this.y, this.innerRadius < 0 ? 0 : this.innerRadius, this.endAngle, this.startAngle, true);
75792
75793 ctx.closePath();
75794 ctx.strokeStyle = this.strokeColor;
75795 ctx.lineWidth = this.strokeWidth;
75796
75797 ctx.fillStyle = this.fillColor;
75798
75799 ctx.fill();
75800 ctx.lineJoin = 'bevel';
75801
75802 if (this.showStroke){
75803 ctx.stroke();
75804 }
75805 }
75806 });
75807
75808 Chart.Rectangle = Chart.Element.extend({
75809 draw : function(){
75810 var ctx = this.ctx,
75811 halfWidth = this.width/2,
75812 leftX = this.x - halfWidth,
75813 rightX = this.x + halfWidth,
75814 top = this.base - (this.base - this.y),
75815 halfStroke = this.strokeWidth / 2;
75816
75817 // Canvas doesn't allow us to stroke inside the width so we can
75818 // adjust the sizes to fit if we're setting a stroke on the line
75819 if (this.showStroke){
75820 leftX += halfStroke;
75821 rightX -= halfStroke;
75822 top += halfStroke;
75823 }
75824
75825 ctx.beginPath();
75826
75827 ctx.fillStyle = this.fillColor;
75828 ctx.strokeStyle = this.strokeColor;
75829 ctx.lineWidth = this.strokeWidth;
75830
75831 // It'd be nice to keep this class totally generic to any rectangle
75832 // and simply specify which border to miss out.
75833 ctx.moveTo(leftX, this.base);
75834 ctx.lineTo(leftX, top);
75835 ctx.lineTo(rightX, top);
75836 ctx.lineTo(rightX, this.base);
75837 ctx.fill();
75838 if (this.showStroke){
75839 ctx.stroke();
75840 }
75841 },
75842 height : function(){
75843 return this.base - this.y;
75844 },
75845 inRange : function(chartX,chartY){
75846 return (chartX >= this.x - this.width/2 && chartX <= this.x + this.width/2) && (chartY >= this.y && chartY <= this.base);
75847 }
75848 });
75849
75850 Chart.Animation = Chart.Element.extend({
75851 currentStep: null, // the current animation step
75852 numSteps: 60, // default number of steps
75853 easing: "", // the easing to use for this animation
75854 render: null, // render function used by the animation service
75855
75856 onAnimationProgress: null, // user specified callback to fire on each step of the animation
75857 onAnimationComplete: null, // user specified callback to fire when the animation finishes
75858 });
75859
75860 Chart.Tooltip = Chart.Element.extend({
75861 draw : function(){
75862
75863 var ctx = this.chart.ctx;
75864
75865 ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
75866
75867 this.xAlign = "center";
75868 this.yAlign = "above";
75869
75870 //Distance between the actual element.y position and the start of the tooltip caret
75871 var caretPadding = this.caretPadding = 2;
75872
75873 var tooltipWidth = ctx.measureText(this.text).width + 2*this.xPadding,
75874 tooltipRectHeight = this.fontSize + 2*this.yPadding,
75875 tooltipHeight = tooltipRectHeight + this.caretHeight + caretPadding;
75876
75877 if (this.x + tooltipWidth/2 >this.chart.width){
75878 this.xAlign = "left";
75879 } else if (this.x - tooltipWidth/2 < 0){
75880 this.xAlign = "right";
75881 }
75882
75883 if (this.y - tooltipHeight < 0){
75884 this.yAlign = "below";
75885 }
75886
75887
75888 var tooltipX = this.x - tooltipWidth/2,
75889 tooltipY = this.y - tooltipHeight;
75890
75891 ctx.fillStyle = this.fillColor;
75892
75893 // Custom Tooltips
75894 if(this.custom){
75895 this.custom(this);
75896 }
75897 else{
75898 switch(this.yAlign)
75899 {
75900 case "above":
75901 //Draw a caret above the x/y
75902 ctx.beginPath();
75903 ctx.moveTo(this.x,this.y - caretPadding);
75904 ctx.lineTo(this.x + this.caretHeight, this.y - (caretPadding + this.caretHeight));
75905 ctx.lineTo(this.x - this.caretHeight, this.y - (caretPadding + this.caretHeight));
75906 ctx.closePath();
75907 ctx.fill();
75908 break;
75909 case "below":
75910 tooltipY = this.y + caretPadding + this.caretHeight;
75911 //Draw a caret below the x/y
75912 ctx.beginPath();
75913 ctx.moveTo(this.x, this.y + caretPadding);
75914 ctx.lineTo(this.x + this.caretHeight, this.y + caretPadding + this.caretHeight);
75915 ctx.lineTo(this.x - this.caretHeight, this.y + caretPadding + this.caretHeight);
75916 ctx.closePath();
75917 ctx.fill();
75918 break;
75919 }
75920
75921 switch(this.xAlign)
75922 {
75923 case "left":
75924 tooltipX = this.x - tooltipWidth + (this.cornerRadius + this.caretHeight);
75925 break;
75926 case "right":
75927 tooltipX = this.x - (this.cornerRadius + this.caretHeight);
75928 break;
75929 }
75930
75931 drawRoundedRectangle(ctx,tooltipX,tooltipY,tooltipWidth,tooltipRectHeight,this.cornerRadius);
75932
75933 ctx.fill();
75934
75935 ctx.fillStyle = this.textColor;
75936 ctx.textAlign = "center";
75937 ctx.textBaseline = "middle";
75938 ctx.fillText(this.text, tooltipX + tooltipWidth/2, tooltipY + tooltipRectHeight/2);
75939 }
75940 }
75941 });
75942
75943 Chart.MultiTooltip = Chart.Element.extend({
75944 initialize : function(){
75945 this.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
75946
75947 this.titleFont = fontString(this.titleFontSize,this.titleFontStyle,this.titleFontFamily);
75948
75949 this.titleHeight = this.title ? this.titleFontSize * 1.5 : 0;
75950 this.height = (this.labels.length * this.fontSize) + ((this.labels.length-1) * (this.fontSize/2)) + (this.yPadding*2) + this.titleHeight;
75951
75952 this.ctx.font = this.titleFont;
75953
75954 var titleWidth = this.ctx.measureText(this.title).width,
75955 //Label has a legend square as well so account for this.
75956 labelWidth = longestText(this.ctx,this.font,this.labels) + this.fontSize + 3,
75957 longestTextWidth = max([labelWidth,titleWidth]);
75958
75959 this.width = longestTextWidth + (this.xPadding*2);
75960
75961
75962 var halfHeight = this.height/2;
75963
75964 //Check to ensure the height will fit on the canvas
75965 if (this.y - halfHeight < 0 ){
75966 this.y = halfHeight;
75967 } else if (this.y + halfHeight > this.chart.height){
75968 this.y = this.chart.height - halfHeight;
75969 }
75970
75971 //Decide whether to align left or right based on position on canvas
75972 if (this.x > this.chart.width/2){
75973 this.x -= this.xOffset + this.width;
75974 } else {
75975 this.x += this.xOffset;
75976 }
75977
75978
75979 },
75980 getLineHeight : function(index){
75981 var baseLineHeight = this.y - (this.height/2) + this.yPadding,
75982 afterTitleIndex = index-1;
75983
75984 //If the index is zero, we're getting the title
75985 if (index === 0){
75986 return baseLineHeight + this.titleHeight / 3;
75987 } else{
75988 return baseLineHeight + ((this.fontSize * 1.5 * afterTitleIndex) + this.fontSize / 2) + this.titleHeight;
75989 }
75990
75991 },
75992 draw : function(){
75993 // Custom Tooltips
75994 if(this.custom){
75995 this.custom(this);
75996 }
75997 else{
75998 drawRoundedRectangle(this.ctx,this.x,this.y - this.height/2,this.width,this.height,this.cornerRadius);
75999 var ctx = this.ctx;
76000 ctx.fillStyle = this.fillColor;
76001 ctx.fill();
76002 ctx.closePath();
76003
76004 ctx.textAlign = "left";
76005 ctx.textBaseline = "middle";
76006 ctx.fillStyle = this.titleTextColor;
76007 ctx.font = this.titleFont;
76008
76009 ctx.fillText(this.title,this.x + this.xPadding, this.getLineHeight(0));
76010
76011 ctx.font = this.font;
76012 helpers.each(this.labels,function(label,index){
76013 ctx.fillStyle = this.textColor;
76014 ctx.fillText(label,this.x + this.xPadding + this.fontSize + 3, this.getLineHeight(index + 1));
76015
76016 //A bit gnarly, but clearing this rectangle breaks when using explorercanvas (clears whole canvas)
76017 //ctx.clearRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
76018 //Instead we'll make a white filled block to put the legendColour palette over.
76019
76020 ctx.fillStyle = this.legendColorBackground;
76021 ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
76022
76023 ctx.fillStyle = this.legendColors[index].fill;
76024 ctx.fillRect(this.x + this.xPadding, this.getLineHeight(index + 1) - this.fontSize/2, this.fontSize, this.fontSize);
76025
76026
76027 },this);
76028 }
76029 }
76030 });
76031
76032 Chart.Scale = Chart.Element.extend({
76033 initialize : function(){
76034 this.fit();
76035 },
76036 buildYLabels : function(){
76037 this.yLabels = [];
76038
76039 var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
76040
76041 for (var i=0; i<=this.steps; i++){
76042 this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
76043 }
76044 this.yLabelWidth = (this.display && this.showLabels) ? longestText(this.ctx,this.font,this.yLabels) + 10 : 0;
76045 },
76046 addXLabel : function(label){
76047 this.xLabels.push(label);
76048 this.valuesCount++;
76049 this.fit();
76050 },
76051 removeXLabel : function(){
76052 this.xLabels.shift();
76053 this.valuesCount--;
76054 this.fit();
76055 },
76056 // Fitting loop to rotate x Labels and figure out what fits there, and also calculate how many Y steps to use
76057 fit: function(){
76058 // First we need the width of the yLabels, assuming the xLabels aren't rotated
76059
76060 // To do that we need the base line at the top and base of the chart, assuming there is no x label rotation
76061 this.startPoint = (this.display) ? this.fontSize : 0;
76062 this.endPoint = (this.display) ? this.height - (this.fontSize * 1.5) - 5 : this.height; // -5 to pad labels
76063
76064 // Apply padding settings to the start and end point.
76065 this.startPoint += this.padding;
76066 this.endPoint -= this.padding;
76067
76068 // Cache the starting endpoint, excluding the space for x labels
76069 var cachedEndPoint = this.endPoint;
76070
76071 // Cache the starting height, so can determine if we need to recalculate the scale yAxis
76072 var cachedHeight = this.endPoint - this.startPoint,
76073 cachedYLabelWidth;
76074
76075 // Build the current yLabels so we have an idea of what size they'll be to start
76076 /*
76077 * This sets what is returned from calculateScaleRange as static properties of this class:
76078 *
76079 this.steps;
76080 this.stepValue;
76081 this.min;
76082 this.max;
76083 *
76084 */
76085 this.calculateYRange(cachedHeight);
76086
76087 // With these properties set we can now build the array of yLabels
76088 // and also the width of the largest yLabel
76089 this.buildYLabels();
76090
76091 this.calculateXLabelRotation();
76092
76093 while((cachedHeight > this.endPoint - this.startPoint)){
76094 cachedHeight = this.endPoint - this.startPoint;
76095 cachedYLabelWidth = this.yLabelWidth;
76096
76097 this.calculateYRange(cachedHeight);
76098 this.buildYLabels();
76099
76100 // Only go through the xLabel loop again if the yLabel width has changed
76101 if (cachedYLabelWidth < this.yLabelWidth){
76102 this.endPoint = cachedEndPoint;
76103 this.calculateXLabelRotation();
76104 }
76105 }
76106
76107 },
76108 calculateXLabelRotation : function(){
76109 //Get the width of each grid by calculating the difference
76110 //between x offsets between 0 and 1.
76111
76112 this.ctx.font = this.font;
76113
76114 var firstWidth = this.ctx.measureText(this.xLabels[0]).width,
76115 lastWidth = this.ctx.measureText(this.xLabels[this.xLabels.length - 1]).width,
76116 firstRotated,
76117 lastRotated;
76118
76119
76120 this.xScalePaddingRight = lastWidth/2 + 3;
76121 this.xScalePaddingLeft = (firstWidth/2 > this.yLabelWidth) ? firstWidth/2 : this.yLabelWidth;
76122
76123 this.xLabelRotation = 0;
76124 if (this.display){
76125 var originalLabelWidth = longestText(this.ctx,this.font,this.xLabels),
76126 cosRotation,
76127 firstRotatedWidth;
76128 this.xLabelWidth = originalLabelWidth;
76129 //Allow 3 pixels x2 padding either side for label readability
76130 var xGridWidth = Math.floor(this.calculateX(1) - this.calculateX(0)) - 6;
76131
76132 //Max label rotate should be 90 - also act as a loop counter
76133 while ((this.xLabelWidth > xGridWidth && this.xLabelRotation === 0) || (this.xLabelWidth > xGridWidth && this.xLabelRotation <= 90 && this.xLabelRotation > 0)){
76134 cosRotation = Math.cos(toRadians(this.xLabelRotation));
76135
76136 firstRotated = cosRotation * firstWidth;
76137 lastRotated = cosRotation * lastWidth;
76138
76139 // We're right aligning the text now.
76140 if (firstRotated + this.fontSize / 2 > this.yLabelWidth){
76141 this.xScalePaddingLeft = firstRotated + this.fontSize / 2;
76142 }
76143 this.xScalePaddingRight = this.fontSize/2;
76144
76145
76146 this.xLabelRotation++;
76147 this.xLabelWidth = cosRotation * originalLabelWidth;
76148
76149 }
76150 if (this.xLabelRotation > 0){
76151 this.endPoint -= Math.sin(toRadians(this.xLabelRotation))*originalLabelWidth + 3;
76152 }
76153 }
76154 else{
76155 this.xLabelWidth = 0;
76156 this.xScalePaddingRight = this.padding;
76157 this.xScalePaddingLeft = this.padding;
76158 }
76159
76160 },
76161 // Needs to be overidden in each Chart type
76162 // Otherwise we need to pass all the data into the scale class
76163 calculateYRange: noop,
76164 drawingArea: function(){
76165 return this.startPoint - this.endPoint;
76166 },
76167 calculateY : function(value){
76168 var scalingFactor = this.drawingArea() / (this.min - this.max);
76169 return this.endPoint - (scalingFactor * (value - this.min));
76170 },
76171 calculateX : function(index){
76172 var isRotated = (this.xLabelRotation > 0),
76173 // innerWidth = (this.offsetGridLines) ? this.width - offsetLeft - this.padding : this.width - (offsetLeft + halfLabelWidth * 2) - this.padding,
76174 innerWidth = this.width - (this.xScalePaddingLeft + this.xScalePaddingRight),
76175 valueWidth = innerWidth/Math.max((this.valuesCount - ((this.offsetGridLines) ? 0 : 1)), 1),
76176 valueOffset = (valueWidth * index) + this.xScalePaddingLeft;
76177
76178 if (this.offsetGridLines){
76179 valueOffset += (valueWidth/2);
76180 }
76181
76182 return Math.round(valueOffset);
76183 },
76184 update : function(newProps){
76185 helpers.extend(this, newProps);
76186 this.fit();
76187 },
76188 draw : function(){
76189 var ctx = this.ctx,
76190 yLabelGap = (this.endPoint - this.startPoint) / this.steps,
76191 xStart = Math.round(this.xScalePaddingLeft);
76192 if (this.display){
76193 ctx.fillStyle = this.textColor;
76194 ctx.font = this.font;
76195 each(this.yLabels,function(labelString,index){
76196 var yLabelCenter = this.endPoint - (yLabelGap * index),
76197 linePositionY = Math.round(yLabelCenter),
76198 drawHorizontalLine = this.showHorizontalLines;
76199
76200 ctx.textAlign = "right";
76201 ctx.textBaseline = "middle";
76202 if (this.showLabels){
76203 ctx.fillText(labelString,xStart - 10,yLabelCenter);
76204 }
76205
76206 // This is X axis, so draw it
76207 if (index === 0 && !drawHorizontalLine){
76208 drawHorizontalLine = true;
76209 }
76210
76211 if (drawHorizontalLine){
76212 ctx.beginPath();
76213 }
76214
76215 if (index > 0){
76216 // This is a grid line in the centre, so drop that
76217 ctx.lineWidth = this.gridLineWidth;
76218 ctx.strokeStyle = this.gridLineColor;
76219 } else {
76220 // This is the first line on the scale
76221 ctx.lineWidth = this.lineWidth;
76222 ctx.strokeStyle = this.lineColor;
76223 }
76224
76225 linePositionY += helpers.aliasPixel(ctx.lineWidth);
76226
76227 if(drawHorizontalLine){
76228 ctx.moveTo(xStart, linePositionY);
76229 ctx.lineTo(this.width, linePositionY);
76230 ctx.stroke();
76231 ctx.closePath();
76232 }
76233
76234 ctx.lineWidth = this.lineWidth;
76235 ctx.strokeStyle = this.lineColor;
76236 ctx.beginPath();
76237 ctx.moveTo(xStart - 5, linePositionY);
76238 ctx.lineTo(xStart, linePositionY);
76239 ctx.stroke();
76240 ctx.closePath();
76241
76242 },this);
76243
76244 each(this.xLabels,function(label,index){
76245 var xPos = this.calculateX(index) + aliasPixel(this.lineWidth),
76246 // Check to see if line/bar here and decide where to place the line
76247 linePos = this.calculateX(index - (this.offsetGridLines ? 0.5 : 0)) + aliasPixel(this.lineWidth),
76248 isRotated = (this.xLabelRotation > 0),
76249 drawVerticalLine = this.showVerticalLines;
76250
76251 // This is Y axis, so draw it
76252 if (index === 0 && !drawVerticalLine){
76253 drawVerticalLine = true;
76254 }
76255
76256 if (drawVerticalLine){
76257 ctx.beginPath();
76258 }
76259
76260 if (index > 0){
76261 // This is a grid line in the centre, so drop that
76262 ctx.lineWidth = this.gridLineWidth;
76263 ctx.strokeStyle = this.gridLineColor;
76264 } else {
76265 // This is the first line on the scale
76266 ctx.lineWidth = this.lineWidth;
76267 ctx.strokeStyle = this.lineColor;
76268 }
76269
76270 if (drawVerticalLine){
76271 ctx.moveTo(linePos,this.endPoint);
76272 ctx.lineTo(linePos,this.startPoint - 3);
76273 ctx.stroke();
76274 ctx.closePath();
76275 }
76276
76277
76278 ctx.lineWidth = this.lineWidth;
76279 ctx.strokeStyle = this.lineColor;
76280
76281
76282 // Small lines at the bottom of the base grid line
76283 ctx.beginPath();
76284 ctx.moveTo(linePos,this.endPoint);
76285 ctx.lineTo(linePos,this.endPoint + 5);
76286 ctx.stroke();
76287 ctx.closePath();
76288
76289 ctx.save();
76290 ctx.translate(xPos,(isRotated) ? this.endPoint + 12 : this.endPoint + 8);
76291 ctx.rotate(toRadians(this.xLabelRotation)*-1);
76292 ctx.font = this.font;
76293 ctx.textAlign = (isRotated) ? "right" : "center";
76294 ctx.textBaseline = (isRotated) ? "middle" : "top";
76295 ctx.fillText(label, 0, 0);
76296 ctx.restore();
76297 },this);
76298
76299 }
76300 }
76301
76302 });
76303
76304 Chart.RadialScale = Chart.Element.extend({
76305 initialize: function(){
76306 this.size = min([this.height, this.width]);
76307 this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
76308 },
76309 calculateCenterOffset: function(value){
76310 // Take into account half font size + the yPadding of the top value
76311 var scalingFactor = this.drawingArea / (this.max - this.min);
76312
76313 return (value - this.min) * scalingFactor;
76314 },
76315 update : function(){
76316 if (!this.lineArc){
76317 this.setScaleSize();
76318 } else {
76319 this.drawingArea = (this.display) ? (this.size/2) - (this.fontSize/2 + this.backdropPaddingY) : (this.size/2);
76320 }
76321 this.buildYLabels();
76322 },
76323 buildYLabels: function(){
76324 this.yLabels = [];
76325
76326 var stepDecimalPlaces = getDecimalPlaces(this.stepValue);
76327
76328 for (var i=0; i<=this.steps; i++){
76329 this.yLabels.push(template(this.templateString,{value:(this.min + (i * this.stepValue)).toFixed(stepDecimalPlaces)}));
76330 }
76331 },
76332 getCircumference : function(){
76333 return ((Math.PI*2) / this.valuesCount);
76334 },
76335 setScaleSize: function(){
76336 /*
76337 * Right, this is really confusing and there is a lot of maths going on here
76338 * The gist of the problem is here: https://gist.github.com/nnnick/696cc9c55f4b0beb8fe9
76339 *
76340 * Reaction: https://dl.dropboxusercontent.com/u/34601363/toomuchscience.gif
76341 *
76342 * Solution:
76343 *
76344 * We assume the radius of the polygon is half the size of the canvas at first
76345 * at each index we check if the text overlaps.
76346 *
76347 * Where it does, we store that angle and that index.
76348 *
76349 * After finding the largest index and angle we calculate how much we need to remove
76350 * from the shape radius to move the point inwards by that x.
76351 *
76352 * We average the left and right distances to get the maximum shape radius that can fit in the box
76353 * along with labels.
76354 *
76355 * Once we have that, we can find the centre point for the chart, by taking the x text protrusion
76356 * on each side, removing that from the size, halving it and adding the left x protrusion width.
76357 *
76358 * This will mean we have a shape fitted to the canvas, as large as it can be with the labels
76359 * and position it in the most space efficient manner
76360 *
76361 * https://dl.dropboxusercontent.com/u/34601363/yeahscience.gif
76362 */
76363
76364
76365 // Get maximum radius of the polygon. Either half the height (minus the text width) or half the width.
76366 // Use this to calculate the offset + change. - Make sure L/R protrusion is at least 0 to stop issues with centre points
76367 var largestPossibleRadius = min([(this.height/2 - this.pointLabelFontSize - 5), this.width/2]),
76368 pointPosition,
76369 i,
76370 textWidth,
76371 halfTextWidth,
76372 furthestRight = this.width,
76373 furthestRightIndex,
76374 furthestRightAngle,
76375 furthestLeft = 0,
76376 furthestLeftIndex,
76377 furthestLeftAngle,
76378 xProtrusionLeft,
76379 xProtrusionRight,
76380 radiusReductionRight,
76381 radiusReductionLeft,
76382 maxWidthRadius;
76383 this.ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
76384 for (i=0;i<this.valuesCount;i++){
76385 // 5px to space the text slightly out - similar to what we do in the draw function.
76386 pointPosition = this.getPointPosition(i, largestPossibleRadius);
76387 textWidth = this.ctx.measureText(template(this.templateString, { value: this.labels[i] })).width + 5;
76388 if (i === 0 || i === this.valuesCount/2){
76389 // If we're at index zero, or exactly the middle, we're at exactly the top/bottom
76390 // of the radar chart, so text will be aligned centrally, so we'll half it and compare
76391 // w/left and right text sizes
76392 halfTextWidth = textWidth/2;
76393 if (pointPosition.x + halfTextWidth > furthestRight) {
76394 furthestRight = pointPosition.x + halfTextWidth;
76395 furthestRightIndex = i;
76396 }
76397 if (pointPosition.x - halfTextWidth < furthestLeft) {
76398 furthestLeft = pointPosition.x - halfTextWidth;
76399 furthestLeftIndex = i;
76400 }
76401 }
76402 else if (i < this.valuesCount/2) {
76403 // Less than half the values means we'll left align the text
76404 if (pointPosition.x + textWidth > furthestRight) {
76405 furthestRight = pointPosition.x + textWidth;
76406 furthestRightIndex = i;
76407 }
76408 }
76409 else if (i > this.valuesCount/2){
76410 // More than half the values means we'll right align the text
76411 if (pointPosition.x - textWidth < furthestLeft) {
76412 furthestLeft = pointPosition.x - textWidth;
76413 furthestLeftIndex = i;
76414 }
76415 }
76416 }
76417
76418 xProtrusionLeft = furthestLeft;
76419
76420 xProtrusionRight = Math.ceil(furthestRight - this.width);
76421
76422 furthestRightAngle = this.getIndexAngle(furthestRightIndex);
76423
76424 furthestLeftAngle = this.getIndexAngle(furthestLeftIndex);
76425
76426 radiusReductionRight = xProtrusionRight / Math.sin(furthestRightAngle + Math.PI/2);
76427
76428 radiusReductionLeft = xProtrusionLeft / Math.sin(furthestLeftAngle + Math.PI/2);
76429
76430 // Ensure we actually need to reduce the size of the chart
76431 radiusReductionRight = (isNumber(radiusReductionRight)) ? radiusReductionRight : 0;
76432 radiusReductionLeft = (isNumber(radiusReductionLeft)) ? radiusReductionLeft : 0;
76433
76434 this.drawingArea = largestPossibleRadius - (radiusReductionLeft + radiusReductionRight)/2;
76435
76436 //this.drawingArea = min([maxWidthRadius, (this.height - (2 * (this.pointLabelFontSize + 5)))/2])
76437 this.setCenterPoint(radiusReductionLeft, radiusReductionRight);
76438
76439 },
76440 setCenterPoint: function(leftMovement, rightMovement){
76441
76442 var maxRight = this.width - rightMovement - this.drawingArea,
76443 maxLeft = leftMovement + this.drawingArea;
76444
76445 this.xCenter = (maxLeft + maxRight)/2;
76446 // Always vertically in the centre as the text height doesn't change
76447 this.yCenter = (this.height/2);
76448 },
76449
76450 getIndexAngle : function(index){
76451 var angleMultiplier = (Math.PI * 2) / this.valuesCount;
76452 // Start from the top instead of right, so remove a quarter of the circle
76453
76454 return index * angleMultiplier - (Math.PI/2);
76455 },
76456 getPointPosition : function(index, distanceFromCenter){
76457 var thisAngle = this.getIndexAngle(index);
76458 return {
76459 x : (Math.cos(thisAngle) * distanceFromCenter) + this.xCenter,
76460 y : (Math.sin(thisAngle) * distanceFromCenter) + this.yCenter
76461 };
76462 },
76463 draw: function(){
76464 if (this.display){
76465 var ctx = this.ctx;
76466 each(this.yLabels, function(label, index){
76467 // Don't draw a centre value
76468 if (index > 0){
76469 var yCenterOffset = index * (this.drawingArea/this.steps),
76470 yHeight = this.yCenter - yCenterOffset,
76471 pointPosition;
76472
76473 // Draw circular lines around the scale
76474 if (this.lineWidth > 0){
76475 ctx.strokeStyle = this.lineColor;
76476 ctx.lineWidth = this.lineWidth;
76477
76478 if(this.lineArc){
76479 ctx.beginPath();
76480 ctx.arc(this.xCenter, this.yCenter, yCenterOffset, 0, Math.PI*2);
76481 ctx.closePath();
76482 ctx.stroke();
76483 } else{
76484 ctx.beginPath();
76485 for (var i=0;i<this.valuesCount;i++)
76486 {
76487 pointPosition = this.getPointPosition(i, this.calculateCenterOffset(this.min + (index * this.stepValue)));
76488 if (i === 0){
76489 ctx.moveTo(pointPosition.x, pointPosition.y);
76490 } else {
76491 ctx.lineTo(pointPosition.x, pointPosition.y);
76492 }
76493 }
76494 ctx.closePath();
76495 ctx.stroke();
76496 }
76497 }
76498 if(this.showLabels){
76499 ctx.font = fontString(this.fontSize,this.fontStyle,this.fontFamily);
76500 if (this.showLabelBackdrop){
76501 var labelWidth = ctx.measureText(label).width;
76502 ctx.fillStyle = this.backdropColor;
76503 ctx.fillRect(
76504 this.xCenter - labelWidth/2 - this.backdropPaddingX,
76505 yHeight - this.fontSize/2 - this.backdropPaddingY,
76506 labelWidth + this.backdropPaddingX*2,
76507 this.fontSize + this.backdropPaddingY*2
76508 );
76509 }
76510 ctx.textAlign = 'center';
76511 ctx.textBaseline = "middle";
76512 ctx.fillStyle = this.fontColor;
76513 ctx.fillText(label, this.xCenter, yHeight);
76514 }
76515 }
76516 }, this);
76517
76518 if (!this.lineArc){
76519 ctx.lineWidth = this.angleLineWidth;
76520 ctx.strokeStyle = this.angleLineColor;
76521 for (var i = this.valuesCount - 1; i >= 0; i--) {
76522 var centerOffset = null, outerPosition = null;
76523
76524 if (this.angleLineWidth > 0 && (i % this.angleLineInterval === 0)){
76525 centerOffset = this.calculateCenterOffset(this.max);
76526 outerPosition = this.getPointPosition(i, centerOffset);
76527 ctx.beginPath();
76528 ctx.moveTo(this.xCenter, this.yCenter);
76529 ctx.lineTo(outerPosition.x, outerPosition.y);
76530 ctx.stroke();
76531 ctx.closePath();
76532 }
76533
76534 if (this.backgroundColors && this.backgroundColors.length == this.valuesCount) {
76535 if (centerOffset == null)
76536 centerOffset = this.calculateCenterOffset(this.max);
76537
76538 if (outerPosition == null)
76539 outerPosition = this.getPointPosition(i, centerOffset);
76540
76541 var previousOuterPosition = this.getPointPosition(i === 0 ? this.valuesCount - 1 : i - 1, centerOffset);
76542 var nextOuterPosition = this.getPointPosition(i === this.valuesCount - 1 ? 0 : i + 1, centerOffset);
76543
76544 var previousOuterHalfway = { x: (previousOuterPosition.x + outerPosition.x) / 2, y: (previousOuterPosition.y + outerPosition.y) / 2 };
76545 var nextOuterHalfway = { x: (outerPosition.x + nextOuterPosition.x) / 2, y: (outerPosition.y + nextOuterPosition.y) / 2 };
76546
76547 ctx.beginPath();
76548 ctx.moveTo(this.xCenter, this.yCenter);
76549 ctx.lineTo(previousOuterHalfway.x, previousOuterHalfway.y);
76550 ctx.lineTo(outerPosition.x, outerPosition.y);
76551 ctx.lineTo(nextOuterHalfway.x, nextOuterHalfway.y);
76552 ctx.fillStyle = this.backgroundColors[i];
76553 ctx.fill();
76554 ctx.closePath();
76555 }
76556 // Extra 3px out for some label spacing
76557 var pointLabelPosition = this.getPointPosition(i, this.calculateCenterOffset(this.max) + 5);
76558 ctx.font = fontString(this.pointLabelFontSize,this.pointLabelFontStyle,this.pointLabelFontFamily);
76559 ctx.fillStyle = this.pointLabelFontColor;
76560
76561 var labelsCount = this.labels.length,
76562 halfLabelsCount = this.labels.length/2,
76563 quarterLabelsCount = halfLabelsCount/2,
76564 upperHalf = (i < quarterLabelsCount || i > labelsCount - quarterLabelsCount),
76565 exactQuarter = (i === quarterLabelsCount || i === labelsCount - quarterLabelsCount);
76566 if (i === 0){
76567 ctx.textAlign = 'center';
76568 } else if(i === halfLabelsCount){
76569 ctx.textAlign = 'center';
76570 } else if (i < halfLabelsCount){
76571 ctx.textAlign = 'left';
76572 } else {
76573 ctx.textAlign = 'right';
76574 }
76575
76576 // Set the correct text baseline based on outer positioning
76577 if (exactQuarter){
76578 ctx.textBaseline = 'middle';
76579 } else if (upperHalf){
76580 ctx.textBaseline = 'bottom';
76581 } else {
76582 ctx.textBaseline = 'top';
76583 }
76584
76585 ctx.fillText(this.labels[i], pointLabelPosition.x, pointLabelPosition.y);
76586 }
76587 }
76588 }
76589 }
76590 });
76591
76592 Chart.animationService = {
76593 frameDuration: 17,
76594 animations: [],
76595 dropFrames: 0,
76596 addAnimation: function(chartInstance, animationObject) {
76597 for (var index = 0; index < this.animations.length; ++ index){
76598 if (this.animations[index].chartInstance === chartInstance){
76599 // replacing an in progress animation
76600 this.animations[index].animationObject = animationObject;
76601 return;
76602 }
76603 }
76604
76605 this.animations.push({
76606 chartInstance: chartInstance,
76607 animationObject: animationObject
76608 });
76609
76610 // If there are no animations queued, manually kickstart a digest, for lack of a better word
76611 if (this.animations.length == 1) {
76612 helpers.requestAnimFrame.call(window, this.digestWrapper);
76613 }
76614 },
76615 // Cancel the animation for a given chart instance
76616 cancelAnimation: function(chartInstance) {
76617 var index = helpers.findNextWhere(this.animations, function(animationWrapper) {
76618 return animationWrapper.chartInstance === chartInstance;
76619 });
76620
76621 if (index)
76622 {
76623 this.animations.splice(index, 1);
76624 }
76625 },
76626 // calls startDigest with the proper context
76627 digestWrapper: function() {
76628 Chart.animationService.startDigest.call(Chart.animationService);
76629 },
76630 startDigest: function() {
76631
76632 var startTime = Date.now();
76633 var framesToDrop = 0;
76634
76635 if(this.dropFrames > 1){
76636 framesToDrop = Math.floor(this.dropFrames);
76637 this.dropFrames -= framesToDrop;
76638 }
76639
76640 for (var i = 0; i < this.animations.length; i++) {
76641
76642 if (this.animations[i].animationObject.currentStep === null){
76643 this.animations[i].animationObject.currentStep = 0;
76644 }
76645
76646 this.animations[i].animationObject.currentStep += 1 + framesToDrop;
76647 if(this.animations[i].animationObject.currentStep > this.animations[i].animationObject.numSteps){
76648 this.animations[i].animationObject.currentStep = this.animations[i].animationObject.numSteps;
76649 }
76650
76651 this.animations[i].animationObject.render(this.animations[i].chartInstance, this.animations[i].animationObject);
76652
76653 // Check if executed the last frame.
76654 if (this.animations[i].animationObject.currentStep == this.animations[i].animationObject.numSteps){
76655 // Call onAnimationComplete
76656 this.animations[i].animationObject.onAnimationComplete.call(this.animations[i].chartInstance);
76657 // Remove the animation.
76658 this.animations.splice(i, 1);
76659 // Keep the index in place to offset the splice
76660 i--;
76661 }
76662 }
76663
76664 var endTime = Date.now();
76665 var delay = endTime - startTime - this.frameDuration;
76666 var frameDelay = delay / this.frameDuration;
76667
76668 if(frameDelay > 1){
76669 this.dropFrames += frameDelay;
76670 }
76671
76672 // Do we have more stuff to animate?
76673 if (this.animations.length > 0){
76674 helpers.requestAnimFrame.call(window, this.digestWrapper);
76675 }
76676 }
76677 };
76678
76679 // Attach global event to resize each chart instance when the browser resizes
76680 helpers.addEvent(window, "resize", (function(){
76681 // Basic debounce of resize function so it doesn't hurt performance when resizing browser.
76682 var timeout;
76683 return function(){
76684 clearTimeout(timeout);
76685 timeout = setTimeout(function(){
76686 each(Chart.instances,function(instance){
76687 // If the responsive flag is set in the chart instance config
76688 // Cascade the resize event down to the chart.
76689 if (instance.options.responsive){
76690 instance.resize(instance.render, true);
76691 }
76692 });
76693 }, 50);
76694 };
76695 })());
76696
76697
76698 if (amd) {
76699 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function(){
76700 return Chart;
76701 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
76702 } else if (typeof module === 'object' && module.exports) {
76703 module.exports = Chart;
76704 }
76705
76706 root.Chart = Chart;
76707
76708 Chart.noConflict = function(){
76709 root.Chart = previous;
76710 return Chart;
76711 };
76712
76713 }).call(this);
76714
76715 (function(){
76716 "use strict";
76717
76718 var root = this,
76719 Chart = root.Chart,
76720 helpers = Chart.helpers;
76721
76722
76723 var defaultConfig = {
76724 //Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value
76725 scaleBeginAtZero : true,
76726
76727 //Boolean - Whether grid lines are shown across the chart
76728 scaleShowGridLines : true,
76729
76730 //String - Colour of the grid lines
76731 scaleGridLineColor : "rgba(0,0,0,.05)",
76732
76733 //Number - Width of the grid lines
76734 scaleGridLineWidth : 1,
76735
76736 //Boolean - Whether to show horizontal lines (except X axis)
76737 scaleShowHorizontalLines: true,
76738
76739 //Boolean - Whether to show vertical lines (except Y axis)
76740 scaleShowVerticalLines: true,
76741
76742 //Boolean - If there is a stroke on each bar
76743 barShowStroke : true,
76744
76745 //Number - Pixel width of the bar stroke
76746 barStrokeWidth : 2,
76747
76748 //Number - Spacing between each of the X value sets
76749 barValueSpacing : 5,
76750
76751 //Number - Spacing between data sets within X values
76752 barDatasetSpacing : 1,
76753
76754 //String - A legend template
76755 legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
76756
76757 };
76758
76759
76760 Chart.Type.extend({
76761 name: "Bar",
76762 defaults : defaultConfig,
76763 initialize: function(data){
76764
76765 //Expose options as a scope variable here so we can access it in the ScaleClass
76766 var options = this.options;
76767
76768 this.ScaleClass = Chart.Scale.extend({
76769 offsetGridLines : true,
76770 calculateBarX : function(datasetCount, datasetIndex, barIndex){
76771 //Reusable method for calculating the xPosition of a given bar based on datasetIndex & width of the bar
76772 var xWidth = this.calculateBaseWidth(),
76773 xAbsolute = this.calculateX(barIndex) - (xWidth/2),
76774 barWidth = this.calculateBarWidth(datasetCount);
76775
76776 return xAbsolute + (barWidth * datasetIndex) + (datasetIndex * options.barDatasetSpacing) + barWidth/2;
76777 },
76778 calculateBaseWidth : function(){
76779 return (this.calculateX(1) - this.calculateX(0)) - (2*options.barValueSpacing);
76780 },
76781 calculateBarWidth : function(datasetCount){
76782 //The padding between datasets is to the right of each bar, providing that there are more than 1 dataset
76783 var baseWidth = this.calculateBaseWidth() - ((datasetCount - 1) * options.barDatasetSpacing);
76784
76785 return (baseWidth / datasetCount);
76786 }
76787 });
76788
76789 this.datasets = [];
76790
76791 //Set up tooltip events on the chart
76792 if (this.options.showTooltips){
76793 helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
76794 var activeBars = (evt.type !== 'mouseout') ? this.getBarsAtEvent(evt) : [];
76795
76796 this.eachBars(function(bar){
76797 bar.restore(['fillColor', 'strokeColor']);
76798 });
76799 helpers.each(activeBars, function(activeBar){
76800 if (activeBar) {
76801 activeBar.fillColor = activeBar.highlightFill;
76802 activeBar.strokeColor = activeBar.highlightStroke;
76803 }
76804 });
76805 this.showTooltip(activeBars);
76806 });
76807 }
76808
76809 //Declare the extension of the default point, to cater for the options passed in to the constructor
76810 this.BarClass = Chart.Rectangle.extend({
76811 strokeWidth : this.options.barStrokeWidth,
76812 showStroke : this.options.barShowStroke,
76813 ctx : this.chart.ctx
76814 });
76815
76816 //Iterate through each of the datasets, and build this into a property of the chart
76817 helpers.each(data.datasets,function(dataset,datasetIndex){
76818
76819 var datasetObject = {
76820 label : dataset.label || null,
76821 fillColor : dataset.fillColor,
76822 strokeColor : dataset.strokeColor,
76823 bars : []
76824 };
76825
76826 this.datasets.push(datasetObject);
76827
76828 helpers.each(dataset.data,function(dataPoint,index){
76829 //Add a new point for each piece of data, passing any required data to draw.
76830 datasetObject.bars.push(new this.BarClass({
76831 value : dataPoint,
76832 label : data.labels[index],
76833 datasetLabel: dataset.label,
76834 strokeColor : (typeof dataset.strokeColor == 'object') ? dataset.strokeColor[index] : dataset.strokeColor,
76835 fillColor : (typeof dataset.fillColor == 'object') ? dataset.fillColor[index] : dataset.fillColor,
76836 highlightFill : (dataset.highlightFill) ? (typeof dataset.highlightFill == 'object') ? dataset.highlightFill[index] : dataset.highlightFill : (typeof dataset.fillColor == 'object') ? dataset.fillColor[index] : dataset.fillColor,
76837 highlightStroke : (dataset.highlightStroke) ? (typeof dataset.highlightStroke == 'object') ? dataset.highlightStroke[index] : dataset.highlightStroke : (typeof dataset.strokeColor == 'object') ? dataset.strokeColor[index] : dataset.strokeColor
76838 }));
76839 },this);
76840
76841 },this);
76842
76843 this.buildScale(data.labels);
76844
76845 this.BarClass.prototype.base = this.scale.endPoint;
76846
76847 this.eachBars(function(bar, index, datasetIndex){
76848 helpers.extend(bar, {
76849 width : this.scale.calculateBarWidth(this.datasets.length),
76850 x: this.scale.calculateBarX(this.datasets.length, datasetIndex, index),
76851 y: this.scale.endPoint
76852 });
76853 bar.save();
76854 }, this);
76855
76856 this.render();
76857 },
76858 update : function(){
76859 this.scale.update();
76860 // Reset any highlight colours before updating.
76861 helpers.each(this.activeElements, function(activeElement){
76862 activeElement.restore(['fillColor', 'strokeColor']);
76863 });
76864
76865 this.eachBars(function(bar){
76866 bar.save();
76867 });
76868 this.render();
76869 },
76870 eachBars : function(callback){
76871 helpers.each(this.datasets,function(dataset, datasetIndex){
76872 helpers.each(dataset.bars, callback, this, datasetIndex);
76873 },this);
76874 },
76875 getBarsAtEvent : function(e){
76876 var barsArray = [],
76877 eventPosition = helpers.getRelativePosition(e),
76878 datasetIterator = function(dataset){
76879 barsArray.push(dataset.bars[barIndex]);
76880 },
76881 barIndex;
76882
76883 for (var datasetIndex = 0; datasetIndex < this.datasets.length; datasetIndex++) {
76884 for (barIndex = 0; barIndex < this.datasets[datasetIndex].bars.length; barIndex++) {
76885 if (this.datasets[datasetIndex].bars[barIndex].inRange(eventPosition.x,eventPosition.y)){
76886 helpers.each(this.datasets, datasetIterator);
76887 return barsArray;
76888 }
76889 }
76890 }
76891
76892 return barsArray;
76893 },
76894 buildScale : function(labels){
76895 var self = this;
76896
76897 var dataTotal = function(){
76898 var values = [];
76899 self.eachBars(function(bar){
76900 values.push(bar.value);
76901 });
76902 return values;
76903 };
76904
76905 var scaleOptions = {
76906 templateString : this.options.scaleLabel,
76907 height : this.chart.height,
76908 width : this.chart.width,
76909 ctx : this.chart.ctx,
76910 textColor : this.options.scaleFontColor,
76911 fontSize : this.options.scaleFontSize,
76912 fontStyle : this.options.scaleFontStyle,
76913 fontFamily : this.options.scaleFontFamily,
76914 valuesCount : labels.length,
76915 beginAtZero : this.options.scaleBeginAtZero,
76916 integersOnly : this.options.scaleIntegersOnly,
76917 calculateYRange: function(currentHeight){
76918 var updatedRanges = helpers.calculateScaleRange(
76919 dataTotal(),
76920 currentHeight,
76921 this.fontSize,
76922 this.beginAtZero,
76923 this.integersOnly
76924 );
76925 helpers.extend(this, updatedRanges);
76926 },
76927 xLabels : labels,
76928 font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
76929 lineWidth : this.options.scaleLineWidth,
76930 lineColor : this.options.scaleLineColor,
76931 showHorizontalLines : this.options.scaleShowHorizontalLines,
76932 showVerticalLines : this.options.scaleShowVerticalLines,
76933 gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
76934 gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
76935 padding : (this.options.showScale) ? 0 : (this.options.barShowStroke) ? this.options.barStrokeWidth : 0,
76936 showLabels : this.options.scaleShowLabels,
76937 display : this.options.showScale
76938 };
76939
76940 if (this.options.scaleOverride){
76941 helpers.extend(scaleOptions, {
76942 calculateYRange: helpers.noop,
76943 steps: this.options.scaleSteps,
76944 stepValue: this.options.scaleStepWidth,
76945 min: this.options.scaleStartValue,
76946 max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
76947 });
76948 }
76949
76950 this.scale = new this.ScaleClass(scaleOptions);
76951 },
76952 addData : function(valuesArray,label){
76953 //Map the values array for each of the datasets
76954 helpers.each(valuesArray,function(value,datasetIndex){
76955 //Add a new point for each piece of data, passing any required data to draw.
76956 this.datasets[datasetIndex].bars.push(new this.BarClass({
76957 value : value,
76958 label : label,
76959 datasetLabel: this.datasets[datasetIndex].label,
76960 x: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),
76961 y: this.scale.endPoint,
76962 width : this.scale.calculateBarWidth(this.datasets.length),
76963 base : this.scale.endPoint,
76964 strokeColor : this.datasets[datasetIndex].strokeColor,
76965 fillColor : this.datasets[datasetIndex].fillColor
76966 }));
76967 },this);
76968
76969 this.scale.addXLabel(label);
76970 //Then re-render the chart.
76971 this.update();
76972 },
76973 removeData : function(){
76974 this.scale.removeXLabel();
76975 //Then re-render the chart.
76976 helpers.each(this.datasets,function(dataset){
76977 dataset.bars.shift();
76978 },this);
76979 this.update();
76980 },
76981 reflow : function(){
76982 helpers.extend(this.BarClass.prototype,{
76983 y: this.scale.endPoint,
76984 base : this.scale.endPoint
76985 });
76986 var newScaleProps = helpers.extend({
76987 height : this.chart.height,
76988 width : this.chart.width
76989 });
76990 this.scale.update(newScaleProps);
76991 },
76992 draw : function(ease){
76993 var easingDecimal = ease || 1;
76994 this.clear();
76995
76996 var ctx = this.chart.ctx;
76997
76998 this.scale.draw(easingDecimal);
76999
77000 //Draw all the bars for each dataset
77001 helpers.each(this.datasets,function(dataset,datasetIndex){
77002 helpers.each(dataset.bars,function(bar,index){
77003 if (bar.hasValue()){
77004 bar.base = this.scale.endPoint;
77005 //Transition then draw
77006 bar.transition({
77007 x : this.scale.calculateBarX(this.datasets.length, datasetIndex, index),
77008 y : this.scale.calculateY(bar.value),
77009 width : this.scale.calculateBarWidth(this.datasets.length)
77010 }, easingDecimal).draw();
77011 }
77012 },this);
77013
77014 },this);
77015 }
77016 });
77017
77018
77019 }).call(this);
77020
77021 (function(){
77022 "use strict";
77023
77024 var root = this,
77025 Chart = root.Chart,
77026 //Cache a local reference to Chart.helpers
77027 helpers = Chart.helpers;
77028
77029 var defaultConfig = {
77030 //Boolean - Whether we should show a stroke on each segment
77031 segmentShowStroke : true,
77032
77033 //String - The colour of each segment stroke
77034 segmentStrokeColor : "#fff",
77035
77036 //Number - The width of each segment stroke
77037 segmentStrokeWidth : 2,
77038
77039 //The percentage of the chart that we cut out of the middle.
77040 percentageInnerCutout : 50,
77041
77042 //Number - Amount of animation steps
77043 animationSteps : 100,
77044
77045 //String - Animation easing effect
77046 animationEasing : "easeOutBounce",
77047
77048 //Boolean - Whether we animate the rotation of the Doughnut
77049 animateRotate : true,
77050
77051 //Boolean - Whether we animate scaling the Doughnut from the centre
77052 animateScale : false,
77053
77054 //String - A legend template
77055 legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=segments[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
77056
77057 };
77058
77059 Chart.Type.extend({
77060 //Passing in a name registers this chart in the Chart namespace
77061 name: "Doughnut",
77062 //Providing a defaults will also register the defaults in the chart namespace
77063 defaults : defaultConfig,
77064 //Initialize is fired when the chart is initialized - Data is passed in as a parameter
77065 //Config is automatically merged by the core of Chart.js, and is available at this.options
77066 initialize: function(data){
77067
77068 //Declare segments as a static property to prevent inheriting across the Chart type prototype
77069 this.segments = [];
77070 this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
77071
77072 this.SegmentArc = Chart.Arc.extend({
77073 ctx : this.chart.ctx,
77074 x : this.chart.width/2,
77075 y : this.chart.height/2
77076 });
77077
77078 //Set up tooltip events on the chart
77079 if (this.options.showTooltips){
77080 helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
77081 var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
77082
77083 helpers.each(this.segments,function(segment){
77084 segment.restore(["fillColor"]);
77085 });
77086 helpers.each(activeSegments,function(activeSegment){
77087 activeSegment.fillColor = activeSegment.highlightColor;
77088 });
77089 this.showTooltip(activeSegments);
77090 });
77091 }
77092 this.calculateTotal(data);
77093
77094 helpers.each(data,function(datapoint, index){
77095 if (!datapoint.color) {
77096 datapoint.color = 'hsl(' + (360 * index / data.length) + ', 100%, 50%)';
77097 }
77098 this.addData(datapoint, index, true);
77099 },this);
77100
77101 this.render();
77102 },
77103 getSegmentsAtEvent : function(e){
77104 var segmentsArray = [];
77105
77106 var location = helpers.getRelativePosition(e);
77107
77108 helpers.each(this.segments,function(segment){
77109 if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
77110 },this);
77111 return segmentsArray;
77112 },
77113 addData : function(segment, atIndex, silent){
77114 var index = atIndex !== undefined ? atIndex : this.segments.length;
77115 if ( typeof(segment.color) === "undefined" ) {
77116 segment.color = Chart.defaults.global.segmentColorDefault[index % Chart.defaults.global.segmentColorDefault.length];
77117 segment.highlight = Chart.defaults.global.segmentHighlightColorDefaults[index % Chart.defaults.global.segmentHighlightColorDefaults.length];
77118 }
77119 this.segments.splice(index, 0, new this.SegmentArc({
77120 value : segment.value,
77121 outerRadius : (this.options.animateScale) ? 0 : this.outerRadius,
77122 innerRadius : (this.options.animateScale) ? 0 : (this.outerRadius/100) * this.options.percentageInnerCutout,
77123 fillColor : segment.color,
77124 highlightColor : segment.highlight || segment.color,
77125 showStroke : this.options.segmentShowStroke,
77126 strokeWidth : this.options.segmentStrokeWidth,
77127 strokeColor : this.options.segmentStrokeColor,
77128 startAngle : Math.PI * 1.5,
77129 circumference : (this.options.animateRotate) ? 0 : this.calculateCircumference(segment.value),
77130 label : segment.label
77131 }));
77132 if (!silent){
77133 this.reflow();
77134 this.update();
77135 }
77136 },
77137 calculateCircumference : function(value) {
77138 if ( this.total > 0 ) {
77139 return (Math.PI*2)*(value / this.total);
77140 } else {
77141 return 0;
77142 }
77143 },
77144 calculateTotal : function(data){
77145 this.total = 0;
77146 helpers.each(data,function(segment){
77147 this.total += Math.abs(segment.value);
77148 },this);
77149 },
77150 update : function(){
77151 this.calculateTotal(this.segments);
77152
77153 // Reset any highlight colours before updating.
77154 helpers.each(this.activeElements, function(activeElement){
77155 activeElement.restore(['fillColor']);
77156 });
77157
77158 helpers.each(this.segments,function(segment){
77159 segment.save();
77160 });
77161 this.render();
77162 },
77163
77164 removeData: function(atIndex){
77165 var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
77166 this.segments.splice(indexToDelete, 1);
77167 this.reflow();
77168 this.update();
77169 },
77170
77171 reflow : function(){
77172 helpers.extend(this.SegmentArc.prototype,{
77173 x : this.chart.width/2,
77174 y : this.chart.height/2
77175 });
77176 this.outerRadius = (helpers.min([this.chart.width,this.chart.height]) - this.options.segmentStrokeWidth/2)/2;
77177 helpers.each(this.segments, function(segment){
77178 segment.update({
77179 outerRadius : this.outerRadius,
77180 innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
77181 });
77182 }, this);
77183 },
77184 draw : function(easeDecimal){
77185 var animDecimal = (easeDecimal) ? easeDecimal : 1;
77186 this.clear();
77187 helpers.each(this.segments,function(segment,index){
77188 segment.transition({
77189 circumference : this.calculateCircumference(segment.value),
77190 outerRadius : this.outerRadius,
77191 innerRadius : (this.outerRadius/100) * this.options.percentageInnerCutout
77192 },animDecimal);
77193
77194 segment.endAngle = segment.startAngle + segment.circumference;
77195
77196 segment.draw();
77197 if (index === 0){
77198 segment.startAngle = Math.PI * 1.5;
77199 }
77200 //Check to see if it's the last segment, if not get the next and update the start angle
77201 if (index < this.segments.length-1){
77202 this.segments[index+1].startAngle = segment.endAngle;
77203 }
77204 },this);
77205
77206 }
77207 });
77208
77209 Chart.types.Doughnut.extend({
77210 name : "Pie",
77211 defaults : helpers.merge(defaultConfig,{percentageInnerCutout : 0})
77212 });
77213
77214 }).call(this);
77215
77216 (function(){
77217 "use strict";
77218
77219 var root = this,
77220 Chart = root.Chart,
77221 helpers = Chart.helpers;
77222
77223 var defaultConfig = {
77224
77225 ///Boolean - Whether grid lines are shown across the chart
77226 scaleShowGridLines : true,
77227
77228 //String - Colour of the grid lines
77229 scaleGridLineColor : "rgba(0,0,0,.05)",
77230
77231 //Number - Width of the grid lines
77232 scaleGridLineWidth : 1,
77233
77234 //Boolean - Whether to show horizontal lines (except X axis)
77235 scaleShowHorizontalLines: true,
77236
77237 //Boolean - Whether to show vertical lines (except Y axis)
77238 scaleShowVerticalLines: true,
77239
77240 //Boolean - Whether the line is curved between points
77241 bezierCurve : true,
77242
77243 //Number - Tension of the bezier curve between points
77244 bezierCurveTension : 0.4,
77245
77246 //Boolean - Whether to show a dot for each point
77247 pointDot : true,
77248
77249 //Number - Radius of each point dot in pixels
77250 pointDotRadius : 4,
77251
77252 //Number - Pixel width of point dot stroke
77253 pointDotStrokeWidth : 1,
77254
77255 //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
77256 pointHitDetectionRadius : 20,
77257
77258 //Boolean - Whether to show a stroke for datasets
77259 datasetStroke : true,
77260
77261 //Number - Pixel width of dataset stroke
77262 datasetStrokeWidth : 2,
77263
77264 //Boolean - Whether to fill the dataset with a colour
77265 datasetFill : true,
77266
77267 //String - A legend template
77268 legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].strokeColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>",
77269
77270 //Boolean - Whether to horizontally center the label and point dot inside the grid
77271 offsetGridLines : false
77272
77273 };
77274
77275
77276 Chart.Type.extend({
77277 name: "Line",
77278 defaults : defaultConfig,
77279 initialize: function(data){
77280 //Declare the extension of the default point, to cater for the options passed in to the constructor
77281 this.PointClass = Chart.Point.extend({
77282 offsetGridLines : this.options.offsetGridLines,
77283 strokeWidth : this.options.pointDotStrokeWidth,
77284 radius : this.options.pointDotRadius,
77285 display: this.options.pointDot,
77286 hitDetectionRadius : this.options.pointHitDetectionRadius,
77287 ctx : this.chart.ctx,
77288 inRange : function(mouseX){
77289 return (Math.pow(mouseX-this.x, 2) < Math.pow(this.radius + this.hitDetectionRadius,2));
77290 }
77291 });
77292
77293 this.datasets = [];
77294
77295 //Set up tooltip events on the chart
77296 if (this.options.showTooltips){
77297 helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
77298 var activePoints = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
77299 this.eachPoints(function(point){
77300 point.restore(['fillColor', 'strokeColor']);
77301 });
77302 helpers.each(activePoints, function(activePoint){
77303 activePoint.fillColor = activePoint.highlightFill;
77304 activePoint.strokeColor = activePoint.highlightStroke;
77305 });
77306 this.showTooltip(activePoints);
77307 });
77308 }
77309
77310 //Iterate through each of the datasets, and build this into a property of the chart
77311 helpers.each(data.datasets,function(dataset){
77312
77313 var datasetObject = {
77314 label : dataset.label || null,
77315 fillColor : dataset.fillColor,
77316 strokeColor : dataset.strokeColor,
77317 pointColor : dataset.pointColor,
77318 pointStrokeColor : dataset.pointStrokeColor,
77319 points : []
77320 };
77321
77322 this.datasets.push(datasetObject);
77323
77324
77325 helpers.each(dataset.data,function(dataPoint,index){
77326 //Add a new point for each piece of data, passing any required data to draw.
77327 datasetObject.points.push(new this.PointClass({
77328 value : dataPoint,
77329 label : data.labels[index],
77330 datasetLabel: dataset.label,
77331 strokeColor : dataset.pointStrokeColor,
77332 fillColor : dataset.pointColor,
77333 highlightFill : dataset.pointHighlightFill || dataset.pointColor,
77334 highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
77335 }));
77336 },this);
77337
77338 this.buildScale(data.labels);
77339
77340
77341 this.eachPoints(function(point, index){
77342 helpers.extend(point, {
77343 x: this.scale.calculateX(index),
77344 y: this.scale.endPoint
77345 });
77346 point.save();
77347 }, this);
77348
77349 },this);
77350
77351
77352 this.render();
77353 },
77354 update : function(){
77355 this.scale.update();
77356 // Reset any highlight colours before updating.
77357 helpers.each(this.activeElements, function(activeElement){
77358 activeElement.restore(['fillColor', 'strokeColor']);
77359 });
77360 this.eachPoints(function(point){
77361 point.save();
77362 });
77363 this.render();
77364 },
77365 eachPoints : function(callback){
77366 helpers.each(this.datasets,function(dataset){
77367 helpers.each(dataset.points,callback,this);
77368 },this);
77369 },
77370 getPointsAtEvent : function(e){
77371 var pointsArray = [],
77372 eventPosition = helpers.getRelativePosition(e);
77373 helpers.each(this.datasets,function(dataset){
77374 helpers.each(dataset.points,function(point){
77375 if (point.inRange(eventPosition.x,eventPosition.y)) pointsArray.push(point);
77376 });
77377 },this);
77378 return pointsArray;
77379 },
77380 buildScale : function(labels){
77381 var self = this;
77382
77383 var dataTotal = function(){
77384 var values = [];
77385 self.eachPoints(function(point){
77386 values.push(point.value);
77387 });
77388
77389 return values;
77390 };
77391
77392 var scaleOptions = {
77393 templateString : this.options.scaleLabel,
77394 height : this.chart.height,
77395 width : this.chart.width,
77396 ctx : this.chart.ctx,
77397 textColor : this.options.scaleFontColor,
77398 offsetGridLines : this.options.offsetGridLines,
77399 fontSize : this.options.scaleFontSize,
77400 fontStyle : this.options.scaleFontStyle,
77401 fontFamily : this.options.scaleFontFamily,
77402 valuesCount : labels.length,
77403 beginAtZero : this.options.scaleBeginAtZero,
77404 integersOnly : this.options.scaleIntegersOnly,
77405 calculateYRange : function(currentHeight){
77406 var updatedRanges = helpers.calculateScaleRange(
77407 dataTotal(),
77408 currentHeight,
77409 this.fontSize,
77410 this.beginAtZero,
77411 this.integersOnly
77412 );
77413 helpers.extend(this, updatedRanges);
77414 },
77415 xLabels : labels,
77416 font : helpers.fontString(this.options.scaleFontSize, this.options.scaleFontStyle, this.options.scaleFontFamily),
77417 lineWidth : this.options.scaleLineWidth,
77418 lineColor : this.options.scaleLineColor,
77419 showHorizontalLines : this.options.scaleShowHorizontalLines,
77420 showVerticalLines : this.options.scaleShowVerticalLines,
77421 gridLineWidth : (this.options.scaleShowGridLines) ? this.options.scaleGridLineWidth : 0,
77422 gridLineColor : (this.options.scaleShowGridLines) ? this.options.scaleGridLineColor : "rgba(0,0,0,0)",
77423 padding: (this.options.showScale) ? 0 : this.options.pointDotRadius + this.options.pointDotStrokeWidth,
77424 showLabels : this.options.scaleShowLabels,
77425 display : this.options.showScale
77426 };
77427
77428 if (this.options.scaleOverride){
77429 helpers.extend(scaleOptions, {
77430 calculateYRange: helpers.noop,
77431 steps: this.options.scaleSteps,
77432 stepValue: this.options.scaleStepWidth,
77433 min: this.options.scaleStartValue,
77434 max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
77435 });
77436 }
77437
77438
77439 this.scale = new Chart.Scale(scaleOptions);
77440 },
77441 addData : function(valuesArray,label){
77442 //Map the values array for each of the datasets
77443
77444 helpers.each(valuesArray,function(value,datasetIndex){
77445 //Add a new point for each piece of data, passing any required data to draw.
77446 this.datasets[datasetIndex].points.push(new this.PointClass({
77447 value : value,
77448 label : label,
77449 datasetLabel: this.datasets[datasetIndex].label,
77450 x: this.scale.calculateX(this.scale.valuesCount+1),
77451 y: this.scale.endPoint,
77452 strokeColor : this.datasets[datasetIndex].pointStrokeColor,
77453 fillColor : this.datasets[datasetIndex].pointColor
77454 }));
77455 },this);
77456
77457 this.scale.addXLabel(label);
77458 //Then re-render the chart.
77459 this.update();
77460 },
77461 removeData : function(){
77462 this.scale.removeXLabel();
77463 //Then re-render the chart.
77464 helpers.each(this.datasets,function(dataset){
77465 dataset.points.shift();
77466 },this);
77467 this.update();
77468 },
77469 reflow : function(){
77470 var newScaleProps = helpers.extend({
77471 height : this.chart.height,
77472 width : this.chart.width
77473 });
77474 this.scale.update(newScaleProps);
77475 },
77476 draw : function(ease){
77477 var easingDecimal = ease || 1;
77478 this.clear();
77479
77480 var ctx = this.chart.ctx;
77481
77482 // Some helper methods for getting the next/prev points
77483 var hasValue = function(item){
77484 return item.value !== null;
77485 },
77486 nextPoint = function(point, collection, index){
77487 return helpers.findNextWhere(collection, hasValue, index) || point;
77488 },
77489 previousPoint = function(point, collection, index){
77490 return helpers.findPreviousWhere(collection, hasValue, index) || point;
77491 };
77492
77493 if (!this.scale) return;
77494 this.scale.draw(easingDecimal);
77495
77496
77497 helpers.each(this.datasets,function(dataset){
77498 var pointsWithValues = helpers.where(dataset.points, hasValue);
77499
77500 //Transition each point first so that the line and point drawing isn't out of sync
77501 //We can use this extra loop to calculate the control points of this dataset also in this loop
77502
77503 helpers.each(dataset.points, function(point, index){
77504 if (point.hasValue()){
77505 point.transition({
77506 y : this.scale.calculateY(point.value),
77507 x : this.scale.calculateX(index)
77508 }, easingDecimal);
77509 }
77510 },this);
77511
77512
77513 // Control points need to be calculated in a separate loop, because we need to know the current x/y of the point
77514 // This would cause issues when there is no animation, because the y of the next point would be 0, so beziers would be skewed
77515 if (this.options.bezierCurve){
77516 helpers.each(pointsWithValues, function(point, index){
77517 var tension = (index > 0 && index < pointsWithValues.length - 1) ? this.options.bezierCurveTension : 0;
77518 point.controlPoints = helpers.splineCurve(
77519 previousPoint(point, pointsWithValues, index),
77520 point,
77521 nextPoint(point, pointsWithValues, index),
77522 tension
77523 );
77524
77525 // Prevent the bezier going outside of the bounds of the graph
77526
77527 // Cap puter bezier handles to the upper/lower scale bounds
77528 if (point.controlPoints.outer.y > this.scale.endPoint){
77529 point.controlPoints.outer.y = this.scale.endPoint;
77530 }
77531 else if (point.controlPoints.outer.y < this.scale.startPoint){
77532 point.controlPoints.outer.y = this.scale.startPoint;
77533 }
77534
77535 // Cap inner bezier handles to the upper/lower scale bounds
77536 if (point.controlPoints.inner.y > this.scale.endPoint){
77537 point.controlPoints.inner.y = this.scale.endPoint;
77538 }
77539 else if (point.controlPoints.inner.y < this.scale.startPoint){
77540 point.controlPoints.inner.y = this.scale.startPoint;
77541 }
77542 },this);
77543 }
77544
77545
77546 //Draw the line between all the points
77547 ctx.lineWidth = this.options.datasetStrokeWidth;
77548 ctx.strokeStyle = dataset.strokeColor;
77549 ctx.beginPath();
77550
77551 helpers.each(pointsWithValues, function(point, index){
77552 if (index === 0){
77553 ctx.moveTo(point.x, point.y);
77554 }
77555 else{
77556 if(this.options.bezierCurve){
77557 var previous = previousPoint(point, pointsWithValues, index);
77558
77559 ctx.bezierCurveTo(
77560 previous.controlPoints.outer.x,
77561 previous.controlPoints.outer.y,
77562 point.controlPoints.inner.x,
77563 point.controlPoints.inner.y,
77564 point.x,
77565 point.y
77566 );
77567 }
77568 else{
77569 ctx.lineTo(point.x,point.y);
77570 }
77571 }
77572 }, this);
77573
77574 if (this.options.datasetStroke) {
77575 ctx.stroke();
77576 }
77577
77578 if (this.options.datasetFill && pointsWithValues.length > 0){
77579 //Round off the line by going to the base of the chart, back to the start, then fill.
77580 ctx.lineTo(pointsWithValues[pointsWithValues.length - 1].x, this.scale.endPoint);
77581 ctx.lineTo(pointsWithValues[0].x, this.scale.endPoint);
77582 ctx.fillStyle = dataset.fillColor;
77583 ctx.closePath();
77584 ctx.fill();
77585 }
77586
77587 //Now draw the points over the line
77588 //A little inefficient double looping, but better than the line
77589 //lagging behind the point positions
77590 helpers.each(pointsWithValues,function(point){
77591 point.draw();
77592 });
77593 },this);
77594 }
77595 });
77596
77597
77598 }).call(this);
77599
77600 (function(){
77601 "use strict";
77602
77603 var root = this,
77604 Chart = root.Chart,
77605 //Cache a local reference to Chart.helpers
77606 helpers = Chart.helpers;
77607
77608 var defaultConfig = {
77609 //Boolean - Show a backdrop to the scale label
77610 scaleShowLabelBackdrop : true,
77611
77612 //String - The colour of the label backdrop
77613 scaleBackdropColor : "rgba(255,255,255,0.75)",
77614
77615 // Boolean - Whether the scale should begin at zero
77616 scaleBeginAtZero : true,
77617
77618 //Number - The backdrop padding above & below the label in pixels
77619 scaleBackdropPaddingY : 2,
77620
77621 //Number - The backdrop padding to the side of the label in pixels
77622 scaleBackdropPaddingX : 2,
77623
77624 //Boolean - Show line for each value in the scale
77625 scaleShowLine : true,
77626
77627 //Boolean - Stroke a line around each segment in the chart
77628 segmentShowStroke : true,
77629
77630 //String - The colour of the stroke on each segment.
77631 segmentStrokeColor : "#fff",
77632
77633 //Number - The width of the stroke value in pixels
77634 segmentStrokeWidth : 2,
77635
77636 //Number - Amount of animation steps
77637 animationSteps : 100,
77638
77639 //String - Animation easing effect.
77640 animationEasing : "easeOutBounce",
77641
77642 //Boolean - Whether to animate the rotation of the chart
77643 animateRotate : true,
77644
77645 //Boolean - Whether to animate scaling the chart from the centre
77646 animateScale : false,
77647
77648 //String - A legend template
77649 legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<segments.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=segments[i].fillColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(segments[i].label){%><%=segments[i].label%><%}%></span></li><%}%></ul>"
77650 };
77651
77652
77653 Chart.Type.extend({
77654 //Passing in a name registers this chart in the Chart namespace
77655 name: "PolarArea",
77656 //Providing a defaults will also register the defaults in the chart namespace
77657 defaults : defaultConfig,
77658 //Initialize is fired when the chart is initialized - Data is passed in as a parameter
77659 //Config is automatically merged by the core of Chart.js, and is available at this.options
77660 initialize: function(data){
77661 this.segments = [];
77662 //Declare segment class as a chart instance specific class, so it can share props for this instance
77663 this.SegmentArc = Chart.Arc.extend({
77664 showStroke : this.options.segmentShowStroke,
77665 strokeWidth : this.options.segmentStrokeWidth,
77666 strokeColor : this.options.segmentStrokeColor,
77667 ctx : this.chart.ctx,
77668 innerRadius : 0,
77669 x : this.chart.width/2,
77670 y : this.chart.height/2
77671 });
77672 this.scale = new Chart.RadialScale({
77673 display: this.options.showScale,
77674 fontStyle: this.options.scaleFontStyle,
77675 fontSize: this.options.scaleFontSize,
77676 fontFamily: this.options.scaleFontFamily,
77677 fontColor: this.options.scaleFontColor,
77678 showLabels: this.options.scaleShowLabels,
77679 showLabelBackdrop: this.options.scaleShowLabelBackdrop,
77680 backdropColor: this.options.scaleBackdropColor,
77681 backdropPaddingY : this.options.scaleBackdropPaddingY,
77682 backdropPaddingX: this.options.scaleBackdropPaddingX,
77683 lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
77684 lineColor: this.options.scaleLineColor,
77685 lineArc: true,
77686 width: this.chart.width,
77687 height: this.chart.height,
77688 xCenter: this.chart.width/2,
77689 yCenter: this.chart.height/2,
77690 ctx : this.chart.ctx,
77691 templateString: this.options.scaleLabel,
77692 valuesCount: data.length
77693 });
77694
77695 this.updateScaleRange(data);
77696
77697 this.scale.update();
77698
77699 helpers.each(data,function(segment,index){
77700 this.addData(segment,index,true);
77701 },this);
77702
77703 //Set up tooltip events on the chart
77704 if (this.options.showTooltips){
77705 helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
77706 var activeSegments = (evt.type !== 'mouseout') ? this.getSegmentsAtEvent(evt) : [];
77707 helpers.each(this.segments,function(segment){
77708 segment.restore(["fillColor"]);
77709 });
77710 helpers.each(activeSegments,function(activeSegment){
77711 activeSegment.fillColor = activeSegment.highlightColor;
77712 });
77713 this.showTooltip(activeSegments);
77714 });
77715 }
77716
77717 this.render();
77718 },
77719 getSegmentsAtEvent : function(e){
77720 var segmentsArray = [];
77721
77722 var location = helpers.getRelativePosition(e);
77723
77724 helpers.each(this.segments,function(segment){
77725 if (segment.inRange(location.x,location.y)) segmentsArray.push(segment);
77726 },this);
77727 return segmentsArray;
77728 },
77729 addData : function(segment, atIndex, silent){
77730 var index = atIndex || this.segments.length;
77731
77732 this.segments.splice(index, 0, new this.SegmentArc({
77733 fillColor: segment.color,
77734 highlightColor: segment.highlight || segment.color,
77735 label: segment.label,
77736 value: segment.value,
77737 outerRadius: (this.options.animateScale) ? 0 : this.scale.calculateCenterOffset(segment.value),
77738 circumference: (this.options.animateRotate) ? 0 : this.scale.getCircumference(),
77739 startAngle: Math.PI * 1.5
77740 }));
77741 if (!silent){
77742 this.reflow();
77743 this.update();
77744 }
77745 },
77746 removeData: function(atIndex){
77747 var indexToDelete = (helpers.isNumber(atIndex)) ? atIndex : this.segments.length-1;
77748 this.segments.splice(indexToDelete, 1);
77749 this.reflow();
77750 this.update();
77751 },
77752 calculateTotal: function(data){
77753 this.total = 0;
77754 helpers.each(data,function(segment){
77755 this.total += segment.value;
77756 },this);
77757 this.scale.valuesCount = this.segments.length;
77758 },
77759 updateScaleRange: function(datapoints){
77760 var valuesArray = [];
77761 helpers.each(datapoints,function(segment){
77762 valuesArray.push(segment.value);
77763 });
77764
77765 var scaleSizes = (this.options.scaleOverride) ?
77766 {
77767 steps: this.options.scaleSteps,
77768 stepValue: this.options.scaleStepWidth,
77769 min: this.options.scaleStartValue,
77770 max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
77771 } :
77772 helpers.calculateScaleRange(
77773 valuesArray,
77774 helpers.min([this.chart.width, this.chart.height])/2,
77775 this.options.scaleFontSize,
77776 this.options.scaleBeginAtZero,
77777 this.options.scaleIntegersOnly
77778 );
77779
77780 helpers.extend(
77781 this.scale,
77782 scaleSizes,
77783 {
77784 size: helpers.min([this.chart.width, this.chart.height]),
77785 xCenter: this.chart.width/2,
77786 yCenter: this.chart.height/2
77787 }
77788 );
77789
77790 },
77791 update : function(){
77792 this.calculateTotal(this.segments);
77793
77794 helpers.each(this.segments,function(segment){
77795 segment.save();
77796 });
77797
77798 this.reflow();
77799 this.render();
77800 },
77801 reflow : function(){
77802 helpers.extend(this.SegmentArc.prototype,{
77803 x : this.chart.width/2,
77804 y : this.chart.height/2
77805 });
77806 this.updateScaleRange(this.segments);
77807 this.scale.update();
77808
77809 helpers.extend(this.scale,{
77810 xCenter: this.chart.width/2,
77811 yCenter: this.chart.height/2
77812 });
77813
77814 helpers.each(this.segments, function(segment){
77815 segment.update({
77816 outerRadius : this.scale.calculateCenterOffset(segment.value)
77817 });
77818 }, this);
77819
77820 },
77821 draw : function(ease){
77822 var easingDecimal = ease || 1;
77823 //Clear & draw the canvas
77824 this.clear();
77825 helpers.each(this.segments,function(segment, index){
77826 segment.transition({
77827 circumference : this.scale.getCircumference(),
77828 outerRadius : this.scale.calculateCenterOffset(segment.value)
77829 },easingDecimal);
77830
77831 segment.endAngle = segment.startAngle + segment.circumference;
77832
77833 // If we've removed the first segment we need to set the first one to
77834 // start at the top.
77835 if (index === 0){
77836 segment.startAngle = Math.PI * 1.5;
77837 }
77838
77839 //Check to see if it's the last segment, if not get the next and update the start angle
77840 if (index < this.segments.length - 1){
77841 this.segments[index+1].startAngle = segment.endAngle;
77842 }
77843 segment.draw();
77844 }, this);
77845 this.scale.draw();
77846 }
77847 });
77848
77849 }).call(this);
77850
77851 (function(){
77852 "use strict";
77853
77854 var root = this,
77855 Chart = root.Chart,
77856 helpers = Chart.helpers;
77857
77858
77859
77860 Chart.Type.extend({
77861 name: "Radar",
77862 defaults:{
77863 //Boolean - Whether to show lines for each scale point
77864 scaleShowLine : true,
77865
77866 //Boolean - Whether we show the angle lines out of the radar
77867 angleShowLineOut : true,
77868
77869 //Boolean - Whether to show labels on the scale
77870 scaleShowLabels : false,
77871
77872 // Boolean - Whether the scale should begin at zero
77873 scaleBeginAtZero : true,
77874
77875 //String - Colour of the angle line
77876 angleLineColor : "rgba(0,0,0,.1)",
77877
77878 //Number - Pixel width of the angle line
77879 angleLineWidth : 1,
77880
77881 //Number - Interval at which to draw angle lines ("every Nth point")
77882 angleLineInterval: 1,
77883
77884 //String - Point label font declaration
77885 pointLabelFontFamily : "'Arial'",
77886
77887 //String - Point label font weight
77888 pointLabelFontStyle : "normal",
77889
77890 //Number - Point label font size in pixels
77891 pointLabelFontSize : 10,
77892
77893 //String - Point label font colour
77894 pointLabelFontColor : "#666",
77895
77896 //Boolean - Whether to show a dot for each point
77897 pointDot : true,
77898
77899 //Number - Radius of each point dot in pixels
77900 pointDotRadius : 3,
77901
77902 //Number - Pixel width of point dot stroke
77903 pointDotStrokeWidth : 1,
77904
77905 //Number - amount extra to add to the radius to cater for hit detection outside the drawn point
77906 pointHitDetectionRadius : 20,
77907
77908 //Boolean - Whether to show a stroke for datasets
77909 datasetStroke : true,
77910
77911 //Number - Pixel width of dataset stroke
77912 datasetStrokeWidth : 2,
77913
77914 //Boolean - Whether to fill the dataset with a colour
77915 datasetFill : true,
77916
77917 //String - A legend template
77918 legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span class=\"<%=name.toLowerCase()%>-legend-icon\" style=\"background-color:<%=datasets[i].strokeColor%>\"></span><span class=\"<%=name.toLowerCase()%>-legend-text\"><%if(datasets[i].label){%><%=datasets[i].label%><%}%></span></li><%}%></ul>"
77919
77920 },
77921
77922 initialize: function(data){
77923 this.PointClass = Chart.Point.extend({
77924 strokeWidth : this.options.pointDotStrokeWidth,
77925 radius : this.options.pointDotRadius,
77926 display: this.options.pointDot,
77927 hitDetectionRadius : this.options.pointHitDetectionRadius,
77928 ctx : this.chart.ctx
77929 });
77930
77931 this.datasets = [];
77932
77933 this.buildScale(data);
77934
77935 //Set up tooltip events on the chart
77936 if (this.options.showTooltips){
77937 helpers.bindEvents(this, this.options.tooltipEvents, function(evt){
77938 var activePointsCollection = (evt.type !== 'mouseout') ? this.getPointsAtEvent(evt) : [];
77939
77940 this.eachPoints(function(point){
77941 point.restore(['fillColor', 'strokeColor']);
77942 });
77943 helpers.each(activePointsCollection, function(activePoint){
77944 activePoint.fillColor = activePoint.highlightFill;
77945 activePoint.strokeColor = activePoint.highlightStroke;
77946 });
77947
77948 this.showTooltip(activePointsCollection);
77949 });
77950 }
77951
77952 //Iterate through each of the datasets, and build this into a property of the chart
77953 helpers.each(data.datasets,function(dataset){
77954
77955 var datasetObject = {
77956 label: dataset.label || null,
77957 fillColor : dataset.fillColor,
77958 strokeColor : dataset.strokeColor,
77959 pointColor : dataset.pointColor,
77960 pointStrokeColor : dataset.pointStrokeColor,
77961 points : []
77962 };
77963
77964 this.datasets.push(datasetObject);
77965
77966 helpers.each(dataset.data,function(dataPoint,index){
77967 //Add a new point for each piece of data, passing any required data to draw.
77968 var pointPosition;
77969 if (!this.scale.animation){
77970 pointPosition = this.scale.getPointPosition(index, this.scale.calculateCenterOffset(dataPoint));
77971 }
77972 datasetObject.points.push(new this.PointClass({
77973 value : dataPoint,
77974 label : data.labels[index],
77975 datasetLabel: dataset.label,
77976 x: (this.options.animation) ? this.scale.xCenter : pointPosition.x,
77977 y: (this.options.animation) ? this.scale.yCenter : pointPosition.y,
77978 strokeColor : dataset.pointStrokeColor,
77979 fillColor : dataset.pointColor,
77980 highlightFill : dataset.pointHighlightFill || dataset.pointColor,
77981 highlightStroke : dataset.pointHighlightStroke || dataset.pointStrokeColor
77982 }));
77983 },this);
77984
77985 },this);
77986
77987 this.render();
77988 },
77989 eachPoints : function(callback){
77990 helpers.each(this.datasets,function(dataset){
77991 helpers.each(dataset.points,callback,this);
77992 },this);
77993 },
77994
77995 getPointsAtEvent : function(evt){
77996 var mousePosition = helpers.getRelativePosition(evt),
77997 fromCenter = helpers.getAngleFromPoint({
77998 x: this.scale.xCenter,
77999 y: this.scale.yCenter
78000 }, mousePosition);
78001
78002 var anglePerIndex = (Math.PI * 2) /this.scale.valuesCount,
78003 pointIndex = Math.round((fromCenter.angle - Math.PI * 1.5) / anglePerIndex),
78004 activePointsCollection = [];
78005
78006 // If we're at the top, make the pointIndex 0 to get the first of the array.
78007 if (pointIndex >= this.scale.valuesCount || pointIndex < 0){
78008 pointIndex = 0;
78009 }
78010
78011 if (fromCenter.distance <= this.scale.drawingArea){
78012 helpers.each(this.datasets, function(dataset){
78013 activePointsCollection.push(dataset.points[pointIndex]);
78014 });
78015 }
78016
78017 return activePointsCollection;
78018 },
78019
78020 buildScale : function(data){
78021 this.scale = new Chart.RadialScale({
78022 display: this.options.showScale,
78023 fontStyle: this.options.scaleFontStyle,
78024 fontSize: this.options.scaleFontSize,
78025 fontFamily: this.options.scaleFontFamily,
78026 fontColor: this.options.scaleFontColor,
78027 showLabels: this.options.scaleShowLabels,
78028 showLabelBackdrop: this.options.scaleShowLabelBackdrop,
78029 backdropColor: this.options.scaleBackdropColor,
78030 backgroundColors: this.options.scaleBackgroundColors,
78031 backdropPaddingY : this.options.scaleBackdropPaddingY,
78032 backdropPaddingX: this.options.scaleBackdropPaddingX,
78033 lineWidth: (this.options.scaleShowLine) ? this.options.scaleLineWidth : 0,
78034 lineColor: this.options.scaleLineColor,
78035 angleLineColor : this.options.angleLineColor,
78036 angleLineWidth : (this.options.angleShowLineOut) ? this.options.angleLineWidth : 0,
78037 angleLineInterval: (this.options.angleLineInterval) ? this.options.angleLineInterval : 1,
78038 // Point labels at the edge of each line
78039 pointLabelFontColor : this.options.pointLabelFontColor,
78040 pointLabelFontSize : this.options.pointLabelFontSize,
78041 pointLabelFontFamily : this.options.pointLabelFontFamily,
78042 pointLabelFontStyle : this.options.pointLabelFontStyle,
78043 height : this.chart.height,
78044 width: this.chart.width,
78045 xCenter: this.chart.width/2,
78046 yCenter: this.chart.height/2,
78047 ctx : this.chart.ctx,
78048 templateString: this.options.scaleLabel,
78049 labels: data.labels,
78050 valuesCount: data.datasets[0].data.length
78051 });
78052
78053 this.scale.setScaleSize();
78054 this.updateScaleRange(data.datasets);
78055 this.scale.buildYLabels();
78056 },
78057 updateScaleRange: function(datasets){
78058 var valuesArray = (function(){
78059 var totalDataArray = [];
78060 helpers.each(datasets,function(dataset){
78061 if (dataset.data){
78062 totalDataArray = totalDataArray.concat(dataset.data);
78063 }
78064 else {
78065 helpers.each(dataset.points, function(point){
78066 totalDataArray.push(point.value);
78067 });
78068 }
78069 });
78070 return totalDataArray;
78071 })();
78072
78073
78074 var scaleSizes = (this.options.scaleOverride) ?
78075 {
78076 steps: this.options.scaleSteps,
78077 stepValue: this.options.scaleStepWidth,
78078 min: this.options.scaleStartValue,
78079 max: this.options.scaleStartValue + (this.options.scaleSteps * this.options.scaleStepWidth)
78080 } :
78081 helpers.calculateScaleRange(
78082 valuesArray,
78083 helpers.min([this.chart.width, this.chart.height])/2,
78084 this.options.scaleFontSize,
78085 this.options.scaleBeginAtZero,
78086 this.options.scaleIntegersOnly
78087 );
78088
78089 helpers.extend(
78090 this.scale,
78091 scaleSizes
78092 );
78093
78094 },
78095 addData : function(valuesArray,label){
78096 //Map the values array for each of the datasets
78097 this.scale.valuesCount++;
78098 helpers.each(valuesArray,function(value,datasetIndex){
78099 var pointPosition = this.scale.getPointPosition(this.scale.valuesCount, this.scale.calculateCenterOffset(value));
78100 this.datasets[datasetIndex].points.push(new this.PointClass({
78101 value : value,
78102 label : label,
78103 datasetLabel: this.datasets[datasetIndex].label,
78104 x: pointPosition.x,
78105 y: pointPosition.y,
78106 strokeColor : this.datasets[datasetIndex].pointStrokeColor,
78107 fillColor : this.datasets[datasetIndex].pointColor
78108 }));
78109 },this);
78110
78111 this.scale.labels.push(label);
78112
78113 this.reflow();
78114
78115 this.update();
78116 },
78117 removeData : function(){
78118 this.scale.valuesCount--;
78119 this.scale.labels.shift();
78120 helpers.each(this.datasets,function(dataset){
78121 dataset.points.shift();
78122 },this);
78123 this.reflow();
78124 this.update();
78125 },
78126 update : function(){
78127 this.eachPoints(function(point){
78128 point.save();
78129 });
78130 this.reflow();
78131 this.render();
78132 },
78133 reflow: function(){
78134 helpers.extend(this.scale, {
78135 width : this.chart.width,
78136 height: this.chart.height,
78137 size : helpers.min([this.chart.width, this.chart.height]),
78138 xCenter: this.chart.width/2,
78139 yCenter: this.chart.height/2
78140 });
78141 this.updateScaleRange(this.datasets);
78142 this.scale.setScaleSize();
78143 this.scale.buildYLabels();
78144 },
78145 draw : function(ease){
78146 var easeDecimal = ease || 1,
78147 ctx = this.chart.ctx;
78148 this.clear();
78149 this.scale.draw();
78150
78151 helpers.each(this.datasets,function(dataset){
78152
78153 //Transition each point first so that the line and point drawing isn't out of sync
78154 helpers.each(dataset.points,function(point,index){
78155 if (point.hasValue()){
78156 point.transition(this.scale.getPointPosition(index, this.scale.calculateCenterOffset(point.value)), easeDecimal);
78157 }
78158 },this);
78159
78160
78161
78162 //Draw the line between all the points
78163 ctx.lineWidth = this.options.datasetStrokeWidth;
78164 ctx.strokeStyle = dataset.strokeColor;
78165 ctx.beginPath();
78166 helpers.each(dataset.points,function(point,index){
78167 if (index === 0){
78168 ctx.moveTo(point.x,point.y);
78169 }
78170 else{
78171 ctx.lineTo(point.x,point.y);
78172 }
78173 },this);
78174 ctx.closePath();
78175 ctx.stroke();
78176
78177 ctx.fillStyle = dataset.fillColor;
78178 if(this.options.datasetFill){
78179 ctx.fill();
78180 }
78181 //Now draw the points over the line
78182 //A little inefficient double looping, but better than the line
78183 //lagging behind the point positions
78184 helpers.each(dataset.points,function(point){
78185 if (point.hasValue()){
78186 point.draw();
78187 }
78188 });
78189
78190 },this);
78191
78192 }
78193
78194 });
78195
78196
78197
78198
78199
78200 }).call(this);
78201
78202
78203/***/ },
78204/* 734 */
78205/***/ function(module, exports) {
78206
78207 /* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {module.exports = __webpack_amd_options__;
78208
78209 /* WEBPACK VAR INJECTION */}.call(exports, {}))
78210
78211/***/ },
78212/* 735 */
78213/***/ function(module, exports, __webpack_require__) {
78214
78215 var vars = __webpack_require__(732);
78216
78217 module.exports = vars.createClass('Doughnut', ['getSegmentsAtEvent']);
78218
78219
78220/***/ },
78221/* 736 */
78222/***/ function(module, exports, __webpack_require__) {
78223
78224 var vars = __webpack_require__(732);
78225
78226 module.exports = vars.createClass('Line', ['getPointsAtEvent']);
78227
78228
78229/***/ },
78230/* 737 */
78231/***/ function(module, exports, __webpack_require__) {
78232
78233 var vars = __webpack_require__(732);
78234
78235 module.exports = vars.createClass('Pie', ['getSegmentsAtEvent']);
78236
78237
78238/***/ },
78239/* 738 */
78240/***/ function(module, exports, __webpack_require__) {
78241
78242 var vars = __webpack_require__(732);
78243
78244 module.exports = vars.createClass('PolarArea', ['getSegmentsAtEvent']);
78245
78246
78247/***/ },
78248/* 739 */
78249/***/ function(module, exports, __webpack_require__) {
78250
78251 var vars = __webpack_require__(732);
78252
78253 module.exports = vars.createClass('Radar', ['getPointsAtEvent']);
78254
78255
78256/***/ },
78257/* 740 */
78258/***/ function(module, exports, __webpack_require__) {
78259
78260 'use strict';
78261
78262 Object.defineProperty(exports, "__esModule", {
78263 value: true
78264 });
78265
78266 var _reactRedux = __webpack_require__(629);
78267
78268 var _CommitsDoughnutChart = __webpack_require__(741);
78269
78270 var _CommitsDoughnutChart2 = _interopRequireDefault(_CommitsDoughnutChart);
78271
78272 var _utils = __webpack_require__(658);
78273
78274 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78275
78276 // Self defined:
78277 var mapStateToProps = function mapStateToProps(state, ownProps) {
78278 var ownerId = ownProps.ownerId;
78279 var projectName = ownProps.projectName;
78280
78281 var projectId = ownerId + '+' + projectName;
78282
78283 // Could be fetching
78284 var commits = state.projects.commits[projectId] ? state.projects.commits[projectId].commits || [] : [];
78285 var data = (0, _utils.processProjectCommitsDoughnut)(commits.slice());
78286
78287 return {
78288 data: data
78289 };
78290 }; /**
78291 * Container for CollaboratorsCommitBarChart
78292 * @author patrickkerrypei / https://github.com/patrickkerrypei
78293 */
78294
78295 // Libraries:
78296 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_CommitsDoughnutChart2.default);
78297
78298/***/ },
78299/* 741 */
78300/***/ function(module, exports, __webpack_require__) {
78301
78302 'use strict';
78303
78304 Object.defineProperty(exports, "__esModule", {
78305 value: true
78306 });
78307
78308 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; }; }();
78309
78310 var _react = __webpack_require__(89);
78311
78312 var _react2 = _interopRequireDefault(_react);
78313
78314 var _reactChartjs = __webpack_require__(730);
78315
78316 var _projects = __webpack_require__(667);
78317
78318 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78319
78320 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78321
78322 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; }
78323
78324 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; } /**
78325 * DoughnutChart widget for Commits
78326 * @author patrickkerrypei / https://github.com/patrickkerrypei
78327 */
78328
78329 // Libraries
78330
78331 // Self-defined
78332
78333
78334 var CommitsDoughnutChart = function (_Component) {
78335 _inherits(CommitsDoughnutChart, _Component);
78336
78337 function CommitsDoughnutChart(props) {
78338 _classCallCheck(this, CommitsDoughnutChart);
78339
78340 var _this = _possibleConstructorReturn(this, (CommitsDoughnutChart.__proto__ || Object.getPrototypeOf(CommitsDoughnutChart)).call(this, props));
78341
78342 _this.state = {
78343 numCommits: 100
78344 };
78345 return _this;
78346 }
78347
78348 _createClass(CommitsDoughnutChart, [{
78349 key: 'componentDidMount',
78350 value: function componentDidMount() {
78351 var dispatch = this.props.dispatch;
78352 var _props = this.props;
78353 var ownerId = _props.ownerId;
78354 var projectName = _props.projectName;
78355
78356
78357 dispatch((0, _projects.fetchCommitsIfNeeded)(ownerId, projectName, this.state.numCommits));
78358 dispatch((0, _projects.fetchProjectsIfNeeded)());
78359 }
78360 }, {
78361 key: 'shouldComponentUpdate',
78362 value: function shouldComponentUpdate(nextProps /* , nextState */) {
78363 return this.props.data !== nextProps.data;
78364 }
78365 }, {
78366 key: 'render',
78367 value: function render() {
78368 var _props2 = this.props;
78369 var data = _props2.data;
78370 var options = _props2.options;
78371 var _props3 = this.props;
78372 var height = _props3.height;
78373 var width = _props3.width;
78374
78375
78376 return _react2.default.createElement(_reactChartjs.Doughnut, { data: data,
78377 height: height,
78378 width: width,
78379 options: options || {},
78380 redraw: true });
78381 }
78382 }]);
78383
78384 return CommitsDoughnutChart;
78385 }(_react.Component);
78386
78387 exports.default = CommitsDoughnutChart;
78388
78389/***/ },
78390/* 742 */
78391/***/ function(module, exports, __webpack_require__) {
78392
78393 'use strict';
78394
78395 Object.defineProperty(exports, "__esModule", {
78396 value: true
78397 });
78398
78399 var _reactRedux = __webpack_require__(629);
78400
78401 var _ProjectCommitsLineChart = __webpack_require__(743);
78402
78403 var _ProjectCommitsLineChart2 = _interopRequireDefault(_ProjectCommitsLineChart);
78404
78405 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78406
78407 /**
78408 * Container for CollaboratorsCommitBarChart
78409 * @author patrickkerrypei / https://github.com/patrickkerrypei
78410 */
78411
78412 // Libraries:
78413 var mapStateToProps = function mapStateToProps(state, ownProps) {
78414 var ownerId = ownProps.ownerId;
78415 var projectName = ownProps.projectName;
78416
78417 var projectId = ownerId + '+' + projectName;
78418
78419 // Could be fetching
78420 var commits = state.projects.commits[projectId] ? state.projects.commits[projectId].commits || [] : [];
78421
78422 return {
78423 commits: commits
78424 };
78425 };
78426 // Self defined:
78427 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectCommitsLineChart2.default);
78428
78429/***/ },
78430/* 743 */
78431/***/ function(module, exports, __webpack_require__) {
78432
78433 'use strict';
78434
78435 Object.defineProperty(exports, "__esModule", {
78436 value: true
78437 });
78438
78439 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; }; }();
78440
78441 var _react = __webpack_require__(89);
78442
78443 var _react2 = _interopRequireDefault(_react);
78444
78445 var _reactChartjs = __webpack_require__(730);
78446
78447 var _projects = __webpack_require__(667);
78448
78449 var _utils = __webpack_require__(658);
78450
78451 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78452
78453 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78454
78455 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; }
78456
78457 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; } /**
78458 * LineChart widget for Commits
78459 * @author patrickkerrypei / https://github.com/patrickkerrypei
78460 */
78461
78462 // Libraries
78463
78464 // Self-defined
78465
78466
78467 var ProjectCommitsLineChart = function (_Component) {
78468 _inherits(ProjectCommitsLineChart, _Component);
78469
78470 function ProjectCommitsLineChart(props) {
78471 _classCallCheck(this, ProjectCommitsLineChart);
78472
78473 var _this = _possibleConstructorReturn(this, (ProjectCommitsLineChart.__proto__ || Object.getPrototypeOf(ProjectCommitsLineChart)).call(this, props));
78474
78475 _this.state = {
78476 data: (0, _utils.getDefaultDataset)(7),
78477 numCommits: 100
78478 };
78479 return _this;
78480 }
78481
78482 _createClass(ProjectCommitsLineChart, [{
78483 key: 'componentDidMount',
78484 value: function componentDidMount() {
78485 var dispatch = this.props.dispatch;
78486 var _props = this.props;
78487 var ownerId = _props.ownerId;
78488 var projectName = _props.projectName;
78489
78490
78491 dispatch((0, _projects.fetchCommitsIfNeeded)(ownerId, projectName, this.state.numCommits));
78492 }
78493 }, {
78494 key: 'componentWillReceiveProps',
78495 value: function componentWillReceiveProps(nextProps) {
78496 var commits = nextProps.commits;
78497
78498 this.setState({
78499 data: (0, _utils.processProjectCommitsLine)(commits)
78500 });
78501 }
78502 }, {
78503 key: 'componentWillMount',
78504 value: function componentWillMount() {
78505 var commits = this.props.commits;
78506
78507 this.setState({
78508 data: (0, _utils.processProjectCommitsLine)(commits)
78509 });
78510 }
78511 }, {
78512 key: 'shouldComponentUpdate',
78513 value: function shouldComponentUpdate(nextProps /* , nextState */) {
78514 return this.props.commits !== nextProps.commits;
78515 }
78516 }, {
78517 key: 'render',
78518 value: function render() {
78519 var data = this.state.data;
78520
78521
78522 return _react2.default.createElement(_reactChartjs.Line, { data: data,
78523 height: 300,
78524 width: 500,
78525 options: {},
78526 redraw: true });
78527 }
78528 }]);
78529
78530 return ProjectCommitsLineChart;
78531 }(_react.Component);
78532
78533 exports.default = ProjectCommitsLineChart;
78534
78535
78536 ProjectCommitsLineChart.propTypes = {
78537 commits: _react.PropTypes.array.isRequired
78538 };
78539
78540 ProjectCommitsLineChart.defaultProps = {
78541 unavailable: "Unavailable"
78542 };
78543
78544/***/ },
78545/* 744 */
78546/***/ function(module, exports, __webpack_require__) {
78547
78548 'use strict';
78549
78550 Object.defineProperty(exports, "__esModule", {
78551 value: true
78552 });
78553
78554 var _reactRedux = __webpack_require__(629);
78555
78556 var _ProjectTransferWidget = __webpack_require__(745);
78557
78558 var _ProjectTransferWidget2 = _interopRequireDefault(_ProjectTransferWidget);
78559
78560 var _restUtils = __webpack_require__(709);
78561
78562 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78563
78564 // Self defined
78565 var mapStateToProps = function mapStateToProps(state, ownProps) {
78566 var basePath = state.basePath;
78567 var organizations = state.organizations.organizations;
78568
78569
78570 var orgsCanTransferTo = (0, _restUtils.getOrgsCanTransferToTo)(organizations, ownProps.userId, ownProps.ownerId);
78571
78572 return {
78573 basePath: basePath,
78574 orgsCanTransferTo: orgsCanTransferTo
78575 };
78576 }; /**
78577 * Transfer project widget
78578 * @author patrickkerrypei / https://github.com/patrickkerrypei
78579 */
78580
78581 // Libraries
78582 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectTransferWidget2.default);
78583
78584/***/ },
78585/* 745 */
78586/***/ function(module, exports, __webpack_require__) {
78587
78588 'use strict';
78589
78590 Object.defineProperty(exports, "__esModule", {
78591 value: true
78592 });
78593
78594 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; }; }();
78595
78596 var _react = __webpack_require__(89);
78597
78598 var _react2 = _interopRequireDefault(_react);
78599
78600 var _reactRouter = __webpack_require__(260);
78601
78602 var _AuthorizationWidget = __webpack_require__(688);
78603
78604 var _AuthorizationWidget2 = _interopRequireDefault(_AuthorizationWidget);
78605
78606 var _organizations = __webpack_require__(669);
78607
78608 var _projects = __webpack_require__(667);
78609
78610 var _users = __webpack_require__(665);
78611
78612 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78613
78614 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78615
78616 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; }
78617
78618 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; } /**
78619 * Transfer project widget
78620 * @author patrickkerrypei / https://github.com/patrickkerrypei
78621 */
78622
78623 // Libraries
78624
78625 // Self defined
78626
78627
78628 var ProjectTransferWidget = function (_Component) {
78629 _inherits(ProjectTransferWidget, _Component);
78630
78631 function ProjectTransferWidget(props) {
78632 _classCallCheck(this, ProjectTransferWidget);
78633
78634 var _this = _possibleConstructorReturn(this, (ProjectTransferWidget.__proto__ || Object.getPrototypeOf(ProjectTransferWidget)).call(this, props));
78635
78636 _this.state = {
78637 multiselectOptions: [],
78638 valuesInMultiselect: ''
78639 };
78640 // Event Handlers
78641 _this.handleMultiselectChange = _this.handleMultiselectChange.bind(_this);
78642 _this.handleTransfer = _this.handleTransfer.bind(_this);
78643 return _this;
78644 }
78645
78646 _createClass(ProjectTransferWidget, [{
78647 key: 'componentDidMount',
78648 value: function componentDidMount() {
78649 var _props = this.props;
78650 var dispatch = _props.dispatch;
78651 var orgsCanTransferTo = _props.orgsCanTransferTo;
78652
78653
78654 dispatch((0, _organizations.fetchOrganizationsIfNeeded)());
78655
78656 var multiselectOptions = orgsCanTransferTo.sort().map(function (orgId) {
78657 return {
78658 label: orgId,
78659 value: orgId
78660 };
78661 });
78662
78663 // FIXME: eslint warning
78664 this.setState({
78665 multiselectOptions: multiselectOptions
78666 });
78667 }
78668 }, {
78669 key: 'componentWillReceiveProps',
78670 value: function componentWillReceiveProps(nextProps) {
78671 var orgsCanTransferTo = nextProps.orgsCanTransferTo;
78672
78673
78674 var multiselectOptions = orgsCanTransferTo.sort().map(function (orgId) {
78675 return {
78676 label: orgId,
78677 value: orgId
78678 };
78679 });
78680 this.setState({
78681 multiselectOptions: multiselectOptions
78682 });
78683 }
78684 }, {
78685 key: 'handleMultiselectChange',
78686 value: function handleMultiselectChange(value) {
78687 this.setState({
78688 valuesInMultiselect: value || ''
78689 });
78690 }
78691 }, {
78692 key: 'handleTransfer',
78693 value: function handleTransfer(event) {
78694 var _props2 = this.props;
78695 var basePath = _props2.basePath;
78696 var dispatch = _props2.dispatch;
78697 var ownerId = _props2.ownerId;
78698 var projectName = _props2.projectName;
78699 var restClient = _props2.restClient;
78700 // Release focus
78701
78702 event.target.blur();
78703
78704 if (this.state.valuesInMultiselect !== '') {
78705 var newOwnerId = this.state.valuesInMultiselect;
78706
78707 restClient.projects.transferProject(ownerId, projectName, newOwnerId).then(function () {
78708 dispatch((0, _organizations.fetchOrganizations)());
78709 dispatch((0, _projects.fetchProjects)());
78710 dispatch((0, _users.fetchUsers)());
78711
78712 // Redirect to projects page
78713 _reactRouter.browserHistory.push(basePath + 'projects');
78714 }).catch(function (err) {
78715 console.error(err); // eslint-disable-line no-console
78716 });
78717 }
78718 // Reset fields after submitting
78719 this.setState({
78720 valuesInMultiselect: ''
78721 });
78722 }
78723 }, {
78724 key: 'render',
78725 value: function render() {
78726 var canTransfer = this.props.canTransfer;
78727
78728 var authorizationWidgetData = {
78729 submitButtons: [{
78730 disabled: this.state.valuesInMultiselect === '',
78731 onChange: this.handleTransfer,
78732 text: 'Transfer',
78733 state: "primary"
78734 }]
78735 };
78736
78737 return canTransfer ? _react2.default.createElement(_AuthorizationWidget2.default, { boxSize: '12',
78738 disableLast: true,
78739 handleMultiselectChange: this.handleMultiselectChange,
78740 label: "Transfer Project",
78741 multi: false,
78742 multiselectOptions: this.state.multiselectOptions,
78743 noneSelected: this.state.valuesInMultiselect === '',
78744 placeholder: 'Select an organization (type to search)',
78745 submitButtons: authorizationWidgetData.submitButtons,
78746 valuesInMultiselect: this.state.valuesInMultiselect }) : null;
78747 }
78748 }]);
78749
78750 return ProjectTransferWidget;
78751 }(_react.Component);
78752
78753 exports.default = ProjectTransferWidget;
78754
78755
78756 ProjectTransferWidget.propTypes = {
78757 orgsCanTransferTo: _react.PropTypes.array.isRequired
78758 };
78759
78760/***/ },
78761/* 746 */
78762/***/ function(module, exports, __webpack_require__) {
78763
78764 'use strict';
78765
78766 Object.defineProperty(exports, "__esModule", {
78767 value: true
78768 });
78769
78770 var _reactRedux = __webpack_require__(629);
78771
78772 var _ProjectsPage = __webpack_require__(747);
78773
78774 var _ProjectsPage2 = _interopRequireDefault(_ProjectsPage);
78775
78776 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78777
78778 /**
78779 * ProjectsPage page container
78780 * @author patrickkerrypei / https://github.com/patrickkerrypei
78781 */
78782
78783 // Libraries
78784 var mapStateToProps = function mapStateToProps(state) {
78785 var basePath = state.basePath;
78786
78787
78788 return {
78789 basePath: basePath
78790 };
78791 };
78792 // Self-defined
78793 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectsPage2.default);
78794
78795/***/ },
78796/* 747 */
78797/***/ function(module, exports, __webpack_require__) {
78798
78799 'use strict';
78800
78801 Object.defineProperty(exports, "__esModule", {
78802 value: true
78803 });
78804
78805 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; }; }();
78806
78807 var _react = __webpack_require__(89);
78808
78809 var _react2 = _interopRequireDefault(_react);
78810
78811 var _ProjectsTable = __webpack_require__(748);
78812
78813 var _ProjectsTable2 = _interopRequireDefault(_ProjectsTable);
78814
78815 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78816
78817 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78818
78819 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; }
78820
78821 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; } /**
78822 * Projects page
78823 * @author patrickkerrypei / https://github.com/patrickkerrypei
78824 */
78825
78826 // Libraries
78827
78828 // Self defined
78829
78830
78831 var ProjectsPage = function (_Component) {
78832 _inherits(ProjectsPage, _Component);
78833
78834 function ProjectsPage() {
78835 _classCallCheck(this, ProjectsPage);
78836
78837 return _possibleConstructorReturn(this, (ProjectsPage.__proto__ || Object.getPrototypeOf(ProjectsPage)).apply(this, arguments));
78838 }
78839
78840 _createClass(ProjectsPage, [{
78841 key: 'render',
78842 value: function render() {
78843 var pathname = this.props.pathname;
78844
78845
78846 return _react2.default.createElement(
78847 'section',
78848 { className: 'content' },
78849 _react2.default.createElement(
78850 'div',
78851 { className: 'box box-primary' },
78852 _react2.default.createElement(_ProjectsTable2.default, { pathname: pathname })
78853 )
78854 );
78855 }
78856 }]);
78857
78858 return ProjectsPage;
78859 }(_react.Component);
78860
78861 exports.default = ProjectsPage;
78862
78863/***/ },
78864/* 748 */
78865/***/ function(module, exports, __webpack_require__) {
78866
78867 'use strict';
78868
78869 Object.defineProperty(exports, "__esModule", {
78870 value: true
78871 });
78872
78873 var _reactRedux = __webpack_require__(629);
78874
78875 var _ProjectsTable = __webpack_require__(749);
78876
78877 var _ProjectsTable2 = _interopRequireDefault(_ProjectsTable);
78878
78879 var _utils = __webpack_require__(658);
78880
78881 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78882
78883 // Self-defined
78884 var mapStateToProps = function mapStateToProps(state, ownProps) {
78885 var projects = state.projects.projects;
78886 var _state$tables$project = state.tables.projects;
78887 var sortCategory = _state$tables$project.sortCategory;
78888 var sortedForward = _state$tables$project.sortedForward;
78889
78890
78891 var ownerId = ownProps.pathname.split('/').slice(-1)[0];
78892
78893 var filteredProjects = projects.slice();
78894 if (ownerId !== 'projects') {
78895 filteredProjects = filteredProjects.filter(function (project) {
78896 return project.owner === ownerId;
78897 });
78898 }
78899
78900 return {
78901 projects: (0, _utils.sortWithChecks)(filteredProjects, sortCategory, sortedForward),
78902 sortCategory: sortCategory,
78903 sortedForward: sortedForward
78904 };
78905 }; /* global window */
78906
78907 /**
78908 * Container widget for the projects data table
78909 * @author patrickkerrypei / https://github.com/patrickkerrypei
78910 */
78911
78912 // Libraries
78913 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectsTable2.default);
78914
78915/***/ },
78916/* 749 */
78917/***/ function(module, exports, __webpack_require__) {
78918
78919 'use strict';
78920
78921 Object.defineProperty(exports, "__esModule", {
78922 value: true
78923 });
78924
78925 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; }; }();
78926
78927 var _react = __webpack_require__(89);
78928
78929 var _react2 = _interopRequireDefault(_react);
78930
78931 var _DataTable = __webpack_require__(703);
78932
78933 var _DataTable2 = _interopRequireDefault(_DataTable);
78934
78935 var _ProjectsDataTableEntry = __webpack_require__(750);
78936
78937 var _ProjectsDataTableEntry2 = _interopRequireDefault(_ProjectsDataTableEntry);
78938
78939 var _projects = __webpack_require__(667);
78940
78941 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78942
78943 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
78944
78945 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; }
78946
78947 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; } /**
78948 * Container widget for the projects data table
78949 * @author patrickkerrypei / https://github.com/patrickkerrypei
78950 */
78951
78952 // Libraries
78953
78954 // Self-defined
78955
78956
78957 var ProjectsTable = function (_Component) {
78958 _inherits(ProjectsTable, _Component);
78959
78960 function ProjectsTable(props) {
78961 _classCallCheck(this, ProjectsTable);
78962
78963 return _possibleConstructorReturn(this, (ProjectsTable.__proto__ || Object.getPrototypeOf(ProjectsTable)).call(this, props));
78964 }
78965
78966 _createClass(ProjectsTable, [{
78967 key: 'componentDidMount',
78968 value: function componentDidMount() {
78969 var dispatch = this.props.dispatch;
78970
78971
78972 dispatch((0, _projects.fetchProjectsIfNeeded)());
78973 }
78974 }, {
78975 key: 'render',
78976 value: function render() {
78977 var _props = this.props;
78978 var pathname = _props.pathname;
78979 var projects = _props.projects;
78980
78981 var sortCategory = this.props.sortCategory instanceof Array ? this.props.sortCategory[1] : this.props.sortCategory;
78982
78983 var sortIndex = 0;
78984
78985 switch (sortCategory) {
78986 case 'owner':
78987 sortIndex = 1;
78988 break;
78989 case 'name':
78990 sortIndex = 2;
78991 break;
78992 case 'viewedAt':
78993 sortIndex = 3;
78994 break;
78995 case 'modifiedAt':
78996 sortIndex = 4;
78997 break;
78998 case 'createdAt':
78999 sortIndex = 5;
79000 break;
79001 default:
79002 sortIndex = 0;
79003 }
79004
79005 var categories = [{ id: 1, name: 'Owner', style: { width: "13%" }, isSorted: sortIndex === 1 }, { id: 2, name: 'Project Name', style: { width: "50%" }, isSorted: sortIndex === 2 }, { id: 3, name: 'Last Viewed', className: "hidden-xs", style: { width: "13%" }, isSorted: sortIndex === 3 }, { id: 4, name: 'Last Changed', className: "hidden-xs", style: { width: "13%" }, isSorted: sortIndex === 4 }, { id: 5, name: 'Created At', className: "hidden-xs", style: { width: "13%" }, isSorted: sortIndex === 5 }];
79006
79007 // Will be 'projects' if in the projects page, if in projectsByOwner then will be ownerId
79008 var ownerId = pathname.split('/').pop();
79009
79010 return _react2.default.createElement(
79011 'div',
79012 null,
79013 _react2.default.createElement(
79014 'div',
79015 { className: 'box-header', style: { paddingBottom: 0 } },
79016 _react2.default.createElement(
79017 'h3',
79018 { className: 'box-title', style: { fontSize: 28 } },
79019 _react2.default.createElement('i', { className: 'fa fa-cubes' }),
79020 ' ',
79021 ' Projects ' + (ownerId === 'projects' ? '' : 'by ' + ownerId)
79022 )
79023 ),
79024 _react2.default.createElement(
79025 _DataTable2.default,
79026 { categories: categories,
79027 content: 'Projects',
79028 entries: projects,
79029 orderEntries: this.handleOrderEntries,
79030 reducerTableName: 'projects',
79031 sortable: true },
79032 _react2.default.createElement(_ProjectsDataTableEntry2.default, null)
79033 )
79034 );
79035 }
79036 }]);
79037
79038 return ProjectsTable;
79039 }(_react.Component);
79040
79041 exports.default = ProjectsTable;
79042
79043
79044 ProjectsTable.propTypes = {
79045 projects: _react.PropTypes.array.isRequired,
79046 sortCategory: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]).isRequired,
79047 sortedForward: _react.PropTypes.bool.isRequired
79048 };
79049
79050/***/ },
79051/* 750 */
79052/***/ function(module, exports, __webpack_require__) {
79053
79054 'use strict';
79055
79056 Object.defineProperty(exports, "__esModule", {
79057 value: true
79058 });
79059
79060 var _reactRedux = __webpack_require__(629);
79061
79062 var _ProjectsDataTableEntry = __webpack_require__(751);
79063
79064 var _ProjectsDataTableEntry2 = _interopRequireDefault(_ProjectsDataTableEntry);
79065
79066 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79067
79068 /**
79069 * ProjectsDataTableEntry container
79070 * @author patrickkerrypei / https://github.com/patrickkerrypei
79071 */
79072
79073 // Libraries
79074 var mapStateToProps = function mapStateToProps(state) {
79075 var basePath = state.basePath;
79076
79077
79078 return {
79079 basePath: basePath
79080 };
79081 };
79082 // Self-defined
79083 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_ProjectsDataTableEntry2.default);
79084
79085/***/ },
79086/* 751 */
79087/***/ function(module, exports, __webpack_require__) {
79088
79089 /* WEBPACK VAR INJECTION */(function($) {'use strict';
79090
79091 Object.defineProperty(exports, "__esModule", {
79092 value: true
79093 });
79094
79095 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; }; }();
79096
79097 var _react = __webpack_require__(89);
79098
79099 var _react2 = _interopRequireDefault(_react);
79100
79101 var _reactBootstrap = __webpack_require__(334);
79102
79103 var _reactRouter = __webpack_require__(260);
79104
79105 var _PrettyLink = __webpack_require__(752);
79106
79107 var _PrettyLink2 = _interopRequireDefault(_PrettyLink);
79108
79109 var _user = __webpack_require__(661);
79110
79111 var _utils = __webpack_require__(658);
79112
79113 var _constants = __webpack_require__(660);
79114
79115 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79116
79117 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79118
79119 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; }
79120
79121 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; } /* global $, window */
79122
79123 /**
79124 * Custom entries for the projects data table
79125 * @author patrickkerrypei / https://github.com/patrickkerrypei
79126 */
79127
79128 // Libraries
79129
79130
79131 // Self-defined
79132
79133
79134 var ProjectsDataTableEntry = function (_Component) {
79135 _inherits(ProjectsDataTableEntry, _Component);
79136
79137 function ProjectsDataTableEntry() {
79138 _classCallCheck(this, ProjectsDataTableEntry);
79139
79140 return _possibleConstructorReturn(this, (ProjectsDataTableEntry.__proto__ || Object.getPrototypeOf(ProjectsDataTableEntry)).apply(this, arguments));
79141 }
79142
79143 _createClass(ProjectsDataTableEntry, [{
79144 key: 'componentDidMount',
79145 value: function componentDidMount() {
79146 var dispatch = this.props.dispatch;
79147
79148
79149 dispatch((0, _user.fetchUserIfNeeded)());
79150 }
79151 }, {
79152 key: 'render',
79153 value: function render() {
79154 var _props = this.props;
79155 var basePath = _props.basePath;
79156 var info = _props.info;
79157 var name = _props.name;
79158 var owner = _props.owner;
79159 var unavailable = _props.unavailable;
79160 var searchText = _props.searchText;
79161 var buildLink = basePath + 'projects/' + owner + '/' + name;
79162 var columnStyle = [{ width: "13%" }, { width: "50%" }];
79163
79164 return _react2.default.createElement(
79165 'tr',
79166 { role: 'row', className: 'odd' },
79167 _react2.default.createElement(
79168 'td',
79169 { style: $(window).width() > 768 ? columnStyle[0] : columnStyle[1] },
79170 _react2.default.createElement(
79171 _reactRouter.Link,
79172 { to: basePath + 'projects/' + owner },
79173 owner
79174 )
79175 ),
79176 _react2.default.createElement(
79177 'td',
79178 { className: 'sorting_1', style: columnStyle[1] },
79179 _react2.default.createElement(
79180 _PrettyLink2.default,
79181 { to: buildLink, searchText: searchText },
79182 name
79183 )
79184 ),
79185 _react2.default.createElement(
79186 'td',
79187 { className: 'hidden-xs', style: columnStyle[0] },
79188 _react2.default.createElement(
79189 _reactBootstrap.OverlayTrigger,
79190 { trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
79191 _reactBootstrap.Popover,
79192 { title: 'Last Viewed At:', id: 'Viewed At' },
79193 info.viewedAt ? new Date(info.viewedAt).toString() : unavailable,
79194 _react2.default.createElement('br', null),
79195 _react2.default.createElement('br', null),
79196 _react2.default.createElement(
79197 'i',
79198 null,
79199 'Viewed by: ' + (info.viewer ? info.viewer : unavailable)
79200 )
79201 ) },
79202 _react2.default.createElement(
79203 'i',
79204 null,
79205 info.viewedAt ? (0, _utils.timeAgo)(info.viewedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE)
79206 )
79207 )
79208 ),
79209 _react2.default.createElement(
79210 'td',
79211 { className: 'hidden-xs', style: columnStyle[0] },
79212 _react2.default.createElement(
79213 _reactBootstrap.OverlayTrigger,
79214 { trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
79215 _reactBootstrap.Popover,
79216 { title: 'Last Modified At:', id: 'Modified At' },
79217 new Date(info.modifiedAt).toString(),
79218 _react2.default.createElement('br', null),
79219 _react2.default.createElement('br', null),
79220 _react2.default.createElement(
79221 'i',
79222 null,
79223 'Modified by: ' + (info.modifier ? info.modifier : unavailable)
79224 )
79225 ) },
79226 _react2.default.createElement(
79227 'i',
79228 null,
79229 info.modifiedAt ? (0, _utils.timeAgo)(info.modifiedAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE)
79230 )
79231 )
79232 ),
79233 _react2.default.createElement(
79234 'td',
79235 { className: 'hidden-xs', style: columnStyle[0] },
79236 _react2.default.createElement(
79237 _reactBootstrap.OverlayTrigger,
79238 { trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
79239 _reactBootstrap.Popover,
79240 { title: 'Created At:', id: 'Created At' },
79241 new Date(info.createdAt).toString(),
79242 _react2.default.createElement('br', null),
79243 _react2.default.createElement('br', null),
79244 _react2.default.createElement(
79245 'i',
79246 null,
79247 'Created by: ' + (info.creator ? info.creator : unavailable)
79248 )
79249 ) },
79250 _react2.default.createElement(
79251 'i',
79252 null,
79253 info.createdAt ? (0, _utils.timeAgo)(info.createdAt) : (0, _utils.timeAgo)(_constants.DEFAULT_ISODATE)
79254 )
79255 )
79256 )
79257 );
79258 }
79259 }]);
79260
79261 return ProjectsDataTableEntry;
79262 }(_react.Component);
79263
79264 exports.default = ProjectsDataTableEntry;
79265
79266
79267 ProjectsDataTableEntry.propTypes = {
79268 basePath: _react.PropTypes.string.isRequired,
79269 columnStyle: _react.PropTypes.shape({
79270 width: _react.PropTypes.string
79271 }),
79272 info: _react.PropTypes.shape({
79273 createdAt: _react.PropTypes.string,
79274 modifiedAt: _react.PropTypes.string,
79275 viewedAt: _react.PropTypes.string
79276 }),
79277 name: _react.PropTypes.string,
79278 owner: _react.PropTypes.string,
79279 searchText: _react.PropTypes.string
79280 };
79281
79282 ProjectsDataTableEntry.defaultProps = {
79283 unavailable: "Unavailable"
79284 };
79285 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614)))
79286
79287/***/ },
79288/* 752 */
79289/***/ function(module, exports, __webpack_require__) {
79290
79291 'use strict';
79292
79293 Object.defineProperty(exports, "__esModule", {
79294 value: true
79295 });
79296
79297 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; }; }();
79298
79299 var _react = __webpack_require__(89);
79300
79301 var _react2 = _interopRequireDefault(_react);
79302
79303 var _reactRouter = __webpack_require__(260);
79304
79305 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79306
79307 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79308
79309 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; }
79310
79311 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; } /*globals*/
79312 /**
79313 * @author pmeijer / https://github.com/pmeijer
79314 */
79315 // Libraries
79316
79317
79318 var PrettyLink = function (_Component) {
79319 _inherits(PrettyLink, _Component);
79320
79321 function PrettyLink() {
79322 _classCallCheck(this, PrettyLink);
79323
79324 return _possibleConstructorReturn(this, (PrettyLink.__proto__ || Object.getPrototypeOf(PrettyLink)).apply(this, arguments));
79325 }
79326
79327 _createClass(PrettyLink, [{
79328 key: 'render',
79329 value: function render() {
79330 var text = this.props.children || '',
79331 searchText = this.props.searchText || '',
79332 matchIndex = text.toLowerCase().indexOf(searchText),
79333 start = text,
79334 middle = '',
79335 end = '';
79336
79337 console.log(text, searchText, matchIndex);
79338
79339 if (searchText.length > 0 && matchIndex > -1) {
79340 start = text.substring(0, matchIndex);
79341 middle = text.substring(matchIndex, matchIndex + searchText.length);
79342 end = text.substring(matchIndex + searchText.length, text.length);
79343 }
79344
79345 return _react2.default.createElement(
79346 _reactRouter.Link,
79347 { to: this.props.to },
79348 _react2.default.createElement(
79349 'span',
79350 null,
79351 start
79352 ),
79353 _react2.default.createElement(
79354 'span',
79355 { style: { backgroundColor: 'lightgrey' } },
79356 middle
79357 ),
79358 _react2.default.createElement(
79359 'span',
79360 null,
79361 end
79362 )
79363 );
79364 }
79365 }]);
79366
79367 return PrettyLink;
79368 }(_react.Component);
79369
79370 exports.default = PrettyLink;
79371
79372
79373 PrettyLink.propTypes = {
79374 to: _react.PropTypes.string.isRequired,
79375 children: _react.PropTypes.string.isRequired,
79376 searchText: _react.PropTypes.string
79377 };
79378
79379/***/ },
79380/* 753 */
79381/***/ function(module, exports, __webpack_require__) {
79382
79383 'use strict';
79384
79385 Object.defineProperty(exports, "__esModule", {
79386 value: true
79387 });
79388
79389 var _reactRedux = __webpack_require__(629);
79390
79391 var _UserPage = __webpack_require__(754);
79392
79393 var _UserPage2 = _interopRequireDefault(_UserPage);
79394
79395 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79396
79397 /**
79398 * Profile page container
79399 * @author patrickkerrypei / https://github.com/patrickkerrypei
79400 */
79401
79402 // Libraries
79403 var mapStateToProps = function mapStateToProps(state, ownProps) {
79404 var basePath = state.basePath;
79405 var config = state.general.config.config;
79406 var user = state.user.user;
79407 var users = state.users.users;
79408
79409
79410 var viewUserId = ownProps.params.userId;
79411 var userExists = true;
79412 var viewUser = users.find(function (eachUser) {
79413 return eachUser._id === viewUserId;
79414 });
79415
79416 if (!viewUser) {
79417 viewUser = {};
79418 userExists = false;
79419 }
79420
79421 var enabledUsers = users.filter(function (user) {
79422 return !user.disabled;
79423 });
79424
79425 return {
79426 basePath: basePath,
79427 config: config,
79428 currentUser: user,
79429 userId: viewUserId,
79430 user: viewUser,
79431 users: enabledUsers,
79432 userExists: userExists
79433 };
79434 };
79435 // Self-defined
79436 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_UserPage2.default);
79437
79438/***/ },
79439/* 754 */
79440/***/ function(module, exports, __webpack_require__) {
79441
79442 'use strict';
79443
79444 Object.defineProperty(exports, "__esModule", {
79445 value: true
79446 });
79447
79448 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; }; }();
79449
79450 var _react = __webpack_require__(89);
79451
79452 var _react2 = _interopRequireDefault(_react);
79453
79454 var _reactRouter = __webpack_require__(260);
79455
79456 var _ProfileBox = __webpack_require__(718);
79457
79458 var _ProfileBox2 = _interopRequireDefault(_ProfileBox);
79459
79460 var _user = __webpack_require__(661);
79461
79462 var _users = __webpack_require__(665);
79463
79464 var _general = __webpack_require__(674);
79465
79466 var _style = __webpack_require__(598);
79467
79468 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79469
79470 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79471
79472 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; }
79473
79474 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; } /**
79475 * Profile page container
79476 * @author patrickkerrypei / https://github.com/patrickkerrypei
79477 */
79478
79479 // Libraries
79480
79481 // Self-defined
79482
79483 // Style
79484
79485
79486 var UserPage = function (_Component) {
79487 _inherits(UserPage, _Component);
79488
79489 function UserPage() {
79490 _classCallCheck(this, UserPage);
79491
79492 return _possibleConstructorReturn(this, (UserPage.__proto__ || Object.getPrototypeOf(UserPage)).apply(this, arguments));
79493 }
79494
79495 _createClass(UserPage, [{
79496 key: 'componentDidMount',
79497 value: function componentDidMount() {
79498 var dispatch = this.props.dispatch;
79499
79500
79501 dispatch((0, _user.fetchUserIfNeeded)());
79502 dispatch((0, _users.fetchUsersIfNeeded)());
79503 dispatch((0, _general.fetchConfigIfNeeded)());
79504 }
79505 }, {
79506 key: 'render',
79507 value: function render() {
79508 return _react2.default.createElement(
79509 'section',
79510 { className: 'content', style: _style.ProfilePage.profileBox },
79511 this.props.userExists ? _react2.default.createElement(_ProfileBox2.default, { dispatch: this.props.dispatch,
79512 editable: this.props.currentUser.siteAdmin && !this.props.user.disabled,
79513 currentUser: this.props.currentUser,
79514 restClient: this.props.restClient,
79515 config: this.props.config,
79516 user: this.props.user }) : _react2.default.createElement(
79517 _reactRouter.Link,
79518 { to: this.props.basePath + 'users' },
79519 'No such user \'' + this.props.userId + '\', back to users ...'
79520 )
79521 );
79522 }
79523 }]);
79524
79525 return UserPage;
79526 }(_react.Component);
79527
79528 exports.default = UserPage;
79529
79530
79531 UserPage.propTypes = {
79532 user: _react.PropTypes.object.isRequired
79533 };
79534
79535/***/ },
79536/* 755 */
79537/***/ function(module, exports, __webpack_require__) {
79538
79539 'use strict';
79540
79541 Object.defineProperty(exports, "__esModule", {
79542 value: true
79543 });
79544
79545 var _reactRedux = __webpack_require__(629);
79546
79547 var _UsersPage = __webpack_require__(756);
79548
79549 var _UsersPage2 = _interopRequireDefault(_UsersPage);
79550
79551 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79552
79553 /**
79554 * UsersPage page container
79555 * @author patrickkerrypei / https://github.com/patrickkerrypei
79556 */
79557
79558 // Libraries
79559 var mapStateToProps = function mapStateToProps(state) {
79560 var basePath = state.basePath;
79561
79562
79563 return {
79564 basePath: basePath
79565 };
79566 };
79567 // Self-defined
79568 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_UsersPage2.default);
79569
79570/***/ },
79571/* 756 */
79572/***/ function(module, exports, __webpack_require__) {
79573
79574 'use strict';
79575
79576 Object.defineProperty(exports, "__esModule", {
79577 value: true
79578 });
79579
79580 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; }; }();
79581
79582 var _react = __webpack_require__(89);
79583
79584 var _react2 = _interopRequireDefault(_react);
79585
79586 var _UsersTable = __webpack_require__(757);
79587
79588 var _UsersTable2 = _interopRequireDefault(_UsersTable);
79589
79590 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79591
79592 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79593
79594 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; }
79595
79596 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; } /**
79597 * Users page
79598 * @author patrickkerrypei / https://github.com/patrickkerrypei
79599 */
79600
79601 // Libraries
79602
79603 // Self defined
79604
79605
79606 var UsersPage = function (_Component) {
79607 _inherits(UsersPage, _Component);
79608
79609 function UsersPage() {
79610 _classCallCheck(this, UsersPage);
79611
79612 return _possibleConstructorReturn(this, (UsersPage.__proto__ || Object.getPrototypeOf(UsersPage)).apply(this, arguments));
79613 }
79614
79615 _createClass(UsersPage, [{
79616 key: 'render',
79617 value: function render() {
79618 return _react2.default.createElement(
79619 'section',
79620 { className: 'content' },
79621 _react2.default.createElement(
79622 'div',
79623 { className: 'row' },
79624 _react2.default.createElement(
79625 'div',
79626 { className: 'col-md-8 col-md-offset-2' },
79627 _react2.default.createElement(
79628 'div',
79629 { className: 'box box-primary' },
79630 _react2.default.createElement(_UsersTable2.default, { basePath: this.props.basePath,
79631 restClient: this.props.restClient })
79632 )
79633 )
79634 )
79635 );
79636 }
79637 }]);
79638
79639 return UsersPage;
79640 }(_react.Component);
79641
79642 exports.default = UsersPage;
79643
79644/***/ },
79645/* 757 */
79646/***/ function(module, exports, __webpack_require__) {
79647
79648 'use strict';
79649
79650 Object.defineProperty(exports, "__esModule", {
79651 value: true
79652 });
79653
79654 var _reactRedux = __webpack_require__(629);
79655
79656 var _UsersTable = __webpack_require__(758);
79657
79658 var _UsersTable2 = _interopRequireDefault(_UsersTable);
79659
79660 var _utils = __webpack_require__(658);
79661
79662 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79663
79664 // Self-defined
79665 var mapStateToProps = function mapStateToProps(state) {
79666 var users = state.users.users;
79667 var user = state.user.user;
79668 var _state$tables$users = state.tables.users;
79669 var sortCategory = _state$tables$users.sortCategory;
79670 var sortedForward = _state$tables$users.sortedForward;
79671
79672 var formattedUsers = users.map(function (eachUser) {
79673 return Object.assign(eachUser, {
79674 name: eachUser._id
79675 });
79676 });
79677
79678 return {
79679 sortCategory: sortCategory,
79680 sortedForward: sortedForward,
79681 user: user,
79682 users: (0, _utils.sortWithChecks)(formattedUsers, sortCategory, sortedForward)
79683 };
79684 }; /**
79685 * Container widget for the users data table
79686 * @author patrickkerrypei / https://github.com/patrickkerrypei
79687 */
79688
79689 // Libraries
79690 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_UsersTable2.default);
79691
79692/***/ },
79693/* 758 */
79694/***/ function(module, exports, __webpack_require__) {
79695
79696 'use strict';
79697
79698 Object.defineProperty(exports, "__esModule", {
79699 value: true
79700 });
79701
79702 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; }; }();
79703
79704 var _react = __webpack_require__(89);
79705
79706 var _react2 = _interopRequireDefault(_react);
79707
79708 var _reactBootstrap = __webpack_require__(334);
79709
79710 var _reactRouter = __webpack_require__(260);
79711
79712 var _DataTable = __webpack_require__(703);
79713
79714 var _DataTable2 = _interopRequireDefault(_DataTable);
79715
79716 var _UsersDataTableEntry = __webpack_require__(759);
79717
79718 var _UsersDataTableEntry2 = _interopRequireDefault(_UsersDataTableEntry);
79719
79720 var _users = __webpack_require__(665);
79721
79722 var _user = __webpack_require__(661);
79723
79724 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79725
79726 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79727
79728 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; }
79729
79730 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; } /**
79731 * Container widget for the users data table
79732 * @author patrickkerrypei / https://github.com/patrickkerrypei
79733 */
79734
79735 // Libraries
79736
79737 // Self-defined
79738
79739
79740 var UsersTable = function (_Component) {
79741 _inherits(UsersTable, _Component);
79742
79743 function UsersTable(props) {
79744 _classCallCheck(this, UsersTable);
79745
79746 return _possibleConstructorReturn(this, (UsersTable.__proto__ || Object.getPrototypeOf(UsersTable)).call(this, props));
79747 }
79748
79749 _createClass(UsersTable, [{
79750 key: 'componentDidMount',
79751 value: function componentDidMount() {
79752 var dispatch = this.props.dispatch;
79753
79754
79755 dispatch((0, _users.fetchUsersIfNeeded)());
79756 dispatch((0, _user.fetchUserIfNeeded)());
79757 }
79758 }, {
79759 key: 'render',
79760 value: function render() {
79761 var _props = this.props;
79762 var user = _props.user;
79763 var users = _props.users;
79764
79765 var categories = [{ id: 1, name: 'User' }];
79766
79767 return _react2.default.createElement(
79768 'div',
79769 null,
79770 _react2.default.createElement(
79771 'div',
79772 { className: 'box-header',
79773 style: { paddingBottom: "0px" } },
79774 _react2.default.createElement(
79775 'h3',
79776 { className: 'box-title', style: { fontSize: 28 } },
79777 _react2.default.createElement('i', { className: 'fa fa-users' }),
79778 ' ',
79779 ' Users'
79780 ),
79781 _react2.default.createElement(
79782 _reactRouter.Link,
79783 { to: this.props.basePath + 'newuser' },
79784 _react2.default.createElement(
79785 _reactBootstrap.Button,
79786 { className: 'pull-right',
79787 bsStyle: 'primary',
79788 bsSize: 'small',
79789 style: this.props.user.siteAdmin === true ? {} : { display: 'none' },
79790 onClick: this.toggleModal },
79791 'Add +'
79792 )
79793 )
79794 ),
79795 _react2.default.createElement(
79796 _DataTable2.default,
79797 { categories: categories,
79798 content: 'Users',
79799 entries: users,
79800 orderEntries: this.handleOrderEntries,
79801 reducerTableName: 'users',
79802 sortable: true },
79803 _react2.default.createElement(_UsersDataTableEntry2.default, { columnStyle: { width: "13%" },
79804 userId: user._id })
79805 )
79806 );
79807 }
79808 }]);
79809
79810 return UsersTable;
79811 }(_react.Component);
79812
79813 exports.default = UsersTable;
79814
79815
79816 UsersTable.propTypes = {
79817 sortCategory: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.array]).isRequired,
79818 sortedForward: _react.PropTypes.bool.isRequired,
79819 users: _react.PropTypes.array.isRequired,
79820 restClient: _react.PropTypes.object.isRequired,
79821 basePath: _react.PropTypes.string.isRequired,
79822 user: _react.PropTypes.object.isRequired
79823 };
79824
79825/***/ },
79826/* 759 */
79827/***/ function(module, exports, __webpack_require__) {
79828
79829 'use strict';
79830
79831 Object.defineProperty(exports, "__esModule", {
79832 value: true
79833 });
79834
79835 var _reactRedux = __webpack_require__(629);
79836
79837 var _UsersDataTableEntry = __webpack_require__(760);
79838
79839 var _UsersDataTableEntry2 = _interopRequireDefault(_UsersDataTableEntry);
79840
79841 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79842
79843 /**
79844 * UsersDataTableEntry container
79845 * @author patrickkerrypei / https://github.com/patrickkerrypei
79846 */
79847
79848 // Libraries
79849 var mapStateToProps = function mapStateToProps(state) {
79850 var basePath = state.basePath;
79851
79852
79853 return {
79854 basePath: basePath
79855 };
79856 };
79857 // Self-defined
79858 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_UsersDataTableEntry2.default);
79859
79860/***/ },
79861/* 760 */
79862/***/ function(module, exports, __webpack_require__) {
79863
79864 'use strict';
79865
79866 Object.defineProperty(exports, "__esModule", {
79867 value: true
79868 });
79869
79870 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; }; }();
79871
79872 var _react = __webpack_require__(89);
79873
79874 var _react2 = _interopRequireDefault(_react);
79875
79876 var _reactBootstrap = __webpack_require__(334);
79877
79878 var _reactRouter = __webpack_require__(260);
79879
79880 var _utils = __webpack_require__(658);
79881
79882 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79883
79884 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
79885
79886 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; }
79887
79888 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; } /**
79889 * Custom entries for the users data table
79890 * @author patrickkerrypei / https://github.com/patrickkerrypei
79891 */
79892
79893 // Libraries
79894
79895
79896 // Self-defined
79897
79898
79899 var UsersDataTableEntry = function (_Component) {
79900 _inherits(UsersDataTableEntry, _Component);
79901
79902 function UsersDataTableEntry() {
79903 _classCallCheck(this, UsersDataTableEntry);
79904
79905 return _possibleConstructorReturn(this, (UsersDataTableEntry.__proto__ || Object.getPrototypeOf(UsersDataTableEntry)).apply(this, arguments));
79906 }
79907
79908 _createClass(UsersDataTableEntry, [{
79909 key: 'render',
79910 value: function render() {
79911 // const { name, description } = this.props.data ? this.props.data : {};
79912 var _props = this.props;
79913 var siteAdmin = _props.siteAdmin;
79914 var _id = _props._id;
79915 var disabled = _props.disabled;
79916 var basePath = this.props.basePath;
79917 var userId = this.props.userId;
79918
79919
79920 return _react2.default.createElement(
79921 'tr',
79922 { role: 'row', className: 'odd' },
79923 _react2.default.createElement(
79924 'td',
79925 null,
79926 _react2.default.createElement(
79927 _reactRouter.Link,
79928 { to: userId === _id ? basePath + 'profile' : basePath + 'users/' + _id, style: disabled ? { color: 'grey' } : {} },
79929 _react2.default.createElement('img', { src: (0, _utils.getUserIconSource)(_id), height: '18px', style: { marginRight: '6px' } }),
79930 _id
79931 ),
79932 disabled ? _react2.default.createElement(
79933 _reactBootstrap.OverlayTrigger,
79934 { key: 'pop-over-disabled', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
79935 _reactBootstrap.Popover,
79936 { title: 'User Disabled', id: 'disabled' },
79937 '\'' + _id + '\' is disabled.'
79938 ) },
79939 _react2.default.createElement('i', { className: 'fa fa-ban pull-right', style: { color: 'grey' } })
79940 ) : siteAdmin ? _react2.default.createElement(
79941 _reactBootstrap.OverlayTrigger,
79942 { key: 'pop-over-admin', trigger: ["hover", "focus"], placement: 'top', overlay: _react2.default.createElement(
79943 _reactBootstrap.Popover,
79944 { title: 'Site Admin', id: 'admin' },
79945 '\'' + _id + '\' is a site admin.'
79946 ) },
79947 _react2.default.createElement('i', { className: 'fa fa-graduation-cap pull-right' })
79948 ) : null
79949 )
79950 );
79951 }
79952 }]);
79953
79954 return UsersDataTableEntry;
79955 }(_react.Component);
79956
79957 exports.default = UsersDataTableEntry;
79958
79959
79960 UsersDataTableEntry.propTypes = {
79961 basePath: _react.PropTypes.string.isRequired
79962 };
79963
79964/***/ },
79965/* 761 */
79966/***/ function(module, exports, __webpack_require__) {
79967
79968 'use strict';
79969
79970 Object.defineProperty(exports, "__esModule", {
79971 value: true
79972 });
79973
79974 var _reactRedux = __webpack_require__(629);
79975
79976 var _NewUserPage = __webpack_require__(762);
79977
79978 var _NewUserPage2 = _interopRequireDefault(_NewUserPage);
79979
79980 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
79981
79982 /**
79983 * NewUserPage page container
79984 * @author pmeijer / https://github.com/pmeijer
79985 */
79986
79987 // Libraries
79988 var mapStateToProps = function mapStateToProps(state) {
79989 var basePath = state.basePath;
79990 var user = state.user.user;
79991
79992
79993 return {
79994 basePath: basePath,
79995 user: user
79996 };
79997 };
79998 // Self-defined
79999 exports.default = (0, _reactRedux.connect)(mapStateToProps)(_NewUserPage2.default);
80000
80001/***/ },
80002/* 762 */
80003/***/ function(module, exports, __webpack_require__) {
80004
80005 'use strict';
80006
80007 Object.defineProperty(exports, "__esModule", {
80008 value: true
80009 });
80010
80011 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; }; }();
80012
80013 var _react = __webpack_require__(89);
80014
80015 var _react2 = _interopRequireDefault(_react);
80016
80017 var _reactRouter = __webpack_require__(260);
80018
80019 var _RegisterForm = __webpack_require__(600);
80020
80021 var _RegisterForm2 = _interopRequireDefault(_RegisterForm);
80022
80023 var _user = __webpack_require__(661);
80024
80025 var _users = __webpack_require__(665);
80026
80027 var _style = __webpack_require__(598);
80028
80029 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80030
80031 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
80032
80033 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; }
80034
80035 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; } /* globals window*/
80036 /**
80037 * @author pmeijer / https://github.com/pmeijer
80038 */
80039
80040 // Libraries
80041
80042 // Self-defined
80043
80044
80045 // Style
80046
80047
80048 var NewUserPage = function (_Component) {
80049 _inherits(NewUserPage, _Component);
80050
80051 function NewUserPage(props) {
80052 _classCallCheck(this, NewUserPage);
80053
80054 var _this = _possibleConstructorReturn(this, (NewUserPage.__proto__ || Object.getPrototypeOf(NewUserPage)).call(this, props));
80055
80056 _this.createUser = _this.createUser.bind(_this);
80057 return _this;
80058 }
80059
80060 _createClass(NewUserPage, [{
80061 key: 'componentDidMount',
80062 value: function componentDidMount() {
80063 var dispatch = this.props.dispatch;
80064
80065
80066 dispatch((0, _user.fetchUserIfNeeded)());
80067 }
80068 }, {
80069 key: 'createUser',
80070 value: function createUser(userId, password, email, canCreate) {
80071 var _this2 = this;
80072
80073 var userData = {
80074 password: password,
80075 email: email,
80076 canCreate: true
80077 };
80078
80079 return this.props.restClient.users.addUser(userId, userData).then(function () {
80080 _this2.props.dispatch((0, _users.fetchUsers)());
80081 _reactRouter.browserHistory.push(_this2.props.basePath + 'users/' + userId);
80082 }).catch(function (err) {
80083 return err.status || 500;
80084 });
80085 }
80086 }, {
80087 key: 'render',
80088 value: function render() {
80089 var canCreate = this.props.user && this.props.user.siteAdmin;
80090
80091 return _react2.default.createElement(
80092 'section',
80093 { className: 'content', style: _style.ProfilePage.profileBox },
80094 _react2.default.createElement(
80095 'div',
80096 { className: 'col-md-6 col-md-offset-3' },
80097 _react2.default.createElement(
80098 'div',
80099 { className: 'box box-primary' },
80100 _react2.default.createElement(
80101 'div',
80102 { className: 'box-header', style: { paddingBottom: 0 } },
80103 _react2.default.createElement(
80104 'h3',
80105 { className: 'box-title', style: { fontSize: 28 } },
80106 _react2.default.createElement('i', { className: 'fa fa-user-plus' }),
80107 ' New User'
80108 )
80109 ),
80110 _react2.default.createElement(
80111 'div',
80112 { className: 'box-body' },
80113 _react2.default.createElement(_RegisterForm2.default, { onNewUser: this.createUser,
80114 backLinkData: {
80115 title: 'Back to users',
80116 path: this.props.basePath + 'users'
80117 },
80118 allowUserCreation: canCreate })
80119 )
80120 )
80121 )
80122 );
80123 }
80124 }]);
80125
80126 return NewUserPage;
80127 }(_react.Component);
80128
80129 exports.default = NewUserPage;
80130
80131
80132 NewUserPage.propTypes = {
80133 user: _react.PropTypes.object.isRequired
80134 };
80135
80136/***/ },
80137/* 763 */
80138/***/ function(module, exports, __webpack_require__) {
80139
80140 'use strict';
80141
80142 Object.defineProperty(exports, "__esModule", {
80143 value: true
80144 });
80145
80146 var _redux = __webpack_require__(636);
80147
80148 var _reduxThunk = __webpack_require__(764);
80149
80150 var _reduxThunk2 = _interopRequireDefault(_reduxThunk);
80151
80152 var _reducers = __webpack_require__(765);
80153
80154 var _reducers2 = _interopRequireDefault(_reducers);
80155
80156 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80157
80158 var configureStore = function configureStore(preloadedState) {
80159 var store = (0, _redux.createStore)(_reducers2.default, preloadedState,
80160 // Compose configured for development (redux chrome extension)
80161 (0, _redux.compose)((0, _redux.applyMiddleware)(_reduxThunk2.default), window.devToolsExtension ? window.devToolsExtension() : function (f) {
80162 return f;
80163 }));
80164
80165 return store;
80166 };
80167 // Self-defined
80168 /* global window */
80169
80170 /**
80171 * Redux store
80172 * @author patrickkerrypei / https://github.com/patrickkerrypei
80173 */
80174
80175 // Libraries
80176 exports.default = configureStore;
80177
80178/***/ },
80179/* 764 */
80180/***/ function(module, exports) {
80181
80182 'use strict';
80183
80184 exports.__esModule = true;
80185 function createThunkMiddleware(extraArgument) {
80186 return function (_ref) {
80187 var dispatch = _ref.dispatch;
80188 var getState = _ref.getState;
80189 return function (next) {
80190 return function (action) {
80191 if (typeof action === 'function') {
80192 return action(dispatch, getState, extraArgument);
80193 }
80194
80195 return next(action);
80196 };
80197 };
80198 };
80199 }
80200
80201 var thunk = createThunkMiddleware();
80202 thunk.withExtraArgument = createThunkMiddleware;
80203
80204 exports['default'] = thunk;
80205
80206/***/ },
80207/* 765 */
80208/***/ function(module, exports, __webpack_require__) {
80209
80210 'use strict';
80211
80212 Object.defineProperty(exports, "__esModule", {
80213 value: true
80214 });
80215
80216 var _redux = __webpack_require__(636);
80217
80218 var _basePath = __webpack_require__(766);
80219
80220 var _basePath2 = _interopRequireDefault(_basePath);
80221
80222 var _organizations = __webpack_require__(767);
80223
80224 var _organizations2 = _interopRequireDefault(_organizations);
80225
80226 var _projects = __webpack_require__(768);
80227
80228 var _projects2 = _interopRequireDefault(_projects);
80229
80230 var _tables = __webpack_require__(769);
80231
80232 var _tables2 = _interopRequireDefault(_tables);
80233
80234 var _user = __webpack_require__(770);
80235
80236 var _user2 = _interopRequireDefault(_user);
80237
80238 var _users = __webpack_require__(771);
80239
80240 var _users2 = _interopRequireDefault(_users);
80241
80242 var _general = __webpack_require__(772);
80243
80244 var _general2 = _interopRequireDefault(_general);
80245
80246 var _general3 = __webpack_require__(674);
80247
80248 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
80249
80250 // Self-defined
80251 var reducers = (0, _redux.combineReducers)({
80252 basePath: _basePath2.default,
80253 organizations: _organizations2.default,
80254 projects: _projects2.default,
80255 tables: _tables2.default,
80256 user: _user2.default,
80257 users: _users2.default,
80258 general: _general2.default
80259 }); /**
80260 * Top level of reducer composition
80261 * @author patrickkerrypei / https://github.com/patrickkerrypei
80262 */
80263
80264 // Libraries
80265
80266
80267 var rootReducer = function rootReducer(state, action) {
80268 var newState = state;
80269 if (action.type === _general3.USER_LOGOUT) {
80270 newState = { basePath: state.basePath };
80271 }
80272
80273 return reducers(newState, action);
80274 };
80275
80276 exports.default = rootReducer;
80277
80278/***/ },
80279/* 766 */
80280/***/ function(module, exports) {
80281
80282 'use strict';
80283
80284 Object.defineProperty(exports, "__esModule", {
80285 value: true
80286 });
80287 /**
80288 * basePath reducer
80289 * @author patrickkerrypei / https://github.com/patrickkerrypei
80290 */
80291
80292 // Preloaded from entry point
80293 var basePath = function basePath() {
80294 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
80295 return state;
80296 };
80297
80298 exports.default = basePath;
80299
80300/***/ },
80301/* 767 */
80302/***/ function(module, exports, __webpack_require__) {
80303
80304 'use strict';
80305
80306 Object.defineProperty(exports, "__esModule", {
80307 value: true
80308 });
80309
80310 var _organizations = __webpack_require__(669);
80311
80312 var initialState = {
80313 hasFetched: false,
80314 isFetching: false,
80315 organizations: []
80316 }; /**
80317 * Reducers for organizationsClient
80318 * @author patrickkerrypei / https://github.com/patrickkerrypei
80319 */
80320
80321 var organizations = function organizations() {
80322 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
80323 var action = arguments[1];
80324
80325 switch (action.type) {
80326 case _organizations.RECEIVE_ORGANIZATIONS:
80327 return Object.assign({}, state, {
80328 hasFetched: true,
80329 isFetching: false,
80330 organizations: action.organizations
80331 });
80332 case _organizations.REQUEST_ORGANIZATIONS:
80333 return Object.assign({}, state, {
80334 isFetching: true
80335 });
80336 default:
80337 return state;
80338 }
80339 };
80340
80341 exports.default = organizations;
80342
80343/***/ },
80344/* 768 */
80345/***/ function(module, exports, __webpack_require__) {
80346
80347 'use strict';
80348
80349 Object.defineProperty(exports, "__esModule", {
80350 value: true
80351 });
80352
80353 var _projects = __webpack_require__(667);
80354
80355 var initialState = {
80356 /* Structure of initailState.commits:
80357 commits: {
80358 exProjectId: {
80359 hasFetched: bool,
80360 isFetching: bool,
80361 commits: []
80362 }
80363 }
80364 */
80365 commits: {},
80366 hasFetched: false,
80367 isFetching: false,
80368 projects: []
80369 }; /**
80370 * Reducers for projectsClient
80371 * @author patrickkerrypei / https://github.com/patrickkerrypei
80372 */
80373
80374 var projects = function projects() {
80375 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
80376 var action = arguments[1];
80377
80378 var receiveCommitsCopy = void 0,
80379 requestCommitsCopy = void 0;
80380
80381 switch (action.type) {
80382 case _projects.RECEIVE_PROJECTS:
80383 return Object.assign({}, state, {
80384 hasFetched: true,
80385 isFetching: false,
80386 projects: action.projects
80387 });
80388 case _projects.REQUEST_PROJECTS:
80389 return Object.assign({}, state, {
80390 isFetching: true
80391 });
80392 case _projects.RECEIVE_COMMITS:
80393 // TODO: consider immutability helpers
80394 receiveCommitsCopy = JSON.parse(JSON.stringify(state.commits));
80395 receiveCommitsCopy[action.ownerId + '+' + action.projectName] = {
80396 commits: action.commits,
80397 hasFetched: true,
80398 isFetching: false
80399 };
80400 return Object.assign({}, state, {
80401 commits: receiveCommitsCopy
80402 });
80403 case _projects.REQUEST_COMMITS:
80404 // TODO: consider immutability helpers
80405 requestCommitsCopy = JSON.parse(JSON.stringify(state.commits));
80406 requestCommitsCopy[action.ownerId + '+' + action.projectName] = {
80407 isFetching: true
80408 };
80409 return Object.assign({}, state, {
80410 commits: requestCommitsCopy
80411 });
80412 default:
80413 return state;
80414 }
80415 };
80416
80417 exports.default = projects;
80418
80419/***/ },
80420/* 769 */
80421/***/ function(module, exports, __webpack_require__) {
80422
80423 'use strict';
80424
80425 Object.defineProperty(exports, "__esModule", {
80426 value: true
80427 });
80428
80429 var _tables = __webpack_require__(671);
80430
80431 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; } /**
80432 * Reducers for table actions
80433 * @author patrickkerrypei / https://github.com/patrickkerrypei
80434 */
80435
80436 var initialTableState = {
80437 pageNumber: 1,
80438 searchText: '',
80439 selectValue: 10,
80440 sortCategory: 'name',
80441 sortedForward: true
80442 },
80443 initialUsersTableState = Object.assign(initialTableState, {
80444 sortCategory: '_id'
80445 });
80446
80447 var replaceStateParam = function replaceStateParam(field, state, action) {
80448 return Object.assign({}, state, _defineProperty({}, field, action[field]));
80449 };
80450
80451 var table = function table() {
80452 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialTableState;
80453 var action = arguments[1];
80454
80455 var newState = void 0;
80456 switch (action.type) {
80457 case _tables.SET_PAGE_NUMBER:
80458 return replaceStateParam('pageNumber', state, action);
80459 case _tables.SET_SEARCH_TEXT:
80460 if (action.searchText) {
80461 // When search is entered go to page one.
80462 newState = Object.assign({}, state, {
80463 searchText: action.searchText,
80464 pageNumber: 1
80465 });
80466 } else {
80467 newState = replaceStateParam('searchText', state, action);
80468 }
80469
80470 return newState;
80471 case _tables.SET_SELECT_VALUE:
80472 return replaceStateParam('selectValue', state, action);
80473 case _tables.SORT_CATEGORY:
80474 newState = Object.assign({}, state);
80475 if (state.sortCategory === action.sortCategory) {
80476 Object.assign(newState, {
80477 sortedForward: !state.sortedForward
80478 });
80479 } else {
80480 Object.assign(newState, {
80481 sortCategory: action.sortCategory,
80482 sortedForward: true
80483 });
80484 }
80485
80486 return newState;
80487 default:
80488 return state;
80489 }
80490 };
80491
80492 var initialTablesState = {
80493 // Table from organization page
80494 organizations: initialTableState,
80495 organizationMembers: initialTableState,
80496 // Tables from the collaborator table (project page)
80497 projectUser: initialTableState,
80498 projectOrg: initialTableState,
80499 // Table from the projects page
80500 projects: initialTableState,
80501 // Table from users page
80502 users: initialUsersTableState
80503 };
80504
80505 var tables = function tables() {
80506 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialTablesState;
80507 var action = arguments[1];
80508
80509 switch (action.type) {
80510 case _tables.REFRESH_TABLES:
80511 return initialTablesState;
80512 case _tables.SET_PAGE_NUMBER:
80513 case _tables.SET_SEARCH_TEXT:
80514 case _tables.SET_SELECT_VALUE:
80515 case _tables.SORT_CATEGORY:
80516 return Object.assign({}, state, _defineProperty({}, action.table, table(state[action.table], action)));
80517 default:
80518 return state;
80519 }
80520 };
80521
80522 exports.default = tables;
80523
80524/***/ },
80525/* 770 */
80526/***/ function(module, exports, __webpack_require__) {
80527
80528 'use strict';
80529
80530 Object.defineProperty(exports, "__esModule", {
80531 value: true
80532 });
80533
80534 var _user = __webpack_require__(661);
80535
80536 var initialState = {
80537 hasFetched: false,
80538 isFetching: false,
80539 user: {}
80540 }; /**
80541 * Reducers for userClient
80542 * @author patrickkerrypei / https://github.com/patrickkerrypei
80543 */
80544
80545 var user = function user() {
80546 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
80547 var action = arguments[1];
80548
80549 switch (action.type) {
80550 case _user.RECEIVE_USER:
80551 return Object.assign({}, state, {
80552 hasFetched: true,
80553 isFetching: false,
80554 user: action.user
80555 });
80556 case _user.REQUEST_USER:
80557 return Object.assign({}, state, {
80558 isFetching: true
80559 });
80560 default:
80561 return state;
80562 }
80563 };
80564
80565 exports.default = user;
80566
80567/***/ },
80568/* 771 */
80569/***/ function(module, exports, __webpack_require__) {
80570
80571 'use strict';
80572
80573 Object.defineProperty(exports, "__esModule", {
80574 value: true
80575 });
80576
80577 var _users = __webpack_require__(665);
80578
80579 var initialState = {
80580 hasFetched: false,
80581 isFetching: false,
80582 users: []
80583 }; /**
80584 * Reducers for usersClient
80585 * @author patrickkerrypei / https://github.com/patrickkerrypei
80586 */
80587
80588 var users = function users() {
80589 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
80590 var action = arguments[1];
80591
80592 switch (action.type) {
80593 case _users.RECEIVE_USERS:
80594 return Object.assign({}, state, {
80595 hasFetched: true,
80596 isFetching: false,
80597 users: action.users
80598 });
80599 case _users.REQUEST_USERS:
80600 return Object.assign({}, state, {
80601 isFetching: true
80602 });
80603 default:
80604 return state;
80605 }
80606 };
80607
80608 exports.default = users;
80609
80610/***/ },
80611/* 772 */
80612/***/ function(module, exports, __webpack_require__) {
80613
80614 'use strict';
80615
80616 Object.defineProperty(exports, "__esModule", {
80617 value: true
80618 });
80619
80620 var _general = __webpack_require__(674);
80621
80622 var initialState = {
80623 config: {
80624 hasFetched: false,
80625 isFetching: false,
80626 config: {
80627 authentication: {}
80628 }
80629 }
80630 }; /**
80631 * Reducers for userClient
80632 * @author patrickkerrypei / https://github.com/patrickkerrypei
80633 */
80634
80635 var general = function general() {
80636 var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
80637 var action = arguments[1];
80638
80639 var newState = void 0;
80640
80641 switch (action.type) {
80642 case _general.RECEIVE_CONFIG:
80643 return Object.assign({}, state, {
80644 config: {
80645 hasFetched: true,
80646 isFetching: false,
80647 config: action.config
80648 }
80649 });
80650 case _general.REQUEST_CONFIG:
80651 newState = Object.assign({}, state);
80652 newState.config.isFetching = true;
80653 return newState;
80654 default:
80655 return state;
80656 }
80657 };
80658
80659 exports.default = general;
80660
80661/***/ },
80662/* 773 */
80663/***/ function(module, exports, __webpack_require__) {
80664
80665 // style-loader: Adds some css to the DOM by adding a <style> tag
80666
80667 // load the styles
80668 var content = __webpack_require__(774);
80669 if(typeof content === 'string') content = [[module.id, content, '']];
80670 // add the styles to the DOM
80671 var update = __webpack_require__(611)(content, {});
80672 if(content.locals) module.exports = content.locals;
80673 // Hot Module Replacement
80674 if(false) {
80675 // When the styles change, update the <style> tags
80676 if(!content.locals) {
80677 module.hot.accept("!!./../../../../css-loader/index.js!./_all-skins.min.css", function() {
80678 var newContent = require("!!./../../../../css-loader/index.js!./_all-skins.min.css");
80679 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
80680 update(newContent);
80681 });
80682 }
80683 // When the module is disposed, remove the <style> tags
80684 module.hot.dispose(function() { update(); });
80685 }
80686
80687/***/ },
80688/* 774 */
80689/***/ function(module, exports, __webpack_require__) {
80690
80691 exports = module.exports = __webpack_require__(605)();
80692 // imports
80693
80694
80695 // module
80696 exports.push([module.id, ".skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav .open>a:focus,.skin-blue .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header .logo{background-color:#367fa9;color:#fff;border-bottom:0 solid transparent}.skin-blue .main-header .logo:hover{background-color:#357ca5}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:transparent}.skin-blue .wrapper,.skin-blue .main-sidebar,.skin-blue .left-side{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li:hover>a,.skin-blue .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#3c8dbc}.skin-blue .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .treeview-menu>li>a{color:#8aa4af}.skin-blue .treeview-menu>li.active>a,.skin-blue .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-blue .sidebar-form input[type=\"text\"],.skin-blue .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-blue .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue .sidebar-form input[type=\"text\"]:focus,.skin-blue .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus,.skin-blue-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .content-wrapper,.skin-blue-light .main-footer{border-left:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .treeview-menu>li>a{color:#777}.skin-blue-light .treeview-menu>li.active>a,.skin-blue-light .treeview-menu>li>a:hover{color:#000}.skin-blue-light .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type=\"text\"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-blue-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue-light .sidebar-form input[type=\"text\"]:focus,.skin-blue-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}.skin-black .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black .main-header .navbar-toggle{color:#333}.skin-black .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black .main-header .navbar{background-color:#fff}.skin-black .main-header .navbar .nav>li>a{color:#333}.skin-black .main-header .navbar .nav>li>a:hover,.skin-black .main-header .navbar .nav>li>a:active,.skin-black .main-header .navbar .nav>li>a:focus,.skin-black .main-header .navbar .nav .open>a,.skin-black .main-header .navbar .nav .open>a:hover,.skin-black .main-header .navbar .nav .open>a:focus,.skin-black .main-header .navbar .nav>.active>a{background:#fff;color:#999}.skin-black .main-header .navbar .sidebar-toggle{color:#333}.skin-black .main-header .navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black .main-header .navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black .main-header .navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black .main-header .navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black .main-header>.logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black .main-header>.logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black .main-header>.logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black .main-header>.logo:hover{background-color:#1f1f1f}}.skin-black .main-header li.user-header{background-color:#222}.skin-black .content-header{background:transparent;box-shadow:none}.skin-black .wrapper,.skin-black .main-sidebar,.skin-black .left-side{background-color:#222d32}.skin-black .user-panel>.info,.skin-black .user-panel>.info>a{color:#fff}.skin-black .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-black .sidebar-menu>li>a{border-left:3px solid transparent}.skin-black .sidebar-menu>li:hover>a,.skin-black .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#fff}.skin-black .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-black .sidebar a{color:#b8c7ce}.skin-black .sidebar a:hover{text-decoration:none}.skin-black .treeview-menu>li>a{color:#8aa4af}.skin-black .treeview-menu>li.active>a,.skin-black .treeview-menu>li>a:hover{color:#fff}.skin-black .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-black .sidebar-form input[type=\"text\"],.skin-black .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-black .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-black .sidebar-form input[type=\"text\"]:focus,.skin-black .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-black .pace .pace-progress{background:#222}.skin-black .pace .pace-activity{border-top-color:#222;border-left-color:#222}.skin-black-light .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black-light .main-header .navbar-toggle{color:#333}.skin-black-light .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black-light .main-header .navbar{background-color:#fff}.skin-black-light .main-header .navbar .nav>li>a{color:#333}.skin-black-light .main-header .navbar .nav>li>a:hover,.skin-black-light .main-header .navbar .nav>li>a:active,.skin-black-light .main-header .navbar .nav>li>a:focus,.skin-black-light .main-header .navbar .nav .open>a,.skin-black-light .main-header .navbar .nav .open>a:hover,.skin-black-light .main-header .navbar .nav .open>a:focus,.skin-black-light .main-header .navbar .nav>.active>a{background:#fff;color:#999}.skin-black-light .main-header .navbar .sidebar-toggle{color:#333}.skin-black-light .main-header .navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black-light .main-header .navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black-light .main-header .navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black-light .main-header .navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black-light .main-header .navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black-light .main-header>.logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black-light .main-header>.logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black-light .main-header>.logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black-light .main-header>.logo:hover{background-color:#1f1f1f}}.skin-black-light .main-header li.user-header{background-color:#222}.skin-black-light .content-header{background:transparent;box-shadow:none}.skin-black-light .wrapper,.skin-black-light .main-sidebar,.skin-black-light .left-side{background-color:#f9fafc}.skin-black-light .content-wrapper,.skin-black-light .main-footer{border-left:1px solid #d2d6de}.skin-black-light .user-panel>.info,.skin-black-light .user-panel>.info>a{color:#444}.skin-black-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-black-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-black-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-black-light .sidebar-menu>li:hover>a,.skin-black-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-black-light .sidebar-menu>li.active{border-left-color:#fff}.skin-black-light .sidebar-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-black-light .sidebar a{color:#444}.skin-black-light .sidebar a:hover{text-decoration:none}.skin-black-light .treeview-menu>li>a{color:#777}.skin-black-light .treeview-menu>li.active>a,.skin-black-light .treeview-menu>li>a:hover{color:#000}.skin-black-light .treeview-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-black-light .sidebar-form input[type=\"text\"],.skin-black-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-black-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-black-light .sidebar-form input[type=\"text\"]:focus,.skin-black-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-green .main-header .navbar{background-color:#00a65a}.skin-green .main-header .navbar .nav>li>a{color:#fff}.skin-green .main-header .navbar .nav>li>a:hover,.skin-green .main-header .navbar .nav>li>a:active,.skin-green .main-header .navbar .nav>li>a:focus,.skin-green .main-header .navbar .nav .open>a,.skin-green .main-header .navbar .nav .open>a:hover,.skin-green .main-header .navbar .nav .open>a:focus,.skin-green .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green .main-header .logo{background-color:#008d4c;color:#fff;border-bottom:0 solid transparent}.skin-green .main-header .logo:hover{background-color:#008749}.skin-green .main-header li.user-header{background-color:#00a65a}.skin-green .content-header{background:transparent}.skin-green .wrapper,.skin-green .main-sidebar,.skin-green .left-side{background-color:#222d32}.skin-green .user-panel>.info,.skin-green .user-panel>.info>a{color:#fff}.skin-green .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-green .sidebar-menu>li>a{border-left:3px solid transparent}.skin-green .sidebar-menu>li:hover>a,.skin-green .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#00a65a}.skin-green .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-green .sidebar a{color:#b8c7ce}.skin-green .sidebar a:hover{text-decoration:none}.skin-green .treeview-menu>li>a{color:#8aa4af}.skin-green .treeview-menu>li.active>a,.skin-green .treeview-menu>li>a:hover{color:#fff}.skin-green .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-green .sidebar-form input[type=\"text\"],.skin-green .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-green .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-green .sidebar-form input[type=\"text\"]:focus,.skin-green .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-green-light .main-header .navbar{background-color:#00a65a}.skin-green-light .main-header .navbar .nav>li>a{color:#fff}.skin-green-light .main-header .navbar .nav>li>a:hover,.skin-green-light .main-header .navbar .nav>li>a:active,.skin-green-light .main-header .navbar .nav>li>a:focus,.skin-green-light .main-header .navbar .nav .open>a,.skin-green-light .main-header .navbar .nav .open>a:hover,.skin-green-light .main-header .navbar .nav .open>a:focus,.skin-green-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green-light .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green-light .main-header .logo{background-color:#00a65a;color:#fff;border-bottom:0 solid transparent}.skin-green-light .main-header .logo:hover{background-color:#00a157}.skin-green-light .main-header li.user-header{background-color:#00a65a}.skin-green-light .content-header{background:transparent}.skin-green-light .wrapper,.skin-green-light .main-sidebar,.skin-green-light .left-side{background-color:#f9fafc}.skin-green-light .content-wrapper,.skin-green-light .main-footer{border-left:1px solid #d2d6de}.skin-green-light .user-panel>.info,.skin-green-light .user-panel>.info>a{color:#444}.skin-green-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-green-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-green-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-green-light .sidebar-menu>li:hover>a,.skin-green-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-green-light .sidebar-menu>li.active{border-left-color:#00a65a}.skin-green-light .sidebar-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-green-light .sidebar a{color:#444}.skin-green-light .sidebar a:hover{text-decoration:none}.skin-green-light .treeview-menu>li>a{color:#777}.skin-green-light .treeview-menu>li.active>a,.skin-green-light .treeview-menu>li>a:hover{color:#000}.skin-green-light .treeview-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-green-light .sidebar-form input[type=\"text\"],.skin-green-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-green-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-green-light .sidebar-form input[type=\"text\"]:focus,.skin-green-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-green-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-red .main-header .navbar{background-color:#dd4b39}.skin-red .main-header .navbar .nav>li>a{color:#fff}.skin-red .main-header .navbar .nav>li>a:hover,.skin-red .main-header .navbar .nav>li>a:active,.skin-red .main-header .navbar .nav>li>a:focus,.skin-red .main-header .navbar .nav .open>a,.skin-red .main-header .navbar .nav .open>a:hover,.skin-red .main-header .navbar .nav .open>a:focus,.skin-red .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red .main-header .logo{background-color:#d73925;color:#fff;border-bottom:0 solid transparent}.skin-red .main-header .logo:hover{background-color:#d33724}.skin-red .main-header li.user-header{background-color:#dd4b39}.skin-red .content-header{background:transparent}.skin-red .wrapper,.skin-red .main-sidebar,.skin-red .left-side{background-color:#222d32}.skin-red .user-panel>.info,.skin-red .user-panel>.info>a{color:#fff}.skin-red .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-red .sidebar-menu>li>a{border-left:3px solid transparent}.skin-red .sidebar-menu>li:hover>a,.skin-red .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#dd4b39}.skin-red .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-red .sidebar a{color:#b8c7ce}.skin-red .sidebar a:hover{text-decoration:none}.skin-red .treeview-menu>li>a{color:#8aa4af}.skin-red .treeview-menu>li.active>a,.skin-red .treeview-menu>li>a:hover{color:#fff}.skin-red .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-red .sidebar-form input[type=\"text\"],.skin-red .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-red .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-red .sidebar-form input[type=\"text\"]:focus,.skin-red .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-red-light .main-header .navbar{background-color:#dd4b39}.skin-red-light .main-header .navbar .nav>li>a{color:#fff}.skin-red-light .main-header .navbar .nav>li>a:hover,.skin-red-light .main-header .navbar .nav>li>a:active,.skin-red-light .main-header .navbar .nav>li>a:focus,.skin-red-light .main-header .navbar .nav .open>a,.skin-red-light .main-header .navbar .nav .open>a:hover,.skin-red-light .main-header .navbar .nav .open>a:focus,.skin-red-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red-light .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red-light .main-header .logo{background-color:#dd4b39;color:#fff;border-bottom:0 solid transparent}.skin-red-light .main-header .logo:hover{background-color:#dc4735}.skin-red-light .main-header li.user-header{background-color:#dd4b39}.skin-red-light .content-header{background:transparent}.skin-red-light .wrapper,.skin-red-light .main-sidebar,.skin-red-light .left-side{background-color:#f9fafc}.skin-red-light .content-wrapper,.skin-red-light .main-footer{border-left:1px solid #d2d6de}.skin-red-light .user-panel>.info,.skin-red-light .user-panel>.info>a{color:#444}.skin-red-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-red-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-red-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-red-light .sidebar-menu>li:hover>a,.skin-red-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-red-light .sidebar-menu>li.active{border-left-color:#dd4b39}.skin-red-light .sidebar-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-red-light .sidebar a{color:#444}.skin-red-light .sidebar a:hover{text-decoration:none}.skin-red-light .treeview-menu>li>a{color:#777}.skin-red-light .treeview-menu>li.active>a,.skin-red-light .treeview-menu>li>a:hover{color:#000}.skin-red-light .treeview-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-red-light .sidebar-form input[type=\"text\"],.skin-red-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-red-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-red-light .sidebar-form input[type=\"text\"]:focus,.skin-red-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-red-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-yellow .main-header .navbar{background-color:#f39c12}.skin-yellow .main-header .navbar .nav>li>a{color:#fff}.skin-yellow .main-header .navbar .nav>li>a:hover,.skin-yellow .main-header .navbar .nav>li>a:active,.skin-yellow .main-header .navbar .nav>li>a:focus,.skin-yellow .main-header .navbar .nav .open>a,.skin-yellow .main-header .navbar .nav .open>a:hover,.skin-yellow .main-header .navbar .nav .open>a:focus,.skin-yellow .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow .main-header .logo{background-color:#e08e0b;color:#fff;border-bottom:0 solid transparent}.skin-yellow .main-header .logo:hover{background-color:#db8b0b}.skin-yellow .main-header li.user-header{background-color:#f39c12}.skin-yellow .content-header{background:transparent}.skin-yellow .wrapper,.skin-yellow .main-sidebar,.skin-yellow .left-side{background-color:#222d32}.skin-yellow .user-panel>.info,.skin-yellow .user-panel>.info>a{color:#fff}.skin-yellow .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-yellow .sidebar-menu>li>a{border-left:3px solid transparent}.skin-yellow .sidebar-menu>li:hover>a,.skin-yellow .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#f39c12}.skin-yellow .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-yellow .sidebar a{color:#b8c7ce}.skin-yellow .sidebar a:hover{text-decoration:none}.skin-yellow .treeview-menu>li>a{color:#8aa4af}.skin-yellow .treeview-menu>li.active>a,.skin-yellow .treeview-menu>li>a:hover{color:#fff}.skin-yellow .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-yellow .sidebar-form input[type=\"text\"],.skin-yellow .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-yellow .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-yellow .sidebar-form input[type=\"text\"]:focus,.skin-yellow .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-yellow-light .main-header .navbar{background-color:#f39c12}.skin-yellow-light .main-header .navbar .nav>li>a{color:#fff}.skin-yellow-light .main-header .navbar .nav>li>a:hover,.skin-yellow-light .main-header .navbar .nav>li>a:active,.skin-yellow-light .main-header .navbar .nav>li>a:focus,.skin-yellow-light .main-header .navbar .nav .open>a,.skin-yellow-light .main-header .navbar .nav .open>a:hover,.skin-yellow-light .main-header .navbar .nav .open>a:focus,.skin-yellow-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow-light .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow-light .main-header .logo{background-color:#f39c12;color:#fff;border-bottom:0 solid transparent}.skin-yellow-light .main-header .logo:hover{background-color:#f39a0d}.skin-yellow-light .main-header li.user-header{background-color:#f39c12}.skin-yellow-light .content-header{background:transparent}.skin-yellow-light .wrapper,.skin-yellow-light .main-sidebar,.skin-yellow-light .left-side{background-color:#f9fafc}.skin-yellow-light .content-wrapper,.skin-yellow-light .main-footer{border-left:1px solid #d2d6de}.skin-yellow-light .user-panel>.info,.skin-yellow-light .user-panel>.info>a{color:#444}.skin-yellow-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-yellow-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-yellow-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-yellow-light .sidebar-menu>li:hover>a,.skin-yellow-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-yellow-light .sidebar-menu>li.active{border-left-color:#f39c12}.skin-yellow-light .sidebar-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-yellow-light .sidebar a{color:#444}.skin-yellow-light .sidebar a:hover{text-decoration:none}.skin-yellow-light .treeview-menu>li>a{color:#777}.skin-yellow-light .treeview-menu>li.active>a,.skin-yellow-light .treeview-menu>li>a:hover{color:#000}.skin-yellow-light .treeview-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-yellow-light .sidebar-form input[type=\"text\"],.skin-yellow-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-yellow-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-yellow-light .sidebar-form input[type=\"text\"]:focus,.skin-yellow-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-yellow-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-purple .main-header .navbar{background-color:#605ca8}.skin-purple .main-header .navbar .nav>li>a{color:#fff}.skin-purple .main-header .navbar .nav>li>a:hover,.skin-purple .main-header .navbar .nav>li>a:active,.skin-purple .main-header .navbar .nav>li>a:focus,.skin-purple .main-header .navbar .nav .open>a,.skin-purple .main-header .navbar .nav .open>a:hover,.skin-purple .main-header .navbar .nav .open>a:focus,.skin-purple .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple .main-header .logo{background-color:#555299;color:#fff;border-bottom:0 solid transparent}.skin-purple .main-header .logo:hover{background-color:#545096}.skin-purple .main-header li.user-header{background-color:#605ca8}.skin-purple .content-header{background:transparent}.skin-purple .wrapper,.skin-purple .main-sidebar,.skin-purple .left-side{background-color:#222d32}.skin-purple .user-panel>.info,.skin-purple .user-panel>.info>a{color:#fff}.skin-purple .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-purple .sidebar-menu>li>a{border-left:3px solid transparent}.skin-purple .sidebar-menu>li:hover>a,.skin-purple .sidebar-menu>li.active>a{color:#fff;background:#1e282c;border-left-color:#605ca8}.skin-purple .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-purple .sidebar a{color:#b8c7ce}.skin-purple .sidebar a:hover{text-decoration:none}.skin-purple .treeview-menu>li>a{color:#8aa4af}.skin-purple .treeview-menu>li.active>a,.skin-purple .treeview-menu>li>a:hover{color:#fff}.skin-purple .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-purple .sidebar-form input[type=\"text\"],.skin-purple .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-purple .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-purple .sidebar-form input[type=\"text\"]:focus,.skin-purple .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-purple-light .main-header .navbar{background-color:#605ca8}.skin-purple-light .main-header .navbar .nav>li>a{color:#fff}.skin-purple-light .main-header .navbar .nav>li>a:hover,.skin-purple-light .main-header .navbar .nav>li>a:active,.skin-purple-light .main-header .navbar .nav>li>a:focus,.skin-purple-light .main-header .navbar .nav .open>a,.skin-purple-light .main-header .navbar .nav .open>a:hover,.skin-purple-light .main-header .navbar .nav .open>a:focus,.skin-purple-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple-light .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple-light .main-header .logo{background-color:#605ca8;color:#fff;border-bottom:0 solid transparent}.skin-purple-light .main-header .logo:hover{background-color:#5d59a6}.skin-purple-light .main-header li.user-header{background-color:#605ca8}.skin-purple-light .content-header{background:transparent}.skin-purple-light .wrapper,.skin-purple-light .main-sidebar,.skin-purple-light .left-side{background-color:#f9fafc}.skin-purple-light .content-wrapper,.skin-purple-light .main-footer{border-left:1px solid #d2d6de}.skin-purple-light .user-panel>.info,.skin-purple-light .user-panel>.info>a{color:#444}.skin-purple-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-purple-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-purple-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-purple-light .sidebar-menu>li:hover>a,.skin-purple-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-purple-light .sidebar-menu>li.active{border-left-color:#605ca8}.skin-purple-light .sidebar-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-purple-light .sidebar a{color:#444}.skin-purple-light .sidebar a:hover{text-decoration:none}.skin-purple-light .treeview-menu>li>a{color:#777}.skin-purple-light .treeview-menu>li.active>a,.skin-purple-light .treeview-menu>li>a:hover{color:#000}.skin-purple-light .treeview-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-purple-light .sidebar-form input[type=\"text\"],.skin-purple-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-purple-light .sidebar-form input[type=\"text\"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-purple-light .sidebar-form input[type=\"text\"]:focus,.skin-purple-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple-light .sidebar-form input[type=\"text\"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-purple-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}", ""]);
80697
80698 // exports
80699
80700
80701/***/ },
80702/* 775 */
80703/***/ function(module, exports, __webpack_require__) {
80704
80705 /* WEBPACK VAR INJECTION */(function(jQuery, $) {/*! AdminLTE app.js
80706 * ================
80707 * Main JS application file for AdminLTE v2. This file
80708 * should be included in all pages. It controls some layout
80709 * options and implements exclusive AdminLTE plugins.
80710 *
80711 * @Author Almsaeed Studio
80712 * @Support <http://www.almsaeedstudio.com>
80713 * @Email <abdullah@almsaeedstudio.com>
80714 * @version 2.3.7
80715 * @license MIT <http://opensource.org/licenses/MIT>
80716 */
80717
80718 //Make sure jQuery has been loaded before app.js
80719 if (typeof jQuery === "undefined") {
80720 throw new Error("AdminLTE requires jQuery");
80721 }
80722
80723 /* AdminLTE
80724 *
80725 * @type Object
80726 * @description $.AdminLTE is the main object for the template's app.
80727 * It's used for implementing functions and options related
80728 * to the template. Keeping everything wrapped in an object
80729 * prevents conflict with other plugins and is a better
80730 * way to organize our code.
80731 */
80732 $.AdminLTE = {};
80733
80734 /* --------------------
80735 * - AdminLTE Options -
80736 * --------------------
80737 * Modify these options to suit your implementation
80738 */
80739 $.AdminLTE.options = {
80740 //Add slimscroll to navbar menus
80741 //This requires you to load the slimscroll plugin
80742 //in every page before app.js
80743 navbarMenuSlimscroll: true,
80744 navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar
80745 navbarMenuHeight: "200px", //The height of the inner menu
80746 //General animation speed for JS animated elements such as box collapse/expand and
80747 //sidebar treeview slide up/down. This options accepts an integer as milliseconds,
80748 //'fast', 'normal', or 'slow'
80749 animationSpeed: 500,
80750 //Sidebar push menu toggle button selector
80751 sidebarToggleSelector: "[data-toggle='offcanvas']",
80752 //Activate sidebar push menu
80753 sidebarPushMenu: true,
80754 //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin)
80755 sidebarSlimScroll: true,
80756 //Enable sidebar expand on hover effect for sidebar mini
80757 //This option is forced to true if both the fixed layout and sidebar mini
80758 //are used together
80759 sidebarExpandOnHover: false,
80760 //BoxRefresh Plugin
80761 enableBoxRefresh: true,
80762 //Bootstrap.js tooltip
80763 enableBSToppltip: true,
80764 BSTooltipSelector: "[data-toggle='tooltip']",
80765 //Enable Fast Click. Fastclick.js creates a more
80766 //native touch experience with touch devices. If you
80767 //choose to enable the plugin, make sure you load the script
80768 //before AdminLTE's app.js
80769 enableFastclick: false,
80770 //Control Sidebar Options
80771 enableControlSidebar: true,
80772 controlSidebarOptions: {
80773 //Which button should trigger the open/close event
80774 toggleBtnSelector: "[data-toggle='control-sidebar']",
80775 //The sidebar selector
80776 selector: ".control-sidebar",
80777 //Enable slide over content
80778 slide: true
80779 },
80780 //Box Widget Plugin. Enable this plugin
80781 //to allow boxes to be collapsed and/or removed
80782 enableBoxWidget: true,
80783 //Box Widget plugin options
80784 boxWidgetOptions: {
80785 boxWidgetIcons: {
80786 //Collapse icon
80787 collapse: 'fa-minus',
80788 //Open icon
80789 open: 'fa-plus',
80790 //Remove icon
80791 remove: 'fa-times'
80792 },
80793 boxWidgetSelectors: {
80794 //Remove button selector
80795 remove: '[data-widget="remove"]',
80796 //Collapse button selector
80797 collapse: '[data-widget="collapse"]'
80798 }
80799 },
80800 //Direct Chat plugin options
80801 directChat: {
80802 //Enable direct chat by default
80803 enable: true,
80804 //The button to open and close the chat contacts pane
80805 contactToggleSelector: '[data-widget="chat-pane-toggle"]'
80806 },
80807 //Define the set of colors to use globally around the website
80808 colors: {
80809 lightBlue: "#3c8dbc",
80810 red: "#f56954",
80811 green: "#00a65a",
80812 aqua: "#00c0ef",
80813 yellow: "#f39c12",
80814 blue: "#0073b7",
80815 navy: "#001F3F",
80816 teal: "#39CCCC",
80817 olive: "#3D9970",
80818 lime: "#01FF70",
80819 orange: "#FF851B",
80820 fuchsia: "#F012BE",
80821 purple: "#8E24AA",
80822 maroon: "#D81B60",
80823 black: "#222222",
80824 gray: "#d2d6de"
80825 },
80826 //The standard screen sizes that bootstrap uses.
80827 //If you change these in the variables.less file, change
80828 //them here too.
80829 screenSizes: {
80830 xs: 480,
80831 sm: 768,
80832 md: 992,
80833 lg: 1200
80834 }
80835 };
80836
80837 /* ------------------
80838 * - Implementation -
80839 * ------------------
80840 * The next block of code implements AdminLTE's
80841 * functions and plugins as specified by the
80842 * options above.
80843 */
80844 $(function () {
80845 "use strict";
80846
80847 //Fix for IE page transitions
80848 $("body").removeClass("hold-transition");
80849
80850 //Extend options if external options exist
80851 if (typeof AdminLTEOptions !== "undefined") {
80852 $.extend(true,
80853 $.AdminLTE.options,
80854 AdminLTEOptions);
80855 }
80856
80857 //Easy access to options
80858 var o = $.AdminLTE.options;
80859
80860 //Set up the object
80861 _init();
80862
80863 //Activate the layout maker
80864 $.AdminLTE.layout.activate();
80865
80866 //Enable sidebar tree view controls
80867 $.AdminLTE.tree('.sidebar');
80868
80869 //Enable control sidebar
80870 if (o.enableControlSidebar) {
80871 $.AdminLTE.controlSidebar.activate();
80872 }
80873
80874 //Add slimscroll to navbar dropdown
80875 if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') {
80876 $(".navbar .menu").slimscroll({
80877 height: o.navbarMenuHeight,
80878 alwaysVisible: false,
80879 size: o.navbarMenuSlimscrollWidth
80880 }).css("width", "100%");
80881 }
80882
80883 //Activate sidebar push menu
80884 if (o.sidebarPushMenu) {
80885 $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector);
80886 }
80887
80888 //Activate Bootstrap tooltip
80889 if (o.enableBSToppltip) {
80890 $('body').tooltip({
80891 selector: o.BSTooltipSelector
80892 });
80893 }
80894
80895 //Activate box widget
80896 if (o.enableBoxWidget) {
80897 $.AdminLTE.boxWidget.activate();
80898 }
80899
80900 //Activate fast click
80901 if (o.enableFastclick && typeof FastClick != 'undefined') {
80902 FastClick.attach(document.body);
80903 }
80904
80905 //Activate direct chat widget
80906 if (o.directChat.enable) {
80907 $(document).on('click', o.directChat.contactToggleSelector, function () {
80908 var box = $(this).parents('.direct-chat').first();
80909 box.toggleClass('direct-chat-contacts-open');
80910 });
80911 }
80912
80913 /*
80914 * INITIALIZE BUTTON TOGGLE
80915 * ------------------------
80916 */
80917 $('.btn-group[data-toggle="btn-toggle"]').each(function () {
80918 var group = $(this);
80919 $(this).find(".btn").on('click', function (e) {
80920 group.find(".btn.active").removeClass("active");
80921 $(this).addClass("active");
80922 e.preventDefault();
80923 });
80924
80925 });
80926 });
80927
80928 /* ----------------------------------
80929 * - Initialize the AdminLTE Object -
80930 * ----------------------------------
80931 * All AdminLTE functions are implemented below.
80932 */
80933 function _init() {
80934 'use strict';
80935 /* Layout
80936 * ======
80937 * Fixes the layout height in case min-height fails.
80938 *
80939 * @type Object
80940 * @usage $.AdminLTE.layout.activate()
80941 * $.AdminLTE.layout.fix()
80942 * $.AdminLTE.layout.fixSidebar()
80943 */
80944 $.AdminLTE.layout = {
80945 activate: function () {
80946 var _this = this;
80947 _this.fix();
80948 _this.fixSidebar();
80949 $(window, ".wrapper").resize(function () {
80950 _this.fix();
80951 _this.fixSidebar();
80952 });
80953 },
80954 fix: function () {
80955 //Get window height and the wrapper height
80956 var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight();
80957 var window_height = $(window).height();
80958 var sidebar_height = $(".sidebar").height();
80959 //Set the min-height of the content and sidebar based on the
80960 //the height of the document.
80961 if ($("body").hasClass("fixed")) {
80962 $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight());
80963 } else {
80964 var postSetWidth;
80965 if (window_height >= sidebar_height) {
80966 $(".content-wrapper, .right-side").css('min-height', window_height - neg);
80967 postSetWidth = window_height - neg;
80968 } else {
80969 $(".content-wrapper, .right-side").css('min-height', sidebar_height);
80970 postSetWidth = sidebar_height;
80971 }
80972
80973 //Fix for the control sidebar height
80974 var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector);
80975 if (typeof controlSidebar !== "undefined") {
80976 if (controlSidebar.height() > postSetWidth)
80977 $(".content-wrapper, .right-side").css('min-height', controlSidebar.height());
80978 }
80979
80980 }
80981 },
80982 fixSidebar: function () {
80983 //Make sure the body tag has the .fixed class
80984 if (!$("body").hasClass("fixed")) {
80985 if (typeof $.fn.slimScroll != 'undefined') {
80986 $(".sidebar").slimScroll({destroy: true}).height("auto");
80987 }
80988 return;
80989 } else if (typeof $.fn.slimScroll == 'undefined' && window.console) {
80990 window.console.error("Error: the fixed layout requires the slimscroll plugin!");
80991 }
80992 //Enable slimscroll for fixed layout
80993 if ($.AdminLTE.options.sidebarSlimScroll) {
80994 if (typeof $.fn.slimScroll != 'undefined') {
80995 //Destroy if it exists
80996 $(".sidebar").slimScroll({destroy: true}).height("auto");
80997 //Add slimscroll
80998 $(".sidebar").slimscroll({
80999 height: ($(window).height() - $(".main-header").height()) + "px",
81000 color: "rgba(0,0,0,0.2)",
81001 size: "3px"
81002 });
81003 }
81004 }
81005 }
81006 };
81007
81008 /* PushMenu()
81009 * ==========
81010 * Adds the push menu functionality to the sidebar.
81011 *
81012 * @type Function
81013 * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']")
81014 */
81015 $.AdminLTE.pushMenu = {
81016 activate: function (toggleBtn) {
81017 //Get the screen sizes
81018 var screenSizes = $.AdminLTE.options.screenSizes;
81019
81020 //Enable sidebar toggle
81021 $(document).on('click', toggleBtn, function (e) {
81022 e.preventDefault();
81023
81024 //Enable sidebar push menu
81025 if ($(window).width() > (screenSizes.sm - 1)) {
81026 if ($("body").hasClass('sidebar-collapse')) {
81027 $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu');
81028 } else {
81029 $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu');
81030 }
81031 }
81032 //Handle sidebar push menu for small screens
81033 else {
81034 if ($("body").hasClass('sidebar-open')) {
81035 $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu');
81036 } else {
81037 $("body").addClass('sidebar-open').trigger('expanded.pushMenu');
81038 }
81039 }
81040 });
81041
81042 $(".content-wrapper").click(function () {
81043 //Enable hide menu when clicking on the content-wrapper on small screens
81044 if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) {
81045 $("body").removeClass('sidebar-open');
81046 }
81047 });
81048
81049 //Enable expand on hover for sidebar mini
81050 if ($.AdminLTE.options.sidebarExpandOnHover
81051 || ($('body').hasClass('fixed')
81052 && $('body').hasClass('sidebar-mini'))) {
81053 this.expandOnHover();
81054 }
81055 },
81056 expandOnHover: function () {
81057 var _this = this;
81058 var screenWidth = $.AdminLTE.options.screenSizes.sm - 1;
81059 //Expand sidebar on hover
81060 $('.main-sidebar').hover(function () {
81061 if ($('body').hasClass('sidebar-mini')
81062 && $("body").hasClass('sidebar-collapse')
81063 && $(window).width() > screenWidth) {
81064 _this.expand();
81065 }
81066 }, function () {
81067 if ($('body').hasClass('sidebar-mini')
81068 && $('body').hasClass('sidebar-expanded-on-hover')
81069 && $(window).width() > screenWidth) {
81070 _this.collapse();
81071 }
81072 });
81073 },
81074 expand: function () {
81075 $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover');
81076 },
81077 collapse: function () {
81078 if ($('body').hasClass('sidebar-expanded-on-hover')) {
81079 $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse');
81080 }
81081 }
81082 };
81083
81084 /* Tree()
81085 * ======
81086 * Converts the sidebar into a multilevel
81087 * tree view menu.
81088 *
81089 * @type Function
81090 * @Usage: $.AdminLTE.tree('.sidebar')
81091 */
81092 $.AdminLTE.tree = function (menu) {
81093 var _this = this;
81094 var animationSpeed = $.AdminLTE.options.animationSpeed;
81095 $(document).off('click', menu + ' li a')
81096 .on('click', menu + ' li a', function (e) {
81097 //Get the clicked link and the next element
81098 var $this = $(this);
81099 var checkElement = $this.next();
81100
81101 //Check if the next element is a menu and is visible
81102 if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
81103 //Close the menu
81104 checkElement.slideUp(animationSpeed, function () {
81105 checkElement.removeClass('menu-open');
81106 //Fix the layout in case the sidebar stretches over the height of the window
81107 //_this.layout.fix();
81108 });
81109 checkElement.parent("li").removeClass("active");
81110 }
81111 //If the menu is not visible
81112 else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) {
81113 //Get the parent menu
81114 var parent = $this.parents('ul').first();
81115 //Close all open menus within the parent
81116 var ul = parent.find('ul:visible').slideUp(animationSpeed);
81117 //Remove the menu-open class from the parent
81118 ul.removeClass('menu-open');
81119 //Get the parent li
81120 var parent_li = $this.parent("li");
81121
81122 //Open the target menu and add the menu-open class
81123 checkElement.slideDown(animationSpeed, function () {
81124 //Add the class active to the parent li
81125 checkElement.addClass('menu-open');
81126 parent.find('li.active').removeClass('active');
81127 parent_li.addClass('active');
81128 //Fix the layout in case the sidebar stretches over the height of the window
81129 _this.layout.fix();
81130 });
81131 }
81132 //if this isn't a link, prevent the page from being redirected
81133 if (checkElement.is('.treeview-menu')) {
81134 e.preventDefault();
81135 }
81136 });
81137 };
81138
81139 /* ControlSidebar
81140 * ==============
81141 * Adds functionality to the right sidebar
81142 *
81143 * @type Object
81144 * @usage $.AdminLTE.controlSidebar.activate(options)
81145 */
81146 $.AdminLTE.controlSidebar = {
81147 //instantiate the object
81148 activate: function () {
81149 //Get the object
81150 var _this = this;
81151 //Update options
81152 var o = $.AdminLTE.options.controlSidebarOptions;
81153 //Get the sidebar
81154 var sidebar = $(o.selector);
81155 //The toggle button
81156 var btn = $(o.toggleBtnSelector);
81157
81158 //Listen to the click event
81159 btn.on('click', function (e) {
81160 e.preventDefault();
81161 //If the sidebar is not open
81162 if (!sidebar.hasClass('control-sidebar-open')
81163 && !$('body').hasClass('control-sidebar-open')) {
81164 //Open the sidebar
81165 _this.open(sidebar, o.slide);
81166 } else {
81167 _this.close(sidebar, o.slide);
81168 }
81169 });
81170
81171 //If the body has a boxed layout, fix the sidebar bg position
81172 var bg = $(".control-sidebar-bg");
81173 _this._fix(bg);
81174
81175 //If the body has a fixed layout, make the control sidebar fixed
81176 if ($('body').hasClass('fixed')) {
81177 _this._fixForFixed(sidebar);
81178 } else {
81179 //If the content height is less than the sidebar's height, force max height
81180 if ($('.content-wrapper, .right-side').height() < sidebar.height()) {
81181 _this._fixForContent(sidebar);
81182 }
81183 }
81184 },
81185 //Open the control sidebar
81186 open: function (sidebar, slide) {
81187 //Slide over content
81188 if (slide) {
81189 sidebar.addClass('control-sidebar-open');
81190 } else {
81191 //Push the content by adding the open class to the body instead
81192 //of the sidebar itself
81193 $('body').addClass('control-sidebar-open');
81194 }
81195 },
81196 //Close the control sidebar
81197 close: function (sidebar, slide) {
81198 if (slide) {
81199 sidebar.removeClass('control-sidebar-open');
81200 } else {
81201 $('body').removeClass('control-sidebar-open');
81202 }
81203 },
81204 _fix: function (sidebar) {
81205 var _this = this;
81206 if ($("body").hasClass('layout-boxed')) {
81207 sidebar.css('position', 'absolute');
81208 sidebar.height($(".wrapper").height());
81209 if (_this.hasBindedResize) {
81210 return;
81211 }
81212 $(window).resize(function () {
81213 _this._fix(sidebar);
81214 });
81215 _this.hasBindedResize = true;
81216 } else {
81217 sidebar.css({
81218 'position': 'fixed',
81219 'height': 'auto'
81220 });
81221 }
81222 },
81223 _fixForFixed: function (sidebar) {
81224 sidebar.css({
81225 'position': 'fixed',
81226 'max-height': '100%',
81227 'overflow': 'auto',
81228 'padding-bottom': '50px'
81229 });
81230 },
81231 _fixForContent: function (sidebar) {
81232 $(".content-wrapper, .right-side").css('min-height', sidebar.height());
81233 }
81234 };
81235
81236 /* BoxWidget
81237 * =========
81238 * BoxWidget is a plugin to handle collapsing and
81239 * removing boxes from the screen.
81240 *
81241 * @type Object
81242 * @usage $.AdminLTE.boxWidget.activate()
81243 * Set all your options in the main $.AdminLTE.options object
81244 */
81245 $.AdminLTE.boxWidget = {
81246 selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors,
81247 icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons,
81248 animationSpeed: $.AdminLTE.options.animationSpeed,
81249 activate: function (_box) {
81250 var _this = this;
81251 if (!_box) {
81252 _box = document; // activate all boxes per default
81253 }
81254 //Listen for collapse event triggers
81255 $(_box).on('click', _this.selectors.collapse, function (e) {
81256 e.preventDefault();
81257 _this.collapse($(this));
81258 });
81259
81260 //Listen for remove event triggers
81261 $(_box).on('click', _this.selectors.remove, function (e) {
81262 e.preventDefault();
81263 _this.remove($(this));
81264 });
81265 },
81266 collapse: function (element) {
81267 var _this = this;
81268 //Find the box parent
81269 var box = element.parents(".box").first();
81270 //Find the body and the footer
81271 var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer");
81272 if (!box.hasClass("collapsed-box")) {
81273 //Convert minus into plus
81274 element.children(":first")
81275 .removeClass(_this.icons.collapse)
81276 .addClass(_this.icons.open);
81277 //Hide the content
81278 box_content.slideUp(_this.animationSpeed, function () {
81279 box.addClass("collapsed-box");
81280 });
81281 } else {
81282 //Convert plus into minus
81283 element.children(":first")
81284 .removeClass(_this.icons.open)
81285 .addClass(_this.icons.collapse);
81286 //Show the content
81287 box_content.slideDown(_this.animationSpeed, function () {
81288 box.removeClass("collapsed-box");
81289 });
81290 }
81291 },
81292 remove: function (element) {
81293 //Find the box parent
81294 var box = element.parents(".box").first();
81295 box.slideUp(this.animationSpeed);
81296 }
81297 };
81298 }
81299
81300 /* ------------------
81301 * - Custom Plugins -
81302 * ------------------
81303 * All custom plugins are defined below.
81304 */
81305
81306 /*
81307 * BOX REFRESH BUTTON
81308 * ------------------
81309 * This is a custom plugin to use with the component BOX. It allows you to add
81310 * a refresh button to the box. It converts the box's state to a loading state.
81311 *
81312 * @type plugin
81313 * @usage $("#box-widget").boxRefresh( options );
81314 */
81315 (function ($) {
81316
81317 "use strict";
81318
81319 $.fn.boxRefresh = function (options) {
81320
81321 // Render options
81322 var settings = $.extend({
81323 //Refresh button selector
81324 trigger: ".refresh-btn",
81325 //File source to be loaded (e.g: ajax/src.php)
81326 source: "",
81327 //Callbacks
81328 onLoadStart: function (box) {
81329 return box;
81330 }, //Right after the button has been clicked
81331 onLoadDone: function (box) {
81332 return box;
81333 } //When the source has been loaded
81334
81335 }, options);
81336
81337 //The overlay
81338 var overlay = $('<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>');
81339
81340 return this.each(function () {
81341 //if a source is specified
81342 if (settings.source === "") {
81343 if (window.console) {
81344 window.console.log("Please specify a source first - boxRefresh()");
81345 }
81346 return;
81347 }
81348 //the box
81349 var box = $(this);
81350 //the button
81351 var rBtn = box.find(settings.trigger).first();
81352
81353 //On trigger click
81354 rBtn.on('click', function (e) {
81355 e.preventDefault();
81356 //Add loading overlay
81357 start(box);
81358
81359 //Perform ajax call
81360 box.find(".box-body").load(settings.source, function () {
81361 done(box);
81362 });
81363 });
81364 });
81365
81366 function start(box) {
81367 //Add overlay and loading img
81368 box.append(overlay);
81369
81370 settings.onLoadStart.call(box);
81371 }
81372
81373 function done(box) {
81374 //Remove overlay and loading img
81375 box.find(overlay).remove();
81376
81377 settings.onLoadDone.call(box);
81378 }
81379
81380 };
81381
81382 })(jQuery);
81383
81384 /*
81385 * EXPLICIT BOX CONTROLS
81386 * -----------------------
81387 * This is a custom plugin to use with the component BOX. It allows you to activate
81388 * a box inserted in the DOM after the app.js was loaded, toggle and remove box.
81389 *
81390 * @type plugin
81391 * @usage $("#box-widget").activateBox();
81392 * @usage $("#box-widget").toggleBox();
81393 * @usage $("#box-widget").removeBox();
81394 */
81395 (function ($) {
81396
81397 'use strict';
81398
81399 $.fn.activateBox = function () {
81400 $.AdminLTE.boxWidget.activate(this);
81401 };
81402
81403 $.fn.toggleBox = function () {
81404 var button = $($.AdminLTE.boxWidget.selectors.collapse, this);
81405 $.AdminLTE.boxWidget.collapse(button);
81406 };
81407
81408 $.fn.removeBox = function () {
81409 var button = $($.AdminLTE.boxWidget.selectors.remove, this);
81410 $.AdminLTE.boxWidget.remove(button);
81411 };
81412
81413 })(jQuery);
81414
81415 /*
81416 * TODO LIST CUSTOM PLUGIN
81417 * -----------------------
81418 * This plugin depends on iCheck plugin for checkbox and radio inputs
81419 *
81420 * @type plugin
81421 * @usage $("#todo-widget").todolist( options );
81422 */
81423 (function ($) {
81424
81425 'use strict';
81426
81427 $.fn.todolist = function (options) {
81428 // Render options
81429 var settings = $.extend({
81430 //When the user checks the input
81431 onCheck: function (ele) {
81432 return ele;
81433 },
81434 //When the user unchecks the input
81435 onUncheck: function (ele) {
81436 return ele;
81437 }
81438 }, options);
81439
81440 return this.each(function () {
81441
81442 if (typeof $.fn.iCheck != 'undefined') {
81443 $('input', this).on('ifChecked', function () {
81444 var ele = $(this).parents("li").first();
81445 ele.toggleClass("done");
81446 settings.onCheck.call(ele);
81447 });
81448
81449 $('input', this).on('ifUnchecked', function () {
81450 var ele = $(this).parents("li").first();
81451 ele.toggleClass("done");
81452 settings.onUncheck.call(ele);
81453 });
81454 } else {
81455 $('input', this).on('change', function () {
81456 var ele = $(this).parents("li").first();
81457 ele.toggleClass("done");
81458 if ($('input', ele).is(":checked")) {
81459 settings.onCheck.call(ele);
81460 } else {
81461 settings.onUncheck.call(ele);
81462 }
81463 });
81464 }
81465 });
81466 };
81467 }(jQuery));
81468
81469 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(614), __webpack_require__(614)))
81470
81471/***/ },
81472/* 776 */
81473/***/ function(module, exports, __webpack_require__) {
81474
81475 __webpack_require__(777);
81476
81477
81478/***/ },
81479/* 777 */
81480/***/ function(module, exports, __webpack_require__) {
81481
81482 // style-loader: Adds some css to the DOM by adding a <style> tag
81483
81484 // load the styles
81485 var content = __webpack_require__(778);
81486 if(typeof content === 'string') content = [[module.id, content, '']];
81487 // add the styles to the DOM
81488 var update = __webpack_require__(786)(content, {});
81489 if(content.locals) module.exports = content.locals;
81490 // Hot Module Replacement
81491 if(false) {
81492 // When the styles change, update the <style> tags
81493 if(!content.locals) {
81494 module.hot.accept("!!./node_modules/css-loader/index.js!./../less-loader/index.js!./font-awesome-styles.loader.js!./font-awesome.config.js", function() {
81495 var newContent = require("!!./node_modules/css-loader/index.js!./../less-loader/index.js!./font-awesome-styles.loader.js!./font-awesome.config.js");
81496 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
81497 update(newContent);
81498 });
81499 }
81500 // When the module is disposed, remove the <style> tags
81501 module.hot.dispose(function() { update(); });
81502 }
81503
81504/***/ },
81505/* 778 */
81506/***/ function(module, exports, __webpack_require__) {
81507
81508 exports = module.exports = __webpack_require__(779)();
81509 // imports
81510
81511
81512 // module
81513 exports.push([module.id, ".fa-border {\n padding: .2em .25em .15em;\n border: solid 0.08em #eee;\n border-radius: .1em;\n}\n.fa-pull-left {\n float: left;\n}\n.fa-pull-right {\n float: right;\n}\n.fa.fa-pull-left {\n margin-right: .3em;\n}\n.fa.fa-pull-right {\n margin-left: .3em;\n}\n/* Deprecated as of 4.4.0 */\n.pull-right {\n float: right;\n}\n.pull-left {\n float: left;\n}\n.fa.pull-left {\n margin-right: .3em;\n}\n.fa.pull-right {\n margin-left: .3em;\n}\n.fa {\n display: inline-block;\n font: normal normal normal 14px/1 FontAwesome;\n font-size: inherit;\n text-rendering: auto;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.fa-fw {\n width: 1.28571429em;\n text-align: center;\n}\n/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen\n readers do not read off random characters that represent icons */\n.fa-glass:before {\n content: \"\\F000\";\n}\n.fa-music:before {\n content: \"\\F001\";\n}\n.fa-search:before {\n content: \"\\F002\";\n}\n.fa-envelope-o:before {\n content: \"\\F003\";\n}\n.fa-heart:before {\n content: \"\\F004\";\n}\n.fa-star:before {\n content: \"\\F005\";\n}\n.fa-star-o:before {\n content: \"\\F006\";\n}\n.fa-user:before {\n content: \"\\F007\";\n}\n.fa-film:before {\n content: \"\\F008\";\n}\n.fa-th-large:before {\n content: \"\\F009\";\n}\n.fa-th:before {\n content: \"\\F00A\";\n}\n.fa-th-list:before {\n content: \"\\F00B\";\n}\n.fa-check:before {\n content: \"\\F00C\";\n}\n.fa-remove:before,\n.fa-close:before,\n.fa-times:before {\n content: \"\\F00D\";\n}\n.fa-search-plus:before {\n content: \"\\F00E\";\n}\n.fa-search-minus:before {\n content: \"\\F010\";\n}\n.fa-power-off:before {\n content: \"\\F011\";\n}\n.fa-signal:before {\n content: \"\\F012\";\n}\n.fa-gear:before,\n.fa-cog:before {\n content: \"\\F013\";\n}\n.fa-trash-o:before {\n content: \"\\F014\";\n}\n.fa-home:before {\n content: \"\\F015\";\n}\n.fa-file-o:before {\n content: \"\\F016\";\n}\n.fa-clock-o:before {\n content: \"\\F017\";\n}\n.fa-road:before {\n content: \"\\F018\";\n}\n.fa-download:before {\n content: \"\\F019\";\n}\n.fa-arrow-circle-o-down:before {\n content: \"\\F01A\";\n}\n.fa-arrow-circle-o-up:before {\n content: \"\\F01B\";\n}\n.fa-inbox:before {\n content: \"\\F01C\";\n}\n.fa-play-circle-o:before {\n content: \"\\F01D\";\n}\n.fa-rotate-right:before,\n.fa-repeat:before {\n content: \"\\F01E\";\n}\n.fa-refresh:before {\n content: \"\\F021\";\n}\n.fa-list-alt:before {\n content: \"\\F022\";\n}\n.fa-lock:before {\n content: \"\\F023\";\n}\n.fa-flag:before {\n content: \"\\F024\";\n}\n.fa-headphones:before {\n content: \"\\F025\";\n}\n.fa-volume-off:before {\n content: \"\\F026\";\n}\n.fa-volume-down:before {\n content: \"\\F027\";\n}\n.fa-volume-up:before {\n content: \"\\F028\";\n}\n.fa-qrcode:before {\n content: \"\\F029\";\n}\n.fa-barcode:before {\n content: \"\\F02A\";\n}\n.fa-tag:before {\n content: \"\\F02B\";\n}\n.fa-tags:before {\n content: \"\\F02C\";\n}\n.fa-book:before {\n content: \"\\F02D\";\n}\n.fa-bookmark:before {\n content: \"\\F02E\";\n}\n.fa-print:before {\n content: \"\\F02F\";\n}\n.fa-camera:before {\n content: \"\\F030\";\n}\n.fa-font:before {\n content: \"\\F031\";\n}\n.fa-bold:before {\n content: \"\\F032\";\n}\n.fa-italic:before {\n content: \"\\F033\";\n}\n.fa-text-height:before {\n content: \"\\F034\";\n}\n.fa-text-width:before {\n content: \"\\F035\";\n}\n.fa-align-left:before {\n content: \"\\F036\";\n}\n.fa-align-center:before {\n content: \"\\F037\";\n}\n.fa-align-right:before {\n content: \"\\F038\";\n}\n.fa-align-justify:before {\n content: \"\\F039\";\n}\n.fa-list:before {\n content: \"\\F03A\";\n}\n.fa-dedent:before,\n.fa-outdent:before {\n content: \"\\F03B\";\n}\n.fa-indent:before {\n content: \"\\F03C\";\n}\n.fa-video-camera:before {\n content: \"\\F03D\";\n}\n.fa-photo:before,\n.fa-image:before,\n.fa-picture-o:before {\n content: \"\\F03E\";\n}\n.fa-pencil:before {\n content: \"\\F040\";\n}\n.fa-map-marker:before {\n content: \"\\F041\";\n}\n.fa-adjust:before {\n content: \"\\F042\";\n}\n.fa-tint:before {\n content: \"\\F043\";\n}\n.fa-edit:before,\n.fa-pencil-square-o:before {\n content: \"\\F044\";\n}\n.fa-share-square-o:before {\n content: \"\\F045\";\n}\n.fa-check-square-o:before {\n content: \"\\F046\";\n}\n.fa-arrows:before {\n content: \"\\F047\";\n}\n.fa-step-backward:before {\n content: \"\\F048\";\n}\n.fa-fast-backward:before {\n content: \"\\F049\";\n}\n.fa-backward:before {\n content: \"\\F04A\";\n}\n.fa-play:before {\n content: \"\\F04B\";\n}\n.fa-pause:before {\n content: \"\\F04C\";\n}\n.fa-stop:before {\n content: \"\\F04D\";\n}\n.fa-forward:before {\n content: \"\\F04E\";\n}\n.fa-fast-forward:before {\n content: \"\\F050\";\n}\n.fa-step-forward:before {\n content: \"\\F051\";\n}\n.fa-eject:before {\n content: \"\\F052\";\n}\n.fa-chevron-left:before {\n content: \"\\F053\";\n}\n.fa-chevron-right:before {\n content: \"\\F054\";\n}\n.fa-plus-circle:before {\n content: \"\\F055\";\n}\n.fa-minus-circle:before {\n content: \"\\F056\";\n}\n.fa-times-circle:before {\n content: \"\\F057\";\n}\n.fa-check-circle:before {\n content: \"\\F058\";\n}\n.fa-question-circle:before {\n content: \"\\F059\";\n}\n.fa-info-circle:before {\n content: \"\\F05A\";\n}\n.fa-crosshairs:before {\n content: \"\\F05B\";\n}\n.fa-times-circle-o:before {\n content: \"\\F05C\";\n}\n.fa-check-circle-o:before {\n content: \"\\F05D\";\n}\n.fa-ban:before {\n content: \"\\F05E\";\n}\n.fa-arrow-left:before {\n content: \"\\F060\";\n}\n.fa-arrow-right:before {\n content: \"\\F061\";\n}\n.fa-arrow-up:before {\n content: \"\\F062\";\n}\n.fa-arrow-down:before {\n content: \"\\F063\";\n}\n.fa-mail-forward:before,\n.fa-share:before {\n content: \"\\F064\";\n}\n.fa-expand:before {\n content: \"\\F065\";\n}\n.fa-compress:before {\n content: \"\\F066\";\n}\n.fa-plus:before {\n content: \"\\F067\";\n}\n.fa-minus:before {\n content: \"\\F068\";\n}\n.fa-asterisk:before {\n content: \"\\F069\";\n}\n.fa-exclamation-circle:before {\n content: \"\\F06A\";\n}\n.fa-gift:before {\n content: \"\\F06B\";\n}\n.fa-leaf:before {\n content: \"\\F06C\";\n}\n.fa-fire:before {\n content: \"\\F06D\";\n}\n.fa-eye:before {\n content: \"\\F06E\";\n}\n.fa-eye-slash:before {\n content: \"\\F070\";\n}\n.fa-warning:before,\n.fa-exclamation-triangle:before {\n content: \"\\F071\";\n}\n.fa-plane:before {\n content: \"\\F072\";\n}\n.fa-calendar:before {\n content: \"\\F073\";\n}\n.fa-random:before {\n content: \"\\F074\";\n}\n.fa-comment:before {\n content: \"\\F075\";\n}\n.fa-magnet:before {\n content: \"\\F076\";\n}\n.fa-chevron-up:before {\n content: \"\\F077\";\n}\n.fa-chevron-down:before {\n content: \"\\F078\";\n}\n.fa-retweet:before {\n content: \"\\F079\";\n}\n.fa-shopping-cart:before {\n content: \"\\F07A\";\n}\n.fa-folder:before {\n content: \"\\F07B\";\n}\n.fa-folder-open:before {\n content: \"\\F07C\";\n}\n.fa-arrows-v:before {\n content: \"\\F07D\";\n}\n.fa-arrows-h:before {\n content: \"\\F07E\";\n}\n.fa-bar-chart-o:before,\n.fa-bar-chart:before {\n content: \"\\F080\";\n}\n.fa-twitter-square:before {\n content: \"\\F081\";\n}\n.fa-facebook-square:before {\n content: \"\\F082\";\n}\n.fa-camera-retro:before {\n content: \"\\F083\";\n}\n.fa-key:before {\n content: \"\\F084\";\n}\n.fa-gears:before,\n.fa-cogs:before {\n content: \"\\F085\";\n}\n.fa-comments:before {\n content: \"\\F086\";\n}\n.fa-thumbs-o-up:before {\n content: \"\\F087\";\n}\n.fa-thumbs-o-down:before {\n content: \"\\F088\";\n}\n.fa-star-half:before {\n content: \"\\F089\";\n}\n.fa-heart-o:before {\n content: \"\\F08A\";\n}\n.fa-sign-out:before {\n content: \"\\F08B\";\n}\n.fa-linkedin-square:before {\n content: \"\\F08C\";\n}\n.fa-thumb-tack:before {\n content: \"\\F08D\";\n}\n.fa-external-link:before {\n content: \"\\F08E\";\n}\n.fa-sign-in:before {\n content: \"\\F090\";\n}\n.fa-trophy:before {\n content: \"\\F091\";\n}\n.fa-github-square:before {\n content: \"\\F092\";\n}\n.fa-upload:before {\n content: \"\\F093\";\n}\n.fa-lemon-o:before {\n content: \"\\F094\";\n}\n.fa-phone:before {\n content: \"\\F095\";\n}\n.fa-square-o:before {\n content: \"\\F096\";\n}\n.fa-bookmark-o:before {\n content: \"\\F097\";\n}\n.fa-phone-square:before {\n content: \"\\F098\";\n}\n.fa-twitter:before {\n content: \"\\F099\";\n}\n.fa-facebook-f:before,\n.fa-facebook:before {\n content: \"\\F09A\";\n}\n.fa-github:before {\n content: \"\\F09B\";\n}\n.fa-unlock:before {\n content: \"\\F09C\";\n}\n.fa-credit-card:before {\n content: \"\\F09D\";\n}\n.fa-feed:before,\n.fa-rss:before {\n content: \"\\F09E\";\n}\n.fa-hdd-o:before {\n content: \"\\F0A0\";\n}\n.fa-bullhorn:before {\n content: \"\\F0A1\";\n}\n.fa-bell:before {\n content: \"\\F0F3\";\n}\n.fa-certificate:before {\n content: \"\\F0A3\";\n}\n.fa-hand-o-right:before {\n content: \"\\F0A4\";\n}\n.fa-hand-o-left:before {\n content: \"\\F0A5\";\n}\n.fa-hand-o-up:before {\n content: \"\\F0A6\";\n}\n.fa-hand-o-down:before {\n content: \"\\F0A7\";\n}\n.fa-arrow-circle-left:before {\n content: \"\\F0A8\";\n}\n.fa-arrow-circle-right:before {\n content: \"\\F0A9\";\n}\n.fa-arrow-circle-up:before {\n content: \"\\F0AA\";\n}\n.fa-arrow-circle-down:before {\n content: \"\\F0AB\";\n}\n.fa-globe:before {\n content: \"\\F0AC\";\n}\n.fa-wrench:before {\n content: \"\\F0AD\";\n}\n.fa-tasks:before {\n content: \"\\F0AE\";\n}\n.fa-filter:before {\n content: \"\\F0B0\";\n}\n.fa-briefcase:before {\n content: \"\\F0B1\";\n}\n.fa-arrows-alt:before {\n content: \"\\F0B2\";\n}\n.fa-group:before,\n.fa-users:before {\n content: \"\\F0C0\";\n}\n.fa-chain:before,\n.fa-link:before {\n content: \"\\F0C1\";\n}\n.fa-cloud:before {\n content: \"\\F0C2\";\n}\n.fa-flask:before {\n content: \"\\F0C3\";\n}\n.fa-cut:before,\n.fa-scissors:before {\n content: \"\\F0C4\";\n}\n.fa-copy:before,\n.fa-files-o:before {\n content: \"\\F0C5\";\n}\n.fa-paperclip:before {\n content: \"\\F0C6\";\n}\n.fa-save:before,\n.fa-floppy-o:before {\n content: \"\\F0C7\";\n}\n.fa-square:before {\n content: \"\\F0C8\";\n}\n.fa-navicon:before,\n.fa-reorder:before,\n.fa-bars:before {\n content: \"\\F0C9\";\n}\n.fa-list-ul:before {\n content: \"\\F0CA\";\n}\n.fa-list-ol:before {\n content: \"\\F0CB\";\n}\n.fa-strikethrough:before {\n content: \"\\F0CC\";\n}\n.fa-underline:before {\n content: \"\\F0CD\";\n}\n.fa-table:before {\n content: \"\\F0CE\";\n}\n.fa-magic:before {\n content: \"\\F0D0\";\n}\n.fa-truck:before {\n content: \"\\F0D1\";\n}\n.fa-pinterest:before {\n content: \"\\F0D2\";\n}\n.fa-pinterest-square:before {\n content: \"\\F0D3\";\n}\n.fa-google-plus-square:before {\n content: \"\\F0D4\";\n}\n.fa-google-plus:before {\n content: \"\\F0D5\";\n}\n.fa-money:before {\n content: \"\\F0D6\";\n}\n.fa-caret-down:before {\n content: \"\\F0D7\";\n}\n.fa-caret-up:before {\n content: \"\\F0D8\";\n}\n.fa-caret-left:before {\n content: \"\\F0D9\";\n}\n.fa-caret-right:before {\n content: \"\\F0DA\";\n}\n.fa-columns:before {\n content: \"\\F0DB\";\n}\n.fa-unsorted:before,\n.fa-sort:before {\n content: \"\\F0DC\";\n}\n.fa-sort-down:before,\n.fa-sort-desc:before {\n content: \"\\F0DD\";\n}\n.fa-sort-up:before,\n.fa-sort-asc:before {\n content: \"\\F0DE\";\n}\n.fa-envelope:before {\n content: \"\\F0E0\";\n}\n.fa-linkedin:before {\n content: \"\\F0E1\";\n}\n.fa-rotate-left:before,\n.fa-undo:before {\n content: \"\\F0E2\";\n}\n.fa-legal:before,\n.fa-gavel:before {\n content: \"\\F0E3\";\n}\n.fa-dashboard:before,\n.fa-tachometer:before {\n content: \"\\F0E4\";\n}\n.fa-comment-o:before {\n content: \"\\F0E5\";\n}\n.fa-comments-o:before {\n content: \"\\F0E6\";\n}\n.fa-flash:before,\n.fa-bolt:before {\n content: \"\\F0E7\";\n}\n.fa-sitemap:before {\n content: \"\\F0E8\";\n}\n.fa-umbrella:before {\n content: \"\\F0E9\";\n}\n.fa-paste:before,\n.fa-clipboard:before {\n content: \"\\F0EA\";\n}\n.fa-lightbulb-o:before {\n content: \"\\F0EB\";\n}\n.fa-exchange:before {\n content: \"\\F0EC\";\n}\n.fa-cloud-download:before {\n content: \"\\F0ED\";\n}\n.fa-cloud-upload:before {\n content: \"\\F0EE\";\n}\n.fa-user-md:before {\n content: \"\\F0F0\";\n}\n.fa-stethoscope:before {\n content: \"\\F0F1\";\n}\n.fa-suitcase:before {\n content: \"\\F0F2\";\n}\n.fa-bell-o:before {\n content: \"\\F0A2\";\n}\n.fa-coffee:before {\n content: \"\\F0F4\";\n}\n.fa-cutlery:before {\n content: \"\\F0F5\";\n}\n.fa-file-text-o:before {\n content: \"\\F0F6\";\n}\n.fa-building-o:before {\n content: \"\\F0F7\";\n}\n.fa-hospital-o:before {\n content: \"\\F0F8\";\n}\n.fa-ambulance:before {\n content: \"\\F0F9\";\n}\n.fa-medkit:before {\n content: \"\\F0FA\";\n}\n.fa-fighter-jet:before {\n content: \"\\F0FB\";\n}\n.fa-beer:before {\n content: \"\\F0FC\";\n}\n.fa-h-square:before {\n content: \"\\F0FD\";\n}\n.fa-plus-square:before {\n content: \"\\F0FE\";\n}\n.fa-angle-double-left:before {\n content: \"\\F100\";\n}\n.fa-angle-double-right:before {\n content: \"\\F101\";\n}\n.fa-angle-double-up:before {\n content: \"\\F102\";\n}\n.fa-angle-double-down:before {\n content: \"\\F103\";\n}\n.fa-angle-left:before {\n content: \"\\F104\";\n}\n.fa-angle-right:before {\n content: \"\\F105\";\n}\n.fa-angle-up:before {\n content: \"\\F106\";\n}\n.fa-angle-down:before {\n content: \"\\F107\";\n}\n.fa-desktop:before {\n content: \"\\F108\";\n}\n.fa-laptop:before {\n content: \"\\F109\";\n}\n.fa-tablet:before {\n content: \"\\F10A\";\n}\n.fa-mobile-phone:before,\n.fa-mobile:before {\n content: \"\\F10B\";\n}\n.fa-circle-o:before {\n content: \"\\F10C\";\n}\n.fa-quote-left:before {\n content: \"\\F10D\";\n}\n.fa-quote-right:before {\n content: \"\\F10E\";\n}\n.fa-spinner:before {\n content: \"\\F110\";\n}\n.fa-circle:before {\n content: \"\\F111\";\n}\n.fa-mail-reply:before,\n.fa-reply:before {\n content: \"\\F112\";\n}\n.fa-github-alt:before {\n content: \"\\F113\";\n}\n.fa-folder-o:before {\n content: \"\\F114\";\n}\n.fa-folder-open-o:before {\n content: \"\\F115\";\n}\n.fa-smile-o:before {\n content: \"\\F118\";\n}\n.fa-frown-o:before {\n content: \"\\F119\";\n}\n.fa-meh-o:before {\n content: \"\\F11A\";\n}\n.fa-gamepad:before {\n content: \"\\F11B\";\n}\n.fa-keyboard-o:before {\n content: \"\\F11C\";\n}\n.fa-flag-o:before {\n content: \"\\F11D\";\n}\n.fa-flag-checkered:before {\n content: \"\\F11E\";\n}\n.fa-terminal:before {\n content: \"\\F120\";\n}\n.fa-code:before {\n content: \"\\F121\";\n}\n.fa-mail-reply-all:before,\n.fa-reply-all:before {\n content: \"\\F122\";\n}\n.fa-star-half-empty:before,\n.fa-star-half-full:before,\n.fa-star-half-o:before {\n content: \"\\F123\";\n}\n.fa-location-arrow:before {\n content: \"\\F124\";\n}\n.fa-crop:before {\n content: \"\\F125\";\n}\n.fa-code-fork:before {\n content: \"\\F126\";\n}\n.fa-unlink:before,\n.fa-chain-broken:before {\n content: \"\\F127\";\n}\n.fa-question:before {\n content: \"\\F128\";\n}\n.fa-info:before {\n content: \"\\F129\";\n}\n.fa-exclamation:before {\n content: \"\\F12A\";\n}\n.fa-superscript:before {\n content: \"\\F12B\";\n}\n.fa-subscript:before {\n content: \"\\F12C\";\n}\n.fa-eraser:before {\n content: \"\\F12D\";\n}\n.fa-puzzle-piece:before {\n content: \"\\F12E\";\n}\n.fa-microphone:before {\n content: \"\\F130\";\n}\n.fa-microphone-slash:before {\n content: \"\\F131\";\n}\n.fa-shield:before {\n content: \"\\F132\";\n}\n.fa-calendar-o:before {\n content: \"\\F133\";\n}\n.fa-fire-extinguisher:before {\n content: \"\\F134\";\n}\n.fa-rocket:before {\n content: \"\\F135\";\n}\n.fa-maxcdn:before {\n content: \"\\F136\";\n}\n.fa-chevron-circle-left:before {\n content: \"\\F137\";\n}\n.fa-chevron-circle-right:before {\n content: \"\\F138\";\n}\n.fa-chevron-circle-up:before {\n content: \"\\F139\";\n}\n.fa-chevron-circle-down:before {\n content: \"\\F13A\";\n}\n.fa-html5:before {\n content: \"\\F13B\";\n}\n.fa-css3:before {\n content: \"\\F13C\";\n}\n.fa-anchor:before {\n content: \"\\F13D\";\n}\n.fa-unlock-alt:before {\n content: \"\\F13E\";\n}\n.fa-bullseye:before {\n content: \"\\F140\";\n}\n.fa-ellipsis-h:before {\n content: \"\\F141\";\n}\n.fa-ellipsis-v:before {\n content: \"\\F142\";\n}\n.fa-rss-square:before {\n content: \"\\F143\";\n}\n.fa-play-circle:before {\n content: \"\\F144\";\n}\n.fa-ticket:before {\n content: \"\\F145\";\n}\n.fa-minus-square:before {\n content: \"\\F146\";\n}\n.fa-minus-square-o:before {\n content: \"\\F147\";\n}\n.fa-level-up:before {\n content: \"\\F148\";\n}\n.fa-level-down:before {\n content: \"\\F149\";\n}\n.fa-check-square:before {\n content: \"\\F14A\";\n}\n.fa-pencil-square:before {\n content: \"\\F14B\";\n}\n.fa-external-link-square:before {\n content: \"\\F14C\";\n}\n.fa-share-square:before {\n content: \"\\F14D\";\n}\n.fa-compass:before {\n content: \"\\F14E\";\n}\n.fa-toggle-down:before,\n.fa-caret-square-o-down:before {\n content: \"\\F150\";\n}\n.fa-toggle-up:before,\n.fa-caret-square-o-up:before {\n content: \"\\F151\";\n}\n.fa-toggle-right:before,\n.fa-caret-square-o-right:before {\n content: \"\\F152\";\n}\n.fa-euro:before,\n.fa-eur:before {\n content: \"\\F153\";\n}\n.fa-gbp:before {\n content: \"\\F154\";\n}\n.fa-dollar:before,\n.fa-usd:before {\n content: \"\\F155\";\n}\n.fa-rupee:before,\n.fa-inr:before {\n content: \"\\F156\";\n}\n.fa-cny:before,\n.fa-rmb:before,\n.fa-yen:before,\n.fa-jpy:before {\n content: \"\\F157\";\n}\n.fa-ruble:before,\n.fa-rouble:before,\n.fa-rub:before {\n content: \"\\F158\";\n}\n.fa-won:before,\n.fa-krw:before {\n content: \"\\F159\";\n}\n.fa-bitcoin:before,\n.fa-btc:before {\n content: \"\\F15A\";\n}\n.fa-file:before {\n content: \"\\F15B\";\n}\n.fa-file-text:before {\n content: \"\\F15C\";\n}\n.fa-sort-alpha-asc:before {\n content: \"\\F15D\";\n}\n.fa-sort-alpha-desc:before {\n content: \"\\F15E\";\n}\n.fa-sort-amount-asc:before {\n content: \"\\F160\";\n}\n.fa-sort-amount-desc:before {\n content: \"\\F161\";\n}\n.fa-sort-numeric-asc:before {\n content: \"\\F162\";\n}\n.fa-sort-numeric-desc:before {\n content: \"\\F163\";\n}\n.fa-thumbs-up:before {\n content: \"\\F164\";\n}\n.fa-thumbs-down:before {\n content: \"\\F165\";\n}\n.fa-youtube-square:before {\n content: \"\\F166\";\n}\n.fa-youtube:before {\n content: \"\\F167\";\n}\n.fa-xing:before {\n content: \"\\F168\";\n}\n.fa-xing-square:before {\n content: \"\\F169\";\n}\n.fa-youtube-play:before {\n content: \"\\F16A\";\n}\n.fa-dropbox:before {\n content: \"\\F16B\";\n}\n.fa-stack-overflow:before {\n content: \"\\F16C\";\n}\n.fa-instagram:before {\n content: \"\\F16D\";\n}\n.fa-flickr:before {\n content: \"\\F16E\";\n}\n.fa-adn:before {\n content: \"\\F170\";\n}\n.fa-bitbucket:before {\n content: \"\\F171\";\n}\n.fa-bitbucket-square:before {\n content: \"\\F172\";\n}\n.fa-tumblr:before {\n content: \"\\F173\";\n}\n.fa-tumblr-square:before {\n content: \"\\F174\";\n}\n.fa-long-arrow-down:before {\n content: \"\\F175\";\n}\n.fa-long-arrow-up:before {\n content: \"\\F176\";\n}\n.fa-long-arrow-left:before {\n content: \"\\F177\";\n}\n.fa-long-arrow-right:before {\n content: \"\\F178\";\n}\n.fa-apple:before {\n content: \"\\F179\";\n}\n.fa-windows:before {\n content: \"\\F17A\";\n}\n.fa-android:before {\n content: \"\\F17B\";\n}\n.fa-linux:before {\n content: \"\\F17C\";\n}\n.fa-dribbble:before {\n content: \"\\F17D\";\n}\n.fa-skype:before {\n content: \"\\F17E\";\n}\n.fa-foursquare:before {\n content: \"\\F180\";\n}\n.fa-trello:before {\n content: \"\\F181\";\n}\n.fa-female:before {\n content: \"\\F182\";\n}\n.fa-male:before {\n content: \"\\F183\";\n}\n.fa-gittip:before,\n.fa-gratipay:before {\n content: \"\\F184\";\n}\n.fa-sun-o:before {\n content: \"\\F185\";\n}\n.fa-moon-o:before {\n content: \"\\F186\";\n}\n.fa-archive:before {\n content: \"\\F187\";\n}\n.fa-bug:before {\n content: \"\\F188\";\n}\n.fa-vk:before {\n content: \"\\F189\";\n}\n.fa-weibo:before {\n content: \"\\F18A\";\n}\n.fa-renren:before {\n content: \"\\F18B\";\n}\n.fa-pagelines:before {\n content: \"\\F18C\";\n}\n.fa-stack-exchange:before {\n content: \"\\F18D\";\n}\n.fa-arrow-circle-o-right:before {\n content: \"\\F18E\";\n}\n.fa-arrow-circle-o-left:before {\n content: \"\\F190\";\n}\n.fa-toggle-left:before,\n.fa-caret-square-o-left:before {\n content: \"\\F191\";\n}\n.fa-dot-circle-o:before {\n content: \"\\F192\";\n}\n.fa-wheelchair:before {\n content: \"\\F193\";\n}\n.fa-vimeo-square:before {\n content: \"\\F194\";\n}\n.fa-turkish-lira:before,\n.fa-try:before {\n content: \"\\F195\";\n}\n.fa-plus-square-o:before {\n content: \"\\F196\";\n}\n.fa-space-shuttle:before {\n content: \"\\F197\";\n}\n.fa-slack:before {\n content: \"\\F198\";\n}\n.fa-envelope-square:before {\n content: \"\\F199\";\n}\n.fa-wordpress:before {\n content: \"\\F19A\";\n}\n.fa-openid:before {\n content: \"\\F19B\";\n}\n.fa-institution:before,\n.fa-bank:before,\n.fa-university:before {\n content: \"\\F19C\";\n}\n.fa-mortar-board:before,\n.fa-graduation-cap:before {\n content: \"\\F19D\";\n}\n.fa-yahoo:before {\n content: \"\\F19E\";\n}\n.fa-google:before {\n content: \"\\F1A0\";\n}\n.fa-reddit:before {\n content: \"\\F1A1\";\n}\n.fa-reddit-square:before {\n content: \"\\F1A2\";\n}\n.fa-stumbleupon-circle:before {\n content: \"\\F1A3\";\n}\n.fa-stumbleupon:before {\n content: \"\\F1A4\";\n}\n.fa-delicious:before {\n content: \"\\F1A5\";\n}\n.fa-digg:before {\n content: \"\\F1A6\";\n}\n.fa-pied-piper-pp:before {\n content: \"\\F1A7\";\n}\n.fa-pied-piper-alt:before {\n content: \"\\F1A8\";\n}\n.fa-drupal:before {\n content: \"\\F1A9\";\n}\n.fa-joomla:before {\n content: \"\\F1AA\";\n}\n.fa-language:before {\n content: \"\\F1AB\";\n}\n.fa-fax:before {\n content: \"\\F1AC\";\n}\n.fa-building:before {\n content: \"\\F1AD\";\n}\n.fa-child:before {\n content: \"\\F1AE\";\n}\n.fa-paw:before {\n content: \"\\F1B0\";\n}\n.fa-spoon:before {\n content: \"\\F1B1\";\n}\n.fa-cube:before {\n content: \"\\F1B2\";\n}\n.fa-cubes:before {\n content: \"\\F1B3\";\n}\n.fa-behance:before {\n content: \"\\F1B4\";\n}\n.fa-behance-square:before {\n content: \"\\F1B5\";\n}\n.fa-steam:before {\n content: \"\\F1B6\";\n}\n.fa-steam-square:before {\n content: \"\\F1B7\";\n}\n.fa-recycle:before {\n content: \"\\F1B8\";\n}\n.fa-automobile:before,\n.fa-car:before {\n content: \"\\F1B9\";\n}\n.fa-cab:before,\n.fa-taxi:before {\n content: \"\\F1BA\";\n}\n.fa-tree:before {\n content: \"\\F1BB\";\n}\n.fa-spotify:before {\n content: \"\\F1BC\";\n}\n.fa-deviantart:before {\n content: \"\\F1BD\";\n}\n.fa-soundcloud:before {\n content: \"\\F1BE\";\n}\n.fa-database:before {\n content: \"\\F1C0\";\n}\n.fa-file-pdf-o:before {\n content: \"\\F1C1\";\n}\n.fa-file-word-o:before {\n content: \"\\F1C2\";\n}\n.fa-file-excel-o:before {\n content: \"\\F1C3\";\n}\n.fa-file-powerpoint-o:before {\n content: \"\\F1C4\";\n}\n.fa-file-photo-o:before,\n.fa-file-picture-o:before,\n.fa-file-image-o:before {\n content: \"\\F1C5\";\n}\n.fa-file-zip-o:before,\n.fa-file-archive-o:before {\n content: \"\\F1C6\";\n}\n.fa-file-sound-o:before,\n.fa-file-audio-o:before {\n content: \"\\F1C7\";\n}\n.fa-file-movie-o:before,\n.fa-file-video-o:before {\n content: \"\\F1C8\";\n}\n.fa-file-code-o:before {\n content: \"\\F1C9\";\n}\n.fa-vine:before {\n content: \"\\F1CA\";\n}\n.fa-codepen:before {\n content: \"\\F1CB\";\n}\n.fa-jsfiddle:before {\n content: \"\\F1CC\";\n}\n.fa-life-bouy:before,\n.fa-life-buoy:before,\n.fa-life-saver:before,\n.fa-support:before,\n.fa-life-ring:before {\n content: \"\\F1CD\";\n}\n.fa-circle-o-notch:before {\n content: \"\\F1CE\";\n}\n.fa-ra:before,\n.fa-resistance:before,\n.fa-rebel:before {\n content: \"\\F1D0\";\n}\n.fa-ge:before,\n.fa-empire:before {\n content: \"\\F1D1\";\n}\n.fa-git-square:before {\n content: \"\\F1D2\";\n}\n.fa-git:before {\n content: \"\\F1D3\";\n}\n.fa-y-combinator-square:before,\n.fa-yc-square:before,\n.fa-hacker-news:before {\n content: \"\\F1D4\";\n}\n.fa-tencent-weibo:before {\n content: \"\\F1D5\";\n}\n.fa-qq:before {\n content: \"\\F1D6\";\n}\n.fa-wechat:before,\n.fa-weixin:before {\n content: \"\\F1D7\";\n}\n.fa-send:before,\n.fa-paper-plane:before {\n content: \"\\F1D8\";\n}\n.fa-send-o:before,\n.fa-paper-plane-o:before {\n content: \"\\F1D9\";\n}\n.fa-history:before {\n content: \"\\F1DA\";\n}\n.fa-circle-thin:before {\n content: \"\\F1DB\";\n}\n.fa-header:before {\n content: \"\\F1DC\";\n}\n.fa-paragraph:before {\n content: \"\\F1DD\";\n}\n.fa-sliders:before {\n content: \"\\F1DE\";\n}\n.fa-share-alt:before {\n content: \"\\F1E0\";\n}\n.fa-share-alt-square:before {\n content: \"\\F1E1\";\n}\n.fa-bomb:before {\n content: \"\\F1E2\";\n}\n.fa-soccer-ball-o:before,\n.fa-futbol-o:before {\n content: \"\\F1E3\";\n}\n.fa-tty:before {\n content: \"\\F1E4\";\n}\n.fa-binoculars:before {\n content: \"\\F1E5\";\n}\n.fa-plug:before {\n content: \"\\F1E6\";\n}\n.fa-slideshare:before {\n content: \"\\F1E7\";\n}\n.fa-twitch:before {\n content: \"\\F1E8\";\n}\n.fa-yelp:before {\n content: \"\\F1E9\";\n}\n.fa-newspaper-o:before {\n content: \"\\F1EA\";\n}\n.fa-wifi:before {\n content: \"\\F1EB\";\n}\n.fa-calculator:before {\n content: \"\\F1EC\";\n}\n.fa-paypal:before {\n content: \"\\F1ED\";\n}\n.fa-google-wallet:before {\n content: \"\\F1EE\";\n}\n.fa-cc-visa:before {\n content: \"\\F1F0\";\n}\n.fa-cc-mastercard:before {\n content: \"\\F1F1\";\n}\n.fa-cc-discover:before {\n content: \"\\F1F2\";\n}\n.fa-cc-amex:before {\n content: \"\\F1F3\";\n}\n.fa-cc-paypal:before {\n content: \"\\F1F4\";\n}\n.fa-cc-stripe:before {\n content: \"\\F1F5\";\n}\n.fa-bell-slash:before {\n content: \"\\F1F6\";\n}\n.fa-bell-slash-o:before {\n content: \"\\F1F7\";\n}\n.fa-trash:before {\n content: \"\\F1F8\";\n}\n.fa-copyright:before {\n content: \"\\F1F9\";\n}\n.fa-at:before {\n content: \"\\F1FA\";\n}\n.fa-eyedropper:before {\n content: \"\\F1FB\";\n}\n.fa-paint-brush:before {\n content: \"\\F1FC\";\n}\n.fa-birthday-cake:before {\n content: \"\\F1FD\";\n}\n.fa-area-chart:before {\n content: \"\\F1FE\";\n}\n.fa-pie-chart:before {\n content: \"\\F200\";\n}\n.fa-line-chart:before {\n content: \"\\F201\";\n}\n.fa-lastfm:before {\n content: \"\\F202\";\n}\n.fa-lastfm-square:before {\n content: \"\\F203\";\n}\n.fa-toggle-off:before {\n content: \"\\F204\";\n}\n.fa-toggle-on:before {\n content: \"\\F205\";\n}\n.fa-bicycle:before {\n content: \"\\F206\";\n}\n.fa-bus:before {\n content: \"\\F207\";\n}\n.fa-ioxhost:before {\n content: \"\\F208\";\n}\n.fa-angellist:before {\n content: \"\\F209\";\n}\n.fa-cc:before {\n content: \"\\F20A\";\n}\n.fa-shekel:before,\n.fa-sheqel:before,\n.fa-ils:before {\n content: \"\\F20B\";\n}\n.fa-meanpath:before {\n content: \"\\F20C\";\n}\n.fa-buysellads:before {\n content: \"\\F20D\";\n}\n.fa-connectdevelop:before {\n content: \"\\F20E\";\n}\n.fa-dashcube:before {\n content: \"\\F210\";\n}\n.fa-forumbee:before {\n content: \"\\F211\";\n}\n.fa-leanpub:before {\n content: \"\\F212\";\n}\n.fa-sellsy:before {\n content: \"\\F213\";\n}\n.fa-shirtsinbulk:before {\n content: \"\\F214\";\n}\n.fa-simplybuilt:before {\n content: \"\\F215\";\n}\n.fa-skyatlas:before {\n content: \"\\F216\";\n}\n.fa-cart-plus:before {\n content: \"\\F217\";\n}\n.fa-cart-arrow-down:before {\n content: \"\\F218\";\n}\n.fa-diamond:before {\n content: \"\\F219\";\n}\n.fa-ship:before {\n content: \"\\F21A\";\n}\n.fa-user-secret:before {\n content: \"\\F21B\";\n}\n.fa-motorcycle:before {\n content: \"\\F21C\";\n}\n.fa-street-view:before {\n content: \"\\F21D\";\n}\n.fa-heartbeat:before {\n content: \"\\F21E\";\n}\n.fa-venus:before {\n content: \"\\F221\";\n}\n.fa-mars:before {\n content: \"\\F222\";\n}\n.fa-mercury:before {\n content: \"\\F223\";\n}\n.fa-intersex:before,\n.fa-transgender:before {\n content: \"\\F224\";\n}\n.fa-transgender-alt:before {\n content: \"\\F225\";\n}\n.fa-venus-double:before {\n content: \"\\F226\";\n}\n.fa-mars-double:before {\n content: \"\\F227\";\n}\n.fa-venus-mars:before {\n content: \"\\F228\";\n}\n.fa-mars-stroke:before {\n content: \"\\F229\";\n}\n.fa-mars-stroke-v:before {\n content: \"\\F22A\";\n}\n.fa-mars-stroke-h:before {\n content: \"\\F22B\";\n}\n.fa-neuter:before {\n content: \"\\F22C\";\n}\n.fa-genderless:before {\n content: \"\\F22D\";\n}\n.fa-facebook-official:before {\n content: \"\\F230\";\n}\n.fa-pinterest-p:before {\n content: \"\\F231\";\n}\n.fa-whatsapp:before {\n content: \"\\F232\";\n}\n.fa-server:before {\n content: \"\\F233\";\n}\n.fa-user-plus:before {\n content: \"\\F234\";\n}\n.fa-user-times:before {\n content: \"\\F235\";\n}\n.fa-hotel:before,\n.fa-bed:before {\n content: \"\\F236\";\n}\n.fa-viacoin:before {\n content: \"\\F237\";\n}\n.fa-train:before {\n content: \"\\F238\";\n}\n.fa-subway:before {\n content: \"\\F239\";\n}\n.fa-medium:before {\n content: \"\\F23A\";\n}\n.fa-yc:before,\n.fa-y-combinator:before {\n content: \"\\F23B\";\n}\n.fa-optin-monster:before {\n content: \"\\F23C\";\n}\n.fa-opencart:before {\n content: \"\\F23D\";\n}\n.fa-expeditedssl:before {\n content: \"\\F23E\";\n}\n.fa-battery-4:before,\n.fa-battery-full:before {\n content: \"\\F240\";\n}\n.fa-battery-3:before,\n.fa-battery-three-quarters:before {\n content: \"\\F241\";\n}\n.fa-battery-2:before,\n.fa-battery-half:before {\n content: \"\\F242\";\n}\n.fa-battery-1:before,\n.fa-battery-quarter:before {\n content: \"\\F243\";\n}\n.fa-battery-0:before,\n.fa-battery-empty:before {\n content: \"\\F244\";\n}\n.fa-mouse-pointer:before {\n content: \"\\F245\";\n}\n.fa-i-cursor:before {\n content: \"\\F246\";\n}\n.fa-object-group:before {\n content: \"\\F247\";\n}\n.fa-object-ungroup:before {\n content: \"\\F248\";\n}\n.fa-sticky-note:before {\n content: \"\\F249\";\n}\n.fa-sticky-note-o:before {\n content: \"\\F24A\";\n}\n.fa-cc-jcb:before {\n content: \"\\F24B\";\n}\n.fa-cc-diners-club:before {\n content: \"\\F24C\";\n}\n.fa-clone:before {\n content: \"\\F24D\";\n}\n.fa-balance-scale:before {\n content: \"\\F24E\";\n}\n.fa-hourglass-o:before {\n content: \"\\F250\";\n}\n.fa-hourglass-1:before,\n.fa-hourglass-start:before {\n content: \"\\F251\";\n}\n.fa-hourglass-2:before,\n.fa-hourglass-half:before {\n content: \"\\F252\";\n}\n.fa-hourglass-3:before,\n.fa-hourglass-end:before {\n content: \"\\F253\";\n}\n.fa-hourglass:before {\n content: \"\\F254\";\n}\n.fa-hand-grab-o:before,\n.fa-hand-rock-o:before {\n content: \"\\F255\";\n}\n.fa-hand-stop-o:before,\n.fa-hand-paper-o:before {\n content: \"\\F256\";\n}\n.fa-hand-scissors-o:before {\n content: \"\\F257\";\n}\n.fa-hand-lizard-o:before {\n content: \"\\F258\";\n}\n.fa-hand-spock-o:before {\n content: \"\\F259\";\n}\n.fa-hand-pointer-o:before {\n content: \"\\F25A\";\n}\n.fa-hand-peace-o:before {\n content: \"\\F25B\";\n}\n.fa-trademark:before {\n content: \"\\F25C\";\n}\n.fa-registered:before {\n content: \"\\F25D\";\n}\n.fa-creative-commons:before {\n content: \"\\F25E\";\n}\n.fa-gg:before {\n content: \"\\F260\";\n}\n.fa-gg-circle:before {\n content: \"\\F261\";\n}\n.fa-tripadvisor:before {\n content: \"\\F262\";\n}\n.fa-odnoklassniki:before {\n content: \"\\F263\";\n}\n.fa-odnoklassniki-square:before {\n content: \"\\F264\";\n}\n.fa-get-pocket:before {\n content: \"\\F265\";\n}\n.fa-wikipedia-w:before {\n content: \"\\F266\";\n}\n.fa-safari:before {\n content: \"\\F267\";\n}\n.fa-chrome:before {\n content: \"\\F268\";\n}\n.fa-firefox:before {\n content: \"\\F269\";\n}\n.fa-opera:before {\n content: \"\\F26A\";\n}\n.fa-internet-explorer:before {\n content: \"\\F26B\";\n}\n.fa-tv:before,\n.fa-television:before {\n content: \"\\F26C\";\n}\n.fa-contao:before {\n content: \"\\F26D\";\n}\n.fa-500px:before {\n content: \"\\F26E\";\n}\n.fa-amazon:before {\n content: \"\\F270\";\n}\n.fa-calendar-plus-o:before {\n content: \"\\F271\";\n}\n.fa-calendar-minus-o:before {\n content: \"\\F272\";\n}\n.fa-calendar-times-o:before {\n content: \"\\F273\";\n}\n.fa-calendar-check-o:before {\n content: \"\\F274\";\n}\n.fa-industry:before {\n content: \"\\F275\";\n}\n.fa-map-pin:before {\n content: \"\\F276\";\n}\n.fa-map-signs:before {\n content: \"\\F277\";\n}\n.fa-map-o:before {\n content: \"\\F278\";\n}\n.fa-map:before {\n content: \"\\F279\";\n}\n.fa-commenting:before {\n content: \"\\F27A\";\n}\n.fa-commenting-o:before {\n content: \"\\F27B\";\n}\n.fa-houzz:before {\n content: \"\\F27C\";\n}\n.fa-vimeo:before {\n content: \"\\F27D\";\n}\n.fa-black-tie:before {\n content: \"\\F27E\";\n}\n.fa-fonticons:before {\n content: \"\\F280\";\n}\n.fa-reddit-alien:before {\n content: \"\\F281\";\n}\n.fa-edge:before {\n content: \"\\F282\";\n}\n.fa-credit-card-alt:before {\n content: \"\\F283\";\n}\n.fa-codiepie:before {\n content: \"\\F284\";\n}\n.fa-modx:before {\n content: \"\\F285\";\n}\n.fa-fort-awesome:before {\n content: \"\\F286\";\n}\n.fa-usb:before {\n content: \"\\F287\";\n}\n.fa-product-hunt:before {\n content: \"\\F288\";\n}\n.fa-mixcloud:before {\n content: \"\\F289\";\n}\n.fa-scribd:before {\n content: \"\\F28A\";\n}\n.fa-pause-circle:before {\n content: \"\\F28B\";\n}\n.fa-pause-circle-o:before {\n content: \"\\F28C\";\n}\n.fa-stop-circle:before {\n content: \"\\F28D\";\n}\n.fa-stop-circle-o:before {\n content: \"\\F28E\";\n}\n.fa-shopping-bag:before {\n content: \"\\F290\";\n}\n.fa-shopping-basket:before {\n content: \"\\F291\";\n}\n.fa-hashtag:before {\n content: \"\\F292\";\n}\n.fa-bluetooth:before {\n content: \"\\F293\";\n}\n.fa-bluetooth-b:before {\n content: \"\\F294\";\n}\n.fa-percent:before {\n content: \"\\F295\";\n}\n.fa-gitlab:before {\n content: \"\\F296\";\n}\n.fa-wpbeginner:before {\n content: \"\\F297\";\n}\n.fa-wpforms:before {\n content: \"\\F298\";\n}\n.fa-envira:before {\n content: \"\\F299\";\n}\n.fa-universal-access:before {\n content: \"\\F29A\";\n}\n.fa-wheelchair-alt:before {\n content: \"\\F29B\";\n}\n.fa-question-circle-o:before {\n content: \"\\F29C\";\n}\n.fa-blind:before {\n content: \"\\F29D\";\n}\n.fa-audio-description:before {\n content: \"\\F29E\";\n}\n.fa-volume-control-phone:before {\n content: \"\\F2A0\";\n}\n.fa-braille:before {\n content: \"\\F2A1\";\n}\n.fa-assistive-listening-systems:before {\n content: \"\\F2A2\";\n}\n.fa-asl-interpreting:before,\n.fa-american-sign-language-interpreting:before {\n content: \"\\F2A3\";\n}\n.fa-deafness:before,\n.fa-hard-of-hearing:before,\n.fa-deaf:before {\n content: \"\\F2A4\";\n}\n.fa-glide:before {\n content: \"\\F2A5\";\n}\n.fa-glide-g:before {\n content: \"\\F2A6\";\n}\n.fa-signing:before,\n.fa-sign-language:before {\n content: \"\\F2A7\";\n}\n.fa-low-vision:before {\n content: \"\\F2A8\";\n}\n.fa-viadeo:before {\n content: \"\\F2A9\";\n}\n.fa-viadeo-square:before {\n content: \"\\F2AA\";\n}\n.fa-snapchat:before {\n content: \"\\F2AB\";\n}\n.fa-snapchat-ghost:before {\n content: \"\\F2AC\";\n}\n.fa-snapchat-square:before {\n content: \"\\F2AD\";\n}\n.fa-pied-piper:before {\n content: \"\\F2AE\";\n}\n.fa-first-order:before {\n content: \"\\F2B0\";\n}\n.fa-yoast:before {\n content: \"\\F2B1\";\n}\n.fa-themeisle:before {\n content: \"\\F2B2\";\n}\n.fa-google-plus-circle:before,\n.fa-google-plus-official:before {\n content: \"\\F2B3\";\n}\n.fa-fa:before,\n.fa-font-awesome:before {\n content: \"\\F2B4\";\n}\n/* makes the font 33% larger relative to the icon container */\n.fa-lg {\n font-size: 1.33333333em;\n line-height: 0.75em;\n vertical-align: -15%;\n}\n.fa-2x {\n font-size: 2em;\n}\n.fa-3x {\n font-size: 3em;\n}\n.fa-4x {\n font-size: 4em;\n}\n.fa-5x {\n font-size: 5em;\n}\n.fa-ul {\n padding-left: 0;\n margin-left: 2.14285714em;\n list-style-type: none;\n}\n.fa-ul > li {\n position: relative;\n}\n.fa-li {\n position: absolute;\n left: -2.14285714em;\n width: 2.14285714em;\n top: 0.14285714em;\n text-align: center;\n}\n.fa-li.fa-lg {\n left: -1.85714286em;\n}\n/* FONT PATH\n * -------------------------- */\n@font-face {\n font-family: 'FontAwesome';\n src: url(" + __webpack_require__(780) + ");\n src: url(" + __webpack_require__(781) + "?#iefix&v=4.6.3) format('embedded-opentype'), url(" + __webpack_require__(782) + ") format('woff2'), url(" + __webpack_require__(783) + ") format('woff'), url(" + __webpack_require__(784) + ") format('truetype'), url(" + __webpack_require__(785) + "#fontawesomeregular) format('svg');\n font-weight: normal;\n font-style: normal;\n}\n.fa-rotate-90 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\";\n -webkit-transform: rotate(90deg);\n -ms-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n.fa-rotate-180 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\";\n -webkit-transform: rotate(180deg);\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n.fa-rotate-270 {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\";\n -webkit-transform: rotate(270deg);\n -ms-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n.fa-flip-horizontal {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\";\n -webkit-transform: scale(-1, 1);\n -ms-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n.fa-flip-vertical {\n -ms-filter: \"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\";\n -webkit-transform: scale(1, -1);\n -ms-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n filter: none;\n}\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n.fa-stack {\n position: relative;\n display: inline-block;\n width: 2em;\n height: 2em;\n line-height: 2em;\n vertical-align: middle;\n}\n.fa-stack-1x,\n.fa-stack-2x {\n position: absolute;\n left: 0;\n width: 100%;\n text-align: center;\n}\n.fa-stack-1x {\n line-height: inherit;\n}\n.fa-stack-2x {\n font-size: 2em;\n}\n.fa-inverse {\n color: #fff;\n}\n", ""]);
81514
81515 // exports
81516
81517
81518/***/ },
81519/* 779 */
81520/***/ function(module, exports) {
81521
81522 /*
81523 MIT License http://www.opensource.org/licenses/mit-license.php
81524 Author Tobias Koppers @sokra
81525 */
81526 // css base code, injected by the css-loader
81527 module.exports = function() {
81528 var list = [];
81529
81530 // return the list of modules as css string
81531 list.toString = function toString() {
81532 var result = [];
81533 for(var i = 0; i < this.length; i++) {
81534 var item = this[i];
81535 if(item[2]) {
81536 result.push("@media " + item[2] + "{" + item[1] + "}");
81537 } else {
81538 result.push(item[1]);
81539 }
81540 }
81541 return result.join("");
81542 };
81543
81544 // import a list of modules into the list
81545 list.i = function(modules, mediaQuery) {
81546 if(typeof modules === "string")
81547 modules = [[null, modules, ""]];
81548 var alreadyImportedModules = {};
81549 for(var i = 0; i < this.length; i++) {
81550 var id = this[i][0];
81551 if(typeof id === "number")
81552 alreadyImportedModules[id] = true;
81553 }
81554 for(i = 0; i < modules.length; i++) {
81555 var item = modules[i];
81556 // skip already imported module
81557 // this implementation is not 100% perfect for weird media query combinations
81558 // when a module is imported multiple times with different media queries.
81559 // I hope this will never occur (Hey this way we have smaller bundles)
81560 if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
81561 if(mediaQuery && !item[2]) {
81562 item[2] = mediaQuery;
81563 } else if(mediaQuery) {
81564 item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
81565 }
81566 list.push(item);
81567 }
81568 }
81569 };
81570 return list;
81571 };
81572
81573
81574/***/ },
81575/* 780 */
81576/***/ function(module, exports, __webpack_require__) {
81577
81578 module.exports = __webpack_require__.p + "25a32416abee198dd821b0b17a198a8f.eot";
81579
81580/***/ },
81581/* 781 */
81582/***/ function(module, exports, __webpack_require__) {
81583
81584 module.exports = __webpack_require__.p + "25a32416abee198dd821b0b17a198a8f.eot";
81585
81586/***/ },
81587/* 782 */
81588/***/ function(module, exports, __webpack_require__) {
81589
81590 module.exports = __webpack_require__.p + "e6cf7c6ec7c2d6f670ae9d762604cb0b.woff2";
81591
81592/***/ },
81593/* 783 */
81594/***/ function(module, exports, __webpack_require__) {
81595
81596 module.exports = __webpack_require__.p + "c8ddf1e5e5bf3682bc7bebf30f394148.woff";
81597
81598/***/ },
81599/* 784 */
81600/***/ function(module, exports, __webpack_require__) {
81601
81602 module.exports = __webpack_require__.p + "1dc35d25e61d819a9c357074014867ab.ttf";
81603
81604/***/ },
81605/* 785 */
81606/***/ function(module, exports, __webpack_require__) {
81607
81608 module.exports = __webpack_require__.p + "d7c639084f684d66a1bc66855d193ed8.svg";
81609
81610/***/ },
81611/* 786 */
81612/***/ function(module, exports, __webpack_require__) {
81613
81614 /*
81615 MIT License http://www.opensource.org/licenses/mit-license.php
81616 Author Tobias Koppers @sokra
81617 */
81618 var stylesInDom = {},
81619 memoize = function(fn) {
81620 var memo;
81621 return function () {
81622 if (typeof memo === "undefined") memo = fn.apply(this, arguments);
81623 return memo;
81624 };
81625 },
81626 isOldIE = memoize(function() {
81627 return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
81628 }),
81629 getHeadElement = memoize(function () {
81630 return document.head || document.getElementsByTagName("head")[0];
81631 }),
81632 singletonElement = null,
81633 singletonCounter = 0;
81634
81635 module.exports = function(list, options) {
81636 if(false) {
81637 if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
81638 }
81639
81640 options = options || {};
81641 // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
81642 // tags it will allow on a page
81643 if (typeof options.singleton === "undefined") options.singleton = isOldIE();
81644
81645 var styles = listToStyles(list);
81646 addStylesToDom(styles, options);
81647
81648 return function update(newList) {
81649 var mayRemove = [];
81650 for(var i = 0; i < styles.length; i++) {
81651 var item = styles[i];
81652 var domStyle = stylesInDom[item.id];
81653 domStyle.refs--;
81654 mayRemove.push(domStyle);
81655 }
81656 if(newList) {
81657 var newStyles = listToStyles(newList);
81658 addStylesToDom(newStyles, options);
81659 }
81660 for(var i = 0; i < mayRemove.length; i++) {
81661 var domStyle = mayRemove[i];
81662 if(domStyle.refs === 0) {
81663 for(var j = 0; j < domStyle.parts.length; j++)
81664 domStyle.parts[j]();
81665 delete stylesInDom[domStyle.id];
81666 }
81667 }
81668 };
81669 }
81670
81671 function addStylesToDom(styles, options) {
81672 for(var i = 0; i < styles.length; i++) {
81673 var item = styles[i];
81674 var domStyle = stylesInDom[item.id];
81675 if(domStyle) {
81676 domStyle.refs++;
81677 for(var j = 0; j < domStyle.parts.length; j++) {
81678 domStyle.parts[j](item.parts[j]);
81679 }
81680 for(; j < item.parts.length; j++) {
81681 domStyle.parts.push(addStyle(item.parts[j], options));
81682 }
81683 } else {
81684 var parts = [];
81685 for(var j = 0; j < item.parts.length; j++) {
81686 parts.push(addStyle(item.parts[j], options));
81687 }
81688 stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
81689 }
81690 }
81691 }
81692
81693 function listToStyles(list) {
81694 var styles = [];
81695 var newStyles = {};
81696 for(var i = 0; i < list.length; i++) {
81697 var item = list[i];
81698 var id = item[0];
81699 var css = item[1];
81700 var media = item[2];
81701 var sourceMap = item[3];
81702 var part = {css: css, media: media, sourceMap: sourceMap};
81703 if(!newStyles[id])
81704 styles.push(newStyles[id] = {id: id, parts: [part]});
81705 else
81706 newStyles[id].parts.push(part);
81707 }
81708 return styles;
81709 }
81710
81711 function createStyleElement() {
81712 var styleElement = document.createElement("style");
81713 var head = getHeadElement();
81714 styleElement.type = "text/css";
81715 head.appendChild(styleElement);
81716 return styleElement;
81717 }
81718
81719 function createLinkElement() {
81720 var linkElement = document.createElement("link");
81721 var head = getHeadElement();
81722 linkElement.rel = "stylesheet";
81723 head.appendChild(linkElement);
81724 return linkElement;
81725 }
81726
81727 function addStyle(obj, options) {
81728 var styleElement, update, remove;
81729
81730 if (options.singleton) {
81731 var styleIndex = singletonCounter++;
81732 styleElement = singletonElement || (singletonElement = createStyleElement());
81733 update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
81734 remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
81735 } else if(obj.sourceMap &&
81736 typeof URL === "function" &&
81737 typeof URL.createObjectURL === "function" &&
81738 typeof URL.revokeObjectURL === "function" &&
81739 typeof Blob === "function" &&
81740 typeof btoa === "function") {
81741 styleElement = createLinkElement();
81742 update = updateLink.bind(null, styleElement);
81743 remove = function() {
81744 styleElement.parentNode.removeChild(styleElement);
81745 if(styleElement.href)
81746 URL.revokeObjectURL(styleElement.href);
81747 };
81748 } else {
81749 styleElement = createStyleElement();
81750 update = applyToTag.bind(null, styleElement);
81751 remove = function() {
81752 styleElement.parentNode.removeChild(styleElement);
81753 };
81754 }
81755
81756 update(obj);
81757
81758 return function updateStyle(newObj) {
81759 if(newObj) {
81760 if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
81761 return;
81762 update(obj = newObj);
81763 } else {
81764 remove();
81765 }
81766 };
81767 }
81768
81769 var replaceText = (function () {
81770 var textStore = [];
81771
81772 return function (index, replacement) {
81773 textStore[index] = replacement;
81774 return textStore.filter(Boolean).join('\n');
81775 };
81776 })();
81777
81778 function applyToSingletonTag(styleElement, index, remove, obj) {
81779 var css = remove ? "" : obj.css;
81780
81781 if (styleElement.styleSheet) {
81782 styleElement.styleSheet.cssText = replaceText(index, css);
81783 } else {
81784 var cssNode = document.createTextNode(css);
81785 var childNodes = styleElement.childNodes;
81786 if (childNodes[index]) styleElement.removeChild(childNodes[index]);
81787 if (childNodes.length) {
81788 styleElement.insertBefore(cssNode, childNodes[index]);
81789 } else {
81790 styleElement.appendChild(cssNode);
81791 }
81792 }
81793 }
81794
81795 function applyToTag(styleElement, obj) {
81796 var css = obj.css;
81797 var media = obj.media;
81798 var sourceMap = obj.sourceMap;
81799
81800 if(media) {
81801 styleElement.setAttribute("media", media)
81802 }
81803
81804 if(styleElement.styleSheet) {
81805 styleElement.styleSheet.cssText = css;
81806 } else {
81807 while(styleElement.firstChild) {
81808 styleElement.removeChild(styleElement.firstChild);
81809 }
81810 styleElement.appendChild(document.createTextNode(css));
81811 }
81812 }
81813
81814 function updateLink(linkElement, obj) {
81815 var css = obj.css;
81816 var media = obj.media;
81817 var sourceMap = obj.sourceMap;
81818
81819 if(sourceMap) {
81820 // http://stackoverflow.com/a/26603875
81821 css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
81822 }
81823
81824 var blob = new Blob([css], { type: "text/css" });
81825
81826 var oldSrc = linkElement.href;
81827
81828 linkElement.href = URL.createObjectURL(blob);
81829
81830 if(oldSrc)
81831 URL.revokeObjectURL(oldSrc);
81832 }
81833
81834
81835/***/ },
81836/* 787 */
81837/***/ function(module, exports, __webpack_require__) {
81838
81839 // style-loader: Adds some css to the DOM by adding a <style> tag
81840
81841 // load the styles
81842 var content = __webpack_require__(788);
81843 if(typeof content === 'string') content = [[module.id, content, '']];
81844 // add the styles to the DOM
81845 var update = __webpack_require__(611)(content, {});
81846 if(content.locals) module.exports = content.locals;
81847 // Hot Module Replacement
81848 if(false) {
81849 // When the styles change, update the <style> tags
81850 if(!content.locals) {
81851 module.hot.accept("!!./../../../css-loader/index.js!./../../../less-loader/index.js!./example.less", function() {
81852 var newContent = require("!!./../../../css-loader/index.js!./../../../less-loader/index.js!./example.less");
81853 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
81854 update(newContent);
81855 });
81856 }
81857 // When the module is disposed, remove the <style> tags
81858 module.hot.dispose(function() { update(); });
81859 }
81860
81861/***/ },
81862/* 788 */
81863/***/ function(module, exports, __webpack_require__) {
81864
81865 exports = module.exports = __webpack_require__(605)();
81866 // imports
81867
81868
81869 // module
81870 exports.push([module.id, "/**\n * React Select\n * ============\n * Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/\n * https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs\n * MIT License: https://github.com/JedWatson/react-select\n*/\n.Select {\n position: relative;\n}\n.Select,\n.Select div,\n.Select input,\n.Select span {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n.Select.is-disabled > .Select-control {\n background-color: #f9f9f9;\n}\n.Select.is-disabled > .Select-control:hover {\n box-shadow: none;\n}\n.Select.is-disabled .Select-arrow-zone {\n cursor: default;\n pointer-events: none;\n opacity: 0.35;\n}\n.Select-control {\n background-color: #fff;\n border-color: #d9d9d9 #ccc #b3b3b3;\n border-radius: 4px;\n border: 1px solid #ccc;\n color: #333;\n cursor: default;\n display: table;\n border-spacing: 0;\n border-collapse: separate;\n height: 36px;\n outline: none;\n overflow: hidden;\n position: relative;\n width: 100%;\n}\n.Select-control:hover {\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n}\n.Select-control .Select-input:focus {\n outline: none;\n}\n.is-searchable.is-open > .Select-control {\n cursor: text;\n}\n.is-open > .Select-control {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n background: #fff;\n border-color: #b3b3b3 #ccc #d9d9d9;\n}\n.is-open > .Select-control > .Select-arrow {\n border-color: transparent transparent #999;\n border-width: 0 5px 5px;\n}\n.is-searchable.is-focused:not(.is-open) > .Select-control {\n cursor: text;\n}\n.is-focused:not(.is-open) > .Select-control {\n border-color: #007eff;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1);\n}\n.Select-placeholder,\n.Select--single > .Select-control .Select-value {\n bottom: 0;\n color: #aaa;\n left: 0;\n line-height: 34px;\n padding-left: 10px;\n padding-right: 10px;\n position: absolute;\n right: 0;\n top: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.has-value.Select--single > .Select-control .Select-value .Select-value-label,\n.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {\n color: #333;\n}\n.has-value.Select--single > .Select-control .Select-value a.Select-value-label,\n.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label {\n cursor: pointer;\n text-decoration: none;\n}\n.has-value.Select--single > .Select-control .Select-value a.Select-value-label:hover,\n.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:hover,\n.has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,\n.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {\n color: #007eff;\n outline: none;\n text-decoration: underline;\n}\n.Select-input {\n height: 34px;\n padding-left: 10px;\n padding-right: 10px;\n vertical-align: middle;\n}\n.Select-input > input {\n width: 100%;\n background: none transparent;\n border: 0 none;\n box-shadow: none;\n cursor: default;\n display: inline-block;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n outline: none;\n line-height: 14px;\n /* For IE 8 compatibility */\n padding: 8px 0 12px;\n /* For IE 8 compatibility */\n -webkit-appearance: none;\n}\n.is-focused .Select-input > input {\n cursor: text;\n}\n.has-value.is-pseudo-focused .Select-input {\n opacity: 0;\n}\n.Select-control:not(.is-searchable) > .Select-input {\n outline: none;\n}\n.Select-loading-zone {\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 16px;\n}\n.Select-loading {\n -webkit-animation: Select-animation-spin 400ms infinite linear;\n -o-animation: Select-animation-spin 400ms infinite linear;\n animation: Select-animation-spin 400ms infinite linear;\n width: 16px;\n height: 16px;\n box-sizing: border-box;\n border-radius: 50%;\n border: 2px solid #ccc;\n border-right-color: #333;\n display: inline-block;\n position: relative;\n vertical-align: middle;\n}\n.Select-clear-zone {\n -webkit-animation: Select-animation-fadeIn 200ms;\n -o-animation: Select-animation-fadeIn 200ms;\n animation: Select-animation-fadeIn 200ms;\n color: #999;\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 17px;\n}\n.Select-clear-zone:hover {\n color: #D0021B;\n}\n.Select-clear {\n display: inline-block;\n font-size: 18px;\n line-height: 1;\n}\n.Select--multi .Select-clear-zone {\n width: 17px;\n}\n.Select-arrow-zone {\n cursor: pointer;\n display: table-cell;\n position: relative;\n text-align: center;\n vertical-align: middle;\n width: 25px;\n padding-right: 5px;\n}\n.Select-arrow {\n border-color: #999 transparent transparent;\n border-style: solid;\n border-width: 5px 5px 2.5px;\n display: inline-block;\n height: 0;\n width: 0;\n}\n.is-open .Select-arrow,\n.Select-arrow-zone:hover > .Select-arrow {\n border-top-color: #666;\n}\n.Select--multi .Select-multi-value-wrapper {\n display: inline-block;\n}\n.Select .Select-aria-only {\n display: inline-block;\n height: 1px;\n width: 1px;\n margin: -1px;\n clip: rect(0, 0, 0, 0);\n overflow: hidden;\n}\n@-webkit-keyframes Select-animation-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes Select-animation-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.Select-menu-outer {\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n background-color: #fff;\n border: 1px solid #ccc;\n border-top-color: #e6e6e6;\n box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\n box-sizing: border-box;\n margin-top: -1px;\n max-height: 200px;\n position: absolute;\n top: 100%;\n width: 100%;\n z-index: 1;\n -webkit-overflow-scrolling: touch;\n}\n.Select-menu {\n max-height: 198px;\n overflow-y: auto;\n}\n.Select-option {\n box-sizing: border-box;\n background-color: #fff;\n color: #666666;\n cursor: pointer;\n display: block;\n padding: 8px 10px;\n}\n.Select-option:last-child {\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.Select-option.is-selected {\n background-color: #f5faff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.04);\n color: #333;\n}\n.Select-option.is-focused {\n background-color: #ebf5ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.08);\n color: #333;\n}\n.Select-option.is-disabled {\n color: #cccccc;\n cursor: default;\n}\n.Select-noresults {\n box-sizing: border-box;\n color: #999999;\n cursor: default;\n display: block;\n padding: 8px 10px;\n}\n.Select--multi .Select-input {\n vertical-align: middle;\n margin-left: 10px;\n padding: 0;\n}\n.Select--multi.has-value .Select-input {\n margin-left: 5px;\n}\n.Select--multi .Select-value {\n background-color: #ebf5ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.08);\n border-radius: 2px;\n border: 1px solid #c2e0ff;\n /* Fallback color for IE 8 */\n border: 1px solid rgba(0, 126, 255, 0.24);\n color: #007eff;\n display: inline-block;\n font-size: 0.9em;\n line-height: 1.4;\n margin-left: 5px;\n margin-top: 5px;\n vertical-align: top;\n}\n.Select--multi .Select-value-icon,\n.Select--multi .Select-value-label {\n display: inline-block;\n vertical-align: middle;\n}\n.Select--multi .Select-value-label {\n border-bottom-right-radius: 2px;\n border-top-right-radius: 2px;\n cursor: default;\n padding: 2px 5px;\n}\n.Select--multi a.Select-value-label {\n color: #007eff;\n cursor: pointer;\n text-decoration: none;\n}\n.Select--multi a.Select-value-label:hover {\n text-decoration: underline;\n}\n.Select--multi .Select-value-icon {\n cursor: pointer;\n border-bottom-left-radius: 2px;\n border-top-left-radius: 2px;\n border-right: 1px solid #c2e0ff;\n /* Fallback color for IE 8 */\n border-right: 1px solid rgba(0, 126, 255, 0.24);\n padding: 1px 5px 3px;\n}\n.Select--multi .Select-value-icon:hover,\n.Select--multi .Select-value-icon:focus {\n background-color: #d8eafd;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 113, 230, 0.08);\n color: #0071e6;\n}\n.Select--multi .Select-value-icon:active {\n background-color: #c2e0ff;\n /* Fallback color for IE 8 */\n background-color: rgba(0, 126, 255, 0.24);\n}\n.Select--multi.is-disabled .Select-value {\n background-color: #fcfcfc;\n border: 1px solid #e3e3e3;\n color: #333;\n}\n.Select--multi.is-disabled .Select-value-icon {\n cursor: not-allowed;\n border-right: 1px solid #e3e3e3;\n}\n.Select--multi.is-disabled .Select-value-icon:hover,\n.Select--multi.is-disabled .Select-value-icon:focus,\n.Select--multi.is-disabled .Select-value-icon:active {\n background-color: #fcfcfc;\n}\n@keyframes Select-animation-spin {\n to {\n transform: rotate(1turn);\n }\n}\n@-webkit-keyframes Select-animation-spin {\n to {\n -webkit-transform: rotate(1turn);\n }\n}\nbody {\n color: #333;\n font-family: Helvetica Neue, Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.4;\n margin: 0;\n padding: 0;\n}\na {\n color: #007eff;\n text-decoration: none;\n}\na:hover {\n text-decoration: underline;\n}\n.container {\n margin-left: auto;\n margin-right: auto;\n max-width: 400px;\n padding: 0 30px;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: black;\n font-weight: 500;\n line-height: 1;\n margin-bottom: .66em;\n margin-top: 0;\n}\nh1,\n.h1 {\n font-size: 3em;\n}\nh2,\n.h2 {\n font-size: 2em;\n font-weight: 300;\n}\nh3,\n.h3 {\n font-size: 1.25em;\n}\nh4,\n.h4 {\n font-size: 1em;\n}\nh5,\n.h5 {\n font-size: .85em;\n}\nh6,\n.h6 {\n font-size: .75em;\n}\n.page-body,\n.page-footer,\n.page-header {\n padding: 30px 0;\n}\n.page-header {\n background-color: #007eff;\n color: #bfdfff;\n}\n.page-header h1,\n.page-header h2,\n.page-header h3 {\n color: white;\n}\n.page-header p {\n font-size: 1.2em;\n margin: 0;\n}\n.page-header a {\n border-bottom: 1px solid rgba(255, 255, 255, 0.3);\n color: white;\n text-decoration: none;\n}\n.page-header a:hover,\n.page-header a:focus {\n border-bottom-color: white;\n outline: none;\n text-decoration: none;\n}\n.page-subheader {\n background-color: #e6f2ff;\n line-height: 20px;\n padding: 30px 0;\n}\n.page-subheader__button {\n float: right;\n}\n.page-subheader__link {\n border-bottom: 1px solid rgba(0, 126, 255, 0.3);\n outline: none;\n text-decoration: none;\n}\n.page-subheader__link:hover,\n.page-subheader__link:focus {\n border-bottom-color: #007eff;\n outline: none;\n text-decoration: none;\n}\n.page-footer {\n background-color: #fafafa;\n color: #999;\n padding: 30px 0;\n text-align: center;\n}\n.page-footer a {\n color: black;\n}\n@media (min-width: 480px) {\n .page-body,\n .page-header {\n padding: 60px 0;\n }\n .page-header {\n font-size: 1.4em;\n }\n .page-subheader {\n font-size: 1.125em;\n line-height: 28px;\n }\n}\n.checkbox-list {\n margin-top: .5em;\n overflow: hidden;\n}\n.checkbox-list > .checkbox {\n clear: left;\n float: left;\n margin-top: .5em;\n}\n.checkbox-control {\n margin-right: .5em;\n position: relative;\n top: -1px;\n}\n.switcher {\n color: #999;\n cursor: default;\n font-size: 12px;\n margin: 10px 0;\n text-transform: uppercase;\n}\n.switcher .link {\n color: #007eff;\n cursor: pointer;\n font-weight: bold;\n margin-left: 10px;\n}\n.switcher .link:hover {\n text-decoration: underline;\n}\n.switcher .active {\n color: #666;\n font-weight: bold;\n margin-left: 10px;\n}\n.section {\n margin-bottom: 40px;\n}\n.hint {\n font-size: .85em;\n margin: 15px 0;\n color: #666;\n}\n.virtual-scroll {\n z-index: 1;\n}\n", ""]);
81871
81872 // exports
81873
81874
81875/***/ }
81876/******/ ]);
\No newline at end of file