1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId])
|
11 | return installedModules[moduleId].exports;
|
12 |
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.i = function(value) { return value; };
|
39 |
|
40 |
|
41 | __webpack_require__.d = function(exports, name, getter) {
|
42 | if(!__webpack_require__.o(exports, name)) {
|
43 | Object.defineProperty(exports, name, {
|
44 | configurable: false,
|
45 | enumerable: true,
|
46 | get: getter
|
47 | /******/ });
|
48 | /******/ }
|
49 | /******/ };
|
50 |
|
51 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
52 | /******/ __webpack_require__.n = function(module) {
|
53 | var getter = module && module.__esModule ?
|
54 | function getDefault() { return module['default']; } :
|
55 | function getModuleExports() { return module; };
|
56 | __webpack_require__.d(getter, 'a', getter);
|
57 | return getter;
|
58 | };
|
59 |
|
60 |
|
61 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
62 |
|
63 |
|
64 | __webpack_require__.p = "";
|
65 |
|
66 |
|
67 | return __webpack_require__(__webpack_require__.s = 25);
|
68 | })
|
69 |
|
70 | ([
|
71 |
|
72 | (function(module, exports) {
|
73 |
|
74 |
|
75 | var process = module.exports = {};
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 | var cachedSetTimeout;
|
83 | var cachedClearTimeout;
|
84 |
|
85 | function defaultSetTimout() {
|
86 | throw new Error('setTimeout has not been defined');
|
87 | }
|
88 | function defaultClearTimeout () {
|
89 | throw new Error('clearTimeout has not been defined');
|
90 | }
|
91 | (function () {
|
92 | try {
|
93 | if (typeof setTimeout === 'function') {
|
94 | cachedSetTimeout = setTimeout;
|
95 | } else {
|
96 | cachedSetTimeout = defaultSetTimout;
|
97 | }
|
98 | } catch (e) {
|
99 | cachedSetTimeout = defaultSetTimout;
|
100 | }
|
101 | try {
|
102 | if (typeof clearTimeout === 'function') {
|
103 | cachedClearTimeout = clearTimeout;
|
104 | } else {
|
105 | cachedClearTimeout = defaultClearTimeout;
|
106 | }
|
107 | } catch (e) {
|
108 | cachedClearTimeout = defaultClearTimeout;
|
109 | }
|
110 | } ())
|
111 | function runTimeout(fun) {
|
112 | if (cachedSetTimeout === setTimeout) {
|
113 |
|
114 | return setTimeout(fun, 0);
|
115 | }
|
116 |
|
117 | if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
118 | cachedSetTimeout = setTimeout;
|
119 | return setTimeout(fun, 0);
|
120 | }
|
121 | try {
|
122 |
|
123 | return cachedSetTimeout(fun, 0);
|
124 | } catch(e){
|
125 | try {
|
126 |
|
127 | return cachedSetTimeout.call(null, fun, 0);
|
128 | } catch(e){
|
129 |
|
130 | return cachedSetTimeout.call(this, fun, 0);
|
131 | }
|
132 | }
|
133 |
|
134 |
|
135 | }
|
136 | function runClearTimeout(marker) {
|
137 | if (cachedClearTimeout === clearTimeout) {
|
138 |
|
139 | return clearTimeout(marker);
|
140 | }
|
141 |
|
142 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
143 | cachedClearTimeout = clearTimeout;
|
144 | return clearTimeout(marker);
|
145 | }
|
146 | try {
|
147 |
|
148 | return cachedClearTimeout(marker);
|
149 | } catch (e){
|
150 | try {
|
151 |
|
152 | return cachedClearTimeout.call(null, marker);
|
153 | } catch (e){
|
154 |
|
155 |
|
156 | return cachedClearTimeout.call(this, marker);
|
157 | }
|
158 | }
|
159 |
|
160 |
|
161 |
|
162 | }
|
163 | var queue = [];
|
164 | var draining = false;
|
165 | var currentQueue;
|
166 | var queueIndex = -1;
|
167 |
|
168 | function cleanUpNextTick() {
|
169 | if (!draining || !currentQueue) {
|
170 | return;
|
171 | }
|
172 | draining = false;
|
173 | if (currentQueue.length) {
|
174 | queue = currentQueue.concat(queue);
|
175 | } else {
|
176 | queueIndex = -1;
|
177 | }
|
178 | if (queue.length) {
|
179 | drainQueue();
|
180 | }
|
181 | }
|
182 |
|
183 | function drainQueue() {
|
184 | if (draining) {
|
185 | return;
|
186 | }
|
187 | var timeout = runTimeout(cleanUpNextTick);
|
188 | draining = true;
|
189 |
|
190 | var len = queue.length;
|
191 | while(len) {
|
192 | currentQueue = queue;
|
193 | queue = [];
|
194 | while (++queueIndex < len) {
|
195 | if (currentQueue) {
|
196 | currentQueue[queueIndex].run();
|
197 | }
|
198 | }
|
199 | queueIndex = -1;
|
200 | len = queue.length;
|
201 | }
|
202 | currentQueue = null;
|
203 | draining = false;
|
204 | runClearTimeout(timeout);
|
205 | }
|
206 |
|
207 | process.nextTick = function (fun) {
|
208 | var args = new Array(arguments.length - 1);
|
209 | if (arguments.length > 1) {
|
210 | for (var i = 1; i < arguments.length; i++) {
|
211 | args[i - 1] = arguments[i];
|
212 | }
|
213 | }
|
214 | queue.push(new Item(fun, args));
|
215 | if (queue.length === 1 && !draining) {
|
216 | runTimeout(drainQueue);
|
217 | }
|
218 | };
|
219 |
|
220 |
|
221 | function Item(fun, array) {
|
222 | this.fun = fun;
|
223 | this.array = array;
|
224 | }
|
225 | Item.prototype.run = function () {
|
226 | this.fun.apply(null, this.array);
|
227 | };
|
228 | process.title = 'browser';
|
229 | process.browser = true;
|
230 | process.env = {};
|
231 | process.argv = [];
|
232 | process.version = '';
|
233 | process.versions = {};
|
234 |
|
235 | function noop() {}
|
236 |
|
237 | process.on = noop;
|
238 | process.addListener = noop;
|
239 | process.once = noop;
|
240 | process.off = noop;
|
241 | process.removeListener = noop;
|
242 | process.removeAllListeners = noop;
|
243 | process.emit = noop;
|
244 |
|
245 | process.binding = function (name) {
|
246 | throw new Error('process.binding is not supported');
|
247 | };
|
248 |
|
249 | process.cwd = function () { return '/' };
|
250 | process.chdir = function (dir) {
|
251 | throw new Error('process.chdir is not supported');
|
252 | };
|
253 | process.umask = function() { return 0; };
|
254 |
|
255 |
|
256 | }),
|
257 |
|
258 | (function(module, exports, __webpack_require__) {
|
259 |
|
260 | "use strict";
|
261 |
|
262 |
|
263 | var randomFromSeed = __webpack_require__(23);
|
264 |
|
265 | var ORIGINAL = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-';
|
266 | var alphabet;
|
267 | var previousSeed;
|
268 |
|
269 | var shuffled;
|
270 |
|
271 | function reset() {
|
272 | shuffled = false;
|
273 | }
|
274 |
|
275 | function setCharacters(_alphabet_) {
|
276 | if (!_alphabet_) {
|
277 | if (alphabet !== ORIGINAL) {
|
278 | alphabet = ORIGINAL;
|
279 | reset();
|
280 | }
|
281 | return;
|
282 | }
|
283 |
|
284 | if (_alphabet_ === alphabet) {
|
285 | return;
|
286 | }
|
287 |
|
288 | if (_alphabet_.length !== ORIGINAL.length) {
|
289 | throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. You submitted ' + _alphabet_.length + ' characters: ' + _alphabet_);
|
290 | }
|
291 |
|
292 | var unique = _alphabet_.split('').filter(function(item, ind, arr){
|
293 | return ind !== arr.lastIndexOf(item);
|
294 | });
|
295 |
|
296 | if (unique.length) {
|
297 | throw new Error('Custom alphabet for shortid must be ' + ORIGINAL.length + ' unique characters. These characters were not unique: ' + unique.join(', '));
|
298 | }
|
299 |
|
300 | alphabet = _alphabet_;
|
301 | reset();
|
302 | }
|
303 |
|
304 | function characters(_alphabet_) {
|
305 | setCharacters(_alphabet_);
|
306 | return alphabet;
|
307 | }
|
308 |
|
309 | function setSeed(seed) {
|
310 | randomFromSeed.seed(seed);
|
311 | if (previousSeed !== seed) {
|
312 | reset();
|
313 | previousSeed = seed;
|
314 | }
|
315 | }
|
316 |
|
317 | function shuffle() {
|
318 | if (!alphabet) {
|
319 | setCharacters(ORIGINAL);
|
320 | }
|
321 |
|
322 | var sourceArray = alphabet.split('');
|
323 | var targetArray = [];
|
324 | var r = randomFromSeed.nextValue();
|
325 | var characterIndex;
|
326 |
|
327 | while (sourceArray.length > 0) {
|
328 | r = randomFromSeed.nextValue();
|
329 | characterIndex = Math.floor(r * sourceArray.length);
|
330 | targetArray.push(sourceArray.splice(characterIndex, 1)[0]);
|
331 | }
|
332 | return targetArray.join('');
|
333 | }
|
334 |
|
335 | function getShuffled() {
|
336 | if (shuffled) {
|
337 | return shuffled;
|
338 | }
|
339 | shuffled = shuffle();
|
340 | return shuffled;
|
341 | }
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 | function lookup(index) {
|
349 | var alphabetShuffled = getShuffled();
|
350 | return alphabetShuffled[index];
|
351 | }
|
352 |
|
353 | module.exports = {
|
354 | characters: characters,
|
355 | seed: setSeed,
|
356 | lookup: lookup,
|
357 | shuffled: getShuffled
|
358 | };
|
359 |
|
360 |
|
361 | }),
|
362 |
|
363 | (function(module, exports, __webpack_require__) {
|
364 |
|
365 | "use strict";
|
366 |
|
367 |
|
368 | Object.defineProperty(exports, "__esModule", {
|
369 | value: true
|
370 | });
|
371 |
|
372 | 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; };
|
373 |
|
374 | 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; }; }();
|
375 |
|
376 | 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; }
|
377 |
|
378 | 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; }
|
379 |
|
380 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
381 |
|
382 | var initialState = {
|
383 | x: 0,
|
384 | y: 0,
|
385 | isDragging: false,
|
386 | startingX: 0,
|
387 | startingy: 0,
|
388 | currentlyDraggingId: null,
|
389 | currentlyHoveredDroppableId: null,
|
390 | data: null,
|
391 | type: null
|
392 | };
|
393 |
|
394 | var store = function () {
|
395 | function store() {
|
396 | _classCallCheck(this, store);
|
397 |
|
398 | this.state = initialState;
|
399 | this.onUpdate = {};
|
400 | }
|
401 |
|
402 | _createClass(store, [{
|
403 | key: "update",
|
404 | value: function update(payload) {
|
405 | var _this = this;
|
406 |
|
407 | this.state = _extends({}, this.state, payload);
|
408 | Object.keys(this.onUpdate).forEach(function (funcId) {
|
409 | if (_this.onUpdate[funcId]) {
|
410 | _this.onUpdate[funcId]();
|
411 | }
|
412 | });
|
413 | }
|
414 | }, {
|
415 | key: "subscribe",
|
416 | value: function subscribe(id, func) {
|
417 | var _this2 = this;
|
418 |
|
419 | this.onUpdate = _extends({}, this.onUpdate, _defineProperty({}, id, func));
|
420 | return function () {
|
421 | _this2.unsubscribe(id);
|
422 | };
|
423 | }
|
424 | }, {
|
425 | key: "unsubscribe",
|
426 | value: function unsubscribe(id) {
|
427 | var _onUpdate = this.onUpdate,
|
428 | deleted = _onUpdate[id],
|
429 | remainder = _objectWithoutProperties(_onUpdate, [id]);
|
430 |
|
431 | this.onUpdate = remainder;
|
432 | }
|
433 | }, {
|
434 | key: "getState",
|
435 | value: function getState() {
|
436 | return _extends({}, this.state);
|
437 | }
|
438 | }, {
|
439 | key: "reset",
|
440 | value: function reset() {
|
441 | this.update(initialState);
|
442 | }
|
443 | }]);
|
444 |
|
445 | return store;
|
446 | }();
|
447 |
|
448 | var dndStore = new store();
|
449 |
|
450 | exports.default = dndStore;
|
451 |
|
452 | }),
|
453 |
|
454 | (function(module, exports, __webpack_require__) {
|
455 |
|
456 | "use strict";
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 | function makeEmptyFunction(arg) {
|
469 | return function () {
|
470 | return arg;
|
471 | };
|
472 | }
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 | var emptyFunction = function emptyFunction() {};
|
480 |
|
481 | emptyFunction.thatReturns = makeEmptyFunction;
|
482 | emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
|
483 | emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
|
484 | emptyFunction.thatReturnsNull = makeEmptyFunction(null);
|
485 | emptyFunction.thatReturnsThis = function () {
|
486 | return this;
|
487 | };
|
488 | emptyFunction.thatReturnsArgument = function (arg) {
|
489 | return arg;
|
490 | };
|
491 |
|
492 | module.exports = emptyFunction;
|
493 |
|
494 | }),
|
495 |
|
496 | (function(module, exports, __webpack_require__) {
|
497 |
|
498 | "use strict";
|
499 | (function(process) { |
500 |
|
501 |
|
502 |
|
503 |
|
504 |
|
505 |
|
506 |
|
507 |
|
508 |
|
509 |
|
510 |
|
511 |
|
512 |
|
513 |
|
514 |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 | var validateFormat = function validateFormat(format) {};
|
521 |
|
522 | if (process.env.NODE_ENV !== 'production') {
|
523 | validateFormat = function validateFormat(format) {
|
524 | if (format === undefined) {
|
525 | throw new Error('invariant requires an error message argument');
|
526 | }
|
527 | };
|
528 | }
|
529 |
|
530 | function invariant(condition, format, a, b, c, d, e, f) {
|
531 | validateFormat(format);
|
532 |
|
533 | if (!condition) {
|
534 | var error;
|
535 | if (format === undefined) {
|
536 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
537 | } else {
|
538 | var args = [a, b, c, d, e, f];
|
539 | var argIndex = 0;
|
540 | error = new Error(format.replace(/%s/g, function () {
|
541 | return args[argIndex++];
|
542 | }));
|
543 | error.name = 'Invariant Violation';
|
544 | }
|
545 |
|
546 | error.framesToPop = 1;
|
547 | throw error;
|
548 | }
|
549 | }
|
550 |
|
551 | module.exports = invariant;
|
552 | }.call(exports, __webpack_require__(0)))
|
553 |
|
554 | }),
|
555 |
|
556 | (function(module, exports, __webpack_require__) {
|
557 |
|
558 | (function(process) { |
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 |
|
565 | if (process.env.NODE_ENV !== 'production') {
|
566 | var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
567 | Symbol.for &&
|
568 | Symbol.for('react.element')) ||
|
569 | 0xeac7;
|
570 |
|
571 | var isValidElement = function(object) {
|
572 | return typeof object === 'object' &&
|
573 | object !== null &&
|
574 | object.$$typeof === REACT_ELEMENT_TYPE;
|
575 | };
|
576 |
|
577 |
|
578 |
|
579 | var throwOnDirectAccess = true;
|
580 | module.exports = __webpack_require__(17)(isValidElement, throwOnDirectAccess);
|
581 | } else {
|
582 |
|
583 |
|
584 | module.exports = __webpack_require__(16)();
|
585 | }
|
586 |
|
587 | }.call(exports, __webpack_require__(0)))
|
588 |
|
589 | }),
|
590 |
|
591 | (function(module, exports, __webpack_require__) {
|
592 |
|
593 | "use strict";
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 |
|
602 |
|
603 | var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
604 |
|
605 | module.exports = ReactPropTypesSecret;
|
606 |
|
607 |
|
608 | }),
|
609 |
|
610 | (function(module, exports, __webpack_require__) {
|
611 |
|
612 | "use strict";
|
613 |
|
614 | module.exports = __webpack_require__(20);
|
615 |
|
616 |
|
617 | }),
|
618 |
|
619 | (function(module, exports) {
|
620 |
|
621 | module.exports = require("react");
|
622 |
|
623 | }),
|
624 |
|
625 | (function(module, exports, __webpack_require__) {
|
626 |
|
627 | "use strict";
|
628 | (function(process) { |
629 |
|
630 |
|
631 |
|
632 |
|
633 |
|
634 |
|
635 |
|
636 |
|
637 |
|
638 | var emptyFunction = __webpack_require__(3);
|
639 |
|
640 |
|
641 |
|
642 |
|
643 |
|
644 |
|
645 |
|
646 |
|
647 | var warning = emptyFunction;
|
648 |
|
649 | if (process.env.NODE_ENV !== 'production') {
|
650 | var printWarning = function printWarning(format) {
|
651 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
652 | args[_key - 1] = arguments[_key];
|
653 | }
|
654 |
|
655 | var argIndex = 0;
|
656 | var message = 'Warning: ' + format.replace(/%s/g, function () {
|
657 | return args[argIndex++];
|
658 | });
|
659 | if (typeof console !== 'undefined') {
|
660 | console.error(message);
|
661 | }
|
662 | try {
|
663 |
|
664 |
|
665 |
|
666 | throw new Error(message);
|
667 | } catch (x) {}
|
668 | };
|
669 |
|
670 | warning = function warning(condition, format) {
|
671 | if (format === undefined) {
|
672 | throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
|
673 | }
|
674 |
|
675 | if (format.indexOf('Failed Composite propType: ') === 0) {
|
676 | return;
|
677 | }
|
678 |
|
679 | if (!condition) {
|
680 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
681 | args[_key2 - 2] = arguments[_key2];
|
682 | }
|
683 |
|
684 | printWarning.apply(undefined, [format].concat(args));
|
685 | }
|
686 | };
|
687 | }
|
688 |
|
689 | module.exports = warning;
|
690 | }.call(exports, __webpack_require__(0)))
|
691 |
|
692 | }),
|
693 |
|
694 | (function(module, exports, __webpack_require__) {
|
695 |
|
696 | "use strict";
|
697 |
|
698 |
|
699 | var randomByte = __webpack_require__(22);
|
700 |
|
701 | function encode(lookup, number) {
|
702 | var loopCounter = 0;
|
703 | var done;
|
704 |
|
705 | var str = '';
|
706 |
|
707 | while (!done) {
|
708 | str = str + lookup( ( (number >> (4 * loopCounter)) & 0x0f ) | randomByte() );
|
709 | done = number < (Math.pow(16, loopCounter + 1 ) );
|
710 | loopCounter++;
|
711 | }
|
712 | return str;
|
713 | }
|
714 |
|
715 | module.exports = encode;
|
716 |
|
717 |
|
718 | }),
|
719 |
|
720 | (function(module, exports, __webpack_require__) {
|
721 |
|
722 | "use strict";
|
723 |
|
724 |
|
725 | Object.defineProperty(exports, "__esModule", {
|
726 | value: true
|
727 | });
|
728 |
|
729 | 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; };
|
730 |
|
731 | 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; }; }();
|
732 |
|
733 | var _react = __webpack_require__(8);
|
734 |
|
735 | var _react2 = _interopRequireDefault(_react);
|
736 |
|
737 | var _store = __webpack_require__(2);
|
738 |
|
739 | var _store2 = _interopRequireDefault(_store);
|
740 |
|
741 | var _shortid = __webpack_require__(7);
|
742 |
|
743 | var _shortid2 = _interopRequireDefault(_shortid);
|
744 |
|
745 | var _propTypes = __webpack_require__(5);
|
746 |
|
747 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
748 |
|
749 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
750 |
|
751 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
752 |
|
753 | 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; }
|
754 |
|
755 | 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; }
|
756 |
|
757 | var DragComponent = function (_React$Component) {
|
758 | _inherits(DragComponent, _React$Component);
|
759 |
|
760 | function DragComponent() {
|
761 | var _ref;
|
762 |
|
763 | var _temp, _this, _ret;
|
764 |
|
765 | _classCallCheck(this, DragComponent);
|
766 |
|
767 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
768 | args[_key] = arguments[_key];
|
769 | }
|
770 |
|
771 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DragComponent.__proto__ || Object.getPrototypeOf(DragComponent)).call.apply(_ref, [this].concat(args))), _this), _this.dragId = _shortid2.default.generate(), _this.componentDidMount = function () {
|
772 | _this.unsubscribe = _store2.default.subscribe(_this.dragId, function () {
|
773 | _this.forceUpdate();
|
774 | });
|
775 | }, _this.componentWillUnmount = function () {
|
776 | _this.unsubscribe();
|
777 | }, _temp), _possibleConstructorReturn(_this, _ret);
|
778 | }
|
779 |
|
780 | _createClass(DragComponent, [{
|
781 | key: 'render',
|
782 | value: function render() {
|
783 | var state = _store2.default.getState();
|
784 | return state.isDragging && state.currentlyDraggingId === this.props.for && this.props.children(_extends({}, state, {
|
785 | isOverAccepted: Array.isArray(this.currentlyHoveredDroppableAccepts) ? this.currentlyHoveredDroppableAccepts.find(state.type) : state.type === this.currentlyHoveredDroppableAccepts
|
786 | }));
|
787 | }
|
788 | }]);
|
789 |
|
790 | return DragComponent;
|
791 | }(_react2.default.Component);
|
792 |
|
793 | DragComponent.defaultProps = {
|
794 | for: ''
|
795 | };
|
796 |
|
797 | DragComponent.propTypes = {
|
798 | children: _propTypes2.default.func.isRequired,
|
799 | for: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number]).isRequired
|
800 | };
|
801 | exports.default = DragComponent;
|
802 |
|
803 | }),
|
804 |
|
805 | (function(module, exports, __webpack_require__) {
|
806 |
|
807 | "use strict";
|
808 |
|
809 |
|
810 | Object.defineProperty(exports, "__esModule", {
|
811 | value: true
|
812 | });
|
813 |
|
814 | 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; };
|
815 |
|
816 | 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; }; }();
|
817 |
|
818 | var _react = __webpack_require__(8);
|
819 |
|
820 | var _react2 = _interopRequireDefault(_react);
|
821 |
|
822 | var _store = __webpack_require__(2);
|
823 |
|
824 | var _store2 = _interopRequireDefault(_store);
|
825 |
|
826 | var _shortid = __webpack_require__(7);
|
827 |
|
828 | var _shortid2 = _interopRequireDefault(_shortid);
|
829 |
|
830 | var _propTypes = __webpack_require__(5);
|
831 |
|
832 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
833 |
|
834 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
835 |
|
836 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
837 |
|
838 | 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; }
|
839 |
|
840 | 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; }
|
841 |
|
842 | var Draggable = function (_React$Component) {
|
843 | _inherits(Draggable, _React$Component);
|
844 |
|
845 | function Draggable() {
|
846 | var _ref;
|
847 |
|
848 | var _temp, _this, _ret;
|
849 |
|
850 | _classCallCheck(this, Draggable);
|
851 |
|
852 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
853 | args[_key] = arguments[_key];
|
854 | }
|
855 |
|
856 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Draggable.__proto__ || Object.getPrototypeOf(Draggable)).call.apply(_ref, [this].concat(args))), _this), _this.dragId = _shortid2.default.generate(), _this.state = { startCoordinate: null }, _this.componentDidMount = function () {
|
857 | _this.unsubscribe = _store2.default.subscribe(_this.dragId, function () {
|
858 | _this.forceUpdate();
|
859 | });
|
860 | }, _this.componentWillUnmount = function () {
|
861 | _this.unsubscribe();
|
862 | }, _this.startDragDelay = function (e) {
|
863 | var x = void 0;var y = void 0;
|
864 | if ('ontouchstart' in window && e.touches) {
|
865 | x = e.touches[0].clientX;
|
866 | y = e.touches[0].clientY;
|
867 | } else {
|
868 | e.preventDefault();
|
869 | x = e.clientX;
|
870 | y = e.clientY;
|
871 | }
|
872 | _store2.default.update({
|
873 | startingX: x,
|
874 | startingY: y
|
875 | });
|
876 | _this.setState({ startCoordinate: { x: x, y: y } });
|
877 | document.addEventListener("mouseup", _this.endDragDelay);
|
878 | document.addEventListener("mousemove", _this.checkDragDelay);
|
879 | document.addEventListener("touchend", _this.endDragDelay);
|
880 | document.addEventListener("touchmove", _this.checkDragDelay);
|
881 | }, _this.checkDragDelay = function (e) {
|
882 | var x = void 0;var y = void 0;
|
883 | if ('ontouchstart' in window && e.touches) {
|
884 | x = e.touches[0].clientX;
|
885 | y = e.touches[0].clientY;
|
886 | } else {
|
887 | e.preventDefault();
|
888 | x = e.clientX;
|
889 | y = e.clientY;
|
890 | }
|
891 | var a = Math.abs(_this.state.startCoordinate.x - x);
|
892 | var b = Math.abs(_this.state.startCoordinate.y - y);
|
893 | var distance = Math.round(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)));
|
894 | var dragDistance = _this.props.delay;
|
895 | if (distance >= dragDistance) {
|
896 | if ('ontouchstart' in window && e.touches) {
|
897 | _this.startMobileDrag(e);
|
898 | } else {
|
899 | _this.startDrag(e);
|
900 | }
|
901 | }
|
902 | }, _this.endDragDelay = function () {
|
903 | document.removeEventListener("mouseup", _this.endDragDelay);
|
904 | document.removeEventListener("mousemove", _this.checkDragDelay);
|
905 | document.removeEventListener("touchend", _this.endDragDelay);
|
906 | document.removeEventListener("touchmove", _this.checkDragDelay);
|
907 | _this.setState({ startCoordinate: null });
|
908 | }, _this.startDrag = function (e) {
|
909 | _store2.default.update({
|
910 | isDragging: true,
|
911 | startingX: e.clientX,
|
912 | startingY: e.clientY,
|
913 | x: e.clientX,
|
914 | y: e.clientY,
|
915 | currentlyDraggingId: _this.props.id || _this.dragId,
|
916 | data: _this.props.data,
|
917 | type: _this.props.type
|
918 | });
|
919 | _this.props.onDragStart(_store2.default.getState().data);
|
920 | window.addEventListener('mouseup', _this.stopDrag);
|
921 | window.addEventListener('mousemove', _this.updateCoordinates);
|
922 | }, _this.startMobileDrag = function (e) {
|
923 | _this.props.onDragStart(_store2.default.getState().data);
|
924 | var touch = e.touches[0];
|
925 | _store2.default.update({
|
926 | isDragging: true,
|
927 | startingX: touch.clientX,
|
928 | startingY: touch.clientY,
|
929 | x: touch.clientX,
|
930 | y: touch.clientY,
|
931 | currentlyDraggingId: _this.props.id || _this.dragId,
|
932 | data: _this.props.data,
|
933 | type: _this.props.type
|
934 | });
|
935 | window.addEventListener('touchend', _this.stopDrag);
|
936 | window.addEventListener('touchmove', _this.updateMobileCoordinates);
|
937 | }, _this.stopDrag = function (e) {
|
938 | _this.props.onDragEnd(_store2.default.getState().data);
|
939 | _store2.default.reset();
|
940 | window.removeEventListener('mouseup', _this.stopDrag);
|
941 | window.removeEventListener('mousemove', _this.updateCoordinates);
|
942 | window.removeEventListener('touchend', _this.stopDrag);
|
943 | window.removeEventListener('touchmove', _this.updateMobileCoordinates);
|
944 | }, _this.updateCoordinates = function (e) {
|
945 | _store2.default.update({
|
946 | x: e.clientX,
|
947 | y: e.clientY
|
948 | });
|
949 | }, _this.updateMobileCoordinates = function (e) {
|
950 | var touch = e.touches[0];
|
951 | _store2.default.update({
|
952 | x: touch.clientX,
|
953 | y: touch.clientY
|
954 | });
|
955 | }, _temp), _possibleConstructorReturn(_this, _ret);
|
956 | }
|
957 |
|
958 | _createClass(Draggable, [{
|
959 | key: 'render',
|
960 | value: function render() {
|
961 | var state = _store2.default.getState();
|
962 | return this.props.children(_extends({}, state, {
|
963 | events: {
|
964 | onMouseDown: this.startDragDelay,
|
965 | onTouchStart: this.startDragDelay
|
966 | }
|
967 | }));
|
968 | }
|
969 | }]);
|
970 |
|
971 | return Draggable;
|
972 | }(_react2.default.Component);
|
973 |
|
974 | Draggable.defaultProps = {
|
975 | onDragEnd: function onDragEnd() {},
|
976 | onDragStart: function onDragStart() {},
|
977 | data: null,
|
978 | type: null,
|
979 | delay: 8
|
980 | };
|
981 |
|
982 | Draggable.propTypes = {
|
983 | children: _propTypes2.default.func.isRequired,
|
984 | delay: _propTypes2.default.number,
|
985 | id: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]).isRequired,
|
986 | type: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),
|
987 | onDragEnd: _propTypes2.default.func,
|
988 | onDragStart: _propTypes2.default.func
|
989 | };
|
990 | exports.default = Draggable;
|
991 |
|
992 | }),
|
993 |
|
994 | (function(module, exports, __webpack_require__) {
|
995 |
|
996 | "use strict";
|
997 |
|
998 |
|
999 | Object.defineProperty(exports, "__esModule", {
|
1000 | value: true
|
1001 | });
|
1002 |
|
1003 | 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; };
|
1004 |
|
1005 | 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; }; }();
|
1006 |
|
1007 | var _react = __webpack_require__(8);
|
1008 |
|
1009 | var _react2 = _interopRequireDefault(_react);
|
1010 |
|
1011 | var _store = __webpack_require__(2);
|
1012 |
|
1013 | var _store2 = _interopRequireDefault(_store);
|
1014 |
|
1015 | var _shortid = __webpack_require__(7);
|
1016 |
|
1017 | var _shortid2 = _interopRequireDefault(_shortid);
|
1018 |
|
1019 | var _propTypes = __webpack_require__(5);
|
1020 |
|
1021 | var _propTypes2 = _interopRequireDefault(_propTypes);
|
1022 |
|
1023 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1024 |
|
1025 | function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
1026 |
|
1027 | 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; }
|
1028 |
|
1029 | 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; }
|
1030 |
|
1031 | var Droppable = function (_React$Component) {
|
1032 | _inherits(Droppable, _React$Component);
|
1033 |
|
1034 | function Droppable() {
|
1035 | var _ref;
|
1036 |
|
1037 | var _temp, _this, _ret;
|
1038 |
|
1039 | _classCallCheck(this, Droppable);
|
1040 |
|
1041 | for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
1042 | args[_key] = arguments[_key];
|
1043 | }
|
1044 |
|
1045 | return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Droppable.__proto__ || Object.getPrototypeOf(Droppable)).call.apply(_ref, [this].concat(args))), _this), _this.dragId = _shortid2.default.generate(), _this.componentDidMount = function () {
|
1046 | _this.unsubscribe = _store2.default.subscribe(_this.dragId, function () {
|
1047 | _this.forceUpdate();
|
1048 | });
|
1049 | }, _this.componentWillUnmount = function () {
|
1050 | _this.unsubscribe();
|
1051 | }, _this.setOver = function () {
|
1052 | if (_store2.default.getState().isDragging) {
|
1053 | _store2.default.update({
|
1054 | currentlyHoveredDroppableId: _this.dragId,
|
1055 | currentlyHoveredDroppableAccepts: _this.accepts
|
1056 | });
|
1057 | }
|
1058 | }, _this.setOut = function () {
|
1059 | if (_store2.default.getState().isDragging) {
|
1060 | _store2.default.update({
|
1061 | currentlyHoveredDroppableId: null,
|
1062 | currentlyHoveredDroppableAccepts: null
|
1063 | });
|
1064 | }
|
1065 | }, _this.onDrop = function () {
|
1066 | var _store$getState = _store2.default.getState(),
|
1067 | data = _store$getState.data,
|
1068 | type = _store$getState.type,
|
1069 | isDragging = _store$getState.isDragging;
|
1070 |
|
1071 | if (isDragging) {
|
1072 | if (Array.isArray(_this.props.accepts)) {
|
1073 | if (_this.props.accepts.includes(type)) {
|
1074 | _this.props.onDrop(data);
|
1075 | }
|
1076 | } else {
|
1077 | if (type === _this.props.accepts) {
|
1078 | _this.props.onDrop(data);
|
1079 | }
|
1080 | }
|
1081 | }
|
1082 | }, _temp), _possibleConstructorReturn(_this, _ret);
|
1083 | }
|
1084 |
|
1085 | _createClass(Droppable, [{
|
1086 | key: 'render',
|
1087 | value: function render() {
|
1088 | var state = _store2.default.getState();
|
1089 | return this.props.children(_extends({}, state, {
|
1090 | isOver: state.currentlyHoveredDroppableId === this.dragId,
|
1091 | events: {
|
1092 | onMouseEnter: this.setOver,
|
1093 | onMouseLeave: this.setOut,
|
1094 | onMouseUp: this.onDrop
|
1095 | }
|
1096 | }));
|
1097 | }
|
1098 | }]);
|
1099 |
|
1100 | return Droppable;
|
1101 | }(_react2.default.Component);
|
1102 |
|
1103 | Droppable.defaultProps = {
|
1104 | onDrop: function onDrop() {},
|
1105 | accepts: null
|
1106 | };
|
1107 |
|
1108 | Droppable.propTypes = {
|
1109 | children: _propTypes2.default.func.isRequired,
|
1110 | accepts: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.array]),
|
1111 | onDrop: _propTypes2.default.func
|
1112 | };
|
1113 | exports.default = Droppable;
|
1114 |
|
1115 | }),
|
1116 |
|
1117 | (function(module, exports, __webpack_require__) {
|
1118 |
|
1119 | "use strict";
|
1120 |
|
1121 |
|
1122 |
|
1123 |
|
1124 |
|
1125 |
|
1126 |
|
1127 |
|
1128 | var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
1129 | var hasOwnProperty = Object.prototype.hasOwnProperty;
|
1130 | var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
1131 |
|
1132 | function toObject(val) {
|
1133 | if (val === null || val === undefined) {
|
1134 | throw new TypeError('Object.assign cannot be called with null or undefined');
|
1135 | }
|
1136 |
|
1137 | return Object(val);
|
1138 | }
|
1139 |
|
1140 | function shouldUseNative() {
|
1141 | try {
|
1142 | if (!Object.assign) {
|
1143 | return false;
|
1144 | }
|
1145 |
|
1146 |
|
1147 |
|
1148 |
|
1149 | var test1 = new String('abc');
|
1150 | test1[5] = 'de';
|
1151 | if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
1152 | return false;
|
1153 | }
|
1154 |
|
1155 |
|
1156 | var test2 = {};
|
1157 | for (var i = 0; i < 10; i++) {
|
1158 | test2['_' + String.fromCharCode(i)] = i;
|
1159 | }
|
1160 | var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
1161 | return test2[n];
|
1162 | });
|
1163 | if (order2.join('') !== '0123456789') {
|
1164 | return false;
|
1165 | }
|
1166 |
|
1167 |
|
1168 | var test3 = {};
|
1169 | 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
1170 | test3[letter] = letter;
|
1171 | });
|
1172 | if (Object.keys(Object.assign({}, test3)).join('') !==
|
1173 | 'abcdefghijklmnopqrst') {
|
1174 | return false;
|
1175 | }
|
1176 |
|
1177 | return true;
|
1178 | } catch (err) {
|
1179 |
|
1180 | return false;
|
1181 | }
|
1182 | }
|
1183 |
|
1184 | module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
1185 | var from;
|
1186 | var to = toObject(target);
|
1187 | var symbols;
|
1188 |
|
1189 | for (var s = 1; s < arguments.length; s++) {
|
1190 | from = Object(arguments[s]);
|
1191 |
|
1192 | for (var key in from) {
|
1193 | if (hasOwnProperty.call(from, key)) {
|
1194 | to[key] = from[key];
|
1195 | }
|
1196 | }
|
1197 |
|
1198 | if (getOwnPropertySymbols) {
|
1199 | symbols = getOwnPropertySymbols(from);
|
1200 | for (var i = 0; i < symbols.length; i++) {
|
1201 | if (propIsEnumerable.call(from, symbols[i])) {
|
1202 | to[symbols[i]] = from[symbols[i]];
|
1203 | }
|
1204 | }
|
1205 | }
|
1206 | }
|
1207 |
|
1208 | return to;
|
1209 | };
|
1210 |
|
1211 |
|
1212 | }),
|
1213 |
|
1214 | (function(module, exports, __webpack_require__) {
|
1215 |
|
1216 | "use strict";
|
1217 | (function(process) { |
1218 |
|
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 | if (process.env.NODE_ENV !== 'production') {
|
1227 | var invariant = __webpack_require__(4);
|
1228 | var warning = __webpack_require__(9);
|
1229 | var ReactPropTypesSecret = __webpack_require__(6);
|
1230 | var loggedTypeFailures = {};
|
1231 | }
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 | function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
1245 | if (process.env.NODE_ENV !== 'production') {
|
1246 | for (var typeSpecName in typeSpecs) {
|
1247 | if (typeSpecs.hasOwnProperty(typeSpecName)) {
|
1248 | var error;
|
1249 |
|
1250 |
|
1251 |
|
1252 | try {
|
1253 |
|
1254 |
|
1255 | invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
|
1256 | error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
1257 | } catch (ex) {
|
1258 | error = ex;
|
1259 | }
|
1260 | warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
|
1261 | if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
1262 |
|
1263 |
|
1264 | loggedTypeFailures[error.message] = true;
|
1265 |
|
1266 | var stack = getStack ? getStack() : '';
|
1267 |
|
1268 | warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
|
1269 | }
|
1270 | }
|
1271 | }
|
1272 | }
|
1273 | }
|
1274 |
|
1275 | module.exports = checkPropTypes;
|
1276 |
|
1277 | }.call(exports, __webpack_require__(0)))
|
1278 |
|
1279 | }),
|
1280 |
|
1281 | (function(module, exports, __webpack_require__) {
|
1282 |
|
1283 | "use strict";
|
1284 |
|
1285 |
|
1286 |
|
1287 |
|
1288 |
|
1289 |
|
1290 |
|
1291 |
|
1292 |
|
1293 | var emptyFunction = __webpack_require__(3);
|
1294 | var invariant = __webpack_require__(4);
|
1295 | var ReactPropTypesSecret = __webpack_require__(6);
|
1296 |
|
1297 | module.exports = function() {
|
1298 | function shim(props, propName, componentName, location, propFullName, secret) {
|
1299 | if (secret === ReactPropTypesSecret) {
|
1300 |
|
1301 | return;
|
1302 | }
|
1303 | invariant(
|
1304 | false,
|
1305 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
1306 | 'Use PropTypes.checkPropTypes() to call them. ' +
|
1307 | 'Read more at http://fb.me/use-check-prop-types'
|
1308 | );
|
1309 | };
|
1310 | shim.isRequired = shim;
|
1311 | function getShim() {
|
1312 | return shim;
|
1313 | };
|
1314 |
|
1315 |
|
1316 | var ReactPropTypes = {
|
1317 | array: shim,
|
1318 | bool: shim,
|
1319 | func: shim,
|
1320 | number: shim,
|
1321 | object: shim,
|
1322 | string: shim,
|
1323 | symbol: shim,
|
1324 |
|
1325 | any: shim,
|
1326 | arrayOf: getShim,
|
1327 | element: shim,
|
1328 | instanceOf: getShim,
|
1329 | node: shim,
|
1330 | objectOf: getShim,
|
1331 | oneOf: getShim,
|
1332 | oneOfType: getShim,
|
1333 | shape: getShim,
|
1334 | exact: getShim
|
1335 | };
|
1336 |
|
1337 | ReactPropTypes.checkPropTypes = emptyFunction;
|
1338 | ReactPropTypes.PropTypes = ReactPropTypes;
|
1339 |
|
1340 | return ReactPropTypes;
|
1341 | };
|
1342 |
|
1343 |
|
1344 | }),
|
1345 |
|
1346 | (function(module, exports, __webpack_require__) {
|
1347 |
|
1348 | "use strict";
|
1349 | (function(process) { |
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 | var emptyFunction = __webpack_require__(3);
|
1359 | var invariant = __webpack_require__(4);
|
1360 | var warning = __webpack_require__(9);
|
1361 | var assign = __webpack_require__(14);
|
1362 |
|
1363 | var ReactPropTypesSecret = __webpack_require__(6);
|
1364 | var checkPropTypes = __webpack_require__(15);
|
1365 |
|
1366 | module.exports = function(isValidElement, throwOnDirectAccess) {
|
1367 |
|
1368 | var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
1369 | var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
1370 |
|
1371 | |
1372 |
|
1373 |
|
1374 |
|
1375 |
|
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 |
|
1381 |
|
1382 |
|
1383 |
|
1384 |
|
1385 | function getIteratorFn(maybeIterable) {
|
1386 | var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
1387 | if (typeof iteratorFn === 'function') {
|
1388 | return iteratorFn;
|
1389 | }
|
1390 | }
|
1391 |
|
1392 | |
1393 |
|
1394 |
|
1395 |
|
1396 |
|
1397 |
|
1398 |
|
1399 |
|
1400 |
|
1401 |
|
1402 |
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 |
|
1413 |
|
1414 |
|
1415 |
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 |
|
1421 |
|
1422 |
|
1423 |
|
1424 |
|
1425 |
|
1426 |
|
1427 |
|
1428 |
|
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 |
|
1435 |
|
1436 |
|
1437 |
|
1438 |
|
1439 | var ANONYMOUS = '<<anonymous>>';
|
1440 |
|
1441 |
|
1442 |
|
1443 | var ReactPropTypes = {
|
1444 | array: createPrimitiveTypeChecker('array'),
|
1445 | bool: createPrimitiveTypeChecker('boolean'),
|
1446 | func: createPrimitiveTypeChecker('function'),
|
1447 | number: createPrimitiveTypeChecker('number'),
|
1448 | object: createPrimitiveTypeChecker('object'),
|
1449 | string: createPrimitiveTypeChecker('string'),
|
1450 | symbol: createPrimitiveTypeChecker('symbol'),
|
1451 |
|
1452 | any: createAnyTypeChecker(),
|
1453 | arrayOf: createArrayOfTypeChecker,
|
1454 | element: createElementTypeChecker(),
|
1455 | instanceOf: createInstanceTypeChecker,
|
1456 | node: createNodeChecker(),
|
1457 | objectOf: createObjectOfTypeChecker,
|
1458 | oneOf: createEnumTypeChecker,
|
1459 | oneOfType: createUnionTypeChecker,
|
1460 | shape: createShapeTypeChecker,
|
1461 | exact: createStrictShapeTypeChecker,
|
1462 | };
|
1463 |
|
1464 | |
1465 |
|
1466 |
|
1467 |
|
1468 |
|
1469 | function is(x, y) {
|
1470 |
|
1471 | if (x === y) {
|
1472 |
|
1473 |
|
1474 | return x !== 0 || 1 / x === 1 / y;
|
1475 | } else {
|
1476 |
|
1477 | return x !== x && y !== y;
|
1478 | }
|
1479 | }
|
1480 |
|
1481 |
|
1482 | |
1483 |
|
1484 |
|
1485 |
|
1486 |
|
1487 |
|
1488 |
|
1489 | function PropTypeError(message) {
|
1490 | this.message = message;
|
1491 | this.stack = '';
|
1492 | }
|
1493 |
|
1494 | PropTypeError.prototype = Error.prototype;
|
1495 |
|
1496 | function createChainableTypeChecker(validate) {
|
1497 | if (process.env.NODE_ENV !== 'production') {
|
1498 | var manualPropTypeCallCache = {};
|
1499 | var manualPropTypeWarningCount = 0;
|
1500 | }
|
1501 | function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
1502 | componentName = componentName || ANONYMOUS;
|
1503 | propFullName = propFullName || propName;
|
1504 |
|
1505 | if (secret !== ReactPropTypesSecret) {
|
1506 | if (throwOnDirectAccess) {
|
1507 |
|
1508 | invariant(
|
1509 | false,
|
1510 | 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
1511 | 'Use `PropTypes.checkPropTypes()` to call them. ' +
|
1512 | 'Read more at http://fb.me/use-check-prop-types'
|
1513 | );
|
1514 | } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
1515 |
|
1516 | var cacheKey = componentName + ':' + propName;
|
1517 | if (
|
1518 | !manualPropTypeCallCache[cacheKey] &&
|
1519 |
|
1520 | manualPropTypeWarningCount < 3
|
1521 | ) {
|
1522 | warning(
|
1523 | false,
|
1524 | 'You are manually calling a React.PropTypes validation ' +
|
1525 | 'function for the `%s` prop on `%s`. This is deprecated ' +
|
1526 | 'and will throw in the standalone `prop-types` package. ' +
|
1527 | 'You may be seeing this warning due to a third-party PropTypes ' +
|
1528 | 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
|
1529 | propFullName,
|
1530 | componentName
|
1531 | );
|
1532 | manualPropTypeCallCache[cacheKey] = true;
|
1533 | manualPropTypeWarningCount++;
|
1534 | }
|
1535 | }
|
1536 | }
|
1537 | if (props[propName] == null) {
|
1538 | if (isRequired) {
|
1539 | if (props[propName] === null) {
|
1540 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
1541 | }
|
1542 | return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
1543 | }
|
1544 | return null;
|
1545 | } else {
|
1546 | return validate(props, propName, componentName, location, propFullName);
|
1547 | }
|
1548 | }
|
1549 |
|
1550 | var chainedCheckType = checkType.bind(null, false);
|
1551 | chainedCheckType.isRequired = checkType.bind(null, true);
|
1552 |
|
1553 | return chainedCheckType;
|
1554 | }
|
1555 |
|
1556 | function createPrimitiveTypeChecker(expectedType) {
|
1557 | function validate(props, propName, componentName, location, propFullName, secret) {
|
1558 | var propValue = props[propName];
|
1559 | var propType = getPropType(propValue);
|
1560 | if (propType !== expectedType) {
|
1561 |
|
1562 |
|
1563 |
|
1564 | var preciseType = getPreciseType(propValue);
|
1565 |
|
1566 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
|
1567 | }
|
1568 | return null;
|
1569 | }
|
1570 | return createChainableTypeChecker(validate);
|
1571 | }
|
1572 |
|
1573 | function createAnyTypeChecker() {
|
1574 | return createChainableTypeChecker(emptyFunction.thatReturnsNull);
|
1575 | }
|
1576 |
|
1577 | function createArrayOfTypeChecker(typeChecker) {
|
1578 | function validate(props, propName, componentName, location, propFullName) {
|
1579 | if (typeof typeChecker !== 'function') {
|
1580 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
1581 | }
|
1582 | var propValue = props[propName];
|
1583 | if (!Array.isArray(propValue)) {
|
1584 | var propType = getPropType(propValue);
|
1585 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
1586 | }
|
1587 | for (var i = 0; i < propValue.length; i++) {
|
1588 | var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
1589 | if (error instanceof Error) {
|
1590 | return error;
|
1591 | }
|
1592 | }
|
1593 | return null;
|
1594 | }
|
1595 | return createChainableTypeChecker(validate);
|
1596 | }
|
1597 |
|
1598 | function createElementTypeChecker() {
|
1599 | function validate(props, propName, componentName, location, propFullName) {
|
1600 | var propValue = props[propName];
|
1601 | if (!isValidElement(propValue)) {
|
1602 | var propType = getPropType(propValue);
|
1603 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
1604 | }
|
1605 | return null;
|
1606 | }
|
1607 | return createChainableTypeChecker(validate);
|
1608 | }
|
1609 |
|
1610 | function createInstanceTypeChecker(expectedClass) {
|
1611 | function validate(props, propName, componentName, location, propFullName) {
|
1612 | if (!(props[propName] instanceof expectedClass)) {
|
1613 | var expectedClassName = expectedClass.name || ANONYMOUS;
|
1614 | var actualClassName = getClassName(props[propName]);
|
1615 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
1616 | }
|
1617 | return null;
|
1618 | }
|
1619 | return createChainableTypeChecker(validate);
|
1620 | }
|
1621 |
|
1622 | function createEnumTypeChecker(expectedValues) {
|
1623 | if (!Array.isArray(expectedValues)) {
|
1624 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
|
1625 | return emptyFunction.thatReturnsNull;
|
1626 | }
|
1627 |
|
1628 | function validate(props, propName, componentName, location, propFullName) {
|
1629 | var propValue = props[propName];
|
1630 | for (var i = 0; i < expectedValues.length; i++) {
|
1631 | if (is(propValue, expectedValues[i])) {
|
1632 | return null;
|
1633 | }
|
1634 | }
|
1635 |
|
1636 | var valuesString = JSON.stringify(expectedValues);
|
1637 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
1638 | }
|
1639 | return createChainableTypeChecker(validate);
|
1640 | }
|
1641 |
|
1642 | function createObjectOfTypeChecker(typeChecker) {
|
1643 | function validate(props, propName, componentName, location, propFullName) {
|
1644 | if (typeof typeChecker !== 'function') {
|
1645 | return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
1646 | }
|
1647 | var propValue = props[propName];
|
1648 | var propType = getPropType(propValue);
|
1649 | if (propType !== 'object') {
|
1650 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
1651 | }
|
1652 | for (var key in propValue) {
|
1653 | if (propValue.hasOwnProperty(key)) {
|
1654 | var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1655 | if (error instanceof Error) {
|
1656 | return error;
|
1657 | }
|
1658 | }
|
1659 | }
|
1660 | return null;
|
1661 | }
|
1662 | return createChainableTypeChecker(validate);
|
1663 | }
|
1664 |
|
1665 | function createUnionTypeChecker(arrayOfTypeCheckers) {
|
1666 | if (!Array.isArray(arrayOfTypeCheckers)) {
|
1667 | process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
1668 | return emptyFunction.thatReturnsNull;
|
1669 | }
|
1670 |
|
1671 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
1672 | var checker = arrayOfTypeCheckers[i];
|
1673 | if (typeof checker !== 'function') {
|
1674 | warning(
|
1675 | false,
|
1676 | 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
1677 | 'received %s at index %s.',
|
1678 | getPostfixForTypeWarning(checker),
|
1679 | i
|
1680 | );
|
1681 | return emptyFunction.thatReturnsNull;
|
1682 | }
|
1683 | }
|
1684 |
|
1685 | function validate(props, propName, componentName, location, propFullName) {
|
1686 | for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
1687 | var checker = arrayOfTypeCheckers[i];
|
1688 | if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
|
1689 | return null;
|
1690 | }
|
1691 | }
|
1692 |
|
1693 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
|
1694 | }
|
1695 | return createChainableTypeChecker(validate);
|
1696 | }
|
1697 |
|
1698 | function createNodeChecker() {
|
1699 | function validate(props, propName, componentName, location, propFullName) {
|
1700 | if (!isNode(props[propName])) {
|
1701 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
1702 | }
|
1703 | return null;
|
1704 | }
|
1705 | return createChainableTypeChecker(validate);
|
1706 | }
|
1707 |
|
1708 | function createShapeTypeChecker(shapeTypes) {
|
1709 | function validate(props, propName, componentName, location, propFullName) {
|
1710 | var propValue = props[propName];
|
1711 | var propType = getPropType(propValue);
|
1712 | if (propType !== 'object') {
|
1713 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1714 | }
|
1715 | for (var key in shapeTypes) {
|
1716 | var checker = shapeTypes[key];
|
1717 | if (!checker) {
|
1718 | continue;
|
1719 | }
|
1720 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1721 | if (error) {
|
1722 | return error;
|
1723 | }
|
1724 | }
|
1725 | return null;
|
1726 | }
|
1727 | return createChainableTypeChecker(validate);
|
1728 | }
|
1729 |
|
1730 | function createStrictShapeTypeChecker(shapeTypes) {
|
1731 | function validate(props, propName, componentName, location, propFullName) {
|
1732 | var propValue = props[propName];
|
1733 | var propType = getPropType(propValue);
|
1734 | if (propType !== 'object') {
|
1735 | return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
1736 | }
|
1737 |
|
1738 |
|
1739 | var allKeys = assign({}, props[propName], shapeTypes);
|
1740 | for (var key in allKeys) {
|
1741 | var checker = shapeTypes[key];
|
1742 | if (!checker) {
|
1743 | return new PropTypeError(
|
1744 | 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
1745 | '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
1746 | '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
1747 | );
|
1748 | }
|
1749 | var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
1750 | if (error) {
|
1751 | return error;
|
1752 | }
|
1753 | }
|
1754 | return null;
|
1755 | }
|
1756 |
|
1757 | return createChainableTypeChecker(validate);
|
1758 | }
|
1759 |
|
1760 | function isNode(propValue) {
|
1761 | switch (typeof propValue) {
|
1762 | case 'number':
|
1763 | case 'string':
|
1764 | case 'undefined':
|
1765 | return true;
|
1766 | case 'boolean':
|
1767 | return !propValue;
|
1768 | case 'object':
|
1769 | if (Array.isArray(propValue)) {
|
1770 | return propValue.every(isNode);
|
1771 | }
|
1772 | if (propValue === null || isValidElement(propValue)) {
|
1773 | return true;
|
1774 | }
|
1775 |
|
1776 | var iteratorFn = getIteratorFn(propValue);
|
1777 | if (iteratorFn) {
|
1778 | var iterator = iteratorFn.call(propValue);
|
1779 | var step;
|
1780 | if (iteratorFn !== propValue.entries) {
|
1781 | while (!(step = iterator.next()).done) {
|
1782 | if (!isNode(step.value)) {
|
1783 | return false;
|
1784 | }
|
1785 | }
|
1786 | } else {
|
1787 |
|
1788 | while (!(step = iterator.next()).done) {
|
1789 | var entry = step.value;
|
1790 | if (entry) {
|
1791 | if (!isNode(entry[1])) {
|
1792 | return false;
|
1793 | }
|
1794 | }
|
1795 | }
|
1796 | }
|
1797 | } else {
|
1798 | return false;
|
1799 | }
|
1800 |
|
1801 | return true;
|
1802 | default:
|
1803 | return false;
|
1804 | }
|
1805 | }
|
1806 |
|
1807 | function isSymbol(propType, propValue) {
|
1808 |
|
1809 | if (propType === 'symbol') {
|
1810 | return true;
|
1811 | }
|
1812 |
|
1813 |
|
1814 | if (propValue['@@toStringTag'] === 'Symbol') {
|
1815 | return true;
|
1816 | }
|
1817 |
|
1818 |
|
1819 | if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
1820 | return true;
|
1821 | }
|
1822 |
|
1823 | return false;
|
1824 | }
|
1825 |
|
1826 |
|
1827 | function getPropType(propValue) {
|
1828 | var propType = typeof propValue;
|
1829 | if (Array.isArray(propValue)) {
|
1830 | return 'array';
|
1831 | }
|
1832 | if (propValue instanceof RegExp) {
|
1833 |
|
1834 |
|
1835 |
|
1836 | return 'object';
|
1837 | }
|
1838 | if (isSymbol(propType, propValue)) {
|
1839 | return 'symbol';
|
1840 | }
|
1841 | return propType;
|
1842 | }
|
1843 |
|
1844 |
|
1845 |
|
1846 | function getPreciseType(propValue) {
|
1847 | if (typeof propValue === 'undefined' || propValue === null) {
|
1848 | return '' + propValue;
|
1849 | }
|
1850 | var propType = getPropType(propValue);
|
1851 | if (propType === 'object') {
|
1852 | if (propValue instanceof Date) {
|
1853 | return 'date';
|
1854 | } else if (propValue instanceof RegExp) {
|
1855 | return 'regexp';
|
1856 | }
|
1857 | }
|
1858 | return propType;
|
1859 | }
|
1860 |
|
1861 |
|
1862 |
|
1863 | function getPostfixForTypeWarning(value) {
|
1864 | var type = getPreciseType(value);
|
1865 | switch (type) {
|
1866 | case 'array':
|
1867 | case 'object':
|
1868 | return 'an ' + type;
|
1869 | case 'boolean':
|
1870 | case 'date':
|
1871 | case 'regexp':
|
1872 | return 'a ' + type;
|
1873 | default:
|
1874 | return type;
|
1875 | }
|
1876 | }
|
1877 |
|
1878 |
|
1879 | function getClassName(propValue) {
|
1880 | if (!propValue.constructor || !propValue.constructor.name) {
|
1881 | return ANONYMOUS;
|
1882 | }
|
1883 | return propValue.constructor.name;
|
1884 | }
|
1885 |
|
1886 | ReactPropTypes.checkPropTypes = checkPropTypes;
|
1887 | ReactPropTypes.PropTypes = ReactPropTypes;
|
1888 |
|
1889 | return ReactPropTypes;
|
1890 | };
|
1891 |
|
1892 | }.call(exports, __webpack_require__(0)))
|
1893 |
|
1894 | }),
|
1895 |
|
1896 | (function(module, exports, __webpack_require__) {
|
1897 |
|
1898 | "use strict";
|
1899 |
|
1900 |
|
1901 | var encode = __webpack_require__(10);
|
1902 | var alphabet = __webpack_require__(1);
|
1903 |
|
1904 |
|
1905 |
|
1906 |
|
1907 | var REDUCE_TIME = 1459707606518;
|
1908 |
|
1909 |
|
1910 |
|
1911 | var version = 6;
|
1912 |
|
1913 |
|
1914 | var counter;
|
1915 |
|
1916 |
|
1917 | var previousSeconds;
|
1918 |
|
1919 |
|
1920 |
|
1921 |
|
1922 |
|
1923 | function build(clusterWorkerId) {
|
1924 |
|
1925 | var str = '';
|
1926 |
|
1927 | var seconds = Math.floor((Date.now() - REDUCE_TIME) * 0.001);
|
1928 |
|
1929 | if (seconds === previousSeconds) {
|
1930 | counter++;
|
1931 | } else {
|
1932 | counter = 0;
|
1933 | previousSeconds = seconds;
|
1934 | }
|
1935 |
|
1936 | str = str + encode(alphabet.lookup, version);
|
1937 | str = str + encode(alphabet.lookup, clusterWorkerId);
|
1938 | if (counter > 0) {
|
1939 | str = str + encode(alphabet.lookup, counter);
|
1940 | }
|
1941 | str = str + encode(alphabet.lookup, seconds);
|
1942 |
|
1943 | return str;
|
1944 | }
|
1945 |
|
1946 | module.exports = build;
|
1947 |
|
1948 |
|
1949 | }),
|
1950 |
|
1951 | (function(module, exports, __webpack_require__) {
|
1952 |
|
1953 | "use strict";
|
1954 |
|
1955 | var alphabet = __webpack_require__(1);
|
1956 |
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 | function decode(id) {
|
1963 | var characters = alphabet.shuffled();
|
1964 | return {
|
1965 | version: characters.indexOf(id.substr(0, 1)) & 0x0f,
|
1966 | worker: characters.indexOf(id.substr(1, 1)) & 0x0f
|
1967 | };
|
1968 | }
|
1969 |
|
1970 | module.exports = decode;
|
1971 |
|
1972 |
|
1973 | }),
|
1974 |
|
1975 | (function(module, exports, __webpack_require__) {
|
1976 |
|
1977 | "use strict";
|
1978 |
|
1979 |
|
1980 | var alphabet = __webpack_require__(1);
|
1981 | var encode = __webpack_require__(10);
|
1982 | var decode = __webpack_require__(19);
|
1983 | var build = __webpack_require__(18);
|
1984 | var isValid = __webpack_require__(21);
|
1985 |
|
1986 |
|
1987 |
|
1988 |
|
1989 |
|
1990 | var clusterWorkerId = __webpack_require__(24) || 0;
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 | function seed(seedValue) {
|
1999 | alphabet.seed(seedValue);
|
2000 | return module.exports;
|
2001 | }
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 | function worker(workerId) {
|
2010 | clusterWorkerId = workerId;
|
2011 | return module.exports;
|
2012 | }
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 |
|
2018 |
|
2019 | function characters(newCharacters) {
|
2020 | if (newCharacters !== undefined) {
|
2021 | alphabet.characters(newCharacters);
|
2022 | }
|
2023 |
|
2024 | return alphabet.shuffled();
|
2025 | }
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 | function generate() {
|
2032 | return build(clusterWorkerId);
|
2033 | }
|
2034 |
|
2035 |
|
2036 | module.exports = generate;
|
2037 | module.exports.generate = generate;
|
2038 | module.exports.seed = seed;
|
2039 | module.exports.worker = worker;
|
2040 | module.exports.characters = characters;
|
2041 | module.exports.decode = decode;
|
2042 | module.exports.isValid = isValid;
|
2043 |
|
2044 |
|
2045 | }),
|
2046 |
|
2047 | (function(module, exports, __webpack_require__) {
|
2048 |
|
2049 | "use strict";
|
2050 |
|
2051 | var alphabet = __webpack_require__(1);
|
2052 |
|
2053 | function isShortId(id) {
|
2054 | if (!id || typeof id !== 'string' || id.length < 6 ) {
|
2055 | return false;
|
2056 | }
|
2057 |
|
2058 | var characters = alphabet.characters();
|
2059 | var len = id.length;
|
2060 | for(var i = 0; i < len;i++) {
|
2061 | if (characters.indexOf(id[i]) === -1) {
|
2062 | return false;
|
2063 | }
|
2064 | }
|
2065 | return true;
|
2066 | }
|
2067 |
|
2068 | module.exports = isShortId;
|
2069 |
|
2070 |
|
2071 | }),
|
2072 |
|
2073 | (function(module, exports, __webpack_require__) {
|
2074 |
|
2075 | "use strict";
|
2076 |
|
2077 |
|
2078 | var crypto = typeof window === 'object' && (window.crypto || window.msCrypto);
|
2079 |
|
2080 | function randomByte() {
|
2081 | if (!crypto || !crypto.getRandomValues) {
|
2082 | return Math.floor(Math.random() * 256) & 0x30;
|
2083 | }
|
2084 | var dest = new Uint8Array(1);
|
2085 | crypto.getRandomValues(dest);
|
2086 | return dest[0] & 0x30;
|
2087 | }
|
2088 |
|
2089 | module.exports = randomByte;
|
2090 |
|
2091 |
|
2092 | }),
|
2093 |
|
2094 | (function(module, exports, __webpack_require__) {
|
2095 |
|
2096 | "use strict";
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 | var seed = 1;
|
2103 |
|
2104 |
|
2105 |
|
2106 |
|
2107 |
|
2108 |
|
2109 | function getNextValue() {
|
2110 | seed = (seed * 9301 + 49297) % 233280;
|
2111 | return seed/(233280.0);
|
2112 | }
|
2113 |
|
2114 | function setSeed(_seed_) {
|
2115 | seed = _seed_;
|
2116 | }
|
2117 |
|
2118 | module.exports = {
|
2119 | nextValue: getNextValue,
|
2120 | seed: setSeed
|
2121 | };
|
2122 |
|
2123 |
|
2124 | }),
|
2125 |
|
2126 | (function(module, exports, __webpack_require__) {
|
2127 |
|
2128 | "use strict";
|
2129 |
|
2130 |
|
2131 | module.exports = 0;
|
2132 |
|
2133 |
|
2134 | }),
|
2135 |
|
2136 | (function(module, exports, __webpack_require__) {
|
2137 |
|
2138 | "use strict";
|
2139 |
|
2140 |
|
2141 | Object.defineProperty(exports, "__esModule", {
|
2142 | value: true
|
2143 | });
|
2144 | exports.Droppable = exports.Draggable = exports.DragComponent = undefined;
|
2145 |
|
2146 | var _DragComponent = __webpack_require__(11);
|
2147 |
|
2148 | var _DragComponent2 = _interopRequireDefault(_DragComponent);
|
2149 |
|
2150 | var _Draggable = __webpack_require__(12);
|
2151 |
|
2152 | var _Draggable2 = _interopRequireDefault(_Draggable);
|
2153 |
|
2154 | var _Droppable = __webpack_require__(13);
|
2155 |
|
2156 | var _Droppable2 = _interopRequireDefault(_Droppable);
|
2157 |
|
2158 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2159 |
|
2160 | var DragComponent = exports.DragComponent = _DragComponent2.default;
|
2161 | var Draggable = exports.Draggable = _Draggable2.default;
|
2162 | var Droppable = exports.Droppable = _Droppable2.default;
|
2163 |
|
2164 | })
|
2165 | ]); |
\ | No newline at end of file |