UNPKG

3.56 MBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory();
4 else if(typeof define === 'function' && define.amd)
5 define([], factory);
6 else if(typeof exports === 'object')
7 exports["mermaid"] = factory();
8 else
9 root["mermaid"] = factory();
10})(window, function() {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50/******/ }
51/******/ };
52/******/
53/******/ // define __esModule on exports
54/******/ __webpack_require__.r = function(exports) {
55/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57/******/ }
58/******/ Object.defineProperty(exports, '__esModule', { value: true });
59/******/ };
60/******/
61/******/ // create a fake namespace object
62/******/ // mode & 1: value is a module id, require it
63/******/ // mode & 2: merge all properties of value into the ns
64/******/ // mode & 4: return value when already ns object
65/******/ // mode & 8|1: behave like require
66/******/ __webpack_require__.t = function(value, mode) {
67/******/ if(mode & 1) value = __webpack_require__(value);
68/******/ if(mode & 8) return value;
69/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70/******/ var ns = Object.create(null);
71/******/ __webpack_require__.r(ns);
72/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74/******/ return ns;
75/******/ };
76/******/
77/******/ // getDefaultExport function for compatibility with non-harmony modules
78/******/ __webpack_require__.n = function(module) {
79/******/ var getter = module && module.__esModule ?
80/******/ function getDefault() { return module['default']; } :
81/******/ function getModuleExports() { return module; };
82/******/ __webpack_require__.d(getter, 'a', getter);
83/******/ return getter;
84/******/ };
85/******/
86/******/ // Object.prototype.hasOwnProperty.call
87/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88/******/
89/******/ // __webpack_public_path__
90/******/ __webpack_require__.p = "";
91/******/
92/******/
93/******/ // Load entry module and return exports
94/******/ return __webpack_require__(__webpack_require__.s = "./src/mermaidAPI.js");
95/******/ })
96/************************************************************************/
97/******/ ({
98
99/***/ "./node_modules/@braintree/sanitize-url/index.js":
100/*!*******************************************************!*\
101 !*** ./node_modules/@braintree/sanitize-url/index.js ***!
102 \*******************************************************/
103/*! no static exports found */
104/***/ (function(module, exports, __webpack_require__) {
105
106"use strict";
107
108
109var invalidPrototcolRegex = /^(%20|\s)*(javascript|data)/im;
110var ctrlCharactersRegex = /[^\x20-\x7E]/gmi;
111var urlSchemeRegex = /^([^:]+):/gm;
112var relativeFirstCharacters = ['.', '/']
113
114function isRelativeUrl(url) {
115 return relativeFirstCharacters.indexOf(url[0]) > -1;
116}
117
118function sanitizeUrl(url) {
119 if (!url) {
120 return 'about:blank';
121 }
122
123 var urlScheme, urlSchemeParseResults;
124 var sanitizedUrl = url.replace(ctrlCharactersRegex, '').trim();
125
126 if (isRelativeUrl(sanitizedUrl)) {
127 return sanitizedUrl;
128 }
129
130 urlSchemeParseResults = sanitizedUrl.match(urlSchemeRegex);
131
132 if (!urlSchemeParseResults) {
133 return 'about:blank';
134 }
135
136 urlScheme = urlSchemeParseResults[0];
137
138 if (invalidPrototcolRegex.test(urlScheme)) {
139 return 'about:blank';
140 }
141
142 return sanitizedUrl;
143}
144
145module.exports = {
146 sanitizeUrl: sanitizeUrl
147};
148
149
150/***/ }),
151
152/***/ "./node_modules/asn1.js/lib/asn1.js":
153/*!******************************************!*\
154 !*** ./node_modules/asn1.js/lib/asn1.js ***!
155 \******************************************/
156/*! no static exports found */
157/***/ (function(module, exports, __webpack_require__) {
158
159var asn1 = exports;
160
161asn1.bignum = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
162
163asn1.define = __webpack_require__(/*! ./asn1/api */ "./node_modules/asn1.js/lib/asn1/api.js").define;
164asn1.base = __webpack_require__(/*! ./asn1/base */ "./node_modules/asn1.js/lib/asn1/base/index.js");
165asn1.constants = __webpack_require__(/*! ./asn1/constants */ "./node_modules/asn1.js/lib/asn1/constants/index.js");
166asn1.decoders = __webpack_require__(/*! ./asn1/decoders */ "./node_modules/asn1.js/lib/asn1/decoders/index.js");
167asn1.encoders = __webpack_require__(/*! ./asn1/encoders */ "./node_modules/asn1.js/lib/asn1/encoders/index.js");
168
169
170/***/ }),
171
172/***/ "./node_modules/asn1.js/lib/asn1/api.js":
173/*!**********************************************!*\
174 !*** ./node_modules/asn1.js/lib/asn1/api.js ***!
175 \**********************************************/
176/*! no static exports found */
177/***/ (function(module, exports, __webpack_require__) {
178
179var asn1 = __webpack_require__(/*! ../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
180var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
181
182var api = exports;
183
184api.define = function define(name, body) {
185 return new Entity(name, body);
186};
187
188function Entity(name, body) {
189 this.name = name;
190 this.body = body;
191
192 this.decoders = {};
193 this.encoders = {};
194};
195
196Entity.prototype._createNamed = function createNamed(base) {
197 var named;
198 try {
199 named = __webpack_require__(/*! vm */ "./node_modules/vm-browserify/index.js").runInThisContext(
200 '(function ' + this.name + '(entity) {\n' +
201 ' this._initNamed(entity);\n' +
202 '})'
203 );
204 } catch (e) {
205 named = function (entity) {
206 this._initNamed(entity);
207 };
208 }
209 inherits(named, base);
210 named.prototype._initNamed = function initnamed(entity) {
211 base.call(this, entity);
212 };
213
214 return new named(this);
215};
216
217Entity.prototype._getDecoder = function _getDecoder(enc) {
218 enc = enc || 'der';
219 // Lazily create decoder
220 if (!this.decoders.hasOwnProperty(enc))
221 this.decoders[enc] = this._createNamed(asn1.decoders[enc]);
222 return this.decoders[enc];
223};
224
225Entity.prototype.decode = function decode(data, enc, options) {
226 return this._getDecoder(enc).decode(data, options);
227};
228
229Entity.prototype._getEncoder = function _getEncoder(enc) {
230 enc = enc || 'der';
231 // Lazily create encoder
232 if (!this.encoders.hasOwnProperty(enc))
233 this.encoders[enc] = this._createNamed(asn1.encoders[enc]);
234 return this.encoders[enc];
235};
236
237Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
238 return this._getEncoder(enc).encode(data, reporter);
239};
240
241
242/***/ }),
243
244/***/ "./node_modules/asn1.js/lib/asn1/base/buffer.js":
245/*!******************************************************!*\
246 !*** ./node_modules/asn1.js/lib/asn1/base/buffer.js ***!
247 \******************************************************/
248/*! no static exports found */
249/***/ (function(module, exports, __webpack_require__) {
250
251var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
252var Reporter = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").Reporter;
253var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
254
255function DecoderBuffer(base, options) {
256 Reporter.call(this, options);
257 if (!Buffer.isBuffer(base)) {
258 this.error('Input not Buffer');
259 return;
260 }
261
262 this.base = base;
263 this.offset = 0;
264 this.length = base.length;
265}
266inherits(DecoderBuffer, Reporter);
267exports.DecoderBuffer = DecoderBuffer;
268
269DecoderBuffer.prototype.save = function save() {
270 return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
271};
272
273DecoderBuffer.prototype.restore = function restore(save) {
274 // Return skipped data
275 var res = new DecoderBuffer(this.base);
276 res.offset = save.offset;
277 res.length = this.offset;
278
279 this.offset = save.offset;
280 Reporter.prototype.restore.call(this, save.reporter);
281
282 return res;
283};
284
285DecoderBuffer.prototype.isEmpty = function isEmpty() {
286 return this.offset === this.length;
287};
288
289DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
290 if (this.offset + 1 <= this.length)
291 return this.base.readUInt8(this.offset++, true);
292 else
293 return this.error(fail || 'DecoderBuffer overrun');
294}
295
296DecoderBuffer.prototype.skip = function skip(bytes, fail) {
297 if (!(this.offset + bytes <= this.length))
298 return this.error(fail || 'DecoderBuffer overrun');
299
300 var res = new DecoderBuffer(this.base);
301
302 // Share reporter state
303 res._reporterState = this._reporterState;
304
305 res.offset = this.offset;
306 res.length = this.offset + bytes;
307 this.offset += bytes;
308 return res;
309}
310
311DecoderBuffer.prototype.raw = function raw(save) {
312 return this.base.slice(save ? save.offset : this.offset, this.length);
313}
314
315function EncoderBuffer(value, reporter) {
316 if (Array.isArray(value)) {
317 this.length = 0;
318 this.value = value.map(function(item) {
319 if (!(item instanceof EncoderBuffer))
320 item = new EncoderBuffer(item, reporter);
321 this.length += item.length;
322 return item;
323 }, this);
324 } else if (typeof value === 'number') {
325 if (!(0 <= value && value <= 0xff))
326 return reporter.error('non-byte EncoderBuffer value');
327 this.value = value;
328 this.length = 1;
329 } else if (typeof value === 'string') {
330 this.value = value;
331 this.length = Buffer.byteLength(value);
332 } else if (Buffer.isBuffer(value)) {
333 this.value = value;
334 this.length = value.length;
335 } else {
336 return reporter.error('Unsupported type: ' + typeof value);
337 }
338}
339exports.EncoderBuffer = EncoderBuffer;
340
341EncoderBuffer.prototype.join = function join(out, offset) {
342 if (!out)
343 out = new Buffer(this.length);
344 if (!offset)
345 offset = 0;
346
347 if (this.length === 0)
348 return out;
349
350 if (Array.isArray(this.value)) {
351 this.value.forEach(function(item) {
352 item.join(out, offset);
353 offset += item.length;
354 });
355 } else {
356 if (typeof this.value === 'number')
357 out[offset] = this.value;
358 else if (typeof this.value === 'string')
359 out.write(this.value, offset);
360 else if (Buffer.isBuffer(this.value))
361 this.value.copy(out, offset);
362 offset += this.length;
363 }
364
365 return out;
366};
367
368
369/***/ }),
370
371/***/ "./node_modules/asn1.js/lib/asn1/base/index.js":
372/*!*****************************************************!*\
373 !*** ./node_modules/asn1.js/lib/asn1/base/index.js ***!
374 \*****************************************************/
375/*! no static exports found */
376/***/ (function(module, exports, __webpack_require__) {
377
378var base = exports;
379
380base.Reporter = __webpack_require__(/*! ./reporter */ "./node_modules/asn1.js/lib/asn1/base/reporter.js").Reporter;
381base.DecoderBuffer = __webpack_require__(/*! ./buffer */ "./node_modules/asn1.js/lib/asn1/base/buffer.js").DecoderBuffer;
382base.EncoderBuffer = __webpack_require__(/*! ./buffer */ "./node_modules/asn1.js/lib/asn1/base/buffer.js").EncoderBuffer;
383base.Node = __webpack_require__(/*! ./node */ "./node_modules/asn1.js/lib/asn1/base/node.js");
384
385
386/***/ }),
387
388/***/ "./node_modules/asn1.js/lib/asn1/base/node.js":
389/*!****************************************************!*\
390 !*** ./node_modules/asn1.js/lib/asn1/base/node.js ***!
391 \****************************************************/
392/*! no static exports found */
393/***/ (function(module, exports, __webpack_require__) {
394
395var Reporter = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").Reporter;
396var EncoderBuffer = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").EncoderBuffer;
397var DecoderBuffer = __webpack_require__(/*! ../base */ "./node_modules/asn1.js/lib/asn1/base/index.js").DecoderBuffer;
398var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
399
400// Supported tags
401var tags = [
402 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
403 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
404 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
405 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
406];
407
408// Public methods list
409var methods = [
410 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
411 'any', 'contains'
412].concat(tags);
413
414// Overrided methods list
415var overrided = [
416 '_peekTag', '_decodeTag', '_use',
417 '_decodeStr', '_decodeObjid', '_decodeTime',
418 '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
419
420 '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
421 '_encodeNull', '_encodeInt', '_encodeBool'
422];
423
424function Node(enc, parent) {
425 var state = {};
426 this._baseState = state;
427
428 state.enc = enc;
429
430 state.parent = parent || null;
431 state.children = null;
432
433 // State
434 state.tag = null;
435 state.args = null;
436 state.reverseArgs = null;
437 state.choice = null;
438 state.optional = false;
439 state.any = false;
440 state.obj = false;
441 state.use = null;
442 state.useDecoder = null;
443 state.key = null;
444 state['default'] = null;
445 state.explicit = null;
446 state.implicit = null;
447 state.contains = null;
448
449 // Should create new instance on each method
450 if (!state.parent) {
451 state.children = [];
452 this._wrap();
453 }
454}
455module.exports = Node;
456
457var stateProps = [
458 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
459 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
460 'implicit', 'contains'
461];
462
463Node.prototype.clone = function clone() {
464 var state = this._baseState;
465 var cstate = {};
466 stateProps.forEach(function(prop) {
467 cstate[prop] = state[prop];
468 });
469 var res = new this.constructor(cstate.parent);
470 res._baseState = cstate;
471 return res;
472};
473
474Node.prototype._wrap = function wrap() {
475 var state = this._baseState;
476 methods.forEach(function(method) {
477 this[method] = function _wrappedMethod() {
478 var clone = new this.constructor(this);
479 state.children.push(clone);
480 return clone[method].apply(clone, arguments);
481 };
482 }, this);
483};
484
485Node.prototype._init = function init(body) {
486 var state = this._baseState;
487
488 assert(state.parent === null);
489 body.call(this);
490
491 // Filter children
492 state.children = state.children.filter(function(child) {
493 return child._baseState.parent === this;
494 }, this);
495 assert.equal(state.children.length, 1, 'Root node can have only one child');
496};
497
498Node.prototype._useArgs = function useArgs(args) {
499 var state = this._baseState;
500
501 // Filter children and args
502 var children = args.filter(function(arg) {
503 return arg instanceof this.constructor;
504 }, this);
505 args = args.filter(function(arg) {
506 return !(arg instanceof this.constructor);
507 }, this);
508
509 if (children.length !== 0) {
510 assert(state.children === null);
511 state.children = children;
512
513 // Replace parent to maintain backward link
514 children.forEach(function(child) {
515 child._baseState.parent = this;
516 }, this);
517 }
518 if (args.length !== 0) {
519 assert(state.args === null);
520 state.args = args;
521 state.reverseArgs = args.map(function(arg) {
522 if (typeof arg !== 'object' || arg.constructor !== Object)
523 return arg;
524
525 var res = {};
526 Object.keys(arg).forEach(function(key) {
527 if (key == (key | 0))
528 key |= 0;
529 var value = arg[key];
530 res[value] = key;
531 });
532 return res;
533 });
534 }
535};
536
537//
538// Overrided methods
539//
540
541overrided.forEach(function(method) {
542 Node.prototype[method] = function _overrided() {
543 var state = this._baseState;
544 throw new Error(method + ' not implemented for encoding: ' + state.enc);
545 };
546});
547
548//
549// Public methods
550//
551
552tags.forEach(function(tag) {
553 Node.prototype[tag] = function _tagMethod() {
554 var state = this._baseState;
555 var args = Array.prototype.slice.call(arguments);
556
557 assert(state.tag === null);
558 state.tag = tag;
559
560 this._useArgs(args);
561
562 return this;
563 };
564});
565
566Node.prototype.use = function use(item) {
567 assert(item);
568 var state = this._baseState;
569
570 assert(state.use === null);
571 state.use = item;
572
573 return this;
574};
575
576Node.prototype.optional = function optional() {
577 var state = this._baseState;
578
579 state.optional = true;
580
581 return this;
582};
583
584Node.prototype.def = function def(val) {
585 var state = this._baseState;
586
587 assert(state['default'] === null);
588 state['default'] = val;
589 state.optional = true;
590
591 return this;
592};
593
594Node.prototype.explicit = function explicit(num) {
595 var state = this._baseState;
596
597 assert(state.explicit === null && state.implicit === null);
598 state.explicit = num;
599
600 return this;
601};
602
603Node.prototype.implicit = function implicit(num) {
604 var state = this._baseState;
605
606 assert(state.explicit === null && state.implicit === null);
607 state.implicit = num;
608
609 return this;
610};
611
612Node.prototype.obj = function obj() {
613 var state = this._baseState;
614 var args = Array.prototype.slice.call(arguments);
615
616 state.obj = true;
617
618 if (args.length !== 0)
619 this._useArgs(args);
620
621 return this;
622};
623
624Node.prototype.key = function key(newKey) {
625 var state = this._baseState;
626
627 assert(state.key === null);
628 state.key = newKey;
629
630 return this;
631};
632
633Node.prototype.any = function any() {
634 var state = this._baseState;
635
636 state.any = true;
637
638 return this;
639};
640
641Node.prototype.choice = function choice(obj) {
642 var state = this._baseState;
643
644 assert(state.choice === null);
645 state.choice = obj;
646 this._useArgs(Object.keys(obj).map(function(key) {
647 return obj[key];
648 }));
649
650 return this;
651};
652
653Node.prototype.contains = function contains(item) {
654 var state = this._baseState;
655
656 assert(state.use === null);
657 state.contains = item;
658
659 return this;
660};
661
662//
663// Decoding
664//
665
666Node.prototype._decode = function decode(input, options) {
667 var state = this._baseState;
668
669 // Decode root node
670 if (state.parent === null)
671 return input.wrapResult(state.children[0]._decode(input, options));
672
673 var result = state['default'];
674 var present = true;
675
676 var prevKey = null;
677 if (state.key !== null)
678 prevKey = input.enterKey(state.key);
679
680 // Check if tag is there
681 if (state.optional) {
682 var tag = null;
683 if (state.explicit !== null)
684 tag = state.explicit;
685 else if (state.implicit !== null)
686 tag = state.implicit;
687 else if (state.tag !== null)
688 tag = state.tag;
689
690 if (tag === null && !state.any) {
691 // Trial and Error
692 var save = input.save();
693 try {
694 if (state.choice === null)
695 this._decodeGeneric(state.tag, input, options);
696 else
697 this._decodeChoice(input, options);
698 present = true;
699 } catch (e) {
700 present = false;
701 }
702 input.restore(save);
703 } else {
704 present = this._peekTag(input, tag, state.any);
705
706 if (input.isError(present))
707 return present;
708 }
709 }
710
711 // Push object on stack
712 var prevObj;
713 if (state.obj && present)
714 prevObj = input.enterObject();
715
716 if (present) {
717 // Unwrap explicit values
718 if (state.explicit !== null) {
719 var explicit = this._decodeTag(input, state.explicit);
720 if (input.isError(explicit))
721 return explicit;
722 input = explicit;
723 }
724
725 var start = input.offset;
726
727 // Unwrap implicit and normal values
728 if (state.use === null && state.choice === null) {
729 if (state.any)
730 var save = input.save();
731 var body = this._decodeTag(
732 input,
733 state.implicit !== null ? state.implicit : state.tag,
734 state.any
735 );
736 if (input.isError(body))
737 return body;
738
739 if (state.any)
740 result = input.raw(save);
741 else
742 input = body;
743 }
744
745 if (options && options.track && state.tag !== null)
746 options.track(input.path(), start, input.length, 'tagged');
747
748 if (options && options.track && state.tag !== null)
749 options.track(input.path(), input.offset, input.length, 'content');
750
751 // Select proper method for tag
752 if (state.any)
753 result = result;
754 else if (state.choice === null)
755 result = this._decodeGeneric(state.tag, input, options);
756 else
757 result = this._decodeChoice(input, options);
758
759 if (input.isError(result))
760 return result;
761
762 // Decode children
763 if (!state.any && state.choice === null && state.children !== null) {
764 state.children.forEach(function decodeChildren(child) {
765 // NOTE: We are ignoring errors here, to let parser continue with other
766 // parts of encoded data
767 child._decode(input, options);
768 });
769 }
770
771 // Decode contained/encoded by schema, only in bit or octet strings
772 if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
773 var data = new DecoderBuffer(result);
774 result = this._getUse(state.contains, input._reporterState.obj)
775 ._decode(data, options);
776 }
777 }
778
779 // Pop object
780 if (state.obj && present)
781 result = input.leaveObject(prevObj);
782
783 // Set key
784 if (state.key !== null && (result !== null || present === true))
785 input.leaveKey(prevKey, state.key, result);
786 else if (prevKey !== null)
787 input.exitKey(prevKey);
788
789 return result;
790};
791
792Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
793 var state = this._baseState;
794
795 if (tag === 'seq' || tag === 'set')
796 return null;
797 if (tag === 'seqof' || tag === 'setof')
798 return this._decodeList(input, tag, state.args[0], options);
799 else if (/str$/.test(tag))
800 return this._decodeStr(input, tag, options);
801 else if (tag === 'objid' && state.args)
802 return this._decodeObjid(input, state.args[0], state.args[1], options);
803 else if (tag === 'objid')
804 return this._decodeObjid(input, null, null, options);
805 else if (tag === 'gentime' || tag === 'utctime')
806 return this._decodeTime(input, tag, options);
807 else if (tag === 'null_')
808 return this._decodeNull(input, options);
809 else if (tag === 'bool')
810 return this._decodeBool(input, options);
811 else if (tag === 'objDesc')
812 return this._decodeStr(input, tag, options);
813 else if (tag === 'int' || tag === 'enum')
814 return this._decodeInt(input, state.args && state.args[0], options);
815
816 if (state.use !== null) {
817 return this._getUse(state.use, input._reporterState.obj)
818 ._decode(input, options);
819 } else {
820 return input.error('unknown tag: ' + tag);
821 }
822};
823
824Node.prototype._getUse = function _getUse(entity, obj) {
825
826 var state = this._baseState;
827 // Create altered use decoder if implicit is set
828 state.useDecoder = this._use(entity, obj);
829 assert(state.useDecoder._baseState.parent === null);
830 state.useDecoder = state.useDecoder._baseState.children[0];
831 if (state.implicit !== state.useDecoder._baseState.implicit) {
832 state.useDecoder = state.useDecoder.clone();
833 state.useDecoder._baseState.implicit = state.implicit;
834 }
835 return state.useDecoder;
836};
837
838Node.prototype._decodeChoice = function decodeChoice(input, options) {
839 var state = this._baseState;
840 var result = null;
841 var match = false;
842
843 Object.keys(state.choice).some(function(key) {
844 var save = input.save();
845 var node = state.choice[key];
846 try {
847 var value = node._decode(input, options);
848 if (input.isError(value))
849 return false;
850
851 result = { type: key, value: value };
852 match = true;
853 } catch (e) {
854 input.restore(save);
855 return false;
856 }
857 return true;
858 }, this);
859
860 if (!match)
861 return input.error('Choice not matched');
862
863 return result;
864};
865
866//
867// Encoding
868//
869
870Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
871 return new EncoderBuffer(data, this.reporter);
872};
873
874Node.prototype._encode = function encode(data, reporter, parent) {
875 var state = this._baseState;
876 if (state['default'] !== null && state['default'] === data)
877 return;
878
879 var result = this._encodeValue(data, reporter, parent);
880 if (result === undefined)
881 return;
882
883 if (this._skipDefault(result, reporter, parent))
884 return;
885
886 return result;
887};
888
889Node.prototype._encodeValue = function encode(data, reporter, parent) {
890 var state = this._baseState;
891
892 // Decode root node
893 if (state.parent === null)
894 return state.children[0]._encode(data, reporter || new Reporter());
895
896 var result = null;
897
898 // Set reporter to share it with a child class
899 this.reporter = reporter;
900
901 // Check if data is there
902 if (state.optional && data === undefined) {
903 if (state['default'] !== null)
904 data = state['default']
905 else
906 return;
907 }
908
909 // Encode children first
910 var content = null;
911 var primitive = false;
912 if (state.any) {
913 // Anything that was given is translated to buffer
914 result = this._createEncoderBuffer(data);
915 } else if (state.choice) {
916 result = this._encodeChoice(data, reporter);
917 } else if (state.contains) {
918 content = this._getUse(state.contains, parent)._encode(data, reporter);
919 primitive = true;
920 } else if (state.children) {
921 content = state.children.map(function(child) {
922 if (child._baseState.tag === 'null_')
923 return child._encode(null, reporter, data);
924
925 if (child._baseState.key === null)
926 return reporter.error('Child should have a key');
927 var prevKey = reporter.enterKey(child._baseState.key);
928
929 if (typeof data !== 'object')
930 return reporter.error('Child expected, but input is not object');
931
932 var res = child._encode(data[child._baseState.key], reporter, data);
933 reporter.leaveKey(prevKey);
934
935 return res;
936 }, this).filter(function(child) {
937 return child;
938 });
939 content = this._createEncoderBuffer(content);
940 } else {
941 if (state.tag === 'seqof' || state.tag === 'setof') {
942 // TODO(indutny): this should be thrown on DSL level
943 if (!(state.args && state.args.length === 1))
944 return reporter.error('Too many args for : ' + state.tag);
945
946 if (!Array.isArray(data))
947 return reporter.error('seqof/setof, but data is not Array');
948
949 var child = this.clone();
950 child._baseState.implicit = null;
951 content = this._createEncoderBuffer(data.map(function(item) {
952 var state = this._baseState;
953
954 return this._getUse(state.args[0], data)._encode(item, reporter);
955 }, child));
956 } else if (state.use !== null) {
957 result = this._getUse(state.use, parent)._encode(data, reporter);
958 } else {
959 content = this._encodePrimitive(state.tag, data);
960 primitive = true;
961 }
962 }
963
964 // Encode data itself
965 var result;
966 if (!state.any && state.choice === null) {
967 var tag = state.implicit !== null ? state.implicit : state.tag;
968 var cls = state.implicit === null ? 'universal' : 'context';
969
970 if (tag === null) {
971 if (state.use === null)
972 reporter.error('Tag could be omitted only for .use()');
973 } else {
974 if (state.use === null)
975 result = this._encodeComposite(tag, primitive, cls, content);
976 }
977 }
978
979 // Wrap in explicit
980 if (state.explicit !== null)
981 result = this._encodeComposite(state.explicit, false, 'context', result);
982
983 return result;
984};
985
986Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
987 var state = this._baseState;
988
989 var node = state.choice[data.type];
990 if (!node) {
991 assert(
992 false,
993 data.type + ' not found in ' +
994 JSON.stringify(Object.keys(state.choice)));
995 }
996 return node._encode(data.value, reporter);
997};
998
999Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
1000 var state = this._baseState;
1001
1002 if (/str$/.test(tag))
1003 return this._encodeStr(data, tag);
1004 else if (tag === 'objid' && state.args)
1005 return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
1006 else if (tag === 'objid')
1007 return this._encodeObjid(data, null, null);
1008 else if (tag === 'gentime' || tag === 'utctime')
1009 return this._encodeTime(data, tag);
1010 else if (tag === 'null_')
1011 return this._encodeNull();
1012 else if (tag === 'int' || tag === 'enum')
1013 return this._encodeInt(data, state.args && state.reverseArgs[0]);
1014 else if (tag === 'bool')
1015 return this._encodeBool(data);
1016 else if (tag === 'objDesc')
1017 return this._encodeStr(data, tag);
1018 else
1019 throw new Error('Unsupported tag: ' + tag);
1020};
1021
1022Node.prototype._isNumstr = function isNumstr(str) {
1023 return /^[0-9 ]*$/.test(str);
1024};
1025
1026Node.prototype._isPrintstr = function isPrintstr(str) {
1027 return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
1028};
1029
1030
1031/***/ }),
1032
1033/***/ "./node_modules/asn1.js/lib/asn1/base/reporter.js":
1034/*!********************************************************!*\
1035 !*** ./node_modules/asn1.js/lib/asn1/base/reporter.js ***!
1036 \********************************************************/
1037/*! no static exports found */
1038/***/ (function(module, exports, __webpack_require__) {
1039
1040var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
1041
1042function Reporter(options) {
1043 this._reporterState = {
1044 obj: null,
1045 path: [],
1046 options: options || {},
1047 errors: []
1048 };
1049}
1050exports.Reporter = Reporter;
1051
1052Reporter.prototype.isError = function isError(obj) {
1053 return obj instanceof ReporterError;
1054};
1055
1056Reporter.prototype.save = function save() {
1057 var state = this._reporterState;
1058
1059 return { obj: state.obj, pathLen: state.path.length };
1060};
1061
1062Reporter.prototype.restore = function restore(data) {
1063 var state = this._reporterState;
1064
1065 state.obj = data.obj;
1066 state.path = state.path.slice(0, data.pathLen);
1067};
1068
1069Reporter.prototype.enterKey = function enterKey(key) {
1070 return this._reporterState.path.push(key);
1071};
1072
1073Reporter.prototype.exitKey = function exitKey(index) {
1074 var state = this._reporterState;
1075
1076 state.path = state.path.slice(0, index - 1);
1077};
1078
1079Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
1080 var state = this._reporterState;
1081
1082 this.exitKey(index);
1083 if (state.obj !== null)
1084 state.obj[key] = value;
1085};
1086
1087Reporter.prototype.path = function path() {
1088 return this._reporterState.path.join('/');
1089};
1090
1091Reporter.prototype.enterObject = function enterObject() {
1092 var state = this._reporterState;
1093
1094 var prev = state.obj;
1095 state.obj = {};
1096 return prev;
1097};
1098
1099Reporter.prototype.leaveObject = function leaveObject(prev) {
1100 var state = this._reporterState;
1101
1102 var now = state.obj;
1103 state.obj = prev;
1104 return now;
1105};
1106
1107Reporter.prototype.error = function error(msg) {
1108 var err;
1109 var state = this._reporterState;
1110
1111 var inherited = msg instanceof ReporterError;
1112 if (inherited) {
1113 err = msg;
1114 } else {
1115 err = new ReporterError(state.path.map(function(elem) {
1116 return '[' + JSON.stringify(elem) + ']';
1117 }).join(''), msg.message || msg, msg.stack);
1118 }
1119
1120 if (!state.options.partial)
1121 throw err;
1122
1123 if (!inherited)
1124 state.errors.push(err);
1125
1126 return err;
1127};
1128
1129Reporter.prototype.wrapResult = function wrapResult(result) {
1130 var state = this._reporterState;
1131 if (!state.options.partial)
1132 return result;
1133
1134 return {
1135 result: this.isError(result) ? null : result,
1136 errors: state.errors
1137 };
1138};
1139
1140function ReporterError(path, msg) {
1141 this.path = path;
1142 this.rethrow(msg);
1143};
1144inherits(ReporterError, Error);
1145
1146ReporterError.prototype.rethrow = function rethrow(msg) {
1147 this.message = msg + ' at: ' + (this.path || '(shallow)');
1148 if (Error.captureStackTrace)
1149 Error.captureStackTrace(this, ReporterError);
1150
1151 if (!this.stack) {
1152 try {
1153 // IE only adds stack when thrown
1154 throw new Error(this.message);
1155 } catch (e) {
1156 this.stack = e.stack;
1157 }
1158 }
1159 return this;
1160};
1161
1162
1163/***/ }),
1164
1165/***/ "./node_modules/asn1.js/lib/asn1/constants/der.js":
1166/*!********************************************************!*\
1167 !*** ./node_modules/asn1.js/lib/asn1/constants/der.js ***!
1168 \********************************************************/
1169/*! no static exports found */
1170/***/ (function(module, exports, __webpack_require__) {
1171
1172var constants = __webpack_require__(/*! ../constants */ "./node_modules/asn1.js/lib/asn1/constants/index.js");
1173
1174exports.tagClass = {
1175 0: 'universal',
1176 1: 'application',
1177 2: 'context',
1178 3: 'private'
1179};
1180exports.tagClassByName = constants._reverse(exports.tagClass);
1181
1182exports.tag = {
1183 0x00: 'end',
1184 0x01: 'bool',
1185 0x02: 'int',
1186 0x03: 'bitstr',
1187 0x04: 'octstr',
1188 0x05: 'null_',
1189 0x06: 'objid',
1190 0x07: 'objDesc',
1191 0x08: 'external',
1192 0x09: 'real',
1193 0x0a: 'enum',
1194 0x0b: 'embed',
1195 0x0c: 'utf8str',
1196 0x0d: 'relativeOid',
1197 0x10: 'seq',
1198 0x11: 'set',
1199 0x12: 'numstr',
1200 0x13: 'printstr',
1201 0x14: 't61str',
1202 0x15: 'videostr',
1203 0x16: 'ia5str',
1204 0x17: 'utctime',
1205 0x18: 'gentime',
1206 0x19: 'graphstr',
1207 0x1a: 'iso646str',
1208 0x1b: 'genstr',
1209 0x1c: 'unistr',
1210 0x1d: 'charstr',
1211 0x1e: 'bmpstr'
1212};
1213exports.tagByName = constants._reverse(exports.tag);
1214
1215
1216/***/ }),
1217
1218/***/ "./node_modules/asn1.js/lib/asn1/constants/index.js":
1219/*!**********************************************************!*\
1220 !*** ./node_modules/asn1.js/lib/asn1/constants/index.js ***!
1221 \**********************************************************/
1222/*! no static exports found */
1223/***/ (function(module, exports, __webpack_require__) {
1224
1225var constants = exports;
1226
1227// Helper
1228constants._reverse = function reverse(map) {
1229 var res = {};
1230
1231 Object.keys(map).forEach(function(key) {
1232 // Convert key to integer if it is stringified
1233 if ((key | 0) == key)
1234 key = key | 0;
1235
1236 var value = map[key];
1237 res[value] = key;
1238 });
1239
1240 return res;
1241};
1242
1243constants.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/constants/der.js");
1244
1245
1246/***/ }),
1247
1248/***/ "./node_modules/asn1.js/lib/asn1/decoders/der.js":
1249/*!*******************************************************!*\
1250 !*** ./node_modules/asn1.js/lib/asn1/decoders/der.js ***!
1251 \*******************************************************/
1252/*! no static exports found */
1253/***/ (function(module, exports, __webpack_require__) {
1254
1255var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
1256
1257var asn1 = __webpack_require__(/*! ../../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
1258var base = asn1.base;
1259var bignum = asn1.bignum;
1260
1261// Import DER constants
1262var der = asn1.constants.der;
1263
1264function DERDecoder(entity) {
1265 this.enc = 'der';
1266 this.name = entity.name;
1267 this.entity = entity;
1268
1269 // Construct base tree
1270 this.tree = new DERNode();
1271 this.tree._init(entity.body);
1272};
1273module.exports = DERDecoder;
1274
1275DERDecoder.prototype.decode = function decode(data, options) {
1276 if (!(data instanceof base.DecoderBuffer))
1277 data = new base.DecoderBuffer(data, options);
1278
1279 return this.tree._decode(data, options);
1280};
1281
1282// Tree methods
1283
1284function DERNode(parent) {
1285 base.Node.call(this, 'der', parent);
1286}
1287inherits(DERNode, base.Node);
1288
1289DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
1290 if (buffer.isEmpty())
1291 return false;
1292
1293 var state = buffer.save();
1294 var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
1295 if (buffer.isError(decodedTag))
1296 return decodedTag;
1297
1298 buffer.restore(state);
1299
1300 return decodedTag.tag === tag || decodedTag.tagStr === tag ||
1301 (decodedTag.tagStr + 'of') === tag || any;
1302};
1303
1304DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
1305 var decodedTag = derDecodeTag(buffer,
1306 'Failed to decode tag of "' + tag + '"');
1307 if (buffer.isError(decodedTag))
1308 return decodedTag;
1309
1310 var len = derDecodeLen(buffer,
1311 decodedTag.primitive,
1312 'Failed to get length of "' + tag + '"');
1313
1314 // Failure
1315 if (buffer.isError(len))
1316 return len;
1317
1318 if (!any &&
1319 decodedTag.tag !== tag &&
1320 decodedTag.tagStr !== tag &&
1321 decodedTag.tagStr + 'of' !== tag) {
1322 return buffer.error('Failed to match tag: "' + tag + '"');
1323 }
1324
1325 if (decodedTag.primitive || len !== null)
1326 return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
1327
1328 // Indefinite length... find END tag
1329 var state = buffer.save();
1330 var res = this._skipUntilEnd(
1331 buffer,
1332 'Failed to skip indefinite length body: "' + this.tag + '"');
1333 if (buffer.isError(res))
1334 return res;
1335
1336 len = buffer.offset - state.offset;
1337 buffer.restore(state);
1338 return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
1339};
1340
1341DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
1342 while (true) {
1343 var tag = derDecodeTag(buffer, fail);
1344 if (buffer.isError(tag))
1345 return tag;
1346 var len = derDecodeLen(buffer, tag.primitive, fail);
1347 if (buffer.isError(len))
1348 return len;
1349
1350 var res;
1351 if (tag.primitive || len !== null)
1352 res = buffer.skip(len)
1353 else
1354 res = this._skipUntilEnd(buffer, fail);
1355
1356 // Failure
1357 if (buffer.isError(res))
1358 return res;
1359
1360 if (tag.tagStr === 'end')
1361 break;
1362 }
1363};
1364
1365DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
1366 options) {
1367 var result = [];
1368 while (!buffer.isEmpty()) {
1369 var possibleEnd = this._peekTag(buffer, 'end');
1370 if (buffer.isError(possibleEnd))
1371 return possibleEnd;
1372
1373 var res = decoder.decode(buffer, 'der', options);
1374 if (buffer.isError(res) && possibleEnd)
1375 break;
1376 result.push(res);
1377 }
1378 return result;
1379};
1380
1381DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
1382 if (tag === 'bitstr') {
1383 var unused = buffer.readUInt8();
1384 if (buffer.isError(unused))
1385 return unused;
1386 return { unused: unused, data: buffer.raw() };
1387 } else if (tag === 'bmpstr') {
1388 var raw = buffer.raw();
1389 if (raw.length % 2 === 1)
1390 return buffer.error('Decoding of string type: bmpstr length mismatch');
1391
1392 var str = '';
1393 for (var i = 0; i < raw.length / 2; i++) {
1394 str += String.fromCharCode(raw.readUInt16BE(i * 2));
1395 }
1396 return str;
1397 } else if (tag === 'numstr') {
1398 var numstr = buffer.raw().toString('ascii');
1399 if (!this._isNumstr(numstr)) {
1400 return buffer.error('Decoding of string type: ' +
1401 'numstr unsupported characters');
1402 }
1403 return numstr;
1404 } else if (tag === 'octstr') {
1405 return buffer.raw();
1406 } else if (tag === 'objDesc') {
1407 return buffer.raw();
1408 } else if (tag === 'printstr') {
1409 var printstr = buffer.raw().toString('ascii');
1410 if (!this._isPrintstr(printstr)) {
1411 return buffer.error('Decoding of string type: ' +
1412 'printstr unsupported characters');
1413 }
1414 return printstr;
1415 } else if (/str$/.test(tag)) {
1416 return buffer.raw().toString();
1417 } else {
1418 return buffer.error('Decoding of string type: ' + tag + ' unsupported');
1419 }
1420};
1421
1422DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
1423 var result;
1424 var identifiers = [];
1425 var ident = 0;
1426 while (!buffer.isEmpty()) {
1427 var subident = buffer.readUInt8();
1428 ident <<= 7;
1429 ident |= subident & 0x7f;
1430 if ((subident & 0x80) === 0) {
1431 identifiers.push(ident);
1432 ident = 0;
1433 }
1434 }
1435 if (subident & 0x80)
1436 identifiers.push(ident);
1437
1438 var first = (identifiers[0] / 40) | 0;
1439 var second = identifiers[0] % 40;
1440
1441 if (relative)
1442 result = identifiers;
1443 else
1444 result = [first, second].concat(identifiers.slice(1));
1445
1446 if (values) {
1447 var tmp = values[result.join(' ')];
1448 if (tmp === undefined)
1449 tmp = values[result.join('.')];
1450 if (tmp !== undefined)
1451 result = tmp;
1452 }
1453
1454 return result;
1455};
1456
1457DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
1458 var str = buffer.raw().toString();
1459 if (tag === 'gentime') {
1460 var year = str.slice(0, 4) | 0;
1461 var mon = str.slice(4, 6) | 0;
1462 var day = str.slice(6, 8) | 0;
1463 var hour = str.slice(8, 10) | 0;
1464 var min = str.slice(10, 12) | 0;
1465 var sec = str.slice(12, 14) | 0;
1466 } else if (tag === 'utctime') {
1467 var year = str.slice(0, 2) | 0;
1468 var mon = str.slice(2, 4) | 0;
1469 var day = str.slice(4, 6) | 0;
1470 var hour = str.slice(6, 8) | 0;
1471 var min = str.slice(8, 10) | 0;
1472 var sec = str.slice(10, 12) | 0;
1473 if (year < 70)
1474 year = 2000 + year;
1475 else
1476 year = 1900 + year;
1477 } else {
1478 return buffer.error('Decoding ' + tag + ' time is not supported yet');
1479 }
1480
1481 return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
1482};
1483
1484DERNode.prototype._decodeNull = function decodeNull(buffer) {
1485 return null;
1486};
1487
1488DERNode.prototype._decodeBool = function decodeBool(buffer) {
1489 var res = buffer.readUInt8();
1490 if (buffer.isError(res))
1491 return res;
1492 else
1493 return res !== 0;
1494};
1495
1496DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
1497 // Bigint, return as it is (assume big endian)
1498 var raw = buffer.raw();
1499 var res = new bignum(raw);
1500
1501 if (values)
1502 res = values[res.toString(10)] || res;
1503
1504 return res;
1505};
1506
1507DERNode.prototype._use = function use(entity, obj) {
1508 if (typeof entity === 'function')
1509 entity = entity(obj);
1510 return entity._getDecoder('der').tree;
1511};
1512
1513// Utility methods
1514
1515function derDecodeTag(buf, fail) {
1516 var tag = buf.readUInt8(fail);
1517 if (buf.isError(tag))
1518 return tag;
1519
1520 var cls = der.tagClass[tag >> 6];
1521 var primitive = (tag & 0x20) === 0;
1522
1523 // Multi-octet tag - load
1524 if ((tag & 0x1f) === 0x1f) {
1525 var oct = tag;
1526 tag = 0;
1527 while ((oct & 0x80) === 0x80) {
1528 oct = buf.readUInt8(fail);
1529 if (buf.isError(oct))
1530 return oct;
1531
1532 tag <<= 7;
1533 tag |= oct & 0x7f;
1534 }
1535 } else {
1536 tag &= 0x1f;
1537 }
1538 var tagStr = der.tag[tag];
1539
1540 return {
1541 cls: cls,
1542 primitive: primitive,
1543 tag: tag,
1544 tagStr: tagStr
1545 };
1546}
1547
1548function derDecodeLen(buf, primitive, fail) {
1549 var len = buf.readUInt8(fail);
1550 if (buf.isError(len))
1551 return len;
1552
1553 // Indefinite form
1554 if (!primitive && len === 0x80)
1555 return null;
1556
1557 // Definite form
1558 if ((len & 0x80) === 0) {
1559 // Short form
1560 return len;
1561 }
1562
1563 // Long form
1564 var num = len & 0x7f;
1565 if (num > 4)
1566 return buf.error('length octect is too long');
1567
1568 len = 0;
1569 for (var i = 0; i < num; i++) {
1570 len <<= 8;
1571 var j = buf.readUInt8(fail);
1572 if (buf.isError(j))
1573 return j;
1574 len |= j;
1575 }
1576
1577 return len;
1578}
1579
1580
1581/***/ }),
1582
1583/***/ "./node_modules/asn1.js/lib/asn1/decoders/index.js":
1584/*!*********************************************************!*\
1585 !*** ./node_modules/asn1.js/lib/asn1/decoders/index.js ***!
1586 \*********************************************************/
1587/*! no static exports found */
1588/***/ (function(module, exports, __webpack_require__) {
1589
1590var decoders = exports;
1591
1592decoders.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/decoders/der.js");
1593decoders.pem = __webpack_require__(/*! ./pem */ "./node_modules/asn1.js/lib/asn1/decoders/pem.js");
1594
1595
1596/***/ }),
1597
1598/***/ "./node_modules/asn1.js/lib/asn1/decoders/pem.js":
1599/*!*******************************************************!*\
1600 !*** ./node_modules/asn1.js/lib/asn1/decoders/pem.js ***!
1601 \*******************************************************/
1602/*! no static exports found */
1603/***/ (function(module, exports, __webpack_require__) {
1604
1605var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
1606var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
1607
1608var DERDecoder = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/decoders/der.js");
1609
1610function PEMDecoder(entity) {
1611 DERDecoder.call(this, entity);
1612 this.enc = 'pem';
1613};
1614inherits(PEMDecoder, DERDecoder);
1615module.exports = PEMDecoder;
1616
1617PEMDecoder.prototype.decode = function decode(data, options) {
1618 var lines = data.toString().split(/[\r\n]+/g);
1619
1620 var label = options.label.toUpperCase();
1621
1622 var re = /^-----(BEGIN|END) ([^-]+)-----$/;
1623 var start = -1;
1624 var end = -1;
1625 for (var i = 0; i < lines.length; i++) {
1626 var match = lines[i].match(re);
1627 if (match === null)
1628 continue;
1629
1630 if (match[2] !== label)
1631 continue;
1632
1633 if (start === -1) {
1634 if (match[1] !== 'BEGIN')
1635 break;
1636 start = i;
1637 } else {
1638 if (match[1] !== 'END')
1639 break;
1640 end = i;
1641 break;
1642 }
1643 }
1644 if (start === -1 || end === -1)
1645 throw new Error('PEM section not found for: ' + label);
1646
1647 var base64 = lines.slice(start + 1, end).join('');
1648 // Remove excessive symbols
1649 base64.replace(/[^a-z0-9\+\/=]+/gi, '');
1650
1651 var input = new Buffer(base64, 'base64');
1652 return DERDecoder.prototype.decode.call(this, input, options);
1653};
1654
1655
1656/***/ }),
1657
1658/***/ "./node_modules/asn1.js/lib/asn1/encoders/der.js":
1659/*!*******************************************************!*\
1660 !*** ./node_modules/asn1.js/lib/asn1/encoders/der.js ***!
1661 \*******************************************************/
1662/*! no static exports found */
1663/***/ (function(module, exports, __webpack_require__) {
1664
1665var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
1666var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer;
1667
1668var asn1 = __webpack_require__(/*! ../../asn1 */ "./node_modules/asn1.js/lib/asn1.js");
1669var base = asn1.base;
1670
1671// Import DER constants
1672var der = asn1.constants.der;
1673
1674function DEREncoder(entity) {
1675 this.enc = 'der';
1676 this.name = entity.name;
1677 this.entity = entity;
1678
1679 // Construct base tree
1680 this.tree = new DERNode();
1681 this.tree._init(entity.body);
1682};
1683module.exports = DEREncoder;
1684
1685DEREncoder.prototype.encode = function encode(data, reporter) {
1686 return this.tree._encode(data, reporter).join();
1687};
1688
1689// Tree methods
1690
1691function DERNode(parent) {
1692 base.Node.call(this, 'der', parent);
1693}
1694inherits(DERNode, base.Node);
1695
1696DERNode.prototype._encodeComposite = function encodeComposite(tag,
1697 primitive,
1698 cls,
1699 content) {
1700 var encodedTag = encodeTag(tag, primitive, cls, this.reporter);
1701
1702 // Short form
1703 if (content.length < 0x80) {
1704 var header = new Buffer(2);
1705 header[0] = encodedTag;
1706 header[1] = content.length;
1707 return this._createEncoderBuffer([ header, content ]);
1708 }
1709
1710 // Long form
1711 // Count octets required to store length
1712 var lenOctets = 1;
1713 for (var i = content.length; i >= 0x100; i >>= 8)
1714 lenOctets++;
1715
1716 var header = new Buffer(1 + 1 + lenOctets);
1717 header[0] = encodedTag;
1718 header[1] = 0x80 | lenOctets;
1719
1720 for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
1721 header[i] = j & 0xff;
1722
1723 return this._createEncoderBuffer([ header, content ]);
1724};
1725
1726DERNode.prototype._encodeStr = function encodeStr(str, tag) {
1727 if (tag === 'bitstr') {
1728 return this._createEncoderBuffer([ str.unused | 0, str.data ]);
1729 } else if (tag === 'bmpstr') {
1730 var buf = new Buffer(str.length * 2);
1731 for (var i = 0; i < str.length; i++) {
1732 buf.writeUInt16BE(str.charCodeAt(i), i * 2);
1733 }
1734 return this._createEncoderBuffer(buf);
1735 } else if (tag === 'numstr') {
1736 if (!this._isNumstr(str)) {
1737 return this.reporter.error('Encoding of string type: numstr supports ' +
1738 'only digits and space');
1739 }
1740 return this._createEncoderBuffer(str);
1741 } else if (tag === 'printstr') {
1742 if (!this._isPrintstr(str)) {
1743 return this.reporter.error('Encoding of string type: printstr supports ' +
1744 'only latin upper and lower case letters, ' +
1745 'digits, space, apostrophe, left and rigth ' +
1746 'parenthesis, plus sign, comma, hyphen, ' +
1747 'dot, slash, colon, equal sign, ' +
1748 'question mark');
1749 }
1750 return this._createEncoderBuffer(str);
1751 } else if (/str$/.test(tag)) {
1752 return this._createEncoderBuffer(str);
1753 } else if (tag === 'objDesc') {
1754 return this._createEncoderBuffer(str);
1755 } else {
1756 return this.reporter.error('Encoding of string type: ' + tag +
1757 ' unsupported');
1758 }
1759};
1760
1761DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
1762 if (typeof id === 'string') {
1763 if (!values)
1764 return this.reporter.error('string objid given, but no values map found');
1765 if (!values.hasOwnProperty(id))
1766 return this.reporter.error('objid not found in values map');
1767 id = values[id].split(/[\s\.]+/g);
1768 for (var i = 0; i < id.length; i++)
1769 id[i] |= 0;
1770 } else if (Array.isArray(id)) {
1771 id = id.slice();
1772 for (var i = 0; i < id.length; i++)
1773 id[i] |= 0;
1774 }
1775
1776 if (!Array.isArray(id)) {
1777 return this.reporter.error('objid() should be either array or string, ' +
1778 'got: ' + JSON.stringify(id));
1779 }
1780
1781 if (!relative) {
1782 if (id[1] >= 40)
1783 return this.reporter.error('Second objid identifier OOB');
1784 id.splice(0, 2, id[0] * 40 + id[1]);
1785 }
1786
1787 // Count number of octets
1788 var size = 0;
1789 for (var i = 0; i < id.length; i++) {
1790 var ident = id[i];
1791 for (size++; ident >= 0x80; ident >>= 7)
1792 size++;
1793 }
1794
1795 var objid = new Buffer(size);
1796 var offset = objid.length - 1;
1797 for (var i = id.length - 1; i >= 0; i--) {
1798 var ident = id[i];
1799 objid[offset--] = ident & 0x7f;
1800 while ((ident >>= 7) > 0)
1801 objid[offset--] = 0x80 | (ident & 0x7f);
1802 }
1803
1804 return this._createEncoderBuffer(objid);
1805};
1806
1807function two(num) {
1808 if (num < 10)
1809 return '0' + num;
1810 else
1811 return num;
1812}
1813
1814DERNode.prototype._encodeTime = function encodeTime(time, tag) {
1815 var str;
1816 var date = new Date(time);
1817
1818 if (tag === 'gentime') {
1819 str = [
1820 two(date.getFullYear()),
1821 two(date.getUTCMonth() + 1),
1822 two(date.getUTCDate()),
1823 two(date.getUTCHours()),
1824 two(date.getUTCMinutes()),
1825 two(date.getUTCSeconds()),
1826 'Z'
1827 ].join('');
1828 } else if (tag === 'utctime') {
1829 str = [
1830 two(date.getFullYear() % 100),
1831 two(date.getUTCMonth() + 1),
1832 two(date.getUTCDate()),
1833 two(date.getUTCHours()),
1834 two(date.getUTCMinutes()),
1835 two(date.getUTCSeconds()),
1836 'Z'
1837 ].join('');
1838 } else {
1839 this.reporter.error('Encoding ' + tag + ' time is not supported yet');
1840 }
1841
1842 return this._encodeStr(str, 'octstr');
1843};
1844
1845DERNode.prototype._encodeNull = function encodeNull() {
1846 return this._createEncoderBuffer('');
1847};
1848
1849DERNode.prototype._encodeInt = function encodeInt(num, values) {
1850 if (typeof num === 'string') {
1851 if (!values)
1852 return this.reporter.error('String int or enum given, but no values map');
1853 if (!values.hasOwnProperty(num)) {
1854 return this.reporter.error('Values map doesn\'t contain: ' +
1855 JSON.stringify(num));
1856 }
1857 num = values[num];
1858 }
1859
1860 // Bignum, assume big endian
1861 if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
1862 var numArray = num.toArray();
1863 if (!num.sign && numArray[0] & 0x80) {
1864 numArray.unshift(0);
1865 }
1866 num = new Buffer(numArray);
1867 }
1868
1869 if (Buffer.isBuffer(num)) {
1870 var size = num.length;
1871 if (num.length === 0)
1872 size++;
1873
1874 var out = new Buffer(size);
1875 num.copy(out);
1876 if (num.length === 0)
1877 out[0] = 0
1878 return this._createEncoderBuffer(out);
1879 }
1880
1881 if (num < 0x80)
1882 return this._createEncoderBuffer(num);
1883
1884 if (num < 0x100)
1885 return this._createEncoderBuffer([0, num]);
1886
1887 var size = 1;
1888 for (var i = num; i >= 0x100; i >>= 8)
1889 size++;
1890
1891 var out = new Array(size);
1892 for (var i = out.length - 1; i >= 0; i--) {
1893 out[i] = num & 0xff;
1894 num >>= 8;
1895 }
1896 if(out[0] & 0x80) {
1897 out.unshift(0);
1898 }
1899
1900 return this._createEncoderBuffer(new Buffer(out));
1901};
1902
1903DERNode.prototype._encodeBool = function encodeBool(value) {
1904 return this._createEncoderBuffer(value ? 0xff : 0);
1905};
1906
1907DERNode.prototype._use = function use(entity, obj) {
1908 if (typeof entity === 'function')
1909 entity = entity(obj);
1910 return entity._getEncoder('der').tree;
1911};
1912
1913DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
1914 var state = this._baseState;
1915 var i;
1916 if (state['default'] === null)
1917 return false;
1918
1919 var data = dataBuffer.join();
1920 if (state.defaultBuffer === undefined)
1921 state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
1922
1923 if (data.length !== state.defaultBuffer.length)
1924 return false;
1925
1926 for (i=0; i < data.length; i++)
1927 if (data[i] !== state.defaultBuffer[i])
1928 return false;
1929
1930 return true;
1931};
1932
1933// Utility methods
1934
1935function encodeTag(tag, primitive, cls, reporter) {
1936 var res;
1937
1938 if (tag === 'seqof')
1939 tag = 'seq';
1940 else if (tag === 'setof')
1941 tag = 'set';
1942
1943 if (der.tagByName.hasOwnProperty(tag))
1944 res = der.tagByName[tag];
1945 else if (typeof tag === 'number' && (tag | 0) === tag)
1946 res = tag;
1947 else
1948 return reporter.error('Unknown tag: ' + tag);
1949
1950 if (res >= 0x1f)
1951 return reporter.error('Multi-octet tag encoding unsupported');
1952
1953 if (!primitive)
1954 res |= 0x20;
1955
1956 res |= (der.tagClassByName[cls || 'universal'] << 6);
1957
1958 return res;
1959}
1960
1961
1962/***/ }),
1963
1964/***/ "./node_modules/asn1.js/lib/asn1/encoders/index.js":
1965/*!*********************************************************!*\
1966 !*** ./node_modules/asn1.js/lib/asn1/encoders/index.js ***!
1967 \*********************************************************/
1968/*! no static exports found */
1969/***/ (function(module, exports, __webpack_require__) {
1970
1971var encoders = exports;
1972
1973encoders.der = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/encoders/der.js");
1974encoders.pem = __webpack_require__(/*! ./pem */ "./node_modules/asn1.js/lib/asn1/encoders/pem.js");
1975
1976
1977/***/ }),
1978
1979/***/ "./node_modules/asn1.js/lib/asn1/encoders/pem.js":
1980/*!*******************************************************!*\
1981 !*** ./node_modules/asn1.js/lib/asn1/encoders/pem.js ***!
1982 \*******************************************************/
1983/*! no static exports found */
1984/***/ (function(module, exports, __webpack_require__) {
1985
1986var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
1987
1988var DEREncoder = __webpack_require__(/*! ./der */ "./node_modules/asn1.js/lib/asn1/encoders/der.js");
1989
1990function PEMEncoder(entity) {
1991 DEREncoder.call(this, entity);
1992 this.enc = 'pem';
1993};
1994inherits(PEMEncoder, DEREncoder);
1995module.exports = PEMEncoder;
1996
1997PEMEncoder.prototype.encode = function encode(data, options) {
1998 var buf = DEREncoder.prototype.encode.call(this, data);
1999
2000 var p = buf.toString('base64');
2001 var out = [ '-----BEGIN ' + options.label + '-----' ];
2002 for (var i = 0; i < p.length; i += 64)
2003 out.push(p.slice(i, i + 64));
2004 out.push('-----END ' + options.label + '-----');
2005 return out.join('\n');
2006};
2007
2008
2009/***/ }),
2010
2011/***/ "./node_modules/base64-js/index.js":
2012/*!*****************************************!*\
2013 !*** ./node_modules/base64-js/index.js ***!
2014 \*****************************************/
2015/*! no static exports found */
2016/***/ (function(module, exports, __webpack_require__) {
2017
2018"use strict";
2019
2020
2021exports.byteLength = byteLength
2022exports.toByteArray = toByteArray
2023exports.fromByteArray = fromByteArray
2024
2025var lookup = []
2026var revLookup = []
2027var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
2028
2029var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
2030for (var i = 0, len = code.length; i < len; ++i) {
2031 lookup[i] = code[i]
2032 revLookup[code.charCodeAt(i)] = i
2033}
2034
2035// Support decoding URL-safe base64 strings, as Node.js does.
2036// See: https://en.wikipedia.org/wiki/Base64#URL_applications
2037revLookup['-'.charCodeAt(0)] = 62
2038revLookup['_'.charCodeAt(0)] = 63
2039
2040function getLens (b64) {
2041 var len = b64.length
2042
2043 if (len % 4 > 0) {
2044 throw new Error('Invalid string. Length must be a multiple of 4')
2045 }
2046
2047 // Trim off extra bytes after placeholder bytes are found
2048 // See: https://github.com/beatgammit/base64-js/issues/42
2049 var validLen = b64.indexOf('=')
2050 if (validLen === -1) validLen = len
2051
2052 var placeHoldersLen = validLen === len
2053 ? 0
2054 : 4 - (validLen % 4)
2055
2056 return [validLen, placeHoldersLen]
2057}
2058
2059// base64 is 4/3 + up to two characters of the original data
2060function byteLength (b64) {
2061 var lens = getLens(b64)
2062 var validLen = lens[0]
2063 var placeHoldersLen = lens[1]
2064 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2065}
2066
2067function _byteLength (b64, validLen, placeHoldersLen) {
2068 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
2069}
2070
2071function toByteArray (b64) {
2072 var tmp
2073 var lens = getLens(b64)
2074 var validLen = lens[0]
2075 var placeHoldersLen = lens[1]
2076
2077 var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
2078
2079 var curByte = 0
2080
2081 // if there are placeholders, only get up to the last complete 4 chars
2082 var len = placeHoldersLen > 0
2083 ? validLen - 4
2084 : validLen
2085
2086 var i
2087 for (i = 0; i < len; i += 4) {
2088 tmp =
2089 (revLookup[b64.charCodeAt(i)] << 18) |
2090 (revLookup[b64.charCodeAt(i + 1)] << 12) |
2091 (revLookup[b64.charCodeAt(i + 2)] << 6) |
2092 revLookup[b64.charCodeAt(i + 3)]
2093 arr[curByte++] = (tmp >> 16) & 0xFF
2094 arr[curByte++] = (tmp >> 8) & 0xFF
2095 arr[curByte++] = tmp & 0xFF
2096 }
2097
2098 if (placeHoldersLen === 2) {
2099 tmp =
2100 (revLookup[b64.charCodeAt(i)] << 2) |
2101 (revLookup[b64.charCodeAt(i + 1)] >> 4)
2102 arr[curByte++] = tmp & 0xFF
2103 }
2104
2105 if (placeHoldersLen === 1) {
2106 tmp =
2107 (revLookup[b64.charCodeAt(i)] << 10) |
2108 (revLookup[b64.charCodeAt(i + 1)] << 4) |
2109 (revLookup[b64.charCodeAt(i + 2)] >> 2)
2110 arr[curByte++] = (tmp >> 8) & 0xFF
2111 arr[curByte++] = tmp & 0xFF
2112 }
2113
2114 return arr
2115}
2116
2117function tripletToBase64 (num) {
2118 return lookup[num >> 18 & 0x3F] +
2119 lookup[num >> 12 & 0x3F] +
2120 lookup[num >> 6 & 0x3F] +
2121 lookup[num & 0x3F]
2122}
2123
2124function encodeChunk (uint8, start, end) {
2125 var tmp
2126 var output = []
2127 for (var i = start; i < end; i += 3) {
2128 tmp =
2129 ((uint8[i] << 16) & 0xFF0000) +
2130 ((uint8[i + 1] << 8) & 0xFF00) +
2131 (uint8[i + 2] & 0xFF)
2132 output.push(tripletToBase64(tmp))
2133 }
2134 return output.join('')
2135}
2136
2137function fromByteArray (uint8) {
2138 var tmp
2139 var len = uint8.length
2140 var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
2141 var parts = []
2142 var maxChunkLength = 16383 // must be multiple of 3
2143
2144 // go through the array every three bytes, we'll deal with trailing stuff later
2145 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
2146 parts.push(encodeChunk(
2147 uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
2148 ))
2149 }
2150
2151 // pad the end with zeros, but make sure to not forget the extra bytes
2152 if (extraBytes === 1) {
2153 tmp = uint8[len - 1]
2154 parts.push(
2155 lookup[tmp >> 2] +
2156 lookup[(tmp << 4) & 0x3F] +
2157 '=='
2158 )
2159 } else if (extraBytes === 2) {
2160 tmp = (uint8[len - 2] << 8) + uint8[len - 1]
2161 parts.push(
2162 lookup[tmp >> 10] +
2163 lookup[(tmp >> 4) & 0x3F] +
2164 lookup[(tmp << 2) & 0x3F] +
2165 '='
2166 )
2167 }
2168
2169 return parts.join('')
2170}
2171
2172
2173/***/ }),
2174
2175/***/ "./node_modules/bn.js/lib/bn.js":
2176/*!**************************************!*\
2177 !*** ./node_modules/bn.js/lib/bn.js ***!
2178 \**************************************/
2179/*! no static exports found */
2180/***/ (function(module, exports, __webpack_require__) {
2181
2182/* WEBPACK VAR INJECTION */(function(module) {(function (module, exports) {
2183 'use strict';
2184
2185 // Utils
2186 function assert (val, msg) {
2187 if (!val) throw new Error(msg || 'Assertion failed');
2188 }
2189
2190 // Could use `inherits` module, but don't want to move from single file
2191 // architecture yet.
2192 function inherits (ctor, superCtor) {
2193 ctor.super_ = superCtor;
2194 var TempCtor = function () {};
2195 TempCtor.prototype = superCtor.prototype;
2196 ctor.prototype = new TempCtor();
2197 ctor.prototype.constructor = ctor;
2198 }
2199
2200 // BN
2201
2202 function BN (number, base, endian) {
2203 if (BN.isBN(number)) {
2204 return number;
2205 }
2206
2207 this.negative = 0;
2208 this.words = null;
2209 this.length = 0;
2210
2211 // Reduction context
2212 this.red = null;
2213
2214 if (number !== null) {
2215 if (base === 'le' || base === 'be') {
2216 endian = base;
2217 base = 10;
2218 }
2219
2220 this._init(number || 0, base || 10, endian || 'be');
2221 }
2222 }
2223 if (typeof module === 'object') {
2224 module.exports = BN;
2225 } else {
2226 exports.BN = BN;
2227 }
2228
2229 BN.BN = BN;
2230 BN.wordSize = 26;
2231
2232 var Buffer;
2233 try {
2234 Buffer = __webpack_require__(/*! buffer */ 2).Buffer;
2235 } catch (e) {
2236 }
2237
2238 BN.isBN = function isBN (num) {
2239 if (num instanceof BN) {
2240 return true;
2241 }
2242
2243 return num !== null && typeof num === 'object' &&
2244 num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
2245 };
2246
2247 BN.max = function max (left, right) {
2248 if (left.cmp(right) > 0) return left;
2249 return right;
2250 };
2251
2252 BN.min = function min (left, right) {
2253 if (left.cmp(right) < 0) return left;
2254 return right;
2255 };
2256
2257 BN.prototype._init = function init (number, base, endian) {
2258 if (typeof number === 'number') {
2259 return this._initNumber(number, base, endian);
2260 }
2261
2262 if (typeof number === 'object') {
2263 return this._initArray(number, base, endian);
2264 }
2265
2266 if (base === 'hex') {
2267 base = 16;
2268 }
2269 assert(base === (base | 0) && base >= 2 && base <= 36);
2270
2271 number = number.toString().replace(/\s+/g, '');
2272 var start = 0;
2273 if (number[0] === '-') {
2274 start++;
2275 }
2276
2277 if (base === 16) {
2278 this._parseHex(number, start);
2279 } else {
2280 this._parseBase(number, base, start);
2281 }
2282
2283 if (number[0] === '-') {
2284 this.negative = 1;
2285 }
2286
2287 this.strip();
2288
2289 if (endian !== 'le') return;
2290
2291 this._initArray(this.toArray(), base, endian);
2292 };
2293
2294 BN.prototype._initNumber = function _initNumber (number, base, endian) {
2295 if (number < 0) {
2296 this.negative = 1;
2297 number = -number;
2298 }
2299 if (number < 0x4000000) {
2300 this.words = [ number & 0x3ffffff ];
2301 this.length = 1;
2302 } else if (number < 0x10000000000000) {
2303 this.words = [
2304 number & 0x3ffffff,
2305 (number / 0x4000000) & 0x3ffffff
2306 ];
2307 this.length = 2;
2308 } else {
2309 assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
2310 this.words = [
2311 number & 0x3ffffff,
2312 (number / 0x4000000) & 0x3ffffff,
2313 1
2314 ];
2315 this.length = 3;
2316 }
2317
2318 if (endian !== 'le') return;
2319
2320 // Reverse the bytes
2321 this._initArray(this.toArray(), base, endian);
2322 };
2323
2324 BN.prototype._initArray = function _initArray (number, base, endian) {
2325 // Perhaps a Uint8Array
2326 assert(typeof number.length === 'number');
2327 if (number.length <= 0) {
2328 this.words = [ 0 ];
2329 this.length = 1;
2330 return this;
2331 }
2332
2333 this.length = Math.ceil(number.length / 3);
2334 this.words = new Array(this.length);
2335 for (var i = 0; i < this.length; i++) {
2336 this.words[i] = 0;
2337 }
2338
2339 var j, w;
2340 var off = 0;
2341 if (endian === 'be') {
2342 for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
2343 w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
2344 this.words[j] |= (w << off) & 0x3ffffff;
2345 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
2346 off += 24;
2347 if (off >= 26) {
2348 off -= 26;
2349 j++;
2350 }
2351 }
2352 } else if (endian === 'le') {
2353 for (i = 0, j = 0; i < number.length; i += 3) {
2354 w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
2355 this.words[j] |= (w << off) & 0x3ffffff;
2356 this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
2357 off += 24;
2358 if (off >= 26) {
2359 off -= 26;
2360 j++;
2361 }
2362 }
2363 }
2364 return this.strip();
2365 };
2366
2367 function parseHex (str, start, end) {
2368 var r = 0;
2369 var len = Math.min(str.length, end);
2370 for (var i = start; i < len; i++) {
2371 var c = str.charCodeAt(i) - 48;
2372
2373 r <<= 4;
2374
2375 // 'a' - 'f'
2376 if (c >= 49 && c <= 54) {
2377 r |= c - 49 + 0xa;
2378
2379 // 'A' - 'F'
2380 } else if (c >= 17 && c <= 22) {
2381 r |= c - 17 + 0xa;
2382
2383 // '0' - '9'
2384 } else {
2385 r |= c & 0xf;
2386 }
2387 }
2388 return r;
2389 }
2390
2391 BN.prototype._parseHex = function _parseHex (number, start) {
2392 // Create possibly bigger array to ensure that it fits the number
2393 this.length = Math.ceil((number.length - start) / 6);
2394 this.words = new Array(this.length);
2395 for (var i = 0; i < this.length; i++) {
2396 this.words[i] = 0;
2397 }
2398
2399 var j, w;
2400 // Scan 24-bit chunks and add them to the number
2401 var off = 0;
2402 for (i = number.length - 6, j = 0; i >= start; i -= 6) {
2403 w = parseHex(number, i, i + 6);
2404 this.words[j] |= (w << off) & 0x3ffffff;
2405 // NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
2406 this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
2407 off += 24;
2408 if (off >= 26) {
2409 off -= 26;
2410 j++;
2411 }
2412 }
2413 if (i + 6 !== start) {
2414 w = parseHex(number, start, i + 6);
2415 this.words[j] |= (w << off) & 0x3ffffff;
2416 this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
2417 }
2418 this.strip();
2419 };
2420
2421 function parseBase (str, start, end, mul) {
2422 var r = 0;
2423 var len = Math.min(str.length, end);
2424 for (var i = start; i < len; i++) {
2425 var c = str.charCodeAt(i) - 48;
2426
2427 r *= mul;
2428
2429 // 'a'
2430 if (c >= 49) {
2431 r += c - 49 + 0xa;
2432
2433 // 'A'
2434 } else if (c >= 17) {
2435 r += c - 17 + 0xa;
2436
2437 // '0' - '9'
2438 } else {
2439 r += c;
2440 }
2441 }
2442 return r;
2443 }
2444
2445 BN.prototype._parseBase = function _parseBase (number, base, start) {
2446 // Initialize as zero
2447 this.words = [ 0 ];
2448 this.length = 1;
2449
2450 // Find length of limb in base
2451 for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
2452 limbLen++;
2453 }
2454 limbLen--;
2455 limbPow = (limbPow / base) | 0;
2456
2457 var total = number.length - start;
2458 var mod = total % limbLen;
2459 var end = Math.min(total, total - mod) + start;
2460
2461 var word = 0;
2462 for (var i = start; i < end; i += limbLen) {
2463 word = parseBase(number, i, i + limbLen, base);
2464
2465 this.imuln(limbPow);
2466 if (this.words[0] + word < 0x4000000) {
2467 this.words[0] += word;
2468 } else {
2469 this._iaddn(word);
2470 }
2471 }
2472
2473 if (mod !== 0) {
2474 var pow = 1;
2475 word = parseBase(number, i, number.length, base);
2476
2477 for (i = 0; i < mod; i++) {
2478 pow *= base;
2479 }
2480
2481 this.imuln(pow);
2482 if (this.words[0] + word < 0x4000000) {
2483 this.words[0] += word;
2484 } else {
2485 this._iaddn(word);
2486 }
2487 }
2488 };
2489
2490 BN.prototype.copy = function copy (dest) {
2491 dest.words = new Array(this.length);
2492 for (var i = 0; i < this.length; i++) {
2493 dest.words[i] = this.words[i];
2494 }
2495 dest.length = this.length;
2496 dest.negative = this.negative;
2497 dest.red = this.red;
2498 };
2499
2500 BN.prototype.clone = function clone () {
2501 var r = new BN(null);
2502 this.copy(r);
2503 return r;
2504 };
2505
2506 BN.prototype._expand = function _expand (size) {
2507 while (this.length < size) {
2508 this.words[this.length++] = 0;
2509 }
2510 return this;
2511 };
2512
2513 // Remove leading `0` from `this`
2514 BN.prototype.strip = function strip () {
2515 while (this.length > 1 && this.words[this.length - 1] === 0) {
2516 this.length--;
2517 }
2518 return this._normSign();
2519 };
2520
2521 BN.prototype._normSign = function _normSign () {
2522 // -0 = 0
2523 if (this.length === 1 && this.words[0] === 0) {
2524 this.negative = 0;
2525 }
2526 return this;
2527 };
2528
2529 BN.prototype.inspect = function inspect () {
2530 return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
2531 };
2532
2533 /*
2534
2535 var zeros = [];
2536 var groupSizes = [];
2537 var groupBases = [];
2538
2539 var s = '';
2540 var i = -1;
2541 while (++i < BN.wordSize) {
2542 zeros[i] = s;
2543 s += '0';
2544 }
2545 groupSizes[0] = 0;
2546 groupSizes[1] = 0;
2547 groupBases[0] = 0;
2548 groupBases[1] = 0;
2549 var base = 2 - 1;
2550 while (++base < 36 + 1) {
2551 var groupSize = 0;
2552 var groupBase = 1;
2553 while (groupBase < (1 << BN.wordSize) / base) {
2554 groupBase *= base;
2555 groupSize += 1;
2556 }
2557 groupSizes[base] = groupSize;
2558 groupBases[base] = groupBase;
2559 }
2560
2561 */
2562
2563 var zeros = [
2564 '',
2565 '0',
2566 '00',
2567 '000',
2568 '0000',
2569 '00000',
2570 '000000',
2571 '0000000',
2572 '00000000',
2573 '000000000',
2574 '0000000000',
2575 '00000000000',
2576 '000000000000',
2577 '0000000000000',
2578 '00000000000000',
2579 '000000000000000',
2580 '0000000000000000',
2581 '00000000000000000',
2582 '000000000000000000',
2583 '0000000000000000000',
2584 '00000000000000000000',
2585 '000000000000000000000',
2586 '0000000000000000000000',
2587 '00000000000000000000000',
2588 '000000000000000000000000',
2589 '0000000000000000000000000'
2590 ];
2591
2592 var groupSizes = [
2593 0, 0,
2594 25, 16, 12, 11, 10, 9, 8,
2595 8, 7, 7, 7, 7, 6, 6,
2596 6, 6, 6, 6, 6, 5, 5,
2597 5, 5, 5, 5, 5, 5, 5,
2598 5, 5, 5, 5, 5, 5, 5
2599 ];
2600
2601 var groupBases = [
2602 0, 0,
2603 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
2604 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
2605 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
2606 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
2607 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
2608 ];
2609
2610 BN.prototype.toString = function toString (base, padding) {
2611 base = base || 10;
2612 padding = padding | 0 || 1;
2613
2614 var out;
2615 if (base === 16 || base === 'hex') {
2616 out = '';
2617 var off = 0;
2618 var carry = 0;
2619 for (var i = 0; i < this.length; i++) {
2620 var w = this.words[i];
2621 var word = (((w << off) | carry) & 0xffffff).toString(16);
2622 carry = (w >>> (24 - off)) & 0xffffff;
2623 if (carry !== 0 || i !== this.length - 1) {
2624 out = zeros[6 - word.length] + word + out;
2625 } else {
2626 out = word + out;
2627 }
2628 off += 2;
2629 if (off >= 26) {
2630 off -= 26;
2631 i--;
2632 }
2633 }
2634 if (carry !== 0) {
2635 out = carry.toString(16) + out;
2636 }
2637 while (out.length % padding !== 0) {
2638 out = '0' + out;
2639 }
2640 if (this.negative !== 0) {
2641 out = '-' + out;
2642 }
2643 return out;
2644 }
2645
2646 if (base === (base | 0) && base >= 2 && base <= 36) {
2647 // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
2648 var groupSize = groupSizes[base];
2649 // var groupBase = Math.pow(base, groupSize);
2650 var groupBase = groupBases[base];
2651 out = '';
2652 var c = this.clone();
2653 c.negative = 0;
2654 while (!c.isZero()) {
2655 var r = c.modn(groupBase).toString(base);
2656 c = c.idivn(groupBase);
2657
2658 if (!c.isZero()) {
2659 out = zeros[groupSize - r.length] + r + out;
2660 } else {
2661 out = r + out;
2662 }
2663 }
2664 if (this.isZero()) {
2665 out = '0' + out;
2666 }
2667 while (out.length % padding !== 0) {
2668 out = '0' + out;
2669 }
2670 if (this.negative !== 0) {
2671 out = '-' + out;
2672 }
2673 return out;
2674 }
2675
2676 assert(false, 'Base should be between 2 and 36');
2677 };
2678
2679 BN.prototype.toNumber = function toNumber () {
2680 var ret = this.words[0];
2681 if (this.length === 2) {
2682 ret += this.words[1] * 0x4000000;
2683 } else if (this.length === 3 && this.words[2] === 0x01) {
2684 // NOTE: at this stage it is known that the top bit is set
2685 ret += 0x10000000000000 + (this.words[1] * 0x4000000);
2686 } else if (this.length > 2) {
2687 assert(false, 'Number can only safely store up to 53 bits');
2688 }
2689 return (this.negative !== 0) ? -ret : ret;
2690 };
2691
2692 BN.prototype.toJSON = function toJSON () {
2693 return this.toString(16);
2694 };
2695
2696 BN.prototype.toBuffer = function toBuffer (endian, length) {
2697 assert(typeof Buffer !== 'undefined');
2698 return this.toArrayLike(Buffer, endian, length);
2699 };
2700
2701 BN.prototype.toArray = function toArray (endian, length) {
2702 return this.toArrayLike(Array, endian, length);
2703 };
2704
2705 BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
2706 var byteLength = this.byteLength();
2707 var reqLength = length || Math.max(1, byteLength);
2708 assert(byteLength <= reqLength, 'byte array longer than desired length');
2709 assert(reqLength > 0, 'Requested array length <= 0');
2710
2711 this.strip();
2712 var littleEndian = endian === 'le';
2713 var res = new ArrayType(reqLength);
2714
2715 var b, i;
2716 var q = this.clone();
2717 if (!littleEndian) {
2718 // Assume big-endian
2719 for (i = 0; i < reqLength - byteLength; i++) {
2720 res[i] = 0;
2721 }
2722
2723 for (i = 0; !q.isZero(); i++) {
2724 b = q.andln(0xff);
2725 q.iushrn(8);
2726
2727 res[reqLength - i - 1] = b;
2728 }
2729 } else {
2730 for (i = 0; !q.isZero(); i++) {
2731 b = q.andln(0xff);
2732 q.iushrn(8);
2733
2734 res[i] = b;
2735 }
2736
2737 for (; i < reqLength; i++) {
2738 res[i] = 0;
2739 }
2740 }
2741
2742 return res;
2743 };
2744
2745 if (Math.clz32) {
2746 BN.prototype._countBits = function _countBits (w) {
2747 return 32 - Math.clz32(w);
2748 };
2749 } else {
2750 BN.prototype._countBits = function _countBits (w) {
2751 var t = w;
2752 var r = 0;
2753 if (t >= 0x1000) {
2754 r += 13;
2755 t >>>= 13;
2756 }
2757 if (t >= 0x40) {
2758 r += 7;
2759 t >>>= 7;
2760 }
2761 if (t >= 0x8) {
2762 r += 4;
2763 t >>>= 4;
2764 }
2765 if (t >= 0x02) {
2766 r += 2;
2767 t >>>= 2;
2768 }
2769 return r + t;
2770 };
2771 }
2772
2773 BN.prototype._zeroBits = function _zeroBits (w) {
2774 // Short-cut
2775 if (w === 0) return 26;
2776
2777 var t = w;
2778 var r = 0;
2779 if ((t & 0x1fff) === 0) {
2780 r += 13;
2781 t >>>= 13;
2782 }
2783 if ((t & 0x7f) === 0) {
2784 r += 7;
2785 t >>>= 7;
2786 }
2787 if ((t & 0xf) === 0) {
2788 r += 4;
2789 t >>>= 4;
2790 }
2791 if ((t & 0x3) === 0) {
2792 r += 2;
2793 t >>>= 2;
2794 }
2795 if ((t & 0x1) === 0) {
2796 r++;
2797 }
2798 return r;
2799 };
2800
2801 // Return number of used bits in a BN
2802 BN.prototype.bitLength = function bitLength () {
2803 var w = this.words[this.length - 1];
2804 var hi = this._countBits(w);
2805 return (this.length - 1) * 26 + hi;
2806 };
2807
2808 function toBitArray (num) {
2809 var w = new Array(num.bitLength());
2810
2811 for (var bit = 0; bit < w.length; bit++) {
2812 var off = (bit / 26) | 0;
2813 var wbit = bit % 26;
2814
2815 w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
2816 }
2817
2818 return w;
2819 }
2820
2821 // Number of trailing zero bits
2822 BN.prototype.zeroBits = function zeroBits () {
2823 if (this.isZero()) return 0;
2824
2825 var r = 0;
2826 for (var i = 0; i < this.length; i++) {
2827 var b = this._zeroBits(this.words[i]);
2828 r += b;
2829 if (b !== 26) break;
2830 }
2831 return r;
2832 };
2833
2834 BN.prototype.byteLength = function byteLength () {
2835 return Math.ceil(this.bitLength() / 8);
2836 };
2837
2838 BN.prototype.toTwos = function toTwos (width) {
2839 if (this.negative !== 0) {
2840 return this.abs().inotn(width).iaddn(1);
2841 }
2842 return this.clone();
2843 };
2844
2845 BN.prototype.fromTwos = function fromTwos (width) {
2846 if (this.testn(width - 1)) {
2847 return this.notn(width).iaddn(1).ineg();
2848 }
2849 return this.clone();
2850 };
2851
2852 BN.prototype.isNeg = function isNeg () {
2853 return this.negative !== 0;
2854 };
2855
2856 // Return negative clone of `this`
2857 BN.prototype.neg = function neg () {
2858 return this.clone().ineg();
2859 };
2860
2861 BN.prototype.ineg = function ineg () {
2862 if (!this.isZero()) {
2863 this.negative ^= 1;
2864 }
2865
2866 return this;
2867 };
2868
2869 // Or `num` with `this` in-place
2870 BN.prototype.iuor = function iuor (num) {
2871 while (this.length < num.length) {
2872 this.words[this.length++] = 0;
2873 }
2874
2875 for (var i = 0; i < num.length; i++) {
2876 this.words[i] = this.words[i] | num.words[i];
2877 }
2878
2879 return this.strip();
2880 };
2881
2882 BN.prototype.ior = function ior (num) {
2883 assert((this.negative | num.negative) === 0);
2884 return this.iuor(num);
2885 };
2886
2887 // Or `num` with `this`
2888 BN.prototype.or = function or (num) {
2889 if (this.length > num.length) return this.clone().ior(num);
2890 return num.clone().ior(this);
2891 };
2892
2893 BN.prototype.uor = function uor (num) {
2894 if (this.length > num.length) return this.clone().iuor(num);
2895 return num.clone().iuor(this);
2896 };
2897
2898 // And `num` with `this` in-place
2899 BN.prototype.iuand = function iuand (num) {
2900 // b = min-length(num, this)
2901 var b;
2902 if (this.length > num.length) {
2903 b = num;
2904 } else {
2905 b = this;
2906 }
2907
2908 for (var i = 0; i < b.length; i++) {
2909 this.words[i] = this.words[i] & num.words[i];
2910 }
2911
2912 this.length = b.length;
2913
2914 return this.strip();
2915 };
2916
2917 BN.prototype.iand = function iand (num) {
2918 assert((this.negative | num.negative) === 0);
2919 return this.iuand(num);
2920 };
2921
2922 // And `num` with `this`
2923 BN.prototype.and = function and (num) {
2924 if (this.length > num.length) return this.clone().iand(num);
2925 return num.clone().iand(this);
2926 };
2927
2928 BN.prototype.uand = function uand (num) {
2929 if (this.length > num.length) return this.clone().iuand(num);
2930 return num.clone().iuand(this);
2931 };
2932
2933 // Xor `num` with `this` in-place
2934 BN.prototype.iuxor = function iuxor (num) {
2935 // a.length > b.length
2936 var a;
2937 var b;
2938 if (this.length > num.length) {
2939 a = this;
2940 b = num;
2941 } else {
2942 a = num;
2943 b = this;
2944 }
2945
2946 for (var i = 0; i < b.length; i++) {
2947 this.words[i] = a.words[i] ^ b.words[i];
2948 }
2949
2950 if (this !== a) {
2951 for (; i < a.length; i++) {
2952 this.words[i] = a.words[i];
2953 }
2954 }
2955
2956 this.length = a.length;
2957
2958 return this.strip();
2959 };
2960
2961 BN.prototype.ixor = function ixor (num) {
2962 assert((this.negative | num.negative) === 0);
2963 return this.iuxor(num);
2964 };
2965
2966 // Xor `num` with `this`
2967 BN.prototype.xor = function xor (num) {
2968 if (this.length > num.length) return this.clone().ixor(num);
2969 return num.clone().ixor(this);
2970 };
2971
2972 BN.prototype.uxor = function uxor (num) {
2973 if (this.length > num.length) return this.clone().iuxor(num);
2974 return num.clone().iuxor(this);
2975 };
2976
2977 // Not ``this`` with ``width`` bitwidth
2978 BN.prototype.inotn = function inotn (width) {
2979 assert(typeof width === 'number' && width >= 0);
2980
2981 var bytesNeeded = Math.ceil(width / 26) | 0;
2982 var bitsLeft = width % 26;
2983
2984 // Extend the buffer with leading zeroes
2985 this._expand(bytesNeeded);
2986
2987 if (bitsLeft > 0) {
2988 bytesNeeded--;
2989 }
2990
2991 // Handle complete words
2992 for (var i = 0; i < bytesNeeded; i++) {
2993 this.words[i] = ~this.words[i] & 0x3ffffff;
2994 }
2995
2996 // Handle the residue
2997 if (bitsLeft > 0) {
2998 this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
2999 }
3000
3001 // And remove leading zeroes
3002 return this.strip();
3003 };
3004
3005 BN.prototype.notn = function notn (width) {
3006 return this.clone().inotn(width);
3007 };
3008
3009 // Set `bit` of `this`
3010 BN.prototype.setn = function setn (bit, val) {
3011 assert(typeof bit === 'number' && bit >= 0);
3012
3013 var off = (bit / 26) | 0;
3014 var wbit = bit % 26;
3015
3016 this._expand(off + 1);
3017
3018 if (val) {
3019 this.words[off] = this.words[off] | (1 << wbit);
3020 } else {
3021 this.words[off] = this.words[off] & ~(1 << wbit);
3022 }
3023
3024 return this.strip();
3025 };
3026
3027 // Add `num` to `this` in-place
3028 BN.prototype.iadd = function iadd (num) {
3029 var r;
3030
3031 // negative + positive
3032 if (this.negative !== 0 && num.negative === 0) {
3033 this.negative = 0;
3034 r = this.isub(num);
3035 this.negative ^= 1;
3036 return this._normSign();
3037
3038 // positive + negative
3039 } else if (this.negative === 0 && num.negative !== 0) {
3040 num.negative = 0;
3041 r = this.isub(num);
3042 num.negative = 1;
3043 return r._normSign();
3044 }
3045
3046 // a.length > b.length
3047 var a, b;
3048 if (this.length > num.length) {
3049 a = this;
3050 b = num;
3051 } else {
3052 a = num;
3053 b = this;
3054 }
3055
3056 var carry = 0;
3057 for (var i = 0; i < b.length; i++) {
3058 r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
3059 this.words[i] = r & 0x3ffffff;
3060 carry = r >>> 26;
3061 }
3062 for (; carry !== 0 && i < a.length; i++) {
3063 r = (a.words[i] | 0) + carry;
3064 this.words[i] = r & 0x3ffffff;
3065 carry = r >>> 26;
3066 }
3067
3068 this.length = a.length;
3069 if (carry !== 0) {
3070 this.words[this.length] = carry;
3071 this.length++;
3072 // Copy the rest of the words
3073 } else if (a !== this) {
3074 for (; i < a.length; i++) {
3075 this.words[i] = a.words[i];
3076 }
3077 }
3078
3079 return this;
3080 };
3081
3082 // Add `num` to `this`
3083 BN.prototype.add = function add (num) {
3084 var res;
3085 if (num.negative !== 0 && this.negative === 0) {
3086 num.negative = 0;
3087 res = this.sub(num);
3088 num.negative ^= 1;
3089 return res;
3090 } else if (num.negative === 0 && this.negative !== 0) {
3091 this.negative = 0;
3092 res = num.sub(this);
3093 this.negative = 1;
3094 return res;
3095 }
3096
3097 if (this.length > num.length) return this.clone().iadd(num);
3098
3099 return num.clone().iadd(this);
3100 };
3101
3102 // Subtract `num` from `this` in-place
3103 BN.prototype.isub = function isub (num) {
3104 // this - (-num) = this + num
3105 if (num.negative !== 0) {
3106 num.negative = 0;
3107 var r = this.iadd(num);
3108 num.negative = 1;
3109 return r._normSign();
3110
3111 // -this - num = -(this + num)
3112 } else if (this.negative !== 0) {
3113 this.negative = 0;
3114 this.iadd(num);
3115 this.negative = 1;
3116 return this._normSign();
3117 }
3118
3119 // At this point both numbers are positive
3120 var cmp = this.cmp(num);
3121
3122 // Optimization - zeroify
3123 if (cmp === 0) {
3124 this.negative = 0;
3125 this.length = 1;
3126 this.words[0] = 0;
3127 return this;
3128 }
3129
3130 // a > b
3131 var a, b;
3132 if (cmp > 0) {
3133 a = this;
3134 b = num;
3135 } else {
3136 a = num;
3137 b = this;
3138 }
3139
3140 var carry = 0;
3141 for (var i = 0; i < b.length; i++) {
3142 r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
3143 carry = r >> 26;
3144 this.words[i] = r & 0x3ffffff;
3145 }
3146 for (; carry !== 0 && i < a.length; i++) {
3147 r = (a.words[i] | 0) + carry;
3148 carry = r >> 26;
3149 this.words[i] = r & 0x3ffffff;
3150 }
3151
3152 // Copy rest of the words
3153 if (carry === 0 && i < a.length && a !== this) {
3154 for (; i < a.length; i++) {
3155 this.words[i] = a.words[i];
3156 }
3157 }
3158
3159 this.length = Math.max(this.length, i);
3160
3161 if (a !== this) {
3162 this.negative = 1;
3163 }
3164
3165 return this.strip();
3166 };
3167
3168 // Subtract `num` from `this`
3169 BN.prototype.sub = function sub (num) {
3170 return this.clone().isub(num);
3171 };
3172
3173 function smallMulTo (self, num, out) {
3174 out.negative = num.negative ^ self.negative;
3175 var len = (self.length + num.length) | 0;
3176 out.length = len;
3177 len = (len - 1) | 0;
3178
3179 // Peel one iteration (compiler can't do it, because of code complexity)
3180 var a = self.words[0] | 0;
3181 var b = num.words[0] | 0;
3182 var r = a * b;
3183
3184 var lo = r & 0x3ffffff;
3185 var carry = (r / 0x4000000) | 0;
3186 out.words[0] = lo;
3187
3188 for (var k = 1; k < len; k++) {
3189 // Sum all words with the same `i + j = k` and accumulate `ncarry`,
3190 // note that ncarry could be >= 0x3ffffff
3191 var ncarry = carry >>> 26;
3192 var rword = carry & 0x3ffffff;
3193 var maxJ = Math.min(k, num.length - 1);
3194 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
3195 var i = (k - j) | 0;
3196 a = self.words[i] | 0;
3197 b = num.words[j] | 0;
3198 r = a * b + rword;
3199 ncarry += (r / 0x4000000) | 0;
3200 rword = r & 0x3ffffff;
3201 }
3202 out.words[k] = rword | 0;
3203 carry = ncarry | 0;
3204 }
3205 if (carry !== 0) {
3206 out.words[k] = carry | 0;
3207 } else {
3208 out.length--;
3209 }
3210
3211 return out.strip();
3212 }
3213
3214 // TODO(indutny): it may be reasonable to omit it for users who don't need
3215 // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
3216 // multiplication (like elliptic secp256k1).
3217 var comb10MulTo = function comb10MulTo (self, num, out) {
3218 var a = self.words;
3219 var b = num.words;
3220 var o = out.words;
3221 var c = 0;
3222 var lo;
3223 var mid;
3224 var hi;
3225 var a0 = a[0] | 0;
3226 var al0 = a0 & 0x1fff;
3227 var ah0 = a0 >>> 13;
3228 var a1 = a[1] | 0;
3229 var al1 = a1 & 0x1fff;
3230 var ah1 = a1 >>> 13;
3231 var a2 = a[2] | 0;
3232 var al2 = a2 & 0x1fff;
3233 var ah2 = a2 >>> 13;
3234 var a3 = a[3] | 0;
3235 var al3 = a3 & 0x1fff;
3236 var ah3 = a3 >>> 13;
3237 var a4 = a[4] | 0;
3238 var al4 = a4 & 0x1fff;
3239 var ah4 = a4 >>> 13;
3240 var a5 = a[5] | 0;
3241 var al5 = a5 & 0x1fff;
3242 var ah5 = a5 >>> 13;
3243 var a6 = a[6] | 0;
3244 var al6 = a6 & 0x1fff;
3245 var ah6 = a6 >>> 13;
3246 var a7 = a[7] | 0;
3247 var al7 = a7 & 0x1fff;
3248 var ah7 = a7 >>> 13;
3249 var a8 = a[8] | 0;
3250 var al8 = a8 & 0x1fff;
3251 var ah8 = a8 >>> 13;
3252 var a9 = a[9] | 0;
3253 var al9 = a9 & 0x1fff;
3254 var ah9 = a9 >>> 13;
3255 var b0 = b[0] | 0;
3256 var bl0 = b0 & 0x1fff;
3257 var bh0 = b0 >>> 13;
3258 var b1 = b[1] | 0;
3259 var bl1 = b1 & 0x1fff;
3260 var bh1 = b1 >>> 13;
3261 var b2 = b[2] | 0;
3262 var bl2 = b2 & 0x1fff;
3263 var bh2 = b2 >>> 13;
3264 var b3 = b[3] | 0;
3265 var bl3 = b3 & 0x1fff;
3266 var bh3 = b3 >>> 13;
3267 var b4 = b[4] | 0;
3268 var bl4 = b4 & 0x1fff;
3269 var bh4 = b4 >>> 13;
3270 var b5 = b[5] | 0;
3271 var bl5 = b5 & 0x1fff;
3272 var bh5 = b5 >>> 13;
3273 var b6 = b[6] | 0;
3274 var bl6 = b6 & 0x1fff;
3275 var bh6 = b6 >>> 13;
3276 var b7 = b[7] | 0;
3277 var bl7 = b7 & 0x1fff;
3278 var bh7 = b7 >>> 13;
3279 var b8 = b[8] | 0;
3280 var bl8 = b8 & 0x1fff;
3281 var bh8 = b8 >>> 13;
3282 var b9 = b[9] | 0;
3283 var bl9 = b9 & 0x1fff;
3284 var bh9 = b9 >>> 13;
3285
3286 out.negative = self.negative ^ num.negative;
3287 out.length = 19;
3288 /* k = 0 */
3289 lo = Math.imul(al0, bl0);
3290 mid = Math.imul(al0, bh0);
3291 mid = (mid + Math.imul(ah0, bl0)) | 0;
3292 hi = Math.imul(ah0, bh0);
3293 var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3294 c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
3295 w0 &= 0x3ffffff;
3296 /* k = 1 */
3297 lo = Math.imul(al1, bl0);
3298 mid = Math.imul(al1, bh0);
3299 mid = (mid + Math.imul(ah1, bl0)) | 0;
3300 hi = Math.imul(ah1, bh0);
3301 lo = (lo + Math.imul(al0, bl1)) | 0;
3302 mid = (mid + Math.imul(al0, bh1)) | 0;
3303 mid = (mid + Math.imul(ah0, bl1)) | 0;
3304 hi = (hi + Math.imul(ah0, bh1)) | 0;
3305 var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3306 c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
3307 w1 &= 0x3ffffff;
3308 /* k = 2 */
3309 lo = Math.imul(al2, bl0);
3310 mid = Math.imul(al2, bh0);
3311 mid = (mid + Math.imul(ah2, bl0)) | 0;
3312 hi = Math.imul(ah2, bh0);
3313 lo = (lo + Math.imul(al1, bl1)) | 0;
3314 mid = (mid + Math.imul(al1, bh1)) | 0;
3315 mid = (mid + Math.imul(ah1, bl1)) | 0;
3316 hi = (hi + Math.imul(ah1, bh1)) | 0;
3317 lo = (lo + Math.imul(al0, bl2)) | 0;
3318 mid = (mid + Math.imul(al0, bh2)) | 0;
3319 mid = (mid + Math.imul(ah0, bl2)) | 0;
3320 hi = (hi + Math.imul(ah0, bh2)) | 0;
3321 var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3322 c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
3323 w2 &= 0x3ffffff;
3324 /* k = 3 */
3325 lo = Math.imul(al3, bl0);
3326 mid = Math.imul(al3, bh0);
3327 mid = (mid + Math.imul(ah3, bl0)) | 0;
3328 hi = Math.imul(ah3, bh0);
3329 lo = (lo + Math.imul(al2, bl1)) | 0;
3330 mid = (mid + Math.imul(al2, bh1)) | 0;
3331 mid = (mid + Math.imul(ah2, bl1)) | 0;
3332 hi = (hi + Math.imul(ah2, bh1)) | 0;
3333 lo = (lo + Math.imul(al1, bl2)) | 0;
3334 mid = (mid + Math.imul(al1, bh2)) | 0;
3335 mid = (mid + Math.imul(ah1, bl2)) | 0;
3336 hi = (hi + Math.imul(ah1, bh2)) | 0;
3337 lo = (lo + Math.imul(al0, bl3)) | 0;
3338 mid = (mid + Math.imul(al0, bh3)) | 0;
3339 mid = (mid + Math.imul(ah0, bl3)) | 0;
3340 hi = (hi + Math.imul(ah0, bh3)) | 0;
3341 var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3342 c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
3343 w3 &= 0x3ffffff;
3344 /* k = 4 */
3345 lo = Math.imul(al4, bl0);
3346 mid = Math.imul(al4, bh0);
3347 mid = (mid + Math.imul(ah4, bl0)) | 0;
3348 hi = Math.imul(ah4, bh0);
3349 lo = (lo + Math.imul(al3, bl1)) | 0;
3350 mid = (mid + Math.imul(al3, bh1)) | 0;
3351 mid = (mid + Math.imul(ah3, bl1)) | 0;
3352 hi = (hi + Math.imul(ah3, bh1)) | 0;
3353 lo = (lo + Math.imul(al2, bl2)) | 0;
3354 mid = (mid + Math.imul(al2, bh2)) | 0;
3355 mid = (mid + Math.imul(ah2, bl2)) | 0;
3356 hi = (hi + Math.imul(ah2, bh2)) | 0;
3357 lo = (lo + Math.imul(al1, bl3)) | 0;
3358 mid = (mid + Math.imul(al1, bh3)) | 0;
3359 mid = (mid + Math.imul(ah1, bl3)) | 0;
3360 hi = (hi + Math.imul(ah1, bh3)) | 0;
3361 lo = (lo + Math.imul(al0, bl4)) | 0;
3362 mid = (mid + Math.imul(al0, bh4)) | 0;
3363 mid = (mid + Math.imul(ah0, bl4)) | 0;
3364 hi = (hi + Math.imul(ah0, bh4)) | 0;
3365 var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3366 c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
3367 w4 &= 0x3ffffff;
3368 /* k = 5 */
3369 lo = Math.imul(al5, bl0);
3370 mid = Math.imul(al5, bh0);
3371 mid = (mid + Math.imul(ah5, bl0)) | 0;
3372 hi = Math.imul(ah5, bh0);
3373 lo = (lo + Math.imul(al4, bl1)) | 0;
3374 mid = (mid + Math.imul(al4, bh1)) | 0;
3375 mid = (mid + Math.imul(ah4, bl1)) | 0;
3376 hi = (hi + Math.imul(ah4, bh1)) | 0;
3377 lo = (lo + Math.imul(al3, bl2)) | 0;
3378 mid = (mid + Math.imul(al3, bh2)) | 0;
3379 mid = (mid + Math.imul(ah3, bl2)) | 0;
3380 hi = (hi + Math.imul(ah3, bh2)) | 0;
3381 lo = (lo + Math.imul(al2, bl3)) | 0;
3382 mid = (mid + Math.imul(al2, bh3)) | 0;
3383 mid = (mid + Math.imul(ah2, bl3)) | 0;
3384 hi = (hi + Math.imul(ah2, bh3)) | 0;
3385 lo = (lo + Math.imul(al1, bl4)) | 0;
3386 mid = (mid + Math.imul(al1, bh4)) | 0;
3387 mid = (mid + Math.imul(ah1, bl4)) | 0;
3388 hi = (hi + Math.imul(ah1, bh4)) | 0;
3389 lo = (lo + Math.imul(al0, bl5)) | 0;
3390 mid = (mid + Math.imul(al0, bh5)) | 0;
3391 mid = (mid + Math.imul(ah0, bl5)) | 0;
3392 hi = (hi + Math.imul(ah0, bh5)) | 0;
3393 var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3394 c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
3395 w5 &= 0x3ffffff;
3396 /* k = 6 */
3397 lo = Math.imul(al6, bl0);
3398 mid = Math.imul(al6, bh0);
3399 mid = (mid + Math.imul(ah6, bl0)) | 0;
3400 hi = Math.imul(ah6, bh0);
3401 lo = (lo + Math.imul(al5, bl1)) | 0;
3402 mid = (mid + Math.imul(al5, bh1)) | 0;
3403 mid = (mid + Math.imul(ah5, bl1)) | 0;
3404 hi = (hi + Math.imul(ah5, bh1)) | 0;
3405 lo = (lo + Math.imul(al4, bl2)) | 0;
3406 mid = (mid + Math.imul(al4, bh2)) | 0;
3407 mid = (mid + Math.imul(ah4, bl2)) | 0;
3408 hi = (hi + Math.imul(ah4, bh2)) | 0;
3409 lo = (lo + Math.imul(al3, bl3)) | 0;
3410 mid = (mid + Math.imul(al3, bh3)) | 0;
3411 mid = (mid + Math.imul(ah3, bl3)) | 0;
3412 hi = (hi + Math.imul(ah3, bh3)) | 0;
3413 lo = (lo + Math.imul(al2, bl4)) | 0;
3414 mid = (mid + Math.imul(al2, bh4)) | 0;
3415 mid = (mid + Math.imul(ah2, bl4)) | 0;
3416 hi = (hi + Math.imul(ah2, bh4)) | 0;
3417 lo = (lo + Math.imul(al1, bl5)) | 0;
3418 mid = (mid + Math.imul(al1, bh5)) | 0;
3419 mid = (mid + Math.imul(ah1, bl5)) | 0;
3420 hi = (hi + Math.imul(ah1, bh5)) | 0;
3421 lo = (lo + Math.imul(al0, bl6)) | 0;
3422 mid = (mid + Math.imul(al0, bh6)) | 0;
3423 mid = (mid + Math.imul(ah0, bl6)) | 0;
3424 hi = (hi + Math.imul(ah0, bh6)) | 0;
3425 var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3426 c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
3427 w6 &= 0x3ffffff;
3428 /* k = 7 */
3429 lo = Math.imul(al7, bl0);
3430 mid = Math.imul(al7, bh0);
3431 mid = (mid + Math.imul(ah7, bl0)) | 0;
3432 hi = Math.imul(ah7, bh0);
3433 lo = (lo + Math.imul(al6, bl1)) | 0;
3434 mid = (mid + Math.imul(al6, bh1)) | 0;
3435 mid = (mid + Math.imul(ah6, bl1)) | 0;
3436 hi = (hi + Math.imul(ah6, bh1)) | 0;
3437 lo = (lo + Math.imul(al5, bl2)) | 0;
3438 mid = (mid + Math.imul(al5, bh2)) | 0;
3439 mid = (mid + Math.imul(ah5, bl2)) | 0;
3440 hi = (hi + Math.imul(ah5, bh2)) | 0;
3441 lo = (lo + Math.imul(al4, bl3)) | 0;
3442 mid = (mid + Math.imul(al4, bh3)) | 0;
3443 mid = (mid + Math.imul(ah4, bl3)) | 0;
3444 hi = (hi + Math.imul(ah4, bh3)) | 0;
3445 lo = (lo + Math.imul(al3, bl4)) | 0;
3446 mid = (mid + Math.imul(al3, bh4)) | 0;
3447 mid = (mid + Math.imul(ah3, bl4)) | 0;
3448 hi = (hi + Math.imul(ah3, bh4)) | 0;
3449 lo = (lo + Math.imul(al2, bl5)) | 0;
3450 mid = (mid + Math.imul(al2, bh5)) | 0;
3451 mid = (mid + Math.imul(ah2, bl5)) | 0;
3452 hi = (hi + Math.imul(ah2, bh5)) | 0;
3453 lo = (lo + Math.imul(al1, bl6)) | 0;
3454 mid = (mid + Math.imul(al1, bh6)) | 0;
3455 mid = (mid + Math.imul(ah1, bl6)) | 0;
3456 hi = (hi + Math.imul(ah1, bh6)) | 0;
3457 lo = (lo + Math.imul(al0, bl7)) | 0;
3458 mid = (mid + Math.imul(al0, bh7)) | 0;
3459 mid = (mid + Math.imul(ah0, bl7)) | 0;
3460 hi = (hi + Math.imul(ah0, bh7)) | 0;
3461 var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3462 c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
3463 w7 &= 0x3ffffff;
3464 /* k = 8 */
3465 lo = Math.imul(al8, bl0);
3466 mid = Math.imul(al8, bh0);
3467 mid = (mid + Math.imul(ah8, bl0)) | 0;
3468 hi = Math.imul(ah8, bh0);
3469 lo = (lo + Math.imul(al7, bl1)) | 0;
3470 mid = (mid + Math.imul(al7, bh1)) | 0;
3471 mid = (mid + Math.imul(ah7, bl1)) | 0;
3472 hi = (hi + Math.imul(ah7, bh1)) | 0;
3473 lo = (lo + Math.imul(al6, bl2)) | 0;
3474 mid = (mid + Math.imul(al6, bh2)) | 0;
3475 mid = (mid + Math.imul(ah6, bl2)) | 0;
3476 hi = (hi + Math.imul(ah6, bh2)) | 0;
3477 lo = (lo + Math.imul(al5, bl3)) | 0;
3478 mid = (mid + Math.imul(al5, bh3)) | 0;
3479 mid = (mid + Math.imul(ah5, bl3)) | 0;
3480 hi = (hi + Math.imul(ah5, bh3)) | 0;
3481 lo = (lo + Math.imul(al4, bl4)) | 0;
3482 mid = (mid + Math.imul(al4, bh4)) | 0;
3483 mid = (mid + Math.imul(ah4, bl4)) | 0;
3484 hi = (hi + Math.imul(ah4, bh4)) | 0;
3485 lo = (lo + Math.imul(al3, bl5)) | 0;
3486 mid = (mid + Math.imul(al3, bh5)) | 0;
3487 mid = (mid + Math.imul(ah3, bl5)) | 0;
3488 hi = (hi + Math.imul(ah3, bh5)) | 0;
3489 lo = (lo + Math.imul(al2, bl6)) | 0;
3490 mid = (mid + Math.imul(al2, bh6)) | 0;
3491 mid = (mid + Math.imul(ah2, bl6)) | 0;
3492 hi = (hi + Math.imul(ah2, bh6)) | 0;
3493 lo = (lo + Math.imul(al1, bl7)) | 0;
3494 mid = (mid + Math.imul(al1, bh7)) | 0;
3495 mid = (mid + Math.imul(ah1, bl7)) | 0;
3496 hi = (hi + Math.imul(ah1, bh7)) | 0;
3497 lo = (lo + Math.imul(al0, bl8)) | 0;
3498 mid = (mid + Math.imul(al0, bh8)) | 0;
3499 mid = (mid + Math.imul(ah0, bl8)) | 0;
3500 hi = (hi + Math.imul(ah0, bh8)) | 0;
3501 var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3502 c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
3503 w8 &= 0x3ffffff;
3504 /* k = 9 */
3505 lo = Math.imul(al9, bl0);
3506 mid = Math.imul(al9, bh0);
3507 mid = (mid + Math.imul(ah9, bl0)) | 0;
3508 hi = Math.imul(ah9, bh0);
3509 lo = (lo + Math.imul(al8, bl1)) | 0;
3510 mid = (mid + Math.imul(al8, bh1)) | 0;
3511 mid = (mid + Math.imul(ah8, bl1)) | 0;
3512 hi = (hi + Math.imul(ah8, bh1)) | 0;
3513 lo = (lo + Math.imul(al7, bl2)) | 0;
3514 mid = (mid + Math.imul(al7, bh2)) | 0;
3515 mid = (mid + Math.imul(ah7, bl2)) | 0;
3516 hi = (hi + Math.imul(ah7, bh2)) | 0;
3517 lo = (lo + Math.imul(al6, bl3)) | 0;
3518 mid = (mid + Math.imul(al6, bh3)) | 0;
3519 mid = (mid + Math.imul(ah6, bl3)) | 0;
3520 hi = (hi + Math.imul(ah6, bh3)) | 0;
3521 lo = (lo + Math.imul(al5, bl4)) | 0;
3522 mid = (mid + Math.imul(al5, bh4)) | 0;
3523 mid = (mid + Math.imul(ah5, bl4)) | 0;
3524 hi = (hi + Math.imul(ah5, bh4)) | 0;
3525 lo = (lo + Math.imul(al4, bl5)) | 0;
3526 mid = (mid + Math.imul(al4, bh5)) | 0;
3527 mid = (mid + Math.imul(ah4, bl5)) | 0;
3528 hi = (hi + Math.imul(ah4, bh5)) | 0;
3529 lo = (lo + Math.imul(al3, bl6)) | 0;
3530 mid = (mid + Math.imul(al3, bh6)) | 0;
3531 mid = (mid + Math.imul(ah3, bl6)) | 0;
3532 hi = (hi + Math.imul(ah3, bh6)) | 0;
3533 lo = (lo + Math.imul(al2, bl7)) | 0;
3534 mid = (mid + Math.imul(al2, bh7)) | 0;
3535 mid = (mid + Math.imul(ah2, bl7)) | 0;
3536 hi = (hi + Math.imul(ah2, bh7)) | 0;
3537 lo = (lo + Math.imul(al1, bl8)) | 0;
3538 mid = (mid + Math.imul(al1, bh8)) | 0;
3539 mid = (mid + Math.imul(ah1, bl8)) | 0;
3540 hi = (hi + Math.imul(ah1, bh8)) | 0;
3541 lo = (lo + Math.imul(al0, bl9)) | 0;
3542 mid = (mid + Math.imul(al0, bh9)) | 0;
3543 mid = (mid + Math.imul(ah0, bl9)) | 0;
3544 hi = (hi + Math.imul(ah0, bh9)) | 0;
3545 var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3546 c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
3547 w9 &= 0x3ffffff;
3548 /* k = 10 */
3549 lo = Math.imul(al9, bl1);
3550 mid = Math.imul(al9, bh1);
3551 mid = (mid + Math.imul(ah9, bl1)) | 0;
3552 hi = Math.imul(ah9, bh1);
3553 lo = (lo + Math.imul(al8, bl2)) | 0;
3554 mid = (mid + Math.imul(al8, bh2)) | 0;
3555 mid = (mid + Math.imul(ah8, bl2)) | 0;
3556 hi = (hi + Math.imul(ah8, bh2)) | 0;
3557 lo = (lo + Math.imul(al7, bl3)) | 0;
3558 mid = (mid + Math.imul(al7, bh3)) | 0;
3559 mid = (mid + Math.imul(ah7, bl3)) | 0;
3560 hi = (hi + Math.imul(ah7, bh3)) | 0;
3561 lo = (lo + Math.imul(al6, bl4)) | 0;
3562 mid = (mid + Math.imul(al6, bh4)) | 0;
3563 mid = (mid + Math.imul(ah6, bl4)) | 0;
3564 hi = (hi + Math.imul(ah6, bh4)) | 0;
3565 lo = (lo + Math.imul(al5, bl5)) | 0;
3566 mid = (mid + Math.imul(al5, bh5)) | 0;
3567 mid = (mid + Math.imul(ah5, bl5)) | 0;
3568 hi = (hi + Math.imul(ah5, bh5)) | 0;
3569 lo = (lo + Math.imul(al4, bl6)) | 0;
3570 mid = (mid + Math.imul(al4, bh6)) | 0;
3571 mid = (mid + Math.imul(ah4, bl6)) | 0;
3572 hi = (hi + Math.imul(ah4, bh6)) | 0;
3573 lo = (lo + Math.imul(al3, bl7)) | 0;
3574 mid = (mid + Math.imul(al3, bh7)) | 0;
3575 mid = (mid + Math.imul(ah3, bl7)) | 0;
3576 hi = (hi + Math.imul(ah3, bh7)) | 0;
3577 lo = (lo + Math.imul(al2, bl8)) | 0;
3578 mid = (mid + Math.imul(al2, bh8)) | 0;
3579 mid = (mid + Math.imul(ah2, bl8)) | 0;
3580 hi = (hi + Math.imul(ah2, bh8)) | 0;
3581 lo = (lo + Math.imul(al1, bl9)) | 0;
3582 mid = (mid + Math.imul(al1, bh9)) | 0;
3583 mid = (mid + Math.imul(ah1, bl9)) | 0;
3584 hi = (hi + Math.imul(ah1, bh9)) | 0;
3585 var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3586 c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
3587 w10 &= 0x3ffffff;
3588 /* k = 11 */
3589 lo = Math.imul(al9, bl2);
3590 mid = Math.imul(al9, bh2);
3591 mid = (mid + Math.imul(ah9, bl2)) | 0;
3592 hi = Math.imul(ah9, bh2);
3593 lo = (lo + Math.imul(al8, bl3)) | 0;
3594 mid = (mid + Math.imul(al8, bh3)) | 0;
3595 mid = (mid + Math.imul(ah8, bl3)) | 0;
3596 hi = (hi + Math.imul(ah8, bh3)) | 0;
3597 lo = (lo + Math.imul(al7, bl4)) | 0;
3598 mid = (mid + Math.imul(al7, bh4)) | 0;
3599 mid = (mid + Math.imul(ah7, bl4)) | 0;
3600 hi = (hi + Math.imul(ah7, bh4)) | 0;
3601 lo = (lo + Math.imul(al6, bl5)) | 0;
3602 mid = (mid + Math.imul(al6, bh5)) | 0;
3603 mid = (mid + Math.imul(ah6, bl5)) | 0;
3604 hi = (hi + Math.imul(ah6, bh5)) | 0;
3605 lo = (lo + Math.imul(al5, bl6)) | 0;
3606 mid = (mid + Math.imul(al5, bh6)) | 0;
3607 mid = (mid + Math.imul(ah5, bl6)) | 0;
3608 hi = (hi + Math.imul(ah5, bh6)) | 0;
3609 lo = (lo + Math.imul(al4, bl7)) | 0;
3610 mid = (mid + Math.imul(al4, bh7)) | 0;
3611 mid = (mid + Math.imul(ah4, bl7)) | 0;
3612 hi = (hi + Math.imul(ah4, bh7)) | 0;
3613 lo = (lo + Math.imul(al3, bl8)) | 0;
3614 mid = (mid + Math.imul(al3, bh8)) | 0;
3615 mid = (mid + Math.imul(ah3, bl8)) | 0;
3616 hi = (hi + Math.imul(ah3, bh8)) | 0;
3617 lo = (lo + Math.imul(al2, bl9)) | 0;
3618 mid = (mid + Math.imul(al2, bh9)) | 0;
3619 mid = (mid + Math.imul(ah2, bl9)) | 0;
3620 hi = (hi + Math.imul(ah2, bh9)) | 0;
3621 var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3622 c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
3623 w11 &= 0x3ffffff;
3624 /* k = 12 */
3625 lo = Math.imul(al9, bl3);
3626 mid = Math.imul(al9, bh3);
3627 mid = (mid + Math.imul(ah9, bl3)) | 0;
3628 hi = Math.imul(ah9, bh3);
3629 lo = (lo + Math.imul(al8, bl4)) | 0;
3630 mid = (mid + Math.imul(al8, bh4)) | 0;
3631 mid = (mid + Math.imul(ah8, bl4)) | 0;
3632 hi = (hi + Math.imul(ah8, bh4)) | 0;
3633 lo = (lo + Math.imul(al7, bl5)) | 0;
3634 mid = (mid + Math.imul(al7, bh5)) | 0;
3635 mid = (mid + Math.imul(ah7, bl5)) | 0;
3636 hi = (hi + Math.imul(ah7, bh5)) | 0;
3637 lo = (lo + Math.imul(al6, bl6)) | 0;
3638 mid = (mid + Math.imul(al6, bh6)) | 0;
3639 mid = (mid + Math.imul(ah6, bl6)) | 0;
3640 hi = (hi + Math.imul(ah6, bh6)) | 0;
3641 lo = (lo + Math.imul(al5, bl7)) | 0;
3642 mid = (mid + Math.imul(al5, bh7)) | 0;
3643 mid = (mid + Math.imul(ah5, bl7)) | 0;
3644 hi = (hi + Math.imul(ah5, bh7)) | 0;
3645 lo = (lo + Math.imul(al4, bl8)) | 0;
3646 mid = (mid + Math.imul(al4, bh8)) | 0;
3647 mid = (mid + Math.imul(ah4, bl8)) | 0;
3648 hi = (hi + Math.imul(ah4, bh8)) | 0;
3649 lo = (lo + Math.imul(al3, bl9)) | 0;
3650 mid = (mid + Math.imul(al3, bh9)) | 0;
3651 mid = (mid + Math.imul(ah3, bl9)) | 0;
3652 hi = (hi + Math.imul(ah3, bh9)) | 0;
3653 var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3654 c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
3655 w12 &= 0x3ffffff;
3656 /* k = 13 */
3657 lo = Math.imul(al9, bl4);
3658 mid = Math.imul(al9, bh4);
3659 mid = (mid + Math.imul(ah9, bl4)) | 0;
3660 hi = Math.imul(ah9, bh4);
3661 lo = (lo + Math.imul(al8, bl5)) | 0;
3662 mid = (mid + Math.imul(al8, bh5)) | 0;
3663 mid = (mid + Math.imul(ah8, bl5)) | 0;
3664 hi = (hi + Math.imul(ah8, bh5)) | 0;
3665 lo = (lo + Math.imul(al7, bl6)) | 0;
3666 mid = (mid + Math.imul(al7, bh6)) | 0;
3667 mid = (mid + Math.imul(ah7, bl6)) | 0;
3668 hi = (hi + Math.imul(ah7, bh6)) | 0;
3669 lo = (lo + Math.imul(al6, bl7)) | 0;
3670 mid = (mid + Math.imul(al6, bh7)) | 0;
3671 mid = (mid + Math.imul(ah6, bl7)) | 0;
3672 hi = (hi + Math.imul(ah6, bh7)) | 0;
3673 lo = (lo + Math.imul(al5, bl8)) | 0;
3674 mid = (mid + Math.imul(al5, bh8)) | 0;
3675 mid = (mid + Math.imul(ah5, bl8)) | 0;
3676 hi = (hi + Math.imul(ah5, bh8)) | 0;
3677 lo = (lo + Math.imul(al4, bl9)) | 0;
3678 mid = (mid + Math.imul(al4, bh9)) | 0;
3679 mid = (mid + Math.imul(ah4, bl9)) | 0;
3680 hi = (hi + Math.imul(ah4, bh9)) | 0;
3681 var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3682 c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
3683 w13 &= 0x3ffffff;
3684 /* k = 14 */
3685 lo = Math.imul(al9, bl5);
3686 mid = Math.imul(al9, bh5);
3687 mid = (mid + Math.imul(ah9, bl5)) | 0;
3688 hi = Math.imul(ah9, bh5);
3689 lo = (lo + Math.imul(al8, bl6)) | 0;
3690 mid = (mid + Math.imul(al8, bh6)) | 0;
3691 mid = (mid + Math.imul(ah8, bl6)) | 0;
3692 hi = (hi + Math.imul(ah8, bh6)) | 0;
3693 lo = (lo + Math.imul(al7, bl7)) | 0;
3694 mid = (mid + Math.imul(al7, bh7)) | 0;
3695 mid = (mid + Math.imul(ah7, bl7)) | 0;
3696 hi = (hi + Math.imul(ah7, bh7)) | 0;
3697 lo = (lo + Math.imul(al6, bl8)) | 0;
3698 mid = (mid + Math.imul(al6, bh8)) | 0;
3699 mid = (mid + Math.imul(ah6, bl8)) | 0;
3700 hi = (hi + Math.imul(ah6, bh8)) | 0;
3701 lo = (lo + Math.imul(al5, bl9)) | 0;
3702 mid = (mid + Math.imul(al5, bh9)) | 0;
3703 mid = (mid + Math.imul(ah5, bl9)) | 0;
3704 hi = (hi + Math.imul(ah5, bh9)) | 0;
3705 var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3706 c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
3707 w14 &= 0x3ffffff;
3708 /* k = 15 */
3709 lo = Math.imul(al9, bl6);
3710 mid = Math.imul(al9, bh6);
3711 mid = (mid + Math.imul(ah9, bl6)) | 0;
3712 hi = Math.imul(ah9, bh6);
3713 lo = (lo + Math.imul(al8, bl7)) | 0;
3714 mid = (mid + Math.imul(al8, bh7)) | 0;
3715 mid = (mid + Math.imul(ah8, bl7)) | 0;
3716 hi = (hi + Math.imul(ah8, bh7)) | 0;
3717 lo = (lo + Math.imul(al7, bl8)) | 0;
3718 mid = (mid + Math.imul(al7, bh8)) | 0;
3719 mid = (mid + Math.imul(ah7, bl8)) | 0;
3720 hi = (hi + Math.imul(ah7, bh8)) | 0;
3721 lo = (lo + Math.imul(al6, bl9)) | 0;
3722 mid = (mid + Math.imul(al6, bh9)) | 0;
3723 mid = (mid + Math.imul(ah6, bl9)) | 0;
3724 hi = (hi + Math.imul(ah6, bh9)) | 0;
3725 var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3726 c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
3727 w15 &= 0x3ffffff;
3728 /* k = 16 */
3729 lo = Math.imul(al9, bl7);
3730 mid = Math.imul(al9, bh7);
3731 mid = (mid + Math.imul(ah9, bl7)) | 0;
3732 hi = Math.imul(ah9, bh7);
3733 lo = (lo + Math.imul(al8, bl8)) | 0;
3734 mid = (mid + Math.imul(al8, bh8)) | 0;
3735 mid = (mid + Math.imul(ah8, bl8)) | 0;
3736 hi = (hi + Math.imul(ah8, bh8)) | 0;
3737 lo = (lo + Math.imul(al7, bl9)) | 0;
3738 mid = (mid + Math.imul(al7, bh9)) | 0;
3739 mid = (mid + Math.imul(ah7, bl9)) | 0;
3740 hi = (hi + Math.imul(ah7, bh9)) | 0;
3741 var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3742 c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
3743 w16 &= 0x3ffffff;
3744 /* k = 17 */
3745 lo = Math.imul(al9, bl8);
3746 mid = Math.imul(al9, bh8);
3747 mid = (mid + Math.imul(ah9, bl8)) | 0;
3748 hi = Math.imul(ah9, bh8);
3749 lo = (lo + Math.imul(al8, bl9)) | 0;
3750 mid = (mid + Math.imul(al8, bh9)) | 0;
3751 mid = (mid + Math.imul(ah8, bl9)) | 0;
3752 hi = (hi + Math.imul(ah8, bh9)) | 0;
3753 var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3754 c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
3755 w17 &= 0x3ffffff;
3756 /* k = 18 */
3757 lo = Math.imul(al9, bl9);
3758 mid = Math.imul(al9, bh9);
3759 mid = (mid + Math.imul(ah9, bl9)) | 0;
3760 hi = Math.imul(ah9, bh9);
3761 var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
3762 c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
3763 w18 &= 0x3ffffff;
3764 o[0] = w0;
3765 o[1] = w1;
3766 o[2] = w2;
3767 o[3] = w3;
3768 o[4] = w4;
3769 o[5] = w5;
3770 o[6] = w6;
3771 o[7] = w7;
3772 o[8] = w8;
3773 o[9] = w9;
3774 o[10] = w10;
3775 o[11] = w11;
3776 o[12] = w12;
3777 o[13] = w13;
3778 o[14] = w14;
3779 o[15] = w15;
3780 o[16] = w16;
3781 o[17] = w17;
3782 o[18] = w18;
3783 if (c !== 0) {
3784 o[19] = c;
3785 out.length++;
3786 }
3787 return out;
3788 };
3789
3790 // Polyfill comb
3791 if (!Math.imul) {
3792 comb10MulTo = smallMulTo;
3793 }
3794
3795 function bigMulTo (self, num, out) {
3796 out.negative = num.negative ^ self.negative;
3797 out.length = self.length + num.length;
3798
3799 var carry = 0;
3800 var hncarry = 0;
3801 for (var k = 0; k < out.length - 1; k++) {
3802 // Sum all words with the same `i + j = k` and accumulate `ncarry`,
3803 // note that ncarry could be >= 0x3ffffff
3804 var ncarry = hncarry;
3805 hncarry = 0;
3806 var rword = carry & 0x3ffffff;
3807 var maxJ = Math.min(k, num.length - 1);
3808 for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
3809 var i = k - j;
3810 var a = self.words[i] | 0;
3811 var b = num.words[j] | 0;
3812 var r = a * b;
3813
3814 var lo = r & 0x3ffffff;
3815 ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
3816 lo = (lo + rword) | 0;
3817 rword = lo & 0x3ffffff;
3818 ncarry = (ncarry + (lo >>> 26)) | 0;
3819
3820 hncarry += ncarry >>> 26;
3821 ncarry &= 0x3ffffff;
3822 }
3823 out.words[k] = rword;
3824 carry = ncarry;
3825 ncarry = hncarry;
3826 }
3827 if (carry !== 0) {
3828 out.words[k] = carry;
3829 } else {
3830 out.length--;
3831 }
3832
3833 return out.strip();
3834 }
3835
3836 function jumboMulTo (self, num, out) {
3837 var fftm = new FFTM();
3838 return fftm.mulp(self, num, out);
3839 }
3840
3841 BN.prototype.mulTo = function mulTo (num, out) {
3842 var res;
3843 var len = this.length + num.length;
3844 if (this.length === 10 && num.length === 10) {
3845 res = comb10MulTo(this, num, out);
3846 } else if (len < 63) {
3847 res = smallMulTo(this, num, out);
3848 } else if (len < 1024) {
3849 res = bigMulTo(this, num, out);
3850 } else {
3851 res = jumboMulTo(this, num, out);
3852 }
3853
3854 return res;
3855 };
3856
3857 // Cooley-Tukey algorithm for FFT
3858 // slightly revisited to rely on looping instead of recursion
3859
3860 function FFTM (x, y) {
3861 this.x = x;
3862 this.y = y;
3863 }
3864
3865 FFTM.prototype.makeRBT = function makeRBT (N) {
3866 var t = new Array(N);
3867 var l = BN.prototype._countBits(N) - 1;
3868 for (var i = 0; i < N; i++) {
3869 t[i] = this.revBin(i, l, N);
3870 }
3871
3872 return t;
3873 };
3874
3875 // Returns binary-reversed representation of `x`
3876 FFTM.prototype.revBin = function revBin (x, l, N) {
3877 if (x === 0 || x === N - 1) return x;
3878
3879 var rb = 0;
3880 for (var i = 0; i < l; i++) {
3881 rb |= (x & 1) << (l - i - 1);
3882 x >>= 1;
3883 }
3884
3885 return rb;
3886 };
3887
3888 // Performs "tweedling" phase, therefore 'emulating'
3889 // behaviour of the recursive algorithm
3890 FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
3891 for (var i = 0; i < N; i++) {
3892 rtws[i] = rws[rbt[i]];
3893 itws[i] = iws[rbt[i]];
3894 }
3895 };
3896
3897 FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
3898 this.permute(rbt, rws, iws, rtws, itws, N);
3899
3900 for (var s = 1; s < N; s <<= 1) {
3901 var l = s << 1;
3902
3903 var rtwdf = Math.cos(2 * Math.PI / l);
3904 var itwdf = Math.sin(2 * Math.PI / l);
3905
3906 for (var p = 0; p < N; p += l) {
3907 var rtwdf_ = rtwdf;
3908 var itwdf_ = itwdf;
3909
3910 for (var j = 0; j < s; j++) {
3911 var re = rtws[p + j];
3912 var ie = itws[p + j];
3913
3914 var ro = rtws[p + j + s];
3915 var io = itws[p + j + s];
3916
3917 var rx = rtwdf_ * ro - itwdf_ * io;
3918
3919 io = rtwdf_ * io + itwdf_ * ro;
3920 ro = rx;
3921
3922 rtws[p + j] = re + ro;
3923 itws[p + j] = ie + io;
3924
3925 rtws[p + j + s] = re - ro;
3926 itws[p + j + s] = ie - io;
3927
3928 /* jshint maxdepth : false */
3929 if (j !== l) {
3930 rx = rtwdf * rtwdf_ - itwdf * itwdf_;
3931
3932 itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
3933 rtwdf_ = rx;
3934 }
3935 }
3936 }
3937 }
3938 };
3939
3940 FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
3941 var N = Math.max(m, n) | 1;
3942 var odd = N & 1;
3943 var i = 0;
3944 for (N = N / 2 | 0; N; N = N >>> 1) {
3945 i++;
3946 }
3947
3948 return 1 << i + 1 + odd;
3949 };
3950
3951 FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
3952 if (N <= 1) return;
3953
3954 for (var i = 0; i < N / 2; i++) {
3955 var t = rws[i];
3956
3957 rws[i] = rws[N - i - 1];
3958 rws[N - i - 1] = t;
3959
3960 t = iws[i];
3961
3962 iws[i] = -iws[N - i - 1];
3963 iws[N - i - 1] = -t;
3964 }
3965 };
3966
3967 FFTM.prototype.normalize13b = function normalize13b (ws, N) {
3968 var carry = 0;
3969 for (var i = 0; i < N / 2; i++) {
3970 var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
3971 Math.round(ws[2 * i] / N) +
3972 carry;
3973
3974 ws[i] = w & 0x3ffffff;
3975
3976 if (w < 0x4000000) {
3977 carry = 0;
3978 } else {
3979 carry = w / 0x4000000 | 0;
3980 }
3981 }
3982
3983 return ws;
3984 };
3985
3986 FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
3987 var carry = 0;
3988 for (var i = 0; i < len; i++) {
3989 carry = carry + (ws[i] | 0);
3990
3991 rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
3992 rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
3993 }
3994
3995 // Pad with zeroes
3996 for (i = 2 * len; i < N; ++i) {
3997 rws[i] = 0;
3998 }
3999
4000 assert(carry === 0);
4001 assert((carry & ~0x1fff) === 0);
4002 };
4003
4004 FFTM.prototype.stub = function stub (N) {
4005 var ph = new Array(N);
4006 for (var i = 0; i < N; i++) {
4007 ph[i] = 0;
4008 }
4009
4010 return ph;
4011 };
4012
4013 FFTM.prototype.mulp = function mulp (x, y, out) {
4014 var N = 2 * this.guessLen13b(x.length, y.length);
4015
4016 var rbt = this.makeRBT(N);
4017
4018 var _ = this.stub(N);
4019
4020 var rws = new Array(N);
4021 var rwst = new Array(N);
4022 var iwst = new Array(N);
4023
4024 var nrws = new Array(N);
4025 var nrwst = new Array(N);
4026 var niwst = new Array(N);
4027
4028 var rmws = out.words;
4029 rmws.length = N;
4030
4031 this.convert13b(x.words, x.length, rws, N);
4032 this.convert13b(y.words, y.length, nrws, N);
4033
4034 this.transform(rws, _, rwst, iwst, N, rbt);
4035 this.transform(nrws, _, nrwst, niwst, N, rbt);
4036
4037 for (var i = 0; i < N; i++) {
4038 var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
4039 iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
4040 rwst[i] = rx;
4041 }
4042
4043 this.conjugate(rwst, iwst, N);
4044 this.transform(rwst, iwst, rmws, _, N, rbt);
4045 this.conjugate(rmws, _, N);
4046 this.normalize13b(rmws, N);
4047
4048 out.negative = x.negative ^ y.negative;
4049 out.length = x.length + y.length;
4050 return out.strip();
4051 };
4052
4053 // Multiply `this` by `num`
4054 BN.prototype.mul = function mul (num) {
4055 var out = new BN(null);
4056 out.words = new Array(this.length + num.length);
4057 return this.mulTo(num, out);
4058 };
4059
4060 // Multiply employing FFT
4061 BN.prototype.mulf = function mulf (num) {
4062 var out = new BN(null);
4063 out.words = new Array(this.length + num.length);
4064 return jumboMulTo(this, num, out);
4065 };
4066
4067 // In-place Multiplication
4068 BN.prototype.imul = function imul (num) {
4069 return this.clone().mulTo(num, this);
4070 };
4071
4072 BN.prototype.imuln = function imuln (num) {
4073 assert(typeof num === 'number');
4074 assert(num < 0x4000000);
4075
4076 // Carry
4077 var carry = 0;
4078 for (var i = 0; i < this.length; i++) {
4079 var w = (this.words[i] | 0) * num;
4080 var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
4081 carry >>= 26;
4082 carry += (w / 0x4000000) | 0;
4083 // NOTE: lo is 27bit maximum
4084 carry += lo >>> 26;
4085 this.words[i] = lo & 0x3ffffff;
4086 }
4087
4088 if (carry !== 0) {
4089 this.words[i] = carry;
4090 this.length++;
4091 }
4092
4093 return this;
4094 };
4095
4096 BN.prototype.muln = function muln (num) {
4097 return this.clone().imuln(num);
4098 };
4099
4100 // `this` * `this`
4101 BN.prototype.sqr = function sqr () {
4102 return this.mul(this);
4103 };
4104
4105 // `this` * `this` in-place
4106 BN.prototype.isqr = function isqr () {
4107 return this.imul(this.clone());
4108 };
4109
4110 // Math.pow(`this`, `num`)
4111 BN.prototype.pow = function pow (num) {
4112 var w = toBitArray(num);
4113 if (w.length === 0) return new BN(1);
4114
4115 // Skip leading zeroes
4116 var res = this;
4117 for (var i = 0; i < w.length; i++, res = res.sqr()) {
4118 if (w[i] !== 0) break;
4119 }
4120
4121 if (++i < w.length) {
4122 for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
4123 if (w[i] === 0) continue;
4124
4125 res = res.mul(q);
4126 }
4127 }
4128
4129 return res;
4130 };
4131
4132 // Shift-left in-place
4133 BN.prototype.iushln = function iushln (bits) {
4134 assert(typeof bits === 'number' && bits >= 0);
4135 var r = bits % 26;
4136 var s = (bits - r) / 26;
4137 var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
4138 var i;
4139
4140 if (r !== 0) {
4141 var carry = 0;
4142
4143 for (i = 0; i < this.length; i++) {
4144 var newCarry = this.words[i] & carryMask;
4145 var c = ((this.words[i] | 0) - newCarry) << r;
4146 this.words[i] = c | carry;
4147 carry = newCarry >>> (26 - r);
4148 }
4149
4150 if (carry) {
4151 this.words[i] = carry;
4152 this.length++;
4153 }
4154 }
4155
4156 if (s !== 0) {
4157 for (i = this.length - 1; i >= 0; i--) {
4158 this.words[i + s] = this.words[i];
4159 }
4160
4161 for (i = 0; i < s; i++) {
4162 this.words[i] = 0;
4163 }
4164
4165 this.length += s;
4166 }
4167
4168 return this.strip();
4169 };
4170
4171 BN.prototype.ishln = function ishln (bits) {
4172 // TODO(indutny): implement me
4173 assert(this.negative === 0);
4174 return this.iushln(bits);
4175 };
4176
4177 // Shift-right in-place
4178 // NOTE: `hint` is a lowest bit before trailing zeroes
4179 // NOTE: if `extended` is present - it will be filled with destroyed bits
4180 BN.prototype.iushrn = function iushrn (bits, hint, extended) {
4181 assert(typeof bits === 'number' && bits >= 0);
4182 var h;
4183 if (hint) {
4184 h = (hint - (hint % 26)) / 26;
4185 } else {
4186 h = 0;
4187 }
4188
4189 var r = bits % 26;
4190 var s = Math.min((bits - r) / 26, this.length);
4191 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
4192 var maskedWords = extended;
4193
4194 h -= s;
4195 h = Math.max(0, h);
4196
4197 // Extended mode, copy masked part
4198 if (maskedWords) {
4199 for (var i = 0; i < s; i++) {
4200 maskedWords.words[i] = this.words[i];
4201 }
4202 maskedWords.length = s;
4203 }
4204
4205 if (s === 0) {
4206 // No-op, we should not move anything at all
4207 } else if (this.length > s) {
4208 this.length -= s;
4209 for (i = 0; i < this.length; i++) {
4210 this.words[i] = this.words[i + s];
4211 }
4212 } else {
4213 this.words[0] = 0;
4214 this.length = 1;
4215 }
4216
4217 var carry = 0;
4218 for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
4219 var word = this.words[i] | 0;
4220 this.words[i] = (carry << (26 - r)) | (word >>> r);
4221 carry = word & mask;
4222 }
4223
4224 // Push carried bits as a mask
4225 if (maskedWords && carry !== 0) {
4226 maskedWords.words[maskedWords.length++] = carry;
4227 }
4228
4229 if (this.length === 0) {
4230 this.words[0] = 0;
4231 this.length = 1;
4232 }
4233
4234 return this.strip();
4235 };
4236
4237 BN.prototype.ishrn = function ishrn (bits, hint, extended) {
4238 // TODO(indutny): implement me
4239 assert(this.negative === 0);
4240 return this.iushrn(bits, hint, extended);
4241 };
4242
4243 // Shift-left
4244 BN.prototype.shln = function shln (bits) {
4245 return this.clone().ishln(bits);
4246 };
4247
4248 BN.prototype.ushln = function ushln (bits) {
4249 return this.clone().iushln(bits);
4250 };
4251
4252 // Shift-right
4253 BN.prototype.shrn = function shrn (bits) {
4254 return this.clone().ishrn(bits);
4255 };
4256
4257 BN.prototype.ushrn = function ushrn (bits) {
4258 return this.clone().iushrn(bits);
4259 };
4260
4261 // Test if n bit is set
4262 BN.prototype.testn = function testn (bit) {
4263 assert(typeof bit === 'number' && bit >= 0);
4264 var r = bit % 26;
4265 var s = (bit - r) / 26;
4266 var q = 1 << r;
4267
4268 // Fast case: bit is much higher than all existing words
4269 if (this.length <= s) return false;
4270
4271 // Check bit and return
4272 var w = this.words[s];
4273
4274 return !!(w & q);
4275 };
4276
4277 // Return only lowers bits of number (in-place)
4278 BN.prototype.imaskn = function imaskn (bits) {
4279 assert(typeof bits === 'number' && bits >= 0);
4280 var r = bits % 26;
4281 var s = (bits - r) / 26;
4282
4283 assert(this.negative === 0, 'imaskn works only with positive numbers');
4284
4285 if (this.length <= s) {
4286 return this;
4287 }
4288
4289 if (r !== 0) {
4290 s++;
4291 }
4292 this.length = Math.min(s, this.length);
4293
4294 if (r !== 0) {
4295 var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
4296 this.words[this.length - 1] &= mask;
4297 }
4298
4299 return this.strip();
4300 };
4301
4302 // Return only lowers bits of number
4303 BN.prototype.maskn = function maskn (bits) {
4304 return this.clone().imaskn(bits);
4305 };
4306
4307 // Add plain number `num` to `this`
4308 BN.prototype.iaddn = function iaddn (num) {
4309 assert(typeof num === 'number');
4310 assert(num < 0x4000000);
4311 if (num < 0) return this.isubn(-num);
4312
4313 // Possible sign change
4314 if (this.negative !== 0) {
4315 if (this.length === 1 && (this.words[0] | 0) < num) {
4316 this.words[0] = num - (this.words[0] | 0);
4317 this.negative = 0;
4318 return this;
4319 }
4320
4321 this.negative = 0;
4322 this.isubn(num);
4323 this.negative = 1;
4324 return this;
4325 }
4326
4327 // Add without checks
4328 return this._iaddn(num);
4329 };
4330
4331 BN.prototype._iaddn = function _iaddn (num) {
4332 this.words[0] += num;
4333
4334 // Carry
4335 for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
4336 this.words[i] -= 0x4000000;
4337 if (i === this.length - 1) {
4338 this.words[i + 1] = 1;
4339 } else {
4340 this.words[i + 1]++;
4341 }
4342 }
4343 this.length = Math.max(this.length, i + 1);
4344
4345 return this;
4346 };
4347
4348 // Subtract plain number `num` from `this`
4349 BN.prototype.isubn = function isubn (num) {
4350 assert(typeof num === 'number');
4351 assert(num < 0x4000000);
4352 if (num < 0) return this.iaddn(-num);
4353
4354 if (this.negative !== 0) {
4355 this.negative = 0;
4356 this.iaddn(num);
4357 this.negative = 1;
4358 return this;
4359 }
4360
4361 this.words[0] -= num;
4362
4363 if (this.length === 1 && this.words[0] < 0) {
4364 this.words[0] = -this.words[0];
4365 this.negative = 1;
4366 } else {
4367 // Carry
4368 for (var i = 0; i < this.length && this.words[i] < 0; i++) {
4369 this.words[i] += 0x4000000;
4370 this.words[i + 1] -= 1;
4371 }
4372 }
4373
4374 return this.strip();
4375 };
4376
4377 BN.prototype.addn = function addn (num) {
4378 return this.clone().iaddn(num);
4379 };
4380
4381 BN.prototype.subn = function subn (num) {
4382 return this.clone().isubn(num);
4383 };
4384
4385 BN.prototype.iabs = function iabs () {
4386 this.negative = 0;
4387
4388 return this;
4389 };
4390
4391 BN.prototype.abs = function abs () {
4392 return this.clone().iabs();
4393 };
4394
4395 BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
4396 var len = num.length + shift;
4397 var i;
4398
4399 this._expand(len);
4400
4401 var w;
4402 var carry = 0;
4403 for (i = 0; i < num.length; i++) {
4404 w = (this.words[i + shift] | 0) + carry;
4405 var right = (num.words[i] | 0) * mul;
4406 w -= right & 0x3ffffff;
4407 carry = (w >> 26) - ((right / 0x4000000) | 0);
4408 this.words[i + shift] = w & 0x3ffffff;
4409 }
4410 for (; i < this.length - shift; i++) {
4411 w = (this.words[i + shift] | 0) + carry;
4412 carry = w >> 26;
4413 this.words[i + shift] = w & 0x3ffffff;
4414 }
4415
4416 if (carry === 0) return this.strip();
4417
4418 // Subtraction overflow
4419 assert(carry === -1);
4420 carry = 0;
4421 for (i = 0; i < this.length; i++) {
4422 w = -(this.words[i] | 0) + carry;
4423 carry = w >> 26;
4424 this.words[i] = w & 0x3ffffff;
4425 }
4426 this.negative = 1;
4427
4428 return this.strip();
4429 };
4430
4431 BN.prototype._wordDiv = function _wordDiv (num, mode) {
4432 var shift = this.length - num.length;
4433
4434 var a = this.clone();
4435 var b = num;
4436
4437 // Normalize
4438 var bhi = b.words[b.length - 1] | 0;
4439 var bhiBits = this._countBits(bhi);
4440 shift = 26 - bhiBits;
4441 if (shift !== 0) {
4442 b = b.ushln(shift);
4443 a.iushln(shift);
4444 bhi = b.words[b.length - 1] | 0;
4445 }
4446
4447 // Initialize quotient
4448 var m = a.length - b.length;
4449 var q;
4450
4451 if (mode !== 'mod') {
4452 q = new BN(null);
4453 q.length = m + 1;
4454 q.words = new Array(q.length);
4455 for (var i = 0; i < q.length; i++) {
4456 q.words[i] = 0;
4457 }
4458 }
4459
4460 var diff = a.clone()._ishlnsubmul(b, 1, m);
4461 if (diff.negative === 0) {
4462 a = diff;
4463 if (q) {
4464 q.words[m] = 1;
4465 }
4466 }
4467
4468 for (var j = m - 1; j >= 0; j--) {
4469 var qj = (a.words[b.length + j] | 0) * 0x4000000 +
4470 (a.words[b.length + j - 1] | 0);
4471
4472 // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
4473 // (0x7ffffff)
4474 qj = Math.min((qj / bhi) | 0, 0x3ffffff);
4475
4476 a._ishlnsubmul(b, qj, j);
4477 while (a.negative !== 0) {
4478 qj--;
4479 a.negative = 0;
4480 a._ishlnsubmul(b, 1, j);
4481 if (!a.isZero()) {
4482 a.negative ^= 1;
4483 }
4484 }
4485 if (q) {
4486 q.words[j] = qj;
4487 }
4488 }
4489 if (q) {
4490 q.strip();
4491 }
4492 a.strip();
4493
4494 // Denormalize
4495 if (mode !== 'div' && shift !== 0) {
4496 a.iushrn(shift);
4497 }
4498
4499 return {
4500 div: q || null,
4501 mod: a
4502 };
4503 };
4504
4505 // NOTE: 1) `mode` can be set to `mod` to request mod only,
4506 // to `div` to request div only, or be absent to
4507 // request both div & mod
4508 // 2) `positive` is true if unsigned mod is requested
4509 BN.prototype.divmod = function divmod (num, mode, positive) {
4510 assert(!num.isZero());
4511
4512 if (this.isZero()) {
4513 return {
4514 div: new BN(0),
4515 mod: new BN(0)
4516 };
4517 }
4518
4519 var div, mod, res;
4520 if (this.negative !== 0 && num.negative === 0) {
4521 res = this.neg().divmod(num, mode);
4522
4523 if (mode !== 'mod') {
4524 div = res.div.neg();
4525 }
4526
4527 if (mode !== 'div') {
4528 mod = res.mod.neg();
4529 if (positive && mod.negative !== 0) {
4530 mod.iadd(num);
4531 }
4532 }
4533
4534 return {
4535 div: div,
4536 mod: mod
4537 };
4538 }
4539
4540 if (this.negative === 0 && num.negative !== 0) {
4541 res = this.divmod(num.neg(), mode);
4542
4543 if (mode !== 'mod') {
4544 div = res.div.neg();
4545 }
4546
4547 return {
4548 div: div,
4549 mod: res.mod
4550 };
4551 }
4552
4553 if ((this.negative & num.negative) !== 0) {
4554 res = this.neg().divmod(num.neg(), mode);
4555
4556 if (mode !== 'div') {
4557 mod = res.mod.neg();
4558 if (positive && mod.negative !== 0) {
4559 mod.isub(num);
4560 }
4561 }
4562
4563 return {
4564 div: res.div,
4565 mod: mod
4566 };
4567 }
4568
4569 // Both numbers are positive at this point
4570
4571 // Strip both numbers to approximate shift value
4572 if (num.length > this.length || this.cmp(num) < 0) {
4573 return {
4574 div: new BN(0),
4575 mod: this
4576 };
4577 }
4578
4579 // Very short reduction
4580 if (num.length === 1) {
4581 if (mode === 'div') {
4582 return {
4583 div: this.divn(num.words[0]),
4584 mod: null
4585 };
4586 }
4587
4588 if (mode === 'mod') {
4589 return {
4590 div: null,
4591 mod: new BN(this.modn(num.words[0]))
4592 };
4593 }
4594
4595 return {
4596 div: this.divn(num.words[0]),
4597 mod: new BN(this.modn(num.words[0]))
4598 };
4599 }
4600
4601 return this._wordDiv(num, mode);
4602 };
4603
4604 // Find `this` / `num`
4605 BN.prototype.div = function div (num) {
4606 return this.divmod(num, 'div', false).div;
4607 };
4608
4609 // Find `this` % `num`
4610 BN.prototype.mod = function mod (num) {
4611 return this.divmod(num, 'mod', false).mod;
4612 };
4613
4614 BN.prototype.umod = function umod (num) {
4615 return this.divmod(num, 'mod', true).mod;
4616 };
4617
4618 // Find Round(`this` / `num`)
4619 BN.prototype.divRound = function divRound (num) {
4620 var dm = this.divmod(num);
4621
4622 // Fast case - exact division
4623 if (dm.mod.isZero()) return dm.div;
4624
4625 var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
4626
4627 var half = num.ushrn(1);
4628 var r2 = num.andln(1);
4629 var cmp = mod.cmp(half);
4630
4631 // Round down
4632 if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
4633
4634 // Round up
4635 return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
4636 };
4637
4638 BN.prototype.modn = function modn (num) {
4639 assert(num <= 0x3ffffff);
4640 var p = (1 << 26) % num;
4641
4642 var acc = 0;
4643 for (var i = this.length - 1; i >= 0; i--) {
4644 acc = (p * acc + (this.words[i] | 0)) % num;
4645 }
4646
4647 return acc;
4648 };
4649
4650 // In-place division by number
4651 BN.prototype.idivn = function idivn (num) {
4652 assert(num <= 0x3ffffff);
4653
4654 var carry = 0;
4655 for (var i = this.length - 1; i >= 0; i--) {
4656 var w = (this.words[i] | 0) + carry * 0x4000000;
4657 this.words[i] = (w / num) | 0;
4658 carry = w % num;
4659 }
4660
4661 return this.strip();
4662 };
4663
4664 BN.prototype.divn = function divn (num) {
4665 return this.clone().idivn(num);
4666 };
4667
4668 BN.prototype.egcd = function egcd (p) {
4669 assert(p.negative === 0);
4670 assert(!p.isZero());
4671
4672 var x = this;
4673 var y = p.clone();
4674
4675 if (x.negative !== 0) {
4676 x = x.umod(p);
4677 } else {
4678 x = x.clone();
4679 }
4680
4681 // A * x + B * y = x
4682 var A = new BN(1);
4683 var B = new BN(0);
4684
4685 // C * x + D * y = y
4686 var C = new BN(0);
4687 var D = new BN(1);
4688
4689 var g = 0;
4690
4691 while (x.isEven() && y.isEven()) {
4692 x.iushrn(1);
4693 y.iushrn(1);
4694 ++g;
4695 }
4696
4697 var yp = y.clone();
4698 var xp = x.clone();
4699
4700 while (!x.isZero()) {
4701 for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
4702 if (i > 0) {
4703 x.iushrn(i);
4704 while (i-- > 0) {
4705 if (A.isOdd() || B.isOdd()) {
4706 A.iadd(yp);
4707 B.isub(xp);
4708 }
4709
4710 A.iushrn(1);
4711 B.iushrn(1);
4712 }
4713 }
4714
4715 for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
4716 if (j > 0) {
4717 y.iushrn(j);
4718 while (j-- > 0) {
4719 if (C.isOdd() || D.isOdd()) {
4720 C.iadd(yp);
4721 D.isub(xp);
4722 }
4723
4724 C.iushrn(1);
4725 D.iushrn(1);
4726 }
4727 }
4728
4729 if (x.cmp(y) >= 0) {
4730 x.isub(y);
4731 A.isub(C);
4732 B.isub(D);
4733 } else {
4734 y.isub(x);
4735 C.isub(A);
4736 D.isub(B);
4737 }
4738 }
4739
4740 return {
4741 a: C,
4742 b: D,
4743 gcd: y.iushln(g)
4744 };
4745 };
4746
4747 // This is reduced incarnation of the binary EEA
4748 // above, designated to invert members of the
4749 // _prime_ fields F(p) at a maximal speed
4750 BN.prototype._invmp = function _invmp (p) {
4751 assert(p.negative === 0);
4752 assert(!p.isZero());
4753
4754 var a = this;
4755 var b = p.clone();
4756
4757 if (a.negative !== 0) {
4758 a = a.umod(p);
4759 } else {
4760 a = a.clone();
4761 }
4762
4763 var x1 = new BN(1);
4764 var x2 = new BN(0);
4765
4766 var delta = b.clone();
4767
4768 while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
4769 for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
4770 if (i > 0) {
4771 a.iushrn(i);
4772 while (i-- > 0) {
4773 if (x1.isOdd()) {
4774 x1.iadd(delta);
4775 }
4776
4777 x1.iushrn(1);
4778 }
4779 }
4780
4781 for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
4782 if (j > 0) {
4783 b.iushrn(j);
4784 while (j-- > 0) {
4785 if (x2.isOdd()) {
4786 x2.iadd(delta);
4787 }
4788
4789 x2.iushrn(1);
4790 }
4791 }
4792
4793 if (a.cmp(b) >= 0) {
4794 a.isub(b);
4795 x1.isub(x2);
4796 } else {
4797 b.isub(a);
4798 x2.isub(x1);
4799 }
4800 }
4801
4802 var res;
4803 if (a.cmpn(1) === 0) {
4804 res = x1;
4805 } else {
4806 res = x2;
4807 }
4808
4809 if (res.cmpn(0) < 0) {
4810 res.iadd(p);
4811 }
4812
4813 return res;
4814 };
4815
4816 BN.prototype.gcd = function gcd (num) {
4817 if (this.isZero()) return num.abs();
4818 if (num.isZero()) return this.abs();
4819
4820 var a = this.clone();
4821 var b = num.clone();
4822 a.negative = 0;
4823 b.negative = 0;
4824
4825 // Remove common factor of two
4826 for (var shift = 0; a.isEven() && b.isEven(); shift++) {
4827 a.iushrn(1);
4828 b.iushrn(1);
4829 }
4830
4831 do {
4832 while (a.isEven()) {
4833 a.iushrn(1);
4834 }
4835 while (b.isEven()) {
4836 b.iushrn(1);
4837 }
4838
4839 var r = a.cmp(b);
4840 if (r < 0) {
4841 // Swap `a` and `b` to make `a` always bigger than `b`
4842 var t = a;
4843 a = b;
4844 b = t;
4845 } else if (r === 0 || b.cmpn(1) === 0) {
4846 break;
4847 }
4848
4849 a.isub(b);
4850 } while (true);
4851
4852 return b.iushln(shift);
4853 };
4854
4855 // Invert number in the field F(num)
4856 BN.prototype.invm = function invm (num) {
4857 return this.egcd(num).a.umod(num);
4858 };
4859
4860 BN.prototype.isEven = function isEven () {
4861 return (this.words[0] & 1) === 0;
4862 };
4863
4864 BN.prototype.isOdd = function isOdd () {
4865 return (this.words[0] & 1) === 1;
4866 };
4867
4868 // And first word and num
4869 BN.prototype.andln = function andln (num) {
4870 return this.words[0] & num;
4871 };
4872
4873 // Increment at the bit position in-line
4874 BN.prototype.bincn = function bincn (bit) {
4875 assert(typeof bit === 'number');
4876 var r = bit % 26;
4877 var s = (bit - r) / 26;
4878 var q = 1 << r;
4879
4880 // Fast case: bit is much higher than all existing words
4881 if (this.length <= s) {
4882 this._expand(s + 1);
4883 this.words[s] |= q;
4884 return this;
4885 }
4886
4887 // Add bit and propagate, if needed
4888 var carry = q;
4889 for (var i = s; carry !== 0 && i < this.length; i++) {
4890 var w = this.words[i] | 0;
4891 w += carry;
4892 carry = w >>> 26;
4893 w &= 0x3ffffff;
4894 this.words[i] = w;
4895 }
4896 if (carry !== 0) {
4897 this.words[i] = carry;
4898 this.length++;
4899 }
4900 return this;
4901 };
4902
4903 BN.prototype.isZero = function isZero () {
4904 return this.length === 1 && this.words[0] === 0;
4905 };
4906
4907 BN.prototype.cmpn = function cmpn (num) {
4908 var negative = num < 0;
4909
4910 if (this.negative !== 0 && !negative) return -1;
4911 if (this.negative === 0 && negative) return 1;
4912
4913 this.strip();
4914
4915 var res;
4916 if (this.length > 1) {
4917 res = 1;
4918 } else {
4919 if (negative) {
4920 num = -num;
4921 }
4922
4923 assert(num <= 0x3ffffff, 'Number is too big');
4924
4925 var w = this.words[0] | 0;
4926 res = w === num ? 0 : w < num ? -1 : 1;
4927 }
4928 if (this.negative !== 0) return -res | 0;
4929 return res;
4930 };
4931
4932 // Compare two numbers and return:
4933 // 1 - if `this` > `num`
4934 // 0 - if `this` == `num`
4935 // -1 - if `this` < `num`
4936 BN.prototype.cmp = function cmp (num) {
4937 if (this.negative !== 0 && num.negative === 0) return -1;
4938 if (this.negative === 0 && num.negative !== 0) return 1;
4939
4940 var res = this.ucmp(num);
4941 if (this.negative !== 0) return -res | 0;
4942 return res;
4943 };
4944
4945 // Unsigned comparison
4946 BN.prototype.ucmp = function ucmp (num) {
4947 // At this point both numbers have the same sign
4948 if (this.length > num.length) return 1;
4949 if (this.length < num.length) return -1;
4950
4951 var res = 0;
4952 for (var i = this.length - 1; i >= 0; i--) {
4953 var a = this.words[i] | 0;
4954 var b = num.words[i] | 0;
4955
4956 if (a === b) continue;
4957 if (a < b) {
4958 res = -1;
4959 } else if (a > b) {
4960 res = 1;
4961 }
4962 break;
4963 }
4964 return res;
4965 };
4966
4967 BN.prototype.gtn = function gtn (num) {
4968 return this.cmpn(num) === 1;
4969 };
4970
4971 BN.prototype.gt = function gt (num) {
4972 return this.cmp(num) === 1;
4973 };
4974
4975 BN.prototype.gten = function gten (num) {
4976 return this.cmpn(num) >= 0;
4977 };
4978
4979 BN.prototype.gte = function gte (num) {
4980 return this.cmp(num) >= 0;
4981 };
4982
4983 BN.prototype.ltn = function ltn (num) {
4984 return this.cmpn(num) === -1;
4985 };
4986
4987 BN.prototype.lt = function lt (num) {
4988 return this.cmp(num) === -1;
4989 };
4990
4991 BN.prototype.lten = function lten (num) {
4992 return this.cmpn(num) <= 0;
4993 };
4994
4995 BN.prototype.lte = function lte (num) {
4996 return this.cmp(num) <= 0;
4997 };
4998
4999 BN.prototype.eqn = function eqn (num) {
5000 return this.cmpn(num) === 0;
5001 };
5002
5003 BN.prototype.eq = function eq (num) {
5004 return this.cmp(num) === 0;
5005 };
5006
5007 //
5008 // A reduce context, could be using montgomery or something better, depending
5009 // on the `m` itself.
5010 //
5011 BN.red = function red (num) {
5012 return new Red(num);
5013 };
5014
5015 BN.prototype.toRed = function toRed (ctx) {
5016 assert(!this.red, 'Already a number in reduction context');
5017 assert(this.negative === 0, 'red works only with positives');
5018 return ctx.convertTo(this)._forceRed(ctx);
5019 };
5020
5021 BN.prototype.fromRed = function fromRed () {
5022 assert(this.red, 'fromRed works only with numbers in reduction context');
5023 return this.red.convertFrom(this);
5024 };
5025
5026 BN.prototype._forceRed = function _forceRed (ctx) {
5027 this.red = ctx;
5028 return this;
5029 };
5030
5031 BN.prototype.forceRed = function forceRed (ctx) {
5032 assert(!this.red, 'Already a number in reduction context');
5033 return this._forceRed(ctx);
5034 };
5035
5036 BN.prototype.redAdd = function redAdd (num) {
5037 assert(this.red, 'redAdd works only with red numbers');
5038 return this.red.add(this, num);
5039 };
5040
5041 BN.prototype.redIAdd = function redIAdd (num) {
5042 assert(this.red, 'redIAdd works only with red numbers');
5043 return this.red.iadd(this, num);
5044 };
5045
5046 BN.prototype.redSub = function redSub (num) {
5047 assert(this.red, 'redSub works only with red numbers');
5048 return this.red.sub(this, num);
5049 };
5050
5051 BN.prototype.redISub = function redISub (num) {
5052 assert(this.red, 'redISub works only with red numbers');
5053 return this.red.isub(this, num);
5054 };
5055
5056 BN.prototype.redShl = function redShl (num) {
5057 assert(this.red, 'redShl works only with red numbers');
5058 return this.red.shl(this, num);
5059 };
5060
5061 BN.prototype.redMul = function redMul (num) {
5062 assert(this.red, 'redMul works only with red numbers');
5063 this.red._verify2(this, num);
5064 return this.red.mul(this, num);
5065 };
5066
5067 BN.prototype.redIMul = function redIMul (num) {
5068 assert(this.red, 'redMul works only with red numbers');
5069 this.red._verify2(this, num);
5070 return this.red.imul(this, num);
5071 };
5072
5073 BN.prototype.redSqr = function redSqr () {
5074 assert(this.red, 'redSqr works only with red numbers');
5075 this.red._verify1(this);
5076 return this.red.sqr(this);
5077 };
5078
5079 BN.prototype.redISqr = function redISqr () {
5080 assert(this.red, 'redISqr works only with red numbers');
5081 this.red._verify1(this);
5082 return this.red.isqr(this);
5083 };
5084
5085 // Square root over p
5086 BN.prototype.redSqrt = function redSqrt () {
5087 assert(this.red, 'redSqrt works only with red numbers');
5088 this.red._verify1(this);
5089 return this.red.sqrt(this);
5090 };
5091
5092 BN.prototype.redInvm = function redInvm () {
5093 assert(this.red, 'redInvm works only with red numbers');
5094 this.red._verify1(this);
5095 return this.red.invm(this);
5096 };
5097
5098 // Return negative clone of `this` % `red modulo`
5099 BN.prototype.redNeg = function redNeg () {
5100 assert(this.red, 'redNeg works only with red numbers');
5101 this.red._verify1(this);
5102 return this.red.neg(this);
5103 };
5104
5105 BN.prototype.redPow = function redPow (num) {
5106 assert(this.red && !num.red, 'redPow(normalNum)');
5107 this.red._verify1(this);
5108 return this.red.pow(this, num);
5109 };
5110
5111 // Prime numbers with efficient reduction
5112 var primes = {
5113 k256: null,
5114 p224: null,
5115 p192: null,
5116 p25519: null
5117 };
5118
5119 // Pseudo-Mersenne prime
5120 function MPrime (name, p) {
5121 // P = 2 ^ N - K
5122 this.name = name;
5123 this.p = new BN(p, 16);
5124 this.n = this.p.bitLength();
5125 this.k = new BN(1).iushln(this.n).isub(this.p);
5126
5127 this.tmp = this._tmp();
5128 }
5129
5130 MPrime.prototype._tmp = function _tmp () {
5131 var tmp = new BN(null);
5132 tmp.words = new Array(Math.ceil(this.n / 13));
5133 return tmp;
5134 };
5135
5136 MPrime.prototype.ireduce = function ireduce (num) {
5137 // Assumes that `num` is less than `P^2`
5138 // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
5139 var r = num;
5140 var rlen;
5141
5142 do {
5143 this.split(r, this.tmp);
5144 r = this.imulK(r);
5145 r = r.iadd(this.tmp);
5146 rlen = r.bitLength();
5147 } while (rlen > this.n);
5148
5149 var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
5150 if (cmp === 0) {
5151 r.words[0] = 0;
5152 r.length = 1;
5153 } else if (cmp > 0) {
5154 r.isub(this.p);
5155 } else {
5156 r.strip();
5157 }
5158
5159 return r;
5160 };
5161
5162 MPrime.prototype.split = function split (input, out) {
5163 input.iushrn(this.n, 0, out);
5164 };
5165
5166 MPrime.prototype.imulK = function imulK (num) {
5167 return num.imul(this.k);
5168 };
5169
5170 function K256 () {
5171 MPrime.call(
5172 this,
5173 'k256',
5174 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
5175 }
5176 inherits(K256, MPrime);
5177
5178 K256.prototype.split = function split (input, output) {
5179 // 256 = 9 * 26 + 22
5180 var mask = 0x3fffff;
5181
5182 var outLen = Math.min(input.length, 9);
5183 for (var i = 0; i < outLen; i++) {
5184 output.words[i] = input.words[i];
5185 }
5186 output.length = outLen;
5187
5188 if (input.length <= 9) {
5189 input.words[0] = 0;
5190 input.length = 1;
5191 return;
5192 }
5193
5194 // Shift by 9 limbs
5195 var prev = input.words[9];
5196 output.words[output.length++] = prev & mask;
5197
5198 for (i = 10; i < input.length; i++) {
5199 var next = input.words[i] | 0;
5200 input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
5201 prev = next;
5202 }
5203 prev >>>= 22;
5204 input.words[i - 10] = prev;
5205 if (prev === 0 && input.length > 10) {
5206 input.length -= 10;
5207 } else {
5208 input.length -= 9;
5209 }
5210 };
5211
5212 K256.prototype.imulK = function imulK (num) {
5213 // K = 0x1000003d1 = [ 0x40, 0x3d1 ]
5214 num.words[num.length] = 0;
5215 num.words[num.length + 1] = 0;
5216 num.length += 2;
5217
5218 // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
5219 var lo = 0;
5220 for (var i = 0; i < num.length; i++) {
5221 var w = num.words[i] | 0;
5222 lo += w * 0x3d1;
5223 num.words[i] = lo & 0x3ffffff;
5224 lo = w * 0x40 + ((lo / 0x4000000) | 0);
5225 }
5226
5227 // Fast length reduction
5228 if (num.words[num.length - 1] === 0) {
5229 num.length--;
5230 if (num.words[num.length - 1] === 0) {
5231 num.length--;
5232 }
5233 }
5234 return num;
5235 };
5236
5237 function P224 () {
5238 MPrime.call(
5239 this,
5240 'p224',
5241 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
5242 }
5243 inherits(P224, MPrime);
5244
5245 function P192 () {
5246 MPrime.call(
5247 this,
5248 'p192',
5249 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
5250 }
5251 inherits(P192, MPrime);
5252
5253 function P25519 () {
5254 // 2 ^ 255 - 19
5255 MPrime.call(
5256 this,
5257 '25519',
5258 '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
5259 }
5260 inherits(P25519, MPrime);
5261
5262 P25519.prototype.imulK = function imulK (num) {
5263 // K = 0x13
5264 var carry = 0;
5265 for (var i = 0; i < num.length; i++) {
5266 var hi = (num.words[i] | 0) * 0x13 + carry;
5267 var lo = hi & 0x3ffffff;
5268 hi >>>= 26;
5269
5270 num.words[i] = lo;
5271 carry = hi;
5272 }
5273 if (carry !== 0) {
5274 num.words[num.length++] = carry;
5275 }
5276 return num;
5277 };
5278
5279 // Exported mostly for testing purposes, use plain name instead
5280 BN._prime = function prime (name) {
5281 // Cached version of prime
5282 if (primes[name]) return primes[name];
5283
5284 var prime;
5285 if (name === 'k256') {
5286 prime = new K256();
5287 } else if (name === 'p224') {
5288 prime = new P224();
5289 } else if (name === 'p192') {
5290 prime = new P192();
5291 } else if (name === 'p25519') {
5292 prime = new P25519();
5293 } else {
5294 throw new Error('Unknown prime ' + name);
5295 }
5296 primes[name] = prime;
5297
5298 return prime;
5299 };
5300
5301 //
5302 // Base reduction engine
5303 //
5304 function Red (m) {
5305 if (typeof m === 'string') {
5306 var prime = BN._prime(m);
5307 this.m = prime.p;
5308 this.prime = prime;
5309 } else {
5310 assert(m.gtn(1), 'modulus must be greater than 1');
5311 this.m = m;
5312 this.prime = null;
5313 }
5314 }
5315
5316 Red.prototype._verify1 = function _verify1 (a) {
5317 assert(a.negative === 0, 'red works only with positives');
5318 assert(a.red, 'red works only with red numbers');
5319 };
5320
5321 Red.prototype._verify2 = function _verify2 (a, b) {
5322 assert((a.negative | b.negative) === 0, 'red works only with positives');
5323 assert(a.red && a.red === b.red,
5324 'red works only with red numbers');
5325 };
5326
5327 Red.prototype.imod = function imod (a) {
5328 if (this.prime) return this.prime.ireduce(a)._forceRed(this);
5329 return a.umod(this.m)._forceRed(this);
5330 };
5331
5332 Red.prototype.neg = function neg (a) {
5333 if (a.isZero()) {
5334 return a.clone();
5335 }
5336
5337 return this.m.sub(a)._forceRed(this);
5338 };
5339
5340 Red.prototype.add = function add (a, b) {
5341 this._verify2(a, b);
5342
5343 var res = a.add(b);
5344 if (res.cmp(this.m) >= 0) {
5345 res.isub(this.m);
5346 }
5347 return res._forceRed(this);
5348 };
5349
5350 Red.prototype.iadd = function iadd (a, b) {
5351 this._verify2(a, b);
5352
5353 var res = a.iadd(b);
5354 if (res.cmp(this.m) >= 0) {
5355 res.isub(this.m);
5356 }
5357 return res;
5358 };
5359
5360 Red.prototype.sub = function sub (a, b) {
5361 this._verify2(a, b);
5362
5363 var res = a.sub(b);
5364 if (res.cmpn(0) < 0) {
5365 res.iadd(this.m);
5366 }
5367 return res._forceRed(this);
5368 };
5369
5370 Red.prototype.isub = function isub (a, b) {
5371 this._verify2(a, b);
5372
5373 var res = a.isub(b);
5374 if (res.cmpn(0) < 0) {
5375 res.iadd(this.m);
5376 }
5377 return res;
5378 };
5379
5380 Red.prototype.shl = function shl (a, num) {
5381 this._verify1(a);
5382 return this.imod(a.ushln(num));
5383 };
5384
5385 Red.prototype.imul = function imul (a, b) {
5386 this._verify2(a, b);
5387 return this.imod(a.imul(b));
5388 };
5389
5390 Red.prototype.mul = function mul (a, b) {
5391 this._verify2(a, b);
5392 return this.imod(a.mul(b));
5393 };
5394
5395 Red.prototype.isqr = function isqr (a) {
5396 return this.imul(a, a.clone());
5397 };
5398
5399 Red.prototype.sqr = function sqr (a) {
5400 return this.mul(a, a);
5401 };
5402
5403 Red.prototype.sqrt = function sqrt (a) {
5404 if (a.isZero()) return a.clone();
5405
5406 var mod3 = this.m.andln(3);
5407 assert(mod3 % 2 === 1);
5408
5409 // Fast case
5410 if (mod3 === 3) {
5411 var pow = this.m.add(new BN(1)).iushrn(2);
5412 return this.pow(a, pow);
5413 }
5414
5415 // Tonelli-Shanks algorithm (Totally unoptimized and slow)
5416 //
5417 // Find Q and S, that Q * 2 ^ S = (P - 1)
5418 var q = this.m.subn(1);
5419 var s = 0;
5420 while (!q.isZero() && q.andln(1) === 0) {
5421 s++;
5422 q.iushrn(1);
5423 }
5424 assert(!q.isZero());
5425
5426 var one = new BN(1).toRed(this);
5427 var nOne = one.redNeg();
5428
5429 // Find quadratic non-residue
5430 // NOTE: Max is such because of generalized Riemann hypothesis.
5431 var lpow = this.m.subn(1).iushrn(1);
5432 var z = this.m.bitLength();
5433 z = new BN(2 * z * z).toRed(this);
5434
5435 while (this.pow(z, lpow).cmp(nOne) !== 0) {
5436 z.redIAdd(nOne);
5437 }
5438
5439 var c = this.pow(z, q);
5440 var r = this.pow(a, q.addn(1).iushrn(1));
5441 var t = this.pow(a, q);
5442 var m = s;
5443 while (t.cmp(one) !== 0) {
5444 var tmp = t;
5445 for (var i = 0; tmp.cmp(one) !== 0; i++) {
5446 tmp = tmp.redSqr();
5447 }
5448 assert(i < m);
5449 var b = this.pow(c, new BN(1).iushln(m - i - 1));
5450
5451 r = r.redMul(b);
5452 c = b.redSqr();
5453 t = t.redMul(c);
5454 m = i;
5455 }
5456
5457 return r;
5458 };
5459
5460 Red.prototype.invm = function invm (a) {
5461 var inv = a._invmp(this.m);
5462 if (inv.negative !== 0) {
5463 inv.negative = 0;
5464 return this.imod(inv).redNeg();
5465 } else {
5466 return this.imod(inv);
5467 }
5468 };
5469
5470 Red.prototype.pow = function pow (a, num) {
5471 if (num.isZero()) return new BN(1).toRed(this);
5472 if (num.cmpn(1) === 0) return a.clone();
5473
5474 var windowSize = 4;
5475 var wnd = new Array(1 << windowSize);
5476 wnd[0] = new BN(1).toRed(this);
5477 wnd[1] = a;
5478 for (var i = 2; i < wnd.length; i++) {
5479 wnd[i] = this.mul(wnd[i - 1], a);
5480 }
5481
5482 var res = wnd[0];
5483 var current = 0;
5484 var currentLen = 0;
5485 var start = num.bitLength() % 26;
5486 if (start === 0) {
5487 start = 26;
5488 }
5489
5490 for (i = num.length - 1; i >= 0; i--) {
5491 var word = num.words[i];
5492 for (var j = start - 1; j >= 0; j--) {
5493 var bit = (word >> j) & 1;
5494 if (res !== wnd[0]) {
5495 res = this.sqr(res);
5496 }
5497
5498 if (bit === 0 && current === 0) {
5499 currentLen = 0;
5500 continue;
5501 }
5502
5503 current <<= 1;
5504 current |= bit;
5505 currentLen++;
5506 if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
5507
5508 res = this.mul(res, wnd[current]);
5509 currentLen = 0;
5510 current = 0;
5511 }
5512 start = 26;
5513 }
5514
5515 return res;
5516 };
5517
5518 Red.prototype.convertTo = function convertTo (num) {
5519 var r = num.umod(this.m);
5520
5521 return r === num ? r.clone() : r;
5522 };
5523
5524 Red.prototype.convertFrom = function convertFrom (num) {
5525 var res = num.clone();
5526 res.red = null;
5527 return res;
5528 };
5529
5530 //
5531 // Montgomery method engine
5532 //
5533
5534 BN.mont = function mont (num) {
5535 return new Mont(num);
5536 };
5537
5538 function Mont (m) {
5539 Red.call(this, m);
5540
5541 this.shift = this.m.bitLength();
5542 if (this.shift % 26 !== 0) {
5543 this.shift += 26 - (this.shift % 26);
5544 }
5545
5546 this.r = new BN(1).iushln(this.shift);
5547 this.r2 = this.imod(this.r.sqr());
5548 this.rinv = this.r._invmp(this.m);
5549
5550 this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
5551 this.minv = this.minv.umod(this.r);
5552 this.minv = this.r.sub(this.minv);
5553 }
5554 inherits(Mont, Red);
5555
5556 Mont.prototype.convertTo = function convertTo (num) {
5557 return this.imod(num.ushln(this.shift));
5558 };
5559
5560 Mont.prototype.convertFrom = function convertFrom (num) {
5561 var r = this.imod(num.mul(this.rinv));
5562 r.red = null;
5563 return r;
5564 };
5565
5566 Mont.prototype.imul = function imul (a, b) {
5567 if (a.isZero() || b.isZero()) {
5568 a.words[0] = 0;
5569 a.length = 1;
5570 return a;
5571 }
5572
5573 var t = a.imul(b);
5574 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
5575 var u = t.isub(c).iushrn(this.shift);
5576 var res = u;
5577
5578 if (u.cmp(this.m) >= 0) {
5579 res = u.isub(this.m);
5580 } else if (u.cmpn(0) < 0) {
5581 res = u.iadd(this.m);
5582 }
5583
5584 return res._forceRed(this);
5585 };
5586
5587 Mont.prototype.mul = function mul (a, b) {
5588 if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
5589
5590 var t = a.mul(b);
5591 var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
5592 var u = t.isub(c).iushrn(this.shift);
5593 var res = u;
5594 if (u.cmp(this.m) >= 0) {
5595 res = u.isub(this.m);
5596 } else if (u.cmpn(0) < 0) {
5597 res = u.iadd(this.m);
5598 }
5599
5600 return res._forceRed(this);
5601 };
5602
5603 Mont.prototype.invm = function invm (a) {
5604 // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
5605 var res = this.imod(a._invmp(this.m).mul(this.r2));
5606 return res._forceRed(this);
5607 };
5608})( false || module, this);
5609
5610/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
5611
5612/***/ }),
5613
5614/***/ "./node_modules/brorand/index.js":
5615/*!***************************************!*\
5616 !*** ./node_modules/brorand/index.js ***!
5617 \***************************************/
5618/*! no static exports found */
5619/***/ (function(module, exports, __webpack_require__) {
5620
5621var r;
5622
5623module.exports = function rand(len) {
5624 if (!r)
5625 r = new Rand(null);
5626
5627 return r.generate(len);
5628};
5629
5630function Rand(rand) {
5631 this.rand = rand;
5632}
5633module.exports.Rand = Rand;
5634
5635Rand.prototype.generate = function generate(len) {
5636 return this._rand(len);
5637};
5638
5639// Emulate crypto API using randy
5640Rand.prototype._rand = function _rand(n) {
5641 if (this.rand.getBytes)
5642 return this.rand.getBytes(n);
5643
5644 var res = new Uint8Array(n);
5645 for (var i = 0; i < res.length; i++)
5646 res[i] = this.rand.getByte();
5647 return res;
5648};
5649
5650if (typeof self === 'object') {
5651 if (self.crypto && self.crypto.getRandomValues) {
5652 // Modern browsers
5653 Rand.prototype._rand = function _rand(n) {
5654 var arr = new Uint8Array(n);
5655 self.crypto.getRandomValues(arr);
5656 return arr;
5657 };
5658 } else if (self.msCrypto && self.msCrypto.getRandomValues) {
5659 // IE
5660 Rand.prototype._rand = function _rand(n) {
5661 var arr = new Uint8Array(n);
5662 self.msCrypto.getRandomValues(arr);
5663 return arr;
5664 };
5665
5666 // Safari's WebWorkers do not have `crypto`
5667 } else if (typeof window === 'object') {
5668 // Old junk
5669 Rand.prototype._rand = function() {
5670 throw new Error('Not implemented yet');
5671 };
5672 }
5673} else {
5674 // Node.js or Web worker with no crypto support
5675 try {
5676 var crypto = __webpack_require__(/*! crypto */ 3);
5677 if (typeof crypto.randomBytes !== 'function')
5678 throw new Error('Not supported');
5679
5680 Rand.prototype._rand = function _rand(n) {
5681 return crypto.randomBytes(n);
5682 };
5683 } catch (e) {
5684 }
5685}
5686
5687
5688/***/ }),
5689
5690/***/ "./node_modules/browserify-aes/aes.js":
5691/*!********************************************!*\
5692 !*** ./node_modules/browserify-aes/aes.js ***!
5693 \********************************************/
5694/*! no static exports found */
5695/***/ (function(module, exports, __webpack_require__) {
5696
5697// based on the aes implimentation in triple sec
5698// https://github.com/keybase/triplesec
5699// which is in turn based on the one from crypto-js
5700// https://code.google.com/p/crypto-js/
5701
5702var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
5703
5704function asUInt32Array (buf) {
5705 if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
5706
5707 var len = (buf.length / 4) | 0
5708 var out = new Array(len)
5709
5710 for (var i = 0; i < len; i++) {
5711 out[i] = buf.readUInt32BE(i * 4)
5712 }
5713
5714 return out
5715}
5716
5717function scrubVec (v) {
5718 for (var i = 0; i < v.length; v++) {
5719 v[i] = 0
5720 }
5721}
5722
5723function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {
5724 var SUB_MIX0 = SUB_MIX[0]
5725 var SUB_MIX1 = SUB_MIX[1]
5726 var SUB_MIX2 = SUB_MIX[2]
5727 var SUB_MIX3 = SUB_MIX[3]
5728
5729 var s0 = M[0] ^ keySchedule[0]
5730 var s1 = M[1] ^ keySchedule[1]
5731 var s2 = M[2] ^ keySchedule[2]
5732 var s3 = M[3] ^ keySchedule[3]
5733 var t0, t1, t2, t3
5734 var ksRow = 4
5735
5736 for (var round = 1; round < nRounds; round++) {
5737 t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]
5738 t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]
5739 t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]
5740 t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]
5741 s0 = t0
5742 s1 = t1
5743 s2 = t2
5744 s3 = t3
5745 }
5746
5747 t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]
5748 t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]
5749 t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]
5750 t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]
5751 t0 = t0 >>> 0
5752 t1 = t1 >>> 0
5753 t2 = t2 >>> 0
5754 t3 = t3 >>> 0
5755
5756 return [t0, t1, t2, t3]
5757}
5758
5759// AES constants
5760var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]
5761var G = (function () {
5762 // Compute double table
5763 var d = new Array(256)
5764 for (var j = 0; j < 256; j++) {
5765 if (j < 128) {
5766 d[j] = j << 1
5767 } else {
5768 d[j] = (j << 1) ^ 0x11b
5769 }
5770 }
5771
5772 var SBOX = []
5773 var INV_SBOX = []
5774 var SUB_MIX = [[], [], [], []]
5775 var INV_SUB_MIX = [[], [], [], []]
5776
5777 // Walk GF(2^8)
5778 var x = 0
5779 var xi = 0
5780 for (var i = 0; i < 256; ++i) {
5781 // Compute sbox
5782 var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)
5783 sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63
5784 SBOX[x] = sx
5785 INV_SBOX[sx] = x
5786
5787 // Compute multiplication
5788 var x2 = d[x]
5789 var x4 = d[x2]
5790 var x8 = d[x4]
5791
5792 // Compute sub bytes, mix columns tables
5793 var t = (d[sx] * 0x101) ^ (sx * 0x1010100)
5794 SUB_MIX[0][x] = (t << 24) | (t >>> 8)
5795 SUB_MIX[1][x] = (t << 16) | (t >>> 16)
5796 SUB_MIX[2][x] = (t << 8) | (t >>> 24)
5797 SUB_MIX[3][x] = t
5798
5799 // Compute inv sub bytes, inv mix columns tables
5800 t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)
5801 INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)
5802 INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)
5803 INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)
5804 INV_SUB_MIX[3][sx] = t
5805
5806 if (x === 0) {
5807 x = xi = 1
5808 } else {
5809 x = x2 ^ d[d[d[x8 ^ x2]]]
5810 xi ^= d[d[xi]]
5811 }
5812 }
5813
5814 return {
5815 SBOX: SBOX,
5816 INV_SBOX: INV_SBOX,
5817 SUB_MIX: SUB_MIX,
5818 INV_SUB_MIX: INV_SUB_MIX
5819 }
5820})()
5821
5822function AES (key) {
5823 this._key = asUInt32Array(key)
5824 this._reset()
5825}
5826
5827AES.blockSize = 4 * 4
5828AES.keySize = 256 / 8
5829AES.prototype.blockSize = AES.blockSize
5830AES.prototype.keySize = AES.keySize
5831AES.prototype._reset = function () {
5832 var keyWords = this._key
5833 var keySize = keyWords.length
5834 var nRounds = keySize + 6
5835 var ksRows = (nRounds + 1) * 4
5836
5837 var keySchedule = []
5838 for (var k = 0; k < keySize; k++) {
5839 keySchedule[k] = keyWords[k]
5840 }
5841
5842 for (k = keySize; k < ksRows; k++) {
5843 var t = keySchedule[k - 1]
5844
5845 if (k % keySize === 0) {
5846 t = (t << 8) | (t >>> 24)
5847 t =
5848 (G.SBOX[t >>> 24] << 24) |
5849 (G.SBOX[(t >>> 16) & 0xff] << 16) |
5850 (G.SBOX[(t >>> 8) & 0xff] << 8) |
5851 (G.SBOX[t & 0xff])
5852
5853 t ^= RCON[(k / keySize) | 0] << 24
5854 } else if (keySize > 6 && k % keySize === 4) {
5855 t =
5856 (G.SBOX[t >>> 24] << 24) |
5857 (G.SBOX[(t >>> 16) & 0xff] << 16) |
5858 (G.SBOX[(t >>> 8) & 0xff] << 8) |
5859 (G.SBOX[t & 0xff])
5860 }
5861
5862 keySchedule[k] = keySchedule[k - keySize] ^ t
5863 }
5864
5865 var invKeySchedule = []
5866 for (var ik = 0; ik < ksRows; ik++) {
5867 var ksR = ksRows - ik
5868 var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]
5869
5870 if (ik < 4 || ksR <= 4) {
5871 invKeySchedule[ik] = tt
5872 } else {
5873 invKeySchedule[ik] =
5874 G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^
5875 G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^
5876 G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^
5877 G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]
5878 }
5879 }
5880
5881 this._nRounds = nRounds
5882 this._keySchedule = keySchedule
5883 this._invKeySchedule = invKeySchedule
5884}
5885
5886AES.prototype.encryptBlockRaw = function (M) {
5887 M = asUInt32Array(M)
5888 return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)
5889}
5890
5891AES.prototype.encryptBlock = function (M) {
5892 var out = this.encryptBlockRaw(M)
5893 var buf = Buffer.allocUnsafe(16)
5894 buf.writeUInt32BE(out[0], 0)
5895 buf.writeUInt32BE(out[1], 4)
5896 buf.writeUInt32BE(out[2], 8)
5897 buf.writeUInt32BE(out[3], 12)
5898 return buf
5899}
5900
5901AES.prototype.decryptBlock = function (M) {
5902 M = asUInt32Array(M)
5903
5904 // swap
5905 var m1 = M[1]
5906 M[1] = M[3]
5907 M[3] = m1
5908
5909 var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)
5910 var buf = Buffer.allocUnsafe(16)
5911 buf.writeUInt32BE(out[0], 0)
5912 buf.writeUInt32BE(out[3], 4)
5913 buf.writeUInt32BE(out[2], 8)
5914 buf.writeUInt32BE(out[1], 12)
5915 return buf
5916}
5917
5918AES.prototype.scrub = function () {
5919 scrubVec(this._keySchedule)
5920 scrubVec(this._invKeySchedule)
5921 scrubVec(this._key)
5922}
5923
5924module.exports.AES = AES
5925
5926
5927/***/ }),
5928
5929/***/ "./node_modules/browserify-aes/authCipher.js":
5930/*!***************************************************!*\
5931 !*** ./node_modules/browserify-aes/authCipher.js ***!
5932 \***************************************************/
5933/*! no static exports found */
5934/***/ (function(module, exports, __webpack_require__) {
5935
5936var aes = __webpack_require__(/*! ./aes */ "./node_modules/browserify-aes/aes.js")
5937var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
5938var Transform = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
5939var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
5940var GHASH = __webpack_require__(/*! ./ghash */ "./node_modules/browserify-aes/ghash.js")
5941var xor = __webpack_require__(/*! buffer-xor */ "./node_modules/buffer-xor/index.js")
5942var incr32 = __webpack_require__(/*! ./incr32 */ "./node_modules/browserify-aes/incr32.js")
5943
5944function xorTest (a, b) {
5945 var out = 0
5946 if (a.length !== b.length) out++
5947
5948 var len = Math.min(a.length, b.length)
5949 for (var i = 0; i < len; ++i) {
5950 out += (a[i] ^ b[i])
5951 }
5952
5953 return out
5954}
5955
5956function calcIv (self, iv, ck) {
5957 if (iv.length === 12) {
5958 self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])
5959 return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])
5960 }
5961 var ghash = new GHASH(ck)
5962 var len = iv.length
5963 var toPad = len % 16
5964 ghash.update(iv)
5965 if (toPad) {
5966 toPad = 16 - toPad
5967 ghash.update(Buffer.alloc(toPad, 0))
5968 }
5969 ghash.update(Buffer.alloc(8, 0))
5970 var ivBits = len * 8
5971 var tail = Buffer.alloc(8)
5972 tail.writeUIntBE(ivBits, 0, 8)
5973 ghash.update(tail)
5974 self._finID = ghash.state
5975 var out = Buffer.from(self._finID)
5976 incr32(out)
5977 return out
5978}
5979function StreamCipher (mode, key, iv, decrypt) {
5980 Transform.call(this)
5981
5982 var h = Buffer.alloc(4, 0)
5983
5984 this._cipher = new aes.AES(key)
5985 var ck = this._cipher.encryptBlock(h)
5986 this._ghash = new GHASH(ck)
5987 iv = calcIv(this, iv, ck)
5988
5989 this._prev = Buffer.from(iv)
5990 this._cache = Buffer.allocUnsafe(0)
5991 this._secCache = Buffer.allocUnsafe(0)
5992 this._decrypt = decrypt
5993 this._alen = 0
5994 this._len = 0
5995 this._mode = mode
5996
5997 this._authTag = null
5998 this._called = false
5999}
6000
6001inherits(StreamCipher, Transform)
6002
6003StreamCipher.prototype._update = function (chunk) {
6004 if (!this._called && this._alen) {
6005 var rump = 16 - (this._alen % 16)
6006 if (rump < 16) {
6007 rump = Buffer.alloc(rump, 0)
6008 this._ghash.update(rump)
6009 }
6010 }
6011
6012 this._called = true
6013 var out = this._mode.encrypt(this, chunk)
6014 if (this._decrypt) {
6015 this._ghash.update(chunk)
6016 } else {
6017 this._ghash.update(out)
6018 }
6019 this._len += chunk.length
6020 return out
6021}
6022
6023StreamCipher.prototype._final = function () {
6024 if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')
6025
6026 var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))
6027 if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')
6028
6029 this._authTag = tag
6030 this._cipher.scrub()
6031}
6032
6033StreamCipher.prototype.getAuthTag = function getAuthTag () {
6034 if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')
6035
6036 return this._authTag
6037}
6038
6039StreamCipher.prototype.setAuthTag = function setAuthTag (tag) {
6040 if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')
6041
6042 this._authTag = tag
6043}
6044
6045StreamCipher.prototype.setAAD = function setAAD (buf) {
6046 if (this._called) throw new Error('Attempting to set AAD in unsupported state')
6047
6048 this._ghash.update(buf)
6049 this._alen += buf.length
6050}
6051
6052module.exports = StreamCipher
6053
6054
6055/***/ }),
6056
6057/***/ "./node_modules/browserify-aes/browser.js":
6058/*!************************************************!*\
6059 !*** ./node_modules/browserify-aes/browser.js ***!
6060 \************************************************/
6061/*! no static exports found */
6062/***/ (function(module, exports, __webpack_require__) {
6063
6064var ciphers = __webpack_require__(/*! ./encrypter */ "./node_modules/browserify-aes/encrypter.js")
6065var deciphers = __webpack_require__(/*! ./decrypter */ "./node_modules/browserify-aes/decrypter.js")
6066var modes = __webpack_require__(/*! ./modes/list.json */ "./node_modules/browserify-aes/modes/list.json")
6067
6068function getCiphers () {
6069 return Object.keys(modes)
6070}
6071
6072exports.createCipher = exports.Cipher = ciphers.createCipher
6073exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
6074exports.createDecipher = exports.Decipher = deciphers.createDecipher
6075exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv
6076exports.listCiphers = exports.getCiphers = getCiphers
6077
6078
6079/***/ }),
6080
6081/***/ "./node_modules/browserify-aes/decrypter.js":
6082/*!**************************************************!*\
6083 !*** ./node_modules/browserify-aes/decrypter.js ***!
6084 \**************************************************/
6085/*! no static exports found */
6086/***/ (function(module, exports, __webpack_require__) {
6087
6088var AuthCipher = __webpack_require__(/*! ./authCipher */ "./node_modules/browserify-aes/authCipher.js")
6089var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6090var MODES = __webpack_require__(/*! ./modes */ "./node_modules/browserify-aes/modes/index.js")
6091var StreamCipher = __webpack_require__(/*! ./streamCipher */ "./node_modules/browserify-aes/streamCipher.js")
6092var Transform = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
6093var aes = __webpack_require__(/*! ./aes */ "./node_modules/browserify-aes/aes.js")
6094var ebtk = __webpack_require__(/*! evp_bytestokey */ "./node_modules/evp_bytestokey/index.js")
6095var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
6096
6097function Decipher (mode, key, iv) {
6098 Transform.call(this)
6099
6100 this._cache = new Splitter()
6101 this._last = void 0
6102 this._cipher = new aes.AES(key)
6103 this._prev = Buffer.from(iv)
6104 this._mode = mode
6105 this._autopadding = true
6106}
6107
6108inherits(Decipher, Transform)
6109
6110Decipher.prototype._update = function (data) {
6111 this._cache.add(data)
6112 var chunk
6113 var thing
6114 var out = []
6115 while ((chunk = this._cache.get(this._autopadding))) {
6116 thing = this._mode.decrypt(this, chunk)
6117 out.push(thing)
6118 }
6119 return Buffer.concat(out)
6120}
6121
6122Decipher.prototype._final = function () {
6123 var chunk = this._cache.flush()
6124 if (this._autopadding) {
6125 return unpad(this._mode.decrypt(this, chunk))
6126 } else if (chunk) {
6127 throw new Error('data not multiple of block length')
6128 }
6129}
6130
6131Decipher.prototype.setAutoPadding = function (setTo) {
6132 this._autopadding = !!setTo
6133 return this
6134}
6135
6136function Splitter () {
6137 this.cache = Buffer.allocUnsafe(0)
6138}
6139
6140Splitter.prototype.add = function (data) {
6141 this.cache = Buffer.concat([this.cache, data])
6142}
6143
6144Splitter.prototype.get = function (autoPadding) {
6145 var out
6146 if (autoPadding) {
6147 if (this.cache.length > 16) {
6148 out = this.cache.slice(0, 16)
6149 this.cache = this.cache.slice(16)
6150 return out
6151 }
6152 } else {
6153 if (this.cache.length >= 16) {
6154 out = this.cache.slice(0, 16)
6155 this.cache = this.cache.slice(16)
6156 return out
6157 }
6158 }
6159
6160 return null
6161}
6162
6163Splitter.prototype.flush = function () {
6164 if (this.cache.length) return this.cache
6165}
6166
6167function unpad (last) {
6168 var padded = last[15]
6169 if (padded < 1 || padded > 16) {
6170 throw new Error('unable to decrypt data')
6171 }
6172 var i = -1
6173 while (++i < padded) {
6174 if (last[(i + (16 - padded))] !== padded) {
6175 throw new Error('unable to decrypt data')
6176 }
6177 }
6178 if (padded === 16) return
6179
6180 return last.slice(0, 16 - padded)
6181}
6182
6183function createDecipheriv (suite, password, iv) {
6184 var config = MODES[suite.toLowerCase()]
6185 if (!config) throw new TypeError('invalid suite type')
6186
6187 if (typeof iv === 'string') iv = Buffer.from(iv)
6188 if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
6189
6190 if (typeof password === 'string') password = Buffer.from(password)
6191 if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
6192
6193 if (config.type === 'stream') {
6194 return new StreamCipher(config.module, password, iv, true)
6195 } else if (config.type === 'auth') {
6196 return new AuthCipher(config.module, password, iv, true)
6197 }
6198
6199 return new Decipher(config.module, password, iv)
6200}
6201
6202function createDecipher (suite, password) {
6203 var config = MODES[suite.toLowerCase()]
6204 if (!config) throw new TypeError('invalid suite type')
6205
6206 var keys = ebtk(password, false, config.key, config.iv)
6207 return createDecipheriv(suite, keys.key, keys.iv)
6208}
6209
6210exports.createDecipher = createDecipher
6211exports.createDecipheriv = createDecipheriv
6212
6213
6214/***/ }),
6215
6216/***/ "./node_modules/browserify-aes/encrypter.js":
6217/*!**************************************************!*\
6218 !*** ./node_modules/browserify-aes/encrypter.js ***!
6219 \**************************************************/
6220/*! no static exports found */
6221/***/ (function(module, exports, __webpack_require__) {
6222
6223var MODES = __webpack_require__(/*! ./modes */ "./node_modules/browserify-aes/modes/index.js")
6224var AuthCipher = __webpack_require__(/*! ./authCipher */ "./node_modules/browserify-aes/authCipher.js")
6225var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6226var StreamCipher = __webpack_require__(/*! ./streamCipher */ "./node_modules/browserify-aes/streamCipher.js")
6227var Transform = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
6228var aes = __webpack_require__(/*! ./aes */ "./node_modules/browserify-aes/aes.js")
6229var ebtk = __webpack_require__(/*! evp_bytestokey */ "./node_modules/evp_bytestokey/index.js")
6230var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
6231
6232function Cipher (mode, key, iv) {
6233 Transform.call(this)
6234
6235 this._cache = new Splitter()
6236 this._cipher = new aes.AES(key)
6237 this._prev = Buffer.from(iv)
6238 this._mode = mode
6239 this._autopadding = true
6240}
6241
6242inherits(Cipher, Transform)
6243
6244Cipher.prototype._update = function (data) {
6245 this._cache.add(data)
6246 var chunk
6247 var thing
6248 var out = []
6249
6250 while ((chunk = this._cache.get())) {
6251 thing = this._mode.encrypt(this, chunk)
6252 out.push(thing)
6253 }
6254
6255 return Buffer.concat(out)
6256}
6257
6258var PADDING = Buffer.alloc(16, 0x10)
6259
6260Cipher.prototype._final = function () {
6261 var chunk = this._cache.flush()
6262 if (this._autopadding) {
6263 chunk = this._mode.encrypt(this, chunk)
6264 this._cipher.scrub()
6265 return chunk
6266 }
6267
6268 if (!chunk.equals(PADDING)) {
6269 this._cipher.scrub()
6270 throw new Error('data not multiple of block length')
6271 }
6272}
6273
6274Cipher.prototype.setAutoPadding = function (setTo) {
6275 this._autopadding = !!setTo
6276 return this
6277}
6278
6279function Splitter () {
6280 this.cache = Buffer.allocUnsafe(0)
6281}
6282
6283Splitter.prototype.add = function (data) {
6284 this.cache = Buffer.concat([this.cache, data])
6285}
6286
6287Splitter.prototype.get = function () {
6288 if (this.cache.length > 15) {
6289 var out = this.cache.slice(0, 16)
6290 this.cache = this.cache.slice(16)
6291 return out
6292 }
6293 return null
6294}
6295
6296Splitter.prototype.flush = function () {
6297 var len = 16 - this.cache.length
6298 var padBuff = Buffer.allocUnsafe(len)
6299
6300 var i = -1
6301 while (++i < len) {
6302 padBuff.writeUInt8(len, i)
6303 }
6304
6305 return Buffer.concat([this.cache, padBuff])
6306}
6307
6308function createCipheriv (suite, password, iv) {
6309 var config = MODES[suite.toLowerCase()]
6310 if (!config) throw new TypeError('invalid suite type')
6311
6312 if (typeof password === 'string') password = Buffer.from(password)
6313 if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
6314
6315 if (typeof iv === 'string') iv = Buffer.from(iv)
6316 if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
6317
6318 if (config.type === 'stream') {
6319 return new StreamCipher(config.module, password, iv)
6320 } else if (config.type === 'auth') {
6321 return new AuthCipher(config.module, password, iv)
6322 }
6323
6324 return new Cipher(config.module, password, iv)
6325}
6326
6327function createCipher (suite, password) {
6328 var config = MODES[suite.toLowerCase()]
6329 if (!config) throw new TypeError('invalid suite type')
6330
6331 var keys = ebtk(password, false, config.key, config.iv)
6332 return createCipheriv(suite, keys.key, keys.iv)
6333}
6334
6335exports.createCipheriv = createCipheriv
6336exports.createCipher = createCipher
6337
6338
6339/***/ }),
6340
6341/***/ "./node_modules/browserify-aes/ghash.js":
6342/*!**********************************************!*\
6343 !*** ./node_modules/browserify-aes/ghash.js ***!
6344 \**********************************************/
6345/*! no static exports found */
6346/***/ (function(module, exports, __webpack_require__) {
6347
6348var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6349var ZEROES = Buffer.alloc(16, 0)
6350
6351function toArray (buf) {
6352 return [
6353 buf.readUInt32BE(0),
6354 buf.readUInt32BE(4),
6355 buf.readUInt32BE(8),
6356 buf.readUInt32BE(12)
6357 ]
6358}
6359
6360function fromArray (out) {
6361 var buf = Buffer.allocUnsafe(16)
6362 buf.writeUInt32BE(out[0] >>> 0, 0)
6363 buf.writeUInt32BE(out[1] >>> 0, 4)
6364 buf.writeUInt32BE(out[2] >>> 0, 8)
6365 buf.writeUInt32BE(out[3] >>> 0, 12)
6366 return buf
6367}
6368
6369function GHASH (key) {
6370 this.h = key
6371 this.state = Buffer.alloc(16, 0)
6372 this.cache = Buffer.allocUnsafe(0)
6373}
6374
6375// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html
6376// by Juho Vähä-Herttua
6377GHASH.prototype.ghash = function (block) {
6378 var i = -1
6379 while (++i < block.length) {
6380 this.state[i] ^= block[i]
6381 }
6382 this._multiply()
6383}
6384
6385GHASH.prototype._multiply = function () {
6386 var Vi = toArray(this.h)
6387 var Zi = [0, 0, 0, 0]
6388 var j, xi, lsbVi
6389 var i = -1
6390 while (++i < 128) {
6391 xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0
6392 if (xi) {
6393 // Z_i+1 = Z_i ^ V_i
6394 Zi[0] ^= Vi[0]
6395 Zi[1] ^= Vi[1]
6396 Zi[2] ^= Vi[2]
6397 Zi[3] ^= Vi[3]
6398 }
6399
6400 // Store the value of LSB(V_i)
6401 lsbVi = (Vi[3] & 1) !== 0
6402
6403 // V_i+1 = V_i >> 1
6404 for (j = 3; j > 0; j--) {
6405 Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)
6406 }
6407 Vi[0] = Vi[0] >>> 1
6408
6409 // If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R
6410 if (lsbVi) {
6411 Vi[0] = Vi[0] ^ (0xe1 << 24)
6412 }
6413 }
6414 this.state = fromArray(Zi)
6415}
6416
6417GHASH.prototype.update = function (buf) {
6418 this.cache = Buffer.concat([this.cache, buf])
6419 var chunk
6420 while (this.cache.length >= 16) {
6421 chunk = this.cache.slice(0, 16)
6422 this.cache = this.cache.slice(16)
6423 this.ghash(chunk)
6424 }
6425}
6426
6427GHASH.prototype.final = function (abl, bl) {
6428 if (this.cache.length) {
6429 this.ghash(Buffer.concat([this.cache, ZEROES], 16))
6430 }
6431
6432 this.ghash(fromArray([0, abl, 0, bl]))
6433 return this.state
6434}
6435
6436module.exports = GHASH
6437
6438
6439/***/ }),
6440
6441/***/ "./node_modules/browserify-aes/incr32.js":
6442/*!***********************************************!*\
6443 !*** ./node_modules/browserify-aes/incr32.js ***!
6444 \***********************************************/
6445/*! no static exports found */
6446/***/ (function(module, exports) {
6447
6448function incr32 (iv) {
6449 var len = iv.length
6450 var item
6451 while (len--) {
6452 item = iv.readUInt8(len)
6453 if (item === 255) {
6454 iv.writeUInt8(0, len)
6455 } else {
6456 item++
6457 iv.writeUInt8(item, len)
6458 break
6459 }
6460 }
6461}
6462module.exports = incr32
6463
6464
6465/***/ }),
6466
6467/***/ "./node_modules/browserify-aes/modes/cbc.js":
6468/*!**************************************************!*\
6469 !*** ./node_modules/browserify-aes/modes/cbc.js ***!
6470 \**************************************************/
6471/*! no static exports found */
6472/***/ (function(module, exports, __webpack_require__) {
6473
6474var xor = __webpack_require__(/*! buffer-xor */ "./node_modules/buffer-xor/index.js")
6475
6476exports.encrypt = function (self, block) {
6477 var data = xor(block, self._prev)
6478
6479 self._prev = self._cipher.encryptBlock(data)
6480 return self._prev
6481}
6482
6483exports.decrypt = function (self, block) {
6484 var pad = self._prev
6485
6486 self._prev = block
6487 var out = self._cipher.decryptBlock(block)
6488
6489 return xor(out, pad)
6490}
6491
6492
6493/***/ }),
6494
6495/***/ "./node_modules/browserify-aes/modes/cfb.js":
6496/*!**************************************************!*\
6497 !*** ./node_modules/browserify-aes/modes/cfb.js ***!
6498 \**************************************************/
6499/*! no static exports found */
6500/***/ (function(module, exports, __webpack_require__) {
6501
6502var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6503var xor = __webpack_require__(/*! buffer-xor */ "./node_modules/buffer-xor/index.js")
6504
6505function encryptStart (self, data, decrypt) {
6506 var len = data.length
6507 var out = xor(data, self._cache)
6508 self._cache = self._cache.slice(len)
6509 self._prev = Buffer.concat([self._prev, decrypt ? data : out])
6510 return out
6511}
6512
6513exports.encrypt = function (self, data, decrypt) {
6514 var out = Buffer.allocUnsafe(0)
6515 var len
6516
6517 while (data.length) {
6518 if (self._cache.length === 0) {
6519 self._cache = self._cipher.encryptBlock(self._prev)
6520 self._prev = Buffer.allocUnsafe(0)
6521 }
6522
6523 if (self._cache.length <= data.length) {
6524 len = self._cache.length
6525 out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])
6526 data = data.slice(len)
6527 } else {
6528 out = Buffer.concat([out, encryptStart(self, data, decrypt)])
6529 break
6530 }
6531 }
6532
6533 return out
6534}
6535
6536
6537/***/ }),
6538
6539/***/ "./node_modules/browserify-aes/modes/cfb1.js":
6540/*!***************************************************!*\
6541 !*** ./node_modules/browserify-aes/modes/cfb1.js ***!
6542 \***************************************************/
6543/*! no static exports found */
6544/***/ (function(module, exports, __webpack_require__) {
6545
6546var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6547
6548function encryptByte (self, byteParam, decrypt) {
6549 var pad
6550 var i = -1
6551 var len = 8
6552 var out = 0
6553 var bit, value
6554 while (++i < len) {
6555 pad = self._cipher.encryptBlock(self._prev)
6556 bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0
6557 value = pad[0] ^ bit
6558 out += ((value & 0x80) >> (i % 8))
6559 self._prev = shiftIn(self._prev, decrypt ? bit : value)
6560 }
6561 return out
6562}
6563
6564function shiftIn (buffer, value) {
6565 var len = buffer.length
6566 var i = -1
6567 var out = Buffer.allocUnsafe(buffer.length)
6568 buffer = Buffer.concat([buffer, Buffer.from([value])])
6569
6570 while (++i < len) {
6571 out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)
6572 }
6573
6574 return out
6575}
6576
6577exports.encrypt = function (self, chunk, decrypt) {
6578 var len = chunk.length
6579 var out = Buffer.allocUnsafe(len)
6580 var i = -1
6581
6582 while (++i < len) {
6583 out[i] = encryptByte(self, chunk[i], decrypt)
6584 }
6585
6586 return out
6587}
6588
6589
6590/***/ }),
6591
6592/***/ "./node_modules/browserify-aes/modes/cfb8.js":
6593/*!***************************************************!*\
6594 !*** ./node_modules/browserify-aes/modes/cfb8.js ***!
6595 \***************************************************/
6596/*! no static exports found */
6597/***/ (function(module, exports, __webpack_require__) {
6598
6599var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6600
6601function encryptByte (self, byteParam, decrypt) {
6602 var pad = self._cipher.encryptBlock(self._prev)
6603 var out = pad[0] ^ byteParam
6604
6605 self._prev = Buffer.concat([
6606 self._prev.slice(1),
6607 Buffer.from([decrypt ? byteParam : out])
6608 ])
6609
6610 return out
6611}
6612
6613exports.encrypt = function (self, chunk, decrypt) {
6614 var len = chunk.length
6615 var out = Buffer.allocUnsafe(len)
6616 var i = -1
6617
6618 while (++i < len) {
6619 out[i] = encryptByte(self, chunk[i], decrypt)
6620 }
6621
6622 return out
6623}
6624
6625
6626/***/ }),
6627
6628/***/ "./node_modules/browserify-aes/modes/ctr.js":
6629/*!**************************************************!*\
6630 !*** ./node_modules/browserify-aes/modes/ctr.js ***!
6631 \**************************************************/
6632/*! no static exports found */
6633/***/ (function(module, exports, __webpack_require__) {
6634
6635var xor = __webpack_require__(/*! buffer-xor */ "./node_modules/buffer-xor/index.js")
6636var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6637var incr32 = __webpack_require__(/*! ../incr32 */ "./node_modules/browserify-aes/incr32.js")
6638
6639function getBlock (self) {
6640 var out = self._cipher.encryptBlockRaw(self._prev)
6641 incr32(self._prev)
6642 return out
6643}
6644
6645var blockSize = 16
6646exports.encrypt = function (self, chunk) {
6647 var chunkNum = Math.ceil(chunk.length / blockSize)
6648 var start = self._cache.length
6649 self._cache = Buffer.concat([
6650 self._cache,
6651 Buffer.allocUnsafe(chunkNum * blockSize)
6652 ])
6653 for (var i = 0; i < chunkNum; i++) {
6654 var out = getBlock(self)
6655 var offset = start + i * blockSize
6656 self._cache.writeUInt32BE(out[0], offset + 0)
6657 self._cache.writeUInt32BE(out[1], offset + 4)
6658 self._cache.writeUInt32BE(out[2], offset + 8)
6659 self._cache.writeUInt32BE(out[3], offset + 12)
6660 }
6661 var pad = self._cache.slice(0, chunk.length)
6662 self._cache = self._cache.slice(chunk.length)
6663 return xor(chunk, pad)
6664}
6665
6666
6667/***/ }),
6668
6669/***/ "./node_modules/browserify-aes/modes/ecb.js":
6670/*!**************************************************!*\
6671 !*** ./node_modules/browserify-aes/modes/ecb.js ***!
6672 \**************************************************/
6673/*! no static exports found */
6674/***/ (function(module, exports) {
6675
6676exports.encrypt = function (self, block) {
6677 return self._cipher.encryptBlock(block)
6678}
6679
6680exports.decrypt = function (self, block) {
6681 return self._cipher.decryptBlock(block)
6682}
6683
6684
6685/***/ }),
6686
6687/***/ "./node_modules/browserify-aes/modes/index.js":
6688/*!****************************************************!*\
6689 !*** ./node_modules/browserify-aes/modes/index.js ***!
6690 \****************************************************/
6691/*! no static exports found */
6692/***/ (function(module, exports, __webpack_require__) {
6693
6694var modeModules = {
6695 ECB: __webpack_require__(/*! ./ecb */ "./node_modules/browserify-aes/modes/ecb.js"),
6696 CBC: __webpack_require__(/*! ./cbc */ "./node_modules/browserify-aes/modes/cbc.js"),
6697 CFB: __webpack_require__(/*! ./cfb */ "./node_modules/browserify-aes/modes/cfb.js"),
6698 CFB8: __webpack_require__(/*! ./cfb8 */ "./node_modules/browserify-aes/modes/cfb8.js"),
6699 CFB1: __webpack_require__(/*! ./cfb1 */ "./node_modules/browserify-aes/modes/cfb1.js"),
6700 OFB: __webpack_require__(/*! ./ofb */ "./node_modules/browserify-aes/modes/ofb.js"),
6701 CTR: __webpack_require__(/*! ./ctr */ "./node_modules/browserify-aes/modes/ctr.js"),
6702 GCM: __webpack_require__(/*! ./ctr */ "./node_modules/browserify-aes/modes/ctr.js")
6703}
6704
6705var modes = __webpack_require__(/*! ./list.json */ "./node_modules/browserify-aes/modes/list.json")
6706
6707for (var key in modes) {
6708 modes[key].module = modeModules[modes[key].mode]
6709}
6710
6711module.exports = modes
6712
6713
6714/***/ }),
6715
6716/***/ "./node_modules/browserify-aes/modes/list.json":
6717/*!*****************************************************!*\
6718 !*** ./node_modules/browserify-aes/modes/list.json ***!
6719 \*****************************************************/
6720/*! exports provided: aes-128-ecb, aes-192-ecb, aes-256-ecb, aes-128-cbc, aes-192-cbc, aes-256-cbc, aes128, aes192, aes256, aes-128-cfb, aes-192-cfb, aes-256-cfb, aes-128-cfb8, aes-192-cfb8, aes-256-cfb8, aes-128-cfb1, aes-192-cfb1, aes-256-cfb1, aes-128-ofb, aes-192-ofb, aes-256-ofb, aes-128-ctr, aes-192-ctr, aes-256-ctr, aes-128-gcm, aes-192-gcm, aes-256-gcm, default */
6721/***/ (function(module) {
6722
6723module.exports = JSON.parse("{\"aes-128-ecb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-192-ecb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-256-ecb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":0,\"mode\":\"ECB\",\"type\":\"block\"},\"aes-128-cbc\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-192-cbc\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-256-cbc\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes128\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes192\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes256\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CBC\",\"type\":\"block\"},\"aes-128-cfb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-192-cfb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-256-cfb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB\",\"type\":\"stream\"},\"aes-128-cfb8\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-192-cfb8\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-256-cfb8\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB8\",\"type\":\"stream\"},\"aes-128-cfb1\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-192-cfb1\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-256-cfb1\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CFB1\",\"type\":\"stream\"},\"aes-128-ofb\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-192-ofb\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-256-ofb\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"OFB\",\"type\":\"stream\"},\"aes-128-ctr\":{\"cipher\":\"AES\",\"key\":128,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-192-ctr\":{\"cipher\":\"AES\",\"key\":192,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-256-ctr\":{\"cipher\":\"AES\",\"key\":256,\"iv\":16,\"mode\":\"CTR\",\"type\":\"stream\"},\"aes-128-gcm\":{\"cipher\":\"AES\",\"key\":128,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-192-gcm\":{\"cipher\":\"AES\",\"key\":192,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"},\"aes-256-gcm\":{\"cipher\":\"AES\",\"key\":256,\"iv\":12,\"mode\":\"GCM\",\"type\":\"auth\"}}");
6724
6725/***/ }),
6726
6727/***/ "./node_modules/browserify-aes/modes/ofb.js":
6728/*!**************************************************!*\
6729 !*** ./node_modules/browserify-aes/modes/ofb.js ***!
6730 \**************************************************/
6731/*! no static exports found */
6732/***/ (function(module, exports, __webpack_require__) {
6733
6734/* WEBPACK VAR INJECTION */(function(Buffer) {var xor = __webpack_require__(/*! buffer-xor */ "./node_modules/buffer-xor/index.js")
6735
6736function getBlock (self) {
6737 self._prev = self._cipher.encryptBlock(self._prev)
6738 return self._prev
6739}
6740
6741exports.encrypt = function (self, chunk) {
6742 while (self._cache.length < chunk.length) {
6743 self._cache = Buffer.concat([self._cache, getBlock(self)])
6744 }
6745
6746 var pad = self._cache.slice(0, chunk.length)
6747 self._cache = self._cache.slice(chunk.length)
6748 return xor(chunk, pad)
6749}
6750
6751/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
6752
6753/***/ }),
6754
6755/***/ "./node_modules/browserify-aes/streamCipher.js":
6756/*!*****************************************************!*\
6757 !*** ./node_modules/browserify-aes/streamCipher.js ***!
6758 \*****************************************************/
6759/*! no static exports found */
6760/***/ (function(module, exports, __webpack_require__) {
6761
6762var aes = __webpack_require__(/*! ./aes */ "./node_modules/browserify-aes/aes.js")
6763var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6764var Transform = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
6765var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
6766
6767function StreamCipher (mode, key, iv, decrypt) {
6768 Transform.call(this)
6769
6770 this._cipher = new aes.AES(key)
6771 this._prev = Buffer.from(iv)
6772 this._cache = Buffer.allocUnsafe(0)
6773 this._secCache = Buffer.allocUnsafe(0)
6774 this._decrypt = decrypt
6775 this._mode = mode
6776}
6777
6778inherits(StreamCipher, Transform)
6779
6780StreamCipher.prototype._update = function (chunk) {
6781 return this._mode.encrypt(this, chunk, this._decrypt)
6782}
6783
6784StreamCipher.prototype._final = function () {
6785 this._cipher.scrub()
6786}
6787
6788module.exports = StreamCipher
6789
6790
6791/***/ }),
6792
6793/***/ "./node_modules/browserify-cipher/browser.js":
6794/*!***************************************************!*\
6795 !*** ./node_modules/browserify-cipher/browser.js ***!
6796 \***************************************************/
6797/*! no static exports found */
6798/***/ (function(module, exports, __webpack_require__) {
6799
6800var DES = __webpack_require__(/*! browserify-des */ "./node_modules/browserify-des/index.js")
6801var aes = __webpack_require__(/*! browserify-aes/browser */ "./node_modules/browserify-aes/browser.js")
6802var aesModes = __webpack_require__(/*! browserify-aes/modes */ "./node_modules/browserify-aes/modes/index.js")
6803var desModes = __webpack_require__(/*! browserify-des/modes */ "./node_modules/browserify-des/modes.js")
6804var ebtk = __webpack_require__(/*! evp_bytestokey */ "./node_modules/evp_bytestokey/index.js")
6805
6806function createCipher (suite, password) {
6807 suite = suite.toLowerCase()
6808
6809 var keyLen, ivLen
6810 if (aesModes[suite]) {
6811 keyLen = aesModes[suite].key
6812 ivLen = aesModes[suite].iv
6813 } else if (desModes[suite]) {
6814 keyLen = desModes[suite].key * 8
6815 ivLen = desModes[suite].iv
6816 } else {
6817 throw new TypeError('invalid suite type')
6818 }
6819
6820 var keys = ebtk(password, false, keyLen, ivLen)
6821 return createCipheriv(suite, keys.key, keys.iv)
6822}
6823
6824function createDecipher (suite, password) {
6825 suite = suite.toLowerCase()
6826
6827 var keyLen, ivLen
6828 if (aesModes[suite]) {
6829 keyLen = aesModes[suite].key
6830 ivLen = aesModes[suite].iv
6831 } else if (desModes[suite]) {
6832 keyLen = desModes[suite].key * 8
6833 ivLen = desModes[suite].iv
6834 } else {
6835 throw new TypeError('invalid suite type')
6836 }
6837
6838 var keys = ebtk(password, false, keyLen, ivLen)
6839 return createDecipheriv(suite, keys.key, keys.iv)
6840}
6841
6842function createCipheriv (suite, key, iv) {
6843 suite = suite.toLowerCase()
6844 if (aesModes[suite]) return aes.createCipheriv(suite, key, iv)
6845 if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite })
6846
6847 throw new TypeError('invalid suite type')
6848}
6849
6850function createDecipheriv (suite, key, iv) {
6851 suite = suite.toLowerCase()
6852 if (aesModes[suite]) return aes.createDecipheriv(suite, key, iv)
6853 if (desModes[suite]) return new DES({ key: key, iv: iv, mode: suite, decrypt: true })
6854
6855 throw new TypeError('invalid suite type')
6856}
6857
6858function getCiphers () {
6859 return Object.keys(desModes).concat(aes.getCiphers())
6860}
6861
6862exports.createCipher = exports.Cipher = createCipher
6863exports.createCipheriv = exports.Cipheriv = createCipheriv
6864exports.createDecipher = exports.Decipher = createDecipher
6865exports.createDecipheriv = exports.Decipheriv = createDecipheriv
6866exports.listCiphers = exports.getCiphers = getCiphers
6867
6868
6869/***/ }),
6870
6871/***/ "./node_modules/browserify-des/index.js":
6872/*!**********************************************!*\
6873 !*** ./node_modules/browserify-des/index.js ***!
6874 \**********************************************/
6875/*! no static exports found */
6876/***/ (function(module, exports, __webpack_require__) {
6877
6878var CipherBase = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
6879var des = __webpack_require__(/*! des.js */ "./node_modules/des.js/lib/des.js")
6880var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
6881var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
6882
6883var modes = {
6884 'des-ede3-cbc': des.CBC.instantiate(des.EDE),
6885 'des-ede3': des.EDE,
6886 'des-ede-cbc': des.CBC.instantiate(des.EDE),
6887 'des-ede': des.EDE,
6888 'des-cbc': des.CBC.instantiate(des.DES),
6889 'des-ecb': des.DES
6890}
6891modes.des = modes['des-cbc']
6892modes.des3 = modes['des-ede3-cbc']
6893module.exports = DES
6894inherits(DES, CipherBase)
6895function DES (opts) {
6896 CipherBase.call(this)
6897 var modeName = opts.mode.toLowerCase()
6898 var mode = modes[modeName]
6899 var type
6900 if (opts.decrypt) {
6901 type = 'decrypt'
6902 } else {
6903 type = 'encrypt'
6904 }
6905 var key = opts.key
6906 if (!Buffer.isBuffer(key)) {
6907 key = Buffer.from(key)
6908 }
6909 if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {
6910 key = Buffer.concat([key, key.slice(0, 8)])
6911 }
6912 var iv = opts.iv
6913 if (!Buffer.isBuffer(iv)) {
6914 iv = Buffer.from(iv)
6915 }
6916 this._des = mode.create({
6917 key: key,
6918 iv: iv,
6919 type: type
6920 })
6921}
6922DES.prototype._update = function (data) {
6923 return Buffer.from(this._des.update(data))
6924}
6925DES.prototype._final = function () {
6926 return Buffer.from(this._des.final())
6927}
6928
6929
6930/***/ }),
6931
6932/***/ "./node_modules/browserify-des/modes.js":
6933/*!**********************************************!*\
6934 !*** ./node_modules/browserify-des/modes.js ***!
6935 \**********************************************/
6936/*! no static exports found */
6937/***/ (function(module, exports) {
6938
6939exports['des-ecb'] = {
6940 key: 8,
6941 iv: 0
6942}
6943exports['des-cbc'] = exports.des = {
6944 key: 8,
6945 iv: 8
6946}
6947exports['des-ede3-cbc'] = exports.des3 = {
6948 key: 24,
6949 iv: 8
6950}
6951exports['des-ede3'] = {
6952 key: 24,
6953 iv: 0
6954}
6955exports['des-ede-cbc'] = {
6956 key: 16,
6957 iv: 8
6958}
6959exports['des-ede'] = {
6960 key: 16,
6961 iv: 0
6962}
6963
6964
6965/***/ }),
6966
6967/***/ "./node_modules/browserify-rsa/index.js":
6968/*!**********************************************!*\
6969 !*** ./node_modules/browserify-rsa/index.js ***!
6970 \**********************************************/
6971/*! no static exports found */
6972/***/ (function(module, exports, __webpack_require__) {
6973
6974/* WEBPACK VAR INJECTION */(function(Buffer) {var bn = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
6975var randomBytes = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js");
6976module.exports = crt;
6977function blind(priv) {
6978 var r = getr(priv);
6979 var blinder = r.toRed(bn.mont(priv.modulus))
6980 .redPow(new bn(priv.publicExponent)).fromRed();
6981 return {
6982 blinder: blinder,
6983 unblinder:r.invm(priv.modulus)
6984 };
6985}
6986function crt(msg, priv) {
6987 var blinds = blind(priv);
6988 var len = priv.modulus.byteLength();
6989 var mod = bn.mont(priv.modulus);
6990 var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus);
6991 var c1 = blinded.toRed(bn.mont(priv.prime1));
6992 var c2 = blinded.toRed(bn.mont(priv.prime2));
6993 var qinv = priv.coefficient;
6994 var p = priv.prime1;
6995 var q = priv.prime2;
6996 var m1 = c1.redPow(priv.exponent1);
6997 var m2 = c2.redPow(priv.exponent2);
6998 m1 = m1.fromRed();
6999 m2 = m2.fromRed();
7000 var h = m1.isub(m2).imul(qinv).umod(p);
7001 h.imul(q);
7002 m2.iadd(h);
7003 return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len));
7004}
7005crt.getr = getr;
7006function getr(priv) {
7007 var len = priv.modulus.byteLength();
7008 var r = new bn(randomBytes(len));
7009 while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) {
7010 r = new bn(randomBytes(len));
7011 }
7012 return r;
7013}
7014
7015/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
7016
7017/***/ }),
7018
7019/***/ "./node_modules/browserify-sign/algos.js":
7020/*!***********************************************!*\
7021 !*** ./node_modules/browserify-sign/algos.js ***!
7022 \***********************************************/
7023/*! no static exports found */
7024/***/ (function(module, exports, __webpack_require__) {
7025
7026module.exports = __webpack_require__(/*! ./browser/algorithms.json */ "./node_modules/browserify-sign/browser/algorithms.json")
7027
7028
7029/***/ }),
7030
7031/***/ "./node_modules/browserify-sign/browser/algorithms.json":
7032/*!**************************************************************!*\
7033 !*** ./node_modules/browserify-sign/browser/algorithms.json ***!
7034 \**************************************************************/
7035/*! exports provided: sha224WithRSAEncryption, RSA-SHA224, sha256WithRSAEncryption, RSA-SHA256, sha384WithRSAEncryption, RSA-SHA384, sha512WithRSAEncryption, RSA-SHA512, RSA-SHA1, ecdsa-with-SHA1, sha256, sha224, sha384, sha512, DSA-SHA, DSA-SHA1, DSA, DSA-WITH-SHA224, DSA-SHA224, DSA-WITH-SHA256, DSA-SHA256, DSA-WITH-SHA384, DSA-SHA384, DSA-WITH-SHA512, DSA-SHA512, DSA-RIPEMD160, ripemd160WithRSA, RSA-RIPEMD160, md5WithRSAEncryption, RSA-MD5, default */
7036/***/ (function(module) {
7037
7038module.exports = JSON.parse("{\"sha224WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"RSA-SHA224\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha224\",\"id\":\"302d300d06096086480165030402040500041c\"},\"sha256WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"RSA-SHA256\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha256\",\"id\":\"3031300d060960864801650304020105000420\"},\"sha384WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"RSA-SHA384\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha384\",\"id\":\"3041300d060960864801650304020205000430\"},\"sha512WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA512\":{\"sign\":\"ecdsa/rsa\",\"hash\":\"sha512\",\"id\":\"3051300d060960864801650304020305000440\"},\"RSA-SHA1\":{\"sign\":\"rsa\",\"hash\":\"sha1\",\"id\":\"3021300906052b0e03021a05000414\"},\"ecdsa-with-SHA1\":{\"sign\":\"ecdsa\",\"hash\":\"sha1\",\"id\":\"\"},\"sha256\":{\"sign\":\"ecdsa\",\"hash\":\"sha256\",\"id\":\"\"},\"sha224\":{\"sign\":\"ecdsa\",\"hash\":\"sha224\",\"id\":\"\"},\"sha384\":{\"sign\":\"ecdsa\",\"hash\":\"sha384\",\"id\":\"\"},\"sha512\":{\"sign\":\"ecdsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-SHA1\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA\":{\"sign\":\"dsa\",\"hash\":\"sha1\",\"id\":\"\"},\"DSA-WITH-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-SHA224\":{\"sign\":\"dsa\",\"hash\":\"sha224\",\"id\":\"\"},\"DSA-WITH-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-SHA256\":{\"sign\":\"dsa\",\"hash\":\"sha256\",\"id\":\"\"},\"DSA-WITH-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-SHA384\":{\"sign\":\"dsa\",\"hash\":\"sha384\",\"id\":\"\"},\"DSA-WITH-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-SHA512\":{\"sign\":\"dsa\",\"hash\":\"sha512\",\"id\":\"\"},\"DSA-RIPEMD160\":{\"sign\":\"dsa\",\"hash\":\"rmd160\",\"id\":\"\"},\"ripemd160WithRSA\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"RSA-RIPEMD160\":{\"sign\":\"rsa\",\"hash\":\"rmd160\",\"id\":\"3021300906052b2403020105000414\"},\"md5WithRSAEncryption\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"},\"RSA-MD5\":{\"sign\":\"rsa\",\"hash\":\"md5\",\"id\":\"3020300c06082a864886f70d020505000410\"}}");
7039
7040/***/ }),
7041
7042/***/ "./node_modules/browserify-sign/browser/curves.json":
7043/*!**********************************************************!*\
7044 !*** ./node_modules/browserify-sign/browser/curves.json ***!
7045 \**********************************************************/
7046/*! exports provided: 1.3.132.0.10, 1.3.132.0.33, 1.2.840.10045.3.1.1, 1.2.840.10045.3.1.7, 1.3.132.0.34, 1.3.132.0.35, default */
7047/***/ (function(module) {
7048
7049module.exports = JSON.parse("{\"1.3.132.0.10\":\"secp256k1\",\"1.3.132.0.33\":\"p224\",\"1.2.840.10045.3.1.1\":\"p192\",\"1.2.840.10045.3.1.7\":\"p256\",\"1.3.132.0.34\":\"p384\",\"1.3.132.0.35\":\"p521\"}");
7050
7051/***/ }),
7052
7053/***/ "./node_modules/browserify-sign/browser/index.js":
7054/*!*******************************************************!*\
7055 !*** ./node_modules/browserify-sign/browser/index.js ***!
7056 \*******************************************************/
7057/*! no static exports found */
7058/***/ (function(module, exports, __webpack_require__) {
7059
7060/* WEBPACK VAR INJECTION */(function(Buffer) {var createHash = __webpack_require__(/*! create-hash */ "./node_modules/create-hash/browser.js")
7061var stream = __webpack_require__(/*! stream */ "./node_modules/stream-browserify/index.js")
7062var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
7063var sign = __webpack_require__(/*! ./sign */ "./node_modules/browserify-sign/browser/sign.js")
7064var verify = __webpack_require__(/*! ./verify */ "./node_modules/browserify-sign/browser/verify.js")
7065
7066var algorithms = __webpack_require__(/*! ./algorithms.json */ "./node_modules/browserify-sign/browser/algorithms.json")
7067Object.keys(algorithms).forEach(function (key) {
7068 algorithms[key].id = new Buffer(algorithms[key].id, 'hex')
7069 algorithms[key.toLowerCase()] = algorithms[key]
7070})
7071
7072function Sign (algorithm) {
7073 stream.Writable.call(this)
7074
7075 var data = algorithms[algorithm]
7076 if (!data) throw new Error('Unknown message digest')
7077
7078 this._hashType = data.hash
7079 this._hash = createHash(data.hash)
7080 this._tag = data.id
7081 this._signType = data.sign
7082}
7083inherits(Sign, stream.Writable)
7084
7085Sign.prototype._write = function _write (data, _, done) {
7086 this._hash.update(data)
7087 done()
7088}
7089
7090Sign.prototype.update = function update (data, enc) {
7091 if (typeof data === 'string') data = new Buffer(data, enc)
7092
7093 this._hash.update(data)
7094 return this
7095}
7096
7097Sign.prototype.sign = function signMethod (key, enc) {
7098 this.end()
7099 var hash = this._hash.digest()
7100 var sig = sign(hash, key, this._hashType, this._signType, this._tag)
7101
7102 return enc ? sig.toString(enc) : sig
7103}
7104
7105function Verify (algorithm) {
7106 stream.Writable.call(this)
7107
7108 var data = algorithms[algorithm]
7109 if (!data) throw new Error('Unknown message digest')
7110
7111 this._hash = createHash(data.hash)
7112 this._tag = data.id
7113 this._signType = data.sign
7114}
7115inherits(Verify, stream.Writable)
7116
7117Verify.prototype._write = function _write (data, _, done) {
7118 this._hash.update(data)
7119 done()
7120}
7121
7122Verify.prototype.update = function update (data, enc) {
7123 if (typeof data === 'string') data = new Buffer(data, enc)
7124
7125 this._hash.update(data)
7126 return this
7127}
7128
7129Verify.prototype.verify = function verifyMethod (key, sig, enc) {
7130 if (typeof sig === 'string') sig = new Buffer(sig, enc)
7131
7132 this.end()
7133 var hash = this._hash.digest()
7134 return verify(sig, hash, key, this._signType, this._tag)
7135}
7136
7137function createSign (algorithm) {
7138 return new Sign(algorithm)
7139}
7140
7141function createVerify (algorithm) {
7142 return new Verify(algorithm)
7143}
7144
7145module.exports = {
7146 Sign: createSign,
7147 Verify: createVerify,
7148 createSign: createSign,
7149 createVerify: createVerify
7150}
7151
7152/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
7153
7154/***/ }),
7155
7156/***/ "./node_modules/browserify-sign/browser/sign.js":
7157/*!******************************************************!*\
7158 !*** ./node_modules/browserify-sign/browser/sign.js ***!
7159 \******************************************************/
7160/*! no static exports found */
7161/***/ (function(module, exports, __webpack_require__) {
7162
7163/* WEBPACK VAR INJECTION */(function(Buffer) {// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
7164var createHmac = __webpack_require__(/*! create-hmac */ "./node_modules/create-hmac/browser.js")
7165var crt = __webpack_require__(/*! browserify-rsa */ "./node_modules/browserify-rsa/index.js")
7166var EC = __webpack_require__(/*! elliptic */ "./node_modules/elliptic/lib/elliptic.js").ec
7167var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
7168var parseKeys = __webpack_require__(/*! parse-asn1 */ "./node_modules/parse-asn1/index.js")
7169var curves = __webpack_require__(/*! ./curves.json */ "./node_modules/browserify-sign/browser/curves.json")
7170
7171function sign (hash, key, hashType, signType, tag) {
7172 var priv = parseKeys(key)
7173 if (priv.curve) {
7174 // rsa keys can be interpreted as ecdsa ones in openssl
7175 if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
7176 return ecSign(hash, priv)
7177 } else if (priv.type === 'dsa') {
7178 if (signType !== 'dsa') throw new Error('wrong private key type')
7179 return dsaSign(hash, priv, hashType)
7180 } else {
7181 if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
7182 }
7183 hash = Buffer.concat([tag, hash])
7184 var len = priv.modulus.byteLength()
7185 var pad = [ 0, 1 ]
7186 while (hash.length + pad.length + 1 < len) pad.push(0xff)
7187 pad.push(0x00)
7188 var i = -1
7189 while (++i < hash.length) pad.push(hash[i])
7190
7191 var out = crt(pad, priv)
7192 return out
7193}
7194
7195function ecSign (hash, priv) {
7196 var curveId = curves[priv.curve.join('.')]
7197 if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.'))
7198
7199 var curve = new EC(curveId)
7200 var key = curve.keyFromPrivate(priv.privateKey)
7201 var out = key.sign(hash)
7202
7203 return new Buffer(out.toDER())
7204}
7205
7206function dsaSign (hash, priv, algo) {
7207 var x = priv.params.priv_key
7208 var p = priv.params.p
7209 var q = priv.params.q
7210 var g = priv.params.g
7211 var r = new BN(0)
7212 var k
7213 var H = bits2int(hash, q).mod(q)
7214 var s = false
7215 var kv = getKey(x, q, hash, algo)
7216 while (s === false) {
7217 k = makeKey(q, kv, algo)
7218 r = makeR(g, k, p, q)
7219 s = k.invm(q).imul(H.add(x.mul(r))).mod(q)
7220 if (s.cmpn(0) === 0) {
7221 s = false
7222 r = new BN(0)
7223 }
7224 }
7225 return toDER(r, s)
7226}
7227
7228function toDER (r, s) {
7229 r = r.toArray()
7230 s = s.toArray()
7231
7232 // Pad values
7233 if (r[0] & 0x80) r = [ 0 ].concat(r)
7234 if (s[0] & 0x80) s = [ 0 ].concat(s)
7235
7236 var total = r.length + s.length + 4
7237 var res = [ 0x30, total, 0x02, r.length ]
7238 res = res.concat(r, [ 0x02, s.length ], s)
7239 return new Buffer(res)
7240}
7241
7242function getKey (x, q, hash, algo) {
7243 x = new Buffer(x.toArray())
7244 if (x.length < q.byteLength()) {
7245 var zeros = new Buffer(q.byteLength() - x.length)
7246 zeros.fill(0)
7247 x = Buffer.concat([ zeros, x ])
7248 }
7249 var hlen = hash.length
7250 var hbits = bits2octets(hash, q)
7251 var v = new Buffer(hlen)
7252 v.fill(1)
7253 var k = new Buffer(hlen)
7254 k.fill(0)
7255 k = createHmac(algo, k).update(v).update(new Buffer([ 0 ])).update(x).update(hbits).digest()
7256 v = createHmac(algo, k).update(v).digest()
7257 k = createHmac(algo, k).update(v).update(new Buffer([ 1 ])).update(x).update(hbits).digest()
7258 v = createHmac(algo, k).update(v).digest()
7259 return { k: k, v: v }
7260}
7261
7262function bits2int (obits, q) {
7263 var bits = new BN(obits)
7264 var shift = (obits.length << 3) - q.bitLength()
7265 if (shift > 0) bits.ishrn(shift)
7266 return bits
7267}
7268
7269function bits2octets (bits, q) {
7270 bits = bits2int(bits, q)
7271 bits = bits.mod(q)
7272 var out = new Buffer(bits.toArray())
7273 if (out.length < q.byteLength()) {
7274 var zeros = new Buffer(q.byteLength() - out.length)
7275 zeros.fill(0)
7276 out = Buffer.concat([ zeros, out ])
7277 }
7278 return out
7279}
7280
7281function makeKey (q, kv, algo) {
7282 var t
7283 var k
7284
7285 do {
7286 t = new Buffer(0)
7287
7288 while (t.length * 8 < q.bitLength()) {
7289 kv.v = createHmac(algo, kv.k).update(kv.v).digest()
7290 t = Buffer.concat([ t, kv.v ])
7291 }
7292
7293 k = bits2int(t, q)
7294 kv.k = createHmac(algo, kv.k).update(kv.v).update(new Buffer([ 0 ])).digest()
7295 kv.v = createHmac(algo, kv.k).update(kv.v).digest()
7296 } while (k.cmp(q) !== -1)
7297
7298 return k
7299}
7300
7301function makeR (g, k, p, q) {
7302 return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)
7303}
7304
7305module.exports = sign
7306module.exports.getKey = getKey
7307module.exports.makeKey = makeKey
7308
7309/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
7310
7311/***/ }),
7312
7313/***/ "./node_modules/browserify-sign/browser/verify.js":
7314/*!********************************************************!*\
7315 !*** ./node_modules/browserify-sign/browser/verify.js ***!
7316 \********************************************************/
7317/*! no static exports found */
7318/***/ (function(module, exports, __webpack_require__) {
7319
7320/* WEBPACK VAR INJECTION */(function(Buffer) {// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
7321var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
7322var EC = __webpack_require__(/*! elliptic */ "./node_modules/elliptic/lib/elliptic.js").ec
7323var parseKeys = __webpack_require__(/*! parse-asn1 */ "./node_modules/parse-asn1/index.js")
7324var curves = __webpack_require__(/*! ./curves.json */ "./node_modules/browserify-sign/browser/curves.json")
7325
7326function verify (sig, hash, key, signType, tag) {
7327 var pub = parseKeys(key)
7328 if (pub.type === 'ec') {
7329 // rsa keys can be interpreted as ecdsa ones in openssl
7330 if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
7331 return ecVerify(sig, hash, pub)
7332 } else if (pub.type === 'dsa') {
7333 if (signType !== 'dsa') throw new Error('wrong public key type')
7334 return dsaVerify(sig, hash, pub)
7335 } else {
7336 if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
7337 }
7338 hash = Buffer.concat([tag, hash])
7339 var len = pub.modulus.byteLength()
7340 var pad = [ 1 ]
7341 var padNum = 0
7342 while (hash.length + pad.length + 2 < len) {
7343 pad.push(0xff)
7344 padNum++
7345 }
7346 pad.push(0x00)
7347 var i = -1
7348 while (++i < hash.length) {
7349 pad.push(hash[i])
7350 }
7351 pad = new Buffer(pad)
7352 var red = BN.mont(pub.modulus)
7353 sig = new BN(sig).toRed(red)
7354
7355 sig = sig.redPow(new BN(pub.publicExponent))
7356 sig = new Buffer(sig.fromRed().toArray())
7357 var out = padNum < 8 ? 1 : 0
7358 len = Math.min(sig.length, pad.length)
7359 if (sig.length !== pad.length) out = 1
7360
7361 i = -1
7362 while (++i < len) out |= sig[i] ^ pad[i]
7363 return out === 0
7364}
7365
7366function ecVerify (sig, hash, pub) {
7367 var curveId = curves[pub.data.algorithm.curve.join('.')]
7368 if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.'))
7369
7370 var curve = new EC(curveId)
7371 var pubkey = pub.data.subjectPrivateKey.data
7372
7373 return curve.verify(hash, sig, pubkey)
7374}
7375
7376function dsaVerify (sig, hash, pub) {
7377 var p = pub.data.p
7378 var q = pub.data.q
7379 var g = pub.data.g
7380 var y = pub.data.pub_key
7381 var unpacked = parseKeys.signature.decode(sig, 'der')
7382 var s = unpacked.s
7383 var r = unpacked.r
7384 checkValue(s, q)
7385 checkValue(r, q)
7386 var montp = BN.mont(p)
7387 var w = s.invm(q)
7388 var v = g.toRed(montp)
7389 .redPow(new BN(hash).mul(w).mod(q))
7390 .fromRed()
7391 .mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())
7392 .mod(p)
7393 .mod(q)
7394 return v.cmp(r) === 0
7395}
7396
7397function checkValue (b, q) {
7398 if (b.cmpn(0) <= 0) throw new Error('invalid sig')
7399 if (b.cmp(q) >= q) throw new Error('invalid sig')
7400}
7401
7402module.exports = verify
7403
7404/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
7405
7406/***/ }),
7407
7408/***/ "./node_modules/buffer-xor/index.js":
7409/*!******************************************!*\
7410 !*** ./node_modules/buffer-xor/index.js ***!
7411 \******************************************/
7412/*! no static exports found */
7413/***/ (function(module, exports, __webpack_require__) {
7414
7415/* WEBPACK VAR INJECTION */(function(Buffer) {module.exports = function xor (a, b) {
7416 var length = Math.min(a.length, b.length)
7417 var buffer = new Buffer(length)
7418
7419 for (var i = 0; i < length; ++i) {
7420 buffer[i] = a[i] ^ b[i]
7421 }
7422
7423 return buffer
7424}
7425
7426/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
7427
7428/***/ }),
7429
7430/***/ "./node_modules/buffer/index.js":
7431/*!**************************************!*\
7432 !*** ./node_modules/buffer/index.js ***!
7433 \**************************************/
7434/*! no static exports found */
7435/***/ (function(module, exports, __webpack_require__) {
7436
7437"use strict";
7438/* WEBPACK VAR INJECTION */(function(global) {/*!
7439 * The buffer module from node.js, for the browser.
7440 *
7441 * @author Feross Aboukhadijeh <http://feross.org>
7442 * @license MIT
7443 */
7444/* eslint-disable no-proto */
7445
7446
7447
7448var base64 = __webpack_require__(/*! base64-js */ "./node_modules/base64-js/index.js")
7449var ieee754 = __webpack_require__(/*! ieee754 */ "./node_modules/ieee754/index.js")
7450var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js")
7451
7452exports.Buffer = Buffer
7453exports.SlowBuffer = SlowBuffer
7454exports.INSPECT_MAX_BYTES = 50
7455
7456/**
7457 * If `Buffer.TYPED_ARRAY_SUPPORT`:
7458 * === true Use Uint8Array implementation (fastest)
7459 * === false Use Object implementation (most compatible, even IE6)
7460 *
7461 * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
7462 * Opera 11.6+, iOS 4.2+.
7463 *
7464 * Due to various browser bugs, sometimes the Object implementation will be used even
7465 * when the browser supports typed arrays.
7466 *
7467 * Note:
7468 *
7469 * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
7470 * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
7471 *
7472 * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
7473 *
7474 * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
7475 * incorrect length in some situations.
7476
7477 * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
7478 * get the Object implementation, which is slower but behaves correctly.
7479 */
7480Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
7481 ? global.TYPED_ARRAY_SUPPORT
7482 : typedArraySupport()
7483
7484/*
7485 * Export kMaxLength after typed array support is determined.
7486 */
7487exports.kMaxLength = kMaxLength()
7488
7489function typedArraySupport () {
7490 try {
7491 var arr = new Uint8Array(1)
7492 arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
7493 return arr.foo() === 42 && // typed array instances can be augmented
7494 typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
7495 arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
7496 } catch (e) {
7497 return false
7498 }
7499}
7500
7501function kMaxLength () {
7502 return Buffer.TYPED_ARRAY_SUPPORT
7503 ? 0x7fffffff
7504 : 0x3fffffff
7505}
7506
7507function createBuffer (that, length) {
7508 if (kMaxLength() < length) {
7509 throw new RangeError('Invalid typed array length')
7510 }
7511 if (Buffer.TYPED_ARRAY_SUPPORT) {
7512 // Return an augmented `Uint8Array` instance, for best performance
7513 that = new Uint8Array(length)
7514 that.__proto__ = Buffer.prototype
7515 } else {
7516 // Fallback: Return an object instance of the Buffer class
7517 if (that === null) {
7518 that = new Buffer(length)
7519 }
7520 that.length = length
7521 }
7522
7523 return that
7524}
7525
7526/**
7527 * The Buffer constructor returns instances of `Uint8Array` that have their
7528 * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
7529 * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
7530 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
7531 * returns a single octet.
7532 *
7533 * The `Uint8Array` prototype remains unmodified.
7534 */
7535
7536function Buffer (arg, encodingOrOffset, length) {
7537 if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
7538 return new Buffer(arg, encodingOrOffset, length)
7539 }
7540
7541 // Common case.
7542 if (typeof arg === 'number') {
7543 if (typeof encodingOrOffset === 'string') {
7544 throw new Error(
7545 'If encoding is specified then the first argument must be a string'
7546 )
7547 }
7548 return allocUnsafe(this, arg)
7549 }
7550 return from(this, arg, encodingOrOffset, length)
7551}
7552
7553Buffer.poolSize = 8192 // not used by this implementation
7554
7555// TODO: Legacy, not needed anymore. Remove in next major version.
7556Buffer._augment = function (arr) {
7557 arr.__proto__ = Buffer.prototype
7558 return arr
7559}
7560
7561function from (that, value, encodingOrOffset, length) {
7562 if (typeof value === 'number') {
7563 throw new TypeError('"value" argument must not be a number')
7564 }
7565
7566 if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
7567 return fromArrayBuffer(that, value, encodingOrOffset, length)
7568 }
7569
7570 if (typeof value === 'string') {
7571 return fromString(that, value, encodingOrOffset)
7572 }
7573
7574 return fromObject(that, value)
7575}
7576
7577/**
7578 * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
7579 * if value is a number.
7580 * Buffer.from(str[, encoding])
7581 * Buffer.from(array)
7582 * Buffer.from(buffer)
7583 * Buffer.from(arrayBuffer[, byteOffset[, length]])
7584 **/
7585Buffer.from = function (value, encodingOrOffset, length) {
7586 return from(null, value, encodingOrOffset, length)
7587}
7588
7589if (Buffer.TYPED_ARRAY_SUPPORT) {
7590 Buffer.prototype.__proto__ = Uint8Array.prototype
7591 Buffer.__proto__ = Uint8Array
7592 if (typeof Symbol !== 'undefined' && Symbol.species &&
7593 Buffer[Symbol.species] === Buffer) {
7594 // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
7595 Object.defineProperty(Buffer, Symbol.species, {
7596 value: null,
7597 configurable: true
7598 })
7599 }
7600}
7601
7602function assertSize (size) {
7603 if (typeof size !== 'number') {
7604 throw new TypeError('"size" argument must be a number')
7605 } else if (size < 0) {
7606 throw new RangeError('"size" argument must not be negative')
7607 }
7608}
7609
7610function alloc (that, size, fill, encoding) {
7611 assertSize(size)
7612 if (size <= 0) {
7613 return createBuffer(that, size)
7614 }
7615 if (fill !== undefined) {
7616 // Only pay attention to encoding if it's a string. This
7617 // prevents accidentally sending in a number that would
7618 // be interpretted as a start offset.
7619 return typeof encoding === 'string'
7620 ? createBuffer(that, size).fill(fill, encoding)
7621 : createBuffer(that, size).fill(fill)
7622 }
7623 return createBuffer(that, size)
7624}
7625
7626/**
7627 * Creates a new filled Buffer instance.
7628 * alloc(size[, fill[, encoding]])
7629 **/
7630Buffer.alloc = function (size, fill, encoding) {
7631 return alloc(null, size, fill, encoding)
7632}
7633
7634function allocUnsafe (that, size) {
7635 assertSize(size)
7636 that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
7637 if (!Buffer.TYPED_ARRAY_SUPPORT) {
7638 for (var i = 0; i < size; ++i) {
7639 that[i] = 0
7640 }
7641 }
7642 return that
7643}
7644
7645/**
7646 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
7647 * */
7648Buffer.allocUnsafe = function (size) {
7649 return allocUnsafe(null, size)
7650}
7651/**
7652 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
7653 */
7654Buffer.allocUnsafeSlow = function (size) {
7655 return allocUnsafe(null, size)
7656}
7657
7658function fromString (that, string, encoding) {
7659 if (typeof encoding !== 'string' || encoding === '') {
7660 encoding = 'utf8'
7661 }
7662
7663 if (!Buffer.isEncoding(encoding)) {
7664 throw new TypeError('"encoding" must be a valid string encoding')
7665 }
7666
7667 var length = byteLength(string, encoding) | 0
7668 that = createBuffer(that, length)
7669
7670 var actual = that.write(string, encoding)
7671
7672 if (actual !== length) {
7673 // Writing a hex string, for example, that contains invalid characters will
7674 // cause everything after the first invalid character to be ignored. (e.g.
7675 // 'abxxcd' will be treated as 'ab')
7676 that = that.slice(0, actual)
7677 }
7678
7679 return that
7680}
7681
7682function fromArrayLike (that, array) {
7683 var length = array.length < 0 ? 0 : checked(array.length) | 0
7684 that = createBuffer(that, length)
7685 for (var i = 0; i < length; i += 1) {
7686 that[i] = array[i] & 255
7687 }
7688 return that
7689}
7690
7691function fromArrayBuffer (that, array, byteOffset, length) {
7692 array.byteLength // this throws if `array` is not a valid ArrayBuffer
7693
7694 if (byteOffset < 0 || array.byteLength < byteOffset) {
7695 throw new RangeError('\'offset\' is out of bounds')
7696 }
7697
7698 if (array.byteLength < byteOffset + (length || 0)) {
7699 throw new RangeError('\'length\' is out of bounds')
7700 }
7701
7702 if (byteOffset === undefined && length === undefined) {
7703 array = new Uint8Array(array)
7704 } else if (length === undefined) {
7705 array = new Uint8Array(array, byteOffset)
7706 } else {
7707 array = new Uint8Array(array, byteOffset, length)
7708 }
7709
7710 if (Buffer.TYPED_ARRAY_SUPPORT) {
7711 // Return an augmented `Uint8Array` instance, for best performance
7712 that = array
7713 that.__proto__ = Buffer.prototype
7714 } else {
7715 // Fallback: Return an object instance of the Buffer class
7716 that = fromArrayLike(that, array)
7717 }
7718 return that
7719}
7720
7721function fromObject (that, obj) {
7722 if (Buffer.isBuffer(obj)) {
7723 var len = checked(obj.length) | 0
7724 that = createBuffer(that, len)
7725
7726 if (that.length === 0) {
7727 return that
7728 }
7729
7730 obj.copy(that, 0, 0, len)
7731 return that
7732 }
7733
7734 if (obj) {
7735 if ((typeof ArrayBuffer !== 'undefined' &&
7736 obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
7737 if (typeof obj.length !== 'number' || isnan(obj.length)) {
7738 return createBuffer(that, 0)
7739 }
7740 return fromArrayLike(that, obj)
7741 }
7742
7743 if (obj.type === 'Buffer' && isArray(obj.data)) {
7744 return fromArrayLike(that, obj.data)
7745 }
7746 }
7747
7748 throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
7749}
7750
7751function checked (length) {
7752 // Note: cannot use `length < kMaxLength()` here because that fails when
7753 // length is NaN (which is otherwise coerced to zero.)
7754 if (length >= kMaxLength()) {
7755 throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
7756 'size: 0x' + kMaxLength().toString(16) + ' bytes')
7757 }
7758 return length | 0
7759}
7760
7761function SlowBuffer (length) {
7762 if (+length != length) { // eslint-disable-line eqeqeq
7763 length = 0
7764 }
7765 return Buffer.alloc(+length)
7766}
7767
7768Buffer.isBuffer = function isBuffer (b) {
7769 return !!(b != null && b._isBuffer)
7770}
7771
7772Buffer.compare = function compare (a, b) {
7773 if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
7774 throw new TypeError('Arguments must be Buffers')
7775 }
7776
7777 if (a === b) return 0
7778
7779 var x = a.length
7780 var y = b.length
7781
7782 for (var i = 0, len = Math.min(x, y); i < len; ++i) {
7783 if (a[i] !== b[i]) {
7784 x = a[i]
7785 y = b[i]
7786 break
7787 }
7788 }
7789
7790 if (x < y) return -1
7791 if (y < x) return 1
7792 return 0
7793}
7794
7795Buffer.isEncoding = function isEncoding (encoding) {
7796 switch (String(encoding).toLowerCase()) {
7797 case 'hex':
7798 case 'utf8':
7799 case 'utf-8':
7800 case 'ascii':
7801 case 'latin1':
7802 case 'binary':
7803 case 'base64':
7804 case 'ucs2':
7805 case 'ucs-2':
7806 case 'utf16le':
7807 case 'utf-16le':
7808 return true
7809 default:
7810 return false
7811 }
7812}
7813
7814Buffer.concat = function concat (list, length) {
7815 if (!isArray(list)) {
7816 throw new TypeError('"list" argument must be an Array of Buffers')
7817 }
7818
7819 if (list.length === 0) {
7820 return Buffer.alloc(0)
7821 }
7822
7823 var i
7824 if (length === undefined) {
7825 length = 0
7826 for (i = 0; i < list.length; ++i) {
7827 length += list[i].length
7828 }
7829 }
7830
7831 var buffer = Buffer.allocUnsafe(length)
7832 var pos = 0
7833 for (i = 0; i < list.length; ++i) {
7834 var buf = list[i]
7835 if (!Buffer.isBuffer(buf)) {
7836 throw new TypeError('"list" argument must be an Array of Buffers')
7837 }
7838 buf.copy(buffer, pos)
7839 pos += buf.length
7840 }
7841 return buffer
7842}
7843
7844function byteLength (string, encoding) {
7845 if (Buffer.isBuffer(string)) {
7846 return string.length
7847 }
7848 if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
7849 (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
7850 return string.byteLength
7851 }
7852 if (typeof string !== 'string') {
7853 string = '' + string
7854 }
7855
7856 var len = string.length
7857 if (len === 0) return 0
7858
7859 // Use a for loop to avoid recursion
7860 var loweredCase = false
7861 for (;;) {
7862 switch (encoding) {
7863 case 'ascii':
7864 case 'latin1':
7865 case 'binary':
7866 return len
7867 case 'utf8':
7868 case 'utf-8':
7869 case undefined:
7870 return utf8ToBytes(string).length
7871 case 'ucs2':
7872 case 'ucs-2':
7873 case 'utf16le':
7874 case 'utf-16le':
7875 return len * 2
7876 case 'hex':
7877 return len >>> 1
7878 case 'base64':
7879 return base64ToBytes(string).length
7880 default:
7881 if (loweredCase) return utf8ToBytes(string).length // assume utf8
7882 encoding = ('' + encoding).toLowerCase()
7883 loweredCase = true
7884 }
7885 }
7886}
7887Buffer.byteLength = byteLength
7888
7889function slowToString (encoding, start, end) {
7890 var loweredCase = false
7891
7892 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
7893 // property of a typed array.
7894
7895 // This behaves neither like String nor Uint8Array in that we set start/end
7896 // to their upper/lower bounds if the value passed is out of range.
7897 // undefined is handled specially as per ECMA-262 6th Edition,
7898 // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
7899 if (start === undefined || start < 0) {
7900 start = 0
7901 }
7902 // Return early if start > this.length. Done here to prevent potential uint32
7903 // coercion fail below.
7904 if (start > this.length) {
7905 return ''
7906 }
7907
7908 if (end === undefined || end > this.length) {
7909 end = this.length
7910 }
7911
7912 if (end <= 0) {
7913 return ''
7914 }
7915
7916 // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
7917 end >>>= 0
7918 start >>>= 0
7919
7920 if (end <= start) {
7921 return ''
7922 }
7923
7924 if (!encoding) encoding = 'utf8'
7925
7926 while (true) {
7927 switch (encoding) {
7928 case 'hex':
7929 return hexSlice(this, start, end)
7930
7931 case 'utf8':
7932 case 'utf-8':
7933 return utf8Slice(this, start, end)
7934
7935 case 'ascii':
7936 return asciiSlice(this, start, end)
7937
7938 case 'latin1':
7939 case 'binary':
7940 return latin1Slice(this, start, end)
7941
7942 case 'base64':
7943 return base64Slice(this, start, end)
7944
7945 case 'ucs2':
7946 case 'ucs-2':
7947 case 'utf16le':
7948 case 'utf-16le':
7949 return utf16leSlice(this, start, end)
7950
7951 default:
7952 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
7953 encoding = (encoding + '').toLowerCase()
7954 loweredCase = true
7955 }
7956 }
7957}
7958
7959// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
7960// Buffer instances.
7961Buffer.prototype._isBuffer = true
7962
7963function swap (b, n, m) {
7964 var i = b[n]
7965 b[n] = b[m]
7966 b[m] = i
7967}
7968
7969Buffer.prototype.swap16 = function swap16 () {
7970 var len = this.length
7971 if (len % 2 !== 0) {
7972 throw new RangeError('Buffer size must be a multiple of 16-bits')
7973 }
7974 for (var i = 0; i < len; i += 2) {
7975 swap(this, i, i + 1)
7976 }
7977 return this
7978}
7979
7980Buffer.prototype.swap32 = function swap32 () {
7981 var len = this.length
7982 if (len % 4 !== 0) {
7983 throw new RangeError('Buffer size must be a multiple of 32-bits')
7984 }
7985 for (var i = 0; i < len; i += 4) {
7986 swap(this, i, i + 3)
7987 swap(this, i + 1, i + 2)
7988 }
7989 return this
7990}
7991
7992Buffer.prototype.swap64 = function swap64 () {
7993 var len = this.length
7994 if (len % 8 !== 0) {
7995 throw new RangeError('Buffer size must be a multiple of 64-bits')
7996 }
7997 for (var i = 0; i < len; i += 8) {
7998 swap(this, i, i + 7)
7999 swap(this, i + 1, i + 6)
8000 swap(this, i + 2, i + 5)
8001 swap(this, i + 3, i + 4)
8002 }
8003 return this
8004}
8005
8006Buffer.prototype.toString = function toString () {
8007 var length = this.length | 0
8008 if (length === 0) return ''
8009 if (arguments.length === 0) return utf8Slice(this, 0, length)
8010 return slowToString.apply(this, arguments)
8011}
8012
8013Buffer.prototype.equals = function equals (b) {
8014 if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
8015 if (this === b) return true
8016 return Buffer.compare(this, b) === 0
8017}
8018
8019Buffer.prototype.inspect = function inspect () {
8020 var str = ''
8021 var max = exports.INSPECT_MAX_BYTES
8022 if (this.length > 0) {
8023 str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
8024 if (this.length > max) str += ' ... '
8025 }
8026 return '<Buffer ' + str + '>'
8027}
8028
8029Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
8030 if (!Buffer.isBuffer(target)) {
8031 throw new TypeError('Argument must be a Buffer')
8032 }
8033
8034 if (start === undefined) {
8035 start = 0
8036 }
8037 if (end === undefined) {
8038 end = target ? target.length : 0
8039 }
8040 if (thisStart === undefined) {
8041 thisStart = 0
8042 }
8043 if (thisEnd === undefined) {
8044 thisEnd = this.length
8045 }
8046
8047 if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
8048 throw new RangeError('out of range index')
8049 }
8050
8051 if (thisStart >= thisEnd && start >= end) {
8052 return 0
8053 }
8054 if (thisStart >= thisEnd) {
8055 return -1
8056 }
8057 if (start >= end) {
8058 return 1
8059 }
8060
8061 start >>>= 0
8062 end >>>= 0
8063 thisStart >>>= 0
8064 thisEnd >>>= 0
8065
8066 if (this === target) return 0
8067
8068 var x = thisEnd - thisStart
8069 var y = end - start
8070 var len = Math.min(x, y)
8071
8072 var thisCopy = this.slice(thisStart, thisEnd)
8073 var targetCopy = target.slice(start, end)
8074
8075 for (var i = 0; i < len; ++i) {
8076 if (thisCopy[i] !== targetCopy[i]) {
8077 x = thisCopy[i]
8078 y = targetCopy[i]
8079 break
8080 }
8081 }
8082
8083 if (x < y) return -1
8084 if (y < x) return 1
8085 return 0
8086}
8087
8088// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
8089// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
8090//
8091// Arguments:
8092// - buffer - a Buffer to search
8093// - val - a string, Buffer, or number
8094// - byteOffset - an index into `buffer`; will be clamped to an int32
8095// - encoding - an optional encoding, relevant is val is a string
8096// - dir - true for indexOf, false for lastIndexOf
8097function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
8098 // Empty buffer means no match
8099 if (buffer.length === 0) return -1
8100
8101 // Normalize byteOffset
8102 if (typeof byteOffset === 'string') {
8103 encoding = byteOffset
8104 byteOffset = 0
8105 } else if (byteOffset > 0x7fffffff) {
8106 byteOffset = 0x7fffffff
8107 } else if (byteOffset < -0x80000000) {
8108 byteOffset = -0x80000000
8109 }
8110 byteOffset = +byteOffset // Coerce to Number.
8111 if (isNaN(byteOffset)) {
8112 // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
8113 byteOffset = dir ? 0 : (buffer.length - 1)
8114 }
8115
8116 // Normalize byteOffset: negative offsets start from the end of the buffer
8117 if (byteOffset < 0) byteOffset = buffer.length + byteOffset
8118 if (byteOffset >= buffer.length) {
8119 if (dir) return -1
8120 else byteOffset = buffer.length - 1
8121 } else if (byteOffset < 0) {
8122 if (dir) byteOffset = 0
8123 else return -1
8124 }
8125
8126 // Normalize val
8127 if (typeof val === 'string') {
8128 val = Buffer.from(val, encoding)
8129 }
8130
8131 // Finally, search either indexOf (if dir is true) or lastIndexOf
8132 if (Buffer.isBuffer(val)) {
8133 // Special case: looking for empty string/buffer always fails
8134 if (val.length === 0) {
8135 return -1
8136 }
8137 return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
8138 } else if (typeof val === 'number') {
8139 val = val & 0xFF // Search for a byte value [0-255]
8140 if (Buffer.TYPED_ARRAY_SUPPORT &&
8141 typeof Uint8Array.prototype.indexOf === 'function') {
8142 if (dir) {
8143 return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
8144 } else {
8145 return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
8146 }
8147 }
8148 return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
8149 }
8150
8151 throw new TypeError('val must be string, number or Buffer')
8152}
8153
8154function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
8155 var indexSize = 1
8156 var arrLength = arr.length
8157 var valLength = val.length
8158
8159 if (encoding !== undefined) {
8160 encoding = String(encoding).toLowerCase()
8161 if (encoding === 'ucs2' || encoding === 'ucs-2' ||
8162 encoding === 'utf16le' || encoding === 'utf-16le') {
8163 if (arr.length < 2 || val.length < 2) {
8164 return -1
8165 }
8166 indexSize = 2
8167 arrLength /= 2
8168 valLength /= 2
8169 byteOffset /= 2
8170 }
8171 }
8172
8173 function read (buf, i) {
8174 if (indexSize === 1) {
8175 return buf[i]
8176 } else {
8177 return buf.readUInt16BE(i * indexSize)
8178 }
8179 }
8180
8181 var i
8182 if (dir) {
8183 var foundIndex = -1
8184 for (i = byteOffset; i < arrLength; i++) {
8185 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
8186 if (foundIndex === -1) foundIndex = i
8187 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
8188 } else {
8189 if (foundIndex !== -1) i -= i - foundIndex
8190 foundIndex = -1
8191 }
8192 }
8193 } else {
8194 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
8195 for (i = byteOffset; i >= 0; i--) {
8196 var found = true
8197 for (var j = 0; j < valLength; j++) {
8198 if (read(arr, i + j) !== read(val, j)) {
8199 found = false
8200 break
8201 }
8202 }
8203 if (found) return i
8204 }
8205 }
8206
8207 return -1
8208}
8209
8210Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
8211 return this.indexOf(val, byteOffset, encoding) !== -1
8212}
8213
8214Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
8215 return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
8216}
8217
8218Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
8219 return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
8220}
8221
8222function hexWrite (buf, string, offset, length) {
8223 offset = Number(offset) || 0
8224 var remaining = buf.length - offset
8225 if (!length) {
8226 length = remaining
8227 } else {
8228 length = Number(length)
8229 if (length > remaining) {
8230 length = remaining
8231 }
8232 }
8233
8234 // must be an even number of digits
8235 var strLen = string.length
8236 if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
8237
8238 if (length > strLen / 2) {
8239 length = strLen / 2
8240 }
8241 for (var i = 0; i < length; ++i) {
8242 var parsed = parseInt(string.substr(i * 2, 2), 16)
8243 if (isNaN(parsed)) return i
8244 buf[offset + i] = parsed
8245 }
8246 return i
8247}
8248
8249function utf8Write (buf, string, offset, length) {
8250 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
8251}
8252
8253function asciiWrite (buf, string, offset, length) {
8254 return blitBuffer(asciiToBytes(string), buf, offset, length)
8255}
8256
8257function latin1Write (buf, string, offset, length) {
8258 return asciiWrite(buf, string, offset, length)
8259}
8260
8261function base64Write (buf, string, offset, length) {
8262 return blitBuffer(base64ToBytes(string), buf, offset, length)
8263}
8264
8265function ucs2Write (buf, string, offset, length) {
8266 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
8267}
8268
8269Buffer.prototype.write = function write (string, offset, length, encoding) {
8270 // Buffer#write(string)
8271 if (offset === undefined) {
8272 encoding = 'utf8'
8273 length = this.length
8274 offset = 0
8275 // Buffer#write(string, encoding)
8276 } else if (length === undefined && typeof offset === 'string') {
8277 encoding = offset
8278 length = this.length
8279 offset = 0
8280 // Buffer#write(string, offset[, length][, encoding])
8281 } else if (isFinite(offset)) {
8282 offset = offset | 0
8283 if (isFinite(length)) {
8284 length = length | 0
8285 if (encoding === undefined) encoding = 'utf8'
8286 } else {
8287 encoding = length
8288 length = undefined
8289 }
8290 // legacy write(string, encoding, offset, length) - remove in v0.13
8291 } else {
8292 throw new Error(
8293 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
8294 )
8295 }
8296
8297 var remaining = this.length - offset
8298 if (length === undefined || length > remaining) length = remaining
8299
8300 if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
8301 throw new RangeError('Attempt to write outside buffer bounds')
8302 }
8303
8304 if (!encoding) encoding = 'utf8'
8305
8306 var loweredCase = false
8307 for (;;) {
8308 switch (encoding) {
8309 case 'hex':
8310 return hexWrite(this, string, offset, length)
8311
8312 case 'utf8':
8313 case 'utf-8':
8314 return utf8Write(this, string, offset, length)
8315
8316 case 'ascii':
8317 return asciiWrite(this, string, offset, length)
8318
8319 case 'latin1':
8320 case 'binary':
8321 return latin1Write(this, string, offset, length)
8322
8323 case 'base64':
8324 // Warning: maxLength not taken into account in base64Write
8325 return base64Write(this, string, offset, length)
8326
8327 case 'ucs2':
8328 case 'ucs-2':
8329 case 'utf16le':
8330 case 'utf-16le':
8331 return ucs2Write(this, string, offset, length)
8332
8333 default:
8334 if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
8335 encoding = ('' + encoding).toLowerCase()
8336 loweredCase = true
8337 }
8338 }
8339}
8340
8341Buffer.prototype.toJSON = function toJSON () {
8342 return {
8343 type: 'Buffer',
8344 data: Array.prototype.slice.call(this._arr || this, 0)
8345 }
8346}
8347
8348function base64Slice (buf, start, end) {
8349 if (start === 0 && end === buf.length) {
8350 return base64.fromByteArray(buf)
8351 } else {
8352 return base64.fromByteArray(buf.slice(start, end))
8353 }
8354}
8355
8356function utf8Slice (buf, start, end) {
8357 end = Math.min(buf.length, end)
8358 var res = []
8359
8360 var i = start
8361 while (i < end) {
8362 var firstByte = buf[i]
8363 var codePoint = null
8364 var bytesPerSequence = (firstByte > 0xEF) ? 4
8365 : (firstByte > 0xDF) ? 3
8366 : (firstByte > 0xBF) ? 2
8367 : 1
8368
8369 if (i + bytesPerSequence <= end) {
8370 var secondByte, thirdByte, fourthByte, tempCodePoint
8371
8372 switch (bytesPerSequence) {
8373 case 1:
8374 if (firstByte < 0x80) {
8375 codePoint = firstByte
8376 }
8377 break
8378 case 2:
8379 secondByte = buf[i + 1]
8380 if ((secondByte & 0xC0) === 0x80) {
8381 tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
8382 if (tempCodePoint > 0x7F) {
8383 codePoint = tempCodePoint
8384 }
8385 }
8386 break
8387 case 3:
8388 secondByte = buf[i + 1]
8389 thirdByte = buf[i + 2]
8390 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
8391 tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
8392 if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
8393 codePoint = tempCodePoint
8394 }
8395 }
8396 break
8397 case 4:
8398 secondByte = buf[i + 1]
8399 thirdByte = buf[i + 2]
8400 fourthByte = buf[i + 3]
8401 if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
8402 tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
8403 if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
8404 codePoint = tempCodePoint
8405 }
8406 }
8407 }
8408 }
8409
8410 if (codePoint === null) {
8411 // we did not generate a valid codePoint so insert a
8412 // replacement char (U+FFFD) and advance only 1 byte
8413 codePoint = 0xFFFD
8414 bytesPerSequence = 1
8415 } else if (codePoint > 0xFFFF) {
8416 // encode to utf16 (surrogate pair dance)
8417 codePoint -= 0x10000
8418 res.push(codePoint >>> 10 & 0x3FF | 0xD800)
8419 codePoint = 0xDC00 | codePoint & 0x3FF
8420 }
8421
8422 res.push(codePoint)
8423 i += bytesPerSequence
8424 }
8425
8426 return decodeCodePointsArray(res)
8427}
8428
8429// Based on http://stackoverflow.com/a/22747272/680742, the browser with
8430// the lowest limit is Chrome, with 0x10000 args.
8431// We go 1 magnitude less, for safety
8432var MAX_ARGUMENTS_LENGTH = 0x1000
8433
8434function decodeCodePointsArray (codePoints) {
8435 var len = codePoints.length
8436 if (len <= MAX_ARGUMENTS_LENGTH) {
8437 return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
8438 }
8439
8440 // Decode in chunks to avoid "call stack size exceeded".
8441 var res = ''
8442 var i = 0
8443 while (i < len) {
8444 res += String.fromCharCode.apply(
8445 String,
8446 codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
8447 )
8448 }
8449 return res
8450}
8451
8452function asciiSlice (buf, start, end) {
8453 var ret = ''
8454 end = Math.min(buf.length, end)
8455
8456 for (var i = start; i < end; ++i) {
8457 ret += String.fromCharCode(buf[i] & 0x7F)
8458 }
8459 return ret
8460}
8461
8462function latin1Slice (buf, start, end) {
8463 var ret = ''
8464 end = Math.min(buf.length, end)
8465
8466 for (var i = start; i < end; ++i) {
8467 ret += String.fromCharCode(buf[i])
8468 }
8469 return ret
8470}
8471
8472function hexSlice (buf, start, end) {
8473 var len = buf.length
8474
8475 if (!start || start < 0) start = 0
8476 if (!end || end < 0 || end > len) end = len
8477
8478 var out = ''
8479 for (var i = start; i < end; ++i) {
8480 out += toHex(buf[i])
8481 }
8482 return out
8483}
8484
8485function utf16leSlice (buf, start, end) {
8486 var bytes = buf.slice(start, end)
8487 var res = ''
8488 for (var i = 0; i < bytes.length; i += 2) {
8489 res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
8490 }
8491 return res
8492}
8493
8494Buffer.prototype.slice = function slice (start, end) {
8495 var len = this.length
8496 start = ~~start
8497 end = end === undefined ? len : ~~end
8498
8499 if (start < 0) {
8500 start += len
8501 if (start < 0) start = 0
8502 } else if (start > len) {
8503 start = len
8504 }
8505
8506 if (end < 0) {
8507 end += len
8508 if (end < 0) end = 0
8509 } else if (end > len) {
8510 end = len
8511 }
8512
8513 if (end < start) end = start
8514
8515 var newBuf
8516 if (Buffer.TYPED_ARRAY_SUPPORT) {
8517 newBuf = this.subarray(start, end)
8518 newBuf.__proto__ = Buffer.prototype
8519 } else {
8520 var sliceLen = end - start
8521 newBuf = new Buffer(sliceLen, undefined)
8522 for (var i = 0; i < sliceLen; ++i) {
8523 newBuf[i] = this[i + start]
8524 }
8525 }
8526
8527 return newBuf
8528}
8529
8530/*
8531 * Need to make sure that buffer isn't trying to write out of bounds.
8532 */
8533function checkOffset (offset, ext, length) {
8534 if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
8535 if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
8536}
8537
8538Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
8539 offset = offset | 0
8540 byteLength = byteLength | 0
8541 if (!noAssert) checkOffset(offset, byteLength, this.length)
8542
8543 var val = this[offset]
8544 var mul = 1
8545 var i = 0
8546 while (++i < byteLength && (mul *= 0x100)) {
8547 val += this[offset + i] * mul
8548 }
8549
8550 return val
8551}
8552
8553Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
8554 offset = offset | 0
8555 byteLength = byteLength | 0
8556 if (!noAssert) {
8557 checkOffset(offset, byteLength, this.length)
8558 }
8559
8560 var val = this[offset + --byteLength]
8561 var mul = 1
8562 while (byteLength > 0 && (mul *= 0x100)) {
8563 val += this[offset + --byteLength] * mul
8564 }
8565
8566 return val
8567}
8568
8569Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
8570 if (!noAssert) checkOffset(offset, 1, this.length)
8571 return this[offset]
8572}
8573
8574Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
8575 if (!noAssert) checkOffset(offset, 2, this.length)
8576 return this[offset] | (this[offset + 1] << 8)
8577}
8578
8579Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
8580 if (!noAssert) checkOffset(offset, 2, this.length)
8581 return (this[offset] << 8) | this[offset + 1]
8582}
8583
8584Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
8585 if (!noAssert) checkOffset(offset, 4, this.length)
8586
8587 return ((this[offset]) |
8588 (this[offset + 1] << 8) |
8589 (this[offset + 2] << 16)) +
8590 (this[offset + 3] * 0x1000000)
8591}
8592
8593Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
8594 if (!noAssert) checkOffset(offset, 4, this.length)
8595
8596 return (this[offset] * 0x1000000) +
8597 ((this[offset + 1] << 16) |
8598 (this[offset + 2] << 8) |
8599 this[offset + 3])
8600}
8601
8602Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
8603 offset = offset | 0
8604 byteLength = byteLength | 0
8605 if (!noAssert) checkOffset(offset, byteLength, this.length)
8606
8607 var val = this[offset]
8608 var mul = 1
8609 var i = 0
8610 while (++i < byteLength && (mul *= 0x100)) {
8611 val += this[offset + i] * mul
8612 }
8613 mul *= 0x80
8614
8615 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
8616
8617 return val
8618}
8619
8620Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
8621 offset = offset | 0
8622 byteLength = byteLength | 0
8623 if (!noAssert) checkOffset(offset, byteLength, this.length)
8624
8625 var i = byteLength
8626 var mul = 1
8627 var val = this[offset + --i]
8628 while (i > 0 && (mul *= 0x100)) {
8629 val += this[offset + --i] * mul
8630 }
8631 mul *= 0x80
8632
8633 if (val >= mul) val -= Math.pow(2, 8 * byteLength)
8634
8635 return val
8636}
8637
8638Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
8639 if (!noAssert) checkOffset(offset, 1, this.length)
8640 if (!(this[offset] & 0x80)) return (this[offset])
8641 return ((0xff - this[offset] + 1) * -1)
8642}
8643
8644Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
8645 if (!noAssert) checkOffset(offset, 2, this.length)
8646 var val = this[offset] | (this[offset + 1] << 8)
8647 return (val & 0x8000) ? val | 0xFFFF0000 : val
8648}
8649
8650Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
8651 if (!noAssert) checkOffset(offset, 2, this.length)
8652 var val = this[offset + 1] | (this[offset] << 8)
8653 return (val & 0x8000) ? val | 0xFFFF0000 : val
8654}
8655
8656Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
8657 if (!noAssert) checkOffset(offset, 4, this.length)
8658
8659 return (this[offset]) |
8660 (this[offset + 1] << 8) |
8661 (this[offset + 2] << 16) |
8662 (this[offset + 3] << 24)
8663}
8664
8665Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
8666 if (!noAssert) checkOffset(offset, 4, this.length)
8667
8668 return (this[offset] << 24) |
8669 (this[offset + 1] << 16) |
8670 (this[offset + 2] << 8) |
8671 (this[offset + 3])
8672}
8673
8674Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
8675 if (!noAssert) checkOffset(offset, 4, this.length)
8676 return ieee754.read(this, offset, true, 23, 4)
8677}
8678
8679Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
8680 if (!noAssert) checkOffset(offset, 4, this.length)
8681 return ieee754.read(this, offset, false, 23, 4)
8682}
8683
8684Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
8685 if (!noAssert) checkOffset(offset, 8, this.length)
8686 return ieee754.read(this, offset, true, 52, 8)
8687}
8688
8689Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
8690 if (!noAssert) checkOffset(offset, 8, this.length)
8691 return ieee754.read(this, offset, false, 52, 8)
8692}
8693
8694function checkInt (buf, value, offset, ext, max, min) {
8695 if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
8696 if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
8697 if (offset + ext > buf.length) throw new RangeError('Index out of range')
8698}
8699
8700Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
8701 value = +value
8702 offset = offset | 0
8703 byteLength = byteLength | 0
8704 if (!noAssert) {
8705 var maxBytes = Math.pow(2, 8 * byteLength) - 1
8706 checkInt(this, value, offset, byteLength, maxBytes, 0)
8707 }
8708
8709 var mul = 1
8710 var i = 0
8711 this[offset] = value & 0xFF
8712 while (++i < byteLength && (mul *= 0x100)) {
8713 this[offset + i] = (value / mul) & 0xFF
8714 }
8715
8716 return offset + byteLength
8717}
8718
8719Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
8720 value = +value
8721 offset = offset | 0
8722 byteLength = byteLength | 0
8723 if (!noAssert) {
8724 var maxBytes = Math.pow(2, 8 * byteLength) - 1
8725 checkInt(this, value, offset, byteLength, maxBytes, 0)
8726 }
8727
8728 var i = byteLength - 1
8729 var mul = 1
8730 this[offset + i] = value & 0xFF
8731 while (--i >= 0 && (mul *= 0x100)) {
8732 this[offset + i] = (value / mul) & 0xFF
8733 }
8734
8735 return offset + byteLength
8736}
8737
8738Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
8739 value = +value
8740 offset = offset | 0
8741 if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
8742 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
8743 this[offset] = (value & 0xff)
8744 return offset + 1
8745}
8746
8747function objectWriteUInt16 (buf, value, offset, littleEndian) {
8748 if (value < 0) value = 0xffff + value + 1
8749 for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
8750 buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
8751 (littleEndian ? i : 1 - i) * 8
8752 }
8753}
8754
8755Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
8756 value = +value
8757 offset = offset | 0
8758 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
8759 if (Buffer.TYPED_ARRAY_SUPPORT) {
8760 this[offset] = (value & 0xff)
8761 this[offset + 1] = (value >>> 8)
8762 } else {
8763 objectWriteUInt16(this, value, offset, true)
8764 }
8765 return offset + 2
8766}
8767
8768Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
8769 value = +value
8770 offset = offset | 0
8771 if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
8772 if (Buffer.TYPED_ARRAY_SUPPORT) {
8773 this[offset] = (value >>> 8)
8774 this[offset + 1] = (value & 0xff)
8775 } else {
8776 objectWriteUInt16(this, value, offset, false)
8777 }
8778 return offset + 2
8779}
8780
8781function objectWriteUInt32 (buf, value, offset, littleEndian) {
8782 if (value < 0) value = 0xffffffff + value + 1
8783 for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
8784 buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
8785 }
8786}
8787
8788Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
8789 value = +value
8790 offset = offset | 0
8791 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
8792 if (Buffer.TYPED_ARRAY_SUPPORT) {
8793 this[offset + 3] = (value >>> 24)
8794 this[offset + 2] = (value >>> 16)
8795 this[offset + 1] = (value >>> 8)
8796 this[offset] = (value & 0xff)
8797 } else {
8798 objectWriteUInt32(this, value, offset, true)
8799 }
8800 return offset + 4
8801}
8802
8803Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
8804 value = +value
8805 offset = offset | 0
8806 if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
8807 if (Buffer.TYPED_ARRAY_SUPPORT) {
8808 this[offset] = (value >>> 24)
8809 this[offset + 1] = (value >>> 16)
8810 this[offset + 2] = (value >>> 8)
8811 this[offset + 3] = (value & 0xff)
8812 } else {
8813 objectWriteUInt32(this, value, offset, false)
8814 }
8815 return offset + 4
8816}
8817
8818Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
8819 value = +value
8820 offset = offset | 0
8821 if (!noAssert) {
8822 var limit = Math.pow(2, 8 * byteLength - 1)
8823
8824 checkInt(this, value, offset, byteLength, limit - 1, -limit)
8825 }
8826
8827 var i = 0
8828 var mul = 1
8829 var sub = 0
8830 this[offset] = value & 0xFF
8831 while (++i < byteLength && (mul *= 0x100)) {
8832 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
8833 sub = 1
8834 }
8835 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
8836 }
8837
8838 return offset + byteLength
8839}
8840
8841Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
8842 value = +value
8843 offset = offset | 0
8844 if (!noAssert) {
8845 var limit = Math.pow(2, 8 * byteLength - 1)
8846
8847 checkInt(this, value, offset, byteLength, limit - 1, -limit)
8848 }
8849
8850 var i = byteLength - 1
8851 var mul = 1
8852 var sub = 0
8853 this[offset + i] = value & 0xFF
8854 while (--i >= 0 && (mul *= 0x100)) {
8855 if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
8856 sub = 1
8857 }
8858 this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
8859 }
8860
8861 return offset + byteLength
8862}
8863
8864Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
8865 value = +value
8866 offset = offset | 0
8867 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
8868 if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
8869 if (value < 0) value = 0xff + value + 1
8870 this[offset] = (value & 0xff)
8871 return offset + 1
8872}
8873
8874Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
8875 value = +value
8876 offset = offset | 0
8877 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
8878 if (Buffer.TYPED_ARRAY_SUPPORT) {
8879 this[offset] = (value & 0xff)
8880 this[offset + 1] = (value >>> 8)
8881 } else {
8882 objectWriteUInt16(this, value, offset, true)
8883 }
8884 return offset + 2
8885}
8886
8887Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
8888 value = +value
8889 offset = offset | 0
8890 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
8891 if (Buffer.TYPED_ARRAY_SUPPORT) {
8892 this[offset] = (value >>> 8)
8893 this[offset + 1] = (value & 0xff)
8894 } else {
8895 objectWriteUInt16(this, value, offset, false)
8896 }
8897 return offset + 2
8898}
8899
8900Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
8901 value = +value
8902 offset = offset | 0
8903 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
8904 if (Buffer.TYPED_ARRAY_SUPPORT) {
8905 this[offset] = (value & 0xff)
8906 this[offset + 1] = (value >>> 8)
8907 this[offset + 2] = (value >>> 16)
8908 this[offset + 3] = (value >>> 24)
8909 } else {
8910 objectWriteUInt32(this, value, offset, true)
8911 }
8912 return offset + 4
8913}
8914
8915Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
8916 value = +value
8917 offset = offset | 0
8918 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
8919 if (value < 0) value = 0xffffffff + value + 1
8920 if (Buffer.TYPED_ARRAY_SUPPORT) {
8921 this[offset] = (value >>> 24)
8922 this[offset + 1] = (value >>> 16)
8923 this[offset + 2] = (value >>> 8)
8924 this[offset + 3] = (value & 0xff)
8925 } else {
8926 objectWriteUInt32(this, value, offset, false)
8927 }
8928 return offset + 4
8929}
8930
8931function checkIEEE754 (buf, value, offset, ext, max, min) {
8932 if (offset + ext > buf.length) throw new RangeError('Index out of range')
8933 if (offset < 0) throw new RangeError('Index out of range')
8934}
8935
8936function writeFloat (buf, value, offset, littleEndian, noAssert) {
8937 if (!noAssert) {
8938 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
8939 }
8940 ieee754.write(buf, value, offset, littleEndian, 23, 4)
8941 return offset + 4
8942}
8943
8944Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
8945 return writeFloat(this, value, offset, true, noAssert)
8946}
8947
8948Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
8949 return writeFloat(this, value, offset, false, noAssert)
8950}
8951
8952function writeDouble (buf, value, offset, littleEndian, noAssert) {
8953 if (!noAssert) {
8954 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
8955 }
8956 ieee754.write(buf, value, offset, littleEndian, 52, 8)
8957 return offset + 8
8958}
8959
8960Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
8961 return writeDouble(this, value, offset, true, noAssert)
8962}
8963
8964Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
8965 return writeDouble(this, value, offset, false, noAssert)
8966}
8967
8968// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
8969Buffer.prototype.copy = function copy (target, targetStart, start, end) {
8970 if (!start) start = 0
8971 if (!end && end !== 0) end = this.length
8972 if (targetStart >= target.length) targetStart = target.length
8973 if (!targetStart) targetStart = 0
8974 if (end > 0 && end < start) end = start
8975
8976 // Copy 0 bytes; we're done
8977 if (end === start) return 0
8978 if (target.length === 0 || this.length === 0) return 0
8979
8980 // Fatal error conditions
8981 if (targetStart < 0) {
8982 throw new RangeError('targetStart out of bounds')
8983 }
8984 if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
8985 if (end < 0) throw new RangeError('sourceEnd out of bounds')
8986
8987 // Are we oob?
8988 if (end > this.length) end = this.length
8989 if (target.length - targetStart < end - start) {
8990 end = target.length - targetStart + start
8991 }
8992
8993 var len = end - start
8994 var i
8995
8996 if (this === target && start < targetStart && targetStart < end) {
8997 // descending copy from end
8998 for (i = len - 1; i >= 0; --i) {
8999 target[i + targetStart] = this[i + start]
9000 }
9001 } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
9002 // ascending copy from start
9003 for (i = 0; i < len; ++i) {
9004 target[i + targetStart] = this[i + start]
9005 }
9006 } else {
9007 Uint8Array.prototype.set.call(
9008 target,
9009 this.subarray(start, start + len),
9010 targetStart
9011 )
9012 }
9013
9014 return len
9015}
9016
9017// Usage:
9018// buffer.fill(number[, offset[, end]])
9019// buffer.fill(buffer[, offset[, end]])
9020// buffer.fill(string[, offset[, end]][, encoding])
9021Buffer.prototype.fill = function fill (val, start, end, encoding) {
9022 // Handle string cases:
9023 if (typeof val === 'string') {
9024 if (typeof start === 'string') {
9025 encoding = start
9026 start = 0
9027 end = this.length
9028 } else if (typeof end === 'string') {
9029 encoding = end
9030 end = this.length
9031 }
9032 if (val.length === 1) {
9033 var code = val.charCodeAt(0)
9034 if (code < 256) {
9035 val = code
9036 }
9037 }
9038 if (encoding !== undefined && typeof encoding !== 'string') {
9039 throw new TypeError('encoding must be a string')
9040 }
9041 if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
9042 throw new TypeError('Unknown encoding: ' + encoding)
9043 }
9044 } else if (typeof val === 'number') {
9045 val = val & 255
9046 }
9047
9048 // Invalid ranges are not set to a default, so can range check early.
9049 if (start < 0 || this.length < start || this.length < end) {
9050 throw new RangeError('Out of range index')
9051 }
9052
9053 if (end <= start) {
9054 return this
9055 }
9056
9057 start = start >>> 0
9058 end = end === undefined ? this.length : end >>> 0
9059
9060 if (!val) val = 0
9061
9062 var i
9063 if (typeof val === 'number') {
9064 for (i = start; i < end; ++i) {
9065 this[i] = val
9066 }
9067 } else {
9068 var bytes = Buffer.isBuffer(val)
9069 ? val
9070 : utf8ToBytes(new Buffer(val, encoding).toString())
9071 var len = bytes.length
9072 for (i = 0; i < end - start; ++i) {
9073 this[i + start] = bytes[i % len]
9074 }
9075 }
9076
9077 return this
9078}
9079
9080// HELPER FUNCTIONS
9081// ================
9082
9083var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
9084
9085function base64clean (str) {
9086 // Node strips out invalid characters like \n and \t from the string, base64-js does not
9087 str = stringtrim(str).replace(INVALID_BASE64_RE, '')
9088 // Node converts strings with length < 2 to ''
9089 if (str.length < 2) return ''
9090 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
9091 while (str.length % 4 !== 0) {
9092 str = str + '='
9093 }
9094 return str
9095}
9096
9097function stringtrim (str) {
9098 if (str.trim) return str.trim()
9099 return str.replace(/^\s+|\s+$/g, '')
9100}
9101
9102function toHex (n) {
9103 if (n < 16) return '0' + n.toString(16)
9104 return n.toString(16)
9105}
9106
9107function utf8ToBytes (string, units) {
9108 units = units || Infinity
9109 var codePoint
9110 var length = string.length
9111 var leadSurrogate = null
9112 var bytes = []
9113
9114 for (var i = 0; i < length; ++i) {
9115 codePoint = string.charCodeAt(i)
9116
9117 // is surrogate component
9118 if (codePoint > 0xD7FF && codePoint < 0xE000) {
9119 // last char was a lead
9120 if (!leadSurrogate) {
9121 // no lead yet
9122 if (codePoint > 0xDBFF) {
9123 // unexpected trail
9124 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
9125 continue
9126 } else if (i + 1 === length) {
9127 // unpaired lead
9128 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
9129 continue
9130 }
9131
9132 // valid lead
9133 leadSurrogate = codePoint
9134
9135 continue
9136 }
9137
9138 // 2 leads in a row
9139 if (codePoint < 0xDC00) {
9140 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
9141 leadSurrogate = codePoint
9142 continue
9143 }
9144
9145 // valid surrogate pair
9146 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
9147 } else if (leadSurrogate) {
9148 // valid bmp char, but last char was a lead
9149 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
9150 }
9151
9152 leadSurrogate = null
9153
9154 // encode utf8
9155 if (codePoint < 0x80) {
9156 if ((units -= 1) < 0) break
9157 bytes.push(codePoint)
9158 } else if (codePoint < 0x800) {
9159 if ((units -= 2) < 0) break
9160 bytes.push(
9161 codePoint >> 0x6 | 0xC0,
9162 codePoint & 0x3F | 0x80
9163 )
9164 } else if (codePoint < 0x10000) {
9165 if ((units -= 3) < 0) break
9166 bytes.push(
9167 codePoint >> 0xC | 0xE0,
9168 codePoint >> 0x6 & 0x3F | 0x80,
9169 codePoint & 0x3F | 0x80
9170 )
9171 } else if (codePoint < 0x110000) {
9172 if ((units -= 4) < 0) break
9173 bytes.push(
9174 codePoint >> 0x12 | 0xF0,
9175 codePoint >> 0xC & 0x3F | 0x80,
9176 codePoint >> 0x6 & 0x3F | 0x80,
9177 codePoint & 0x3F | 0x80
9178 )
9179 } else {
9180 throw new Error('Invalid code point')
9181 }
9182 }
9183
9184 return bytes
9185}
9186
9187function asciiToBytes (str) {
9188 var byteArray = []
9189 for (var i = 0; i < str.length; ++i) {
9190 // Node's code seems to be doing this and not & 0x7F..
9191 byteArray.push(str.charCodeAt(i) & 0xFF)
9192 }
9193 return byteArray
9194}
9195
9196function utf16leToBytes (str, units) {
9197 var c, hi, lo
9198 var byteArray = []
9199 for (var i = 0; i < str.length; ++i) {
9200 if ((units -= 2) < 0) break
9201
9202 c = str.charCodeAt(i)
9203 hi = c >> 8
9204 lo = c % 256
9205 byteArray.push(lo)
9206 byteArray.push(hi)
9207 }
9208
9209 return byteArray
9210}
9211
9212function base64ToBytes (str) {
9213 return base64.toByteArray(base64clean(str))
9214}
9215
9216function blitBuffer (src, dst, offset, length) {
9217 for (var i = 0; i < length; ++i) {
9218 if ((i + offset >= dst.length) || (i >= src.length)) break
9219 dst[i + offset] = src[i]
9220 }
9221 return i
9222}
9223
9224function isnan (val) {
9225 return val !== val // eslint-disable-line no-self-compare
9226}
9227
9228/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
9229
9230/***/ }),
9231
9232/***/ "./node_modules/cipher-base/index.js":
9233/*!*******************************************!*\
9234 !*** ./node_modules/cipher-base/index.js ***!
9235 \*******************************************/
9236/*! no static exports found */
9237/***/ (function(module, exports, __webpack_require__) {
9238
9239var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
9240var Transform = __webpack_require__(/*! stream */ "./node_modules/stream-browserify/index.js").Transform
9241var StringDecoder = __webpack_require__(/*! string_decoder */ "./node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js").StringDecoder
9242var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
9243
9244function CipherBase (hashMode) {
9245 Transform.call(this)
9246 this.hashMode = typeof hashMode === 'string'
9247 if (this.hashMode) {
9248 this[hashMode] = this._finalOrDigest
9249 } else {
9250 this.final = this._finalOrDigest
9251 }
9252 if (this._final) {
9253 this.__final = this._final
9254 this._final = null
9255 }
9256 this._decoder = null
9257 this._encoding = null
9258}
9259inherits(CipherBase, Transform)
9260
9261CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
9262 if (typeof data === 'string') {
9263 data = Buffer.from(data, inputEnc)
9264 }
9265
9266 var outData = this._update(data)
9267 if (this.hashMode) return this
9268
9269 if (outputEnc) {
9270 outData = this._toString(outData, outputEnc)
9271 }
9272
9273 return outData
9274}
9275
9276CipherBase.prototype.setAutoPadding = function () {}
9277CipherBase.prototype.getAuthTag = function () {
9278 throw new Error('trying to get auth tag in unsupported state')
9279}
9280
9281CipherBase.prototype.setAuthTag = function () {
9282 throw new Error('trying to set auth tag in unsupported state')
9283}
9284
9285CipherBase.prototype.setAAD = function () {
9286 throw new Error('trying to set aad in unsupported state')
9287}
9288
9289CipherBase.prototype._transform = function (data, _, next) {
9290 var err
9291 try {
9292 if (this.hashMode) {
9293 this._update(data)
9294 } else {
9295 this.push(this._update(data))
9296 }
9297 } catch (e) {
9298 err = e
9299 } finally {
9300 next(err)
9301 }
9302}
9303CipherBase.prototype._flush = function (done) {
9304 var err
9305 try {
9306 this.push(this.__final())
9307 } catch (e) {
9308 err = e
9309 }
9310
9311 done(err)
9312}
9313CipherBase.prototype._finalOrDigest = function (outputEnc) {
9314 var outData = this.__final() || Buffer.alloc(0)
9315 if (outputEnc) {
9316 outData = this._toString(outData, outputEnc, true)
9317 }
9318 return outData
9319}
9320
9321CipherBase.prototype._toString = function (value, enc, fin) {
9322 if (!this._decoder) {
9323 this._decoder = new StringDecoder(enc)
9324 this._encoding = enc
9325 }
9326
9327 if (this._encoding !== enc) throw new Error('can\'t switch encodings')
9328
9329 var out = this._decoder.write(value)
9330 if (fin) {
9331 out += this._decoder.end()
9332 }
9333
9334 return out
9335}
9336
9337module.exports = CipherBase
9338
9339
9340/***/ }),
9341
9342/***/ "./node_modules/core-util-is/lib/util.js":
9343/*!***********************************************!*\
9344 !*** ./node_modules/core-util-is/lib/util.js ***!
9345 \***********************************************/
9346/*! no static exports found */
9347/***/ (function(module, exports, __webpack_require__) {
9348
9349/* WEBPACK VAR INJECTION */(function(Buffer) {// Copyright Joyent, Inc. and other Node contributors.
9350//
9351// Permission is hereby granted, free of charge, to any person obtaining a
9352// copy of this software and associated documentation files (the
9353// "Software"), to deal in the Software without restriction, including
9354// without limitation the rights to use, copy, modify, merge, publish,
9355// distribute, sublicense, and/or sell copies of the Software, and to permit
9356// persons to whom the Software is furnished to do so, subject to the
9357// following conditions:
9358//
9359// The above copyright notice and this permission notice shall be included
9360// in all copies or substantial portions of the Software.
9361//
9362// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9363// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9364// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
9365// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
9366// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
9367// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
9368// USE OR OTHER DEALINGS IN THE SOFTWARE.
9369
9370// NOTE: These type checking functions intentionally don't use `instanceof`
9371// because it is fragile and can be easily faked with `Object.create()`.
9372
9373function isArray(arg) {
9374 if (Array.isArray) {
9375 return Array.isArray(arg);
9376 }
9377 return objectToString(arg) === '[object Array]';
9378}
9379exports.isArray = isArray;
9380
9381function isBoolean(arg) {
9382 return typeof arg === 'boolean';
9383}
9384exports.isBoolean = isBoolean;
9385
9386function isNull(arg) {
9387 return arg === null;
9388}
9389exports.isNull = isNull;
9390
9391function isNullOrUndefined(arg) {
9392 return arg == null;
9393}
9394exports.isNullOrUndefined = isNullOrUndefined;
9395
9396function isNumber(arg) {
9397 return typeof arg === 'number';
9398}
9399exports.isNumber = isNumber;
9400
9401function isString(arg) {
9402 return typeof arg === 'string';
9403}
9404exports.isString = isString;
9405
9406function isSymbol(arg) {
9407 return typeof arg === 'symbol';
9408}
9409exports.isSymbol = isSymbol;
9410
9411function isUndefined(arg) {
9412 return arg === void 0;
9413}
9414exports.isUndefined = isUndefined;
9415
9416function isRegExp(re) {
9417 return objectToString(re) === '[object RegExp]';
9418}
9419exports.isRegExp = isRegExp;
9420
9421function isObject(arg) {
9422 return typeof arg === 'object' && arg !== null;
9423}
9424exports.isObject = isObject;
9425
9426function isDate(d) {
9427 return objectToString(d) === '[object Date]';
9428}
9429exports.isDate = isDate;
9430
9431function isError(e) {
9432 return (objectToString(e) === '[object Error]' || e instanceof Error);
9433}
9434exports.isError = isError;
9435
9436function isFunction(arg) {
9437 return typeof arg === 'function';
9438}
9439exports.isFunction = isFunction;
9440
9441function isPrimitive(arg) {
9442 return arg === null ||
9443 typeof arg === 'boolean' ||
9444 typeof arg === 'number' ||
9445 typeof arg === 'string' ||
9446 typeof arg === 'symbol' || // ES6 symbol
9447 typeof arg === 'undefined';
9448}
9449exports.isPrimitive = isPrimitive;
9450
9451exports.isBuffer = Buffer.isBuffer;
9452
9453function objectToString(o) {
9454 return Object.prototype.toString.call(o);
9455}
9456
9457/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
9458
9459/***/ }),
9460
9461/***/ "./node_modules/create-ecdh/browser.js":
9462/*!*********************************************!*\
9463 !*** ./node_modules/create-ecdh/browser.js ***!
9464 \*********************************************/
9465/*! no static exports found */
9466/***/ (function(module, exports, __webpack_require__) {
9467
9468/* WEBPACK VAR INJECTION */(function(Buffer) {var elliptic = __webpack_require__(/*! elliptic */ "./node_modules/elliptic/lib/elliptic.js")
9469var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
9470
9471module.exports = function createECDH (curve) {
9472 return new ECDH(curve)
9473}
9474
9475var aliases = {
9476 secp256k1: {
9477 name: 'secp256k1',
9478 byteLength: 32
9479 },
9480 secp224r1: {
9481 name: 'p224',
9482 byteLength: 28
9483 },
9484 prime256v1: {
9485 name: 'p256',
9486 byteLength: 32
9487 },
9488 prime192v1: {
9489 name: 'p192',
9490 byteLength: 24
9491 },
9492 ed25519: {
9493 name: 'ed25519',
9494 byteLength: 32
9495 },
9496 secp384r1: {
9497 name: 'p384',
9498 byteLength: 48
9499 },
9500 secp521r1: {
9501 name: 'p521',
9502 byteLength: 66
9503 }
9504}
9505
9506aliases.p224 = aliases.secp224r1
9507aliases.p256 = aliases.secp256r1 = aliases.prime256v1
9508aliases.p192 = aliases.secp192r1 = aliases.prime192v1
9509aliases.p384 = aliases.secp384r1
9510aliases.p521 = aliases.secp521r1
9511
9512function ECDH (curve) {
9513 this.curveType = aliases[curve]
9514 if (!this.curveType) {
9515 this.curveType = {
9516 name: curve
9517 }
9518 }
9519 this.curve = new elliptic.ec(this.curveType.name) // eslint-disable-line new-cap
9520 this.keys = void 0
9521}
9522
9523ECDH.prototype.generateKeys = function (enc, format) {
9524 this.keys = this.curve.genKeyPair()
9525 return this.getPublicKey(enc, format)
9526}
9527
9528ECDH.prototype.computeSecret = function (other, inenc, enc) {
9529 inenc = inenc || 'utf8'
9530 if (!Buffer.isBuffer(other)) {
9531 other = new Buffer(other, inenc)
9532 }
9533 var otherPub = this.curve.keyFromPublic(other).getPublic()
9534 var out = otherPub.mul(this.keys.getPrivate()).getX()
9535 return formatReturnValue(out, enc, this.curveType.byteLength)
9536}
9537
9538ECDH.prototype.getPublicKey = function (enc, format) {
9539 var key = this.keys.getPublic(format === 'compressed', true)
9540 if (format === 'hybrid') {
9541 if (key[key.length - 1] % 2) {
9542 key[0] = 7
9543 } else {
9544 key[0] = 6
9545 }
9546 }
9547 return formatReturnValue(key, enc)
9548}
9549
9550ECDH.prototype.getPrivateKey = function (enc) {
9551 return formatReturnValue(this.keys.getPrivate(), enc)
9552}
9553
9554ECDH.prototype.setPublicKey = function (pub, enc) {
9555 enc = enc || 'utf8'
9556 if (!Buffer.isBuffer(pub)) {
9557 pub = new Buffer(pub, enc)
9558 }
9559 this.keys._importPublic(pub)
9560 return this
9561}
9562
9563ECDH.prototype.setPrivateKey = function (priv, enc) {
9564 enc = enc || 'utf8'
9565 if (!Buffer.isBuffer(priv)) {
9566 priv = new Buffer(priv, enc)
9567 }
9568
9569 var _priv = new BN(priv)
9570 _priv = _priv.toString(16)
9571 this.keys = this.curve.genKeyPair()
9572 this.keys._importPrivate(_priv)
9573 return this
9574}
9575
9576function formatReturnValue (bn, enc, len) {
9577 if (!Array.isArray(bn)) {
9578 bn = bn.toArray()
9579 }
9580 var buf = new Buffer(bn)
9581 if (len && buf.length < len) {
9582 var zeros = new Buffer(len - buf.length)
9583 zeros.fill(0)
9584 buf = Buffer.concat([zeros, buf])
9585 }
9586 if (!enc) {
9587 return buf
9588 } else {
9589 return buf.toString(enc)
9590 }
9591}
9592
9593/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
9594
9595/***/ }),
9596
9597/***/ "./node_modules/create-hash/browser.js":
9598/*!*********************************************!*\
9599 !*** ./node_modules/create-hash/browser.js ***!
9600 \*********************************************/
9601/*! no static exports found */
9602/***/ (function(module, exports, __webpack_require__) {
9603
9604"use strict";
9605
9606var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
9607var MD5 = __webpack_require__(/*! md5.js */ "./node_modules/md5.js/index.js")
9608var RIPEMD160 = __webpack_require__(/*! ripemd160 */ "./node_modules/ripemd160/index.js")
9609var sha = __webpack_require__(/*! sha.js */ "./node_modules/sha.js/index.js")
9610var Base = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
9611
9612function Hash (hash) {
9613 Base.call(this, 'digest')
9614
9615 this._hash = hash
9616}
9617
9618inherits(Hash, Base)
9619
9620Hash.prototype._update = function (data) {
9621 this._hash.update(data)
9622}
9623
9624Hash.prototype._final = function () {
9625 return this._hash.digest()
9626}
9627
9628module.exports = function createHash (alg) {
9629 alg = alg.toLowerCase()
9630 if (alg === 'md5') return new MD5()
9631 if (alg === 'rmd160' || alg === 'ripemd160') return new RIPEMD160()
9632
9633 return new Hash(sha(alg))
9634}
9635
9636
9637/***/ }),
9638
9639/***/ "./node_modules/create-hash/md5.js":
9640/*!*****************************************!*\
9641 !*** ./node_modules/create-hash/md5.js ***!
9642 \*****************************************/
9643/*! no static exports found */
9644/***/ (function(module, exports, __webpack_require__) {
9645
9646var MD5 = __webpack_require__(/*! md5.js */ "./node_modules/md5.js/index.js")
9647
9648module.exports = function (buffer) {
9649 return new MD5().update(buffer).digest()
9650}
9651
9652
9653/***/ }),
9654
9655/***/ "./node_modules/create-hmac/browser.js":
9656/*!*********************************************!*\
9657 !*** ./node_modules/create-hmac/browser.js ***!
9658 \*********************************************/
9659/*! no static exports found */
9660/***/ (function(module, exports, __webpack_require__) {
9661
9662"use strict";
9663
9664var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
9665var Legacy = __webpack_require__(/*! ./legacy */ "./node_modules/create-hmac/legacy.js")
9666var Base = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
9667var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
9668var md5 = __webpack_require__(/*! create-hash/md5 */ "./node_modules/create-hash/md5.js")
9669var RIPEMD160 = __webpack_require__(/*! ripemd160 */ "./node_modules/ripemd160/index.js")
9670
9671var sha = __webpack_require__(/*! sha.js */ "./node_modules/sha.js/index.js")
9672
9673var ZEROS = Buffer.alloc(128)
9674
9675function Hmac (alg, key) {
9676 Base.call(this, 'digest')
9677 if (typeof key === 'string') {
9678 key = Buffer.from(key)
9679 }
9680
9681 var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
9682
9683 this._alg = alg
9684 this._key = key
9685 if (key.length > blocksize) {
9686 var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
9687 key = hash.update(key).digest()
9688 } else if (key.length < blocksize) {
9689 key = Buffer.concat([key, ZEROS], blocksize)
9690 }
9691
9692 var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
9693 var opad = this._opad = Buffer.allocUnsafe(blocksize)
9694
9695 for (var i = 0; i < blocksize; i++) {
9696 ipad[i] = key[i] ^ 0x36
9697 opad[i] = key[i] ^ 0x5C
9698 }
9699 this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
9700 this._hash.update(ipad)
9701}
9702
9703inherits(Hmac, Base)
9704
9705Hmac.prototype._update = function (data) {
9706 this._hash.update(data)
9707}
9708
9709Hmac.prototype._final = function () {
9710 var h = this._hash.digest()
9711 var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)
9712 return hash.update(this._opad).update(h).digest()
9713}
9714
9715module.exports = function createHmac (alg, key) {
9716 alg = alg.toLowerCase()
9717 if (alg === 'rmd160' || alg === 'ripemd160') {
9718 return new Hmac('rmd160', key)
9719 }
9720 if (alg === 'md5') {
9721 return new Legacy(md5, key)
9722 }
9723 return new Hmac(alg, key)
9724}
9725
9726
9727/***/ }),
9728
9729/***/ "./node_modules/create-hmac/legacy.js":
9730/*!********************************************!*\
9731 !*** ./node_modules/create-hmac/legacy.js ***!
9732 \********************************************/
9733/*! no static exports found */
9734/***/ (function(module, exports, __webpack_require__) {
9735
9736"use strict";
9737
9738var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
9739var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
9740
9741var Base = __webpack_require__(/*! cipher-base */ "./node_modules/cipher-base/index.js")
9742
9743var ZEROS = Buffer.alloc(128)
9744var blocksize = 64
9745
9746function Hmac (alg, key) {
9747 Base.call(this, 'digest')
9748 if (typeof key === 'string') {
9749 key = Buffer.from(key)
9750 }
9751
9752 this._alg = alg
9753 this._key = key
9754
9755 if (key.length > blocksize) {
9756 key = alg(key)
9757 } else if (key.length < blocksize) {
9758 key = Buffer.concat([key, ZEROS], blocksize)
9759 }
9760
9761 var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
9762 var opad = this._opad = Buffer.allocUnsafe(blocksize)
9763
9764 for (var i = 0; i < blocksize; i++) {
9765 ipad[i] = key[i] ^ 0x36
9766 opad[i] = key[i] ^ 0x5C
9767 }
9768
9769 this._hash = [ipad]
9770}
9771
9772inherits(Hmac, Base)
9773
9774Hmac.prototype._update = function (data) {
9775 this._hash.push(data)
9776}
9777
9778Hmac.prototype._final = function () {
9779 var h = this._alg(Buffer.concat(this._hash))
9780 return this._alg(Buffer.concat([this._opad, h]))
9781}
9782module.exports = Hmac
9783
9784
9785/***/ }),
9786
9787/***/ "./node_modules/crypto-browserify/index.js":
9788/*!*************************************************!*\
9789 !*** ./node_modules/crypto-browserify/index.js ***!
9790 \*************************************************/
9791/*! no static exports found */
9792/***/ (function(module, exports, __webpack_require__) {
9793
9794"use strict";
9795
9796
9797exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js")
9798exports.createHash = exports.Hash = __webpack_require__(/*! create-hash */ "./node_modules/create-hash/browser.js")
9799exports.createHmac = exports.Hmac = __webpack_require__(/*! create-hmac */ "./node_modules/create-hmac/browser.js")
9800
9801var algos = __webpack_require__(/*! browserify-sign/algos */ "./node_modules/browserify-sign/algos.js")
9802var algoKeys = Object.keys(algos)
9803var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
9804exports.getHashes = function () {
9805 return hashes
9806}
9807
9808var p = __webpack_require__(/*! pbkdf2 */ "./node_modules/pbkdf2/browser.js")
9809exports.pbkdf2 = p.pbkdf2
9810exports.pbkdf2Sync = p.pbkdf2Sync
9811
9812var aes = __webpack_require__(/*! browserify-cipher */ "./node_modules/browserify-cipher/browser.js")
9813
9814exports.Cipher = aes.Cipher
9815exports.createCipher = aes.createCipher
9816exports.Cipheriv = aes.Cipheriv
9817exports.createCipheriv = aes.createCipheriv
9818exports.Decipher = aes.Decipher
9819exports.createDecipher = aes.createDecipher
9820exports.Decipheriv = aes.Decipheriv
9821exports.createDecipheriv = aes.createDecipheriv
9822exports.getCiphers = aes.getCiphers
9823exports.listCiphers = aes.listCiphers
9824
9825var dh = __webpack_require__(/*! diffie-hellman */ "./node_modules/diffie-hellman/browser.js")
9826
9827exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
9828exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
9829exports.getDiffieHellman = dh.getDiffieHellman
9830exports.createDiffieHellman = dh.createDiffieHellman
9831exports.DiffieHellman = dh.DiffieHellman
9832
9833var sign = __webpack_require__(/*! browserify-sign */ "./node_modules/browserify-sign/browser/index.js")
9834
9835exports.createSign = sign.createSign
9836exports.Sign = sign.Sign
9837exports.createVerify = sign.createVerify
9838exports.Verify = sign.Verify
9839
9840exports.createECDH = __webpack_require__(/*! create-ecdh */ "./node_modules/create-ecdh/browser.js")
9841
9842var publicEncrypt = __webpack_require__(/*! public-encrypt */ "./node_modules/public-encrypt/browser.js")
9843
9844exports.publicEncrypt = publicEncrypt.publicEncrypt
9845exports.privateEncrypt = publicEncrypt.privateEncrypt
9846exports.publicDecrypt = publicEncrypt.publicDecrypt
9847exports.privateDecrypt = publicEncrypt.privateDecrypt
9848
9849// the least I can do is make error messages for the rest of the node.js/crypto api.
9850// ;[
9851// 'createCredentials'
9852// ].forEach(function (name) {
9853// exports[name] = function () {
9854// throw new Error([
9855// 'sorry, ' + name + ' is not implemented yet',
9856// 'we accept pull requests',
9857// 'https://github.com/crypto-browserify/crypto-browserify'
9858// ].join('\n'))
9859// }
9860// })
9861
9862var rf = __webpack_require__(/*! randomfill */ "./node_modules/randomfill/browser.js")
9863
9864exports.randomFill = rf.randomFill
9865exports.randomFillSync = rf.randomFillSync
9866
9867exports.createCredentials = function () {
9868 throw new Error([
9869 'sorry, createCredentials is not implemented yet',
9870 'we accept pull requests',
9871 'https://github.com/crypto-browserify/crypto-browserify'
9872 ].join('\n'))
9873}
9874
9875exports.constants = {
9876 'DH_CHECK_P_NOT_SAFE_PRIME': 2,
9877 'DH_CHECK_P_NOT_PRIME': 1,
9878 'DH_UNABLE_TO_CHECK_GENERATOR': 4,
9879 'DH_NOT_SUITABLE_GENERATOR': 8,
9880 'NPN_ENABLED': 1,
9881 'ALPN_ENABLED': 1,
9882 'RSA_PKCS1_PADDING': 1,
9883 'RSA_SSLV23_PADDING': 2,
9884 'RSA_NO_PADDING': 3,
9885 'RSA_PKCS1_OAEP_PADDING': 4,
9886 'RSA_X931_PADDING': 5,
9887 'RSA_PKCS1_PSS_PADDING': 6,
9888 'POINT_CONVERSION_COMPRESSED': 2,
9889 'POINT_CONVERSION_UNCOMPRESSED': 4,
9890 'POINT_CONVERSION_HYBRID': 6
9891}
9892
9893
9894/***/ }),
9895
9896/***/ "./node_modules/crypto-random-string/index.js":
9897/*!****************************************************!*\
9898 !*** ./node_modules/crypto-random-string/index.js ***!
9899 \****************************************************/
9900/*! no static exports found */
9901/***/ (function(module, exports, __webpack_require__) {
9902
9903"use strict";
9904
9905const crypto = __webpack_require__(/*! crypto */ "./node_modules/crypto-browserify/index.js");
9906
9907const urlSafeCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~'.split('');
9908
9909const generateForCustomCharacters = (length, characters) => {
9910 // Generating entropy is faster than complex math operations, so we use the simplest way
9911 const characterCount = characters.length;
9912 const maxValidSelector = (Math.floor(0x10000 / characterCount) * characterCount) - 1; // Using values above this will ruin distribution when using modular division
9913 const entropyLength = 2 * Math.ceil(1.1 * length); // Generating a bit more than required so chances we need more than one pass will be really low
9914 let string = '';
9915 let stringLength = 0;
9916
9917 while (stringLength < length) { // In case we had many bad values, which may happen for character sets of size above 0x8000 but close to it
9918 const entropy = crypto.randomBytes(entropyLength);
9919 let entropyPosition = 0;
9920
9921 while (entropyPosition < entropyLength && stringLength < length) {
9922 const entropyValue = entropy.readUInt16LE(entropyPosition);
9923 entropyPosition += 2;
9924 if (entropyValue > maxValidSelector) { // Skip values which will ruin distribution when using modular division
9925 continue;
9926 }
9927
9928 string += characters[entropyValue % characterCount];
9929 stringLength++;
9930 }
9931 }
9932
9933 return string;
9934};
9935
9936const allowedTypes = [
9937 undefined,
9938 'hex',
9939 'base64',
9940 'url-safe'
9941];
9942
9943module.exports = ({length, type, characters}) => {
9944 if (!(length >= 0 && Number.isFinite(length))) {
9945 throw new TypeError('Expected a `length` to be a non-negative finite number');
9946 }
9947
9948 if (type !== undefined && characters !== undefined) {
9949 throw new TypeError('Expected either `type` or `characters`');
9950 }
9951
9952 if (characters !== undefined && typeof characters !== 'string') {
9953 throw new TypeError('Expected `characters` to be string');
9954 }
9955
9956 if (!allowedTypes.includes(type)) {
9957 throw new TypeError(`Unknown type: ${type}`);
9958 }
9959
9960 if (type === undefined && characters === undefined) {
9961 type = 'hex';
9962 }
9963
9964 if (type === 'hex' || (type === undefined && characters === undefined)) {
9965 return crypto.randomBytes(Math.ceil(length * 0.5)).toString('hex').slice(0, length); // Need 0.5 byte entropy per character
9966 }
9967
9968 if (type === 'base64') {
9969 return crypto.randomBytes(Math.ceil(length * 0.75)).toString('base64').slice(0, length); // Need 0.75 byte of entropy per character
9970 }
9971
9972 if (type === 'url-safe') {
9973 return generateForCustomCharacters(length, urlSafeCharacters);
9974 }
9975
9976 if (characters.length === 0) {
9977 throw new TypeError('Expected `characters` string length to be greater than or equal to 1');
9978 }
9979
9980 if (characters.length > 0x10000) {
9981 throw new TypeError('Expected `characters` string length to be less or equal to 65536');
9982 }
9983
9984 return generateForCustomCharacters(length, characters.split(''));
9985};
9986
9987
9988/***/ }),
9989
9990/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss":
9991/*!*****************************************************************************************************************!*\
9992 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss ***!
9993 \*****************************************************************************************************************/
9994/*! no static exports found */
9995/***/ (function(module, exports, __webpack_require__) {
9996
9997exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
9998// Module
9999exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: lightgrey; }\n\n.edgePath .path {\n stroke: lightgrey;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n\n.cluster rect {\n fill: #6D6D65;\n stroke: rgba(255, 255, 255, 0.25);\n stroke-width: 1px; }\n\n.cluster text {\n fill: #F9FFFE; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #6D6D65;\n border: 1px solid rgba(255, 255, 255, 0.25);\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: lightgrey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: lightgrey; }\n\n#arrowhead {\n fill: lightgrey; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: lightgrey; }\n\n#crosshead path {\n fill: lightgrey !important;\n stroke: lightgrey !important; }\n\n.messageText {\n fill: lightgrey;\n stroke: none; }\n\n.labelBox {\n stroke: #81B1DB;\n fill: #BDD5EA; }\n\n.labelText {\n fill: #323D47;\n stroke: none; }\n\n.loopText {\n fill: lightgrey;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #81B1DB; }\n\n.note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(255, 255, 255, 0.3); }\n\n.section2 {\n fill: #EAE8B9; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #F9FFFE; }\n\n.sectionTitle1 {\n fill: #F9FFFE; }\n\n.sectionTitle2 {\n fill: #F9FFFE; }\n\n.sectionTitle3 {\n fill: #F9FFFE; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #DB5757;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #323D47;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: #323D47;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: #323D47; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #BDD5EA;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: lightgrey; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: lightgrey; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #81B1DB;\n stroke: rgba(255, 255, 255, 0.5); }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #323D47 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #323D47 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #E83737;\n fill: #E83737;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #E83737;\n fill: #81B1DB;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #E83737;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #323D47 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #323D47 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #323D47;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: purple;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #BDD5EA;\n stroke: purple; }\n\ng.classGroup line {\n stroke: purple;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: purple;\n font-size: 10px; }\n\n.relation {\n stroke: purple;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #BDD5EA;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionStart {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: purple;\n stroke: purple;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #323D47;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: purple;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: purple;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #BDD5EA;\n stroke: purple; }\n\ng.stateGroup line {\n stroke: purple;\n stroke-width: 1; }\n\n.transition {\n stroke: purple;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: rgba(255, 255, 255, 0.25);\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #BDD5EA;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n", ""]);
10000
10001
10002
10003/***/ }),
10004
10005/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss":
10006/*!********************************************************************************************************************!*\
10007 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss ***!
10008 \********************************************************************************************************************/
10009/*! no static exports found */
10010/***/ (function(module, exports, __webpack_require__) {
10011
10012exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
10013// Module
10014exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #333333;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n\n.cluster rect {\n fill: #ffffde;\n stroke: #aaaa33;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #ffffde;\n border: 1px solid #aaaa33;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #CCCCFF;\n fill: #ECECFF; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #CCCCFF; }\n\n.note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: rgba(102, 102, 255, 0.49); }\n\n.section2 {\n fill: #fff400; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #8a90dd;\n stroke: #534fbc; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #bfc7ff;\n stroke: #534fbc; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #bfc7ff;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #9370DB;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.classGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #9370DB;\n font-size: 10px; }\n\n.relation {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #ECECFF;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #9370DB;\n stroke: #9370DB;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #9370DB;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #9370DB;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #ECECFF;\n stroke: #9370DB; }\n\ng.stateGroup line {\n stroke: #9370DB;\n stroke-width: 1; }\n\n.transition {\n stroke: #9370DB;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #aaaa33;\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #ECECFF;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n", ""]);
10015
10016
10017
10018/***/ }),
10019
10020/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss":
10021/*!*******************************************************************************************************************!*\
10022 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss ***!
10023 \*******************************************************************************************************************/
10024/*! no static exports found */
10025/***/ (function(module, exports, __webpack_require__) {
10026
10027exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
10028// Module
10029exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: green; }\n\n.edgePath .path {\n stroke: green;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: #e8e8e8;\n text-align: center; }\n\n.cluster rect {\n fill: #cdffb2;\n stroke: #6eaa49;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #cdffb2;\n border: 1px solid #6eaa49;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #13540c;\n fill: #cde498; }\n\ntext.actor {\n fill: black;\n stroke: none; }\n\n.actor-line {\n stroke: grey; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #326932;\n fill: #cde498; }\n\n.labelText {\n fill: black;\n stroke: none; }\n\n.loopText {\n fill: black;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #326932; }\n\n.note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #6eaa49; }\n\n.section2 {\n fill: #6eaa49; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: lightgrey;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: red;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: black;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: black;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #487e3a;\n stroke: #13540c; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: black; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: black; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #cde498;\n stroke: #13540c; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: black !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: grey;\n fill: lightgrey;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: black !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #ff8888;\n fill: red;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #ff8888;\n fill: #cde498;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #ff8888;\n fill: lightgrey;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: black !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: black !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #13540c;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.classGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #13540c;\n font-size: 10px; }\n\n.relation {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #cde498;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #13540c;\n stroke: #13540c;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: black;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #13540c;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #13540c;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #cde498;\n stroke: #13540c; }\n\ng.stateGroup line {\n stroke: #13540c;\n stroke-width: 1; }\n\n.transition {\n stroke: #13540c;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #6eaa49;\n fill: #fff5ad; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #cde498;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n", ""]);
10030
10031
10032
10033/***/ }),
10034
10035/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss":
10036/*!********************************************************************************************************************!*\
10037 !*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss ***!
10038 \********************************************************************************************************************/
10039/*! no static exports found */
10040/***/ (function(module, exports, __webpack_require__) {
10041
10042exports = module.exports = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js")(false);
10043// Module
10044exports.push([module.i, "/* Flowchart variables */\n/* Sequence Diagram variables */\n/* Gantt chart variables */\n/* state colors */\n.label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: #333; }\n\n.label text {\n fill: #333; }\n\n.node rect,\n.node circle,\n.node ellipse,\n.node polygon,\n.node path {\n fill: #eee;\n stroke: #999;\n stroke-width: 1px; }\n\n.node .label {\n text-align: center; }\n\n.node.clickable {\n cursor: pointer; }\n\n.arrowheadPath {\n fill: #333333; }\n\n.edgePath .path {\n stroke: #666;\n stroke-width: 1.5px; }\n\n.edgeLabel {\n background-color: white;\n text-align: center; }\n\n.cluster rect {\n fill: #eaf2fb;\n stroke: #26a;\n stroke-width: 1px; }\n\n.cluster text {\n fill: #333; }\n\ndiv.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: #eaf2fb;\n border: 1px solid #26a;\n border-radius: 2px;\n pointer-events: none;\n z-index: 100; }\n\n.actor {\n stroke: #999;\n fill: #eee; }\n\ntext.actor {\n fill: #333;\n stroke: none; }\n\n.actor-line {\n stroke: #666; }\n\n.messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n.messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: '2 2';\n stroke: #333; }\n\n#arrowhead {\n fill: #333; }\n\n.sequenceNumber {\n fill: white; }\n\n#sequencenumber {\n fill: #333; }\n\n#crosshead path {\n fill: #333 !important;\n stroke: #333 !important; }\n\n.messageText {\n fill: #333;\n stroke: none; }\n\n.labelBox {\n stroke: #999;\n fill: #eee; }\n\n.labelText {\n fill: #333;\n stroke: none; }\n\n.loopText {\n fill: #333;\n stroke: none; }\n\n.loopLine {\n stroke-width: 2;\n stroke-dasharray: '2 2';\n stroke: #999; }\n\n.note {\n stroke: #777700;\n fill: #ffa; }\n\n.noteText {\n fill: black;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 14px; }\n\n.activation0 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation1 {\n fill: #f4f4f4;\n stroke: #666; }\n\n.activation2 {\n fill: #f4f4f4;\n stroke: #666; }\n\n/** Section styling */\n.mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.section {\n stroke: none;\n opacity: 0.2; }\n\n.section0 {\n fill: #80b3e6; }\n\n.section2 {\n fill: #80b3e6; }\n\n.section1,\n.section3 {\n fill: white;\n opacity: 0.2; }\n\n.sectionTitle0 {\n fill: #333; }\n\n.sectionTitle1 {\n fill: #333; }\n\n.sectionTitle2 {\n fill: #333; }\n\n.sectionTitle3 {\n fill: #333; }\n\n.sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n/* Grid and axis */\n.grid .tick {\n stroke: #e6e6e6;\n opacity: 0.8;\n shape-rendering: crispEdges; }\n .grid .tick text {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.grid path {\n stroke-width: 0; }\n\n/* Today line */\n.today {\n fill: none;\n stroke: #d42;\n stroke-width: 2px; }\n\n/* Task styling */\n/* Default task */\n.task {\n stroke-width: 2; }\n\n.taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskText:not([font-size]) {\n font-size: 11px; }\n\n.taskTextOutsideRight {\n fill: #333;\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.taskTextOutsideLeft {\n fill: #333;\n text-anchor: end;\n font-size: 11px; }\n\n/* Special case clickable */\n.task.clickable {\n cursor: pointer; }\n\n.taskText.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n.taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: #003163 !important;\n font-weight: bold; }\n\n/* Specific task settings for the sections*/\n.taskText0,\n.taskText1,\n.taskText2,\n.taskText3 {\n fill: white; }\n\n.task0,\n.task1,\n.task2,\n.task3 {\n fill: #26a;\n stroke: #1a4d80; }\n\n.taskTextOutside0,\n.taskTextOutside2 {\n fill: #333; }\n\n.taskTextOutside1,\n.taskTextOutside3 {\n fill: #333; }\n\n/* Active task */\n.active0,\n.active1,\n.active2,\n.active3 {\n fill: #eee;\n stroke: #1a4d80; }\n\n.activeText0,\n.activeText1,\n.activeText2,\n.activeText3 {\n fill: #333 !important; }\n\n/* Completed task */\n.done0,\n.done1,\n.done2,\n.done3 {\n stroke: #666;\n fill: #bbb;\n stroke-width: 2; }\n\n.doneText0,\n.doneText1,\n.doneText2,\n.doneText3 {\n fill: #333 !important; }\n\n/* Tasks on the critical line */\n.crit0,\n.crit1,\n.crit2,\n.crit3 {\n stroke: #b1361b;\n fill: #d42;\n stroke-width: 2; }\n\n.activeCrit0,\n.activeCrit1,\n.activeCrit2,\n.activeCrit3 {\n stroke: #b1361b;\n fill: #eee;\n stroke-width: 2; }\n\n.doneCrit0,\n.doneCrit1,\n.doneCrit2,\n.doneCrit3 {\n stroke: #b1361b;\n fill: #bbb;\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges; }\n\n.milestone {\n transform: rotate(45deg) scale(0.8, 0.8); }\n\n.milestoneText {\n font-style: italic; }\n\n.doneCritText0,\n.doneCritText1,\n.doneCritText2,\n.doneCritText3 {\n fill: #333 !important; }\n\n.activeCritText0,\n.activeCritText1,\n.activeCritText2,\n.activeCritText3 {\n fill: #333 !important; }\n\n.titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: #333;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.classGroup text {\n fill: #999;\n stroke: none;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 10px; }\n g.classGroup text .title {\n font-weight: bolder; }\n\ng.clickable {\n cursor: pointer; }\n\ng.classGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.classGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.classLabel .label {\n fill: #999;\n font-size: 10px; }\n\n.relation {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n.dashed-line {\n stroke-dasharray: 3; }\n\n#compositionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#compositionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationStart {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#aggregationEnd {\n fill: #eee;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#dependencyEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionStart {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n#extensionEnd {\n fill: #999;\n stroke: #999;\n stroke-width: 1; }\n\n.commit-id,\n.commit-msg,\n.branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: #333;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n.slice {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #999;\n stroke: none;\n font-size: 10px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\ng.stateGroup text {\n fill: #999;\n stroke: none;\n font-size: 10px; }\n\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: black; }\n\ng.stateGroup rect {\n fill: #eee;\n stroke: #999; }\n\ng.stateGroup line {\n stroke: #999;\n stroke-width: 1; }\n\n.transition {\n stroke: #999;\n stroke-width: 1;\n fill: none; }\n\n.stateGroup .composit {\n fill: white;\n border-bottom: 1px; }\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px; }\n\n.state-note {\n stroke: #777700;\n fill: #ffa; }\n .state-note text {\n fill: black;\n stroke: none;\n font-size: 10px; }\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: #eee;\n opacity: 0.5; }\n\n.stateLabel text {\n fill: black;\n font-size: 10px;\n font-weight: bold;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family); }\n\n:root {\n --mermaid-font-family: '\"trebuchet ms\", verdana, arial';\n --mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive; }\n", ""]);
10045
10046
10047
10048/***/ }),
10049
10050/***/ "./node_modules/css-loader/dist/runtime/api.js":
10051/*!*****************************************************!*\
10052 !*** ./node_modules/css-loader/dist/runtime/api.js ***!
10053 \*****************************************************/
10054/*! no static exports found */
10055/***/ (function(module, exports, __webpack_require__) {
10056
10057"use strict";
10058
10059
10060/*
10061 MIT License http://www.opensource.org/licenses/mit-license.php
10062 Author Tobias Koppers @sokra
10063*/
10064// css base code, injected by the css-loader
10065module.exports = function (useSourceMap) {
10066 var list = []; // return the list of modules as css string
10067
10068 list.toString = function toString() {
10069 return this.map(function (item) {
10070 var content = cssWithMappingToString(item, useSourceMap);
10071
10072 if (item[2]) {
10073 return '@media ' + item[2] + '{' + content + '}';
10074 } else {
10075 return content;
10076 }
10077 }).join('');
10078 }; // import a list of modules into the list
10079
10080
10081 list.i = function (modules, mediaQuery) {
10082 if (typeof modules === 'string') {
10083 modules = [[null, modules, '']];
10084 }
10085
10086 var alreadyImportedModules = {};
10087
10088 for (var i = 0; i < this.length; i++) {
10089 var id = this[i][0];
10090
10091 if (id != null) {
10092 alreadyImportedModules[id] = true;
10093 }
10094 }
10095
10096 for (i = 0; i < modules.length; i++) {
10097 var item = modules[i]; // skip already imported module
10098 // this implementation is not 100% perfect for weird media query combinations
10099 // when a module is imported multiple times with different media queries.
10100 // I hope this will never occur (Hey this way we have smaller bundles)
10101
10102 if (item[0] == null || !alreadyImportedModules[item[0]]) {
10103 if (mediaQuery && !item[2]) {
10104 item[2] = mediaQuery;
10105 } else if (mediaQuery) {
10106 item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
10107 }
10108
10109 list.push(item);
10110 }
10111 }
10112 };
10113
10114 return list;
10115};
10116
10117function cssWithMappingToString(item, useSourceMap) {
10118 var content = item[1] || '';
10119 var cssMapping = item[3];
10120
10121 if (!cssMapping) {
10122 return content;
10123 }
10124
10125 if (useSourceMap && typeof btoa === 'function') {
10126 var sourceMapping = toComment(cssMapping);
10127 var sourceURLs = cssMapping.sources.map(function (source) {
10128 return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
10129 });
10130 return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
10131 }
10132
10133 return [content].join('\n');
10134} // Adapted from convert-source-map (MIT)
10135
10136
10137function toComment(sourceMap) {
10138 // eslint-disable-next-line no-undef
10139 var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
10140 var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
10141 return '/*# ' + data + ' */';
10142}
10143
10144/***/ }),
10145
10146/***/ "./node_modules/d3-array/src/array.js":
10147/*!********************************************!*\
10148 !*** ./node_modules/d3-array/src/array.js ***!
10149 \********************************************/
10150/*! exports provided: slice, map */
10151/***/ (function(module, __webpack_exports__, __webpack_require__) {
10152
10153"use strict";
10154__webpack_require__.r(__webpack_exports__);
10155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
10156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
10157var array = Array.prototype;
10158
10159var slice = array.slice;
10160var map = array.map;
10161
10162
10163/***/ }),
10164
10165/***/ "./node_modules/d3-array/src/ascending.js":
10166/*!************************************************!*\
10167 !*** ./node_modules/d3-array/src/ascending.js ***!
10168 \************************************************/
10169/*! exports provided: default */
10170/***/ (function(module, __webpack_exports__, __webpack_require__) {
10171
10172"use strict";
10173__webpack_require__.r(__webpack_exports__);
10174/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
10175 return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
10176});
10177
10178
10179/***/ }),
10180
10181/***/ "./node_modules/d3-array/src/bisect.js":
10182/*!*********************************************!*\
10183 !*** ./node_modules/d3-array/src/bisect.js ***!
10184 \*********************************************/
10185/*! exports provided: bisectRight, bisectLeft, default */
10186/***/ (function(module, __webpack_exports__, __webpack_require__) {
10187
10188"use strict";
10189__webpack_require__.r(__webpack_exports__);
10190/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; });
10191/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; });
10192/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js");
10193/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector */ "./node_modules/d3-array/src/bisector.js");
10194
10195
10196
10197var ascendingBisect = Object(_bisector__WEBPACK_IMPORTED_MODULE_1__["default"])(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"]);
10198var bisectRight = ascendingBisect.right;
10199var bisectLeft = ascendingBisect.left;
10200/* harmony default export */ __webpack_exports__["default"] = (bisectRight);
10201
10202
10203/***/ }),
10204
10205/***/ "./node_modules/d3-array/src/bisector.js":
10206/*!***********************************************!*\
10207 !*** ./node_modules/d3-array/src/bisector.js ***!
10208 \***********************************************/
10209/*! exports provided: default */
10210/***/ (function(module, __webpack_exports__, __webpack_require__) {
10211
10212"use strict";
10213__webpack_require__.r(__webpack_exports__);
10214/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js");
10215
10216
10217/* harmony default export */ __webpack_exports__["default"] = (function(compare) {
10218 if (compare.length === 1) compare = ascendingComparator(compare);
10219 return {
10220 left: function(a, x, lo, hi) {
10221 if (lo == null) lo = 0;
10222 if (hi == null) hi = a.length;
10223 while (lo < hi) {
10224 var mid = lo + hi >>> 1;
10225 if (compare(a[mid], x) < 0) lo = mid + 1;
10226 else hi = mid;
10227 }
10228 return lo;
10229 },
10230 right: function(a, x, lo, hi) {
10231 if (lo == null) lo = 0;
10232 if (hi == null) hi = a.length;
10233 while (lo < hi) {
10234 var mid = lo + hi >>> 1;
10235 if (compare(a[mid], x) > 0) hi = mid;
10236 else lo = mid + 1;
10237 }
10238 return lo;
10239 }
10240 };
10241});
10242
10243function ascendingComparator(f) {
10244 return function(d, x) {
10245 return Object(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"])(f(d), x);
10246 };
10247}
10248
10249
10250/***/ }),
10251
10252/***/ "./node_modules/d3-array/src/constant.js":
10253/*!***********************************************!*\
10254 !*** ./node_modules/d3-array/src/constant.js ***!
10255 \***********************************************/
10256/*! exports provided: default */
10257/***/ (function(module, __webpack_exports__, __webpack_require__) {
10258
10259"use strict";
10260__webpack_require__.r(__webpack_exports__);
10261/* harmony default export */ __webpack_exports__["default"] = (function(x) {
10262 return function() {
10263 return x;
10264 };
10265});
10266
10267
10268/***/ }),
10269
10270/***/ "./node_modules/d3-array/src/cross.js":
10271/*!********************************************!*\
10272 !*** ./node_modules/d3-array/src/cross.js ***!
10273 \********************************************/
10274/*! exports provided: default */
10275/***/ (function(module, __webpack_exports__, __webpack_require__) {
10276
10277"use strict";
10278__webpack_require__.r(__webpack_exports__);
10279/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pairs */ "./node_modules/d3-array/src/pairs.js");
10280
10281
10282/* harmony default export */ __webpack_exports__["default"] = (function(values0, values1, reduce) {
10283 var n0 = values0.length,
10284 n1 = values1.length,
10285 values = new Array(n0 * n1),
10286 i0,
10287 i1,
10288 i,
10289 value0;
10290
10291 if (reduce == null) reduce = _pairs__WEBPACK_IMPORTED_MODULE_0__["pair"];
10292
10293 for (i0 = i = 0; i0 < n0; ++i0) {
10294 for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) {
10295 values[i] = reduce(value0, values1[i1]);
10296 }
10297 }
10298
10299 return values;
10300});
10301
10302
10303/***/ }),
10304
10305/***/ "./node_modules/d3-array/src/descending.js":
10306/*!*************************************************!*\
10307 !*** ./node_modules/d3-array/src/descending.js ***!
10308 \*************************************************/
10309/*! exports provided: default */
10310/***/ (function(module, __webpack_exports__, __webpack_require__) {
10311
10312"use strict";
10313__webpack_require__.r(__webpack_exports__);
10314/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
10315 return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
10316});
10317
10318
10319/***/ }),
10320
10321/***/ "./node_modules/d3-array/src/deviation.js":
10322/*!************************************************!*\
10323 !*** ./node_modules/d3-array/src/deviation.js ***!
10324 \************************************************/
10325/*! exports provided: default */
10326/***/ (function(module, __webpack_exports__, __webpack_require__) {
10327
10328"use strict";
10329__webpack_require__.r(__webpack_exports__);
10330/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance */ "./node_modules/d3-array/src/variance.js");
10331
10332
10333/* harmony default export */ __webpack_exports__["default"] = (function(array, f) {
10334 var v = Object(_variance__WEBPACK_IMPORTED_MODULE_0__["default"])(array, f);
10335 return v ? Math.sqrt(v) : v;
10336});
10337
10338
10339/***/ }),
10340
10341/***/ "./node_modules/d3-array/src/extent.js":
10342/*!*********************************************!*\
10343 !*** ./node_modules/d3-array/src/extent.js ***!
10344 \*********************************************/
10345/*! exports provided: default */
10346/***/ (function(module, __webpack_exports__, __webpack_require__) {
10347
10348"use strict";
10349__webpack_require__.r(__webpack_exports__);
10350/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
10351 var n = values.length,
10352 i = -1,
10353 value,
10354 min,
10355 max;
10356
10357 if (valueof == null) {
10358 while (++i < n) { // Find the first comparable value.
10359 if ((value = values[i]) != null && value >= value) {
10360 min = max = value;
10361 while (++i < n) { // Compare the remaining values.
10362 if ((value = values[i]) != null) {
10363 if (min > value) min = value;
10364 if (max < value) max = value;
10365 }
10366 }
10367 }
10368 }
10369 }
10370
10371 else {
10372 while (++i < n) { // Find the first comparable value.
10373 if ((value = valueof(values[i], i, values)) != null && value >= value) {
10374 min = max = value;
10375 while (++i < n) { // Compare the remaining values.
10376 if ((value = valueof(values[i], i, values)) != null) {
10377 if (min > value) min = value;
10378 if (max < value) max = value;
10379 }
10380 }
10381 }
10382 }
10383 }
10384
10385 return [min, max];
10386});
10387
10388
10389/***/ }),
10390
10391/***/ "./node_modules/d3-array/src/histogram.js":
10392/*!************************************************!*\
10393 !*** ./node_modules/d3-array/src/histogram.js ***!
10394 \************************************************/
10395/*! exports provided: default */
10396/***/ (function(module, __webpack_exports__, __webpack_require__) {
10397
10398"use strict";
10399__webpack_require__.r(__webpack_exports__);
10400/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-array/src/array.js");
10401/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect */ "./node_modules/d3-array/src/bisect.js");
10402/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-array/src/constant.js");
10403/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent */ "./node_modules/d3-array/src/extent.js");
10404/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-array/src/identity.js");
10405/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./range */ "./node_modules/d3-array/src/range.js");
10406/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks */ "./node_modules/d3-array/src/ticks.js");
10407/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges */ "./node_modules/d3-array/src/threshold/sturges.js");
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417/* harmony default export */ __webpack_exports__["default"] = (function() {
10418 var value = _identity__WEBPACK_IMPORTED_MODULE_4__["default"],
10419 domain = _extent__WEBPACK_IMPORTED_MODULE_3__["default"],
10420 threshold = _threshold_sturges__WEBPACK_IMPORTED_MODULE_7__["default"];
10421
10422 function histogram(data) {
10423 var i,
10424 n = data.length,
10425 x,
10426 values = new Array(n);
10427
10428 for (i = 0; i < n; ++i) {
10429 values[i] = value(data[i], i, data);
10430 }
10431
10432 var xz = domain(values),
10433 x0 = xz[0],
10434 x1 = xz[1],
10435 tz = threshold(values, x0, x1);
10436
10437 // Convert number of thresholds into uniform thresholds.
10438 if (!Array.isArray(tz)) {
10439 tz = Object(_ticks__WEBPACK_IMPORTED_MODULE_6__["tickStep"])(x0, x1, tz);
10440 tz = Object(_range__WEBPACK_IMPORTED_MODULE_5__["default"])(Math.ceil(x0 / tz) * tz, x1, tz); // exclusive
10441 }
10442
10443 // Remove any thresholds outside the domain.
10444 var m = tz.length;
10445 while (tz[0] <= x0) tz.shift(), --m;
10446 while (tz[m - 1] > x1) tz.pop(), --m;
10447
10448 var bins = new Array(m + 1),
10449 bin;
10450
10451 // Initialize bins.
10452 for (i = 0; i <= m; ++i) {
10453 bin = bins[i] = [];
10454 bin.x0 = i > 0 ? tz[i - 1] : x0;
10455 bin.x1 = i < m ? tz[i] : x1;
10456 }
10457
10458 // Assign data to bins by value, ignoring any outside the domain.
10459 for (i = 0; i < n; ++i) {
10460 x = values[i];
10461 if (x0 <= x && x <= x1) {
10462 bins[Object(_bisect__WEBPACK_IMPORTED_MODULE_1__["default"])(tz, x, 0, m)].push(data[i]);
10463 }
10464 }
10465
10466 return bins;
10467 }
10468
10469 histogram.value = function(_) {
10470 return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : value;
10471 };
10472
10473 histogram.domain = function(_) {
10474 return arguments.length ? (domain = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])([_[0], _[1]]), histogram) : domain;
10475 };
10476
10477 histogram.thresholds = function(_) {
10478 return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : threshold;
10479 };
10480
10481 return histogram;
10482});
10483
10484
10485/***/ }),
10486
10487/***/ "./node_modules/d3-array/src/identity.js":
10488/*!***********************************************!*\
10489 !*** ./node_modules/d3-array/src/identity.js ***!
10490 \***********************************************/
10491/*! exports provided: default */
10492/***/ (function(module, __webpack_exports__, __webpack_require__) {
10493
10494"use strict";
10495__webpack_require__.r(__webpack_exports__);
10496/* harmony default export */ __webpack_exports__["default"] = (function(x) {
10497 return x;
10498});
10499
10500
10501/***/ }),
10502
10503/***/ "./node_modules/d3-array/src/index.js":
10504/*!********************************************!*\
10505 !*** ./node_modules/d3-array/src/index.js ***!
10506 \********************************************/
10507/*! exports provided: bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip */
10508/***/ (function(module, __webpack_exports__, __webpack_require__) {
10509
10510"use strict";
10511__webpack_require__.r(__webpack_exports__);
10512/* harmony import */ var _bisect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect */ "./node_modules/d3-array/src/bisect.js");
10513/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["default"]; });
10514
10515/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["bisectRight"]; });
10516
10517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return _bisect__WEBPACK_IMPORTED_MODULE_0__["bisectLeft"]; });
10518
10519/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js");
10520/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return _ascending__WEBPACK_IMPORTED_MODULE_1__["default"]; });
10521
10522/* harmony import */ var _bisector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector */ "./node_modules/d3-array/src/bisector.js");
10523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return _bisector__WEBPACK_IMPORTED_MODULE_2__["default"]; });
10524
10525/* harmony import */ var _cross__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cross */ "./node_modules/d3-array/src/cross.js");
10526/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return _cross__WEBPACK_IMPORTED_MODULE_3__["default"]; });
10527
10528/* harmony import */ var _descending__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./descending */ "./node_modules/d3-array/src/descending.js");
10529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return _descending__WEBPACK_IMPORTED_MODULE_4__["default"]; });
10530
10531/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./deviation */ "./node_modules/d3-array/src/deviation.js");
10532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return _deviation__WEBPACK_IMPORTED_MODULE_5__["default"]; });
10533
10534/* harmony import */ var _extent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./extent */ "./node_modules/d3-array/src/extent.js");
10535/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return _extent__WEBPACK_IMPORTED_MODULE_6__["default"]; });
10536
10537/* harmony import */ var _histogram__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./histogram */ "./node_modules/d3-array/src/histogram.js");
10538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return _histogram__WEBPACK_IMPORTED_MODULE_7__["default"]; });
10539
10540/* harmony import */ var _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./threshold/freedmanDiaconis */ "./node_modules/d3-array/src/threshold/freedmanDiaconis.js");
10541/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return _threshold_freedmanDiaconis__WEBPACK_IMPORTED_MODULE_8__["default"]; });
10542
10543/* harmony import */ var _threshold_scott__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold/scott */ "./node_modules/d3-array/src/threshold/scott.js");
10544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return _threshold_scott__WEBPACK_IMPORTED_MODULE_9__["default"]; });
10545
10546/* harmony import */ var _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./threshold/sturges */ "./node_modules/d3-array/src/threshold/sturges.js");
10547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return _threshold_sturges__WEBPACK_IMPORTED_MODULE_10__["default"]; });
10548
10549/* harmony import */ var _max__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./max */ "./node_modules/d3-array/src/max.js");
10550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max__WEBPACK_IMPORTED_MODULE_11__["default"]; });
10551
10552/* harmony import */ var _mean__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./mean */ "./node_modules/d3-array/src/mean.js");
10553/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean__WEBPACK_IMPORTED_MODULE_12__["default"]; });
10554
10555/* harmony import */ var _median__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./median */ "./node_modules/d3-array/src/median.js");
10556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median__WEBPACK_IMPORTED_MODULE_13__["default"]; });
10557
10558/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./merge */ "./node_modules/d3-array/src/merge.js");
10559/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge__WEBPACK_IMPORTED_MODULE_14__["default"]; });
10560
10561/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./min */ "./node_modules/d3-array/src/min.js");
10562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min__WEBPACK_IMPORTED_MODULE_15__["default"]; });
10563
10564/* harmony import */ var _pairs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./pairs */ "./node_modules/d3-array/src/pairs.js");
10565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _pairs__WEBPACK_IMPORTED_MODULE_16__["default"]; });
10566
10567/* harmony import */ var _permute__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./permute */ "./node_modules/d3-array/src/permute.js");
10568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return _permute__WEBPACK_IMPORTED_MODULE_17__["default"]; });
10569
10570/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-array/src/quantile.js");
10571/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return _quantile__WEBPACK_IMPORTED_MODULE_18__["default"]; });
10572
10573/* harmony import */ var _range__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./range */ "./node_modules/d3-array/src/range.js");
10574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range__WEBPACK_IMPORTED_MODULE_19__["default"]; });
10575
10576/* harmony import */ var _scan__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./scan */ "./node_modules/d3-array/src/scan.js");
10577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan__WEBPACK_IMPORTED_MODULE_20__["default"]; });
10578
10579/* harmony import */ var _shuffle__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./shuffle */ "./node_modules/d3-array/src/shuffle.js");
10580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _shuffle__WEBPACK_IMPORTED_MODULE_21__["default"]; });
10581
10582/* harmony import */ var _sum__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sum */ "./node_modules/d3-array/src/sum.js");
10583/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum__WEBPACK_IMPORTED_MODULE_22__["default"]; });
10584
10585/* harmony import */ var _ticks__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./ticks */ "./node_modules/d3-array/src/ticks.js");
10586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["default"]; });
10587
10588/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["tickIncrement"]; });
10589
10590/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return _ticks__WEBPACK_IMPORTED_MODULE_23__["tickStep"]; });
10591
10592/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./transpose */ "./node_modules/d3-array/src/transpose.js");
10593/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose__WEBPACK_IMPORTED_MODULE_24__["default"]; });
10594
10595/* harmony import */ var _variance__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./variance */ "./node_modules/d3-array/src/variance.js");
10596/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return _variance__WEBPACK_IMPORTED_MODULE_25__["default"]; });
10597
10598/* harmony import */ var _zip__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./zip */ "./node_modules/d3-array/src/zip.js");
10599/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip__WEBPACK_IMPORTED_MODULE_26__["default"]; });
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630/***/ }),
10631
10632/***/ "./node_modules/d3-array/src/max.js":
10633/*!******************************************!*\
10634 !*** ./node_modules/d3-array/src/max.js ***!
10635 \******************************************/
10636/*! exports provided: default */
10637/***/ (function(module, __webpack_exports__, __webpack_require__) {
10638
10639"use strict";
10640__webpack_require__.r(__webpack_exports__);
10641/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
10642 var n = values.length,
10643 i = -1,
10644 value,
10645 max;
10646
10647 if (valueof == null) {
10648 while (++i < n) { // Find the first comparable value.
10649 if ((value = values[i]) != null && value >= value) {
10650 max = value;
10651 while (++i < n) { // Compare the remaining values.
10652 if ((value = values[i]) != null && value > max) {
10653 max = value;
10654 }
10655 }
10656 }
10657 }
10658 }
10659
10660 else {
10661 while (++i < n) { // Find the first comparable value.
10662 if ((value = valueof(values[i], i, values)) != null && value >= value) {
10663 max = value;
10664 while (++i < n) { // Compare the remaining values.
10665 if ((value = valueof(values[i], i, values)) != null && value > max) {
10666 max = value;
10667 }
10668 }
10669 }
10670 }
10671 }
10672
10673 return max;
10674});
10675
10676
10677/***/ }),
10678
10679/***/ "./node_modules/d3-array/src/mean.js":
10680/*!*******************************************!*\
10681 !*** ./node_modules/d3-array/src/mean.js ***!
10682 \*******************************************/
10683/*! exports provided: default */
10684/***/ (function(module, __webpack_exports__, __webpack_require__) {
10685
10686"use strict";
10687__webpack_require__.r(__webpack_exports__);
10688/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js");
10689
10690
10691/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
10692 var n = values.length,
10693 m = n,
10694 i = -1,
10695 value,
10696 sum = 0;
10697
10698 if (valueof == null) {
10699 while (++i < n) {
10700 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(values[i]))) sum += value;
10701 else --m;
10702 }
10703 }
10704
10705 else {
10706 while (++i < n) {
10707 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(valueof(values[i], i, values)))) sum += value;
10708 else --m;
10709 }
10710 }
10711
10712 if (m) return sum / m;
10713});
10714
10715
10716/***/ }),
10717
10718/***/ "./node_modules/d3-array/src/median.js":
10719/*!*********************************************!*\
10720 !*** ./node_modules/d3-array/src/median.js ***!
10721 \*********************************************/
10722/*! exports provided: default */
10723/***/ (function(module, __webpack_exports__, __webpack_require__) {
10724
10725"use strict";
10726__webpack_require__.r(__webpack_exports__);
10727/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js");
10728/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js");
10729/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-array/src/quantile.js");
10730
10731
10732
10733
10734/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
10735 var n = values.length,
10736 i = -1,
10737 value,
10738 numbers = [];
10739
10740 if (valueof == null) {
10741 while (++i < n) {
10742 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__["default"])(values[i]))) {
10743 numbers.push(value);
10744 }
10745 }
10746 }
10747
10748 else {
10749 while (++i < n) {
10750 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_1__["default"])(valueof(values[i], i, values)))) {
10751 numbers.push(value);
10752 }
10753 }
10754 }
10755
10756 return Object(_quantile__WEBPACK_IMPORTED_MODULE_2__["default"])(numbers.sort(_ascending__WEBPACK_IMPORTED_MODULE_0__["default"]), 0.5);
10757});
10758
10759
10760/***/ }),
10761
10762/***/ "./node_modules/d3-array/src/merge.js":
10763/*!********************************************!*\
10764 !*** ./node_modules/d3-array/src/merge.js ***!
10765 \********************************************/
10766/*! exports provided: default */
10767/***/ (function(module, __webpack_exports__, __webpack_require__) {
10768
10769"use strict";
10770__webpack_require__.r(__webpack_exports__);
10771/* harmony default export */ __webpack_exports__["default"] = (function(arrays) {
10772 var n = arrays.length,
10773 m,
10774 i = -1,
10775 j = 0,
10776 merged,
10777 array;
10778
10779 while (++i < n) j += arrays[i].length;
10780 merged = new Array(j);
10781
10782 while (--n >= 0) {
10783 array = arrays[n];
10784 m = array.length;
10785 while (--m >= 0) {
10786 merged[--j] = array[m];
10787 }
10788 }
10789
10790 return merged;
10791});
10792
10793
10794/***/ }),
10795
10796/***/ "./node_modules/d3-array/src/min.js":
10797/*!******************************************!*\
10798 !*** ./node_modules/d3-array/src/min.js ***!
10799 \******************************************/
10800/*! exports provided: default */
10801/***/ (function(module, __webpack_exports__, __webpack_require__) {
10802
10803"use strict";
10804__webpack_require__.r(__webpack_exports__);
10805/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
10806 var n = values.length,
10807 i = -1,
10808 value,
10809 min;
10810
10811 if (valueof == null) {
10812 while (++i < n) { // Find the first comparable value.
10813 if ((value = values[i]) != null && value >= value) {
10814 min = value;
10815 while (++i < n) { // Compare the remaining values.
10816 if ((value = values[i]) != null && min > value) {
10817 min = value;
10818 }
10819 }
10820 }
10821 }
10822 }
10823
10824 else {
10825 while (++i < n) { // Find the first comparable value.
10826 if ((value = valueof(values[i], i, values)) != null && value >= value) {
10827 min = value;
10828 while (++i < n) { // Compare the remaining values.
10829 if ((value = valueof(values[i], i, values)) != null && min > value) {
10830 min = value;
10831 }
10832 }
10833 }
10834 }
10835 }
10836
10837 return min;
10838});
10839
10840
10841/***/ }),
10842
10843/***/ "./node_modules/d3-array/src/number.js":
10844/*!*********************************************!*\
10845 !*** ./node_modules/d3-array/src/number.js ***!
10846 \*********************************************/
10847/*! exports provided: default */
10848/***/ (function(module, __webpack_exports__, __webpack_require__) {
10849
10850"use strict";
10851__webpack_require__.r(__webpack_exports__);
10852/* harmony default export */ __webpack_exports__["default"] = (function(x) {
10853 return x === null ? NaN : +x;
10854});
10855
10856
10857/***/ }),
10858
10859/***/ "./node_modules/d3-array/src/pairs.js":
10860/*!********************************************!*\
10861 !*** ./node_modules/d3-array/src/pairs.js ***!
10862 \********************************************/
10863/*! exports provided: default, pair */
10864/***/ (function(module, __webpack_exports__, __webpack_require__) {
10865
10866"use strict";
10867__webpack_require__.r(__webpack_exports__);
10868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return pair; });
10869/* harmony default export */ __webpack_exports__["default"] = (function(array, f) {
10870 if (f == null) f = pair;
10871 var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n);
10872 while (i < n) pairs[i] = f(p, p = array[++i]);
10873 return pairs;
10874});
10875
10876function pair(a, b) {
10877 return [a, b];
10878}
10879
10880
10881/***/ }),
10882
10883/***/ "./node_modules/d3-array/src/permute.js":
10884/*!**********************************************!*\
10885 !*** ./node_modules/d3-array/src/permute.js ***!
10886 \**********************************************/
10887/*! exports provided: default */
10888/***/ (function(module, __webpack_exports__, __webpack_require__) {
10889
10890"use strict";
10891__webpack_require__.r(__webpack_exports__);
10892/* harmony default export */ __webpack_exports__["default"] = (function(array, indexes) {
10893 var i = indexes.length, permutes = new Array(i);
10894 while (i--) permutes[i] = array[indexes[i]];
10895 return permutes;
10896});
10897
10898
10899/***/ }),
10900
10901/***/ "./node_modules/d3-array/src/quantile.js":
10902/*!***********************************************!*\
10903 !*** ./node_modules/d3-array/src/quantile.js ***!
10904 \***********************************************/
10905/*! exports provided: default */
10906/***/ (function(module, __webpack_exports__, __webpack_require__) {
10907
10908"use strict";
10909__webpack_require__.r(__webpack_exports__);
10910/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js");
10911
10912
10913/* harmony default export */ __webpack_exports__["default"] = (function(values, p, valueof) {
10914 if (valueof == null) valueof = _number__WEBPACK_IMPORTED_MODULE_0__["default"];
10915 if (!(n = values.length)) return;
10916 if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);
10917 if (p >= 1) return +valueof(values[n - 1], n - 1, values);
10918 var n,
10919 i = (n - 1) * p,
10920 i0 = Math.floor(i),
10921 value0 = +valueof(values[i0], i0, values),
10922 value1 = +valueof(values[i0 + 1], i0 + 1, values);
10923 return value0 + (value1 - value0) * (i - i0);
10924});
10925
10926
10927/***/ }),
10928
10929/***/ "./node_modules/d3-array/src/range.js":
10930/*!********************************************!*\
10931 !*** ./node_modules/d3-array/src/range.js ***!
10932 \********************************************/
10933/*! exports provided: default */
10934/***/ (function(module, __webpack_exports__, __webpack_require__) {
10935
10936"use strict";
10937__webpack_require__.r(__webpack_exports__);
10938/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, step) {
10939 start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
10940
10941 var i = -1,
10942 n = Math.max(0, Math.ceil((stop - start) / step)) | 0,
10943 range = new Array(n);
10944
10945 while (++i < n) {
10946 range[i] = start + i * step;
10947 }
10948
10949 return range;
10950});
10951
10952
10953/***/ }),
10954
10955/***/ "./node_modules/d3-array/src/scan.js":
10956/*!*******************************************!*\
10957 !*** ./node_modules/d3-array/src/scan.js ***!
10958 \*******************************************/
10959/*! exports provided: default */
10960/***/ (function(module, __webpack_exports__, __webpack_require__) {
10961
10962"use strict";
10963__webpack_require__.r(__webpack_exports__);
10964/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-array/src/ascending.js");
10965
10966
10967/* harmony default export */ __webpack_exports__["default"] = (function(values, compare) {
10968 if (!(n = values.length)) return;
10969 var n,
10970 i = 0,
10971 j = 0,
10972 xi,
10973 xj = values[j];
10974
10975 if (compare == null) compare = _ascending__WEBPACK_IMPORTED_MODULE_0__["default"];
10976
10977 while (++i < n) {
10978 if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) {
10979 xj = xi, j = i;
10980 }
10981 }
10982
10983 if (compare(xj, xj) === 0) return j;
10984});
10985
10986
10987/***/ }),
10988
10989/***/ "./node_modules/d3-array/src/shuffle.js":
10990/*!**********************************************!*\
10991 !*** ./node_modules/d3-array/src/shuffle.js ***!
10992 \**********************************************/
10993/*! exports provided: default */
10994/***/ (function(module, __webpack_exports__, __webpack_require__) {
10995
10996"use strict";
10997__webpack_require__.r(__webpack_exports__);
10998/* harmony default export */ __webpack_exports__["default"] = (function(array, i0, i1) {
10999 var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0),
11000 t,
11001 i;
11002
11003 while (m) {
11004 i = Math.random() * m-- | 0;
11005 t = array[m + i0];
11006 array[m + i0] = array[i + i0];
11007 array[i + i0] = t;
11008 }
11009
11010 return array;
11011});
11012
11013
11014/***/ }),
11015
11016/***/ "./node_modules/d3-array/src/sum.js":
11017/*!******************************************!*\
11018 !*** ./node_modules/d3-array/src/sum.js ***!
11019 \******************************************/
11020/*! exports provided: default */
11021/***/ (function(module, __webpack_exports__, __webpack_require__) {
11022
11023"use strict";
11024__webpack_require__.r(__webpack_exports__);
11025/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
11026 var n = values.length,
11027 i = -1,
11028 value,
11029 sum = 0;
11030
11031 if (valueof == null) {
11032 while (++i < n) {
11033 if (value = +values[i]) sum += value; // Note: zero and null are equivalent.
11034 }
11035 }
11036
11037 else {
11038 while (++i < n) {
11039 if (value = +valueof(values[i], i, values)) sum += value;
11040 }
11041 }
11042
11043 return sum;
11044});
11045
11046
11047/***/ }),
11048
11049/***/ "./node_modules/d3-array/src/threshold/freedmanDiaconis.js":
11050/*!*****************************************************************!*\
11051 !*** ./node_modules/d3-array/src/threshold/freedmanDiaconis.js ***!
11052 \*****************************************************************/
11053/*! exports provided: default */
11054/***/ (function(module, __webpack_exports__, __webpack_require__) {
11055
11056"use strict";
11057__webpack_require__.r(__webpack_exports__);
11058/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array */ "./node_modules/d3-array/src/array.js");
11059/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ascending */ "./node_modules/d3-array/src/ascending.js");
11060/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../number */ "./node_modules/d3-array/src/number.js");
11061/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../quantile */ "./node_modules/d3-array/src/quantile.js");
11062
11063
11064
11065
11066
11067/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) {
11068 values = _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(values, _number__WEBPACK_IMPORTED_MODULE_2__["default"]).sort(_ascending__WEBPACK_IMPORTED_MODULE_1__["default"]);
11069 return Math.ceil((max - min) / (2 * (Object(_quantile__WEBPACK_IMPORTED_MODULE_3__["default"])(values, 0.75) - Object(_quantile__WEBPACK_IMPORTED_MODULE_3__["default"])(values, 0.25)) * Math.pow(values.length, -1 / 3)));
11070});
11071
11072
11073/***/ }),
11074
11075/***/ "./node_modules/d3-array/src/threshold/scott.js":
11076/*!******************************************************!*\
11077 !*** ./node_modules/d3-array/src/threshold/scott.js ***!
11078 \******************************************************/
11079/*! exports provided: default */
11080/***/ (function(module, __webpack_exports__, __webpack_require__) {
11081
11082"use strict";
11083__webpack_require__.r(__webpack_exports__);
11084/* harmony import */ var _deviation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../deviation */ "./node_modules/d3-array/src/deviation.js");
11085
11086
11087/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) {
11088 return Math.ceil((max - min) / (3.5 * Object(_deviation__WEBPACK_IMPORTED_MODULE_0__["default"])(values) * Math.pow(values.length, -1 / 3)));
11089});
11090
11091
11092/***/ }),
11093
11094/***/ "./node_modules/d3-array/src/threshold/sturges.js":
11095/*!********************************************************!*\
11096 !*** ./node_modules/d3-array/src/threshold/sturges.js ***!
11097 \********************************************************/
11098/*! exports provided: default */
11099/***/ (function(module, __webpack_exports__, __webpack_require__) {
11100
11101"use strict";
11102__webpack_require__.r(__webpack_exports__);
11103/* harmony default export */ __webpack_exports__["default"] = (function(values) {
11104 return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
11105});
11106
11107
11108/***/ }),
11109
11110/***/ "./node_modules/d3-array/src/ticks.js":
11111/*!********************************************!*\
11112 !*** ./node_modules/d3-array/src/ticks.js ***!
11113 \********************************************/
11114/*! exports provided: default, tickIncrement, tickStep */
11115/***/ (function(module, __webpack_exports__, __webpack_require__) {
11116
11117"use strict";
11118__webpack_require__.r(__webpack_exports__);
11119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; });
11120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; });
11121var e10 = Math.sqrt(50),
11122 e5 = Math.sqrt(10),
11123 e2 = Math.sqrt(2);
11124
11125/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) {
11126 var reverse,
11127 i = -1,
11128 n,
11129 ticks,
11130 step;
11131
11132 stop = +stop, start = +start, count = +count;
11133 if (start === stop && count > 0) return [start];
11134 if (reverse = stop < start) n = start, start = stop, stop = n;
11135 if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];
11136
11137 if (step > 0) {
11138 start = Math.ceil(start / step);
11139 stop = Math.floor(stop / step);
11140 ticks = new Array(n = Math.ceil(stop - start + 1));
11141 while (++i < n) ticks[i] = (start + i) * step;
11142 } else {
11143 start = Math.floor(start * step);
11144 stop = Math.ceil(stop * step);
11145 ticks = new Array(n = Math.ceil(start - stop + 1));
11146 while (++i < n) ticks[i] = (start - i) / step;
11147 }
11148
11149 if (reverse) ticks.reverse();
11150
11151 return ticks;
11152});
11153
11154function tickIncrement(start, stop, count) {
11155 var step = (stop - start) / Math.max(0, count),
11156 power = Math.floor(Math.log(step) / Math.LN10),
11157 error = step / Math.pow(10, power);
11158 return power >= 0
11159 ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)
11160 : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);
11161}
11162
11163function tickStep(start, stop, count) {
11164 var step0 = Math.abs(stop - start) / Math.max(0, count),
11165 step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),
11166 error = step0 / step1;
11167 if (error >= e10) step1 *= 10;
11168 else if (error >= e5) step1 *= 5;
11169 else if (error >= e2) step1 *= 2;
11170 return stop < start ? -step1 : step1;
11171}
11172
11173
11174/***/ }),
11175
11176/***/ "./node_modules/d3-array/src/transpose.js":
11177/*!************************************************!*\
11178 !*** ./node_modules/d3-array/src/transpose.js ***!
11179 \************************************************/
11180/*! exports provided: default */
11181/***/ (function(module, __webpack_exports__, __webpack_require__) {
11182
11183"use strict";
11184__webpack_require__.r(__webpack_exports__);
11185/* harmony import */ var _min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min */ "./node_modules/d3-array/src/min.js");
11186
11187
11188/* harmony default export */ __webpack_exports__["default"] = (function(matrix) {
11189 if (!(n = matrix.length)) return [];
11190 for (var i = -1, m = Object(_min__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) {
11191 for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {
11192 row[j] = matrix[j][i];
11193 }
11194 }
11195 return transpose;
11196});
11197
11198function length(d) {
11199 return d.length;
11200}
11201
11202
11203/***/ }),
11204
11205/***/ "./node_modules/d3-array/src/variance.js":
11206/*!***********************************************!*\
11207 !*** ./node_modules/d3-array/src/variance.js ***!
11208 \***********************************************/
11209/*! exports provided: default */
11210/***/ (function(module, __webpack_exports__, __webpack_require__) {
11211
11212"use strict";
11213__webpack_require__.r(__webpack_exports__);
11214/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number */ "./node_modules/d3-array/src/number.js");
11215
11216
11217/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) {
11218 var n = values.length,
11219 m = 0,
11220 i = -1,
11221 mean = 0,
11222 value,
11223 delta,
11224 sum = 0;
11225
11226 if (valueof == null) {
11227 while (++i < n) {
11228 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(values[i]))) {
11229 delta = value - mean;
11230 mean += delta / ++m;
11231 sum += delta * (value - mean);
11232 }
11233 }
11234 }
11235
11236 else {
11237 while (++i < n) {
11238 if (!isNaN(value = Object(_number__WEBPACK_IMPORTED_MODULE_0__["default"])(valueof(values[i], i, values)))) {
11239 delta = value - mean;
11240 mean += delta / ++m;
11241 sum += delta * (value - mean);
11242 }
11243 }
11244 }
11245
11246 if (m > 1) return sum / (m - 1);
11247});
11248
11249
11250/***/ }),
11251
11252/***/ "./node_modules/d3-array/src/zip.js":
11253/*!******************************************!*\
11254 !*** ./node_modules/d3-array/src/zip.js ***!
11255 \******************************************/
11256/*! exports provided: default */
11257/***/ (function(module, __webpack_exports__, __webpack_require__) {
11258
11259"use strict";
11260__webpack_require__.r(__webpack_exports__);
11261/* harmony import */ var _transpose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose */ "./node_modules/d3-array/src/transpose.js");
11262
11263
11264/* harmony default export */ __webpack_exports__["default"] = (function() {
11265 return Object(_transpose__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments);
11266});
11267
11268
11269/***/ }),
11270
11271/***/ "./node_modules/d3-axis/src/array.js":
11272/*!*******************************************!*\
11273 !*** ./node_modules/d3-axis/src/array.js ***!
11274 \*******************************************/
11275/*! exports provided: slice */
11276/***/ (function(module, __webpack_exports__, __webpack_require__) {
11277
11278"use strict";
11279__webpack_require__.r(__webpack_exports__);
11280/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
11281var slice = Array.prototype.slice;
11282
11283
11284/***/ }),
11285
11286/***/ "./node_modules/d3-axis/src/axis.js":
11287/*!******************************************!*\
11288 !*** ./node_modules/d3-axis/src/axis.js ***!
11289 \******************************************/
11290/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */
11291/***/ (function(module, __webpack_exports__, __webpack_require__) {
11292
11293"use strict";
11294__webpack_require__.r(__webpack_exports__);
11295/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return axisTop; });
11296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return axisRight; });
11297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return axisBottom; });
11298/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return axisLeft; });
11299/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-axis/src/array.js");
11300/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-axis/src/identity.js");
11301
11302
11303
11304var top = 1,
11305 right = 2,
11306 bottom = 3,
11307 left = 4,
11308 epsilon = 1e-6;
11309
11310function translateX(x) {
11311 return "translate(" + (x + 0.5) + ",0)";
11312}
11313
11314function translateY(y) {
11315 return "translate(0," + (y + 0.5) + ")";
11316}
11317
11318function number(scale) {
11319 return function(d) {
11320 return +scale(d);
11321 };
11322}
11323
11324function center(scale) {
11325 var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset.
11326 if (scale.round()) offset = Math.round(offset);
11327 return function(d) {
11328 return +scale(d) + offset;
11329 };
11330}
11331
11332function entering() {
11333 return !this.__axis;
11334}
11335
11336function axis(orient, scale) {
11337 var tickArguments = [],
11338 tickValues = null,
11339 tickFormat = null,
11340 tickSizeInner = 6,
11341 tickSizeOuter = 6,
11342 tickPadding = 3,
11343 k = orient === top || orient === left ? -1 : 1,
11344 x = orient === left || orient === right ? "x" : "y",
11345 transform = orient === top || orient === bottom ? translateX : translateY;
11346
11347 function axis(context) {
11348 var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues,
11349 format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : _identity__WEBPACK_IMPORTED_MODULE_1__["default"]) : tickFormat,
11350 spacing = Math.max(tickSizeInner, 0) + tickPadding,
11351 range = scale.range(),
11352 range0 = +range[0] + 0.5,
11353 range1 = +range[range.length - 1] + 0.5,
11354 position = (scale.bandwidth ? center : number)(scale.copy()),
11355 selection = context.selection ? context.selection() : context,
11356 path = selection.selectAll(".domain").data([null]),
11357 tick = selection.selectAll(".tick").data(values, scale).order(),
11358 tickExit = tick.exit(),
11359 tickEnter = tick.enter().append("g").attr("class", "tick"),
11360 line = tick.select("line"),
11361 text = tick.select("text");
11362
11363 path = path.merge(path.enter().insert("path", ".tick")
11364 .attr("class", "domain")
11365 .attr("stroke", "currentColor"));
11366
11367 tick = tick.merge(tickEnter);
11368
11369 line = line.merge(tickEnter.append("line")
11370 .attr("stroke", "currentColor")
11371 .attr(x + "2", k * tickSizeInner));
11372
11373 text = text.merge(tickEnter.append("text")
11374 .attr("fill", "currentColor")
11375 .attr(x, k * spacing)
11376 .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em"));
11377
11378 if (context !== selection) {
11379 path = path.transition(context);
11380 tick = tick.transition(context);
11381 line = line.transition(context);
11382 text = text.transition(context);
11383
11384 tickExit = tickExit.transition(context)
11385 .attr("opacity", epsilon)
11386 .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); });
11387
11388 tickEnter
11389 .attr("opacity", epsilon)
11390 .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); });
11391 }
11392
11393 tickExit.remove();
11394
11395 path
11396 .attr("d", orient === left || orient == right
11397 ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1)
11398 : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1));
11399
11400 tick
11401 .attr("opacity", 1)
11402 .attr("transform", function(d) { return transform(position(d)); });
11403
11404 line
11405 .attr(x + "2", k * tickSizeInner);
11406
11407 text
11408 .attr(x, k * spacing)
11409 .text(format);
11410
11411 selection.filter(entering)
11412 .attr("fill", "none")
11413 .attr("font-size", 10)
11414 .attr("font-family", "sans-serif")
11415 .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle");
11416
11417 selection
11418 .each(function() { this.__axis = position; });
11419 }
11420
11421 axis.scale = function(_) {
11422 return arguments.length ? (scale = _, axis) : scale;
11423 };
11424
11425 axis.ticks = function() {
11426 return tickArguments = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments), axis;
11427 };
11428
11429 axis.tickArguments = function(_) {
11430 return arguments.length ? (tickArguments = _ == null ? [] : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickArguments.slice();
11431 };
11432
11433 axis.tickValues = function(_) {
11434 return arguments.length ? (tickValues = _ == null ? null : _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_), axis) : tickValues && tickValues.slice();
11435 };
11436
11437 axis.tickFormat = function(_) {
11438 return arguments.length ? (tickFormat = _, axis) : tickFormat;
11439 };
11440
11441 axis.tickSize = function(_) {
11442 return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner;
11443 };
11444
11445 axis.tickSizeInner = function(_) {
11446 return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner;
11447 };
11448
11449 axis.tickSizeOuter = function(_) {
11450 return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter;
11451 };
11452
11453 axis.tickPadding = function(_) {
11454 return arguments.length ? (tickPadding = +_, axis) : tickPadding;
11455 };
11456
11457 return axis;
11458}
11459
11460function axisTop(scale) {
11461 return axis(top, scale);
11462}
11463
11464function axisRight(scale) {
11465 return axis(right, scale);
11466}
11467
11468function axisBottom(scale) {
11469 return axis(bottom, scale);
11470}
11471
11472function axisLeft(scale) {
11473 return axis(left, scale);
11474}
11475
11476
11477/***/ }),
11478
11479/***/ "./node_modules/d3-axis/src/identity.js":
11480/*!**********************************************!*\
11481 !*** ./node_modules/d3-axis/src/identity.js ***!
11482 \**********************************************/
11483/*! exports provided: default */
11484/***/ (function(module, __webpack_exports__, __webpack_require__) {
11485
11486"use strict";
11487__webpack_require__.r(__webpack_exports__);
11488/* harmony default export */ __webpack_exports__["default"] = (function(x) {
11489 return x;
11490});
11491
11492
11493/***/ }),
11494
11495/***/ "./node_modules/d3-axis/src/index.js":
11496/*!*******************************************!*\
11497 !*** ./node_modules/d3-axis/src/index.js ***!
11498 \*******************************************/
11499/*! exports provided: axisTop, axisRight, axisBottom, axisLeft */
11500/***/ (function(module, __webpack_exports__, __webpack_require__) {
11501
11502"use strict";
11503__webpack_require__.r(__webpack_exports__);
11504/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./axis */ "./node_modules/d3-axis/src/axis.js");
11505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisTop"]; });
11506
11507/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisRight"]; });
11508
11509/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisBottom"]; });
11510
11511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return _axis__WEBPACK_IMPORTED_MODULE_0__["axisLeft"]; });
11512
11513
11514
11515
11516/***/ }),
11517
11518/***/ "./node_modules/d3-brush/src/brush.js":
11519/*!********************************************!*\
11520 !*** ./node_modules/d3-brush/src/brush.js ***!
11521 \********************************************/
11522/*! exports provided: brushSelection, brushX, brushY, default */
11523/***/ (function(module, __webpack_exports__, __webpack_require__) {
11524
11525"use strict";
11526__webpack_require__.r(__webpack_exports__);
11527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; });
11528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; });
11529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; });
11530/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
11531/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js");
11532/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
11533/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
11534/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js");
11535/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-brush/src/constant.js");
11536/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-brush/src/event.js");
11537/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-brush/src/noevent.js");
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547var MODE_DRAG = {name: "drag"},
11548 MODE_SPACE = {name: "space"},
11549 MODE_HANDLE = {name: "handle"},
11550 MODE_CENTER = {name: "center"};
11551
11552function number1(e) {
11553 return [+e[0], +e[1]];
11554}
11555
11556function number2(e) {
11557 return [number1(e[0]), number1(e[1])];
11558}
11559
11560function toucher(identifier) {
11561 return function(target) {
11562 return Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(target, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches, identifier);
11563 };
11564}
11565
11566var X = {
11567 name: "x",
11568 handles: ["w", "e"].map(type),
11569 input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; },
11570 output: function(xy) { return xy && [xy[0][0], xy[1][0]]; }
11571};
11572
11573var Y = {
11574 name: "y",
11575 handles: ["n", "s"].map(type),
11576 input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; },
11577 output: function(xy) { return xy && [xy[0][1], xy[1][1]]; }
11578};
11579
11580var XY = {
11581 name: "xy",
11582 handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type),
11583 input: function(xy) { return xy == null ? null : number2(xy); },
11584 output: function(xy) { return xy; }
11585};
11586
11587var cursors = {
11588 overlay: "crosshair",
11589 selection: "move",
11590 n: "ns-resize",
11591 e: "ew-resize",
11592 s: "ns-resize",
11593 w: "ew-resize",
11594 nw: "nwse-resize",
11595 ne: "nesw-resize",
11596 se: "nwse-resize",
11597 sw: "nesw-resize"
11598};
11599
11600var flipX = {
11601 e: "w",
11602 w: "e",
11603 nw: "ne",
11604 ne: "nw",
11605 se: "sw",
11606 sw: "se"
11607};
11608
11609var flipY = {
11610 n: "s",
11611 s: "n",
11612 nw: "sw",
11613 ne: "se",
11614 se: "ne",
11615 sw: "nw"
11616};
11617
11618var signsX = {
11619 overlay: +1,
11620 selection: +1,
11621 n: null,
11622 e: +1,
11623 s: null,
11624 w: -1,
11625 nw: -1,
11626 ne: +1,
11627 se: +1,
11628 sw: -1
11629};
11630
11631var signsY = {
11632 overlay: +1,
11633 selection: +1,
11634 n: -1,
11635 e: null,
11636 s: +1,
11637 w: null,
11638 nw: -1,
11639 ne: -1,
11640 se: +1,
11641 sw: +1
11642};
11643
11644function type(t) {
11645 return {type: t};
11646}
11647
11648// Ignore right-click, since that should open the context menu.
11649function defaultFilter() {
11650 return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button;
11651}
11652
11653function defaultExtent() {
11654 var svg = this.ownerSVGElement || this;
11655 if (svg.hasAttribute("viewBox")) {
11656 svg = svg.viewBox.baseVal;
11657 return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]];
11658 }
11659 return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]];
11660}
11661
11662function defaultTouchable() {
11663 return navigator.maxTouchPoints || ("ontouchstart" in this);
11664}
11665
11666// Like d3.local, but with the name “__brush” rather than auto-generated.
11667function local(node) {
11668 while (!node.__brush) if (!(node = node.parentNode)) return;
11669 return node.__brush;
11670}
11671
11672function empty(extent) {
11673 return extent[0][0] === extent[1][0]
11674 || extent[0][1] === extent[1][1];
11675}
11676
11677function brushSelection(node) {
11678 var state = node.__brush;
11679 return state ? state.dim.output(state.selection) : null;
11680}
11681
11682function brushX() {
11683 return brush(X);
11684}
11685
11686function brushY() {
11687 return brush(Y);
11688}
11689
11690/* harmony default export */ __webpack_exports__["default"] = (function() {
11691 return brush(XY);
11692});
11693
11694function brush(dim) {
11695 var extent = defaultExtent,
11696 filter = defaultFilter,
11697 touchable = defaultTouchable,
11698 keys = true,
11699 listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "brush", "end"),
11700 handleSize = 6,
11701 touchending;
11702
11703 function brush(group) {
11704 var overlay = group
11705 .property("__brush", initialize)
11706 .selectAll(".overlay")
11707 .data([type("overlay")]);
11708
11709 overlay.enter().append("rect")
11710 .attr("class", "overlay")
11711 .attr("pointer-events", "all")
11712 .attr("cursor", cursors.overlay)
11713 .merge(overlay)
11714 .each(function() {
11715 var extent = local(this).extent;
11716 Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this)
11717 .attr("x", extent[0][0])
11718 .attr("y", extent[0][1])
11719 .attr("width", extent[1][0] - extent[0][0])
11720 .attr("height", extent[1][1] - extent[0][1]);
11721 });
11722
11723 group.selectAll(".selection")
11724 .data([type("selection")])
11725 .enter().append("rect")
11726 .attr("class", "selection")
11727 .attr("cursor", cursors.selection)
11728 .attr("fill", "#777")
11729 .attr("fill-opacity", 0.3)
11730 .attr("stroke", "#fff")
11731 .attr("shape-rendering", "crispEdges");
11732
11733 var handle = group.selectAll(".handle")
11734 .data(dim.handles, function(d) { return d.type; });
11735
11736 handle.exit().remove();
11737
11738 handle.enter().append("rect")
11739 .attr("class", function(d) { return "handle handle--" + d.type; })
11740 .attr("cursor", function(d) { return cursors[d.type]; });
11741
11742 group
11743 .each(redraw)
11744 .attr("fill", "none")
11745 .attr("pointer-events", "all")
11746 .on("mousedown.brush", started)
11747 .filter(touchable)
11748 .on("touchstart.brush", started)
11749 .on("touchmove.brush", touchmoved)
11750 .on("touchend.brush touchcancel.brush", touchended)
11751 .style("touch-action", "none")
11752 .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
11753 }
11754
11755 brush.move = function(group, selection) {
11756 if (group.selection) {
11757 group
11758 .on("start.brush", function() { emitter(this, arguments).beforestart().start(); })
11759 .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); })
11760 .tween("brush", function() {
11761 var that = this,
11762 state = that.__brush,
11763 emit = emitter(that, arguments),
11764 selection0 = state.selection,
11765 selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
11766 i = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolate"])(selection0, selection1);
11767
11768 function tween(t) {
11769 state.selection = t === 1 && selection1 === null ? null : i(t);
11770 redraw.call(that);
11771 emit.brush();
11772 }
11773
11774 return selection0 !== null && selection1 !== null ? tween : tween(1);
11775 });
11776 } else {
11777 group
11778 .each(function() {
11779 var that = this,
11780 args = arguments,
11781 state = that.__brush,
11782 selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
11783 emit = emitter(that, args).beforestart();
11784
11785 Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that);
11786 state.selection = selection1 === null ? null : selection1;
11787 redraw.call(that);
11788 emit.start().brush().end();
11789 });
11790 }
11791 };
11792
11793 brush.clear = function(group) {
11794 brush.move(group, null);
11795 };
11796
11797 function redraw() {
11798 var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this),
11799 selection = local(this).selection;
11800
11801 if (selection) {
11802 group.selectAll(".selection")
11803 .style("display", null)
11804 .attr("x", selection[0][0])
11805 .attr("y", selection[0][1])
11806 .attr("width", selection[1][0] - selection[0][0])
11807 .attr("height", selection[1][1] - selection[0][1]);
11808
11809 group.selectAll(".handle")
11810 .style("display", null)
11811 .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })
11812 .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })
11813 .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })
11814 .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });
11815 }
11816
11817 else {
11818 group.selectAll(".selection,.handle")
11819 .style("display", "none")
11820 .attr("x", null)
11821 .attr("y", null)
11822 .attr("width", null)
11823 .attr("height", null);
11824 }
11825 }
11826
11827 function emitter(that, args, clean) {
11828 return (!clean && that.__brush.emitter) || new Emitter(that, args);
11829 }
11830
11831 function Emitter(that, args) {
11832 this.that = that;
11833 this.args = args;
11834 this.state = that.__brush;
11835 this.active = 0;
11836 }
11837
11838 Emitter.prototype = {
11839 beforestart: function() {
11840 if (++this.active === 1) this.state.emitter = this, this.starting = true;
11841 return this;
11842 },
11843 start: function() {
11844 if (this.starting) this.starting = false, this.emit("start");
11845 else this.emit("brush");
11846 return this;
11847 },
11848 brush: function() {
11849 this.emit("brush");
11850 return this;
11851 },
11852 end: function() {
11853 if (--this.active === 0) delete this.state.emitter, this.emit("end");
11854 return this;
11855 },
11856 emit: function(type) {
11857 Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]);
11858 }
11859 };
11860
11861 function started() {
11862 if (touchending && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) return;
11863 if (!filter.apply(this, arguments)) return;
11864
11865 var that = this,
11866 type = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].target.__data__.type,
11867 mode = (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey ? MODE_CENTER : MODE_HANDLE),
11868 signX = dim === Y ? null : signsX[type],
11869 signY = dim === X ? null : signsY[type],
11870 state = local(that),
11871 extent = state.extent,
11872 selection = state.selection,
11873 W = extent[0][0], w0, w1,
11874 N = extent[0][1], n0, n1,
11875 E = extent[1][0], e0, e1,
11876 S = extent[1][1], s0, s1,
11877 dx = 0,
11878 dy = 0,
11879 moving,
11880 shifting = signX && signY && keys && d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey,
11881 lockX,
11882 lockY,
11883 pointer = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches ? toucher(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches[0].identifier) : d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"],
11884 point0 = pointer(that),
11885 point = point0,
11886 emit = emitter(that, arguments, true).beforestart();
11887
11888 if (type === "overlay") {
11889 if (selection) moving = true;
11890 state.selection = selection = [
11891 [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],
11892 [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]
11893 ];
11894 } else {
11895 w0 = selection[0][0];
11896 n0 = selection[0][1];
11897 e0 = selection[1][0];
11898 s0 = selection[1][1];
11899 }
11900
11901 w1 = w0;
11902 n1 = n0;
11903 e1 = e0;
11904 s1 = s0;
11905
11906 var group = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(that)
11907 .attr("pointer-events", "none");
11908
11909 var overlay = group.selectAll(".overlay")
11910 .attr("cursor", cursors[type]);
11911
11912 if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) {
11913 emit.moved = moved;
11914 emit.ended = ended;
11915 } else {
11916 var view = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view)
11917 .on("mousemove.brush", moved, true)
11918 .on("mouseup.brush", ended, true);
11919 if (keys) view
11920 .on("keydown.brush", keydowned, true)
11921 .on("keyup.brush", keyupped, true)
11922
11923 Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view);
11924 }
11925
11926 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])();
11927 Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(that);
11928 redraw.call(that);
11929 emit.start();
11930
11931 function moved() {
11932 var point1 = pointer(that);
11933 if (shifting && !lockX && !lockY) {
11934 if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;
11935 else lockX = true;
11936 }
11937 point = point1;
11938 moving = true;
11939 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])();
11940 move();
11941 }
11942
11943 function move() {
11944 var t;
11945
11946 dx = point[0] - point0[0];
11947 dy = point[1] - point0[1];
11948
11949 switch (mode) {
11950 case MODE_SPACE:
11951 case MODE_DRAG: {
11952 if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
11953 if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
11954 break;
11955 }
11956 case MODE_HANDLE: {
11957 if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
11958 else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
11959 if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
11960 else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
11961 break;
11962 }
11963 case MODE_CENTER: {
11964 if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX));
11965 if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY));
11966 break;
11967 }
11968 }
11969
11970 if (e1 < w1) {
11971 signX *= -1;
11972 t = w0, w0 = e0, e0 = t;
11973 t = w1, w1 = e1, e1 = t;
11974 if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]);
11975 }
11976
11977 if (s1 < n1) {
11978 signY *= -1;
11979 t = n0, n0 = s0, s0 = t;
11980 t = n1, n1 = s1, s1 = t;
11981 if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
11982 }
11983
11984 if (state.selection) selection = state.selection; // May be set by brush.move!
11985 if (lockX) w1 = selection[0][0], e1 = selection[1][0];
11986 if (lockY) n1 = selection[0][1], s1 = selection[1][1];
11987
11988 if (selection[0][0] !== w1
11989 || selection[0][1] !== n1
11990 || selection[1][0] !== e1
11991 || selection[1][1] !== s1) {
11992 state.selection = [[w1, n1], [e1, s1]];
11993 redraw.call(that);
11994 emit.brush();
11995 }
11996 }
11997
11998 function ended() {
11999 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["nopropagation"])();
12000 if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches) {
12001 if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches.length) return;
12002 if (touchending) clearTimeout(touchending);
12003 touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
12004 } else {
12005 Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, moving);
12006 view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null);
12007 }
12008 group.attr("pointer-events", "all");
12009 overlay.attr("cursor", cursors.overlay);
12010 if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
12011 if (empty(selection)) state.selection = null, redraw.call(that);
12012 emit.end();
12013 }
12014
12015 function keydowned() {
12016 switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) {
12017 case 16: { // SHIFT
12018 shifting = signX && signY;
12019 break;
12020 }
12021 case 18: { // ALT
12022 if (mode === MODE_HANDLE) {
12023 if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
12024 if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
12025 mode = MODE_CENTER;
12026 move();
12027 }
12028 break;
12029 }
12030 case 32: { // SPACE; takes priority over ALT
12031 if (mode === MODE_HANDLE || mode === MODE_CENTER) {
12032 if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx;
12033 if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy;
12034 mode = MODE_SPACE;
12035 overlay.attr("cursor", cursors.selection);
12036 move();
12037 }
12038 break;
12039 }
12040 default: return;
12041 }
12042 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])();
12043 }
12044
12045 function keyupped() {
12046 switch (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].keyCode) {
12047 case 16: { // SHIFT
12048 if (shifting) {
12049 lockX = lockY = shifting = false;
12050 move();
12051 }
12052 break;
12053 }
12054 case 18: { // ALT
12055 if (mode === MODE_CENTER) {
12056 if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
12057 if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
12058 mode = MODE_HANDLE;
12059 move();
12060 }
12061 break;
12062 }
12063 case 32: { // SPACE
12064 if (mode === MODE_SPACE) {
12065 if (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].altKey) {
12066 if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
12067 if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
12068 mode = MODE_CENTER;
12069 } else {
12070 if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1;
12071 if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1;
12072 mode = MODE_HANDLE;
12073 }
12074 overlay.attr("cursor", cursors[type]);
12075 move();
12076 }
12077 break;
12078 }
12079 default: return;
12080 }
12081 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_7__["default"])();
12082 }
12083 }
12084
12085 function touchmoved() {
12086 emitter(this, arguments).moved();
12087 }
12088
12089 function touchended() {
12090 emitter(this, arguments).ended();
12091 }
12092
12093 function initialize() {
12094 var state = this.__brush || {selection: null};
12095 state.extent = number2(extent.apply(this, arguments));
12096 state.dim = dim;
12097 return state;
12098 }
12099
12100 brush.extent = function(_) {
12101 return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(number2(_)), brush) : extent;
12102 };
12103
12104 brush.filter = function(_) {
12105 return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : filter;
12106 };
12107
12108 brush.touchable = function(_) {
12109 return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), brush) : touchable;
12110 };
12111
12112 brush.handleSize = function(_) {
12113 return arguments.length ? (handleSize = +_, brush) : handleSize;
12114 };
12115
12116 brush.keyModifiers = function(_) {
12117 return arguments.length ? (keys = !!_, brush) : keys;
12118 };
12119
12120 brush.on = function() {
12121 var value = listeners.on.apply(listeners, arguments);
12122 return value === listeners ? brush : value;
12123 };
12124
12125 return brush;
12126}
12127
12128
12129/***/ }),
12130
12131/***/ "./node_modules/d3-brush/src/constant.js":
12132/*!***********************************************!*\
12133 !*** ./node_modules/d3-brush/src/constant.js ***!
12134 \***********************************************/
12135/*! exports provided: default */
12136/***/ (function(module, __webpack_exports__, __webpack_require__) {
12137
12138"use strict";
12139__webpack_require__.r(__webpack_exports__);
12140/* harmony default export */ __webpack_exports__["default"] = (function(x) {
12141 return function() {
12142 return x;
12143 };
12144});
12145
12146
12147/***/ }),
12148
12149/***/ "./node_modules/d3-brush/src/event.js":
12150/*!********************************************!*\
12151 !*** ./node_modules/d3-brush/src/event.js ***!
12152 \********************************************/
12153/*! exports provided: default */
12154/***/ (function(module, __webpack_exports__, __webpack_require__) {
12155
12156"use strict";
12157__webpack_require__.r(__webpack_exports__);
12158/* harmony default export */ __webpack_exports__["default"] = (function(target, type, selection) {
12159 this.target = target;
12160 this.type = type;
12161 this.selection = selection;
12162});
12163
12164
12165/***/ }),
12166
12167/***/ "./node_modules/d3-brush/src/index.js":
12168/*!********************************************!*\
12169 !*** ./node_modules/d3-brush/src/index.js ***!
12170 \********************************************/
12171/*! exports provided: brush, brushX, brushY, brushSelection */
12172/***/ (function(module, __webpack_exports__, __webpack_require__) {
12173
12174"use strict";
12175__webpack_require__.r(__webpack_exports__);
12176/* harmony import */ var _brush_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./brush.js */ "./node_modules/d3-brush/src/brush.js");
12177/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
12178
12179/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushX"]; });
12180
12181/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushY"]; });
12182
12183/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return _brush_js__WEBPACK_IMPORTED_MODULE_0__["brushSelection"]; });
12184
12185
12186
12187
12188/***/ }),
12189
12190/***/ "./node_modules/d3-brush/src/noevent.js":
12191/*!**********************************************!*\
12192 !*** ./node_modules/d3-brush/src/noevent.js ***!
12193 \**********************************************/
12194/*! exports provided: nopropagation, default */
12195/***/ (function(module, __webpack_exports__, __webpack_require__) {
12196
12197"use strict";
12198__webpack_require__.r(__webpack_exports__);
12199/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; });
12200/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
12201
12202
12203function nopropagation() {
12204 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
12205}
12206
12207/* harmony default export */ __webpack_exports__["default"] = (function() {
12208 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault();
12209 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
12210});
12211
12212
12213/***/ }),
12214
12215/***/ "./node_modules/d3-chord/src/array.js":
12216/*!********************************************!*\
12217 !*** ./node_modules/d3-chord/src/array.js ***!
12218 \********************************************/
12219/*! exports provided: slice */
12220/***/ (function(module, __webpack_exports__, __webpack_require__) {
12221
12222"use strict";
12223__webpack_require__.r(__webpack_exports__);
12224/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
12225var slice = Array.prototype.slice;
12226
12227
12228/***/ }),
12229
12230/***/ "./node_modules/d3-chord/src/chord.js":
12231/*!********************************************!*\
12232 !*** ./node_modules/d3-chord/src/chord.js ***!
12233 \********************************************/
12234/*! exports provided: default */
12235/***/ (function(module, __webpack_exports__, __webpack_require__) {
12236
12237"use strict";
12238__webpack_require__.r(__webpack_exports__);
12239/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
12240/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js");
12241
12242
12243
12244function compareValue(compare) {
12245 return function(a, b) {
12246 return compare(
12247 a.source.value + a.target.value,
12248 b.source.value + b.target.value
12249 );
12250 };
12251}
12252
12253/* harmony default export */ __webpack_exports__["default"] = (function() {
12254 var padAngle = 0,
12255 sortGroups = null,
12256 sortSubgroups = null,
12257 sortChords = null;
12258
12259 function chord(matrix) {
12260 var n = matrix.length,
12261 groupSums = [],
12262 groupIndex = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n),
12263 subgroupIndex = [],
12264 chords = [],
12265 groups = chords.groups = new Array(n),
12266 subgroups = new Array(n * n),
12267 k,
12268 x,
12269 x0,
12270 dx,
12271 i,
12272 j;
12273
12274 // Compute the sum.
12275 k = 0, i = -1; while (++i < n) {
12276 x = 0, j = -1; while (++j < n) {
12277 x += matrix[i][j];
12278 }
12279 groupSums.push(x);
12280 subgroupIndex.push(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n));
12281 k += x;
12282 }
12283
12284 // Sort groups…
12285 if (sortGroups) groupIndex.sort(function(a, b) {
12286 return sortGroups(groupSums[a], groupSums[b]);
12287 });
12288
12289 // Sort subgroups…
12290 if (sortSubgroups) subgroupIndex.forEach(function(d, i) {
12291 d.sort(function(a, b) {
12292 return sortSubgroups(matrix[i][a], matrix[i][b]);
12293 });
12294 });
12295
12296 // Convert the sum to scaling factor for [0, 2pi].
12297 // TODO Allow start and end angle to be specified?
12298 // TODO Allow padding to be specified as percentage?
12299 k = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _math__WEBPACK_IMPORTED_MODULE_1__["tau"] - padAngle * n) / k;
12300 dx = k ? padAngle : _math__WEBPACK_IMPORTED_MODULE_1__["tau"] / n;
12301
12302 // Compute the start and end angle for each group and subgroup.
12303 // Note: Opera has a bug reordering object literal properties!
12304 x = 0, i = -1; while (++i < n) {
12305 x0 = x, j = -1; while (++j < n) {
12306 var di = groupIndex[i],
12307 dj = subgroupIndex[di][j],
12308 v = matrix[di][dj],
12309 a0 = x,
12310 a1 = x += v * k;
12311 subgroups[dj * n + di] = {
12312 index: di,
12313 subindex: dj,
12314 startAngle: a0,
12315 endAngle: a1,
12316 value: v
12317 };
12318 }
12319 groups[di] = {
12320 index: di,
12321 startAngle: x0,
12322 endAngle: x,
12323 value: groupSums[di]
12324 };
12325 x += dx;
12326 }
12327
12328 // Generate chords for each (non-empty) subgroup-subgroup link.
12329 i = -1; while (++i < n) {
12330 j = i - 1; while (++j < n) {
12331 var source = subgroups[j * n + i],
12332 target = subgroups[i * n + j];
12333 if (source.value || target.value) {
12334 chords.push(source.value < target.value
12335 ? {source: target, target: source}
12336 : {source: source, target: target});
12337 }
12338 }
12339 }
12340
12341 return sortChords ? chords.sort(sortChords) : chords;
12342 }
12343
12344 chord.padAngle = function(_) {
12345 return arguments.length ? (padAngle = Object(_math__WEBPACK_IMPORTED_MODULE_1__["max"])(0, _), chord) : padAngle;
12346 };
12347
12348 chord.sortGroups = function(_) {
12349 return arguments.length ? (sortGroups = _, chord) : sortGroups;
12350 };
12351
12352 chord.sortSubgroups = function(_) {
12353 return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups;
12354 };
12355
12356 chord.sortChords = function(_) {
12357 return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._;
12358 };
12359
12360 return chord;
12361});
12362
12363
12364/***/ }),
12365
12366/***/ "./node_modules/d3-chord/src/constant.js":
12367/*!***********************************************!*\
12368 !*** ./node_modules/d3-chord/src/constant.js ***!
12369 \***********************************************/
12370/*! exports provided: default */
12371/***/ (function(module, __webpack_exports__, __webpack_require__) {
12372
12373"use strict";
12374__webpack_require__.r(__webpack_exports__);
12375/* harmony default export */ __webpack_exports__["default"] = (function(x) {
12376 return function() {
12377 return x;
12378 };
12379});
12380
12381
12382/***/ }),
12383
12384/***/ "./node_modules/d3-chord/src/index.js":
12385/*!********************************************!*\
12386 !*** ./node_modules/d3-chord/src/index.js ***!
12387 \********************************************/
12388/*! exports provided: chord, ribbon */
12389/***/ (function(module, __webpack_exports__, __webpack_require__) {
12390
12391"use strict";
12392__webpack_require__.r(__webpack_exports__);
12393/* harmony import */ var _chord__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chord */ "./node_modules/d3-chord/src/chord.js");
12394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return _chord__WEBPACK_IMPORTED_MODULE_0__["default"]; });
12395
12396/* harmony import */ var _ribbon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ribbon */ "./node_modules/d3-chord/src/ribbon.js");
12397/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return _ribbon__WEBPACK_IMPORTED_MODULE_1__["default"]; });
12398
12399
12400
12401
12402
12403/***/ }),
12404
12405/***/ "./node_modules/d3-chord/src/math.js":
12406/*!*******************************************!*\
12407 !*** ./node_modules/d3-chord/src/math.js ***!
12408 \*******************************************/
12409/*! exports provided: cos, sin, pi, halfPi, tau, max */
12410/***/ (function(module, __webpack_exports__, __webpack_require__) {
12411
12412"use strict";
12413__webpack_require__.r(__webpack_exports__);
12414/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; });
12415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; });
12416/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; });
12417/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; });
12418/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; });
12419/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
12420var cos = Math.cos;
12421var sin = Math.sin;
12422var pi = Math.PI;
12423var halfPi = pi / 2;
12424var tau = pi * 2;
12425var max = Math.max;
12426
12427
12428/***/ }),
12429
12430/***/ "./node_modules/d3-chord/src/ribbon.js":
12431/*!*********************************************!*\
12432 !*** ./node_modules/d3-chord/src/ribbon.js ***!
12433 \*********************************************/
12434/*! exports provided: default */
12435/***/ (function(module, __webpack_exports__, __webpack_require__) {
12436
12437"use strict";
12438__webpack_require__.r(__webpack_exports__);
12439/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-chord/src/array.js");
12440/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-chord/src/constant.js");
12441/* harmony import */ var _math__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math */ "./node_modules/d3-chord/src/math.js");
12442/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
12443
12444
12445
12446
12447
12448function defaultSource(d) {
12449 return d.source;
12450}
12451
12452function defaultTarget(d) {
12453 return d.target;
12454}
12455
12456function defaultRadius(d) {
12457 return d.radius;
12458}
12459
12460function defaultStartAngle(d) {
12461 return d.startAngle;
12462}
12463
12464function defaultEndAngle(d) {
12465 return d.endAngle;
12466}
12467
12468/* harmony default export */ __webpack_exports__["default"] = (function() {
12469 var source = defaultSource,
12470 target = defaultTarget,
12471 radius = defaultRadius,
12472 startAngle = defaultStartAngle,
12473 endAngle = defaultEndAngle,
12474 context = null;
12475
12476 function ribbon() {
12477 var buffer,
12478 argv = _array__WEBPACK_IMPORTED_MODULE_0__["slice"].call(arguments),
12479 s = source.apply(this, argv),
12480 t = target.apply(this, argv),
12481 sr = +radius.apply(this, (argv[0] = s, argv)),
12482 sa0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"],
12483 sa1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"],
12484 sx0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(sa0),
12485 sy0 = sr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(sa0),
12486 tr = +radius.apply(this, (argv[0] = t, argv)),
12487 ta0 = startAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"],
12488 ta1 = endAngle.apply(this, argv) - _math__WEBPACK_IMPORTED_MODULE_2__["halfPi"];
12489
12490 if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_3__["path"])();
12491
12492 context.moveTo(sx0, sy0);
12493 context.arc(0, 0, sr, sa0, sa1);
12494 if (sa0 !== ta0 || sa1 !== ta1) { // TODO sr !== tr?
12495 context.quadraticCurveTo(0, 0, tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["cos"])(ta0), tr * Object(_math__WEBPACK_IMPORTED_MODULE_2__["sin"])(ta0));
12496 context.arc(0, 0, tr, ta0, ta1);
12497 }
12498 context.quadraticCurveTo(0, 0, sx0, sy0);
12499 context.closePath();
12500
12501 if (buffer) return context = null, buffer + "" || null;
12502 }
12503
12504 ribbon.radius = function(_) {
12505 return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : radius;
12506 };
12507
12508 ribbon.startAngle = function(_) {
12509 return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : startAngle;
12510 };
12511
12512 ribbon.endAngle = function(_) {
12513 return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), ribbon) : endAngle;
12514 };
12515
12516 ribbon.source = function(_) {
12517 return arguments.length ? (source = _, ribbon) : source;
12518 };
12519
12520 ribbon.target = function(_) {
12521 return arguments.length ? (target = _, ribbon) : target;
12522 };
12523
12524 ribbon.context = function(_) {
12525 return arguments.length ? ((context = _ == null ? null : _), ribbon) : context;
12526 };
12527
12528 return ribbon;
12529});
12530
12531
12532/***/ }),
12533
12534/***/ "./node_modules/d3-collection/src/entries.js":
12535/*!***************************************************!*\
12536 !*** ./node_modules/d3-collection/src/entries.js ***!
12537 \***************************************************/
12538/*! exports provided: default */
12539/***/ (function(module, __webpack_exports__, __webpack_require__) {
12540
12541"use strict";
12542__webpack_require__.r(__webpack_exports__);
12543/* harmony default export */ __webpack_exports__["default"] = (function(map) {
12544 var entries = [];
12545 for (var key in map) entries.push({key: key, value: map[key]});
12546 return entries;
12547});
12548
12549
12550/***/ }),
12551
12552/***/ "./node_modules/d3-collection/src/index.js":
12553/*!*************************************************!*\
12554 !*** ./node_modules/d3-collection/src/index.js ***!
12555 \*************************************************/
12556/*! exports provided: nest, set, map, keys, values, entries */
12557/***/ (function(module, __webpack_exports__, __webpack_require__) {
12558
12559"use strict";
12560__webpack_require__.r(__webpack_exports__);
12561/* harmony import */ var _nest__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nest */ "./node_modules/d3-collection/src/nest.js");
12562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return _nest__WEBPACK_IMPORTED_MODULE_0__["default"]; });
12563
12564/* harmony import */ var _set__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./set */ "./node_modules/d3-collection/src/set.js");
12565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set__WEBPACK_IMPORTED_MODULE_1__["default"]; });
12566
12567/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js");
12568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map__WEBPACK_IMPORTED_MODULE_2__["default"]; });
12569
12570/* harmony import */ var _keys__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./keys */ "./node_modules/d3-collection/src/keys.js");
12571/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return _keys__WEBPACK_IMPORTED_MODULE_3__["default"]; });
12572
12573/* harmony import */ var _values__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./values */ "./node_modules/d3-collection/src/values.js");
12574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return _values__WEBPACK_IMPORTED_MODULE_4__["default"]; });
12575
12576/* harmony import */ var _entries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./entries */ "./node_modules/d3-collection/src/entries.js");
12577/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return _entries__WEBPACK_IMPORTED_MODULE_5__["default"]; });
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587/***/ }),
12588
12589/***/ "./node_modules/d3-collection/src/keys.js":
12590/*!************************************************!*\
12591 !*** ./node_modules/d3-collection/src/keys.js ***!
12592 \************************************************/
12593/*! exports provided: default */
12594/***/ (function(module, __webpack_exports__, __webpack_require__) {
12595
12596"use strict";
12597__webpack_require__.r(__webpack_exports__);
12598/* harmony default export */ __webpack_exports__["default"] = (function(map) {
12599 var keys = [];
12600 for (var key in map) keys.push(key);
12601 return keys;
12602});
12603
12604
12605/***/ }),
12606
12607/***/ "./node_modules/d3-collection/src/map.js":
12608/*!***********************************************!*\
12609 !*** ./node_modules/d3-collection/src/map.js ***!
12610 \***********************************************/
12611/*! exports provided: prefix, default */
12612/***/ (function(module, __webpack_exports__, __webpack_require__) {
12613
12614"use strict";
12615__webpack_require__.r(__webpack_exports__);
12616/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefix", function() { return prefix; });
12617var prefix = "$";
12618
12619function Map() {}
12620
12621Map.prototype = map.prototype = {
12622 constructor: Map,
12623 has: function(key) {
12624 return (prefix + key) in this;
12625 },
12626 get: function(key) {
12627 return this[prefix + key];
12628 },
12629 set: function(key, value) {
12630 this[prefix + key] = value;
12631 return this;
12632 },
12633 remove: function(key) {
12634 var property = prefix + key;
12635 return property in this && delete this[property];
12636 },
12637 clear: function() {
12638 for (var property in this) if (property[0] === prefix) delete this[property];
12639 },
12640 keys: function() {
12641 var keys = [];
12642 for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));
12643 return keys;
12644 },
12645 values: function() {
12646 var values = [];
12647 for (var property in this) if (property[0] === prefix) values.push(this[property]);
12648 return values;
12649 },
12650 entries: function() {
12651 var entries = [];
12652 for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});
12653 return entries;
12654 },
12655 size: function() {
12656 var size = 0;
12657 for (var property in this) if (property[0] === prefix) ++size;
12658 return size;
12659 },
12660 empty: function() {
12661 for (var property in this) if (property[0] === prefix) return false;
12662 return true;
12663 },
12664 each: function(f) {
12665 for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);
12666 }
12667};
12668
12669function map(object, f) {
12670 var map = new Map;
12671
12672 // Copy constructor.
12673 if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
12674
12675 // Index array by numeric index or specified key function.
12676 else if (Array.isArray(object)) {
12677 var i = -1,
12678 n = object.length,
12679 o;
12680
12681 if (f == null) while (++i < n) map.set(i, object[i]);
12682 else while (++i < n) map.set(f(o = object[i], i, object), o);
12683 }
12684
12685 // Convert object to map.
12686 else if (object) for (var key in object) map.set(key, object[key]);
12687
12688 return map;
12689}
12690
12691/* harmony default export */ __webpack_exports__["default"] = (map);
12692
12693
12694/***/ }),
12695
12696/***/ "./node_modules/d3-collection/src/nest.js":
12697/*!************************************************!*\
12698 !*** ./node_modules/d3-collection/src/nest.js ***!
12699 \************************************************/
12700/*! exports provided: default */
12701/***/ (function(module, __webpack_exports__, __webpack_require__) {
12702
12703"use strict";
12704__webpack_require__.r(__webpack_exports__);
12705/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js");
12706
12707
12708/* harmony default export */ __webpack_exports__["default"] = (function() {
12709 var keys = [],
12710 sortKeys = [],
12711 sortValues,
12712 rollup,
12713 nest;
12714
12715 function apply(array, depth, createResult, setResult) {
12716 if (depth >= keys.length) {
12717 if (sortValues != null) array.sort(sortValues);
12718 return rollup != null ? rollup(array) : array;
12719 }
12720
12721 var i = -1,
12722 n = array.length,
12723 key = keys[depth++],
12724 keyValue,
12725 value,
12726 valuesByKey = Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])(),
12727 values,
12728 result = createResult();
12729
12730 while (++i < n) {
12731 if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
12732 values.push(value);
12733 } else {
12734 valuesByKey.set(keyValue, [value]);
12735 }
12736 }
12737
12738 valuesByKey.each(function(values, key) {
12739 setResult(result, key, apply(values, depth, createResult, setResult));
12740 });
12741
12742 return result;
12743 }
12744
12745 function entries(map, depth) {
12746 if (++depth > keys.length) return map;
12747 var array, sortKey = sortKeys[depth - 1];
12748 if (rollup != null && depth >= keys.length) array = map.entries();
12749 else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
12750 return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
12751 }
12752
12753 return nest = {
12754 object: function(array) { return apply(array, 0, createObject, setObject); },
12755 map: function(array) { return apply(array, 0, createMap, setMap); },
12756 entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
12757 key: function(d) { keys.push(d); return nest; },
12758 sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
12759 sortValues: function(order) { sortValues = order; return nest; },
12760 rollup: function(f) { rollup = f; return nest; }
12761 };
12762});
12763
12764function createObject() {
12765 return {};
12766}
12767
12768function setObject(object, key, value) {
12769 object[key] = value;
12770}
12771
12772function createMap() {
12773 return Object(_map__WEBPACK_IMPORTED_MODULE_0__["default"])();
12774}
12775
12776function setMap(map, key, value) {
12777 map.set(key, value);
12778}
12779
12780
12781/***/ }),
12782
12783/***/ "./node_modules/d3-collection/src/set.js":
12784/*!***********************************************!*\
12785 !*** ./node_modules/d3-collection/src/set.js ***!
12786 \***********************************************/
12787/*! exports provided: default */
12788/***/ (function(module, __webpack_exports__, __webpack_require__) {
12789
12790"use strict";
12791__webpack_require__.r(__webpack_exports__);
12792/* harmony import */ var _map__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./map */ "./node_modules/d3-collection/src/map.js");
12793
12794
12795function Set() {}
12796
12797var proto = _map__WEBPACK_IMPORTED_MODULE_0__["default"].prototype;
12798
12799Set.prototype = set.prototype = {
12800 constructor: Set,
12801 has: proto.has,
12802 add: function(value) {
12803 value += "";
12804 this[_map__WEBPACK_IMPORTED_MODULE_0__["prefix"] + value] = value;
12805 return this;
12806 },
12807 remove: proto.remove,
12808 clear: proto.clear,
12809 values: proto.keys,
12810 size: proto.size,
12811 empty: proto.empty,
12812 each: proto.each
12813};
12814
12815function set(object, f) {
12816 var set = new Set;
12817
12818 // Copy constructor.
12819 if (object instanceof Set) object.each(function(value) { set.add(value); });
12820
12821 // Otherwise, assume it’s an array.
12822 else if (object) {
12823 var i = -1, n = object.length;
12824 if (f == null) while (++i < n) set.add(object[i]);
12825 else while (++i < n) set.add(f(object[i], i, object));
12826 }
12827
12828 return set;
12829}
12830
12831/* harmony default export */ __webpack_exports__["default"] = (set);
12832
12833
12834/***/ }),
12835
12836/***/ "./node_modules/d3-collection/src/values.js":
12837/*!**************************************************!*\
12838 !*** ./node_modules/d3-collection/src/values.js ***!
12839 \**************************************************/
12840/*! exports provided: default */
12841/***/ (function(module, __webpack_exports__, __webpack_require__) {
12842
12843"use strict";
12844__webpack_require__.r(__webpack_exports__);
12845/* harmony default export */ __webpack_exports__["default"] = (function(map) {
12846 var values = [];
12847 for (var key in map) values.push(map[key]);
12848 return values;
12849});
12850
12851
12852/***/ }),
12853
12854/***/ "./node_modules/d3-color/src/color.js":
12855/*!********************************************!*\
12856 !*** ./node_modules/d3-color/src/color.js ***!
12857 \********************************************/
12858/*! exports provided: Color, darker, brighter, default, rgbConvert, rgb, Rgb, hslConvert, hsl */
12859/***/ (function(module, __webpack_exports__, __webpack_require__) {
12860
12861"use strict";
12862__webpack_require__.r(__webpack_exports__);
12863/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Color", function() { return Color; });
12864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "darker", function() { return darker; });
12865/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "brighter", function() { return brighter; });
12866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return color; });
12867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbConvert", function() { return rgbConvert; });
12868/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; });
12869/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Rgb", function() { return Rgb; });
12870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslConvert", function() { return hslConvert; });
12871/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; });
12872/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js");
12873
12874
12875function Color() {}
12876
12877var darker = 0.7;
12878var brighter = 1 / darker;
12879
12880var reI = "\\s*([+-]?\\d+)\\s*",
12881 reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
12882 reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
12883 reHex = /^#([0-9a-f]{3,8})$/,
12884 reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
12885 reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
12886 reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
12887 reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
12888 reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
12889 reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
12890
12891var named = {
12892 aliceblue: 0xf0f8ff,
12893 antiquewhite: 0xfaebd7,
12894 aqua: 0x00ffff,
12895 aquamarine: 0x7fffd4,
12896 azure: 0xf0ffff,
12897 beige: 0xf5f5dc,
12898 bisque: 0xffe4c4,
12899 black: 0x000000,
12900 blanchedalmond: 0xffebcd,
12901 blue: 0x0000ff,
12902 blueviolet: 0x8a2be2,
12903 brown: 0xa52a2a,
12904 burlywood: 0xdeb887,
12905 cadetblue: 0x5f9ea0,
12906 chartreuse: 0x7fff00,
12907 chocolate: 0xd2691e,
12908 coral: 0xff7f50,
12909 cornflowerblue: 0x6495ed,
12910 cornsilk: 0xfff8dc,
12911 crimson: 0xdc143c,
12912 cyan: 0x00ffff,
12913 darkblue: 0x00008b,
12914 darkcyan: 0x008b8b,
12915 darkgoldenrod: 0xb8860b,
12916 darkgray: 0xa9a9a9,
12917 darkgreen: 0x006400,
12918 darkgrey: 0xa9a9a9,
12919 darkkhaki: 0xbdb76b,
12920 darkmagenta: 0x8b008b,
12921 darkolivegreen: 0x556b2f,
12922 darkorange: 0xff8c00,
12923 darkorchid: 0x9932cc,
12924 darkred: 0x8b0000,
12925 darksalmon: 0xe9967a,
12926 darkseagreen: 0x8fbc8f,
12927 darkslateblue: 0x483d8b,
12928 darkslategray: 0x2f4f4f,
12929 darkslategrey: 0x2f4f4f,
12930 darkturquoise: 0x00ced1,
12931 darkviolet: 0x9400d3,
12932 deeppink: 0xff1493,
12933 deepskyblue: 0x00bfff,
12934 dimgray: 0x696969,
12935 dimgrey: 0x696969,
12936 dodgerblue: 0x1e90ff,
12937 firebrick: 0xb22222,
12938 floralwhite: 0xfffaf0,
12939 forestgreen: 0x228b22,
12940 fuchsia: 0xff00ff,
12941 gainsboro: 0xdcdcdc,
12942 ghostwhite: 0xf8f8ff,
12943 gold: 0xffd700,
12944 goldenrod: 0xdaa520,
12945 gray: 0x808080,
12946 green: 0x008000,
12947 greenyellow: 0xadff2f,
12948 grey: 0x808080,
12949 honeydew: 0xf0fff0,
12950 hotpink: 0xff69b4,
12951 indianred: 0xcd5c5c,
12952 indigo: 0x4b0082,
12953 ivory: 0xfffff0,
12954 khaki: 0xf0e68c,
12955 lavender: 0xe6e6fa,
12956 lavenderblush: 0xfff0f5,
12957 lawngreen: 0x7cfc00,
12958 lemonchiffon: 0xfffacd,
12959 lightblue: 0xadd8e6,
12960 lightcoral: 0xf08080,
12961 lightcyan: 0xe0ffff,
12962 lightgoldenrodyellow: 0xfafad2,
12963 lightgray: 0xd3d3d3,
12964 lightgreen: 0x90ee90,
12965 lightgrey: 0xd3d3d3,
12966 lightpink: 0xffb6c1,
12967 lightsalmon: 0xffa07a,
12968 lightseagreen: 0x20b2aa,
12969 lightskyblue: 0x87cefa,
12970 lightslategray: 0x778899,
12971 lightslategrey: 0x778899,
12972 lightsteelblue: 0xb0c4de,
12973 lightyellow: 0xffffe0,
12974 lime: 0x00ff00,
12975 limegreen: 0x32cd32,
12976 linen: 0xfaf0e6,
12977 magenta: 0xff00ff,
12978 maroon: 0x800000,
12979 mediumaquamarine: 0x66cdaa,
12980 mediumblue: 0x0000cd,
12981 mediumorchid: 0xba55d3,
12982 mediumpurple: 0x9370db,
12983 mediumseagreen: 0x3cb371,
12984 mediumslateblue: 0x7b68ee,
12985 mediumspringgreen: 0x00fa9a,
12986 mediumturquoise: 0x48d1cc,
12987 mediumvioletred: 0xc71585,
12988 midnightblue: 0x191970,
12989 mintcream: 0xf5fffa,
12990 mistyrose: 0xffe4e1,
12991 moccasin: 0xffe4b5,
12992 navajowhite: 0xffdead,
12993 navy: 0x000080,
12994 oldlace: 0xfdf5e6,
12995 olive: 0x808000,
12996 olivedrab: 0x6b8e23,
12997 orange: 0xffa500,
12998 orangered: 0xff4500,
12999 orchid: 0xda70d6,
13000 palegoldenrod: 0xeee8aa,
13001 palegreen: 0x98fb98,
13002 paleturquoise: 0xafeeee,
13003 palevioletred: 0xdb7093,
13004 papayawhip: 0xffefd5,
13005 peachpuff: 0xffdab9,
13006 peru: 0xcd853f,
13007 pink: 0xffc0cb,
13008 plum: 0xdda0dd,
13009 powderblue: 0xb0e0e6,
13010 purple: 0x800080,
13011 rebeccapurple: 0x663399,
13012 red: 0xff0000,
13013 rosybrown: 0xbc8f8f,
13014 royalblue: 0x4169e1,
13015 saddlebrown: 0x8b4513,
13016 salmon: 0xfa8072,
13017 sandybrown: 0xf4a460,
13018 seagreen: 0x2e8b57,
13019 seashell: 0xfff5ee,
13020 sienna: 0xa0522d,
13021 silver: 0xc0c0c0,
13022 skyblue: 0x87ceeb,
13023 slateblue: 0x6a5acd,
13024 slategray: 0x708090,
13025 slategrey: 0x708090,
13026 snow: 0xfffafa,
13027 springgreen: 0x00ff7f,
13028 steelblue: 0x4682b4,
13029 tan: 0xd2b48c,
13030 teal: 0x008080,
13031 thistle: 0xd8bfd8,
13032 tomato: 0xff6347,
13033 turquoise: 0x40e0d0,
13034 violet: 0xee82ee,
13035 wheat: 0xf5deb3,
13036 white: 0xffffff,
13037 whitesmoke: 0xf5f5f5,
13038 yellow: 0xffff00,
13039 yellowgreen: 0x9acd32
13040};
13041
13042Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Color, color, {
13043 copy: function(channels) {
13044 return Object.assign(new this.constructor, this, channels);
13045 },
13046 displayable: function() {
13047 return this.rgb().displayable();
13048 },
13049 hex: color_formatHex, // Deprecated! Use color.formatHex.
13050 formatHex: color_formatHex,
13051 formatHsl: color_formatHsl,
13052 formatRgb: color_formatRgb,
13053 toString: color_formatRgb
13054});
13055
13056function color_formatHex() {
13057 return this.rgb().formatHex();
13058}
13059
13060function color_formatHsl() {
13061 return hslConvert(this).formatHsl();
13062}
13063
13064function color_formatRgb() {
13065 return this.rgb().formatRgb();
13066}
13067
13068function color(format) {
13069 var m, l;
13070 format = (format + "").trim().toLowerCase();
13071 return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000
13072 : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00
13073 : l === 8 ? new Rgb(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000
13074 : l === 4 ? new Rgb((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000
13075 : null) // invalid hex
13076 : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)
13077 : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)
13078 : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)
13079 : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)
13080 : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)
13081 : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)
13082 : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins
13083 : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0)
13084 : null;
13085}
13086
13087function rgbn(n) {
13088 return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);
13089}
13090
13091function rgba(r, g, b, a) {
13092 if (a <= 0) r = g = b = NaN;
13093 return new Rgb(r, g, b, a);
13094}
13095
13096function rgbConvert(o) {
13097 if (!(o instanceof Color)) o = color(o);
13098 if (!o) return new Rgb;
13099 o = o.rgb();
13100 return new Rgb(o.r, o.g, o.b, o.opacity);
13101}
13102
13103function rgb(r, g, b, opacity) {
13104 return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);
13105}
13106
13107function Rgb(r, g, b, opacity) {
13108 this.r = +r;
13109 this.g = +g;
13110 this.b = +b;
13111 this.opacity = +opacity;
13112}
13113
13114Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Rgb, rgb, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, {
13115 brighter: function(k) {
13116 k = k == null ? brighter : Math.pow(brighter, k);
13117 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
13118 },
13119 darker: function(k) {
13120 k = k == null ? darker : Math.pow(darker, k);
13121 return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);
13122 },
13123 rgb: function() {
13124 return this;
13125 },
13126 displayable: function() {
13127 return (-0.5 <= this.r && this.r < 255.5)
13128 && (-0.5 <= this.g && this.g < 255.5)
13129 && (-0.5 <= this.b && this.b < 255.5)
13130 && (0 <= this.opacity && this.opacity <= 1);
13131 },
13132 hex: rgb_formatHex, // Deprecated! Use color.formatHex.
13133 formatHex: rgb_formatHex,
13134 formatRgb: rgb_formatRgb,
13135 toString: rgb_formatRgb
13136}));
13137
13138function rgb_formatHex() {
13139 return "#" + hex(this.r) + hex(this.g) + hex(this.b);
13140}
13141
13142function rgb_formatRgb() {
13143 var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
13144 return (a === 1 ? "rgb(" : "rgba(")
13145 + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", "
13146 + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", "
13147 + Math.max(0, Math.min(255, Math.round(this.b) || 0))
13148 + (a === 1 ? ")" : ", " + a + ")");
13149}
13150
13151function hex(value) {
13152 value = Math.max(0, Math.min(255, Math.round(value) || 0));
13153 return (value < 16 ? "0" : "") + value.toString(16);
13154}
13155
13156function hsla(h, s, l, a) {
13157 if (a <= 0) h = s = l = NaN;
13158 else if (l <= 0 || l >= 1) h = s = NaN;
13159 else if (s <= 0) h = NaN;
13160 return new Hsl(h, s, l, a);
13161}
13162
13163function hslConvert(o) {
13164 if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
13165 if (!(o instanceof Color)) o = color(o);
13166 if (!o) return new Hsl;
13167 if (o instanceof Hsl) return o;
13168 o = o.rgb();
13169 var r = o.r / 255,
13170 g = o.g / 255,
13171 b = o.b / 255,
13172 min = Math.min(r, g, b),
13173 max = Math.max(r, g, b),
13174 h = NaN,
13175 s = max - min,
13176 l = (max + min) / 2;
13177 if (s) {
13178 if (r === max) h = (g - b) / s + (g < b) * 6;
13179 else if (g === max) h = (b - r) / s + 2;
13180 else h = (r - g) / s + 4;
13181 s /= l < 0.5 ? max + min : 2 - max - min;
13182 h *= 60;
13183 } else {
13184 s = l > 0 && l < 1 ? 0 : h;
13185 }
13186 return new Hsl(h, s, l, o.opacity);
13187}
13188
13189function hsl(h, s, l, opacity) {
13190 return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);
13191}
13192
13193function Hsl(h, s, l, opacity) {
13194 this.h = +h;
13195 this.s = +s;
13196 this.l = +l;
13197 this.opacity = +opacity;
13198}
13199
13200Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hsl, hsl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(Color, {
13201 brighter: function(k) {
13202 k = k == null ? brighter : Math.pow(brighter, k);
13203 return new Hsl(this.h, this.s, this.l * k, this.opacity);
13204 },
13205 darker: function(k) {
13206 k = k == null ? darker : Math.pow(darker, k);
13207 return new Hsl(this.h, this.s, this.l * k, this.opacity);
13208 },
13209 rgb: function() {
13210 var h = this.h % 360 + (this.h < 0) * 360,
13211 s = isNaN(h) || isNaN(this.s) ? 0 : this.s,
13212 l = this.l,
13213 m2 = l + (l < 0.5 ? l : 1 - l) * s,
13214 m1 = 2 * l - m2;
13215 return new Rgb(
13216 hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),
13217 hsl2rgb(h, m1, m2),
13218 hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),
13219 this.opacity
13220 );
13221 },
13222 displayable: function() {
13223 return (0 <= this.s && this.s <= 1 || isNaN(this.s))
13224 && (0 <= this.l && this.l <= 1)
13225 && (0 <= this.opacity && this.opacity <= 1);
13226 },
13227 formatHsl: function() {
13228 var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
13229 return (a === 1 ? "hsl(" : "hsla(")
13230 + (this.h || 0) + ", "
13231 + (this.s || 0) * 100 + "%, "
13232 + (this.l || 0) * 100 + "%"
13233 + (a === 1 ? ")" : ", " + a + ")");
13234 }
13235}));
13236
13237/* From FvD 13.37, CSS Color Module Level 3 */
13238function hsl2rgb(h, m1, m2) {
13239 return (h < 60 ? m1 + (m2 - m1) * h / 60
13240 : h < 180 ? m2
13241 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60
13242 : m1) * 255;
13243}
13244
13245
13246/***/ }),
13247
13248/***/ "./node_modules/d3-color/src/cubehelix.js":
13249/*!************************************************!*\
13250 !*** ./node_modules/d3-color/src/cubehelix.js ***!
13251 \************************************************/
13252/*! exports provided: default, Cubehelix */
13253/***/ (function(module, __webpack_exports__, __webpack_require__) {
13254
13255"use strict";
13256__webpack_require__.r(__webpack_exports__);
13257/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cubehelix; });
13258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubehelix", function() { return Cubehelix; });
13259/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js");
13260/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js");
13261/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js");
13262
13263
13264
13265
13266var A = -0.14861,
13267 B = +1.78277,
13268 C = -0.29227,
13269 D = -0.90649,
13270 E = +1.97294,
13271 ED = E * D,
13272 EB = E * B,
13273 BC_DA = B * C - D * A;
13274
13275function cubehelixConvert(o) {
13276 if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
13277 if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o);
13278 var r = o.r / 255,
13279 g = o.g / 255,
13280 b = o.b / 255,
13281 l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
13282 bl = b - l,
13283 k = (E * (g - l) - C * bl) / D,
13284 s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1
13285 h = s ? Math.atan2(k, bl) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"] - 120 : NaN;
13286 return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
13287}
13288
13289function cubehelix(h, s, l, opacity) {
13290 return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
13291}
13292
13293function Cubehelix(h, s, l, opacity) {
13294 this.h = +h;
13295 this.s = +s;
13296 this.l = +l;
13297 this.opacity = +opacity;
13298}
13299
13300Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Cubehelix, cubehelix, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], {
13301 brighter: function(k) {
13302 k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["brighter"], k);
13303 return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
13304 },
13305 darker: function(k) {
13306 k = k == null ? _color_js__WEBPACK_IMPORTED_MODULE_1__["darker"] : Math.pow(_color_js__WEBPACK_IMPORTED_MODULE_1__["darker"], k);
13307 return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
13308 },
13309 rgb: function() {
13310 var h = isNaN(this.h) ? 0 : (this.h + 120) * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"],
13311 l = +this.l,
13312 a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
13313 cosh = Math.cos(h),
13314 sinh = Math.sin(h);
13315 return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"](
13316 255 * (l + a * (A * cosh + B * sinh)),
13317 255 * (l + a * (C * cosh + D * sinh)),
13318 255 * (l + a * (E * cosh)),
13319 this.opacity
13320 );
13321 }
13322}));
13323
13324
13325/***/ }),
13326
13327/***/ "./node_modules/d3-color/src/define.js":
13328/*!*********************************************!*\
13329 !*** ./node_modules/d3-color/src/define.js ***!
13330 \*********************************************/
13331/*! exports provided: default, extend */
13332/***/ (function(module, __webpack_exports__, __webpack_require__) {
13333
13334"use strict";
13335__webpack_require__.r(__webpack_exports__);
13336/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; });
13337/* harmony default export */ __webpack_exports__["default"] = (function(constructor, factory, prototype) {
13338 constructor.prototype = factory.prototype = prototype;
13339 prototype.constructor = constructor;
13340});
13341
13342function extend(parent, definition) {
13343 var prototype = Object.create(parent.prototype);
13344 for (var key in definition) prototype[key] = definition[key];
13345 return prototype;
13346}
13347
13348
13349/***/ }),
13350
13351/***/ "./node_modules/d3-color/src/index.js":
13352/*!********************************************!*\
13353 !*** ./node_modules/d3-color/src/index.js ***!
13354 \********************************************/
13355/*! exports provided: color, rgb, hsl, lab, hcl, lch, gray, cubehelix */
13356/***/ (function(module, __webpack_exports__, __webpack_require__) {
13357
13358"use strict";
13359__webpack_require__.r(__webpack_exports__);
13360/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js");
13361/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
13362
13363/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["rgb"]; });
13364
13365/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return _color_js__WEBPACK_IMPORTED_MODULE_0__["hsl"]; });
13366
13367/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-color/src/lab.js");
13368/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
13369
13370/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["hcl"]; });
13371
13372/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["lch"]; });
13373
13374/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_1__["gray"]; });
13375
13376/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-color/src/cubehelix.js");
13377/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
13378
13379
13380
13381
13382
13383
13384/***/ }),
13385
13386/***/ "./node_modules/d3-color/src/lab.js":
13387/*!******************************************!*\
13388 !*** ./node_modules/d3-color/src/lab.js ***!
13389 \******************************************/
13390/*! exports provided: gray, default, Lab, lch, hcl, Hcl */
13391/***/ (function(module, __webpack_exports__, __webpack_require__) {
13392
13393"use strict";
13394__webpack_require__.r(__webpack_exports__);
13395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return gray; });
13396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; });
13397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Lab", function() { return Lab; });
13398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return lch; });
13399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; });
13400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Hcl", function() { return Hcl; });
13401/* harmony import */ var _define_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./define.js */ "./node_modules/d3-color/src/define.js");
13402/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-color/src/color.js");
13403/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-color/src/math.js");
13404
13405
13406
13407
13408// https://observablehq.com/@mbostock/lab-and-rgb
13409var K = 18,
13410 Xn = 0.96422,
13411 Yn = 1,
13412 Zn = 0.82521,
13413 t0 = 4 / 29,
13414 t1 = 6 / 29,
13415 t2 = 3 * t1 * t1,
13416 t3 = t1 * t1 * t1;
13417
13418function labConvert(o) {
13419 if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
13420 if (o instanceof Hcl) return hcl2lab(o);
13421 if (!(o instanceof _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"])) o = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["rgbConvert"])(o);
13422 var r = rgb2lrgb(o.r),
13423 g = rgb2lrgb(o.g),
13424 b = rgb2lrgb(o.b),
13425 y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
13426 if (r === g && g === b) x = z = y; else {
13427 x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
13428 z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
13429 }
13430 return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
13431}
13432
13433function gray(l, opacity) {
13434 return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
13435}
13436
13437function lab(l, a, b, opacity) {
13438 return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
13439}
13440
13441function Lab(l, a, b, opacity) {
13442 this.l = +l;
13443 this.a = +a;
13444 this.b = +b;
13445 this.opacity = +opacity;
13446}
13447
13448Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Lab, lab, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], {
13449 brighter: function(k) {
13450 return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
13451 },
13452 darker: function(k) {
13453 return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
13454 },
13455 rgb: function() {
13456 var y = (this.l + 16) / 116,
13457 x = isNaN(this.a) ? y : y + this.a / 500,
13458 z = isNaN(this.b) ? y : y - this.b / 200;
13459 x = Xn * lab2xyz(x);
13460 y = Yn * lab2xyz(y);
13461 z = Zn * lab2xyz(z);
13462 return new _color_js__WEBPACK_IMPORTED_MODULE_1__["Rgb"](
13463 lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
13464 lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
13465 lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
13466 this.opacity
13467 );
13468 }
13469}));
13470
13471function xyz2lab(t) {
13472 return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
13473}
13474
13475function lab2xyz(t) {
13476 return t > t1 ? t * t * t : t2 * (t - t0);
13477}
13478
13479function lrgb2rgb(x) {
13480 return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
13481}
13482
13483function rgb2lrgb(x) {
13484 return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
13485}
13486
13487function hclConvert(o) {
13488 if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
13489 if (!(o instanceof Lab)) o = labConvert(o);
13490 if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
13491 var h = Math.atan2(o.b, o.a) * _math_js__WEBPACK_IMPORTED_MODULE_2__["rad2deg"];
13492 return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
13493}
13494
13495function lch(l, c, h, opacity) {
13496 return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
13497}
13498
13499function hcl(h, c, l, opacity) {
13500 return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
13501}
13502
13503function Hcl(h, c, l, opacity) {
13504 this.h = +h;
13505 this.c = +c;
13506 this.l = +l;
13507 this.opacity = +opacity;
13508}
13509
13510function hcl2lab(o) {
13511 if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
13512 var h = o.h * _math_js__WEBPACK_IMPORTED_MODULE_2__["deg2rad"];
13513 return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
13514}
13515
13516Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Hcl, hcl, Object(_define_js__WEBPACK_IMPORTED_MODULE_0__["extend"])(_color_js__WEBPACK_IMPORTED_MODULE_1__["Color"], {
13517 brighter: function(k) {
13518 return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
13519 },
13520 darker: function(k) {
13521 return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
13522 },
13523 rgb: function() {
13524 return hcl2lab(this).rgb();
13525 }
13526}));
13527
13528
13529/***/ }),
13530
13531/***/ "./node_modules/d3-color/src/math.js":
13532/*!*******************************************!*\
13533 !*** ./node_modules/d3-color/src/math.js ***!
13534 \*******************************************/
13535/*! exports provided: deg2rad, rad2deg */
13536/***/ (function(module, __webpack_exports__, __webpack_require__) {
13537
13538"use strict";
13539__webpack_require__.r(__webpack_exports__);
13540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deg2rad", function() { return deg2rad; });
13541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rad2deg", function() { return rad2deg; });
13542var deg2rad = Math.PI / 180;
13543var rad2deg = 180 / Math.PI;
13544
13545
13546/***/ }),
13547
13548/***/ "./node_modules/d3-contour/src/area.js":
13549/*!*********************************************!*\
13550 !*** ./node_modules/d3-contour/src/area.js ***!
13551 \*********************************************/
13552/*! exports provided: default */
13553/***/ (function(module, __webpack_exports__, __webpack_require__) {
13554
13555"use strict";
13556__webpack_require__.r(__webpack_exports__);
13557/* harmony default export */ __webpack_exports__["default"] = (function(ring) {
13558 var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
13559 while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
13560 return area;
13561});
13562
13563
13564/***/ }),
13565
13566/***/ "./node_modules/d3-contour/src/array.js":
13567/*!**********************************************!*\
13568 !*** ./node_modules/d3-contour/src/array.js ***!
13569 \**********************************************/
13570/*! exports provided: slice */
13571/***/ (function(module, __webpack_exports__, __webpack_require__) {
13572
13573"use strict";
13574__webpack_require__.r(__webpack_exports__);
13575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
13576var array = Array.prototype;
13577
13578var slice = array.slice;
13579
13580
13581/***/ }),
13582
13583/***/ "./node_modules/d3-contour/src/ascending.js":
13584/*!**************************************************!*\
13585 !*** ./node_modules/d3-contour/src/ascending.js ***!
13586 \**************************************************/
13587/*! exports provided: default */
13588/***/ (function(module, __webpack_exports__, __webpack_require__) {
13589
13590"use strict";
13591__webpack_require__.r(__webpack_exports__);
13592/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
13593 return a - b;
13594});
13595
13596
13597/***/ }),
13598
13599/***/ "./node_modules/d3-contour/src/blur.js":
13600/*!*********************************************!*\
13601 !*** ./node_modules/d3-contour/src/blur.js ***!
13602 \*********************************************/
13603/*! exports provided: blurX, blurY */
13604/***/ (function(module, __webpack_exports__, __webpack_require__) {
13605
13606"use strict";
13607__webpack_require__.r(__webpack_exports__);
13608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurX", function() { return blurX; });
13609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blurY", function() { return blurY; });
13610// TODO Optimize edge cases.
13611// TODO Optimize index calculation.
13612// TODO Optimize arguments.
13613function blurX(source, target, r) {
13614 var n = source.width,
13615 m = source.height,
13616 w = (r << 1) + 1;
13617 for (var j = 0; j < m; ++j) {
13618 for (var i = 0, sr = 0; i < n + r; ++i) {
13619 if (i < n) {
13620 sr += source.data[i + j * n];
13621 }
13622 if (i >= r) {
13623 if (i >= w) {
13624 sr -= source.data[i - w + j * n];
13625 }
13626 target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);
13627 }
13628 }
13629 }
13630}
13631
13632// TODO Optimize edge cases.
13633// TODO Optimize index calculation.
13634// TODO Optimize arguments.
13635function blurY(source, target, r) {
13636 var n = source.width,
13637 m = source.height,
13638 w = (r << 1) + 1;
13639 for (var i = 0; i < n; ++i) {
13640 for (var j = 0, sr = 0; j < m + r; ++j) {
13641 if (j < m) {
13642 sr += source.data[i + j * n];
13643 }
13644 if (j >= r) {
13645 if (j >= w) {
13646 sr -= source.data[i + (j - w) * n];
13647 }
13648 target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);
13649 }
13650 }
13651 }
13652}
13653
13654
13655/***/ }),
13656
13657/***/ "./node_modules/d3-contour/src/constant.js":
13658/*!*************************************************!*\
13659 !*** ./node_modules/d3-contour/src/constant.js ***!
13660 \*************************************************/
13661/*! exports provided: default */
13662/***/ (function(module, __webpack_exports__, __webpack_require__) {
13663
13664"use strict";
13665__webpack_require__.r(__webpack_exports__);
13666/* harmony default export */ __webpack_exports__["default"] = (function(x) {
13667 return function() {
13668 return x;
13669 };
13670});
13671
13672
13673/***/ }),
13674
13675/***/ "./node_modules/d3-contour/src/contains.js":
13676/*!*************************************************!*\
13677 !*** ./node_modules/d3-contour/src/contains.js ***!
13678 \*************************************************/
13679/*! exports provided: default */
13680/***/ (function(module, __webpack_exports__, __webpack_require__) {
13681
13682"use strict";
13683__webpack_require__.r(__webpack_exports__);
13684/* harmony default export */ __webpack_exports__["default"] = (function(ring, hole) {
13685 var i = -1, n = hole.length, c;
13686 while (++i < n) if (c = ringContains(ring, hole[i])) return c;
13687 return 0;
13688});
13689
13690function ringContains(ring, point) {
13691 var x = point[0], y = point[1], contains = -1;
13692 for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
13693 var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];
13694 if (segmentContains(pi, pj, point)) return 0;
13695 if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;
13696 }
13697 return contains;
13698}
13699
13700function segmentContains(a, b, c) {
13701 var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
13702}
13703
13704function collinear(a, b, c) {
13705 return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);
13706}
13707
13708function within(p, q, r) {
13709 return p <= q && q <= r || r <= q && q <= p;
13710}
13711
13712
13713/***/ }),
13714
13715/***/ "./node_modules/d3-contour/src/contours.js":
13716/*!*************************************************!*\
13717 !*** ./node_modules/d3-contour/src/contours.js ***!
13718 \*************************************************/
13719/*! exports provided: default */
13720/***/ (function(module, __webpack_exports__, __webpack_require__) {
13721
13722"use strict";
13723__webpack_require__.r(__webpack_exports__);
13724/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
13725/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js");
13726/* harmony import */ var _ascending__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ascending */ "./node_modules/d3-contour/src/ascending.js");
13727/* harmony import */ var _area__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./area */ "./node_modules/d3-contour/src/area.js");
13728/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js");
13729/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./contains */ "./node_modules/d3-contour/src/contains.js");
13730/* harmony import */ var _noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./noop */ "./node_modules/d3-contour/src/noop.js");
13731
13732
13733
13734
13735
13736
13737
13738
13739var cases = [
13740 [],
13741 [[[1.0, 1.5], [0.5, 1.0]]],
13742 [[[1.5, 1.0], [1.0, 1.5]]],
13743 [[[1.5, 1.0], [0.5, 1.0]]],
13744 [[[1.0, 0.5], [1.5, 1.0]]],
13745 [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],
13746 [[[1.0, 0.5], [1.0, 1.5]]],
13747 [[[1.0, 0.5], [0.5, 1.0]]],
13748 [[[0.5, 1.0], [1.0, 0.5]]],
13749 [[[1.0, 1.5], [1.0, 0.5]]],
13750 [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],
13751 [[[1.5, 1.0], [1.0, 0.5]]],
13752 [[[0.5, 1.0], [1.5, 1.0]]],
13753 [[[1.0, 1.5], [1.5, 1.0]]],
13754 [[[0.5, 1.0], [1.0, 1.5]]],
13755 []
13756];
13757
13758/* harmony default export */ __webpack_exports__["default"] = (function() {
13759 var dx = 1,
13760 dy = 1,
13761 threshold = d3_array__WEBPACK_IMPORTED_MODULE_0__["thresholdSturges"],
13762 smooth = smoothLinear;
13763
13764 function contours(values) {
13765 var tz = threshold(values);
13766
13767 // Convert number of thresholds into uniform thresholds.
13768 if (!Array.isArray(tz)) {
13769 var domain = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["extent"])(values), start = domain[0], stop = domain[1];
13770 tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, tz);
13771 tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);
13772 } else {
13773 tz = tz.slice().sort(_ascending__WEBPACK_IMPORTED_MODULE_2__["default"]);
13774 }
13775
13776 return tz.map(function(value) {
13777 return contour(values, value);
13778 });
13779 }
13780
13781 // Accumulate, smooth contour rings, assign holes to exterior rings.
13782 // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
13783 function contour(values, value) {
13784 var polygons = [],
13785 holes = [];
13786
13787 isorings(values, value, function(ring) {
13788 smooth(ring, values, value);
13789 if (Object(_area__WEBPACK_IMPORTED_MODULE_3__["default"])(ring) > 0) polygons.push([ring]);
13790 else holes.push(ring);
13791 });
13792
13793 holes.forEach(function(hole) {
13794 for (var i = 0, n = polygons.length, polygon; i < n; ++i) {
13795 if (Object(_contains__WEBPACK_IMPORTED_MODULE_5__["default"])((polygon = polygons[i])[0], hole) !== -1) {
13796 polygon.push(hole);
13797 return;
13798 }
13799 }
13800 });
13801
13802 return {
13803 type: "MultiPolygon",
13804 value: value,
13805 coordinates: polygons
13806 };
13807 }
13808
13809 // Marching squares with isolines stitched into rings.
13810 // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js
13811 function isorings(values, value, callback) {
13812 var fragmentByStart = new Array,
13813 fragmentByEnd = new Array,
13814 x, y, t0, t1, t2, t3;
13815
13816 // Special case for the first row (y = -1, t2 = t3 = 0).
13817 x = y = -1;
13818 t1 = values[0] >= value;
13819 cases[t1 << 1].forEach(stitch);
13820 while (++x < dx - 1) {
13821 t0 = t1, t1 = values[x + 1] >= value;
13822 cases[t0 | t1 << 1].forEach(stitch);
13823 }
13824 cases[t1 << 0].forEach(stitch);
13825
13826 // General case for the intermediate rows.
13827 while (++y < dy - 1) {
13828 x = -1;
13829 t1 = values[y * dx + dx] >= value;
13830 t2 = values[y * dx] >= value;
13831 cases[t1 << 1 | t2 << 2].forEach(stitch);
13832 while (++x < dx - 1) {
13833 t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;
13834 t3 = t2, t2 = values[y * dx + x + 1] >= value;
13835 cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
13836 }
13837 cases[t1 | t2 << 3].forEach(stitch);
13838 }
13839
13840 // Special case for the last row (y = dy - 1, t0 = t1 = 0).
13841 x = -1;
13842 t2 = values[y * dx] >= value;
13843 cases[t2 << 2].forEach(stitch);
13844 while (++x < dx - 1) {
13845 t3 = t2, t2 = values[y * dx + x + 1] >= value;
13846 cases[t2 << 2 | t3 << 3].forEach(stitch);
13847 }
13848 cases[t2 << 3].forEach(stitch);
13849
13850 function stitch(line) {
13851 var start = [line[0][0] + x, line[0][1] + y],
13852 end = [line[1][0] + x, line[1][1] + y],
13853 startIndex = index(start),
13854 endIndex = index(end),
13855 f, g;
13856 if (f = fragmentByEnd[startIndex]) {
13857 if (g = fragmentByStart[endIndex]) {
13858 delete fragmentByEnd[f.end];
13859 delete fragmentByStart[g.start];
13860 if (f === g) {
13861 f.ring.push(end);
13862 callback(f.ring);
13863 } else {
13864 fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};
13865 }
13866 } else {
13867 delete fragmentByEnd[f.end];
13868 f.ring.push(end);
13869 fragmentByEnd[f.end = endIndex] = f;
13870 }
13871 } else if (f = fragmentByStart[endIndex]) {
13872 if (g = fragmentByEnd[startIndex]) {
13873 delete fragmentByStart[f.start];
13874 delete fragmentByEnd[g.end];
13875 if (f === g) {
13876 f.ring.push(end);
13877 callback(f.ring);
13878 } else {
13879 fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};
13880 }
13881 } else {
13882 delete fragmentByStart[f.start];
13883 f.ring.unshift(start);
13884 fragmentByStart[f.start = startIndex] = f;
13885 }
13886 } else {
13887 fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};
13888 }
13889 }
13890 }
13891
13892 function index(point) {
13893 return point[0] * 2 + point[1] * (dx + 1) * 4;
13894 }
13895
13896 function smoothLinear(ring, values, value) {
13897 ring.forEach(function(point) {
13898 var x = point[0],
13899 y = point[1],
13900 xt = x | 0,
13901 yt = y | 0,
13902 v0,
13903 v1 = values[yt * dx + xt];
13904 if (x > 0 && x < dx && xt === x) {
13905 v0 = values[yt * dx + xt - 1];
13906 point[0] = x + (value - v0) / (v1 - v0) - 0.5;
13907 }
13908 if (y > 0 && y < dy && yt === y) {
13909 v0 = values[(yt - 1) * dx + xt];
13910 point[1] = y + (value - v0) / (v1 - v0) - 0.5;
13911 }
13912 });
13913 }
13914
13915 contours.contour = contour;
13916
13917 contours.size = function(_) {
13918 if (!arguments.length) return [dx, dy];
13919 var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
13920 if (!(_0 > 0) || !(_1 > 0)) throw new Error("invalid size");
13921 return dx = _0, dy = _1, contours;
13922 };
13923
13924 contours.thresholds = function(_) {
13925 return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_4__["default"])(_), contours) : threshold;
13926 };
13927
13928 contours.smooth = function(_) {
13929 return arguments.length ? (smooth = _ ? smoothLinear : _noop__WEBPACK_IMPORTED_MODULE_6__["default"], contours) : smooth === smoothLinear;
13930 };
13931
13932 return contours;
13933});
13934
13935
13936/***/ }),
13937
13938/***/ "./node_modules/d3-contour/src/density.js":
13939/*!************************************************!*\
13940 !*** ./node_modules/d3-contour/src/density.js ***!
13941 \************************************************/
13942/*! exports provided: default */
13943/***/ (function(module, __webpack_exports__, __webpack_require__) {
13944
13945"use strict";
13946__webpack_require__.r(__webpack_exports__);
13947/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
13948/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-contour/src/array.js");
13949/* harmony import */ var _blur__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./blur */ "./node_modules/d3-contour/src/blur.js");
13950/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-contour/src/constant.js");
13951/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js");
13952
13953
13954
13955
13956
13957
13958function defaultX(d) {
13959 return d[0];
13960}
13961
13962function defaultY(d) {
13963 return d[1];
13964}
13965
13966function defaultWeight() {
13967 return 1;
13968}
13969
13970/* harmony default export */ __webpack_exports__["default"] = (function() {
13971 var x = defaultX,
13972 y = defaultY,
13973 weight = defaultWeight,
13974 dx = 960,
13975 dy = 500,
13976 r = 20, // blur radius
13977 k = 2, // log2(grid cell size)
13978 o = r * 3, // grid offset, to pad for blur
13979 n = (dx + o * 2) >> k, // grid width
13980 m = (dy + o * 2) >> k, // grid height
13981 threshold = Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(20);
13982
13983 function density(data) {
13984 var values0 = new Float32Array(n * m),
13985 values1 = new Float32Array(n * m);
13986
13987 data.forEach(function(d, i, data) {
13988 var xi = (+x(d, i, data) + o) >> k,
13989 yi = (+y(d, i, data) + o) >> k,
13990 wi = +weight(d, i, data);
13991 if (xi >= 0 && xi < n && yi >= 0 && yi < m) {
13992 values0[xi + yi * n] += wi;
13993 }
13994 });
13995
13996 // TODO Optimize.
13997 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
13998 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
13999 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
14000 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
14001 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurX"])({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
14002 Object(_blur__WEBPACK_IMPORTED_MODULE_2__["blurY"])({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
14003
14004 var tz = threshold(values0);
14005
14006 // Convert number of thresholds into uniform thresholds.
14007 if (!Array.isArray(tz)) {
14008 var stop = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(values0);
14009 tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(0, stop, tz);
14010 tz = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(0, Math.floor(stop / tz) * tz, tz);
14011 tz.shift();
14012 }
14013
14014 return Object(_contours__WEBPACK_IMPORTED_MODULE_4__["default"])()
14015 .thresholds(tz)
14016 .size([n, m])
14017 (values0)
14018 .map(transform);
14019 }
14020
14021 function transform(geometry) {
14022 geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.
14023 geometry.coordinates.forEach(transformPolygon);
14024 return geometry;
14025 }
14026
14027 function transformPolygon(coordinates) {
14028 coordinates.forEach(transformRing);
14029 }
14030
14031 function transformRing(coordinates) {
14032 coordinates.forEach(transformPoint);
14033 }
14034
14035 // TODO Optimize.
14036 function transformPoint(coordinates) {
14037 coordinates[0] = coordinates[0] * Math.pow(2, k) - o;
14038 coordinates[1] = coordinates[1] * Math.pow(2, k) - o;
14039 }
14040
14041 function resize() {
14042 o = r * 3;
14043 n = (dx + o * 2) >> k;
14044 m = (dy + o * 2) >> k;
14045 return density;
14046 }
14047
14048 density.x = function(_) {
14049 return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : x;
14050 };
14051
14052 density.y = function(_) {
14053 return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : y;
14054 };
14055
14056 density.weight = function(_) {
14057 return arguments.length ? (weight = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(+_), density) : weight;
14058 };
14059
14060 density.size = function(_) {
14061 if (!arguments.length) return [dx, dy];
14062 var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
14063 if (!(_0 >= 0) && !(_0 >= 0)) throw new Error("invalid size");
14064 return dx = _0, dy = _1, resize();
14065 };
14066
14067 density.cellSize = function(_) {
14068 if (!arguments.length) return 1 << k;
14069 if (!((_ = +_) >= 1)) throw new Error("invalid cell size");
14070 return k = Math.floor(Math.log(_) / Math.LN2), resize();
14071 };
14072
14073 density.thresholds = function(_) {
14074 return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)) : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(_), density) : threshold;
14075 };
14076
14077 density.bandwidth = function(_) {
14078 if (!arguments.length) return Math.sqrt(r * (r + 1));
14079 if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth");
14080 return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();
14081 };
14082
14083 return density;
14084});
14085
14086
14087/***/ }),
14088
14089/***/ "./node_modules/d3-contour/src/index.js":
14090/*!**********************************************!*\
14091 !*** ./node_modules/d3-contour/src/index.js ***!
14092 \**********************************************/
14093/*! exports provided: contours, contourDensity */
14094/***/ (function(module, __webpack_exports__, __webpack_require__) {
14095
14096"use strict";
14097__webpack_require__.r(__webpack_exports__);
14098/* harmony import */ var _contours__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./contours */ "./node_modules/d3-contour/src/contours.js");
14099/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return _contours__WEBPACK_IMPORTED_MODULE_0__["default"]; });
14100
14101/* harmony import */ var _density__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./density */ "./node_modules/d3-contour/src/density.js");
14102/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return _density__WEBPACK_IMPORTED_MODULE_1__["default"]; });
14103
14104
14105
14106
14107
14108/***/ }),
14109
14110/***/ "./node_modules/d3-contour/src/noop.js":
14111/*!*********************************************!*\
14112 !*** ./node_modules/d3-contour/src/noop.js ***!
14113 \*********************************************/
14114/*! exports provided: default */
14115/***/ (function(module, __webpack_exports__, __webpack_require__) {
14116
14117"use strict";
14118__webpack_require__.r(__webpack_exports__);
14119/* harmony default export */ __webpack_exports__["default"] = (function() {});
14120
14121
14122/***/ }),
14123
14124/***/ "./node_modules/d3-dispatch/src/dispatch.js":
14125/*!**************************************************!*\
14126 !*** ./node_modules/d3-dispatch/src/dispatch.js ***!
14127 \**************************************************/
14128/*! exports provided: default */
14129/***/ (function(module, __webpack_exports__, __webpack_require__) {
14130
14131"use strict";
14132__webpack_require__.r(__webpack_exports__);
14133var noop = {value: function() {}};
14134
14135function dispatch() {
14136 for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
14137 if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
14138 _[t] = [];
14139 }
14140 return new Dispatch(_);
14141}
14142
14143function Dispatch(_) {
14144 this._ = _;
14145}
14146
14147function parseTypenames(typenames, types) {
14148 return typenames.trim().split(/^|\s+/).map(function(t) {
14149 var name = "", i = t.indexOf(".");
14150 if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
14151 if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
14152 return {type: t, name: name};
14153 });
14154}
14155
14156Dispatch.prototype = dispatch.prototype = {
14157 constructor: Dispatch,
14158 on: function(typename, callback) {
14159 var _ = this._,
14160 T = parseTypenames(typename + "", _),
14161 t,
14162 i = -1,
14163 n = T.length;
14164
14165 // If no callback was specified, return the callback of the given type and name.
14166 if (arguments.length < 2) {
14167 while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
14168 return;
14169 }
14170
14171 // If a type was specified, set the callback for the given type and name.
14172 // Otherwise, if a null callback was specified, remove callbacks of the given name.
14173 if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
14174 while (++i < n) {
14175 if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
14176 else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
14177 }
14178
14179 return this;
14180 },
14181 copy: function() {
14182 var copy = {}, _ = this._;
14183 for (var t in _) copy[t] = _[t].slice();
14184 return new Dispatch(copy);
14185 },
14186 call: function(type, that) {
14187 if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
14188 if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
14189 for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
14190 },
14191 apply: function(type, that, args) {
14192 if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
14193 for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
14194 }
14195};
14196
14197function get(type, name) {
14198 for (var i = 0, n = type.length, c; i < n; ++i) {
14199 if ((c = type[i]).name === name) {
14200 return c.value;
14201 }
14202 }
14203}
14204
14205function set(type, name, callback) {
14206 for (var i = 0, n = type.length; i < n; ++i) {
14207 if (type[i].name === name) {
14208 type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
14209 break;
14210 }
14211 }
14212 if (callback != null) type.push({name: name, value: callback});
14213 return type;
14214}
14215
14216/* harmony default export */ __webpack_exports__["default"] = (dispatch);
14217
14218
14219/***/ }),
14220
14221/***/ "./node_modules/d3-dispatch/src/index.js":
14222/*!***********************************************!*\
14223 !*** ./node_modules/d3-dispatch/src/index.js ***!
14224 \***********************************************/
14225/*! exports provided: dispatch */
14226/***/ (function(module, __webpack_exports__, __webpack_require__) {
14227
14228"use strict";
14229__webpack_require__.r(__webpack_exports__);
14230/* harmony import */ var _dispatch_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dispatch.js */ "./node_modules/d3-dispatch/src/dispatch.js");
14231/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return _dispatch_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
14232
14233
14234
14235
14236/***/ }),
14237
14238/***/ "./node_modules/d3-drag/src/constant.js":
14239/*!**********************************************!*\
14240 !*** ./node_modules/d3-drag/src/constant.js ***!
14241 \**********************************************/
14242/*! exports provided: default */
14243/***/ (function(module, __webpack_exports__, __webpack_require__) {
14244
14245"use strict";
14246__webpack_require__.r(__webpack_exports__);
14247/* harmony default export */ __webpack_exports__["default"] = (function(x) {
14248 return function() {
14249 return x;
14250 };
14251});
14252
14253
14254/***/ }),
14255
14256/***/ "./node_modules/d3-drag/src/drag.js":
14257/*!******************************************!*\
14258 !*** ./node_modules/d3-drag/src/drag.js ***!
14259 \******************************************/
14260/*! exports provided: default */
14261/***/ (function(module, __webpack_exports__, __webpack_require__) {
14262
14263"use strict";
14264__webpack_require__.r(__webpack_exports__);
14265/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
14266/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
14267/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js");
14268/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js");
14269/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-drag/src/constant.js");
14270/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-drag/src/event.js");
14271
14272
14273
14274
14275
14276
14277
14278// Ignore right-click, since that should open the context menu.
14279function defaultFilter() {
14280 return !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].button;
14281}
14282
14283function defaultContainer() {
14284 return this.parentNode;
14285}
14286
14287function defaultSubject(d) {
14288 return d == null ? {x: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].x, y: d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].y} : d;
14289}
14290
14291function defaultTouchable() {
14292 return navigator.maxTouchPoints || ("ontouchstart" in this);
14293}
14294
14295/* harmony default export */ __webpack_exports__["default"] = (function() {
14296 var filter = defaultFilter,
14297 container = defaultContainer,
14298 subject = defaultSubject,
14299 touchable = defaultTouchable,
14300 gestures = {},
14301 listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "drag", "end"),
14302 active = 0,
14303 mousedownx,
14304 mousedowny,
14305 mousemoving,
14306 touchending,
14307 clickDistance2 = 0;
14308
14309 function drag(selection) {
14310 selection
14311 .on("mousedown.drag", mousedowned)
14312 .filter(touchable)
14313 .on("touchstart.drag", touchstarted)
14314 .on("touchmove.drag", touchmoved)
14315 .on("touchend.drag touchcancel.drag", touchended)
14316 .style("touch-action", "none")
14317 .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
14318 }
14319
14320 function mousedowned() {
14321 if (touchending || !filter.apply(this, arguments)) return;
14322 var gesture = beforestart("mouse", container.apply(this, arguments), d3_selection__WEBPACK_IMPORTED_MODULE_1__["mouse"], this, arguments);
14323 if (!gesture) return;
14324 Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true);
14325 Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["default"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view);
14326 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])();
14327 mousemoving = false;
14328 mousedownx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX;
14329 mousedowny = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY;
14330 gesture("start");
14331 }
14332
14333 function mousemoved() {
14334 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
14335 if (!mousemoving) {
14336 var dx = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientX - mousedownx, dy = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].clientY - mousedowny;
14337 mousemoving = dx * dx + dy * dy > clickDistance2;
14338 }
14339 gestures.mouse("drag");
14340 }
14341
14342 function mouseupped() {
14343 Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view).on("mousemove.drag mouseup.drag", null);
14344 Object(_nodrag_js__WEBPACK_IMPORTED_MODULE_2__["yesdrag"])(d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].view, mousemoving);
14345 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
14346 gestures.mouse("end");
14347 }
14348
14349 function touchstarted() {
14350 if (!filter.apply(this, arguments)) return;
14351 var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches,
14352 c = container.apply(this, arguments),
14353 n = touches.length, i, gesture;
14354
14355 for (i = 0; i < n; ++i) {
14356 if (gesture = beforestart(touches[i].identifier, c, d3_selection__WEBPACK_IMPORTED_MODULE_1__["touch"], this, arguments)) {
14357 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])();
14358 gesture("start");
14359 }
14360 }
14361 }
14362
14363 function touchmoved() {
14364 var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches,
14365 n = touches.length, i, gesture;
14366
14367 for (i = 0; i < n; ++i) {
14368 if (gesture = gestures[touches[i].identifier]) {
14369 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["default"])();
14370 gesture("drag");
14371 }
14372 }
14373 }
14374
14375 function touchended() {
14376 var touches = d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].changedTouches,
14377 n = touches.length, i, gesture;
14378
14379 if (touchending) clearTimeout(touchending);
14380 touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
14381 for (i = 0; i < n; ++i) {
14382 if (gesture = gestures[touches[i].identifier]) {
14383 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_3__["nopropagation"])();
14384 gesture("end");
14385 }
14386 }
14387 }
14388
14389 function beforestart(id, container, point, that, args) {
14390 var p = point(container, id), s, dx, dy,
14391 sublisteners = listeners.copy();
14392
14393 if (!Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {
14394 if ((d3_selection__WEBPACK_IMPORTED_MODULE_1__["event"].subject = s = subject.apply(that, args)) == null) return false;
14395 dx = s.x - p[0] || 0;
14396 dy = s.y - p[1] || 0;
14397 return true;
14398 })) return;
14399
14400 return function gesture(type) {
14401 var p0 = p, n;
14402 switch (type) {
14403 case "start": gestures[id] = gesture, n = active++; break;
14404 case "end": delete gestures[id], --active; // nobreak
14405 case "drag": p = point(container, id), n = active; break;
14406 }
14407 Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_5__["default"](drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);
14408 };
14409 }
14410
14411 drag.filter = function(_) {
14412 return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : filter;
14413 };
14414
14415 drag.container = function(_) {
14416 return arguments.length ? (container = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : container;
14417 };
14418
14419 drag.subject = function(_) {
14420 return arguments.length ? (subject = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_), drag) : subject;
14421 };
14422
14423 drag.touchable = function(_) {
14424 return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_4__["default"])(!!_), drag) : touchable;
14425 };
14426
14427 drag.on = function() {
14428 var value = listeners.on.apply(listeners, arguments);
14429 return value === listeners ? drag : value;
14430 };
14431
14432 drag.clickDistance = function(_) {
14433 return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
14434 };
14435
14436 return drag;
14437});
14438
14439
14440/***/ }),
14441
14442/***/ "./node_modules/d3-drag/src/event.js":
14443/*!*******************************************!*\
14444 !*** ./node_modules/d3-drag/src/event.js ***!
14445 \*******************************************/
14446/*! exports provided: default */
14447/***/ (function(module, __webpack_exports__, __webpack_require__) {
14448
14449"use strict";
14450__webpack_require__.r(__webpack_exports__);
14451/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DragEvent; });
14452function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {
14453 this.target = target;
14454 this.type = type;
14455 this.subject = subject;
14456 this.identifier = id;
14457 this.active = active;
14458 this.x = x;
14459 this.y = y;
14460 this.dx = dx;
14461 this.dy = dy;
14462 this._ = dispatch;
14463}
14464
14465DragEvent.prototype.on = function() {
14466 var value = this._.on.apply(this._, arguments);
14467 return value === this._ ? this : value;
14468};
14469
14470
14471/***/ }),
14472
14473/***/ "./node_modules/d3-drag/src/index.js":
14474/*!*******************************************!*\
14475 !*** ./node_modules/d3-drag/src/index.js ***!
14476 \*******************************************/
14477/*! exports provided: drag, dragDisable, dragEnable */
14478/***/ (function(module, __webpack_exports__, __webpack_require__) {
14479
14480"use strict";
14481__webpack_require__.r(__webpack_exports__);
14482/* harmony import */ var _drag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./drag.js */ "./node_modules/d3-drag/src/drag.js");
14483/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return _drag_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
14484
14485/* harmony import */ var _nodrag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodrag.js */ "./node_modules/d3-drag/src/nodrag.js");
14486/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
14487
14488/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return _nodrag_js__WEBPACK_IMPORTED_MODULE_1__["yesdrag"]; });
14489
14490
14491
14492
14493
14494/***/ }),
14495
14496/***/ "./node_modules/d3-drag/src/nodrag.js":
14497/*!********************************************!*\
14498 !*** ./node_modules/d3-drag/src/nodrag.js ***!
14499 \********************************************/
14500/*! exports provided: default, yesdrag */
14501/***/ (function(module, __webpack_exports__, __webpack_require__) {
14502
14503"use strict";
14504__webpack_require__.r(__webpack_exports__);
14505/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "yesdrag", function() { return yesdrag; });
14506/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
14507/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-drag/src/noevent.js");
14508
14509
14510
14511/* harmony default export */ __webpack_exports__["default"] = (function(view) {
14512 var root = view.document.documentElement,
14513 selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true);
14514 if ("onselectstart" in root) {
14515 selection.on("selectstart.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true);
14516 } else {
14517 root.__noselect = root.style.MozUserSelect;
14518 root.style.MozUserSelect = "none";
14519 }
14520});
14521
14522function yesdrag(view, noclick) {
14523 var root = view.document.documentElement,
14524 selection = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["select"])(view).on("dragstart.drag", null);
14525 if (noclick) {
14526 selection.on("click.drag", _noevent_js__WEBPACK_IMPORTED_MODULE_1__["default"], true);
14527 setTimeout(function() { selection.on("click.drag", null); }, 0);
14528 }
14529 if ("onselectstart" in root) {
14530 selection.on("selectstart.drag", null);
14531 } else {
14532 root.style.MozUserSelect = root.__noselect;
14533 delete root.__noselect;
14534 }
14535}
14536
14537
14538/***/ }),
14539
14540/***/ "./node_modules/d3-drag/src/noevent.js":
14541/*!*********************************************!*\
14542 !*** ./node_modules/d3-drag/src/noevent.js ***!
14543 \*********************************************/
14544/*! exports provided: nopropagation, default */
14545/***/ (function(module, __webpack_exports__, __webpack_require__) {
14546
14547"use strict";
14548__webpack_require__.r(__webpack_exports__);
14549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; });
14550/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
14551
14552
14553function nopropagation() {
14554 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
14555}
14556
14557/* harmony default export */ __webpack_exports__["default"] = (function() {
14558 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault();
14559 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
14560});
14561
14562
14563/***/ }),
14564
14565/***/ "./node_modules/d3-dsv/src/autoType.js":
14566/*!*********************************************!*\
14567 !*** ./node_modules/d3-dsv/src/autoType.js ***!
14568 \*********************************************/
14569/*! exports provided: default */
14570/***/ (function(module, __webpack_exports__, __webpack_require__) {
14571
14572"use strict";
14573__webpack_require__.r(__webpack_exports__);
14574/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return autoType; });
14575function autoType(object) {
14576 for (var key in object) {
14577 var value = object[key].trim(), number, m;
14578 if (!value) value = null;
14579 else if (value === "true") value = true;
14580 else if (value === "false") value = false;
14581 else if (value === "NaN") value = NaN;
14582 else if (!isNaN(number = +value)) value = number;
14583 else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) {
14584 if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " ");
14585 value = new Date(value);
14586 }
14587 else continue;
14588 object[key] = value;
14589 }
14590 return object;
14591}
14592
14593// https://github.com/d3/d3-dsv/issues/45
14594var fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours();
14595
14596/***/ }),
14597
14598/***/ "./node_modules/d3-dsv/src/csv.js":
14599/*!****************************************!*\
14600 !*** ./node_modules/d3-dsv/src/csv.js ***!
14601 \****************************************/
14602/*! exports provided: csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue */
14603/***/ (function(module, __webpack_exports__, __webpack_require__) {
14604
14605"use strict";
14606__webpack_require__.r(__webpack_exports__);
14607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; });
14608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; });
14609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; });
14610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return csvFormatBody; });
14611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; });
14612/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return csvFormatRow; });
14613/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return csvFormatValue; });
14614/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js");
14615
14616
14617var csv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])(",");
14618
14619var csvParse = csv.parse;
14620var csvParseRows = csv.parseRows;
14621var csvFormat = csv.format;
14622var csvFormatBody = csv.formatBody;
14623var csvFormatRows = csv.formatRows;
14624var csvFormatRow = csv.formatRow;
14625var csvFormatValue = csv.formatValue;
14626
14627
14628/***/ }),
14629
14630/***/ "./node_modules/d3-dsv/src/dsv.js":
14631/*!****************************************!*\
14632 !*** ./node_modules/d3-dsv/src/dsv.js ***!
14633 \****************************************/
14634/*! exports provided: default */
14635/***/ (function(module, __webpack_exports__, __webpack_require__) {
14636
14637"use strict";
14638__webpack_require__.r(__webpack_exports__);
14639var EOL = {},
14640 EOF = {},
14641 QUOTE = 34,
14642 NEWLINE = 10,
14643 RETURN = 13;
14644
14645function objectConverter(columns) {
14646 return new Function("d", "return {" + columns.map(function(name, i) {
14647 return JSON.stringify(name) + ": d[" + i + "] || \"\"";
14648 }).join(",") + "}");
14649}
14650
14651function customConverter(columns, f) {
14652 var object = objectConverter(columns);
14653 return function(row, i) {
14654 return f(object(row), i, columns);
14655 };
14656}
14657
14658// Compute unique columns in order of discovery.
14659function inferColumns(rows) {
14660 var columnSet = Object.create(null),
14661 columns = [];
14662
14663 rows.forEach(function(row) {
14664 for (var column in row) {
14665 if (!(column in columnSet)) {
14666 columns.push(columnSet[column] = column);
14667 }
14668 }
14669 });
14670
14671 return columns;
14672}
14673
14674function pad(value, width) {
14675 var s = value + "", length = s.length;
14676 return length < width ? new Array(width - length + 1).join(0) + s : s;
14677}
14678
14679function formatYear(year) {
14680 return year < 0 ? "-" + pad(-year, 6)
14681 : year > 9999 ? "+" + pad(year, 6)
14682 : pad(year, 4);
14683}
14684
14685function formatDate(date) {
14686 var hours = date.getUTCHours(),
14687 minutes = date.getUTCMinutes(),
14688 seconds = date.getUTCSeconds(),
14689 milliseconds = date.getUTCMilliseconds();
14690 return isNaN(date) ? "Invalid Date"
14691 : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2)
14692 + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z"
14693 : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z"
14694 : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z"
14695 : "");
14696}
14697
14698/* harmony default export */ __webpack_exports__["default"] = (function(delimiter) {
14699 var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
14700 DELIMITER = delimiter.charCodeAt(0);
14701
14702 function parse(text, f) {
14703 var convert, columns, rows = parseRows(text, function(row, i) {
14704 if (convert) return convert(row, i - 1);
14705 columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
14706 });
14707 rows.columns = columns || [];
14708 return rows;
14709 }
14710
14711 function parseRows(text, f) {
14712 var rows = [], // output rows
14713 N = text.length,
14714 I = 0, // current character index
14715 n = 0, // current line number
14716 t, // current token
14717 eof = N <= 0, // current token followed by EOF?
14718 eol = false; // current token followed by EOL?
14719
14720 // Strip the trailing newline.
14721 if (text.charCodeAt(N - 1) === NEWLINE) --N;
14722 if (text.charCodeAt(N - 1) === RETURN) --N;
14723
14724 function token() {
14725 if (eof) return EOF;
14726 if (eol) return eol = false, EOL;
14727
14728 // Unescape quotes.
14729 var i, j = I, c;
14730 if (text.charCodeAt(j) === QUOTE) {
14731 while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE);
14732 if ((i = I) >= N) eof = true;
14733 else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;
14734 else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
14735 return text.slice(j + 1, i - 1).replace(/""/g, "\"");
14736 }
14737
14738 // Find next delimiter or newline.
14739 while (I < N) {
14740 if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
14741 else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; }
14742 else if (c !== DELIMITER) continue;
14743 return text.slice(j, i);
14744 }
14745
14746 // Return last token before EOF.
14747 return eof = true, text.slice(j, N);
14748 }
14749
14750 while ((t = token()) !== EOF) {
14751 var row = [];
14752 while (t !== EOL && t !== EOF) row.push(t), t = token();
14753 if (f && (row = f(row, n++)) == null) continue;
14754 rows.push(row);
14755 }
14756
14757 return rows;
14758 }
14759
14760 function preformatBody(rows, columns) {
14761 return rows.map(function(row) {
14762 return columns.map(function(column) {
14763 return formatValue(row[column]);
14764 }).join(delimiter);
14765 });
14766 }
14767
14768 function format(rows, columns) {
14769 if (columns == null) columns = inferColumns(rows);
14770 return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n");
14771 }
14772
14773 function formatBody(rows, columns) {
14774 if (columns == null) columns = inferColumns(rows);
14775 return preformatBody(rows, columns).join("\n");
14776 }
14777
14778 function formatRows(rows) {
14779 return rows.map(formatRow).join("\n");
14780 }
14781
14782 function formatRow(row) {
14783 return row.map(formatValue).join(delimiter);
14784 }
14785
14786 function formatValue(value) {
14787 return value == null ? ""
14788 : value instanceof Date ? formatDate(value)
14789 : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\""
14790 : value;
14791 }
14792
14793 return {
14794 parse: parse,
14795 parseRows: parseRows,
14796 format: format,
14797 formatBody: formatBody,
14798 formatRows: formatRows,
14799 formatRow: formatRow,
14800 formatValue: formatValue
14801 };
14802});
14803
14804
14805/***/ }),
14806
14807/***/ "./node_modules/d3-dsv/src/index.js":
14808/*!******************************************!*\
14809 !*** ./node_modules/d3-dsv/src/index.js ***!
14810 \******************************************/
14811/*! exports provided: dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType */
14812/***/ (function(module, __webpack_exports__, __webpack_require__) {
14813
14814"use strict";
14815__webpack_require__.r(__webpack_exports__);
14816/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js");
14817/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return _dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
14818
14819/* harmony import */ var _csv_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./csv.js */ "./node_modules/d3-dsv/src/csv.js");
14820/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParse"]; });
14821
14822/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvParseRows"]; });
14823
14824/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormat"]; });
14825
14826/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatBody"]; });
14827
14828/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRows"]; });
14829
14830/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatRow"]; });
14831
14832/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return _csv_js__WEBPACK_IMPORTED_MODULE_1__["csvFormatValue"]; });
14833
14834/* harmony import */ var _tsv_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tsv.js */ "./node_modules/d3-dsv/src/tsv.js");
14835/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParse"]; });
14836
14837/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvParseRows"]; });
14838
14839/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormat"]; });
14840
14841/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatBody"]; });
14842
14843/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRows"]; });
14844
14845/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatRow"]; });
14846
14847/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return _tsv_js__WEBPACK_IMPORTED_MODULE_2__["tsvFormatValue"]; });
14848
14849/* harmony import */ var _autoType_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./autoType.js */ "./node_modules/d3-dsv/src/autoType.js");
14850/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return _autoType_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
14851
14852
14853
14854
14855
14856
14857
14858/***/ }),
14859
14860/***/ "./node_modules/d3-dsv/src/tsv.js":
14861/*!****************************************!*\
14862 !*** ./node_modules/d3-dsv/src/tsv.js ***!
14863 \****************************************/
14864/*! exports provided: tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue */
14865/***/ (function(module, __webpack_exports__, __webpack_require__) {
14866
14867"use strict";
14868__webpack_require__.r(__webpack_exports__);
14869/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; });
14870/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; });
14871/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; });
14872/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return tsvFormatBody; });
14873/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; });
14874/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return tsvFormatRow; });
14875/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return tsvFormatValue; });
14876/* harmony import */ var _dsv_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dsv.js */ "./node_modules/d3-dsv/src/dsv.js");
14877
14878
14879var tsv = Object(_dsv_js__WEBPACK_IMPORTED_MODULE_0__["default"])("\t");
14880
14881var tsvParse = tsv.parse;
14882var tsvParseRows = tsv.parseRows;
14883var tsvFormat = tsv.format;
14884var tsvFormatBody = tsv.formatBody;
14885var tsvFormatRows = tsv.formatRows;
14886var tsvFormatRow = tsv.formatRow;
14887var tsvFormatValue = tsv.formatValue;
14888
14889
14890/***/ }),
14891
14892/***/ "./node_modules/d3-ease/src/back.js":
14893/*!******************************************!*\
14894 !*** ./node_modules/d3-ease/src/back.js ***!
14895 \******************************************/
14896/*! exports provided: backIn, backOut, backInOut */
14897/***/ (function(module, __webpack_exports__, __webpack_require__) {
14898
14899"use strict";
14900__webpack_require__.r(__webpack_exports__);
14901/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backIn", function() { return backIn; });
14902/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backOut", function() { return backOut; });
14903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "backInOut", function() { return backInOut; });
14904var overshoot = 1.70158;
14905
14906var backIn = (function custom(s) {
14907 s = +s;
14908
14909 function backIn(t) {
14910 return t * t * ((s + 1) * t - s);
14911 }
14912
14913 backIn.overshoot = custom;
14914
14915 return backIn;
14916})(overshoot);
14917
14918var backOut = (function custom(s) {
14919 s = +s;
14920
14921 function backOut(t) {
14922 return --t * t * ((s + 1) * t + s) + 1;
14923 }
14924
14925 backOut.overshoot = custom;
14926
14927 return backOut;
14928})(overshoot);
14929
14930var backInOut = (function custom(s) {
14931 s = +s;
14932
14933 function backInOut(t) {
14934 return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2;
14935 }
14936
14937 backInOut.overshoot = custom;
14938
14939 return backInOut;
14940})(overshoot);
14941
14942
14943/***/ }),
14944
14945/***/ "./node_modules/d3-ease/src/bounce.js":
14946/*!********************************************!*\
14947 !*** ./node_modules/d3-ease/src/bounce.js ***!
14948 \********************************************/
14949/*! exports provided: bounceIn, bounceOut, bounceInOut */
14950/***/ (function(module, __webpack_exports__, __webpack_require__) {
14951
14952"use strict";
14953__webpack_require__.r(__webpack_exports__);
14954/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceIn", function() { return bounceIn; });
14955/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceOut", function() { return bounceOut; });
14956/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounceInOut", function() { return bounceInOut; });
14957var b1 = 4 / 11,
14958 b2 = 6 / 11,
14959 b3 = 8 / 11,
14960 b4 = 3 / 4,
14961 b5 = 9 / 11,
14962 b6 = 10 / 11,
14963 b7 = 15 / 16,
14964 b8 = 21 / 22,
14965 b9 = 63 / 64,
14966 b0 = 1 / b1 / b1;
14967
14968function bounceIn(t) {
14969 return 1 - bounceOut(1 - t);
14970}
14971
14972function bounceOut(t) {
14973 return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9;
14974}
14975
14976function bounceInOut(t) {
14977 return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2;
14978}
14979
14980
14981/***/ }),
14982
14983/***/ "./node_modules/d3-ease/src/circle.js":
14984/*!********************************************!*\
14985 !*** ./node_modules/d3-ease/src/circle.js ***!
14986 \********************************************/
14987/*! exports provided: circleIn, circleOut, circleInOut */
14988/***/ (function(module, __webpack_exports__, __webpack_require__) {
14989
14990"use strict";
14991__webpack_require__.r(__webpack_exports__);
14992/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleIn", function() { return circleIn; });
14993/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleOut", function() { return circleOut; });
14994/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleInOut", function() { return circleInOut; });
14995function circleIn(t) {
14996 return 1 - Math.sqrt(1 - t * t);
14997}
14998
14999function circleOut(t) {
15000 return Math.sqrt(1 - --t * t);
15001}
15002
15003function circleInOut(t) {
15004 return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
15005}
15006
15007
15008/***/ }),
15009
15010/***/ "./node_modules/d3-ease/src/cubic.js":
15011/*!*******************************************!*\
15012 !*** ./node_modules/d3-ease/src/cubic.js ***!
15013 \*******************************************/
15014/*! exports provided: cubicIn, cubicOut, cubicInOut */
15015/***/ (function(module, __webpack_exports__, __webpack_require__) {
15016
15017"use strict";
15018__webpack_require__.r(__webpack_exports__);
15019/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicIn", function() { return cubicIn; });
15020/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicOut", function() { return cubicOut; });
15021/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubicInOut", function() { return cubicInOut; });
15022function cubicIn(t) {
15023 return t * t * t;
15024}
15025
15026function cubicOut(t) {
15027 return --t * t * t + 1;
15028}
15029
15030function cubicInOut(t) {
15031 return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
15032}
15033
15034
15035/***/ }),
15036
15037/***/ "./node_modules/d3-ease/src/elastic.js":
15038/*!*********************************************!*\
15039 !*** ./node_modules/d3-ease/src/elastic.js ***!
15040 \*********************************************/
15041/*! exports provided: elasticIn, elasticOut, elasticInOut */
15042/***/ (function(module, __webpack_exports__, __webpack_require__) {
15043
15044"use strict";
15045__webpack_require__.r(__webpack_exports__);
15046/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticIn", function() { return elasticIn; });
15047/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticOut", function() { return elasticOut; });
15048/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "elasticInOut", function() { return elasticInOut; });
15049var tau = 2 * Math.PI,
15050 amplitude = 1,
15051 period = 0.3;
15052
15053var elasticIn = (function custom(a, p) {
15054 var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
15055
15056 function elasticIn(t) {
15057 return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p);
15058 }
15059
15060 elasticIn.amplitude = function(a) { return custom(a, p * tau); };
15061 elasticIn.period = function(p) { return custom(a, p); };
15062
15063 return elasticIn;
15064})(amplitude, period);
15065
15066var elasticOut = (function custom(a, p) {
15067 var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
15068
15069 function elasticOut(t) {
15070 return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p);
15071 }
15072
15073 elasticOut.amplitude = function(a) { return custom(a, p * tau); };
15074 elasticOut.period = function(p) { return custom(a, p); };
15075
15076 return elasticOut;
15077})(amplitude, period);
15078
15079var elasticInOut = (function custom(a, p) {
15080 var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
15081
15082 function elasticInOut(t) {
15083 return ((t = t * 2 - 1) < 0
15084 ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p)
15085 : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2;
15086 }
15087
15088 elasticInOut.amplitude = function(a) { return custom(a, p * tau); };
15089 elasticInOut.period = function(p) { return custom(a, p); };
15090
15091 return elasticInOut;
15092})(amplitude, period);
15093
15094
15095/***/ }),
15096
15097/***/ "./node_modules/d3-ease/src/exp.js":
15098/*!*****************************************!*\
15099 !*** ./node_modules/d3-ease/src/exp.js ***!
15100 \*****************************************/
15101/*! exports provided: expIn, expOut, expInOut */
15102/***/ (function(module, __webpack_exports__, __webpack_require__) {
15103
15104"use strict";
15105__webpack_require__.r(__webpack_exports__);
15106/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expIn", function() { return expIn; });
15107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expOut", function() { return expOut; });
15108/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "expInOut", function() { return expInOut; });
15109function expIn(t) {
15110 return Math.pow(2, 10 * t - 10);
15111}
15112
15113function expOut(t) {
15114 return 1 - Math.pow(2, -10 * t);
15115}
15116
15117function expInOut(t) {
15118 return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2;
15119}
15120
15121
15122/***/ }),
15123
15124/***/ "./node_modules/d3-ease/src/index.js":
15125/*!*******************************************!*\
15126 !*** ./node_modules/d3-ease/src/index.js ***!
15127 \*******************************************/
15128/*! exports provided: easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut */
15129/***/ (function(module, __webpack_exports__, __webpack_require__) {
15130
15131"use strict";
15132__webpack_require__.r(__webpack_exports__);
15133/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-ease/src/linear.js");
15134/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return _linear_js__WEBPACK_IMPORTED_MODULE_0__["linear"]; });
15135
15136/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-ease/src/quad.js");
15137/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; });
15138
15139/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadIn"]; });
15140
15141/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadOut"]; });
15142
15143/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return _quad_js__WEBPACK_IMPORTED_MODULE_1__["quadInOut"]; });
15144
15145/* harmony import */ var _cubic_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cubic.js */ "./node_modules/d3-ease/src/cubic.js");
15146/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; });
15147
15148/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicIn"]; });
15149
15150/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicOut"]; });
15151
15152/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return _cubic_js__WEBPACK_IMPORTED_MODULE_2__["cubicInOut"]; });
15153
15154/* harmony import */ var _poly_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./poly.js */ "./node_modules/d3-ease/src/poly.js");
15155/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; });
15156
15157/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyIn"]; });
15158
15159/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyOut"]; });
15160
15161/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return _poly_js__WEBPACK_IMPORTED_MODULE_3__["polyInOut"]; });
15162
15163/* harmony import */ var _sin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sin.js */ "./node_modules/d3-ease/src/sin.js");
15164/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; });
15165
15166/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinIn"]; });
15167
15168/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinOut"]; });
15169
15170/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return _sin_js__WEBPACK_IMPORTED_MODULE_4__["sinInOut"]; });
15171
15172/* harmony import */ var _exp_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exp.js */ "./node_modules/d3-ease/src/exp.js");
15173/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; });
15174
15175/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expIn"]; });
15176
15177/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expOut"]; });
15178
15179/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return _exp_js__WEBPACK_IMPORTED_MODULE_5__["expInOut"]; });
15180
15181/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-ease/src/circle.js");
15182/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; });
15183
15184/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleIn"]; });
15185
15186/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleOut"]; });
15187
15188/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_6__["circleInOut"]; });
15189
15190/* harmony import */ var _bounce_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./bounce.js */ "./node_modules/d3-ease/src/bounce.js");
15191/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; });
15192
15193/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceIn"]; });
15194
15195/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceOut"]; });
15196
15197/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return _bounce_js__WEBPACK_IMPORTED_MODULE_7__["bounceInOut"]; });
15198
15199/* harmony import */ var _back_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./back.js */ "./node_modules/d3-ease/src/back.js");
15200/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; });
15201
15202/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backIn"]; });
15203
15204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backOut"]; });
15205
15206/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return _back_js__WEBPACK_IMPORTED_MODULE_8__["backInOut"]; });
15207
15208/* harmony import */ var _elastic_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./elastic.js */ "./node_modules/d3-ease/src/elastic.js");
15209/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; });
15210
15211/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticIn"]; });
15212
15213/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticOut"]; });
15214
15215/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return _elastic_js__WEBPACK_IMPORTED_MODULE_9__["elasticInOut"]; });
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238/***/ }),
15239
15240/***/ "./node_modules/d3-ease/src/linear.js":
15241/*!********************************************!*\
15242 !*** ./node_modules/d3-ease/src/linear.js ***!
15243 \********************************************/
15244/*! exports provided: linear */
15245/***/ (function(module, __webpack_exports__, __webpack_require__) {
15246
15247"use strict";
15248__webpack_require__.r(__webpack_exports__);
15249/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linear", function() { return linear; });
15250function linear(t) {
15251 return +t;
15252}
15253
15254
15255/***/ }),
15256
15257/***/ "./node_modules/d3-ease/src/poly.js":
15258/*!******************************************!*\
15259 !*** ./node_modules/d3-ease/src/poly.js ***!
15260 \******************************************/
15261/*! exports provided: polyIn, polyOut, polyInOut */
15262/***/ (function(module, __webpack_exports__, __webpack_require__) {
15263
15264"use strict";
15265__webpack_require__.r(__webpack_exports__);
15266/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyIn", function() { return polyIn; });
15267/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyOut", function() { return polyOut; });
15268/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyInOut", function() { return polyInOut; });
15269var exponent = 3;
15270
15271var polyIn = (function custom(e) {
15272 e = +e;
15273
15274 function polyIn(t) {
15275 return Math.pow(t, e);
15276 }
15277
15278 polyIn.exponent = custom;
15279
15280 return polyIn;
15281})(exponent);
15282
15283var polyOut = (function custom(e) {
15284 e = +e;
15285
15286 function polyOut(t) {
15287 return 1 - Math.pow(1 - t, e);
15288 }
15289
15290 polyOut.exponent = custom;
15291
15292 return polyOut;
15293})(exponent);
15294
15295var polyInOut = (function custom(e) {
15296 e = +e;
15297
15298 function polyInOut(t) {
15299 return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2;
15300 }
15301
15302 polyInOut.exponent = custom;
15303
15304 return polyInOut;
15305})(exponent);
15306
15307
15308/***/ }),
15309
15310/***/ "./node_modules/d3-ease/src/quad.js":
15311/*!******************************************!*\
15312 !*** ./node_modules/d3-ease/src/quad.js ***!
15313 \******************************************/
15314/*! exports provided: quadIn, quadOut, quadInOut */
15315/***/ (function(module, __webpack_exports__, __webpack_require__) {
15316
15317"use strict";
15318__webpack_require__.r(__webpack_exports__);
15319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadIn", function() { return quadIn; });
15320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadOut", function() { return quadOut; });
15321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quadInOut", function() { return quadInOut; });
15322function quadIn(t) {
15323 return t * t;
15324}
15325
15326function quadOut(t) {
15327 return t * (2 - t);
15328}
15329
15330function quadInOut(t) {
15331 return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2;
15332}
15333
15334
15335/***/ }),
15336
15337/***/ "./node_modules/d3-ease/src/sin.js":
15338/*!*****************************************!*\
15339 !*** ./node_modules/d3-ease/src/sin.js ***!
15340 \*****************************************/
15341/*! exports provided: sinIn, sinOut, sinInOut */
15342/***/ (function(module, __webpack_exports__, __webpack_require__) {
15343
15344"use strict";
15345__webpack_require__.r(__webpack_exports__);
15346/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinIn", function() { return sinIn; });
15347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinOut", function() { return sinOut; });
15348/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sinInOut", function() { return sinInOut; });
15349var pi = Math.PI,
15350 halfPi = pi / 2;
15351
15352function sinIn(t) {
15353 return 1 - Math.cos(t * halfPi);
15354}
15355
15356function sinOut(t) {
15357 return Math.sin(t * halfPi);
15358}
15359
15360function sinInOut(t) {
15361 return (1 - Math.cos(pi * t)) / 2;
15362}
15363
15364
15365/***/ }),
15366
15367/***/ "./node_modules/d3-fetch/src/blob.js":
15368/*!*******************************************!*\
15369 !*** ./node_modules/d3-fetch/src/blob.js ***!
15370 \*******************************************/
15371/*! exports provided: default */
15372/***/ (function(module, __webpack_exports__, __webpack_require__) {
15373
15374"use strict";
15375__webpack_require__.r(__webpack_exports__);
15376function responseBlob(response) {
15377 if (!response.ok) throw new Error(response.status + " " + response.statusText);
15378 return response.blob();
15379}
15380
15381/* harmony default export */ __webpack_exports__["default"] = (function(input, init) {
15382 return fetch(input, init).then(responseBlob);
15383});
15384
15385
15386/***/ }),
15387
15388/***/ "./node_modules/d3-fetch/src/buffer.js":
15389/*!*********************************************!*\
15390 !*** ./node_modules/d3-fetch/src/buffer.js ***!
15391 \*********************************************/
15392/*! exports provided: default */
15393/***/ (function(module, __webpack_exports__, __webpack_require__) {
15394
15395"use strict";
15396__webpack_require__.r(__webpack_exports__);
15397function responseArrayBuffer(response) {
15398 if (!response.ok) throw new Error(response.status + " " + response.statusText);
15399 return response.arrayBuffer();
15400}
15401
15402/* harmony default export */ __webpack_exports__["default"] = (function(input, init) {
15403 return fetch(input, init).then(responseArrayBuffer);
15404});
15405
15406
15407/***/ }),
15408
15409/***/ "./node_modules/d3-fetch/src/dsv.js":
15410/*!******************************************!*\
15411 !*** ./node_modules/d3-fetch/src/dsv.js ***!
15412 \******************************************/
15413/*! exports provided: default, csv, tsv */
15414/***/ (function(module, __webpack_exports__, __webpack_require__) {
15415
15416"use strict";
15417__webpack_require__.r(__webpack_exports__);
15418/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return dsv; });
15419/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return csv; });
15420/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return tsv; });
15421/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js");
15422/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js");
15423
15424
15425
15426function dsvParse(parse) {
15427 return function(input, init, row) {
15428 if (arguments.length === 2 && typeof init === "function") row = init, init = undefined;
15429 return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) {
15430 return parse(response, row);
15431 });
15432 };
15433}
15434
15435function dsv(delimiter, input, init, row) {
15436 if (arguments.length === 3 && typeof init === "function") row = init, init = undefined;
15437 var format = Object(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["dsvFormat"])(delimiter);
15438 return Object(_text__WEBPACK_IMPORTED_MODULE_1__["default"])(input, init).then(function(response) {
15439 return format.parse(response, row);
15440 });
15441}
15442
15443var csv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["csvParse"]);
15444var tsv = dsvParse(d3_dsv__WEBPACK_IMPORTED_MODULE_0__["tsvParse"]);
15445
15446
15447/***/ }),
15448
15449/***/ "./node_modules/d3-fetch/src/image.js":
15450/*!********************************************!*\
15451 !*** ./node_modules/d3-fetch/src/image.js ***!
15452 \********************************************/
15453/*! exports provided: default */
15454/***/ (function(module, __webpack_exports__, __webpack_require__) {
15455
15456"use strict";
15457__webpack_require__.r(__webpack_exports__);
15458/* harmony default export */ __webpack_exports__["default"] = (function(input, init) {
15459 return new Promise(function(resolve, reject) {
15460 var image = new Image;
15461 for (var key in init) image[key] = init[key];
15462 image.onerror = reject;
15463 image.onload = function() { resolve(image); };
15464 image.src = input;
15465 });
15466});
15467
15468
15469/***/ }),
15470
15471/***/ "./node_modules/d3-fetch/src/index.js":
15472/*!********************************************!*\
15473 !*** ./node_modules/d3-fetch/src/index.js ***!
15474 \********************************************/
15475/*! exports provided: blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg */
15476/***/ (function(module, __webpack_exports__, __webpack_require__) {
15477
15478"use strict";
15479__webpack_require__.r(__webpack_exports__);
15480/* harmony import */ var _blob__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./blob */ "./node_modules/d3-fetch/src/blob.js");
15481/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return _blob__WEBPACK_IMPORTED_MODULE_0__["default"]; });
15482
15483/* harmony import */ var _buffer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer */ "./node_modules/d3-fetch/src/buffer.js");
15484/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return _buffer__WEBPACK_IMPORTED_MODULE_1__["default"]; });
15485
15486/* harmony import */ var _dsv__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dsv */ "./node_modules/d3-fetch/src/dsv.js");
15487/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["default"]; });
15488
15489/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["csv"]; });
15490
15491/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return _dsv__WEBPACK_IMPORTED_MODULE_2__["tsv"]; });
15492
15493/* harmony import */ var _image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./image */ "./node_modules/d3-fetch/src/image.js");
15494/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return _image__WEBPACK_IMPORTED_MODULE_3__["default"]; });
15495
15496/* harmony import */ var _json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./json */ "./node_modules/d3-fetch/src/json.js");
15497/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return _json__WEBPACK_IMPORTED_MODULE_4__["default"]; });
15498
15499/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js");
15500/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return _text__WEBPACK_IMPORTED_MODULE_5__["default"]; });
15501
15502/* harmony import */ var _xml__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./xml */ "./node_modules/d3-fetch/src/xml.js");
15503/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["default"]; });
15504
15505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["html"]; });
15506
15507/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return _xml__WEBPACK_IMPORTED_MODULE_6__["svg"]; });
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518/***/ }),
15519
15520/***/ "./node_modules/d3-fetch/src/json.js":
15521/*!*******************************************!*\
15522 !*** ./node_modules/d3-fetch/src/json.js ***!
15523 \*******************************************/
15524/*! exports provided: default */
15525/***/ (function(module, __webpack_exports__, __webpack_require__) {
15526
15527"use strict";
15528__webpack_require__.r(__webpack_exports__);
15529function responseJson(response) {
15530 if (!response.ok) throw new Error(response.status + " " + response.statusText);
15531 return response.json();
15532}
15533
15534/* harmony default export */ __webpack_exports__["default"] = (function(input, init) {
15535 return fetch(input, init).then(responseJson);
15536});
15537
15538
15539/***/ }),
15540
15541/***/ "./node_modules/d3-fetch/src/text.js":
15542/*!*******************************************!*\
15543 !*** ./node_modules/d3-fetch/src/text.js ***!
15544 \*******************************************/
15545/*! exports provided: default */
15546/***/ (function(module, __webpack_exports__, __webpack_require__) {
15547
15548"use strict";
15549__webpack_require__.r(__webpack_exports__);
15550function responseText(response) {
15551 if (!response.ok) throw new Error(response.status + " " + response.statusText);
15552 return response.text();
15553}
15554
15555/* harmony default export */ __webpack_exports__["default"] = (function(input, init) {
15556 return fetch(input, init).then(responseText);
15557});
15558
15559
15560/***/ }),
15561
15562/***/ "./node_modules/d3-fetch/src/xml.js":
15563/*!******************************************!*\
15564 !*** ./node_modules/d3-fetch/src/xml.js ***!
15565 \******************************************/
15566/*! exports provided: default, html, svg */
15567/***/ (function(module, __webpack_exports__, __webpack_require__) {
15568
15569"use strict";
15570__webpack_require__.r(__webpack_exports__);
15571/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; });
15572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return svg; });
15573/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./text */ "./node_modules/d3-fetch/src/text.js");
15574
15575
15576function parser(type) {
15577 return function(input, init) {
15578 return Object(_text__WEBPACK_IMPORTED_MODULE_0__["default"])(input, init).then(function(text) {
15579 return (new DOMParser).parseFromString(text, type);
15580 });
15581 };
15582}
15583
15584/* harmony default export */ __webpack_exports__["default"] = (parser("application/xml"));
15585
15586var html = parser("text/html");
15587
15588var svg = parser("image/svg+xml");
15589
15590
15591/***/ }),
15592
15593/***/ "./node_modules/d3-force/src/center.js":
15594/*!*********************************************!*\
15595 !*** ./node_modules/d3-force/src/center.js ***!
15596 \*********************************************/
15597/*! exports provided: default */
15598/***/ (function(module, __webpack_exports__, __webpack_require__) {
15599
15600"use strict";
15601__webpack_require__.r(__webpack_exports__);
15602/* harmony default export */ __webpack_exports__["default"] = (function(x, y) {
15603 var nodes;
15604
15605 if (x == null) x = 0;
15606 if (y == null) y = 0;
15607
15608 function force() {
15609 var i,
15610 n = nodes.length,
15611 node,
15612 sx = 0,
15613 sy = 0;
15614
15615 for (i = 0; i < n; ++i) {
15616 node = nodes[i], sx += node.x, sy += node.y;
15617 }
15618
15619 for (sx = sx / n - x, sy = sy / n - y, i = 0; i < n; ++i) {
15620 node = nodes[i], node.x -= sx, node.y -= sy;
15621 }
15622 }
15623
15624 force.initialize = function(_) {
15625 nodes = _;
15626 };
15627
15628 force.x = function(_) {
15629 return arguments.length ? (x = +_, force) : x;
15630 };
15631
15632 force.y = function(_) {
15633 return arguments.length ? (y = +_, force) : y;
15634 };
15635
15636 return force;
15637});
15638
15639
15640/***/ }),
15641
15642/***/ "./node_modules/d3-force/src/collide.js":
15643/*!**********************************************!*\
15644 !*** ./node_modules/d3-force/src/collide.js ***!
15645 \**********************************************/
15646/*! exports provided: default */
15647/***/ (function(module, __webpack_exports__, __webpack_require__) {
15648
15649"use strict";
15650__webpack_require__.r(__webpack_exports__);
15651/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
15652/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js");
15653/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js");
15654
15655
15656
15657
15658function x(d) {
15659 return d.x + d.vx;
15660}
15661
15662function y(d) {
15663 return d.y + d.vy;
15664}
15665
15666/* harmony default export */ __webpack_exports__["default"] = (function(radius) {
15667 var nodes,
15668 radii,
15669 strength = 1,
15670 iterations = 1;
15671
15672 if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(radius == null ? 1 : +radius);
15673
15674 function force() {
15675 var i, n = nodes.length,
15676 tree,
15677 node,
15678 xi,
15679 yi,
15680 ri,
15681 ri2;
15682
15683 for (var k = 0; k < iterations; ++k) {
15684 tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, x, y).visitAfter(prepare);
15685 for (i = 0; i < n; ++i) {
15686 node = nodes[i];
15687 ri = radii[node.index], ri2 = ri * ri;
15688 xi = node.x + node.vx;
15689 yi = node.y + node.vy;
15690 tree.visit(apply);
15691 }
15692 }
15693
15694 function apply(quad, x0, y0, x1, y1) {
15695 var data = quad.data, rj = quad.r, r = ri + rj;
15696 if (data) {
15697 if (data.index > node.index) {
15698 var x = xi - data.x - data.vx,
15699 y = yi - data.y - data.vy,
15700 l = x * x + y * y;
15701 if (l < r * r) {
15702 if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x;
15703 if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y;
15704 l = (r - (l = Math.sqrt(l))) / l * strength;
15705 node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj));
15706 node.vy += (y *= l) * r;
15707 data.vx -= x * (r = 1 - r);
15708 data.vy -= y * r;
15709 }
15710 }
15711 return;
15712 }
15713 return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r;
15714 }
15715 }
15716
15717 function prepare(quad) {
15718 if (quad.data) return quad.r = radii[quad.data.index];
15719 for (var i = quad.r = 0; i < 4; ++i) {
15720 if (quad[i] && quad[i].r > quad.r) {
15721 quad.r = quad[i].r;
15722 }
15723 }
15724 }
15725
15726 function initialize() {
15727 if (!nodes) return;
15728 var i, n = nodes.length, node;
15729 radii = new Array(n);
15730 for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes);
15731 }
15732
15733 force.initialize = function(_) {
15734 nodes = _;
15735 initialize();
15736 };
15737
15738 force.iterations = function(_) {
15739 return arguments.length ? (iterations = +_, force) : iterations;
15740 };
15741
15742 force.strength = function(_) {
15743 return arguments.length ? (strength = +_, force) : strength;
15744 };
15745
15746 force.radius = function(_) {
15747 return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius;
15748 };
15749
15750 return force;
15751});
15752
15753
15754/***/ }),
15755
15756/***/ "./node_modules/d3-force/src/constant.js":
15757/*!***********************************************!*\
15758 !*** ./node_modules/d3-force/src/constant.js ***!
15759 \***********************************************/
15760/*! exports provided: default */
15761/***/ (function(module, __webpack_exports__, __webpack_require__) {
15762
15763"use strict";
15764__webpack_require__.r(__webpack_exports__);
15765/* harmony default export */ __webpack_exports__["default"] = (function(x) {
15766 return function() {
15767 return x;
15768 };
15769});
15770
15771
15772/***/ }),
15773
15774/***/ "./node_modules/d3-force/src/index.js":
15775/*!********************************************!*\
15776 !*** ./node_modules/d3-force/src/index.js ***!
15777 \********************************************/
15778/*! exports provided: forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY */
15779/***/ (function(module, __webpack_exports__, __webpack_require__) {
15780
15781"use strict";
15782__webpack_require__.r(__webpack_exports__);
15783/* harmony import */ var _center__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./center */ "./node_modules/d3-force/src/center.js");
15784/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return _center__WEBPACK_IMPORTED_MODULE_0__["default"]; });
15785
15786/* harmony import */ var _collide__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./collide */ "./node_modules/d3-force/src/collide.js");
15787/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return _collide__WEBPACK_IMPORTED_MODULE_1__["default"]; });
15788
15789/* harmony import */ var _link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./link */ "./node_modules/d3-force/src/link.js");
15790/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return _link__WEBPACK_IMPORTED_MODULE_2__["default"]; });
15791
15792/* harmony import */ var _manyBody__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./manyBody */ "./node_modules/d3-force/src/manyBody.js");
15793/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return _manyBody__WEBPACK_IMPORTED_MODULE_3__["default"]; });
15794
15795/* harmony import */ var _radial__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./radial */ "./node_modules/d3-force/src/radial.js");
15796/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return _radial__WEBPACK_IMPORTED_MODULE_4__["default"]; });
15797
15798/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js");
15799/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return _simulation__WEBPACK_IMPORTED_MODULE_5__["default"]; });
15800
15801/* harmony import */ var _x__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./x */ "./node_modules/d3-force/src/x.js");
15802/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return _x__WEBPACK_IMPORTED_MODULE_6__["default"]; });
15803
15804/* harmony import */ var _y__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./y */ "./node_modules/d3-force/src/y.js");
15805/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return _y__WEBPACK_IMPORTED_MODULE_7__["default"]; });
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817/***/ }),
15818
15819/***/ "./node_modules/d3-force/src/jiggle.js":
15820/*!*********************************************!*\
15821 !*** ./node_modules/d3-force/src/jiggle.js ***!
15822 \*********************************************/
15823/*! exports provided: default */
15824/***/ (function(module, __webpack_exports__, __webpack_require__) {
15825
15826"use strict";
15827__webpack_require__.r(__webpack_exports__);
15828/* harmony default export */ __webpack_exports__["default"] = (function() {
15829 return (Math.random() - 0.5) * 1e-6;
15830});
15831
15832
15833/***/ }),
15834
15835/***/ "./node_modules/d3-force/src/link.js":
15836/*!*******************************************!*\
15837 !*** ./node_modules/d3-force/src/link.js ***!
15838 \*******************************************/
15839/*! exports provided: default */
15840/***/ (function(module, __webpack_exports__, __webpack_require__) {
15841
15842"use strict";
15843__webpack_require__.r(__webpack_exports__);
15844/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
15845/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js");
15846/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js");
15847
15848
15849
15850
15851function index(d) {
15852 return d.index;
15853}
15854
15855function find(nodeById, nodeId) {
15856 var node = nodeById.get(nodeId);
15857 if (!node) throw new Error("missing: " + nodeId);
15858 return node;
15859}
15860
15861/* harmony default export */ __webpack_exports__["default"] = (function(links) {
15862 var id = index,
15863 strength = defaultStrength,
15864 strengths,
15865 distance = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(30),
15866 distances,
15867 nodes,
15868 count,
15869 bias,
15870 iterations = 1;
15871
15872 if (links == null) links = [];
15873
15874 function defaultStrength(link) {
15875 return 1 / Math.min(count[link.source.index], count[link.target.index]);
15876 }
15877
15878 function force(alpha) {
15879 for (var k = 0, n = links.length; k < iterations; ++k) {
15880 for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {
15881 link = links[i], source = link.source, target = link.target;
15882 x = target.x + target.vx - source.x - source.vx || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])();
15883 y = target.y + target.vy - source.y - source.vy || Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])();
15884 l = Math.sqrt(x * x + y * y);
15885 l = (l - distances[i]) / l * alpha * strengths[i];
15886 x *= l, y *= l;
15887 target.vx -= x * (b = bias[i]);
15888 target.vy -= y * b;
15889 source.vx += x * (b = 1 - b);
15890 source.vy += y * b;
15891 }
15892 }
15893 }
15894
15895 function initialize() {
15896 if (!nodes) return;
15897
15898 var i,
15899 n = nodes.length,
15900 m = links.length,
15901 nodeById = Object(d3_collection__WEBPACK_IMPORTED_MODULE_2__["map"])(nodes, id),
15902 link;
15903
15904 for (i = 0, count = new Array(n); i < m; ++i) {
15905 link = links[i], link.index = i;
15906 if (typeof link.source !== "object") link.source = find(nodeById, link.source);
15907 if (typeof link.target !== "object") link.target = find(nodeById, link.target);
15908 count[link.source.index] = (count[link.source.index] || 0) + 1;
15909 count[link.target.index] = (count[link.target.index] || 0) + 1;
15910 }
15911
15912 for (i = 0, bias = new Array(m); i < m; ++i) {
15913 link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);
15914 }
15915
15916 strengths = new Array(m), initializeStrength();
15917 distances = new Array(m), initializeDistance();
15918 }
15919
15920 function initializeStrength() {
15921 if (!nodes) return;
15922
15923 for (var i = 0, n = links.length; i < n; ++i) {
15924 strengths[i] = +strength(links[i], i, links);
15925 }
15926 }
15927
15928 function initializeDistance() {
15929 if (!nodes) return;
15930
15931 for (var i = 0, n = links.length; i < n; ++i) {
15932 distances[i] = +distance(links[i], i, links);
15933 }
15934 }
15935
15936 force.initialize = function(_) {
15937 nodes = _;
15938 initialize();
15939 };
15940
15941 force.links = function(_) {
15942 return arguments.length ? (links = _, initialize(), force) : links;
15943 };
15944
15945 force.id = function(_) {
15946 return arguments.length ? (id = _, force) : id;
15947 };
15948
15949 force.iterations = function(_) {
15950 return arguments.length ? (iterations = +_, force) : iterations;
15951 };
15952
15953 force.strength = function(_) {
15954 return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeStrength(), force) : strength;
15955 };
15956
15957 force.distance = function(_) {
15958 return arguments.length ? (distance = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initializeDistance(), force) : distance;
15959 };
15960
15961 return force;
15962});
15963
15964
15965/***/ }),
15966
15967/***/ "./node_modules/d3-force/src/manyBody.js":
15968/*!***********************************************!*\
15969 !*** ./node_modules/d3-force/src/manyBody.js ***!
15970 \***********************************************/
15971/*! exports provided: default */
15972/***/ (function(module, __webpack_exports__, __webpack_require__) {
15973
15974"use strict";
15975__webpack_require__.r(__webpack_exports__);
15976/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
15977/* harmony import */ var _jiggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jiggle */ "./node_modules/d3-force/src/jiggle.js");
15978/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js");
15979/* harmony import */ var _simulation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./simulation */ "./node_modules/d3-force/src/simulation.js");
15980
15981
15982
15983
15984
15985/* harmony default export */ __webpack_exports__["default"] = (function() {
15986 var nodes,
15987 node,
15988 alpha,
15989 strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(-30),
15990 strengths,
15991 distanceMin2 = 1,
15992 distanceMax2 = Infinity,
15993 theta2 = 0.81;
15994
15995 function force(_) {
15996 var i, n = nodes.length, tree = Object(d3_quadtree__WEBPACK_IMPORTED_MODULE_2__["quadtree"])(nodes, _simulation__WEBPACK_IMPORTED_MODULE_3__["x"], _simulation__WEBPACK_IMPORTED_MODULE_3__["y"]).visitAfter(accumulate);
15997 for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);
15998 }
15999
16000 function initialize() {
16001 if (!nodes) return;
16002 var i, n = nodes.length, node;
16003 strengths = new Array(n);
16004 for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);
16005 }
16006
16007 function accumulate(quad) {
16008 var strength = 0, q, c, weight = 0, x, y, i;
16009
16010 // For internal nodes, accumulate forces from child quadrants.
16011 if (quad.length) {
16012 for (x = y = i = 0; i < 4; ++i) {
16013 if ((q = quad[i]) && (c = Math.abs(q.value))) {
16014 strength += q.value, weight += c, x += c * q.x, y += c * q.y;
16015 }
16016 }
16017 quad.x = x / weight;
16018 quad.y = y / weight;
16019 }
16020
16021 // For leaf nodes, accumulate forces from coincident quadrants.
16022 else {
16023 q = quad;
16024 q.x = q.data.x;
16025 q.y = q.data.y;
16026 do strength += strengths[q.data.index];
16027 while (q = q.next);
16028 }
16029
16030 quad.value = strength;
16031 }
16032
16033 function apply(quad, x1, _, x2) {
16034 if (!quad.value) return true;
16035
16036 var x = quad.x - node.x,
16037 y = quad.y - node.y,
16038 w = x2 - x1,
16039 l = x * x + y * y;
16040
16041 // Apply the Barnes-Hut approximation if possible.
16042 // Limit forces for very close nodes; randomize direction if coincident.
16043 if (w * w / theta2 < l) {
16044 if (l < distanceMax2) {
16045 if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x;
16046 if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y;
16047 if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
16048 node.vx += x * quad.value * alpha / l;
16049 node.vy += y * quad.value * alpha / l;
16050 }
16051 return true;
16052 }
16053
16054 // Otherwise, process points directly.
16055 else if (quad.length || l >= distanceMax2) return;
16056
16057 // Limit forces for very close nodes; randomize direction if coincident.
16058 if (quad.data !== node || quad.next) {
16059 if (x === 0) x = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += x * x;
16060 if (y === 0) y = Object(_jiggle__WEBPACK_IMPORTED_MODULE_1__["default"])(), l += y * y;
16061 if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);
16062 }
16063
16064 do if (quad.data !== node) {
16065 w = strengths[quad.data.index] * alpha / l;
16066 node.vx += x * w;
16067 node.vy += y * w;
16068 } while (quad = quad.next);
16069 }
16070
16071 force.initialize = function(_) {
16072 nodes = _;
16073 initialize();
16074 };
16075
16076 force.strength = function(_) {
16077 return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength;
16078 };
16079
16080 force.distanceMin = function(_) {
16081 return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);
16082 };
16083
16084 force.distanceMax = function(_) {
16085 return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);
16086 };
16087
16088 force.theta = function(_) {
16089 return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);
16090 };
16091
16092 return force;
16093});
16094
16095
16096/***/ }),
16097
16098/***/ "./node_modules/d3-force/src/radial.js":
16099/*!*********************************************!*\
16100 !*** ./node_modules/d3-force/src/radial.js ***!
16101 \*********************************************/
16102/*! exports provided: default */
16103/***/ (function(module, __webpack_exports__, __webpack_require__) {
16104
16105"use strict";
16106__webpack_require__.r(__webpack_exports__);
16107/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
16108
16109
16110/* harmony default export */ __webpack_exports__["default"] = (function(radius, x, y) {
16111 var nodes,
16112 strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1),
16113 strengths,
16114 radiuses;
16115
16116 if (typeof radius !== "function") radius = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+radius);
16117 if (x == null) x = 0;
16118 if (y == null) y = 0;
16119
16120 function force(alpha) {
16121 for (var i = 0, n = nodes.length; i < n; ++i) {
16122 var node = nodes[i],
16123 dx = node.x - x || 1e-6,
16124 dy = node.y - y || 1e-6,
16125 r = Math.sqrt(dx * dx + dy * dy),
16126 k = (radiuses[i] - r) * strengths[i] * alpha / r;
16127 node.vx += dx * k;
16128 node.vy += dy * k;
16129 }
16130 }
16131
16132 function initialize() {
16133 if (!nodes) return;
16134 var i, n = nodes.length;
16135 strengths = new Array(n);
16136 radiuses = new Array(n);
16137 for (i = 0; i < n; ++i) {
16138 radiuses[i] = +radius(nodes[i], i, nodes);
16139 strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes);
16140 }
16141 }
16142
16143 force.initialize = function(_) {
16144 nodes = _, initialize();
16145 };
16146
16147 force.strength = function(_) {
16148 return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength;
16149 };
16150
16151 force.radius = function(_) {
16152 return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : radius;
16153 };
16154
16155 force.x = function(_) {
16156 return arguments.length ? (x = +_, force) : x;
16157 };
16158
16159 force.y = function(_) {
16160 return arguments.length ? (y = +_, force) : y;
16161 };
16162
16163 return force;
16164});
16165
16166
16167/***/ }),
16168
16169/***/ "./node_modules/d3-force/src/simulation.js":
16170/*!*************************************************!*\
16171 !*** ./node_modules/d3-force/src/simulation.js ***!
16172 \*************************************************/
16173/*! exports provided: x, y, default */
16174/***/ (function(module, __webpack_exports__, __webpack_require__) {
16175
16176"use strict";
16177__webpack_require__.r(__webpack_exports__);
16178/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; });
16179/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; });
16180/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
16181/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js");
16182/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js");
16183
16184
16185
16186
16187function x(d) {
16188 return d.x;
16189}
16190
16191function y(d) {
16192 return d.y;
16193}
16194
16195var initialRadius = 10,
16196 initialAngle = Math.PI * (3 - Math.sqrt(5));
16197
16198/* harmony default export */ __webpack_exports__["default"] = (function(nodes) {
16199 var simulation,
16200 alpha = 1,
16201 alphaMin = 0.001,
16202 alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),
16203 alphaTarget = 0,
16204 velocityDecay = 0.6,
16205 forces = Object(d3_collection__WEBPACK_IMPORTED_MODULE_1__["map"])(),
16206 stepper = Object(d3_timer__WEBPACK_IMPORTED_MODULE_2__["timer"])(step),
16207 event = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("tick", "end");
16208
16209 if (nodes == null) nodes = [];
16210
16211 function step() {
16212 tick();
16213 event.call("tick", simulation);
16214 if (alpha < alphaMin) {
16215 stepper.stop();
16216 event.call("end", simulation);
16217 }
16218 }
16219
16220 function tick(iterations) {
16221 var i, n = nodes.length, node;
16222
16223 if (iterations === undefined) iterations = 1;
16224
16225 for (var k = 0; k < iterations; ++k) {
16226 alpha += (alphaTarget - alpha) * alphaDecay;
16227
16228 forces.each(function (force) {
16229 force(alpha);
16230 });
16231
16232 for (i = 0; i < n; ++i) {
16233 node = nodes[i];
16234 if (node.fx == null) node.x += node.vx *= velocityDecay;
16235 else node.x = node.fx, node.vx = 0;
16236 if (node.fy == null) node.y += node.vy *= velocityDecay;
16237 else node.y = node.fy, node.vy = 0;
16238 }
16239 }
16240
16241 return simulation;
16242 }
16243
16244 function initializeNodes() {
16245 for (var i = 0, n = nodes.length, node; i < n; ++i) {
16246 node = nodes[i], node.index = i;
16247 if (node.fx != null) node.x = node.fx;
16248 if (node.fy != null) node.y = node.fy;
16249 if (isNaN(node.x) || isNaN(node.y)) {
16250 var radius = initialRadius * Math.sqrt(i), angle = i * initialAngle;
16251 node.x = radius * Math.cos(angle);
16252 node.y = radius * Math.sin(angle);
16253 }
16254 if (isNaN(node.vx) || isNaN(node.vy)) {
16255 node.vx = node.vy = 0;
16256 }
16257 }
16258 }
16259
16260 function initializeForce(force) {
16261 if (force.initialize) force.initialize(nodes);
16262 return force;
16263 }
16264
16265 initializeNodes();
16266
16267 return simulation = {
16268 tick: tick,
16269
16270 restart: function() {
16271 return stepper.restart(step), simulation;
16272 },
16273
16274 stop: function() {
16275 return stepper.stop(), simulation;
16276 },
16277
16278 nodes: function(_) {
16279 return arguments.length ? (nodes = _, initializeNodes(), forces.each(initializeForce), simulation) : nodes;
16280 },
16281
16282 alpha: function(_) {
16283 return arguments.length ? (alpha = +_, simulation) : alpha;
16284 },
16285
16286 alphaMin: function(_) {
16287 return arguments.length ? (alphaMin = +_, simulation) : alphaMin;
16288 },
16289
16290 alphaDecay: function(_) {
16291 return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;
16292 },
16293
16294 alphaTarget: function(_) {
16295 return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;
16296 },
16297
16298 velocityDecay: function(_) {
16299 return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;
16300 },
16301
16302 force: function(name, _) {
16303 return arguments.length > 1 ? ((_ == null ? forces.remove(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);
16304 },
16305
16306 find: function(x, y, radius) {
16307 var i = 0,
16308 n = nodes.length,
16309 dx,
16310 dy,
16311 d2,
16312 node,
16313 closest;
16314
16315 if (radius == null) radius = Infinity;
16316 else radius *= radius;
16317
16318 for (i = 0; i < n; ++i) {
16319 node = nodes[i];
16320 dx = x - node.x;
16321 dy = y - node.y;
16322 d2 = dx * dx + dy * dy;
16323 if (d2 < radius) closest = node, radius = d2;
16324 }
16325
16326 return closest;
16327 },
16328
16329 on: function(name, _) {
16330 return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);
16331 }
16332 };
16333});
16334
16335
16336/***/ }),
16337
16338/***/ "./node_modules/d3-force/src/x.js":
16339/*!****************************************!*\
16340 !*** ./node_modules/d3-force/src/x.js ***!
16341 \****************************************/
16342/*! exports provided: default */
16343/***/ (function(module, __webpack_exports__, __webpack_require__) {
16344
16345"use strict";
16346__webpack_require__.r(__webpack_exports__);
16347/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
16348
16349
16350/* harmony default export */ __webpack_exports__["default"] = (function(x) {
16351 var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1),
16352 nodes,
16353 strengths,
16354 xz;
16355
16356 if (typeof x !== "function") x = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(x == null ? 0 : +x);
16357
16358 function force(alpha) {
16359 for (var i = 0, n = nodes.length, node; i < n; ++i) {
16360 node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha;
16361 }
16362 }
16363
16364 function initialize() {
16365 if (!nodes) return;
16366 var i, n = nodes.length;
16367 strengths = new Array(n);
16368 xz = new Array(n);
16369 for (i = 0; i < n; ++i) {
16370 strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
16371 }
16372 }
16373
16374 force.initialize = function(_) {
16375 nodes = _;
16376 initialize();
16377 };
16378
16379 force.strength = function(_) {
16380 return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength;
16381 };
16382
16383 force.x = function(_) {
16384 return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : x;
16385 };
16386
16387 return force;
16388});
16389
16390
16391/***/ }),
16392
16393/***/ "./node_modules/d3-force/src/y.js":
16394/*!****************************************!*\
16395 !*** ./node_modules/d3-force/src/y.js ***!
16396 \****************************************/
16397/*! exports provided: default */
16398/***/ (function(module, __webpack_exports__, __webpack_require__) {
16399
16400"use strict";
16401__webpack_require__.r(__webpack_exports__);
16402/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-force/src/constant.js");
16403
16404
16405/* harmony default export */ __webpack_exports__["default"] = (function(y) {
16406 var strength = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(0.1),
16407 nodes,
16408 strengths,
16409 yz;
16410
16411 if (typeof y !== "function") y = Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(y == null ? 0 : +y);
16412
16413 function force(alpha) {
16414 for (var i = 0, n = nodes.length, node; i < n; ++i) {
16415 node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha;
16416 }
16417 }
16418
16419 function initialize() {
16420 if (!nodes) return;
16421 var i, n = nodes.length;
16422 strengths = new Array(n);
16423 yz = new Array(n);
16424 for (i = 0; i < n; ++i) {
16425 strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes);
16426 }
16427 }
16428
16429 force.initialize = function(_) {
16430 nodes = _;
16431 initialize();
16432 };
16433
16434 force.strength = function(_) {
16435 return arguments.length ? (strength = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : strength;
16436 };
16437
16438 force.y = function(_) {
16439 return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), initialize(), force) : y;
16440 };
16441
16442 return force;
16443});
16444
16445
16446/***/ }),
16447
16448/***/ "./node_modules/d3-format/src/defaultLocale.js":
16449/*!*****************************************************!*\
16450 !*** ./node_modules/d3-format/src/defaultLocale.js ***!
16451 \*****************************************************/
16452/*! exports provided: format, formatPrefix, default */
16453/***/ (function(module, __webpack_exports__, __webpack_require__) {
16454
16455"use strict";
16456__webpack_require__.r(__webpack_exports__);
16457/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "format", function() { return format; });
16458/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return formatPrefix; });
16459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; });
16460/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js");
16461
16462
16463var locale;
16464var format;
16465var formatPrefix;
16466
16467defaultLocale({
16468 decimal: ".",
16469 thousands: ",",
16470 grouping: [3],
16471 currency: ["$", ""],
16472 minus: "-"
16473});
16474
16475function defaultLocale(definition) {
16476 locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition);
16477 format = locale.format;
16478 formatPrefix = locale.formatPrefix;
16479 return locale;
16480}
16481
16482
16483/***/ }),
16484
16485/***/ "./node_modules/d3-format/src/exponent.js":
16486/*!************************************************!*\
16487 !*** ./node_modules/d3-format/src/exponent.js ***!
16488 \************************************************/
16489/*! exports provided: default */
16490/***/ (function(module, __webpack_exports__, __webpack_require__) {
16491
16492"use strict";
16493__webpack_require__.r(__webpack_exports__);
16494/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");
16495
16496
16497/* harmony default export */ __webpack_exports__["default"] = (function(x) {
16498 return x = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(x)), x ? x[1] : NaN;
16499});
16500
16501
16502/***/ }),
16503
16504/***/ "./node_modules/d3-format/src/formatDecimal.js":
16505/*!*****************************************************!*\
16506 !*** ./node_modules/d3-format/src/formatDecimal.js ***!
16507 \*****************************************************/
16508/*! exports provided: default */
16509/***/ (function(module, __webpack_exports__, __webpack_require__) {
16510
16511"use strict";
16512__webpack_require__.r(__webpack_exports__);
16513// Computes the decimal coefficient and exponent of the specified number x with
16514// significant digits p, where x is positive and p is in [1, 21] or undefined.
16515// For example, formatDecimal(1.23) returns ["123", 0].
16516/* harmony default export */ __webpack_exports__["default"] = (function(x, p) {
16517 if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
16518 var i, coefficient = x.slice(0, i);
16519
16520 // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
16521 // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
16522 return [
16523 coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
16524 +x.slice(i + 1)
16525 ];
16526});
16527
16528
16529/***/ }),
16530
16531/***/ "./node_modules/d3-format/src/formatGroup.js":
16532/*!***************************************************!*\
16533 !*** ./node_modules/d3-format/src/formatGroup.js ***!
16534 \***************************************************/
16535/*! exports provided: default */
16536/***/ (function(module, __webpack_exports__, __webpack_require__) {
16537
16538"use strict";
16539__webpack_require__.r(__webpack_exports__);
16540/* harmony default export */ __webpack_exports__["default"] = (function(grouping, thousands) {
16541 return function(value, width) {
16542 var i = value.length,
16543 t = [],
16544 j = 0,
16545 g = grouping[0],
16546 length = 0;
16547
16548 while (i > 0 && g > 0) {
16549 if (length + g + 1 > width) g = Math.max(1, width - length);
16550 t.push(value.substring(i -= g, i + g));
16551 if ((length += g + 1) > width) break;
16552 g = grouping[j = (j + 1) % grouping.length];
16553 }
16554
16555 return t.reverse().join(thousands);
16556 };
16557});
16558
16559
16560/***/ }),
16561
16562/***/ "./node_modules/d3-format/src/formatNumerals.js":
16563/*!******************************************************!*\
16564 !*** ./node_modules/d3-format/src/formatNumerals.js ***!
16565 \******************************************************/
16566/*! exports provided: default */
16567/***/ (function(module, __webpack_exports__, __webpack_require__) {
16568
16569"use strict";
16570__webpack_require__.r(__webpack_exports__);
16571/* harmony default export */ __webpack_exports__["default"] = (function(numerals) {
16572 return function(value) {
16573 return value.replace(/[0-9]/g, function(i) {
16574 return numerals[+i];
16575 });
16576 };
16577});
16578
16579
16580/***/ }),
16581
16582/***/ "./node_modules/d3-format/src/formatPrefixAuto.js":
16583/*!********************************************************!*\
16584 !*** ./node_modules/d3-format/src/formatPrefixAuto.js ***!
16585 \********************************************************/
16586/*! exports provided: prefixExponent, default */
16587/***/ (function(module, __webpack_exports__, __webpack_require__) {
16588
16589"use strict";
16590__webpack_require__.r(__webpack_exports__);
16591/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prefixExponent", function() { return prefixExponent; });
16592/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");
16593
16594
16595var prefixExponent;
16596
16597/* harmony default export */ __webpack_exports__["default"] = (function(x, p) {
16598 var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p);
16599 if (!d) return x + "";
16600 var coefficient = d[0],
16601 exponent = d[1],
16602 i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
16603 n = coefficient.length;
16604 return i === n ? coefficient
16605 : i > n ? coefficient + new Array(i - n + 1).join("0")
16606 : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i)
16607 : "0." + new Array(1 - i).join("0") + Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, Math.max(0, p + i - 1))[0]; // less than 1y!
16608});
16609
16610
16611/***/ }),
16612
16613/***/ "./node_modules/d3-format/src/formatRounded.js":
16614/*!*****************************************************!*\
16615 !*** ./node_modules/d3-format/src/formatRounded.js ***!
16616 \*****************************************************/
16617/*! exports provided: default */
16618/***/ (function(module, __webpack_exports__, __webpack_require__) {
16619
16620"use strict";
16621__webpack_require__.r(__webpack_exports__);
16622/* harmony import */ var _formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatDecimal.js */ "./node_modules/d3-format/src/formatDecimal.js");
16623
16624
16625/* harmony default export */ __webpack_exports__["default"] = (function(x, p) {
16626 var d = Object(_formatDecimal_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x, p);
16627 if (!d) return x + "";
16628 var coefficient = d[0],
16629 exponent = d[1];
16630 return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient
16631 : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1)
16632 : coefficient + new Array(exponent - coefficient.length + 2).join("0");
16633});
16634
16635
16636/***/ }),
16637
16638/***/ "./node_modules/d3-format/src/formatSpecifier.js":
16639/*!*******************************************************!*\
16640 !*** ./node_modules/d3-format/src/formatSpecifier.js ***!
16641 \*******************************************************/
16642/*! exports provided: default, FormatSpecifier */
16643/***/ (function(module, __webpack_exports__, __webpack_require__) {
16644
16645"use strict";
16646__webpack_require__.r(__webpack_exports__);
16647/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatSpecifier; });
16648/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return FormatSpecifier; });
16649// [[fill]align][sign][symbol][0][width][,][.precision][~][type]
16650var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
16651
16652function formatSpecifier(specifier) {
16653 if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
16654 var match;
16655 return new FormatSpecifier({
16656 fill: match[1],
16657 align: match[2],
16658 sign: match[3],
16659 symbol: match[4],
16660 zero: match[5],
16661 width: match[6],
16662 comma: match[7],
16663 precision: match[8] && match[8].slice(1),
16664 trim: match[9],
16665 type: match[10]
16666 });
16667}
16668
16669formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
16670
16671function FormatSpecifier(specifier) {
16672 this.fill = specifier.fill === undefined ? " " : specifier.fill + "";
16673 this.align = specifier.align === undefined ? ">" : specifier.align + "";
16674 this.sign = specifier.sign === undefined ? "-" : specifier.sign + "";
16675 this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + "";
16676 this.zero = !!specifier.zero;
16677 this.width = specifier.width === undefined ? undefined : +specifier.width;
16678 this.comma = !!specifier.comma;
16679 this.precision = specifier.precision === undefined ? undefined : +specifier.precision;
16680 this.trim = !!specifier.trim;
16681 this.type = specifier.type === undefined ? "" : specifier.type + "";
16682}
16683
16684FormatSpecifier.prototype.toString = function() {
16685 return this.fill
16686 + this.align
16687 + this.sign
16688 + this.symbol
16689 + (this.zero ? "0" : "")
16690 + (this.width === undefined ? "" : Math.max(1, this.width | 0))
16691 + (this.comma ? "," : "")
16692 + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0))
16693 + (this.trim ? "~" : "")
16694 + this.type;
16695};
16696
16697
16698/***/ }),
16699
16700/***/ "./node_modules/d3-format/src/formatTrim.js":
16701/*!**************************************************!*\
16702 !*** ./node_modules/d3-format/src/formatTrim.js ***!
16703 \**************************************************/
16704/*! exports provided: default */
16705/***/ (function(module, __webpack_exports__, __webpack_require__) {
16706
16707"use strict";
16708__webpack_require__.r(__webpack_exports__);
16709// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
16710/* harmony default export */ __webpack_exports__["default"] = (function(s) {
16711 out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
16712 switch (s[i]) {
16713 case ".": i0 = i1 = i; break;
16714 case "0": if (i0 === 0) i0 = i; i1 = i; break;
16715 default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;
16716 }
16717 }
16718 return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
16719});
16720
16721
16722/***/ }),
16723
16724/***/ "./node_modules/d3-format/src/formatTypes.js":
16725/*!***************************************************!*\
16726 !*** ./node_modules/d3-format/src/formatTypes.js ***!
16727 \***************************************************/
16728/*! exports provided: default */
16729/***/ (function(module, __webpack_exports__, __webpack_require__) {
16730
16731"use strict";
16732__webpack_require__.r(__webpack_exports__);
16733/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js");
16734/* harmony import */ var _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatRounded.js */ "./node_modules/d3-format/src/formatRounded.js");
16735
16736
16737
16738/* harmony default export */ __webpack_exports__["default"] = ({
16739 "%": function(x, p) { return (x * 100).toFixed(p); },
16740 "b": function(x) { return Math.round(x).toString(2); },
16741 "c": function(x) { return x + ""; },
16742 "d": function(x) { return Math.round(x).toString(10); },
16743 "e": function(x, p) { return x.toExponential(p); },
16744 "f": function(x, p) { return x.toFixed(p); },
16745 "g": function(x, p) { return x.toPrecision(p); },
16746 "o": function(x) { return Math.round(x).toString(8); },
16747 "p": function(x, p) { return Object(_formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x * 100, p); },
16748 "r": _formatRounded_js__WEBPACK_IMPORTED_MODULE_1__["default"],
16749 "s": _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_0__["default"],
16750 "X": function(x) { return Math.round(x).toString(16).toUpperCase(); },
16751 "x": function(x) { return Math.round(x).toString(16); }
16752});
16753
16754
16755/***/ }),
16756
16757/***/ "./node_modules/d3-format/src/identity.js":
16758/*!************************************************!*\
16759 !*** ./node_modules/d3-format/src/identity.js ***!
16760 \************************************************/
16761/*! exports provided: default */
16762/***/ (function(module, __webpack_exports__, __webpack_require__) {
16763
16764"use strict";
16765__webpack_require__.r(__webpack_exports__);
16766/* harmony default export */ __webpack_exports__["default"] = (function(x) {
16767 return x;
16768});
16769
16770
16771/***/ }),
16772
16773/***/ "./node_modules/d3-format/src/index.js":
16774/*!*********************************************!*\
16775 !*** ./node_modules/d3-format/src/index.js ***!
16776 \*********************************************/
16777/*! exports provided: formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound */
16778/***/ (function(module, __webpack_exports__, __webpack_require__) {
16779
16780"use strict";
16781__webpack_require__.r(__webpack_exports__);
16782/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-format/src/defaultLocale.js");
16783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
16784
16785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["format"]; });
16786
16787/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["formatPrefix"]; });
16788
16789/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-format/src/locale.js");
16790/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
16791
16792/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js");
16793/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
16794
16795/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_2__["FormatSpecifier"]; });
16796
16797/* harmony import */ var _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./precisionFixed.js */ "./node_modules/d3-format/src/precisionFixed.js");
16798/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return _precisionFixed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
16799
16800/* harmony import */ var _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./precisionPrefix.js */ "./node_modules/d3-format/src/precisionPrefix.js");
16801/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return _precisionPrefix_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
16802
16803/* harmony import */ var _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./precisionRound.js */ "./node_modules/d3-format/src/precisionRound.js");
16804/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return _precisionRound_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814/***/ }),
16815
16816/***/ "./node_modules/d3-format/src/locale.js":
16817/*!**********************************************!*\
16818 !*** ./node_modules/d3-format/src/locale.js ***!
16819 \**********************************************/
16820/*! exports provided: default */
16821/***/ (function(module, __webpack_exports__, __webpack_require__) {
16822
16823"use strict";
16824__webpack_require__.r(__webpack_exports__);
16825/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js");
16826/* harmony import */ var _formatGroup_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formatGroup.js */ "./node_modules/d3-format/src/formatGroup.js");
16827/* harmony import */ var _formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formatNumerals.js */ "./node_modules/d3-format/src/formatNumerals.js");
16828/* harmony import */ var _formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formatSpecifier.js */ "./node_modules/d3-format/src/formatSpecifier.js");
16829/* harmony import */ var _formatTrim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formatTrim.js */ "./node_modules/d3-format/src/formatTrim.js");
16830/* harmony import */ var _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatTypes.js */ "./node_modules/d3-format/src/formatTypes.js");
16831/* harmony import */ var _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./formatPrefixAuto.js */ "./node_modules/d3-format/src/formatPrefixAuto.js");
16832/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-format/src/identity.js");
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842var map = Array.prototype.map,
16843 prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];
16844
16845/* harmony default export */ __webpack_exports__["default"] = (function(locale) {
16846 var group = locale.grouping === undefined || locale.thousands === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatGroup_js__WEBPACK_IMPORTED_MODULE_1__["default"])(map.call(locale.grouping, Number), locale.thousands + ""),
16847 currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
16848 currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
16849 decimal = locale.decimal === undefined ? "." : locale.decimal + "",
16850 numerals = locale.numerals === undefined ? _identity_js__WEBPACK_IMPORTED_MODULE_7__["default"] : Object(_formatNumerals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(map.call(locale.numerals, String)),
16851 percent = locale.percent === undefined ? "%" : locale.percent + "",
16852 minus = locale.minus === undefined ? "-" : locale.minus + "",
16853 nan = locale.nan === undefined ? "NaN" : locale.nan + "";
16854
16855 function newFormat(specifier) {
16856 specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier);
16857
16858 var fill = specifier.fill,
16859 align = specifier.align,
16860 sign = specifier.sign,
16861 symbol = specifier.symbol,
16862 zero = specifier.zero,
16863 width = specifier.width,
16864 comma = specifier.comma,
16865 precision = specifier.precision,
16866 trim = specifier.trim,
16867 type = specifier.type;
16868
16869 // The "n" type is an alias for ",g".
16870 if (type === "n") comma = true, type = "g";
16871
16872 // The "" type, and any invalid type, is an alias for ".12~g".
16873 else if (!_formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type]) precision === undefined && (precision = 12), trim = true, type = "g";
16874
16875 // If zero fill is specified, padding goes after sign and before digits.
16876 if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
16877
16878 // Compute the prefix and suffix.
16879 // For SI-prefix, the suffix is lazily computed.
16880 var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
16881 suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
16882
16883 // What format function should we use?
16884 // Is this an integer type?
16885 // Can this type generate exponential notation?
16886 var formatType = _formatTypes_js__WEBPACK_IMPORTED_MODULE_5__["default"][type],
16887 maybeSuffix = /[defgprs%]/.test(type);
16888
16889 // Set the default precision if not specified,
16890 // or clamp the specified precision to the supported range.
16891 // For significant precision, it must be in [1, 21].
16892 // For fixed precision, it must be in [0, 20].
16893 precision = precision === undefined ? 6
16894 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
16895 : Math.max(0, Math.min(20, precision));
16896
16897 function format(value) {
16898 var valuePrefix = prefix,
16899 valueSuffix = suffix,
16900 i, n, c;
16901
16902 if (type === "c") {
16903 valueSuffix = formatType(value) + valueSuffix;
16904 value = "";
16905 } else {
16906 value = +value;
16907
16908 // Perform the initial formatting.
16909 var valueNegative = value < 0;
16910 value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
16911
16912 // Trim insignificant zeros.
16913 if (trim) value = Object(_formatTrim_js__WEBPACK_IMPORTED_MODULE_4__["default"])(value);
16914
16915 // If a negative value rounds to zero during formatting, treat as positive.
16916 if (valueNegative && +value === 0) valueNegative = false;
16917
16918 // Compute the prefix and suffix.
16919 valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
16920
16921 valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto_js__WEBPACK_IMPORTED_MODULE_6__["prefixExponent"] / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
16922
16923 // Break the formatted value into the integer “value” part that can be
16924 // grouped, and fractional or exponential “suffix” part that is not.
16925 if (maybeSuffix) {
16926 i = -1, n = value.length;
16927 while (++i < n) {
16928 if (c = value.charCodeAt(i), 48 > c || c > 57) {
16929 valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;
16930 value = value.slice(0, i);
16931 break;
16932 }
16933 }
16934 }
16935 }
16936
16937 // If the fill character is not "0", grouping is applied before padding.
16938 if (comma && !zero) value = group(value, Infinity);
16939
16940 // Compute the padding.
16941 var length = valuePrefix.length + value.length + valueSuffix.length,
16942 padding = length < width ? new Array(width - length + 1).join(fill) : "";
16943
16944 // If the fill character is "0", grouping is applied after padding.
16945 if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
16946
16947 // Reconstruct the final output based on the desired alignment.
16948 switch (align) {
16949 case "<": value = valuePrefix + value + valueSuffix + padding; break;
16950 case "=": value = valuePrefix + padding + value + valueSuffix; break;
16951 case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break;
16952 default: value = padding + valuePrefix + value + valueSuffix; break;
16953 }
16954
16955 return numerals(value);
16956 }
16957
16958 format.toString = function() {
16959 return specifier + "";
16960 };
16961
16962 return format;
16963 }
16964
16965 function formatPrefix(specifier, value) {
16966 var f = newFormat((specifier = Object(_formatSpecifier_js__WEBPACK_IMPORTED_MODULE_3__["default"])(specifier), specifier.type = "f", specifier)),
16967 e = Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3,
16968 k = Math.pow(10, -e),
16969 prefix = prefixes[8 + e / 3];
16970 return function(value) {
16971 return f(k * value) + prefix;
16972 };
16973 }
16974
16975 return {
16976 format: newFormat,
16977 formatPrefix: formatPrefix
16978 };
16979});
16980
16981
16982/***/ }),
16983
16984/***/ "./node_modules/d3-format/src/precisionFixed.js":
16985/*!******************************************************!*\
16986 !*** ./node_modules/d3-format/src/precisionFixed.js ***!
16987 \******************************************************/
16988/*! exports provided: default */
16989/***/ (function(module, __webpack_exports__, __webpack_require__) {
16990
16991"use strict";
16992__webpack_require__.r(__webpack_exports__);
16993/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js");
16994
16995
16996/* harmony default export */ __webpack_exports__["default"] = (function(step) {
16997 return Math.max(0, -Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step)));
16998});
16999
17000
17001/***/ }),
17002
17003/***/ "./node_modules/d3-format/src/precisionPrefix.js":
17004/*!*******************************************************!*\
17005 !*** ./node_modules/d3-format/src/precisionPrefix.js ***!
17006 \*******************************************************/
17007/*! exports provided: default */
17008/***/ (function(module, __webpack_exports__, __webpack_require__) {
17009
17010"use strict";
17011__webpack_require__.r(__webpack_exports__);
17012/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js");
17013
17014
17015/* harmony default export */ __webpack_exports__["default"] = (function(step, value) {
17016 return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) / 3))) * 3 - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.abs(step)));
17017});
17018
17019
17020/***/ }),
17021
17022/***/ "./node_modules/d3-format/src/precisionRound.js":
17023/*!******************************************************!*\
17024 !*** ./node_modules/d3-format/src/precisionRound.js ***!
17025 \******************************************************/
17026/*! exports provided: default */
17027/***/ (function(module, __webpack_exports__, __webpack_require__) {
17028
17029"use strict";
17030__webpack_require__.r(__webpack_exports__);
17031/* harmony import */ var _exponent_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./exponent.js */ "./node_modules/d3-format/src/exponent.js");
17032
17033
17034/* harmony default export */ __webpack_exports__["default"] = (function(step, max) {
17035 step = Math.abs(step), max = Math.abs(max) - step;
17036 return Math.max(0, Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(max) - Object(_exponent_js__WEBPACK_IMPORTED_MODULE_0__["default"])(step)) + 1;
17037});
17038
17039
17040/***/ }),
17041
17042/***/ "./node_modules/d3-geo/src/adder.js":
17043/*!******************************************!*\
17044 !*** ./node_modules/d3-geo/src/adder.js ***!
17045 \******************************************/
17046/*! exports provided: default */
17047/***/ (function(module, __webpack_exports__, __webpack_require__) {
17048
17049"use strict";
17050__webpack_require__.r(__webpack_exports__);
17051// Adds floating point numbers with twice the normal precision.
17052// Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and
17053// Fast Robust Geometric Predicates, Discrete & Computational Geometry 18(3)
17054// 305–363 (1997).
17055// Code adapted from GeographicLib by Charles F. F. Karney,
17056// http://geographiclib.sourceforge.net/
17057
17058/* harmony default export */ __webpack_exports__["default"] = (function() {
17059 return new Adder;
17060});
17061
17062function Adder() {
17063 this.reset();
17064}
17065
17066Adder.prototype = {
17067 constructor: Adder,
17068 reset: function() {
17069 this.s = // rounded value
17070 this.t = 0; // exact error
17071 },
17072 add: function(y) {
17073 add(temp, y, this.t);
17074 add(this, temp.s, this.s);
17075 if (this.s) this.t += temp.t;
17076 else this.s = temp.t;
17077 },
17078 valueOf: function() {
17079 return this.s;
17080 }
17081};
17082
17083var temp = new Adder;
17084
17085function add(adder, a, b) {
17086 var x = adder.s = a + b,
17087 bv = x - a,
17088 av = x - bv;
17089 adder.t = (a - av) + (b - bv);
17090}
17091
17092
17093/***/ }),
17094
17095/***/ "./node_modules/d3-geo/src/area.js":
17096/*!*****************************************!*\
17097 !*** ./node_modules/d3-geo/src/area.js ***!
17098 \*****************************************/
17099/*! exports provided: areaRingSum, areaStream, default */
17100/***/ (function(module, __webpack_exports__, __webpack_require__) {
17101
17102"use strict";
17103__webpack_require__.r(__webpack_exports__);
17104/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaRingSum", function() { return areaRingSum; });
17105/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areaStream", function() { return areaStream; });
17106/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js");
17107/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
17108/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js");
17109/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js");
17110
17111
17112
17113
17114
17115var areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])();
17116
17117var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
17118 lambda00,
17119 phi00,
17120 lambda0,
17121 cosPhi0,
17122 sinPhi0;
17123
17124var areaStream = {
17125 point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
17126 lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
17127 lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
17128 polygonStart: function() {
17129 areaRingSum.reset();
17130 areaStream.lineStart = areaRingStart;
17131 areaStream.lineEnd = areaRingEnd;
17132 },
17133 polygonEnd: function() {
17134 var areaRing = +areaRingSum;
17135 areaSum.add(areaRing < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] + areaRing : areaRing);
17136 this.lineStart = this.lineEnd = this.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"];
17137 },
17138 sphere: function() {
17139 areaSum.add(_math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]);
17140 }
17141};
17142
17143function areaRingStart() {
17144 areaStream.point = areaPointFirst;
17145}
17146
17147function areaRingEnd() {
17148 areaPoint(lambda00, phi00);
17149}
17150
17151function areaPointFirst(lambda, phi) {
17152 areaStream.point = areaPoint;
17153 lambda00 = lambda, phi00 = phi;
17154 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"];
17155 lambda0 = lambda, cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]), sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi);
17156}
17157
17158function areaPoint(lambda, phi) {
17159 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"];
17160 phi = phi / 2 + _math_js__WEBPACK_IMPORTED_MODULE_1__["quarterPi"]; // half the angular distance from south pole
17161
17162 // Spherical excess E for a spherical triangle with vertices: south pole,
17163 // previous point, current point. Uses a formula derived from Cagnoli’s
17164 // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
17165 var dLambda = lambda - lambda0,
17166 sdLambda = dLambda >= 0 ? 1 : -1,
17167 adLambda = sdLambda * dLambda,
17168 cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi),
17169 sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi),
17170 k = sinPhi0 * sinPhi,
17171 u = cosPhi0 * cosPhi + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(adLambda),
17172 v = k * sdLambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(adLambda);
17173 areaRingSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(v, u));
17174
17175 // Advance the previous points.
17176 lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
17177}
17178
17179/* harmony default export */ __webpack_exports__["default"] = (function(object) {
17180 areaSum.reset();
17181 Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, areaStream);
17182 return areaSum * 2;
17183});
17184
17185
17186/***/ }),
17187
17188/***/ "./node_modules/d3-geo/src/bounds.js":
17189/*!*******************************************!*\
17190 !*** ./node_modules/d3-geo/src/bounds.js ***!
17191 \*******************************************/
17192/*! exports provided: default */
17193/***/ (function(module, __webpack_exports__, __webpack_require__) {
17194
17195"use strict";
17196__webpack_require__.r(__webpack_exports__);
17197/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js");
17198/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js");
17199/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js");
17200/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
17201/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js");
17202
17203
17204
17205
17206
17207
17208var lambda0, phi0, lambda1, phi1, // bounds
17209 lambda2, // previous lambda-coordinate
17210 lambda00, phi00, // first point
17211 p0, // previous 3D point
17212 deltaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
17213 ranges,
17214 range;
17215
17216var boundsStream = {
17217 point: boundsPoint,
17218 lineStart: boundsLineStart,
17219 lineEnd: boundsLineEnd,
17220 polygonStart: function() {
17221 boundsStream.point = boundsRingPoint;
17222 boundsStream.lineStart = boundsRingStart;
17223 boundsStream.lineEnd = boundsRingEnd;
17224 deltaSum.reset();
17225 _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonStart();
17226 },
17227 polygonEnd: function() {
17228 _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].polygonEnd();
17229 boundsStream.point = boundsPoint;
17230 boundsStream.lineStart = boundsLineStart;
17231 boundsStream.lineEnd = boundsLineEnd;
17232 if (_area_js__WEBPACK_IMPORTED_MODULE_1__["areaRingSum"] < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
17233 else if (deltaSum > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi1 = 90;
17234 else if (deltaSum < -_math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) phi0 = -90;
17235 range[0] = lambda0, range[1] = lambda1;
17236 },
17237 sphere: function() {
17238 lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
17239 }
17240};
17241
17242function boundsPoint(lambda, phi) {
17243 ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);
17244 if (phi < phi0) phi0 = phi;
17245 if (phi > phi1) phi1 = phi;
17246}
17247
17248function linePoint(lambda, phi) {
17249 var p = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesian"])([lambda * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"], phi * _math_js__WEBPACK_IMPORTED_MODULE_3__["radians"]]);
17250 if (p0) {
17251 var normal = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(p0, p),
17252 equatorial = [normal[1], -normal[0], 0],
17253 inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianCross"])(equatorial, normal);
17254 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["cartesianNormalizeInPlace"])(inflection);
17255 inflection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_2__["spherical"])(inflection);
17256 var delta = lambda - lambda2,
17257 sign = delta > 0 ? 1 : -1,
17258 lambdai = inflection[0] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"] * sign,
17259 phii,
17260 antimeridian = Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180;
17261 if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {
17262 phii = inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"];
17263 if (phii > phi1) phi1 = phii;
17264 } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) {
17265 phii = -inflection[1] * _math_js__WEBPACK_IMPORTED_MODULE_3__["degrees"];
17266 if (phii < phi0) phi0 = phii;
17267 } else {
17268 if (phi < phi0) phi0 = phi;
17269 if (phi > phi1) phi1 = phi;
17270 }
17271 if (antimeridian) {
17272 if (lambda < lambda2) {
17273 if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;
17274 } else {
17275 if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;
17276 }
17277 } else {
17278 if (lambda1 >= lambda0) {
17279 if (lambda < lambda0) lambda0 = lambda;
17280 if (lambda > lambda1) lambda1 = lambda;
17281 } else {
17282 if (lambda > lambda2) {
17283 if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda;
17284 } else {
17285 if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda;
17286 }
17287 }
17288 }
17289 } else {
17290 ranges.push(range = [lambda0 = lambda, lambda1 = lambda]);
17291 }
17292 if (phi < phi0) phi0 = phi;
17293 if (phi > phi1) phi1 = phi;
17294 p0 = p, lambda2 = lambda;
17295}
17296
17297function boundsLineStart() {
17298 boundsStream.point = linePoint;
17299}
17300
17301function boundsLineEnd() {
17302 range[0] = lambda0, range[1] = lambda1;
17303 boundsStream.point = boundsPoint;
17304 p0 = null;
17305}
17306
17307function boundsRingPoint(lambda, phi) {
17308 if (p0) {
17309 var delta = lambda - lambda2;
17310 deltaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta);
17311 } else {
17312 lambda00 = lambda, phi00 = phi;
17313 }
17314 _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].point(lambda, phi);
17315 linePoint(lambda, phi);
17316}
17317
17318function boundsRingStart() {
17319 _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineStart();
17320}
17321
17322function boundsRingEnd() {
17323 boundsRingPoint(lambda00, phi00);
17324 _area_js__WEBPACK_IMPORTED_MODULE_1__["areaStream"].lineEnd();
17325 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_3__["abs"])(deltaSum) > _math_js__WEBPACK_IMPORTED_MODULE_3__["epsilon"]) lambda0 = -(lambda1 = 180);
17326 range[0] = lambda0, range[1] = lambda1;
17327 p0 = null;
17328}
17329
17330// Finds the left-right distance between two longitudes.
17331// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want
17332// the distance between ±180° to be 360°.
17333function angle(lambda0, lambda1) {
17334 return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1;
17335}
17336
17337function rangeCompare(a, b) {
17338 return a[0] - b[0];
17339}
17340
17341function rangeContains(range, x) {
17342 return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
17343}
17344
17345/* harmony default export */ __webpack_exports__["default"] = (function(feature) {
17346 var i, n, a, b, merged, deltaMax, delta;
17347
17348 phi1 = lambda1 = -(lambda0 = phi0 = Infinity);
17349 ranges = [];
17350 Object(_stream_js__WEBPACK_IMPORTED_MODULE_4__["default"])(feature, boundsStream);
17351
17352 // First, sort ranges by their minimum longitudes.
17353 if (n = ranges.length) {
17354 ranges.sort(rangeCompare);
17355
17356 // Then, merge any ranges that overlap.
17357 for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) {
17358 b = ranges[i];
17359 if (rangeContains(a, b[0]) || rangeContains(a, b[1])) {
17360 if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1];
17361 if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0];
17362 } else {
17363 merged.push(a = b);
17364 }
17365 }
17366
17367 // Finally, find the largest gap between the merged ranges.
17368 // The final bounding box will be the inverse of this gap.
17369 for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) {
17370 b = merged[i];
17371 if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1];
17372 }
17373 }
17374
17375 ranges = range = null;
17376
17377 return lambda0 === Infinity || phi0 === Infinity
17378 ? [[NaN, NaN], [NaN, NaN]]
17379 : [[lambda0, phi0], [lambda1, phi1]];
17380});
17381
17382
17383/***/ }),
17384
17385/***/ "./node_modules/d3-geo/src/cartesian.js":
17386/*!**********************************************!*\
17387 !*** ./node_modules/d3-geo/src/cartesian.js ***!
17388 \**********************************************/
17389/*! exports provided: spherical, cartesian, cartesianDot, cartesianCross, cartesianAddInPlace, cartesianScale, cartesianNormalizeInPlace */
17390/***/ (function(module, __webpack_exports__, __webpack_require__) {
17391
17392"use strict";
17393__webpack_require__.r(__webpack_exports__);
17394/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "spherical", function() { return spherical; });
17395/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesian", function() { return cartesian; });
17396/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianDot", function() { return cartesianDot; });
17397/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianCross", function() { return cartesianCross; });
17398/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianAddInPlace", function() { return cartesianAddInPlace; });
17399/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianScale", function() { return cartesianScale; });
17400/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cartesianNormalizeInPlace", function() { return cartesianNormalizeInPlace; });
17401/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
17402
17403
17404function spherical(cartesian) {
17405 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(cartesian[1], cartesian[0]), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(cartesian[2])];
17406}
17407
17408function cartesian(spherical) {
17409 var lambda = spherical[0], phi = spherical[1], cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi);
17410 return [cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi)];
17411}
17412
17413function cartesianDot(a, b) {
17414 return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
17415}
17416
17417function cartesianCross(a, b) {
17418 return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
17419}
17420
17421// TODO return a
17422function cartesianAddInPlace(a, b) {
17423 a[0] += b[0], a[1] += b[1], a[2] += b[2];
17424}
17425
17426function cartesianScale(vector, k) {
17427 return [vector[0] * k, vector[1] * k, vector[2] * k];
17428}
17429
17430// TODO return d
17431function cartesianNormalizeInPlace(d) {
17432 var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
17433 d[0] /= l, d[1] /= l, d[2] /= l;
17434}
17435
17436
17437/***/ }),
17438
17439/***/ "./node_modules/d3-geo/src/centroid.js":
17440/*!*********************************************!*\
17441 !*** ./node_modules/d3-geo/src/centroid.js ***!
17442 \*********************************************/
17443/*! exports provided: default */
17444/***/ (function(module, __webpack_exports__, __webpack_require__) {
17445
17446"use strict";
17447__webpack_require__.r(__webpack_exports__);
17448/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
17449/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js");
17450/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js");
17451
17452
17453
17454
17455var W0, W1,
17456 X0, Y0, Z0,
17457 X1, Y1, Z1,
17458 X2, Y2, Z2,
17459 lambda00, phi00, // first point
17460 x0, y0, z0; // previous point
17461
17462var centroidStream = {
17463 sphere: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"],
17464 point: centroidPoint,
17465 lineStart: centroidLineStart,
17466 lineEnd: centroidLineEnd,
17467 polygonStart: function() {
17468 centroidStream.lineStart = centroidRingStart;
17469 centroidStream.lineEnd = centroidRingEnd;
17470 },
17471 polygonEnd: function() {
17472 centroidStream.lineStart = centroidLineStart;
17473 centroidStream.lineEnd = centroidLineEnd;
17474 }
17475};
17476
17477// Arithmetic mean of Cartesian vectors.
17478function centroidPoint(lambda, phi) {
17479 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"];
17480 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi);
17481 centroidPointCartesian(cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda), cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi));
17482}
17483
17484function centroidPointCartesian(x, y, z) {
17485 ++W0;
17486 X0 += (x - X0) / W0;
17487 Y0 += (y - Y0) / W0;
17488 Z0 += (z - Z0) / W0;
17489}
17490
17491function centroidLineStart() {
17492 centroidStream.point = centroidLinePointFirst;
17493}
17494
17495function centroidLinePointFirst(lambda, phi) {
17496 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"];
17497 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi);
17498 x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda);
17499 y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda);
17500 z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi);
17501 centroidStream.point = centroidLinePoint;
17502 centroidPointCartesian(x0, y0, z0);
17503}
17504
17505function centroidLinePoint(lambda, phi) {
17506 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"];
17507 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi),
17508 x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda),
17509 y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda),
17510 z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi),
17511 w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
17512 W1 += w;
17513 X1 += w * (x0 + (x0 = x));
17514 Y1 += w * (y0 + (y0 = y));
17515 Z1 += w * (z0 + (z0 = z));
17516 centroidPointCartesian(x0, y0, z0);
17517}
17518
17519function centroidLineEnd() {
17520 centroidStream.point = centroidPoint;
17521}
17522
17523// See J. E. Brock, The Inertia Tensor for a Spherical Triangle,
17524// J. Applied Mechanics 42, 239 (1975).
17525function centroidRingStart() {
17526 centroidStream.point = centroidRingPointFirst;
17527}
17528
17529function centroidRingEnd() {
17530 centroidRingPoint(lambda00, phi00);
17531 centroidStream.point = centroidPoint;
17532}
17533
17534function centroidRingPointFirst(lambda, phi) {
17535 lambda00 = lambda, phi00 = phi;
17536 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"];
17537 centroidStream.point = centroidRingPoint;
17538 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi);
17539 x0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda);
17540 y0 = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda);
17541 z0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi);
17542 centroidPointCartesian(x0, y0, z0);
17543}
17544
17545function centroidRingPoint(lambda, phi) {
17546 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"];
17547 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi),
17548 x = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(lambda),
17549 y = cosPhi * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(lambda),
17550 z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi),
17551 cx = y0 * z - z0 * y,
17552 cy = z0 * x - x0 * z,
17553 cz = x0 * y - y0 * x,
17554 m = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(cx * cx + cy * cy + cz * cz),
17555 w = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(m), // line weight = angle
17556 v = m && -w / m; // area weight multiplier
17557 X2 += v * cx;
17558 Y2 += v * cy;
17559 Z2 += v * cz;
17560 W1 += w;
17561 X1 += w * (x0 + (x0 = x));
17562 Y1 += w * (y0 + (y0 = y));
17563 Z1 += w * (z0 + (z0 = z));
17564 centroidPointCartesian(x0, y0, z0);
17565}
17566
17567/* harmony default export */ __webpack_exports__["default"] = (function(object) {
17568 W0 = W1 =
17569 X0 = Y0 = Z0 =
17570 X1 = Y1 = Z1 =
17571 X2 = Y2 = Z2 = 0;
17572 Object(_stream_js__WEBPACK_IMPORTED_MODULE_2__["default"])(object, centroidStream);
17573
17574 var x = X2,
17575 y = Y2,
17576 z = Z2,
17577 m = x * x + y * y + z * z;
17578
17579 // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.
17580 if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) {
17581 x = X1, y = Y1, z = Z1;
17582 // If the feature has zero length, fall back to arithmetic mean of point vectors.
17583 if (W1 < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) x = X0, y = Y0, z = Z0;
17584 m = x * x + y * y + z * z;
17585 // If the feature still has an undefined ccentroid, then return.
17586 if (m < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon2"]) return [NaN, NaN];
17587 }
17588
17589 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(m)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]];
17590});
17591
17592
17593/***/ }),
17594
17595/***/ "./node_modules/d3-geo/src/circle.js":
17596/*!*******************************************!*\
17597 !*** ./node_modules/d3-geo/src/circle.js ***!
17598 \*******************************************/
17599/*! exports provided: circleStream, default */
17600/***/ (function(module, __webpack_exports__, __webpack_require__) {
17601
17602"use strict";
17603__webpack_require__.r(__webpack_exports__);
17604/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circleStream", function() { return circleStream; });
17605/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js");
17606/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-geo/src/constant.js");
17607/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
17608/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js");
17609
17610
17611
17612
17613
17614// Generates a circle centered at [0°, 0°], with a given radius and precision.
17615function circleStream(stream, radius, delta, direction, t0, t1) {
17616 if (!delta) return;
17617 var cosRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius),
17618 sinRadius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(radius),
17619 step = direction * delta;
17620 if (t0 == null) {
17621 t0 = radius + direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"];
17622 t1 = radius - step / 2;
17623 } else {
17624 t0 = circleRadius(cosRadius, t0);
17625 t1 = circleRadius(cosRadius, t1);
17626 if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"];
17627 }
17628 for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) {
17629 point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])([cosRadius, -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(t), -sinRadius * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(t)]);
17630 stream.point(point[0], point[1]);
17631 }
17632}
17633
17634// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
17635function circleRadius(cosRadius, point) {
17636 point = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(point), point[0] -= cosRadius;
17637 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianNormalizeInPlace"])(point);
17638 var radius = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])(-point[1]);
17639 return ((-point[2] < 0 ? -radius : radius) + _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"];
17640}
17641
17642/* harmony default export */ __webpack_exports__["default"] = (function() {
17643 var center = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([0, 0]),
17644 radius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(90),
17645 precision = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(6),
17646 ring,
17647 rotate,
17648 stream = {point: point};
17649
17650 function point(x, y) {
17651 ring.push(x = rotate(x, y));
17652 x[0] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"], x[1] *= _math_js__WEBPACK_IMPORTED_MODULE_2__["degrees"];
17653 }
17654
17655 function circle() {
17656 var c = center.apply(this, arguments),
17657 r = radius.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"],
17658 p = precision.apply(this, arguments) * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"];
17659 ring = [];
17660 rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_3__["rotateRadians"])(-c[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], -c[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], 0).invert;
17661 circleStream(stream, r, p, 1);
17662 c = {type: "Polygon", coordinates: [ring]};
17663 ring = rotate = null;
17664 return c;
17665 }
17666
17667 circle.center = function(_) {
17668 return arguments.length ? (center = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([+_[0], +_[1]]), circle) : center;
17669 };
17670
17671 circle.radius = function(_) {
17672 return arguments.length ? (radius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : radius;
17673 };
17674
17675 circle.precision = function(_) {
17676 return arguments.length ? (precision = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), circle) : precision;
17677 };
17678
17679 return circle;
17680});
17681
17682
17683/***/ }),
17684
17685/***/ "./node_modules/d3-geo/src/clip/antimeridian.js":
17686/*!******************************************************!*\
17687 !*** ./node_modules/d3-geo/src/clip/antimeridian.js ***!
17688 \******************************************************/
17689/*! exports provided: default */
17690/***/ (function(module, __webpack_exports__, __webpack_require__) {
17691
17692"use strict";
17693__webpack_require__.r(__webpack_exports__);
17694/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js");
17695/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
17696
17697
17698
17699/* harmony default export */ __webpack_exports__["default"] = (Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(
17700 function() { return true; },
17701 clipAntimeridianLine,
17702 clipAntimeridianInterpolate,
17703 [-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]]
17704));
17705
17706// Takes a line and cuts into visible segments. Return values: 0 - there were
17707// intersections or the line was empty; 1 - no intersections; 2 - there were
17708// intersections, and the first and last segments should be rejoined.
17709function clipAntimeridianLine(stream) {
17710 var lambda0 = NaN,
17711 phi0 = NaN,
17712 sign0 = NaN,
17713 clean; // no intersections
17714
17715 return {
17716 lineStart: function() {
17717 stream.lineStart();
17718 clean = 1;
17719 },
17720 point: function(lambda1, phi1) {
17721 var sign1 = lambda1 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"],
17722 delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - lambda0);
17723 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) { // line crosses a pole
17724 stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"]);
17725 stream.point(sign0, phi0);
17726 stream.lineEnd();
17727 stream.lineStart();
17728 stream.point(sign1, phi0);
17729 stream.point(lambda1, phi0);
17730 clean = 0;
17731 } else if (sign0 !== sign1 && delta >= _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"]) { // line crosses antimeridian
17732 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - sign0) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda0 -= sign0 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; // handle degeneracies
17733 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda1 - sign1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) lambda1 -= sign1 * _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"];
17734 phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1);
17735 stream.point(sign0, phi0);
17736 stream.lineEnd();
17737 stream.lineStart();
17738 stream.point(sign1, phi0);
17739 clean = 0;
17740 }
17741 stream.point(lambda0 = lambda1, phi0 = phi1);
17742 sign0 = sign1;
17743 },
17744 lineEnd: function() {
17745 stream.lineEnd();
17746 lambda0 = phi0 = NaN;
17747 },
17748 clean: function() {
17749 return 2 - clean; // if intersections, rejoin first and last segments
17750 }
17751 };
17752}
17753
17754function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) {
17755 var cosPhi0,
17756 cosPhi1,
17757 sinLambda0Lambda1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0 - lambda1);
17758 return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(sinLambda0Lambda1) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]
17759 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan"])((Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi0) * (cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi1)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda1)
17760 - Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi1) * (cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi0)) * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda0))
17761 / (cosPhi0 * cosPhi1 * sinLambda0Lambda1))
17762 : (phi0 + phi1) / 2;
17763}
17764
17765function clipAntimeridianInterpolate(from, to, direction, stream) {
17766 var phi;
17767 if (from == null) {
17768 phi = direction * _math_js__WEBPACK_IMPORTED_MODULE_1__["halfPi"];
17769 stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi);
17770 stream.point(0, phi);
17771 stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi);
17772 stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0);
17773 stream.point(_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi);
17774 stream.point(0, -phi);
17775 stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], -phi);
17776 stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], 0);
17777 stream.point(-_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"], phi);
17778 } else if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(from[0] - to[0]) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) {
17779 var lambda = from[0] < to[0] ? _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"];
17780 phi = direction * lambda / 2;
17781 stream.point(-lambda, phi);
17782 stream.point(0, phi);
17783 stream.point(lambda, phi);
17784 } else {
17785 stream.point(to[0], to[1]);
17786 }
17787}
17788
17789
17790/***/ }),
17791
17792/***/ "./node_modules/d3-geo/src/clip/buffer.js":
17793/*!************************************************!*\
17794 !*** ./node_modules/d3-geo/src/clip/buffer.js ***!
17795 \************************************************/
17796/*! exports provided: default */
17797/***/ (function(module, __webpack_exports__, __webpack_require__) {
17798
17799"use strict";
17800__webpack_require__.r(__webpack_exports__);
17801/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js");
17802
17803
17804/* harmony default export */ __webpack_exports__["default"] = (function() {
17805 var lines = [],
17806 line;
17807 return {
17808 point: function(x, y) {
17809 line.push([x, y]);
17810 },
17811 lineStart: function() {
17812 lines.push(line = []);
17813 },
17814 lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
17815 rejoin: function() {
17816 if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
17817 },
17818 result: function() {
17819 var result = lines;
17820 lines = [];
17821 line = null;
17822 return result;
17823 }
17824 };
17825});
17826
17827
17828/***/ }),
17829
17830/***/ "./node_modules/d3-geo/src/clip/circle.js":
17831/*!************************************************!*\
17832 !*** ./node_modules/d3-geo/src/clip/circle.js ***!
17833 \************************************************/
17834/*! exports provided: default */
17835/***/ (function(module, __webpack_exports__, __webpack_require__) {
17836
17837"use strict";
17838__webpack_require__.r(__webpack_exports__);
17839/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js");
17840/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../circle.js */ "./node_modules/d3-geo/src/circle.js");
17841/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
17842/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js");
17843/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/clip/index.js");
17844
17845
17846
17847
17848
17849
17850/* harmony default export */ __webpack_exports__["default"] = (function(radius) {
17851 var cr = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(radius),
17852 delta = 6 * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"],
17853 smallRadius = cr > 0,
17854 notHemisphere = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(cr) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]; // TODO optimise for this common case
17855
17856 function interpolate(from, to, direction, stream) {
17857 Object(_circle_js__WEBPACK_IMPORTED_MODULE_1__["circleStream"])(stream, radius, delta, direction, from, to);
17858 }
17859
17860 function visible(lambda, phi) {
17861 return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi) > cr;
17862 }
17863
17864 // Takes a line and cuts into visible segments. Return values used for polygon
17865 // clipping: 0 - there were intersections or the line was empty; 1 - no
17866 // intersections 2 - there were intersections, and the first and last segments
17867 // should be rejoined.
17868 function clipLine(stream) {
17869 var point0, // previous point
17870 c0, // code for previous point
17871 v0, // visibility of previous point
17872 v00, // visibility of first point
17873 clean; // no intersections
17874 return {
17875 lineStart: function() {
17876 v00 = v0 = false;
17877 clean = 1;
17878 },
17879 point: function(lambda, phi) {
17880 var point1 = [lambda, phi],
17881 point2,
17882 v = visible(lambda, phi),
17883 c = smallRadius
17884 ? v ? 0 : code(lambda, phi)
17885 : v ? code(lambda + (lambda < 0 ? _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] : -_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]), phi) : 0;
17886 if (!point0 && (v00 = v0 = v)) stream.lineStart();
17887 // Handle degeneracies.
17888 // TODO ignore if not clipping polygons.
17889 if (v !== v0) {
17890 point2 = intersect(point0, point1);
17891 if (!point2 || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point2) || Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point1, point2)) {
17892 point1[0] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"];
17893 point1[1] += _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"];
17894 v = visible(point1[0], point1[1]);
17895 }
17896 }
17897 if (v !== v0) {
17898 clean = 0;
17899 if (v) {
17900 // outside going in
17901 stream.lineStart();
17902 point2 = intersect(point1, point0);
17903 stream.point(point2[0], point2[1]);
17904 } else {
17905 // inside going out
17906 point2 = intersect(point0, point1);
17907 stream.point(point2[0], point2[1]);
17908 stream.lineEnd();
17909 }
17910 point0 = point2;
17911 } else if (notHemisphere && point0 && smallRadius ^ v) {
17912 var t;
17913 // If the codes for two points are different, or are both zero,
17914 // and there this segment intersects with the small circle.
17915 if (!(c & c0) && (t = intersect(point1, point0, true))) {
17916 clean = 0;
17917 if (smallRadius) {
17918 stream.lineStart();
17919 stream.point(t[0][0], t[0][1]);
17920 stream.point(t[1][0], t[1][1]);
17921 stream.lineEnd();
17922 } else {
17923 stream.point(t[1][0], t[1][1]);
17924 stream.lineEnd();
17925 stream.lineStart();
17926 stream.point(t[0][0], t[0][1]);
17927 }
17928 }
17929 }
17930 if (v && (!point0 || !Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_3__["default"])(point0, point1))) {
17931 stream.point(point1[0], point1[1]);
17932 }
17933 point0 = point1, v0 = v, c0 = c;
17934 },
17935 lineEnd: function() {
17936 if (v0) stream.lineEnd();
17937 point0 = null;
17938 },
17939 // Rejoin first and last segments if there were intersections and the first
17940 // and last points were visible.
17941 clean: function() {
17942 return clean | ((v00 && v0) << 1);
17943 }
17944 };
17945 }
17946
17947 // Intersects the great circle between a and b with the clip circle.
17948 function intersect(a, b, two) {
17949 var pa = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(a),
17950 pb = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])(b);
17951
17952 // We have two planes, n1.p = d1 and n2.p = d2.
17953 // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).
17954 var n1 = [1, 0, 0], // normal
17955 n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(pa, pb),
17956 n2n2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(n2, n2),
17957 n1n2 = n2[0], // cartesianDot(n1, n2),
17958 determinant = n2n2 - n1n2 * n1n2;
17959
17960 // Two polar points.
17961 if (!determinant) return !two && a;
17962
17963 var c1 = cr * n2n2 / determinant,
17964 c2 = -cr * n1n2 / determinant,
17965 n1xn2 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianCross"])(n1, n2),
17966 A = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n1, c1),
17967 B = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(n2, c2);
17968 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(A, B);
17969
17970 // Solve |p(t)|^2 = 1.
17971 var u = n1xn2,
17972 w = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, u),
17973 uu = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(u, u),
17974 t2 = w * w - uu * (Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianDot"])(A, A) - 1);
17975
17976 if (t2 < 0) return;
17977
17978 var t = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(t2),
17979 q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w - t) / uu);
17980 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q, A);
17981 q = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q);
17982
17983 if (!two) return q;
17984
17985 // Two intersection points.
17986 var lambda0 = a[0],
17987 lambda1 = b[0],
17988 phi0 = a[1],
17989 phi1 = b[1],
17990 z;
17991
17992 if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z;
17993
17994 var delta = lambda1 - lambda0,
17995 polar = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(delta - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"],
17996 meridian = polar || delta < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"];
17997
17998 if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z;
17999
18000 // Check that the first point is between a and b.
18001 if (meridian
18002 ? polar
18003 ? phi0 + phi1 > 0 ^ q[1] < (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(q[0] - lambda0) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] ? phi0 : phi1)
18004 : phi0 <= q[1] && q[1] <= phi1
18005 : delta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] ^ (lambda0 <= q[0] && q[0] <= lambda1)) {
18006 var q1 = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianScale"])(u, (-w + t) / uu);
18007 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesianAddInPlace"])(q1, A);
18008 return [q, Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["spherical"])(q1)];
18009 }
18010 }
18011
18012 // Generates a 4-bit vector representing the location of a point relative to
18013 // the small circle's bounding box.
18014 function code(lambda, phi) {
18015 var r = smallRadius ? radius : _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] - radius,
18016 code = 0;
18017 if (lambda < -r) code |= 1; // left
18018 else if (lambda > r) code |= 2; // right
18019 if (phi < -r) code |= 4; // below
18020 else if (phi > r) code |= 8; // above
18021 return code;
18022 }
18023
18024 return Object(_index_js__WEBPACK_IMPORTED_MODULE_4__["default"])(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-_math_js__WEBPACK_IMPORTED_MODULE_2__["pi"], radius - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]]);
18025});
18026
18027
18028/***/ }),
18029
18030/***/ "./node_modules/d3-geo/src/clip/extent.js":
18031/*!************************************************!*\
18032 !*** ./node_modules/d3-geo/src/clip/extent.js ***!
18033 \************************************************/
18034/*! exports provided: default */
18035/***/ (function(module, __webpack_exports__, __webpack_require__) {
18036
18037"use strict";
18038__webpack_require__.r(__webpack_exports__);
18039/* harmony import */ var _rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js");
18040
18041
18042/* harmony default export */ __webpack_exports__["default"] = (function() {
18043 var x0 = 0,
18044 y0 = 0,
18045 x1 = 960,
18046 y1 = 500,
18047 cache,
18048 cacheStream,
18049 clip;
18050
18051 return clip = {
18052 stream: function(stream) {
18053 return cache && cacheStream === stream ? cache : cache = Object(_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0, y0, x1, y1)(cacheStream = stream);
18054 },
18055 extent: function(_) {
18056 return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]];
18057 }
18058 };
18059});
18060
18061
18062/***/ }),
18063
18064/***/ "./node_modules/d3-geo/src/clip/index.js":
18065/*!***********************************************!*\
18066 !*** ./node_modules/d3-geo/src/clip/index.js ***!
18067 \***********************************************/
18068/*! exports provided: default */
18069/***/ (function(module, __webpack_exports__, __webpack_require__) {
18070
18071"use strict";
18072__webpack_require__.r(__webpack_exports__);
18073/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js");
18074/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js");
18075/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
18076/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js");
18077/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
18078
18079
18080
18081
18082
18083
18084/* harmony default export */ __webpack_exports__["default"] = (function(pointVisible, clipLine, interpolate, start) {
18085 return function(sink) {
18086 var line = clipLine(sink),
18087 ringBuffer = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
18088 ringSink = clipLine(ringBuffer),
18089 polygonStarted = false,
18090 polygon,
18091 segments,
18092 ring;
18093
18094 var clip = {
18095 point: point,
18096 lineStart: lineStart,
18097 lineEnd: lineEnd,
18098 polygonStart: function() {
18099 clip.point = pointRing;
18100 clip.lineStart = ringStart;
18101 clip.lineEnd = ringEnd;
18102 segments = [];
18103 polygon = [];
18104 },
18105 polygonEnd: function() {
18106 clip.point = point;
18107 clip.lineStart = lineStart;
18108 clip.lineEnd = lineEnd;
18109 segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments);
18110 var startInside = Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_3__["default"])(polygon, start);
18111 if (segments.length) {
18112 if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
18113 Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_1__["default"])(segments, compareIntersection, startInside, interpolate, sink);
18114 } else if (startInside) {
18115 if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
18116 sink.lineStart();
18117 interpolate(null, null, 1, sink);
18118 sink.lineEnd();
18119 }
18120 if (polygonStarted) sink.polygonEnd(), polygonStarted = false;
18121 segments = polygon = null;
18122 },
18123 sphere: function() {
18124 sink.polygonStart();
18125 sink.lineStart();
18126 interpolate(null, null, 1, sink);
18127 sink.lineEnd();
18128 sink.polygonEnd();
18129 }
18130 };
18131
18132 function point(lambda, phi) {
18133 if (pointVisible(lambda, phi)) sink.point(lambda, phi);
18134 }
18135
18136 function pointLine(lambda, phi) {
18137 line.point(lambda, phi);
18138 }
18139
18140 function lineStart() {
18141 clip.point = pointLine;
18142 line.lineStart();
18143 }
18144
18145 function lineEnd() {
18146 clip.point = point;
18147 line.lineEnd();
18148 }
18149
18150 function pointRing(lambda, phi) {
18151 ring.push([lambda, phi]);
18152 ringSink.point(lambda, phi);
18153 }
18154
18155 function ringStart() {
18156 ringSink.lineStart();
18157 ring = [];
18158 }
18159
18160 function ringEnd() {
18161 pointRing(ring[0][0], ring[0][1]);
18162 ringSink.lineEnd();
18163
18164 var clean = ringSink.clean(),
18165 ringSegments = ringBuffer.result(),
18166 i, n = ringSegments.length, m,
18167 segment,
18168 point;
18169
18170 ring.pop();
18171 polygon.push(ring);
18172 ring = null;
18173
18174 if (!n) return;
18175
18176 // No intersections.
18177 if (clean & 1) {
18178 segment = ringSegments[0];
18179 if ((m = segment.length - 1) > 0) {
18180 if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
18181 sink.lineStart();
18182 for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]);
18183 sink.lineEnd();
18184 }
18185 return;
18186 }
18187
18188 // Rejoin connected segments.
18189 // TODO reuse ringBuffer.rejoin()?
18190 if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
18191
18192 segments.push(ringSegments.filter(validSegment));
18193 }
18194
18195 return clip;
18196 };
18197});
18198
18199function validSegment(segment) {
18200 return segment.length > 1;
18201}
18202
18203// Intersections are sorted along the clip edge. For both antimeridian cutting
18204// and circle clipping, the same comparison is used.
18205function compareIntersection(a, b) {
18206 return ((a = a.x)[0] < 0 ? a[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - a[1])
18207 - ((b = b.x)[0] < 0 ? b[1] - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] : _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - b[1]);
18208}
18209
18210
18211/***/ }),
18212
18213/***/ "./node_modules/d3-geo/src/clip/line.js":
18214/*!**********************************************!*\
18215 !*** ./node_modules/d3-geo/src/clip/line.js ***!
18216 \**********************************************/
18217/*! exports provided: default */
18218/***/ (function(module, __webpack_exports__, __webpack_require__) {
18219
18220"use strict";
18221__webpack_require__.r(__webpack_exports__);
18222/* harmony default export */ __webpack_exports__["default"] = (function(a, b, x0, y0, x1, y1) {
18223 var ax = a[0],
18224 ay = a[1],
18225 bx = b[0],
18226 by = b[1],
18227 t0 = 0,
18228 t1 = 1,
18229 dx = bx - ax,
18230 dy = by - ay,
18231 r;
18232
18233 r = x0 - ax;
18234 if (!dx && r > 0) return;
18235 r /= dx;
18236 if (dx < 0) {
18237 if (r < t0) return;
18238 if (r < t1) t1 = r;
18239 } else if (dx > 0) {
18240 if (r > t1) return;
18241 if (r > t0) t0 = r;
18242 }
18243
18244 r = x1 - ax;
18245 if (!dx && r < 0) return;
18246 r /= dx;
18247 if (dx < 0) {
18248 if (r > t1) return;
18249 if (r > t0) t0 = r;
18250 } else if (dx > 0) {
18251 if (r < t0) return;
18252 if (r < t1) t1 = r;
18253 }
18254
18255 r = y0 - ay;
18256 if (!dy && r > 0) return;
18257 r /= dy;
18258 if (dy < 0) {
18259 if (r < t0) return;
18260 if (r < t1) t1 = r;
18261 } else if (dy > 0) {
18262 if (r > t1) return;
18263 if (r > t0) t0 = r;
18264 }
18265
18266 r = y1 - ay;
18267 if (!dy && r < 0) return;
18268 r /= dy;
18269 if (dy < 0) {
18270 if (r > t1) return;
18271 if (r > t0) t0 = r;
18272 } else if (dy > 0) {
18273 if (r < t0) return;
18274 if (r < t1) t1 = r;
18275 }
18276
18277 if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy;
18278 if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy;
18279 return true;
18280});
18281
18282
18283/***/ }),
18284
18285/***/ "./node_modules/d3-geo/src/clip/rectangle.js":
18286/*!***************************************************!*\
18287 !*** ./node_modules/d3-geo/src/clip/rectangle.js ***!
18288 \***************************************************/
18289/*! exports provided: default */
18290/***/ (function(module, __webpack_exports__, __webpack_require__) {
18291
18292"use strict";
18293__webpack_require__.r(__webpack_exports__);
18294/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clipRectangle; });
18295/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
18296/* harmony import */ var _buffer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./buffer.js */ "./node_modules/d3-geo/src/clip/buffer.js");
18297/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-geo/src/clip/line.js");
18298/* harmony import */ var _rejoin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejoin.js */ "./node_modules/d3-geo/src/clip/rejoin.js");
18299/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
18300
18301
18302
18303
18304
18305
18306var clipMax = 1e9, clipMin = -clipMax;
18307
18308// TODO Use d3-polygon’s polygonContains here for the ring check?
18309// TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
18310
18311function clipRectangle(x0, y0, x1, y1) {
18312
18313 function visible(x, y) {
18314 return x0 <= x && x <= x1 && y0 <= y && y <= y1;
18315 }
18316
18317 function interpolate(from, to, direction, stream) {
18318 var a = 0, a1 = 0;
18319 if (from == null
18320 || (a = corner(from, direction)) !== (a1 = corner(to, direction))
18321 || comparePoint(from, to) < 0 ^ direction > 0) {
18322 do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
18323 while ((a = (a + direction + 4) % 4) !== a1);
18324 } else {
18325 stream.point(to[0], to[1]);
18326 }
18327 }
18328
18329 function corner(p, direction) {
18330 return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 0 : 3
18331 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[0] - x1) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 2 : 1
18332 : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(p[1] - y0) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] ? direction > 0 ? 1 : 0
18333 : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon
18334 }
18335
18336 function compareIntersection(a, b) {
18337 return comparePoint(a.x, b.x);
18338 }
18339
18340 function comparePoint(a, b) {
18341 var ca = corner(a, 1),
18342 cb = corner(b, 1);
18343 return ca !== cb ? ca - cb
18344 : ca === 0 ? b[1] - a[1]
18345 : ca === 1 ? a[0] - b[0]
18346 : ca === 2 ? a[1] - b[1]
18347 : b[0] - a[0];
18348 }
18349
18350 return function(stream) {
18351 var activeStream = stream,
18352 bufferStream = Object(_buffer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(),
18353 segments,
18354 polygon,
18355 ring,
18356 x__, y__, v__, // first point
18357 x_, y_, v_, // previous point
18358 first,
18359 clean;
18360
18361 var clipStream = {
18362 point: point,
18363 lineStart: lineStart,
18364 lineEnd: lineEnd,
18365 polygonStart: polygonStart,
18366 polygonEnd: polygonEnd
18367 };
18368
18369 function point(x, y) {
18370 if (visible(x, y)) activeStream.point(x, y);
18371 }
18372
18373 function polygonInside() {
18374 var winding = 0;
18375
18376 for (var i = 0, n = polygon.length; i < n; ++i) {
18377 for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) {
18378 a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1];
18379 if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; }
18380 else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; }
18381 }
18382 }
18383
18384 return winding;
18385 }
18386
18387 // Buffer geometry within a polygon and then clip it en masse.
18388 function polygonStart() {
18389 activeStream = bufferStream, segments = [], polygon = [], clean = true;
18390 }
18391
18392 function polygonEnd() {
18393 var startInside = polygonInside(),
18394 cleanInside = clean && startInside,
18395 visible = (segments = Object(d3_array__WEBPACK_IMPORTED_MODULE_4__["merge"])(segments)).length;
18396 if (cleanInside || visible) {
18397 stream.polygonStart();
18398 if (cleanInside) {
18399 stream.lineStart();
18400 interpolate(null, null, 1, stream);
18401 stream.lineEnd();
18402 }
18403 if (visible) {
18404 Object(_rejoin_js__WEBPACK_IMPORTED_MODULE_3__["default"])(segments, compareIntersection, startInside, interpolate, stream);
18405 }
18406 stream.polygonEnd();
18407 }
18408 activeStream = stream, segments = polygon = ring = null;
18409 }
18410
18411 function lineStart() {
18412 clipStream.point = linePoint;
18413 if (polygon) polygon.push(ring = []);
18414 first = true;
18415 v_ = false;
18416 x_ = y_ = NaN;
18417 }
18418
18419 // TODO rather than special-case polygons, simply handle them separately.
18420 // Ideally, coincident intersection points should be jittered to avoid
18421 // clipping issues.
18422 function lineEnd() {
18423 if (segments) {
18424 linePoint(x__, y__);
18425 if (v__ && v_) bufferStream.rejoin();
18426 segments.push(bufferStream.result());
18427 }
18428 clipStream.point = point;
18429 if (v_) activeStream.lineEnd();
18430 }
18431
18432 function linePoint(x, y) {
18433 var v = visible(x, y);
18434 if (polygon) ring.push([x, y]);
18435 if (first) {
18436 x__ = x, y__ = y, v__ = v;
18437 first = false;
18438 if (v) {
18439 activeStream.lineStart();
18440 activeStream.point(x, y);
18441 }
18442 } else {
18443 if (v && v_) activeStream.point(x, y);
18444 else {
18445 var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))],
18446 b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))];
18447 if (Object(_line_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b, x0, y0, x1, y1)) {
18448 if (!v_) {
18449 activeStream.lineStart();
18450 activeStream.point(a[0], a[1]);
18451 }
18452 activeStream.point(b[0], b[1]);
18453 if (!v) activeStream.lineEnd();
18454 clean = false;
18455 } else if (v) {
18456 activeStream.lineStart();
18457 activeStream.point(x, y);
18458 clean = false;
18459 }
18460 }
18461 }
18462 x_ = x, y_ = y, v_ = v;
18463 }
18464
18465 return clipStream;
18466 };
18467}
18468
18469
18470/***/ }),
18471
18472/***/ "./node_modules/d3-geo/src/clip/rejoin.js":
18473/*!************************************************!*\
18474 !*** ./node_modules/d3-geo/src/clip/rejoin.js ***!
18475 \************************************************/
18476/*! exports provided: default */
18477/***/ (function(module, __webpack_exports__, __webpack_require__) {
18478
18479"use strict";
18480__webpack_require__.r(__webpack_exports__);
18481/* harmony import */ var _pointEqual_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../pointEqual.js */ "./node_modules/d3-geo/src/pointEqual.js");
18482
18483
18484function Intersection(point, points, other, entry) {
18485 this.x = point;
18486 this.z = points;
18487 this.o = other; // another intersection
18488 this.e = entry; // is an entry?
18489 this.v = false; // visited
18490 this.n = this.p = null; // next & previous
18491}
18492
18493// A generalized polygon clipping algorithm: given a polygon that has been cut
18494// into its visible line segments, and rejoins the segments by interpolating
18495// along the clip edge.
18496/* harmony default export */ __webpack_exports__["default"] = (function(segments, compareIntersection, startInside, interpolate, stream) {
18497 var subject = [],
18498 clip = [],
18499 i,
18500 n;
18501
18502 segments.forEach(function(segment) {
18503 if ((n = segment.length - 1) <= 0) return;
18504 var n, p0 = segment[0], p1 = segment[n], x;
18505
18506 // If the first and last points of a segment are coincident, then treat as a
18507 // closed ring. TODO if all rings are closed, then the winding order of the
18508 // exterior ring should be checked.
18509 if (Object(_pointEqual_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p0, p1)) {
18510 stream.lineStart();
18511 for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]);
18512 stream.lineEnd();
18513 return;
18514 }
18515
18516 subject.push(x = new Intersection(p0, segment, null, true));
18517 clip.push(x.o = new Intersection(p0, null, x, false));
18518 subject.push(x = new Intersection(p1, segment, null, false));
18519 clip.push(x.o = new Intersection(p1, null, x, true));
18520 });
18521
18522 if (!subject.length) return;
18523
18524 clip.sort(compareIntersection);
18525 link(subject);
18526 link(clip);
18527
18528 for (i = 0, n = clip.length; i < n; ++i) {
18529 clip[i].e = startInside = !startInside;
18530 }
18531
18532 var start = subject[0],
18533 points,
18534 point;
18535
18536 while (1) {
18537 // Find first unvisited intersection.
18538 var current = start,
18539 isSubject = true;
18540 while (current.v) if ((current = current.n) === start) return;
18541 points = current.z;
18542 stream.lineStart();
18543 do {
18544 current.v = current.o.v = true;
18545 if (current.e) {
18546 if (isSubject) {
18547 for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]);
18548 } else {
18549 interpolate(current.x, current.n.x, 1, stream);
18550 }
18551 current = current.n;
18552 } else {
18553 if (isSubject) {
18554 points = current.p.z;
18555 for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]);
18556 } else {
18557 interpolate(current.x, current.p.x, -1, stream);
18558 }
18559 current = current.p;
18560 }
18561 current = current.o;
18562 points = current.z;
18563 isSubject = !isSubject;
18564 } while (!current.v);
18565 stream.lineEnd();
18566 }
18567});
18568
18569function link(array) {
18570 if (!(n = array.length)) return;
18571 var n,
18572 i = 0,
18573 a = array[0],
18574 b;
18575 while (++i < n) {
18576 a.n = b = array[i];
18577 b.p = a;
18578 a = b;
18579 }
18580 a.n = b = array[0];
18581 b.p = a;
18582}
18583
18584
18585/***/ }),
18586
18587/***/ "./node_modules/d3-geo/src/compose.js":
18588/*!********************************************!*\
18589 !*** ./node_modules/d3-geo/src/compose.js ***!
18590 \********************************************/
18591/*! exports provided: default */
18592/***/ (function(module, __webpack_exports__, __webpack_require__) {
18593
18594"use strict";
18595__webpack_require__.r(__webpack_exports__);
18596/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
18597
18598 function compose(x, y) {
18599 return x = a(x, y), b(x[0], x[1]);
18600 }
18601
18602 if (a.invert && b.invert) compose.invert = function(x, y) {
18603 return x = b.invert(x, y), x && a.invert(x[0], x[1]);
18604 };
18605
18606 return compose;
18607});
18608
18609
18610/***/ }),
18611
18612/***/ "./node_modules/d3-geo/src/constant.js":
18613/*!*********************************************!*\
18614 !*** ./node_modules/d3-geo/src/constant.js ***!
18615 \*********************************************/
18616/*! exports provided: default */
18617/***/ (function(module, __webpack_exports__, __webpack_require__) {
18618
18619"use strict";
18620__webpack_require__.r(__webpack_exports__);
18621/* harmony default export */ __webpack_exports__["default"] = (function(x) {
18622 return function() {
18623 return x;
18624 };
18625});
18626
18627
18628/***/ }),
18629
18630/***/ "./node_modules/d3-geo/src/contains.js":
18631/*!*********************************************!*\
18632 !*** ./node_modules/d3-geo/src/contains.js ***!
18633 \*********************************************/
18634/*! exports provided: default */
18635/***/ (function(module, __webpack_exports__, __webpack_require__) {
18636
18637"use strict";
18638__webpack_require__.r(__webpack_exports__);
18639/* harmony import */ var _polygonContains_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polygonContains.js */ "./node_modules/d3-geo/src/polygonContains.js");
18640/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js");
18641/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
18642
18643
18644
18645
18646var containsObjectType = {
18647 Feature: function(object, point) {
18648 return containsGeometry(object.geometry, point);
18649 },
18650 FeatureCollection: function(object, point) {
18651 var features = object.features, i = -1, n = features.length;
18652 while (++i < n) if (containsGeometry(features[i].geometry, point)) return true;
18653 return false;
18654 }
18655};
18656
18657var containsGeometryType = {
18658 Sphere: function() {
18659 return true;
18660 },
18661 Point: function(object, point) {
18662 return containsPoint(object.coordinates, point);
18663 },
18664 MultiPoint: function(object, point) {
18665 var coordinates = object.coordinates, i = -1, n = coordinates.length;
18666 while (++i < n) if (containsPoint(coordinates[i], point)) return true;
18667 return false;
18668 },
18669 LineString: function(object, point) {
18670 return containsLine(object.coordinates, point);
18671 },
18672 MultiLineString: function(object, point) {
18673 var coordinates = object.coordinates, i = -1, n = coordinates.length;
18674 while (++i < n) if (containsLine(coordinates[i], point)) return true;
18675 return false;
18676 },
18677 Polygon: function(object, point) {
18678 return containsPolygon(object.coordinates, point);
18679 },
18680 MultiPolygon: function(object, point) {
18681 var coordinates = object.coordinates, i = -1, n = coordinates.length;
18682 while (++i < n) if (containsPolygon(coordinates[i], point)) return true;
18683 return false;
18684 },
18685 GeometryCollection: function(object, point) {
18686 var geometries = object.geometries, i = -1, n = geometries.length;
18687 while (++i < n) if (containsGeometry(geometries[i], point)) return true;
18688 return false;
18689 }
18690};
18691
18692function containsGeometry(geometry, point) {
18693 return geometry && containsGeometryType.hasOwnProperty(geometry.type)
18694 ? containsGeometryType[geometry.type](geometry, point)
18695 : false;
18696}
18697
18698function containsPoint(coordinates, point) {
18699 return Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates, point) === 0;
18700}
18701
18702function containsLine(coordinates, point) {
18703 var ao, bo, ab;
18704 for (var i = 0, n = coordinates.length; i < n; i++) {
18705 bo = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], point);
18706 if (bo === 0) return true;
18707 if (i > 0) {
18708 ab = Object(_distance_js__WEBPACK_IMPORTED_MODULE_1__["default"])(coordinates[i], coordinates[i - 1]);
18709 if (
18710 ab > 0 &&
18711 ao <= ab &&
18712 bo <= ab &&
18713 (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon2"] * ab
18714 )
18715 return true;
18716 }
18717 ao = bo;
18718 }
18719 return false;
18720}
18721
18722function containsPolygon(coordinates, point) {
18723 return !!Object(_polygonContains_js__WEBPACK_IMPORTED_MODULE_0__["default"])(coordinates.map(ringRadians), pointRadians(point));
18724}
18725
18726function ringRadians(ring) {
18727 return ring = ring.map(pointRadians), ring.pop(), ring;
18728}
18729
18730function pointRadians(point) {
18731 return [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_2__["radians"]];
18732}
18733
18734/* harmony default export */ __webpack_exports__["default"] = (function(object, point) {
18735 return (object && containsObjectType.hasOwnProperty(object.type)
18736 ? containsObjectType[object.type]
18737 : containsGeometry)(object, point);
18738});
18739
18740
18741/***/ }),
18742
18743/***/ "./node_modules/d3-geo/src/distance.js":
18744/*!*********************************************!*\
18745 !*** ./node_modules/d3-geo/src/distance.js ***!
18746 \*********************************************/
18747/*! exports provided: default */
18748/***/ (function(module, __webpack_exports__, __webpack_require__) {
18749
18750"use strict";
18751__webpack_require__.r(__webpack_exports__);
18752/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js");
18753
18754
18755var coordinates = [null, null],
18756 object = {type: "LineString", coordinates: coordinates};
18757
18758/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
18759 coordinates[0] = a;
18760 coordinates[1] = b;
18761 return Object(_length_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object);
18762});
18763
18764
18765/***/ }),
18766
18767/***/ "./node_modules/d3-geo/src/graticule.js":
18768/*!**********************************************!*\
18769 !*** ./node_modules/d3-geo/src/graticule.js ***!
18770 \**********************************************/
18771/*! exports provided: default, graticule10 */
18772/***/ (function(module, __webpack_exports__, __webpack_require__) {
18773
18774"use strict";
18775__webpack_require__.r(__webpack_exports__);
18776/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return graticule; });
18777/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graticule10", function() { return graticule10; });
18778/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
18779/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
18780
18781
18782
18783function graticuleX(y0, y1, dy) {
18784 var y = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(y0, y1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dy).concat(y1);
18785 return function(x) { return y.map(function(y) { return [x, y]; }); };
18786}
18787
18788function graticuleY(x0, x1, dx) {
18789 var x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(x0, x1 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"], dx).concat(x1);
18790 return function(y) { return x.map(function(x) { return [x, y]; }); };
18791}
18792
18793function graticule() {
18794 var x1, x0, X1, X0,
18795 y1, y0, Y1, Y0,
18796 dx = 10, dy = dx, DX = 90, DY = 360,
18797 x, y, X, Y,
18798 precision = 2.5;
18799
18800 function graticule() {
18801 return {type: "MultiLineString", coordinates: lines()};
18802 }
18803
18804 function lines() {
18805 return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(X0 / DX) * DX, X1, DX).map(X)
18806 .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(Y0 / DY) * DY, Y1, DY).map(Y))
18807 .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(x0 / dx) * dx, x1, dx).filter(function(x) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(x % DX) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(x))
18808 .concat(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["ceil"])(y0 / dy) * dy, y1, dy).filter(function(y) { return Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(y % DY) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]; }).map(y));
18809 }
18810
18811 graticule.lines = function() {
18812 return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; });
18813 };
18814
18815 graticule.outline = function() {
18816 return {
18817 type: "Polygon",
18818 coordinates: [
18819 X(X0).concat(
18820 Y(Y1).slice(1),
18821 X(X1).reverse().slice(1),
18822 Y(Y0).reverse().slice(1))
18823 ]
18824 };
18825 };
18826
18827 graticule.extent = function(_) {
18828 if (!arguments.length) return graticule.extentMinor();
18829 return graticule.extentMajor(_).extentMinor(_);
18830 };
18831
18832 graticule.extentMajor = function(_) {
18833 if (!arguments.length) return [[X0, Y0], [X1, Y1]];
18834 X0 = +_[0][0], X1 = +_[1][0];
18835 Y0 = +_[0][1], Y1 = +_[1][1];
18836 if (X0 > X1) _ = X0, X0 = X1, X1 = _;
18837 if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
18838 return graticule.precision(precision);
18839 };
18840
18841 graticule.extentMinor = function(_) {
18842 if (!arguments.length) return [[x0, y0], [x1, y1]];
18843 x0 = +_[0][0], x1 = +_[1][0];
18844 y0 = +_[0][1], y1 = +_[1][1];
18845 if (x0 > x1) _ = x0, x0 = x1, x1 = _;
18846 if (y0 > y1) _ = y0, y0 = y1, y1 = _;
18847 return graticule.precision(precision);
18848 };
18849
18850 graticule.step = function(_) {
18851 if (!arguments.length) return graticule.stepMinor();
18852 return graticule.stepMajor(_).stepMinor(_);
18853 };
18854
18855 graticule.stepMajor = function(_) {
18856 if (!arguments.length) return [DX, DY];
18857 DX = +_[0], DY = +_[1];
18858 return graticule;
18859 };
18860
18861 graticule.stepMinor = function(_) {
18862 if (!arguments.length) return [dx, dy];
18863 dx = +_[0], dy = +_[1];
18864 return graticule;
18865 };
18866
18867 graticule.precision = function(_) {
18868 if (!arguments.length) return precision;
18869 precision = +_;
18870 x = graticuleX(y0, y1, 90);
18871 y = graticuleY(x0, x1, precision);
18872 X = graticuleX(Y0, Y1, 90);
18873 Y = graticuleY(X0, X1, precision);
18874 return graticule;
18875 };
18876
18877 return graticule
18878 .extentMajor([[-180, -90 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 90 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]])
18879 .extentMinor([[-180, -80 - _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]], [180, 80 + _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"]]]);
18880}
18881
18882function graticule10() {
18883 return graticule()();
18884}
18885
18886
18887/***/ }),
18888
18889/***/ "./node_modules/d3-geo/src/identity.js":
18890/*!*********************************************!*\
18891 !*** ./node_modules/d3-geo/src/identity.js ***!
18892 \*********************************************/
18893/*! exports provided: default */
18894/***/ (function(module, __webpack_exports__, __webpack_require__) {
18895
18896"use strict";
18897__webpack_require__.r(__webpack_exports__);
18898/* harmony default export */ __webpack_exports__["default"] = (function(x) {
18899 return x;
18900});
18901
18902
18903/***/ }),
18904
18905/***/ "./node_modules/d3-geo/src/index.js":
18906/*!******************************************!*\
18907 !*** ./node_modules/d3-geo/src/index.js ***!
18908 \******************************************/
18909/*! exports provided: geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform */
18910/***/ (function(module, __webpack_exports__, __webpack_require__) {
18911
18912"use strict";
18913__webpack_require__.r(__webpack_exports__);
18914/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/area.js");
18915/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
18916
18917/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/bounds.js");
18918/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return _bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
18919
18920/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/centroid.js");
18921/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
18922
18923/* harmony import */ var _circle_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle.js */ "./node_modules/d3-geo/src/circle.js");
18924/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return _circle_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
18925
18926/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js");
18927/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
18928
18929/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js");
18930/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return _clip_circle_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
18931
18932/* harmony import */ var _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./clip/extent.js */ "./node_modules/d3-geo/src/clip/extent.js");
18933/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return _clip_extent_js__WEBPACK_IMPORTED_MODULE_6__["default"]; });
18934
18935/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js");
18936/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_7__["default"]; });
18937
18938/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-geo/src/contains.js");
18939/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
18940
18941/* harmony import */ var _distance_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./distance.js */ "./node_modules/d3-geo/src/distance.js");
18942/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return _distance_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
18943
18944/* harmony import */ var _graticule_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./graticule.js */ "./node_modules/d3-geo/src/graticule.js");
18945/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
18946
18947/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return _graticule_js__WEBPACK_IMPORTED_MODULE_10__["graticule10"]; });
18948
18949/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-geo/src/interpolate.js");
18950/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return _interpolate_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
18951
18952/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-geo/src/length.js");
18953/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_12__["default"]; });
18954
18955/* harmony import */ var _path_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./path/index.js */ "./node_modules/d3-geo/src/path/index.js");
18956/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return _path_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
18957
18958/* harmony import */ var _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./projection/albers.js */ "./node_modules/d3-geo/src/projection/albers.js");
18959/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return _projection_albers_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
18960
18961/* harmony import */ var _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./projection/albersUsa.js */ "./node_modules/d3-geo/src/projection/albersUsa.js");
18962/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return _projection_albersUsa_js__WEBPACK_IMPORTED_MODULE_15__["default"]; });
18963
18964/* harmony import */ var _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./projection/azimuthalEqualArea.js */ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js");
18965/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["default"]; });
18966
18967/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return _projection_azimuthalEqualArea_js__WEBPACK_IMPORTED_MODULE_16__["azimuthalEqualAreaRaw"]; });
18968
18969/* harmony import */ var _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./projection/azimuthalEquidistant.js */ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js");
18970/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["default"]; });
18971
18972/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return _projection_azimuthalEquidistant_js__WEBPACK_IMPORTED_MODULE_17__["azimuthalEquidistantRaw"]; });
18973
18974/* harmony import */ var _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./projection/conicConformal.js */ "./node_modules/d3-geo/src/projection/conicConformal.js");
18975/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["default"]; });
18976
18977/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return _projection_conicConformal_js__WEBPACK_IMPORTED_MODULE_18__["conicConformalRaw"]; });
18978
18979/* harmony import */ var _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./projection/conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js");
18980/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["default"]; });
18981
18982/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return _projection_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_19__["conicEqualAreaRaw"]; });
18983
18984/* harmony import */ var _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./projection/conicEquidistant.js */ "./node_modules/d3-geo/src/projection/conicEquidistant.js");
18985/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["default"]; });
18986
18987/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return _projection_conicEquidistant_js__WEBPACK_IMPORTED_MODULE_20__["conicEquidistantRaw"]; });
18988
18989/* harmony import */ var _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./projection/equalEarth.js */ "./node_modules/d3-geo/src/projection/equalEarth.js");
18990/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["default"]; });
18991
18992/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return _projection_equalEarth_js__WEBPACK_IMPORTED_MODULE_21__["equalEarthRaw"]; });
18993
18994/* harmony import */ var _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./projection/equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js");
18995/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["default"]; });
18996
18997/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return _projection_equirectangular_js__WEBPACK_IMPORTED_MODULE_22__["equirectangularRaw"]; });
18998
18999/* harmony import */ var _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./projection/gnomonic.js */ "./node_modules/d3-geo/src/projection/gnomonic.js");
19000/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["default"]; });
19001
19002/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return _projection_gnomonic_js__WEBPACK_IMPORTED_MODULE_23__["gnomonicRaw"]; });
19003
19004/* harmony import */ var _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./projection/identity.js */ "./node_modules/d3-geo/src/projection/identity.js");
19005/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return _projection_identity_js__WEBPACK_IMPORTED_MODULE_24__["default"]; });
19006
19007/* harmony import */ var _projection_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./projection/index.js */ "./node_modules/d3-geo/src/projection/index.js");
19008/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; });
19009
19010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return _projection_index_js__WEBPACK_IMPORTED_MODULE_25__["projectionMutator"]; });
19011
19012/* harmony import */ var _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./projection/mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js");
19013/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["default"]; });
19014
19015/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return _projection_mercator_js__WEBPACK_IMPORTED_MODULE_26__["mercatorRaw"]; });
19016
19017/* harmony import */ var _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./projection/naturalEarth1.js */ "./node_modules/d3-geo/src/projection/naturalEarth1.js");
19018/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["default"]; });
19019
19020/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return _projection_naturalEarth1_js__WEBPACK_IMPORTED_MODULE_27__["naturalEarth1Raw"]; });
19021
19022/* harmony import */ var _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./projection/orthographic.js */ "./node_modules/d3-geo/src/projection/orthographic.js");
19023/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["default"]; });
19024
19025/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return _projection_orthographic_js__WEBPACK_IMPORTED_MODULE_28__["orthographicRaw"]; });
19026
19027/* harmony import */ var _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./projection/stereographic.js */ "./node_modules/d3-geo/src/projection/stereographic.js");
19028/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["default"]; });
19029
19030/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return _projection_stereographic_js__WEBPACK_IMPORTED_MODULE_29__["stereographicRaw"]; });
19031
19032/* harmony import */ var _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./projection/transverseMercator.js */ "./node_modules/d3-geo/src/projection/transverseMercator.js");
19033/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; });
19034
19035/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return _projection_transverseMercator_js__WEBPACK_IMPORTED_MODULE_30__["transverseMercatorRaw"]; });
19036
19037/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./rotation.js */ "./node_modules/d3-geo/src/rotation.js");
19038/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return _rotation_js__WEBPACK_IMPORTED_MODULE_31__["default"]; });
19039
19040/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js");
19041/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return _stream_js__WEBPACK_IMPORTED_MODULE_32__["default"]; });
19042
19043/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-geo/src/transform.js");
19044/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_33__["default"]; });
19045
19046
19047
19048
19049
19050
19051
19052 // DEPRECATED! Use d3.geoIdentity().clipExtent(…).
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082/***/ }),
19083
19084/***/ "./node_modules/d3-geo/src/interpolate.js":
19085/*!************************************************!*\
19086 !*** ./node_modules/d3-geo/src/interpolate.js ***!
19087 \************************************************/
19088/*! exports provided: default */
19089/***/ (function(module, __webpack_exports__, __webpack_require__) {
19090
19091"use strict";
19092__webpack_require__.r(__webpack_exports__);
19093/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
19094
19095
19096/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
19097 var x0 = a[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"],
19098 y0 = a[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"],
19099 x1 = b[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"],
19100 y1 = b[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"],
19101 cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0),
19102 sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0),
19103 cy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1),
19104 sy1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1),
19105 kx0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x0),
19106 ky0 = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x0),
19107 kx1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x1),
19108 ky1 = cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x1),
19109 d = 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(y1 - y0) + cy0 * cy1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["haversin"])(x1 - x0))),
19110 k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d);
19111
19112 var interpolate = d ? function(t) {
19113 var B = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(t *= d) / k,
19114 A = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(d - t) / k,
19115 x = A * kx0 + B * kx1,
19116 y = A * ky0 + B * ky1,
19117 z = A * sy0 + B * sy1;
19118 return [
19119 Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(y, x) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"],
19120 Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(z, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y)) * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]
19121 ];
19122 } : function() {
19123 return [x0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], y0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]];
19124 };
19125
19126 interpolate.distance = d;
19127
19128 return interpolate;
19129});
19130
19131
19132/***/ }),
19133
19134/***/ "./node_modules/d3-geo/src/length.js":
19135/*!*******************************************!*\
19136 !*** ./node_modules/d3-geo/src/length.js ***!
19137 \*******************************************/
19138/*! exports provided: default */
19139/***/ (function(module, __webpack_exports__, __webpack_require__) {
19140
19141"use strict";
19142__webpack_require__.r(__webpack_exports__);
19143/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js");
19144/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
19145/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./noop.js */ "./node_modules/d3-geo/src/noop.js");
19146/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stream.js */ "./node_modules/d3-geo/src/stream.js");
19147
19148
19149
19150
19151
19152var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
19153 lambda0,
19154 sinPhi0,
19155 cosPhi0;
19156
19157var lengthStream = {
19158 sphere: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19159 point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19160 lineStart: lengthLineStart,
19161 lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19162 polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19163 polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"]
19164};
19165
19166function lengthLineStart() {
19167 lengthStream.point = lengthPointFirst;
19168 lengthStream.lineEnd = lengthLineEnd;
19169}
19170
19171function lengthLineEnd() {
19172 lengthStream.point = lengthStream.lineEnd = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"];
19173}
19174
19175function lengthPointFirst(lambda, phi) {
19176 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"];
19177 lambda0 = lambda, sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi), cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi);
19178 lengthStream.point = lengthPoint;
19179}
19180
19181function lengthPoint(lambda, phi) {
19182 lambda *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], phi *= _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"];
19183 var sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi),
19184 cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi),
19185 delta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda - lambda0),
19186 cosDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(delta),
19187 sinDelta = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(delta),
19188 x = cosPhi * sinDelta,
19189 y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta,
19190 z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta;
19191 lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x * x + y * y), z));
19192 lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi;
19193}
19194
19195/* harmony default export */ __webpack_exports__["default"] = (function(object) {
19196 lengthSum.reset();
19197 Object(_stream_js__WEBPACK_IMPORTED_MODULE_3__["default"])(object, lengthStream);
19198 return +lengthSum;
19199});
19200
19201
19202/***/ }),
19203
19204/***/ "./node_modules/d3-geo/src/math.js":
19205/*!*****************************************!*\
19206 !*** ./node_modules/d3-geo/src/math.js ***!
19207 \*****************************************/
19208/*! exports provided: epsilon, epsilon2, pi, halfPi, quarterPi, tau, degrees, radians, abs, atan, atan2, cos, ceil, exp, floor, log, pow, sin, sign, sqrt, tan, acos, asin, haversin */
19209/***/ (function(module, __webpack_exports__, __webpack_require__) {
19210
19211"use strict";
19212__webpack_require__.r(__webpack_exports__);
19213/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; });
19214/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; });
19215/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; });
19216/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; });
19217/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quarterPi", function() { return quarterPi; });
19218/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; });
19219/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "degrees", function() { return degrees; });
19220/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "radians", function() { return radians; });
19221/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; });
19222/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan", function() { return atan; });
19223/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; });
19224/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; });
19225/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ceil", function() { return ceil; });
19226/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exp", function() { return exp; });
19227/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "floor", function() { return floor; });
19228/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "log", function() { return log; });
19229/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pow", function() { return pow; });
19230/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; });
19231/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sign", function() { return sign; });
19232/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; });
19233/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tan", function() { return tan; });
19234/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; });
19235/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; });
19236/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "haversin", function() { return haversin; });
19237var epsilon = 1e-6;
19238var epsilon2 = 1e-12;
19239var pi = Math.PI;
19240var halfPi = pi / 2;
19241var quarterPi = pi / 4;
19242var tau = pi * 2;
19243
19244var degrees = 180 / pi;
19245var radians = pi / 180;
19246
19247var abs = Math.abs;
19248var atan = Math.atan;
19249var atan2 = Math.atan2;
19250var cos = Math.cos;
19251var ceil = Math.ceil;
19252var exp = Math.exp;
19253var floor = Math.floor;
19254var log = Math.log;
19255var pow = Math.pow;
19256var sin = Math.sin;
19257var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };
19258var sqrt = Math.sqrt;
19259var tan = Math.tan;
19260
19261function acos(x) {
19262 return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
19263}
19264
19265function asin(x) {
19266 return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x);
19267}
19268
19269function haversin(x) {
19270 return (x = sin(x / 2)) * x;
19271}
19272
19273
19274/***/ }),
19275
19276/***/ "./node_modules/d3-geo/src/noop.js":
19277/*!*****************************************!*\
19278 !*** ./node_modules/d3-geo/src/noop.js ***!
19279 \*****************************************/
19280/*! exports provided: default */
19281/***/ (function(module, __webpack_exports__, __webpack_require__) {
19282
19283"use strict";
19284__webpack_require__.r(__webpack_exports__);
19285/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return noop; });
19286function noop() {}
19287
19288
19289/***/ }),
19290
19291/***/ "./node_modules/d3-geo/src/path/area.js":
19292/*!**********************************************!*\
19293 !*** ./node_modules/d3-geo/src/path/area.js ***!
19294 \**********************************************/
19295/*! exports provided: default */
19296/***/ (function(module, __webpack_exports__, __webpack_require__) {
19297
19298"use strict";
19299__webpack_require__.r(__webpack_exports__);
19300/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js");
19301/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
19302/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js");
19303
19304
19305
19306
19307var areaSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
19308 areaRingSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
19309 x00,
19310 y00,
19311 x0,
19312 y0;
19313
19314var areaStream = {
19315 point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19316 lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19317 lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19318 polygonStart: function() {
19319 areaStream.lineStart = areaRingStart;
19320 areaStream.lineEnd = areaRingEnd;
19321 },
19322 polygonEnd: function() {
19323 areaStream.lineStart = areaStream.lineEnd = areaStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"];
19324 areaSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(areaRingSum));
19325 areaRingSum.reset();
19326 },
19327 result: function() {
19328 var area = areaSum / 2;
19329 areaSum.reset();
19330 return area;
19331 }
19332};
19333
19334function areaRingStart() {
19335 areaStream.point = areaPointFirst;
19336}
19337
19338function areaPointFirst(x, y) {
19339 areaStream.point = areaPoint;
19340 x00 = x0 = x, y00 = y0 = y;
19341}
19342
19343function areaPoint(x, y) {
19344 areaRingSum.add(y0 * x - x0 * y);
19345 x0 = x, y0 = y;
19346}
19347
19348function areaRingEnd() {
19349 areaPoint(x00, y00);
19350}
19351
19352/* harmony default export */ __webpack_exports__["default"] = (areaStream);
19353
19354
19355/***/ }),
19356
19357/***/ "./node_modules/d3-geo/src/path/bounds.js":
19358/*!************************************************!*\
19359 !*** ./node_modules/d3-geo/src/path/bounds.js ***!
19360 \************************************************/
19361/*! exports provided: default */
19362/***/ (function(module, __webpack_exports__, __webpack_require__) {
19363
19364"use strict";
19365__webpack_require__.r(__webpack_exports__);
19366/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js");
19367
19368
19369var x0 = Infinity,
19370 y0 = x0,
19371 x1 = -x0,
19372 y1 = x1;
19373
19374var boundsStream = {
19375 point: boundsPoint,
19376 lineStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
19377 lineEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
19378 polygonStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
19379 polygonEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
19380 result: function() {
19381 var bounds = [[x0, y0], [x1, y1]];
19382 x1 = y1 = -(y0 = x0 = Infinity);
19383 return bounds;
19384 }
19385};
19386
19387function boundsPoint(x, y) {
19388 if (x < x0) x0 = x;
19389 if (x > x1) x1 = x;
19390 if (y < y0) y0 = y;
19391 if (y > y1) y1 = y;
19392}
19393
19394/* harmony default export */ __webpack_exports__["default"] = (boundsStream);
19395
19396
19397/***/ }),
19398
19399/***/ "./node_modules/d3-geo/src/path/centroid.js":
19400/*!**************************************************!*\
19401 !*** ./node_modules/d3-geo/src/path/centroid.js ***!
19402 \**************************************************/
19403/*! exports provided: default */
19404/***/ (function(module, __webpack_exports__, __webpack_require__) {
19405
19406"use strict";
19407__webpack_require__.r(__webpack_exports__);
19408/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
19409
19410
19411// TODO Enforce positive area for exterior, negative area for interior?
19412
19413var X0 = 0,
19414 Y0 = 0,
19415 Z0 = 0,
19416 X1 = 0,
19417 Y1 = 0,
19418 Z1 = 0,
19419 X2 = 0,
19420 Y2 = 0,
19421 Z2 = 0,
19422 x00,
19423 y00,
19424 x0,
19425 y0;
19426
19427var centroidStream = {
19428 point: centroidPoint,
19429 lineStart: centroidLineStart,
19430 lineEnd: centroidLineEnd,
19431 polygonStart: function() {
19432 centroidStream.lineStart = centroidRingStart;
19433 centroidStream.lineEnd = centroidRingEnd;
19434 },
19435 polygonEnd: function() {
19436 centroidStream.point = centroidPoint;
19437 centroidStream.lineStart = centroidLineStart;
19438 centroidStream.lineEnd = centroidLineEnd;
19439 },
19440 result: function() {
19441 var centroid = Z2 ? [X2 / Z2, Y2 / Z2]
19442 : Z1 ? [X1 / Z1, Y1 / Z1]
19443 : Z0 ? [X0 / Z0, Y0 / Z0]
19444 : [NaN, NaN];
19445 X0 = Y0 = Z0 =
19446 X1 = Y1 = Z1 =
19447 X2 = Y2 = Z2 = 0;
19448 return centroid;
19449 }
19450};
19451
19452function centroidPoint(x, y) {
19453 X0 += x;
19454 Y0 += y;
19455 ++Z0;
19456}
19457
19458function centroidLineStart() {
19459 centroidStream.point = centroidPointFirstLine;
19460}
19461
19462function centroidPointFirstLine(x, y) {
19463 centroidStream.point = centroidPointLine;
19464 centroidPoint(x0 = x, y0 = y);
19465}
19466
19467function centroidPointLine(x, y) {
19468 var dx = x - x0, dy = y - y0, z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy);
19469 X1 += z * (x0 + x) / 2;
19470 Y1 += z * (y0 + y) / 2;
19471 Z1 += z;
19472 centroidPoint(x0 = x, y0 = y);
19473}
19474
19475function centroidLineEnd() {
19476 centroidStream.point = centroidPoint;
19477}
19478
19479function centroidRingStart() {
19480 centroidStream.point = centroidPointFirstRing;
19481}
19482
19483function centroidRingEnd() {
19484 centroidPointRing(x00, y00);
19485}
19486
19487function centroidPointFirstRing(x, y) {
19488 centroidStream.point = centroidPointRing;
19489 centroidPoint(x00 = x0 = x, y00 = y0 = y);
19490}
19491
19492function centroidPointRing(x, y) {
19493 var dx = x - x0,
19494 dy = y - y0,
19495 z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(dx * dx + dy * dy);
19496
19497 X1 += z * (x0 + x) / 2;
19498 Y1 += z * (y0 + y) / 2;
19499 Z1 += z;
19500
19501 z = y0 * x - x0 * y;
19502 X2 += z * (x0 + x);
19503 Y2 += z * (y0 + y);
19504 Z2 += z * 3;
19505 centroidPoint(x0 = x, y0 = y);
19506}
19507
19508/* harmony default export */ __webpack_exports__["default"] = (centroidStream);
19509
19510
19511/***/ }),
19512
19513/***/ "./node_modules/d3-geo/src/path/context.js":
19514/*!*************************************************!*\
19515 !*** ./node_modules/d3-geo/src/path/context.js ***!
19516 \*************************************************/
19517/*! exports provided: default */
19518/***/ (function(module, __webpack_exports__, __webpack_require__) {
19519
19520"use strict";
19521__webpack_require__.r(__webpack_exports__);
19522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathContext; });
19523/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
19524/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js");
19525
19526
19527
19528function PathContext(context) {
19529 this._context = context;
19530}
19531
19532PathContext.prototype = {
19533 _radius: 4.5,
19534 pointRadius: function(_) {
19535 return this._radius = _, this;
19536 },
19537 polygonStart: function() {
19538 this._line = 0;
19539 },
19540 polygonEnd: function() {
19541 this._line = NaN;
19542 },
19543 lineStart: function() {
19544 this._point = 0;
19545 },
19546 lineEnd: function() {
19547 if (this._line === 0) this._context.closePath();
19548 this._point = NaN;
19549 },
19550 point: function(x, y) {
19551 switch (this._point) {
19552 case 0: {
19553 this._context.moveTo(x, y);
19554 this._point = 1;
19555 break;
19556 }
19557 case 1: {
19558 this._context.lineTo(x, y);
19559 break;
19560 }
19561 default: {
19562 this._context.moveTo(x + this._radius, y);
19563 this._context.arc(x, y, this._radius, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]);
19564 break;
19565 }
19566 }
19567 },
19568 result: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"]
19569};
19570
19571
19572/***/ }),
19573
19574/***/ "./node_modules/d3-geo/src/path/index.js":
19575/*!***********************************************!*\
19576 !*** ./node_modules/d3-geo/src/path/index.js ***!
19577 \***********************************************/
19578/*! exports provided: default */
19579/***/ (function(module, __webpack_exports__, __webpack_require__) {
19580
19581"use strict";
19582__webpack_require__.r(__webpack_exports__);
19583/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js");
19584/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js");
19585/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-geo/src/path/area.js");
19586/* harmony import */ var _bounds_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bounds.js */ "./node_modules/d3-geo/src/path/bounds.js");
19587/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-geo/src/path/centroid.js");
19588/* harmony import */ var _context_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./context.js */ "./node_modules/d3-geo/src/path/context.js");
19589/* harmony import */ var _measure_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./measure.js */ "./node_modules/d3-geo/src/path/measure.js");
19590/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-geo/src/path/string.js");
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600/* harmony default export */ __webpack_exports__["default"] = (function(projection, context) {
19601 var pointRadius = 4.5,
19602 projectionStream,
19603 contextStream;
19604
19605 function path(object) {
19606 if (object) {
19607 if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments));
19608 Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(contextStream));
19609 }
19610 return contextStream.result();
19611 }
19612
19613 path.area = function(object) {
19614 Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_area_js__WEBPACK_IMPORTED_MODULE_2__["default"]));
19615 return _area_js__WEBPACK_IMPORTED_MODULE_2__["default"].result();
19616 };
19617
19618 path.measure = function(object) {
19619 Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_measure_js__WEBPACK_IMPORTED_MODULE_6__["default"]));
19620 return _measure_js__WEBPACK_IMPORTED_MODULE_6__["default"].result();
19621 };
19622
19623 path.bounds = function(object) {
19624 Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"]));
19625 return _bounds_js__WEBPACK_IMPORTED_MODULE_3__["default"].result();
19626 };
19627
19628 path.centroid = function(object) {
19629 Object(_stream_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object, projectionStream(_centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"]));
19630 return _centroid_js__WEBPACK_IMPORTED_MODULE_4__["default"].result();
19631 };
19632
19633 path.projection = function(_) {
19634 return arguments.length ? (projectionStream = _ == null ? (projection = null, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]) : (projection = _).stream, path) : projection;
19635 };
19636
19637 path.context = function(_) {
19638 if (!arguments.length) return context;
19639 contextStream = _ == null ? (context = null, new _string_js__WEBPACK_IMPORTED_MODULE_7__["default"]) : new _context_js__WEBPACK_IMPORTED_MODULE_5__["default"](context = _);
19640 if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius);
19641 return path;
19642 };
19643
19644 path.pointRadius = function(_) {
19645 if (!arguments.length) return pointRadius;
19646 pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_);
19647 return path;
19648 };
19649
19650 return path.projection(projection).context(context);
19651});
19652
19653
19654/***/ }),
19655
19656/***/ "./node_modules/d3-geo/src/path/measure.js":
19657/*!*************************************************!*\
19658 !*** ./node_modules/d3-geo/src/path/measure.js ***!
19659 \*************************************************/
19660/*! exports provided: default */
19661/***/ (function(module, __webpack_exports__, __webpack_require__) {
19662
19663"use strict";
19664__webpack_require__.r(__webpack_exports__);
19665/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../adder.js */ "./node_modules/d3-geo/src/adder.js");
19666/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
19667/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-geo/src/noop.js");
19668
19669
19670
19671
19672var lengthSum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(),
19673 lengthRing,
19674 x00,
19675 y00,
19676 x0,
19677 y0;
19678
19679var lengthStream = {
19680 point: _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"],
19681 lineStart: function() {
19682 lengthStream.point = lengthPointFirst;
19683 },
19684 lineEnd: function() {
19685 if (lengthRing) lengthPoint(x00, y00);
19686 lengthStream.point = _noop_js__WEBPACK_IMPORTED_MODULE_2__["default"];
19687 },
19688 polygonStart: function() {
19689 lengthRing = true;
19690 },
19691 polygonEnd: function() {
19692 lengthRing = null;
19693 },
19694 result: function() {
19695 var length = +lengthSum;
19696 lengthSum.reset();
19697 return length;
19698 }
19699};
19700
19701function lengthPointFirst(x, y) {
19702 lengthStream.point = lengthPoint;
19703 x00 = x0 = x, y00 = y0 = y;
19704}
19705
19706function lengthPoint(x, y) {
19707 x0 -= x, y0 -= y;
19708 lengthSum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(x0 * x0 + y0 * y0));
19709 x0 = x, y0 = y;
19710}
19711
19712/* harmony default export */ __webpack_exports__["default"] = (lengthStream);
19713
19714
19715/***/ }),
19716
19717/***/ "./node_modules/d3-geo/src/path/string.js":
19718/*!************************************************!*\
19719 !*** ./node_modules/d3-geo/src/path/string.js ***!
19720 \************************************************/
19721/*! exports provided: default */
19722/***/ (function(module, __webpack_exports__, __webpack_require__) {
19723
19724"use strict";
19725__webpack_require__.r(__webpack_exports__);
19726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PathString; });
19727function PathString() {
19728 this._string = [];
19729}
19730
19731PathString.prototype = {
19732 _radius: 4.5,
19733 _circle: circle(4.5),
19734 pointRadius: function(_) {
19735 if ((_ = +_) !== this._radius) this._radius = _, this._circle = null;
19736 return this;
19737 },
19738 polygonStart: function() {
19739 this._line = 0;
19740 },
19741 polygonEnd: function() {
19742 this._line = NaN;
19743 },
19744 lineStart: function() {
19745 this._point = 0;
19746 },
19747 lineEnd: function() {
19748 if (this._line === 0) this._string.push("Z");
19749 this._point = NaN;
19750 },
19751 point: function(x, y) {
19752 switch (this._point) {
19753 case 0: {
19754 this._string.push("M", x, ",", y);
19755 this._point = 1;
19756 break;
19757 }
19758 case 1: {
19759 this._string.push("L", x, ",", y);
19760 break;
19761 }
19762 default: {
19763 if (this._circle == null) this._circle = circle(this._radius);
19764 this._string.push("M", x, ",", y, this._circle);
19765 break;
19766 }
19767 }
19768 },
19769 result: function() {
19770 if (this._string.length) {
19771 var result = this._string.join("");
19772 this._string = [];
19773 return result;
19774 } else {
19775 return null;
19776 }
19777 }
19778};
19779
19780function circle(radius) {
19781 return "m0," + radius
19782 + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius
19783 + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius
19784 + "z";
19785}
19786
19787
19788/***/ }),
19789
19790/***/ "./node_modules/d3-geo/src/pointEqual.js":
19791/*!***********************************************!*\
19792 !*** ./node_modules/d3-geo/src/pointEqual.js ***!
19793 \***********************************************/
19794/*! exports provided: default */
19795/***/ (function(module, __webpack_exports__, __webpack_require__) {
19796
19797"use strict";
19798__webpack_require__.r(__webpack_exports__);
19799/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
19800
19801
19802/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
19803 return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[0] - b[0]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"] && Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(a[1] - b[1]) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"];
19804});
19805
19806
19807/***/ }),
19808
19809/***/ "./node_modules/d3-geo/src/polygonContains.js":
19810/*!****************************************************!*\
19811 !*** ./node_modules/d3-geo/src/polygonContains.js ***!
19812 \****************************************************/
19813/*! exports provided: default */
19814/***/ (function(module, __webpack_exports__, __webpack_require__) {
19815
19816"use strict";
19817__webpack_require__.r(__webpack_exports__);
19818/* harmony import */ var _adder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./adder.js */ "./node_modules/d3-geo/src/adder.js");
19819/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cartesian.js */ "./node_modules/d3-geo/src/cartesian.js");
19820/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
19821
19822
19823
19824
19825var sum = Object(_adder_js__WEBPACK_IMPORTED_MODULE_0__["default"])();
19826
19827function longitude(point) {
19828 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) <= _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"])
19829 return point[0];
19830 else
19831 return Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sign"])(point[0]) * ((Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(point[0]) + _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]) % _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"]);
19832}
19833
19834/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) {
19835 var lambda = longitude(point),
19836 phi = point[1],
19837 sinPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi),
19838 normal = [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(lambda), -Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(lambda), 0],
19839 angle = 0,
19840 winding = 0;
19841
19842 sum.reset();
19843
19844 if (sinPhi === 1) phi = _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"];
19845 else if (sinPhi === -1) phi = -_math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"];
19846
19847 for (var i = 0, n = polygon.length; i < n; ++i) {
19848 if (!(m = (ring = polygon[i]).length)) continue;
19849 var ring,
19850 m,
19851 point0 = ring[m - 1],
19852 lambda0 = longitude(point0),
19853 phi0 = point0[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"],
19854 sinPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi0),
19855 cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi0);
19856
19857 for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) {
19858 var point1 = ring[j],
19859 lambda1 = longitude(point1),
19860 phi1 = point1[1] / 2 + _math_js__WEBPACK_IMPORTED_MODULE_2__["quarterPi"],
19861 sinPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(phi1),
19862 cosPhi1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(phi1),
19863 delta = lambda1 - lambda0,
19864 sign = delta >= 0 ? 1 : -1,
19865 absDelta = sign * delta,
19866 antimeridian = absDelta > _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"],
19867 k = sinPhi0 * sinPhi1;
19868
19869 sum.add(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(k * sign * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(absDelta), cosPhi0 * cosPhi1 + k * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(absDelta)));
19870 angle += antimeridian ? delta + sign * _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] : delta;
19871
19872 // Are the longitudes either side of the point’s meridian (lambda),
19873 // and are the latitudes smaller than the parallel (phi)?
19874 if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) {
19875 var arc = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point0), Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesian"])(point1));
19876 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(arc);
19877 var intersection = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianCross"])(normal, arc);
19878 Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_1__["cartesianNormalizeInPlace"])(intersection);
19879 var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(intersection[2]);
19880 if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) {
19881 winding += antimeridian ^ delta >= 0 ? 1 : -1;
19882 }
19883 }
19884 }
19885 }
19886
19887 // First, determine whether the South pole is inside or outside:
19888 //
19889 // It is inside if:
19890 // * the polygon winds around it in a clockwise direction.
19891 // * the polygon does not (cumulatively) wind around it, but has a negative
19892 // (counter-clockwise) area.
19893 //
19894 // Second, count the (signed) number of times a segment crosses a lambda
19895 // from the point to the South pole. If it is zero, then the point is the
19896 // same side as the South pole.
19897
19898 return (angle < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] || angle < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"] && sum < -_math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) ^ (winding & 1);
19899});
19900
19901
19902/***/ }),
19903
19904/***/ "./node_modules/d3-geo/src/projection/albers.js":
19905/*!******************************************************!*\
19906 !*** ./node_modules/d3-geo/src/projection/albers.js ***!
19907 \******************************************************/
19908/*! exports provided: default */
19909/***/ (function(module, __webpack_exports__, __webpack_require__) {
19910
19911"use strict";
19912__webpack_require__.r(__webpack_exports__);
19913/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js");
19914
19915
19916/* harmony default export */ __webpack_exports__["default"] = (function() {
19917 return Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_0__["default"])()
19918 .parallels([29.5, 45.5])
19919 .scale(1070)
19920 .translate([480, 250])
19921 .rotate([96, 0])
19922 .center([-0.6, 38.7]);
19923});
19924
19925
19926/***/ }),
19927
19928/***/ "./node_modules/d3-geo/src/projection/albersUsa.js":
19929/*!*********************************************************!*\
19930 !*** ./node_modules/d3-geo/src/projection/albersUsa.js ***!
19931 \*********************************************************/
19932/*! exports provided: default */
19933/***/ (function(module, __webpack_exports__, __webpack_require__) {
19934
19935"use strict";
19936__webpack_require__.r(__webpack_exports__);
19937/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
19938/* harmony import */ var _albers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./albers.js */ "./node_modules/d3-geo/src/projection/albers.js");
19939/* harmony import */ var _conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./conicEqualArea.js */ "./node_modules/d3-geo/src/projection/conicEqualArea.js");
19940/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js");
19941
19942
19943
19944
19945
19946// The projections must have mutually exclusive clip regions on the sphere,
19947// as this will avoid emitting interleaving lines and polygons.
19948function multiplex(streams) {
19949 var n = streams.length;
19950 return {
19951 point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); },
19952 sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); },
19953 lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); },
19954 lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); },
19955 polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); },
19956 polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); }
19957 };
19958}
19959
19960// A composite projection for the United States, configured by default for
19961// 960×500. The projection also works quite well at 960×600 if you change the
19962// scale to 1285 and adjust the translate accordingly. The set of standard
19963// parallels for each region comes from USGS, which is published here:
19964// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
19965/* harmony default export */ __webpack_exports__["default"] = (function() {
19966 var cache,
19967 cacheStream,
19968 lower48 = Object(_albers_js__WEBPACK_IMPORTED_MODULE_1__["default"])(), lower48Point,
19969 alaska = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338
19970 hawaii = Object(_conicEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["default"])().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007
19971 point, pointStream = {point: function(x, y) { point = [x, y]; }};
19972
19973 function albersUsa(coordinates) {
19974 var x = coordinates[0], y = coordinates[1];
19975 return point = null,
19976 (lower48Point.point(x, y), point)
19977 || (alaskaPoint.point(x, y), point)
19978 || (hawaiiPoint.point(x, y), point);
19979 }
19980
19981 albersUsa.invert = function(coordinates) {
19982 var k = lower48.scale(),
19983 t = lower48.translate(),
19984 x = (coordinates[0] - t[0]) / k,
19985 y = (coordinates[1] - t[1]) / k;
19986 return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska
19987 : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii
19988 : lower48).invert(coordinates);
19989 };
19990
19991 albersUsa.stream = function(stream) {
19992 return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]);
19993 };
19994
19995 albersUsa.precision = function(_) {
19996 if (!arguments.length) return lower48.precision();
19997 lower48.precision(_), alaska.precision(_), hawaii.precision(_);
19998 return reset();
19999 };
20000
20001 albersUsa.scale = function(_) {
20002 if (!arguments.length) return lower48.scale();
20003 lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_);
20004 return albersUsa.translate(lower48.translate());
20005 };
20006
20007 albersUsa.translate = function(_) {
20008 if (!arguments.length) return lower48.translate();
20009 var k = lower48.scale(), x = +_[0], y = +_[1];
20010
20011 lower48Point = lower48
20012 .translate(_)
20013 .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]])
20014 .stream(pointStream);
20015
20016 alaskaPoint = alaska
20017 .translate([x - 0.307 * k, y + 0.201 * k])
20018 .clipExtent([[x - 0.425 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.120 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.214 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]])
20019 .stream(pointStream);
20020
20021 hawaiiPoint = hawaii
20022 .translate([x - 0.205 * k, y + 0.212 * k])
20023 .clipExtent([[x - 0.214 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.166 * k + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]], [x - 0.115 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"], y + 0.234 * k - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]]])
20024 .stream(pointStream);
20025
20026 return reset();
20027 };
20028
20029 albersUsa.fitExtent = function(extent, object) {
20030 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(albersUsa, extent, object);
20031 };
20032
20033 albersUsa.fitSize = function(size, object) {
20034 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(albersUsa, size, object);
20035 };
20036
20037 albersUsa.fitWidth = function(width, object) {
20038 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(albersUsa, width, object);
20039 };
20040
20041 albersUsa.fitHeight = function(height, object) {
20042 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(albersUsa, height, object);
20043 };
20044
20045 function reset() {
20046 cache = cacheStream = null;
20047 return albersUsa;
20048 }
20049
20050 return albersUsa.scale(1070);
20051});
20052
20053
20054/***/ }),
20055
20056/***/ "./node_modules/d3-geo/src/projection/azimuthal.js":
20057/*!*********************************************************!*\
20058 !*** ./node_modules/d3-geo/src/projection/azimuthal.js ***!
20059 \*********************************************************/
20060/*! exports provided: azimuthalRaw, azimuthalInvert */
20061/***/ (function(module, __webpack_exports__, __webpack_require__) {
20062
20063"use strict";
20064__webpack_require__.r(__webpack_exports__);
20065/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalRaw", function() { return azimuthalRaw; });
20066/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalInvert", function() { return azimuthalInvert; });
20067/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20068
20069
20070function azimuthalRaw(scale) {
20071 return function(x, y) {
20072 var cx = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x),
20073 cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y),
20074 k = scale(cx * cy);
20075 return [
20076 k * cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x),
20077 k * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)
20078 ];
20079 }
20080}
20081
20082function azimuthalInvert(angle) {
20083 return function(x, y) {
20084 var z = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + y * y),
20085 c = angle(z),
20086 sc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c),
20087 cc = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(c);
20088 return [
20089 Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x * sc, z * cc),
20090 Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z && y * sc / z)
20091 ];
20092 }
20093}
20094
20095
20096/***/ }),
20097
20098/***/ "./node_modules/d3-geo/src/projection/azimuthalEqualArea.js":
20099/*!******************************************************************!*\
20100 !*** ./node_modules/d3-geo/src/projection/azimuthalEqualArea.js ***!
20101 \******************************************************************/
20102/*! exports provided: azimuthalEqualAreaRaw, default */
20103/***/ (function(module, __webpack_exports__, __webpack_require__) {
20104
20105"use strict";
20106__webpack_require__.r(__webpack_exports__);
20107/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEqualAreaRaw", function() { return azimuthalEqualAreaRaw; });
20108/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20109/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js");
20110/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20111
20112
20113
20114
20115var azimuthalEqualAreaRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(cxcy) {
20116 return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(2 / (1 + cxcy));
20117});
20118
20119azimuthalEqualAreaRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) {
20120 return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(z / 2);
20121});
20122
20123/* harmony default export */ __webpack_exports__["default"] = (function() {
20124 return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEqualAreaRaw)
20125 .scale(124.75)
20126 .clipAngle(180 - 1e-3);
20127});
20128
20129
20130/***/ }),
20131
20132/***/ "./node_modules/d3-geo/src/projection/azimuthalEquidistant.js":
20133/*!********************************************************************!*\
20134 !*** ./node_modules/d3-geo/src/projection/azimuthalEquidistant.js ***!
20135 \********************************************************************/
20136/*! exports provided: azimuthalEquidistantRaw, default */
20137/***/ (function(module, __webpack_exports__, __webpack_require__) {
20138
20139"use strict";
20140__webpack_require__.r(__webpack_exports__);
20141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "azimuthalEquidistantRaw", function() { return azimuthalEquidistantRaw; });
20142/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20143/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js");
20144/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20145
20146
20147
20148
20149var azimuthalEquidistantRaw = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalRaw"])(function(c) {
20150 return (c = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["acos"])(c)) && c / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(c);
20151});
20152
20153azimuthalEquidistantRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) {
20154 return z;
20155});
20156
20157/* harmony default export */ __webpack_exports__["default"] = (function() {
20158 return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(azimuthalEquidistantRaw)
20159 .scale(79.4188)
20160 .clipAngle(180 - 1e-3);
20161});
20162
20163
20164/***/ }),
20165
20166/***/ "./node_modules/d3-geo/src/projection/conic.js":
20167/*!*****************************************************!*\
20168 !*** ./node_modules/d3-geo/src/projection/conic.js ***!
20169 \*****************************************************/
20170/*! exports provided: conicProjection */
20171/***/ (function(module, __webpack_exports__, __webpack_require__) {
20172
20173"use strict";
20174__webpack_require__.r(__webpack_exports__);
20175/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicProjection", function() { return conicProjection; });
20176/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20177/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20178
20179
20180
20181function conicProjection(projectAt) {
20182 var phi0 = 0,
20183 phi1 = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 3,
20184 m = Object(_index_js__WEBPACK_IMPORTED_MODULE_1__["projectionMutator"])(projectAt),
20185 p = m(phi0, phi1);
20186
20187 p.parallels = function(_) {
20188 return arguments.length ? m(phi0 = _[0] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"], phi1 = _[1] * _math_js__WEBPACK_IMPORTED_MODULE_0__["radians"]) : [phi0 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"], phi1 * _math_js__WEBPACK_IMPORTED_MODULE_0__["degrees"]];
20189 };
20190
20191 return p;
20192}
20193
20194
20195/***/ }),
20196
20197/***/ "./node_modules/d3-geo/src/projection/conicConformal.js":
20198/*!**************************************************************!*\
20199 !*** ./node_modules/d3-geo/src/projection/conicConformal.js ***!
20200 \**************************************************************/
20201/*! exports provided: conicConformalRaw, default */
20202/***/ (function(module, __webpack_exports__, __webpack_require__) {
20203
20204"use strict";
20205__webpack_require__.r(__webpack_exports__);
20206/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicConformalRaw", function() { return conicConformalRaw; });
20207/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20208/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js");
20209/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js");
20210
20211
20212
20213
20214function tany(y) {
20215 return Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + y) / 2);
20216}
20217
20218function conicConformalRaw(y0, y1) {
20219 var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0),
20220 n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(cy0 / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(tany(y1) / tany(y0)),
20221 f = cy0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y0), n) / n;
20222
20223 if (!n) return _mercator_js__WEBPACK_IMPORTED_MODULE_2__["mercatorRaw"];
20224
20225 function project(x, y) {
20226 if (f > 0) { if (y < -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = -_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; }
20227 else { if (y > _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) y = _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] - _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]; }
20228 var r = f / Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(tany(y), n);
20229 return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(n * x), f - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(n * x)];
20230 }
20231
20232 project.invert = function(x, y) {
20233 var fy = f - y, r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + fy * fy);
20234 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(fy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(fy), 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["pow"])(f / r, 1 / n)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]];
20235 };
20236
20237 return project;
20238}
20239
20240/* harmony default export */ __webpack_exports__["default"] = (function() {
20241 return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicConformalRaw)
20242 .scale(109.5)
20243 .parallels([30, 30]);
20244});
20245
20246
20247/***/ }),
20248
20249/***/ "./node_modules/d3-geo/src/projection/conicEqualArea.js":
20250/*!**************************************************************!*\
20251 !*** ./node_modules/d3-geo/src/projection/conicEqualArea.js ***!
20252 \**************************************************************/
20253/*! exports provided: conicEqualAreaRaw, default */
20254/***/ (function(module, __webpack_exports__, __webpack_require__) {
20255
20256"use strict";
20257__webpack_require__.r(__webpack_exports__);
20258/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEqualAreaRaw", function() { return conicEqualAreaRaw; });
20259/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20260/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js");
20261/* harmony import */ var _cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cylindricalEqualArea.js */ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js");
20262
20263
20264
20265
20266function conicEqualAreaRaw(y0, y1) {
20267 var sy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0), n = (sy0 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y1)) / 2;
20268
20269 // Are the parallels symmetrical around the Equator?
20270 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return Object(_cylindricalEqualArea_js__WEBPACK_IMPORTED_MODULE_2__["cylindricalEqualAreaRaw"])(y0);
20271
20272 var c = 1 + sy0 * (2 * n - sy0), r0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c) / n;
20273
20274 function project(x, y) {
20275 var r = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(c - 2 * n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)) / n;
20276 return [r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x *= n), r0 - r * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x)];
20277 }
20278
20279 project.invert = function(x, y) {
20280 var r0y = r0 - y;
20281 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(r0y)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(r0y), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])((c - (x * x + r0y * r0y) * n * n) / (2 * n))];
20282 };
20283
20284 return project;
20285}
20286
20287/* harmony default export */ __webpack_exports__["default"] = (function() {
20288 return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEqualAreaRaw)
20289 .scale(155.424)
20290 .center([0, 33.6442]);
20291});
20292
20293
20294/***/ }),
20295
20296/***/ "./node_modules/d3-geo/src/projection/conicEquidistant.js":
20297/*!****************************************************************!*\
20298 !*** ./node_modules/d3-geo/src/projection/conicEquidistant.js ***!
20299 \****************************************************************/
20300/*! exports provided: conicEquidistantRaw, default */
20301/***/ (function(module, __webpack_exports__, __webpack_require__) {
20302
20303"use strict";
20304__webpack_require__.r(__webpack_exports__);
20305/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conicEquidistantRaw", function() { return conicEquidistantRaw; });
20306/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20307/* harmony import */ var _conic_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./conic.js */ "./node_modules/d3-geo/src/projection/conic.js");
20308/* harmony import */ var _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equirectangular.js */ "./node_modules/d3-geo/src/projection/equirectangular.js");
20309
20310
20311
20312
20313function conicEquidistantRaw(y0, y1) {
20314 var cy0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y0),
20315 n = y0 === y1 ? Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y0) : (cy0 - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y1)) / (y1 - y0),
20316 g = cy0 / n + y0;
20317
20318 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(n) < _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) return _equirectangular_js__WEBPACK_IMPORTED_MODULE_2__["equirectangularRaw"];
20319
20320 function project(x, y) {
20321 var gy = g - y, nx = n * x;
20322 return [gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(nx), g - gy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(nx)];
20323 }
20324
20325 project.invert = function(x, y) {
20326 var gy = g - y;
20327 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan2"])(x, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["abs"])(gy)) / n * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(gy), g - Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sign"])(n) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sqrt"])(x * x + gy * gy)];
20328 };
20329
20330 return project;
20331}
20332
20333/* harmony default export */ __webpack_exports__["default"] = (function() {
20334 return Object(_conic_js__WEBPACK_IMPORTED_MODULE_1__["conicProjection"])(conicEquidistantRaw)
20335 .scale(131.154)
20336 .center([0, 13.9389]);
20337});
20338
20339
20340/***/ }),
20341
20342/***/ "./node_modules/d3-geo/src/projection/cylindricalEqualArea.js":
20343/*!********************************************************************!*\
20344 !*** ./node_modules/d3-geo/src/projection/cylindricalEqualArea.js ***!
20345 \********************************************************************/
20346/*! exports provided: cylindricalEqualAreaRaw */
20347/***/ (function(module, __webpack_exports__, __webpack_require__) {
20348
20349"use strict";
20350__webpack_require__.r(__webpack_exports__);
20351/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cylindricalEqualAreaRaw", function() { return cylindricalEqualAreaRaw; });
20352/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20353
20354
20355function cylindricalEqualAreaRaw(phi0) {
20356 var cosPhi0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(phi0);
20357
20358 function forward(lambda, phi) {
20359 return [lambda * cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(phi) / cosPhi0];
20360 }
20361
20362 forward.invert = function(x, y) {
20363 return [x / cosPhi0, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"])(y * cosPhi0)];
20364 };
20365
20366 return forward;
20367}
20368
20369
20370/***/ }),
20371
20372/***/ "./node_modules/d3-geo/src/projection/equalEarth.js":
20373/*!**********************************************************!*\
20374 !*** ./node_modules/d3-geo/src/projection/equalEarth.js ***!
20375 \**********************************************************/
20376/*! exports provided: equalEarthRaw, default */
20377/***/ (function(module, __webpack_exports__, __webpack_require__) {
20378
20379"use strict";
20380__webpack_require__.r(__webpack_exports__);
20381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equalEarthRaw", function() { return equalEarthRaw; });
20382/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20383/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20384
20385
20386
20387var A1 = 1.340264,
20388 A2 = -0.081106,
20389 A3 = 0.000893,
20390 A4 = 0.003796,
20391 M = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(3) / 2,
20392 iterations = 12;
20393
20394function equalEarthRaw(lambda, phi) {
20395 var l = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(M * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi)), l2 = l * l, l6 = l2 * l2 * l2;
20396 return [
20397 lambda * Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))),
20398 l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2))
20399 ];
20400}
20401
20402equalEarthRaw.invert = function(x, y) {
20403 var l = y, l2 = l * l, l6 = l2 * l2 * l2;
20404 for (var i = 0, delta, fy, fpy; i < iterations; ++i) {
20405 fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y;
20406 fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2);
20407 l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2;
20408 if (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) break;
20409 }
20410 return [
20411 M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(l),
20412 Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(l) / M)
20413 ];
20414};
20415
20416/* harmony default export */ __webpack_exports__["default"] = (function() {
20417 return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equalEarthRaw)
20418 .scale(177.158);
20419});
20420
20421
20422/***/ }),
20423
20424/***/ "./node_modules/d3-geo/src/projection/equirectangular.js":
20425/*!***************************************************************!*\
20426 !*** ./node_modules/d3-geo/src/projection/equirectangular.js ***!
20427 \***************************************************************/
20428/*! exports provided: equirectangularRaw, default */
20429/***/ (function(module, __webpack_exports__, __webpack_require__) {
20430
20431"use strict";
20432__webpack_require__.r(__webpack_exports__);
20433/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "equirectangularRaw", function() { return equirectangularRaw; });
20434/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20435
20436
20437function equirectangularRaw(lambda, phi) {
20438 return [lambda, phi];
20439}
20440
20441equirectangularRaw.invert = equirectangularRaw;
20442
20443/* harmony default export */ __webpack_exports__["default"] = (function() {
20444 return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(equirectangularRaw)
20445 .scale(152.63);
20446});
20447
20448
20449/***/ }),
20450
20451/***/ "./node_modules/d3-geo/src/projection/fit.js":
20452/*!***************************************************!*\
20453 !*** ./node_modules/d3-geo/src/projection/fit.js ***!
20454 \***************************************************/
20455/*! exports provided: fitExtent, fitSize, fitWidth, fitHeight */
20456/***/ (function(module, __webpack_exports__, __webpack_require__) {
20457
20458"use strict";
20459__webpack_require__.r(__webpack_exports__);
20460/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitExtent", function() { return fitExtent; });
20461/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitSize", function() { return fitSize; });
20462/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitWidth", function() { return fitWidth; });
20463/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fitHeight", function() { return fitHeight; });
20464/* harmony import */ var _stream_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../stream.js */ "./node_modules/d3-geo/src/stream.js");
20465/* harmony import */ var _path_bounds_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../path/bounds.js */ "./node_modules/d3-geo/src/path/bounds.js");
20466
20467
20468
20469function fit(projection, fitBounds, object) {
20470 var clip = projection.clipExtent && projection.clipExtent();
20471 projection.scale(150).translate([0, 0]);
20472 if (clip != null) projection.clipExtent(null);
20473 Object(_stream_js__WEBPACK_IMPORTED_MODULE_0__["default"])(object, projection.stream(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"]));
20474 fitBounds(_path_bounds_js__WEBPACK_IMPORTED_MODULE_1__["default"].result());
20475 if (clip != null) projection.clipExtent(clip);
20476 return projection;
20477}
20478
20479function fitExtent(projection, extent, object) {
20480 return fit(projection, function(b) {
20481 var w = extent[1][0] - extent[0][0],
20482 h = extent[1][1] - extent[0][1],
20483 k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])),
20484 x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2,
20485 y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2;
20486 projection.scale(150 * k).translate([x, y]);
20487 }, object);
20488}
20489
20490function fitSize(projection, size, object) {
20491 return fitExtent(projection, [[0, 0], size], object);
20492}
20493
20494function fitWidth(projection, width, object) {
20495 return fit(projection, function(b) {
20496 var w = +width,
20497 k = w / (b[1][0] - b[0][0]),
20498 x = (w - k * (b[1][0] + b[0][0])) / 2,
20499 y = -k * b[0][1];
20500 projection.scale(150 * k).translate([x, y]);
20501 }, object);
20502}
20503
20504function fitHeight(projection, height, object) {
20505 return fit(projection, function(b) {
20506 var h = +height,
20507 k = h / (b[1][1] - b[0][1]),
20508 x = -k * b[0][0],
20509 y = (h - k * (b[1][1] + b[0][1])) / 2;
20510 projection.scale(150 * k).translate([x, y]);
20511 }, object);
20512}
20513
20514
20515/***/ }),
20516
20517/***/ "./node_modules/d3-geo/src/projection/gnomonic.js":
20518/*!********************************************************!*\
20519 !*** ./node_modules/d3-geo/src/projection/gnomonic.js ***!
20520 \********************************************************/
20521/*! exports provided: gnomonicRaw, default */
20522/***/ (function(module, __webpack_exports__, __webpack_require__) {
20523
20524"use strict";
20525__webpack_require__.r(__webpack_exports__);
20526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gnomonicRaw", function() { return gnomonicRaw; });
20527/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20528/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js");
20529/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20530
20531
20532
20533
20534function gnomonicRaw(x, y) {
20535 var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy;
20536 return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k];
20537}
20538
20539gnomonicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"]);
20540
20541/* harmony default export */ __webpack_exports__["default"] = (function() {
20542 return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(gnomonicRaw)
20543 .scale(144.049)
20544 .clipAngle(60);
20545});
20546
20547
20548/***/ }),
20549
20550/***/ "./node_modules/d3-geo/src/projection/identity.js":
20551/*!********************************************************!*\
20552 !*** ./node_modules/d3-geo/src/projection/identity.js ***!
20553 \********************************************************/
20554/*! exports provided: default */
20555/***/ (function(module, __webpack_exports__, __webpack_require__) {
20556
20557"use strict";
20558__webpack_require__.r(__webpack_exports__);
20559/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js");
20560/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js");
20561/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js");
20562/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js");
20563
20564
20565
20566
20567
20568function scaleTranslate(kx, ky, tx, ty) {
20569 return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] : Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({
20570 point: function(x, y) {
20571 this.stream.point(x * kx + tx, y * ky + ty);
20572 }
20573 });
20574}
20575
20576/* harmony default export */ __webpack_exports__["default"] = (function() {
20577 var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, transform = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"], // scale, translate and reflect
20578 x0 = null, y0, x1, y1, // clip extent
20579 postclip = _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"],
20580 cache,
20581 cacheStream,
20582 projection;
20583
20584 function reset() {
20585 cache = cacheStream = null;
20586 return projection;
20587 }
20588
20589 return projection = {
20590 stream: function(stream) {
20591 return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream));
20592 },
20593 postclip: function(_) {
20594 return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
20595 },
20596 clipExtent: function(_) {
20597 return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
20598 },
20599 scale: function(_) {
20600 return arguments.length ? (transform = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k;
20601 },
20602 translate: function(_) {
20603 return arguments.length ? (transform = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty];
20604 },
20605 reflectX: function(_) {
20606 return arguments.length ? (transform = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0;
20607 },
20608 reflectY: function(_) {
20609 return arguments.length ? (transform = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0;
20610 },
20611 fitExtent: function(extent, object) {
20612 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitExtent"])(projection, extent, object);
20613 },
20614 fitSize: function(size, object) {
20615 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitSize"])(projection, size, object);
20616 },
20617 fitWidth: function(width, object) {
20618 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitWidth"])(projection, width, object);
20619 },
20620 fitHeight: function(height, object) {
20621 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_3__["fitHeight"])(projection, height, object);
20622 }
20623 };
20624});
20625
20626
20627/***/ }),
20628
20629/***/ "./node_modules/d3-geo/src/projection/index.js":
20630/*!*****************************************************!*\
20631 !*** ./node_modules/d3-geo/src/projection/index.js ***!
20632 \*****************************************************/
20633/*! exports provided: default, projectionMutator */
20634/***/ (function(module, __webpack_exports__, __webpack_require__) {
20635
20636"use strict";
20637__webpack_require__.r(__webpack_exports__);
20638/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return projection; });
20639/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "projectionMutator", function() { return projectionMutator; });
20640/* harmony import */ var _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../clip/antimeridian.js */ "./node_modules/d3-geo/src/clip/antimeridian.js");
20641/* harmony import */ var _clip_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../clip/circle.js */ "./node_modules/d3-geo/src/clip/circle.js");
20642/* harmony import */ var _clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../clip/rectangle.js */ "./node_modules/d3-geo/src/clip/rectangle.js");
20643/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../compose.js */ "./node_modules/d3-geo/src/compose.js");
20644/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../identity.js */ "./node_modules/d3-geo/src/identity.js");
20645/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20646/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js");
20647/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js");
20648/* harmony import */ var _fit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./fit.js */ "./node_modules/d3-geo/src/projection/fit.js");
20649/* harmony import */ var _resample_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./resample.js */ "./node_modules/d3-geo/src/projection/resample.js");
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661var transformRadians = Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({
20662 point: function(x, y) {
20663 this.stream.point(x * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], y * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]);
20664 }
20665});
20666
20667function transformRotate(rotate) {
20668 return Object(_transform_js__WEBPACK_IMPORTED_MODULE_7__["transformer"])({
20669 point: function(x, y) {
20670 var r = rotate(x, y);
20671 return this.stream.point(r[0], r[1]);
20672 }
20673 });
20674}
20675
20676function scaleTranslate(k, dx, dy) {
20677 function transform(x, y) {
20678 return [dx + k * x, dy - k * y];
20679 }
20680 transform.invert = function(x, y) {
20681 return [(x - dx) / k, (dy - y) / k];
20682 };
20683 return transform;
20684}
20685
20686function scaleTranslateRotate(k, dx, dy, alpha) {
20687 var cosAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["cos"])(alpha),
20688 sinAlpha = Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sin"])(alpha),
20689 a = cosAlpha * k,
20690 b = sinAlpha * k,
20691 ai = cosAlpha / k,
20692 bi = sinAlpha / k,
20693 ci = (sinAlpha * dy - cosAlpha * dx) / k,
20694 fi = (sinAlpha * dx + cosAlpha * dy) / k;
20695 function transform(x, y) {
20696 return [a * x - b * y + dx, dy - b * x - a * y];
20697 }
20698 transform.invert = function(x, y) {
20699 return [ai * x - bi * y + ci, fi - bi * x - ai * y];
20700 };
20701 return transform;
20702}
20703
20704function projection(project) {
20705 return projectionMutator(function() { return project; })();
20706}
20707
20708function projectionMutator(projectAt) {
20709 var project,
20710 k = 150, // scale
20711 x = 480, y = 250, // translate
20712 lambda = 0, phi = 0, // center
20713 deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate
20714 alpha = 0, // post-rotate
20715 theta = null, preclip = _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"], // pre-clip angle
20716 x0 = null, y0, x1, y1, postclip = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], // post-clip extent
20717 delta2 = 0.5, // precision
20718 projectResample,
20719 projectTransform,
20720 projectRotateTransform,
20721 cache,
20722 cacheStream;
20723
20724 function projection(point) {
20725 return projectRotateTransform(point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]);
20726 }
20727
20728 function invert(point) {
20729 point = projectRotateTransform.invert(point[0], point[1]);
20730 return point && [point[0] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], point[1] * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]];
20731 }
20732
20733 projection.stream = function(stream) {
20734 return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));
20735 };
20736
20737 projection.preclip = function(_) {
20738 return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip;
20739 };
20740
20741 projection.postclip = function(_) {
20742 return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip;
20743 };
20744
20745 projection.clipAngle = function(_) {
20746 return arguments.length ? (preclip = +_ ? Object(_clip_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"])(theta = _ * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"]) : (theta = null, _clip_antimeridian_js__WEBPACK_IMPORTED_MODULE_0__["default"]), reset()) : theta * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"];
20747 };
20748
20749 projection.clipExtent = function(_) {
20750 return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"]) : Object(_clip_rectangle_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
20751 };
20752
20753 projection.scale = function(_) {
20754 return arguments.length ? (k = +_, recenter()) : k;
20755 };
20756
20757 projection.translate = function(_) {
20758 return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y];
20759 };
20760
20761 projection.center = function(_) {
20762 return arguments.length ? (lambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], phi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : [lambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], phi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]];
20763 };
20764
20765 projection.rotate = function(_) {
20766 return arguments.length ? (deltaLambda = _[0] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaPhi = _[1] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], deltaGamma = _.length > 2 ? _[2] % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"] : 0, recenter()) : [deltaLambda * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaPhi * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"], deltaGamma * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"]];
20767 };
20768
20769 projection.angle = function(_) {
20770 return arguments.length ? (alpha = _ % 360 * _math_js__WEBPACK_IMPORTED_MODULE_5__["radians"], recenter()) : alpha * _math_js__WEBPACK_IMPORTED_MODULE_5__["degrees"];
20771 };
20772
20773 projection.precision = function(_) {
20774 return arguments.length ? (projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2 = _ * _), reset()) : Object(_math_js__WEBPACK_IMPORTED_MODULE_5__["sqrt"])(delta2);
20775 };
20776
20777 projection.fitExtent = function(extent, object) {
20778 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitExtent"])(projection, extent, object);
20779 };
20780
20781 projection.fitSize = function(size, object) {
20782 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitSize"])(projection, size, object);
20783 };
20784
20785 projection.fitWidth = function(width, object) {
20786 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitWidth"])(projection, width, object);
20787 };
20788
20789 projection.fitHeight = function(height, object) {
20790 return Object(_fit_js__WEBPACK_IMPORTED_MODULE_8__["fitHeight"])(projection, height, object);
20791 };
20792
20793 function recenter() {
20794 var center = scaleTranslateRotate(k, 0, 0, alpha).apply(null, project(lambda, phi)),
20795 transform = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], alpha);
20796 rotate = Object(_rotation_js__WEBPACK_IMPORTED_MODULE_6__["rotateRadians"])(deltaLambda, deltaPhi, deltaGamma);
20797 projectTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(project, transform);
20798 projectRotateTransform = Object(_compose_js__WEBPACK_IMPORTED_MODULE_3__["default"])(rotate, projectTransform);
20799 projectResample = Object(_resample_js__WEBPACK_IMPORTED_MODULE_9__["default"])(projectTransform, delta2);
20800 return reset();
20801 }
20802
20803 function reset() {
20804 cache = cacheStream = null;
20805 return projection;
20806 }
20807
20808 return function() {
20809 project = projectAt.apply(this, arguments);
20810 projection.invert = project.invert && invert;
20811 return recenter();
20812 };
20813}
20814
20815
20816/***/ }),
20817
20818/***/ "./node_modules/d3-geo/src/projection/mercator.js":
20819/*!********************************************************!*\
20820 !*** ./node_modules/d3-geo/src/projection/mercator.js ***!
20821 \********************************************************/
20822/*! exports provided: mercatorRaw, default, mercatorProjection */
20823/***/ (function(module, __webpack_exports__, __webpack_require__) {
20824
20825"use strict";
20826__webpack_require__.r(__webpack_exports__);
20827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorRaw", function() { return mercatorRaw; });
20828/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mercatorProjection", function() { return mercatorProjection; });
20829/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20830/* harmony import */ var _rotation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../rotation.js */ "./node_modules/d3-geo/src/rotation.js");
20831/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20832
20833
20834
20835
20836function mercatorRaw(lambda, phi) {
20837 return [lambda, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2))];
20838}
20839
20840mercatorRaw.invert = function(x, y) {
20841 return [x, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(y)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]];
20842};
20843
20844/* harmony default export */ __webpack_exports__["default"] = (function() {
20845 return mercatorProjection(mercatorRaw)
20846 .scale(961 / _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]);
20847});
20848
20849function mercatorProjection(project) {
20850 var m = Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(project),
20851 center = m.center,
20852 scale = m.scale,
20853 translate = m.translate,
20854 clipExtent = m.clipExtent,
20855 x0 = null, y0, x1, y1; // clip extent
20856
20857 m.scale = function(_) {
20858 return arguments.length ? (scale(_), reclip()) : scale();
20859 };
20860
20861 m.translate = function(_) {
20862 return arguments.length ? (translate(_), reclip()) : translate();
20863 };
20864
20865 m.center = function(_) {
20866 return arguments.length ? (center(_), reclip()) : center();
20867 };
20868
20869 m.clipExtent = function(_) {
20870 return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]];
20871 };
20872
20873 function reclip() {
20874 var k = _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] * scale(),
20875 t = m(Object(_rotation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m.rotate()).invert([0, 0]));
20876 return clipExtent(x0 == null
20877 ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw
20878 ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]]
20879 : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]);
20880 }
20881
20882 return reclip();
20883}
20884
20885
20886/***/ }),
20887
20888/***/ "./node_modules/d3-geo/src/projection/naturalEarth1.js":
20889/*!*************************************************************!*\
20890 !*** ./node_modules/d3-geo/src/projection/naturalEarth1.js ***!
20891 \*************************************************************/
20892/*! exports provided: naturalEarth1Raw, default */
20893/***/ (function(module, __webpack_exports__, __webpack_require__) {
20894
20895"use strict";
20896__webpack_require__.r(__webpack_exports__);
20897/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "naturalEarth1Raw", function() { return naturalEarth1Raw; });
20898/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20899/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20900
20901
20902
20903function naturalEarth1Raw(lambda, phi) {
20904 var phi2 = phi * phi, phi4 = phi2 * phi2;
20905 return [
20906 lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))),
20907 phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4)))
20908 ];
20909}
20910
20911naturalEarth1Raw.invert = function(x, y) {
20912 var phi = y, i = 25, delta;
20913 do {
20914 var phi2 = phi * phi, phi4 = phi2 * phi2;
20915 phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) /
20916 (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4)));
20917 } while (Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(delta) > _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && --i > 0);
20918 return [
20919 x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))),
20920 phi
20921 ];
20922};
20923
20924/* harmony default export */ __webpack_exports__["default"] = (function() {
20925 return Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])(naturalEarth1Raw)
20926 .scale(175.295);
20927});
20928
20929
20930/***/ }),
20931
20932/***/ "./node_modules/d3-geo/src/projection/orthographic.js":
20933/*!************************************************************!*\
20934 !*** ./node_modules/d3-geo/src/projection/orthographic.js ***!
20935 \************************************************************/
20936/*! exports provided: orthographicRaw, default */
20937/***/ (function(module, __webpack_exports__, __webpack_require__) {
20938
20939"use strict";
20940__webpack_require__.r(__webpack_exports__);
20941/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "orthographicRaw", function() { return orthographicRaw; });
20942/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20943/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js");
20944/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
20945
20946
20947
20948
20949function orthographicRaw(x, y) {
20950 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y) * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x), Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y)];
20951}
20952
20953orthographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(_math_js__WEBPACK_IMPORTED_MODULE_0__["asin"]);
20954
20955/* harmony default export */ __webpack_exports__["default"] = (function() {
20956 return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(orthographicRaw)
20957 .scale(249.5)
20958 .clipAngle(90 + _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]);
20959});
20960
20961
20962/***/ }),
20963
20964/***/ "./node_modules/d3-geo/src/projection/resample.js":
20965/*!********************************************************!*\
20966 !*** ./node_modules/d3-geo/src/projection/resample.js ***!
20967 \********************************************************/
20968/*! exports provided: default */
20969/***/ (function(module, __webpack_exports__, __webpack_require__) {
20970
20971"use strict";
20972__webpack_require__.r(__webpack_exports__);
20973/* harmony import */ var _cartesian_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cartesian.js */ "./node_modules/d3-geo/src/cartesian.js");
20974/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
20975/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../transform.js */ "./node_modules/d3-geo/src/transform.js");
20976
20977
20978
20979
20980var maxDepth = 16, // maximum depth of subdivision
20981 cosMinDistance = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(30 * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]); // cos(minimum angular distance)
20982
20983/* harmony default export */ __webpack_exports__["default"] = (function(project, delta2) {
20984 return +delta2 ? resample(project, delta2) : resampleNone(project);
20985});
20986
20987function resampleNone(project) {
20988 return Object(_transform_js__WEBPACK_IMPORTED_MODULE_2__["transformer"])({
20989 point: function(x, y) {
20990 x = project(x, y);
20991 this.stream.point(x[0], x[1]);
20992 }
20993 });
20994}
20995
20996function resample(project, delta2) {
20997
20998 function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) {
20999 var dx = x1 - x0,
21000 dy = y1 - y0,
21001 d2 = dx * dx + dy * dy;
21002 if (d2 > 4 * delta2 && depth--) {
21003 var a = a0 + a1,
21004 b = b0 + b1,
21005 c = c0 + c1,
21006 m = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sqrt"])(a * a + b * b + c * c),
21007 phi2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(c /= m),
21008 lambda2 = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(c) - 1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda0 - lambda1) < _math_js__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? (lambda0 + lambda1) / 2 : Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(b, a),
21009 p = project(lambda2, phi2),
21010 x2 = p[0],
21011 y2 = p[1],
21012 dx2 = x2 - x0,
21013 dy2 = y2 - y0,
21014 dz = dy * dx2 - dx * dy2;
21015 if (dz * dz / d2 > delta2 // perpendicular projected distance
21016 || Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end
21017 || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance
21018 resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream);
21019 stream.point(x2, y2);
21020 resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream);
21021 }
21022 }
21023 }
21024 return function(stream) {
21025 var lambda00, x00, y00, a00, b00, c00, // first point
21026 lambda0, x0, y0, a0, b0, c0; // previous point
21027
21028 var resampleStream = {
21029 point: point,
21030 lineStart: lineStart,
21031 lineEnd: lineEnd,
21032 polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; },
21033 polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; }
21034 };
21035
21036 function point(x, y) {
21037 x = project(x, y);
21038 stream.point(x[0], x[1]);
21039 }
21040
21041 function lineStart() {
21042 x0 = NaN;
21043 resampleStream.point = linePoint;
21044 stream.lineStart();
21045 }
21046
21047 function linePoint(lambda, phi) {
21048 var c = Object(_cartesian_js__WEBPACK_IMPORTED_MODULE_0__["cartesian"])([lambda, phi]), p = project(lambda, phi);
21049 resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
21050 stream.point(x0, y0);
21051 }
21052
21053 function lineEnd() {
21054 resampleStream.point = point;
21055 stream.lineEnd();
21056 }
21057
21058 function ringStart() {
21059 lineStart();
21060 resampleStream.point = ringPoint;
21061 resampleStream.lineEnd = ringEnd;
21062 }
21063
21064 function ringPoint(lambda, phi) {
21065 linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
21066 resampleStream.point = linePoint;
21067 }
21068
21069 function ringEnd() {
21070 resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream);
21071 resampleStream.lineEnd = lineEnd;
21072 lineEnd();
21073 }
21074
21075 return resampleStream;
21076 };
21077}
21078
21079
21080/***/ }),
21081
21082/***/ "./node_modules/d3-geo/src/projection/stereographic.js":
21083/*!*************************************************************!*\
21084 !*** ./node_modules/d3-geo/src/projection/stereographic.js ***!
21085 \*************************************************************/
21086/*! exports provided: stereographicRaw, default */
21087/***/ (function(module, __webpack_exports__, __webpack_require__) {
21088
21089"use strict";
21090__webpack_require__.r(__webpack_exports__);
21091/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stereographicRaw", function() { return stereographicRaw; });
21092/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
21093/* harmony import */ var _azimuthal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./azimuthal.js */ "./node_modules/d3-geo/src/projection/azimuthal.js");
21094/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-geo/src/projection/index.js");
21095
21096
21097
21098
21099function stereographicRaw(x, y) {
21100 var cy = Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(y), k = 1 + Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["cos"])(x) * cy;
21101 return [cy * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(x) / k, Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["sin"])(y) / k];
21102}
21103
21104stereographicRaw.invert = Object(_azimuthal_js__WEBPACK_IMPORTED_MODULE_1__["azimuthalInvert"])(function(z) {
21105 return 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(z);
21106});
21107
21108/* harmony default export */ __webpack_exports__["default"] = (function() {
21109 return Object(_index_js__WEBPACK_IMPORTED_MODULE_2__["default"])(stereographicRaw)
21110 .scale(250)
21111 .clipAngle(142);
21112});
21113
21114
21115/***/ }),
21116
21117/***/ "./node_modules/d3-geo/src/projection/transverseMercator.js":
21118/*!******************************************************************!*\
21119 !*** ./node_modules/d3-geo/src/projection/transverseMercator.js ***!
21120 \******************************************************************/
21121/*! exports provided: transverseMercatorRaw, default */
21122/***/ (function(module, __webpack_exports__, __webpack_require__) {
21123
21124"use strict";
21125__webpack_require__.r(__webpack_exports__);
21126/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transverseMercatorRaw", function() { return transverseMercatorRaw; });
21127/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-geo/src/math.js");
21128/* harmony import */ var _mercator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mercator.js */ "./node_modules/d3-geo/src/projection/mercator.js");
21129
21130
21131
21132function transverseMercatorRaw(lambda, phi) {
21133 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["log"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["tan"])((_math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"] + phi) / 2)), -lambda];
21134}
21135
21136transverseMercatorRaw.invert = function(x, y) {
21137 return [-y, 2 * Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["atan"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_0__["exp"])(x)) - _math_js__WEBPACK_IMPORTED_MODULE_0__["halfPi"]];
21138};
21139
21140/* harmony default export */ __webpack_exports__["default"] = (function() {
21141 var m = Object(_mercator_js__WEBPACK_IMPORTED_MODULE_1__["mercatorProjection"])(transverseMercatorRaw),
21142 center = m.center,
21143 rotate = m.rotate;
21144
21145 m.center = function(_) {
21146 return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]);
21147 };
21148
21149 m.rotate = function(_) {
21150 return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]);
21151 };
21152
21153 return rotate([0, 0, 90])
21154 .scale(159.155);
21155});
21156
21157
21158/***/ }),
21159
21160/***/ "./node_modules/d3-geo/src/rotation.js":
21161/*!*********************************************!*\
21162 !*** ./node_modules/d3-geo/src/rotation.js ***!
21163 \*********************************************/
21164/*! exports provided: rotateRadians, default */
21165/***/ (function(module, __webpack_exports__, __webpack_require__) {
21166
21167"use strict";
21168__webpack_require__.r(__webpack_exports__);
21169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rotateRadians", function() { return rotateRadians; });
21170/* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./compose.js */ "./node_modules/d3-geo/src/compose.js");
21171/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-geo/src/math.js");
21172
21173
21174
21175function rotationIdentity(lambda, phi) {
21176 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["abs"])(lambda) > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + Math.round(-lambda / _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) * _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi];
21177}
21178
21179rotationIdentity.invert = rotationIdentity;
21180
21181function rotateRadians(deltaLambda, deltaPhi, deltaGamma) {
21182 return (deltaLambda %= _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"]) ? (deltaPhi || deltaGamma ? Object(_compose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma))
21183 : rotationLambda(deltaLambda))
21184 : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma)
21185 : rotationIdentity);
21186}
21187
21188function forwardRotationLambda(deltaLambda) {
21189 return function(lambda, phi) {
21190 return lambda += deltaLambda, [lambda > _math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda - _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda < -_math_js__WEBPACK_IMPORTED_MODULE_1__["pi"] ? lambda + _math_js__WEBPACK_IMPORTED_MODULE_1__["tau"] : lambda, phi];
21191 };
21192}
21193
21194function rotationLambda(deltaLambda) {
21195 var rotation = forwardRotationLambda(deltaLambda);
21196 rotation.invert = forwardRotationLambda(-deltaLambda);
21197 return rotation;
21198}
21199
21200function rotationPhiGamma(deltaPhi, deltaGamma) {
21201 var cosDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaPhi),
21202 sinDeltaPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaPhi),
21203 cosDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(deltaGamma),
21204 sinDeltaGamma = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(deltaGamma);
21205
21206 function rotation(lambda, phi) {
21207 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi),
21208 x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi,
21209 y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi,
21210 z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi),
21211 k = z * cosDeltaPhi + x * sinDeltaPhi;
21212 return [
21213 Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi),
21214 Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaGamma + y * sinDeltaGamma)
21215 ];
21216 }
21217
21218 rotation.invert = function(lambda, phi) {
21219 var cosPhi = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(phi),
21220 x = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["cos"])(lambda) * cosPhi,
21221 y = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(lambda) * cosPhi,
21222 z = Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["sin"])(phi),
21223 k = z * cosDeltaGamma - y * sinDeltaGamma;
21224 return [
21225 Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["atan2"])(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi),
21226 Object(_math_js__WEBPACK_IMPORTED_MODULE_1__["asin"])(k * cosDeltaPhi - x * sinDeltaPhi)
21227 ];
21228 };
21229
21230 return rotation;
21231}
21232
21233/* harmony default export */ __webpack_exports__["default"] = (function(rotate) {
21234 rotate = rotateRadians(rotate[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], rotate.length > 2 ? rotate[2] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"] : 0);
21235
21236 function forward(coordinates) {
21237 coordinates = rotate(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]);
21238 return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates;
21239 }
21240
21241 forward.invert = function(coordinates) {
21242 coordinates = rotate.invert(coordinates[0] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"], coordinates[1] * _math_js__WEBPACK_IMPORTED_MODULE_1__["radians"]);
21243 return coordinates[0] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates[1] *= _math_js__WEBPACK_IMPORTED_MODULE_1__["degrees"], coordinates;
21244 };
21245
21246 return forward;
21247});
21248
21249
21250/***/ }),
21251
21252/***/ "./node_modules/d3-geo/src/stream.js":
21253/*!*******************************************!*\
21254 !*** ./node_modules/d3-geo/src/stream.js ***!
21255 \*******************************************/
21256/*! exports provided: default */
21257/***/ (function(module, __webpack_exports__, __webpack_require__) {
21258
21259"use strict";
21260__webpack_require__.r(__webpack_exports__);
21261function streamGeometry(geometry, stream) {
21262 if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
21263 streamGeometryType[geometry.type](geometry, stream);
21264 }
21265}
21266
21267var streamObjectType = {
21268 Feature: function(object, stream) {
21269 streamGeometry(object.geometry, stream);
21270 },
21271 FeatureCollection: function(object, stream) {
21272 var features = object.features, i = -1, n = features.length;
21273 while (++i < n) streamGeometry(features[i].geometry, stream);
21274 }
21275};
21276
21277var streamGeometryType = {
21278 Sphere: function(object, stream) {
21279 stream.sphere();
21280 },
21281 Point: function(object, stream) {
21282 object = object.coordinates;
21283 stream.point(object[0], object[1], object[2]);
21284 },
21285 MultiPoint: function(object, stream) {
21286 var coordinates = object.coordinates, i = -1, n = coordinates.length;
21287 while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]);
21288 },
21289 LineString: function(object, stream) {
21290 streamLine(object.coordinates, stream, 0);
21291 },
21292 MultiLineString: function(object, stream) {
21293 var coordinates = object.coordinates, i = -1, n = coordinates.length;
21294 while (++i < n) streamLine(coordinates[i], stream, 0);
21295 },
21296 Polygon: function(object, stream) {
21297 streamPolygon(object.coordinates, stream);
21298 },
21299 MultiPolygon: function(object, stream) {
21300 var coordinates = object.coordinates, i = -1, n = coordinates.length;
21301 while (++i < n) streamPolygon(coordinates[i], stream);
21302 },
21303 GeometryCollection: function(object, stream) {
21304 var geometries = object.geometries, i = -1, n = geometries.length;
21305 while (++i < n) streamGeometry(geometries[i], stream);
21306 }
21307};
21308
21309function streamLine(coordinates, stream, closed) {
21310 var i = -1, n = coordinates.length - closed, coordinate;
21311 stream.lineStart();
21312 while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]);
21313 stream.lineEnd();
21314}
21315
21316function streamPolygon(coordinates, stream) {
21317 var i = -1, n = coordinates.length;
21318 stream.polygonStart();
21319 while (++i < n) streamLine(coordinates[i], stream, 1);
21320 stream.polygonEnd();
21321}
21322
21323/* harmony default export */ __webpack_exports__["default"] = (function(object, stream) {
21324 if (object && streamObjectType.hasOwnProperty(object.type)) {
21325 streamObjectType[object.type](object, stream);
21326 } else {
21327 streamGeometry(object, stream);
21328 }
21329});
21330
21331
21332/***/ }),
21333
21334/***/ "./node_modules/d3-geo/src/transform.js":
21335/*!**********************************************!*\
21336 !*** ./node_modules/d3-geo/src/transform.js ***!
21337 \**********************************************/
21338/*! exports provided: default, transformer */
21339/***/ (function(module, __webpack_exports__, __webpack_require__) {
21340
21341"use strict";
21342__webpack_require__.r(__webpack_exports__);
21343/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; });
21344/* harmony default export */ __webpack_exports__["default"] = (function(methods) {
21345 return {
21346 stream: transformer(methods)
21347 };
21348});
21349
21350function transformer(methods) {
21351 return function(stream) {
21352 var s = new TransformStream;
21353 for (var key in methods) s[key] = methods[key];
21354 s.stream = stream;
21355 return s;
21356 };
21357}
21358
21359function TransformStream() {}
21360
21361TransformStream.prototype = {
21362 constructor: TransformStream,
21363 point: function(x, y) { this.stream.point(x, y); },
21364 sphere: function() { this.stream.sphere(); },
21365 lineStart: function() { this.stream.lineStart(); },
21366 lineEnd: function() { this.stream.lineEnd(); },
21367 polygonStart: function() { this.stream.polygonStart(); },
21368 polygonEnd: function() { this.stream.polygonEnd(); }
21369};
21370
21371
21372/***/ }),
21373
21374/***/ "./node_modules/d3-hierarchy/src/accessors.js":
21375/*!****************************************************!*\
21376 !*** ./node_modules/d3-hierarchy/src/accessors.js ***!
21377 \****************************************************/
21378/*! exports provided: optional, required */
21379/***/ (function(module, __webpack_exports__, __webpack_require__) {
21380
21381"use strict";
21382__webpack_require__.r(__webpack_exports__);
21383/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "optional", function() { return optional; });
21384/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "required", function() { return required; });
21385function optional(f) {
21386 return f == null ? null : required(f);
21387}
21388
21389function required(f) {
21390 if (typeof f !== "function") throw new Error;
21391 return f;
21392}
21393
21394
21395/***/ }),
21396
21397/***/ "./node_modules/d3-hierarchy/src/array.js":
21398/*!************************************************!*\
21399 !*** ./node_modules/d3-hierarchy/src/array.js ***!
21400 \************************************************/
21401/*! exports provided: slice, shuffle */
21402/***/ (function(module, __webpack_exports__, __webpack_require__) {
21403
21404"use strict";
21405__webpack_require__.r(__webpack_exports__);
21406/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
21407/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; });
21408var slice = Array.prototype.slice;
21409
21410function shuffle(array) {
21411 var m = array.length,
21412 t,
21413 i;
21414
21415 while (m) {
21416 i = Math.random() * m-- | 0;
21417 t = array[m];
21418 array[m] = array[i];
21419 array[i] = t;
21420 }
21421
21422 return array;
21423}
21424
21425
21426/***/ }),
21427
21428/***/ "./node_modules/d3-hierarchy/src/cluster.js":
21429/*!**************************************************!*\
21430 !*** ./node_modules/d3-hierarchy/src/cluster.js ***!
21431 \**************************************************/
21432/*! exports provided: default */
21433/***/ (function(module, __webpack_exports__, __webpack_require__) {
21434
21435"use strict";
21436__webpack_require__.r(__webpack_exports__);
21437function defaultSeparation(a, b) {
21438 return a.parent === b.parent ? 1 : 2;
21439}
21440
21441function meanX(children) {
21442 return children.reduce(meanXReduce, 0) / children.length;
21443}
21444
21445function meanXReduce(x, c) {
21446 return x + c.x;
21447}
21448
21449function maxY(children) {
21450 return 1 + children.reduce(maxYReduce, 0);
21451}
21452
21453function maxYReduce(y, c) {
21454 return Math.max(y, c.y);
21455}
21456
21457function leafLeft(node) {
21458 var children;
21459 while (children = node.children) node = children[0];
21460 return node;
21461}
21462
21463function leafRight(node) {
21464 var children;
21465 while (children = node.children) node = children[children.length - 1];
21466 return node;
21467}
21468
21469/* harmony default export */ __webpack_exports__["default"] = (function() {
21470 var separation = defaultSeparation,
21471 dx = 1,
21472 dy = 1,
21473 nodeSize = false;
21474
21475 function cluster(root) {
21476 var previousNode,
21477 x = 0;
21478
21479 // First walk, computing the initial x & y values.
21480 root.eachAfter(function(node) {
21481 var children = node.children;
21482 if (children) {
21483 node.x = meanX(children);
21484 node.y = maxY(children);
21485 } else {
21486 node.x = previousNode ? x += separation(node, previousNode) : 0;
21487 node.y = 0;
21488 previousNode = node;
21489 }
21490 });
21491
21492 var left = leafLeft(root),
21493 right = leafRight(root),
21494 x0 = left.x - separation(left, right) / 2,
21495 x1 = right.x + separation(right, left) / 2;
21496
21497 // Second walk, normalizing x & y to the desired size.
21498 return root.eachAfter(nodeSize ? function(node) {
21499 node.x = (node.x - root.x) * dx;
21500 node.y = (root.y - node.y) * dy;
21501 } : function(node) {
21502 node.x = (node.x - x0) / (x1 - x0) * dx;
21503 node.y = (1 - (root.y ? node.y / root.y : 1)) * dy;
21504 });
21505 }
21506
21507 cluster.separation = function(x) {
21508 return arguments.length ? (separation = x, cluster) : separation;
21509 };
21510
21511 cluster.size = function(x) {
21512 return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]);
21513 };
21514
21515 cluster.nodeSize = function(x) {
21516 return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null);
21517 };
21518
21519 return cluster;
21520});
21521
21522
21523/***/ }),
21524
21525/***/ "./node_modules/d3-hierarchy/src/constant.js":
21526/*!***************************************************!*\
21527 !*** ./node_modules/d3-hierarchy/src/constant.js ***!
21528 \***************************************************/
21529/*! exports provided: constantZero, default */
21530/***/ (function(module, __webpack_exports__, __webpack_require__) {
21531
21532"use strict";
21533__webpack_require__.r(__webpack_exports__);
21534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "constantZero", function() { return constantZero; });
21535function constantZero() {
21536 return 0;
21537}
21538
21539/* harmony default export */ __webpack_exports__["default"] = (function(x) {
21540 return function() {
21541 return x;
21542 };
21543});
21544
21545
21546/***/ }),
21547
21548/***/ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js":
21549/*!**************************************************************!*\
21550 !*** ./node_modules/d3-hierarchy/src/hierarchy/ancestors.js ***!
21551 \**************************************************************/
21552/*! exports provided: default */
21553/***/ (function(module, __webpack_exports__, __webpack_require__) {
21554
21555"use strict";
21556__webpack_require__.r(__webpack_exports__);
21557/* harmony default export */ __webpack_exports__["default"] = (function() {
21558 var node = this, nodes = [node];
21559 while (node = node.parent) {
21560 nodes.push(node);
21561 }
21562 return nodes;
21563});
21564
21565
21566/***/ }),
21567
21568/***/ "./node_modules/d3-hierarchy/src/hierarchy/count.js":
21569/*!**********************************************************!*\
21570 !*** ./node_modules/d3-hierarchy/src/hierarchy/count.js ***!
21571 \**********************************************************/
21572/*! exports provided: default */
21573/***/ (function(module, __webpack_exports__, __webpack_require__) {
21574
21575"use strict";
21576__webpack_require__.r(__webpack_exports__);
21577function count(node) {
21578 var sum = 0,
21579 children = node.children,
21580 i = children && children.length;
21581 if (!i) sum = 1;
21582 else while (--i >= 0) sum += children[i].value;
21583 node.value = sum;
21584}
21585
21586/* harmony default export */ __webpack_exports__["default"] = (function() {
21587 return this.eachAfter(count);
21588});
21589
21590
21591/***/ }),
21592
21593/***/ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js":
21594/*!****************************************************************!*\
21595 !*** ./node_modules/d3-hierarchy/src/hierarchy/descendants.js ***!
21596 \****************************************************************/
21597/*! exports provided: default */
21598/***/ (function(module, __webpack_exports__, __webpack_require__) {
21599
21600"use strict";
21601__webpack_require__.r(__webpack_exports__);
21602/* harmony default export */ __webpack_exports__["default"] = (function() {
21603 var nodes = [];
21604 this.each(function(node) {
21605 nodes.push(node);
21606 });
21607 return nodes;
21608});
21609
21610
21611/***/ }),
21612
21613/***/ "./node_modules/d3-hierarchy/src/hierarchy/each.js":
21614/*!*********************************************************!*\
21615 !*** ./node_modules/d3-hierarchy/src/hierarchy/each.js ***!
21616 \*********************************************************/
21617/*! exports provided: default */
21618/***/ (function(module, __webpack_exports__, __webpack_require__) {
21619
21620"use strict";
21621__webpack_require__.r(__webpack_exports__);
21622/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
21623 var node = this, current, next = [node], children, i, n;
21624 do {
21625 current = next.reverse(), next = [];
21626 while (node = current.pop()) {
21627 callback(node), children = node.children;
21628 if (children) for (i = 0, n = children.length; i < n; ++i) {
21629 next.push(children[i]);
21630 }
21631 }
21632 } while (next.length);
21633 return this;
21634});
21635
21636
21637/***/ }),
21638
21639/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js":
21640/*!**************************************************************!*\
21641 !*** ./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js ***!
21642 \**************************************************************/
21643/*! exports provided: default */
21644/***/ (function(module, __webpack_exports__, __webpack_require__) {
21645
21646"use strict";
21647__webpack_require__.r(__webpack_exports__);
21648/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
21649 var node = this, nodes = [node], next = [], children, i, n;
21650 while (node = nodes.pop()) {
21651 next.push(node), children = node.children;
21652 if (children) for (i = 0, n = children.length; i < n; ++i) {
21653 nodes.push(children[i]);
21654 }
21655 }
21656 while (node = next.pop()) {
21657 callback(node);
21658 }
21659 return this;
21660});
21661
21662
21663/***/ }),
21664
21665/***/ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js":
21666/*!***************************************************************!*\
21667 !*** ./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js ***!
21668 \***************************************************************/
21669/*! exports provided: default */
21670/***/ (function(module, __webpack_exports__, __webpack_require__) {
21671
21672"use strict";
21673__webpack_require__.r(__webpack_exports__);
21674/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
21675 var node = this, nodes = [node], children, i;
21676 while (node = nodes.pop()) {
21677 callback(node), children = node.children;
21678 if (children) for (i = children.length - 1; i >= 0; --i) {
21679 nodes.push(children[i]);
21680 }
21681 }
21682 return this;
21683});
21684
21685
21686/***/ }),
21687
21688/***/ "./node_modules/d3-hierarchy/src/hierarchy/index.js":
21689/*!**********************************************************!*\
21690 !*** ./node_modules/d3-hierarchy/src/hierarchy/index.js ***!
21691 \**********************************************************/
21692/*! exports provided: default, computeHeight, Node */
21693/***/ (function(module, __webpack_exports__, __webpack_require__) {
21694
21695"use strict";
21696__webpack_require__.r(__webpack_exports__);
21697/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hierarchy; });
21698/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeHeight", function() { return computeHeight; });
21699/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Node", function() { return Node; });
21700/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./count.js */ "./node_modules/d3-hierarchy/src/hierarchy/count.js");
21701/* harmony import */ var _each_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./each.js */ "./node_modules/d3-hierarchy/src/hierarchy/each.js");
21702/* harmony import */ var _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./eachBefore.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachBefore.js");
21703/* harmony import */ var _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./eachAfter.js */ "./node_modules/d3-hierarchy/src/hierarchy/eachAfter.js");
21704/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sum.js */ "./node_modules/d3-hierarchy/src/hierarchy/sum.js");
21705/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./sort.js */ "./node_modules/d3-hierarchy/src/hierarchy/sort.js");
21706/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-hierarchy/src/hierarchy/path.js");
21707/* harmony import */ var _ancestors_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ancestors.js */ "./node_modules/d3-hierarchy/src/hierarchy/ancestors.js");
21708/* harmony import */ var _descendants_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./descendants.js */ "./node_modules/d3-hierarchy/src/hierarchy/descendants.js");
21709/* harmony import */ var _leaves_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./leaves.js */ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js");
21710/* harmony import */ var _links_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./links.js */ "./node_modules/d3-hierarchy/src/hierarchy/links.js");
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723function hierarchy(data, children) {
21724 var root = new Node(data),
21725 valued = +data.value && (root.value = data.value),
21726 node,
21727 nodes = [root],
21728 child,
21729 childs,
21730 i,
21731 n;
21732
21733 if (children == null) children = defaultChildren;
21734
21735 while (node = nodes.pop()) {
21736 if (valued) node.value = +node.data.value;
21737 if ((childs = children(node.data)) && (n = childs.length)) {
21738 node.children = new Array(n);
21739 for (i = n - 1; i >= 0; --i) {
21740 nodes.push(child = node.children[i] = new Node(childs[i]));
21741 child.parent = node;
21742 child.depth = node.depth + 1;
21743 }
21744 }
21745 }
21746
21747 return root.eachBefore(computeHeight);
21748}
21749
21750function node_copy() {
21751 return hierarchy(this).eachBefore(copyData);
21752}
21753
21754function defaultChildren(d) {
21755 return d.children;
21756}
21757
21758function copyData(node) {
21759 node.data = node.data.data;
21760}
21761
21762function computeHeight(node) {
21763 var height = 0;
21764 do node.height = height;
21765 while ((node = node.parent) && (node.height < ++height));
21766}
21767
21768function Node(data) {
21769 this.data = data;
21770 this.depth =
21771 this.height = 0;
21772 this.parent = null;
21773}
21774
21775Node.prototype = hierarchy.prototype = {
21776 constructor: Node,
21777 count: _count_js__WEBPACK_IMPORTED_MODULE_0__["default"],
21778 each: _each_js__WEBPACK_IMPORTED_MODULE_1__["default"],
21779 eachAfter: _eachAfter_js__WEBPACK_IMPORTED_MODULE_3__["default"],
21780 eachBefore: _eachBefore_js__WEBPACK_IMPORTED_MODULE_2__["default"],
21781 sum: _sum_js__WEBPACK_IMPORTED_MODULE_4__["default"],
21782 sort: _sort_js__WEBPACK_IMPORTED_MODULE_5__["default"],
21783 path: _path_js__WEBPACK_IMPORTED_MODULE_6__["default"],
21784 ancestors: _ancestors_js__WEBPACK_IMPORTED_MODULE_7__["default"],
21785 descendants: _descendants_js__WEBPACK_IMPORTED_MODULE_8__["default"],
21786 leaves: _leaves_js__WEBPACK_IMPORTED_MODULE_9__["default"],
21787 links: _links_js__WEBPACK_IMPORTED_MODULE_10__["default"],
21788 copy: node_copy
21789};
21790
21791
21792/***/ }),
21793
21794/***/ "./node_modules/d3-hierarchy/src/hierarchy/leaves.js":
21795/*!***********************************************************!*\
21796 !*** ./node_modules/d3-hierarchy/src/hierarchy/leaves.js ***!
21797 \***********************************************************/
21798/*! exports provided: default */
21799/***/ (function(module, __webpack_exports__, __webpack_require__) {
21800
21801"use strict";
21802__webpack_require__.r(__webpack_exports__);
21803/* harmony default export */ __webpack_exports__["default"] = (function() {
21804 var leaves = [];
21805 this.eachBefore(function(node) {
21806 if (!node.children) {
21807 leaves.push(node);
21808 }
21809 });
21810 return leaves;
21811});
21812
21813
21814/***/ }),
21815
21816/***/ "./node_modules/d3-hierarchy/src/hierarchy/links.js":
21817/*!**********************************************************!*\
21818 !*** ./node_modules/d3-hierarchy/src/hierarchy/links.js ***!
21819 \**********************************************************/
21820/*! exports provided: default */
21821/***/ (function(module, __webpack_exports__, __webpack_require__) {
21822
21823"use strict";
21824__webpack_require__.r(__webpack_exports__);
21825/* harmony default export */ __webpack_exports__["default"] = (function() {
21826 var root = this, links = [];
21827 root.each(function(node) {
21828 if (node !== root) { // Don’t include the root’s parent, if any.
21829 links.push({source: node.parent, target: node});
21830 }
21831 });
21832 return links;
21833});
21834
21835
21836/***/ }),
21837
21838/***/ "./node_modules/d3-hierarchy/src/hierarchy/path.js":
21839/*!*********************************************************!*\
21840 !*** ./node_modules/d3-hierarchy/src/hierarchy/path.js ***!
21841 \*********************************************************/
21842/*! exports provided: default */
21843/***/ (function(module, __webpack_exports__, __webpack_require__) {
21844
21845"use strict";
21846__webpack_require__.r(__webpack_exports__);
21847/* harmony default export */ __webpack_exports__["default"] = (function(end) {
21848 var start = this,
21849 ancestor = leastCommonAncestor(start, end),
21850 nodes = [start];
21851 while (start !== ancestor) {
21852 start = start.parent;
21853 nodes.push(start);
21854 }
21855 var k = nodes.length;
21856 while (end !== ancestor) {
21857 nodes.splice(k, 0, end);
21858 end = end.parent;
21859 }
21860 return nodes;
21861});
21862
21863function leastCommonAncestor(a, b) {
21864 if (a === b) return a;
21865 var aNodes = a.ancestors(),
21866 bNodes = b.ancestors(),
21867 c = null;
21868 a = aNodes.pop();
21869 b = bNodes.pop();
21870 while (a === b) {
21871 c = a;
21872 a = aNodes.pop();
21873 b = bNodes.pop();
21874 }
21875 return c;
21876}
21877
21878
21879/***/ }),
21880
21881/***/ "./node_modules/d3-hierarchy/src/hierarchy/sort.js":
21882/*!*********************************************************!*\
21883 !*** ./node_modules/d3-hierarchy/src/hierarchy/sort.js ***!
21884 \*********************************************************/
21885/*! exports provided: default */
21886/***/ (function(module, __webpack_exports__, __webpack_require__) {
21887
21888"use strict";
21889__webpack_require__.r(__webpack_exports__);
21890/* harmony default export */ __webpack_exports__["default"] = (function(compare) {
21891 return this.eachBefore(function(node) {
21892 if (node.children) {
21893 node.children.sort(compare);
21894 }
21895 });
21896});
21897
21898
21899/***/ }),
21900
21901/***/ "./node_modules/d3-hierarchy/src/hierarchy/sum.js":
21902/*!********************************************************!*\
21903 !*** ./node_modules/d3-hierarchy/src/hierarchy/sum.js ***!
21904 \********************************************************/
21905/*! exports provided: default */
21906/***/ (function(module, __webpack_exports__, __webpack_require__) {
21907
21908"use strict";
21909__webpack_require__.r(__webpack_exports__);
21910/* harmony default export */ __webpack_exports__["default"] = (function(value) {
21911 return this.eachAfter(function(node) {
21912 var sum = +value(node.data) || 0,
21913 children = node.children,
21914 i = children && children.length;
21915 while (--i >= 0) sum += children[i].value;
21916 node.value = sum;
21917 });
21918});
21919
21920
21921/***/ }),
21922
21923/***/ "./node_modules/d3-hierarchy/src/index.js":
21924/*!************************************************!*\
21925 !*** ./node_modules/d3-hierarchy/src/index.js ***!
21926 \************************************************/
21927/*! exports provided: cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify */
21928/***/ (function(module, __webpack_exports__, __webpack_require__) {
21929
21930"use strict";
21931__webpack_require__.r(__webpack_exports__);
21932/* harmony import */ var _cluster_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cluster.js */ "./node_modules/d3-hierarchy/src/cluster.js");
21933/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return _cluster_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
21934
21935/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js");
21936/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
21937
21938/* harmony import */ var _pack_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pack/index.js */ "./node_modules/d3-hierarchy/src/pack/index.js");
21939/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return _pack_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
21940
21941/* harmony import */ var _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pack/siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js");
21942/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return _pack_siblings_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
21943
21944/* harmony import */ var _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pack/enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js");
21945/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return _pack_enclose_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
21946
21947/* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./partition.js */ "./node_modules/d3-hierarchy/src/partition.js");
21948/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return _partition_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
21949
21950/* harmony import */ var _stratify_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stratify.js */ "./node_modules/d3-hierarchy/src/stratify.js");
21951/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return _stratify_js__WEBPACK_IMPORTED_MODULE_6__["default"]; });
21952
21953/* harmony import */ var _tree_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./tree.js */ "./node_modules/d3-hierarchy/src/tree.js");
21954/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return _tree_js__WEBPACK_IMPORTED_MODULE_7__["default"]; });
21955
21956/* harmony import */ var _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./treemap/index.js */ "./node_modules/d3-hierarchy/src/treemap/index.js");
21957/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return _treemap_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
21958
21959/* harmony import */ var _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./treemap/binary.js */ "./node_modules/d3-hierarchy/src/treemap/binary.js");
21960/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return _treemap_binary_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
21961
21962/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js");
21963/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return _treemap_dice_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
21964
21965/* harmony import */ var _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./treemap/slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js");
21966/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return _treemap_slice_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
21967
21968/* harmony import */ var _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./treemap/sliceDice.js */ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js");
21969/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return _treemap_sliceDice_js__WEBPACK_IMPORTED_MODULE_12__["default"]; });
21970
21971/* harmony import */ var _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./treemap/squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js");
21972/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return _treemap_squarify_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
21973
21974/* harmony import */ var _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./treemap/resquarify.js */ "./node_modules/d3-hierarchy/src/treemap/resquarify.js");
21975/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return _treemap_resquarify_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994/***/ }),
21995
21996/***/ "./node_modules/d3-hierarchy/src/pack/enclose.js":
21997/*!*******************************************************!*\
21998 !*** ./node_modules/d3-hierarchy/src/pack/enclose.js ***!
21999 \*******************************************************/
22000/*! exports provided: default */
22001/***/ (function(module, __webpack_exports__, __webpack_require__) {
22002
22003"use strict";
22004__webpack_require__.r(__webpack_exports__);
22005/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-hierarchy/src/array.js");
22006
22007
22008/* harmony default export */ __webpack_exports__["default"] = (function(circles) {
22009 var i = 0, n = (circles = Object(_array_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(circles))).length, B = [], p, e;
22010
22011 while (i < n) {
22012 p = circles[i];
22013 if (e && enclosesWeak(e, p)) ++i;
22014 else e = encloseBasis(B = extendBasis(B, p)), i = 0;
22015 }
22016
22017 return e;
22018});
22019
22020function extendBasis(B, p) {
22021 var i, j;
22022
22023 if (enclosesWeakAll(p, B)) return [p];
22024
22025 // If we get here then B must have at least one element.
22026 for (i = 0; i < B.length; ++i) {
22027 if (enclosesNot(p, B[i])
22028 && enclosesWeakAll(encloseBasis2(B[i], p), B)) {
22029 return [B[i], p];
22030 }
22031 }
22032
22033 // If we get here then B must have at least two elements.
22034 for (i = 0; i < B.length - 1; ++i) {
22035 for (j = i + 1; j < B.length; ++j) {
22036 if (enclosesNot(encloseBasis2(B[i], B[j]), p)
22037 && enclosesNot(encloseBasis2(B[i], p), B[j])
22038 && enclosesNot(encloseBasis2(B[j], p), B[i])
22039 && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) {
22040 return [B[i], B[j], p];
22041 }
22042 }
22043 }
22044
22045 // If we get here then something is very wrong.
22046 throw new Error;
22047}
22048
22049function enclosesNot(a, b) {
22050 var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y;
22051 return dr < 0 || dr * dr < dx * dx + dy * dy;
22052}
22053
22054function enclosesWeak(a, b) {
22055 var dr = a.r - b.r + 1e-6, dx = b.x - a.x, dy = b.y - a.y;
22056 return dr > 0 && dr * dr > dx * dx + dy * dy;
22057}
22058
22059function enclosesWeakAll(a, B) {
22060 for (var i = 0; i < B.length; ++i) {
22061 if (!enclosesWeak(a, B[i])) {
22062 return false;
22063 }
22064 }
22065 return true;
22066}
22067
22068function encloseBasis(B) {
22069 switch (B.length) {
22070 case 1: return encloseBasis1(B[0]);
22071 case 2: return encloseBasis2(B[0], B[1]);
22072 case 3: return encloseBasis3(B[0], B[1], B[2]);
22073 }
22074}
22075
22076function encloseBasis1(a) {
22077 return {
22078 x: a.x,
22079 y: a.y,
22080 r: a.r
22081 };
22082}
22083
22084function encloseBasis2(a, b) {
22085 var x1 = a.x, y1 = a.y, r1 = a.r,
22086 x2 = b.x, y2 = b.y, r2 = b.r,
22087 x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1,
22088 l = Math.sqrt(x21 * x21 + y21 * y21);
22089 return {
22090 x: (x1 + x2 + x21 / l * r21) / 2,
22091 y: (y1 + y2 + y21 / l * r21) / 2,
22092 r: (l + r1 + r2) / 2
22093 };
22094}
22095
22096function encloseBasis3(a, b, c) {
22097 var x1 = a.x, y1 = a.y, r1 = a.r,
22098 x2 = b.x, y2 = b.y, r2 = b.r,
22099 x3 = c.x, y3 = c.y, r3 = c.r,
22100 a2 = x1 - x2,
22101 a3 = x1 - x3,
22102 b2 = y1 - y2,
22103 b3 = y1 - y3,
22104 c2 = r2 - r1,
22105 c3 = r3 - r1,
22106 d1 = x1 * x1 + y1 * y1 - r1 * r1,
22107 d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2,
22108 d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3,
22109 ab = a3 * b2 - a2 * b3,
22110 xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1,
22111 xb = (b3 * c2 - b2 * c3) / ab,
22112 ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1,
22113 yb = (a2 * c3 - a3 * c2) / ab,
22114 A = xb * xb + yb * yb - 1,
22115 B = 2 * (r1 + xa * xb + ya * yb),
22116 C = xa * xa + ya * ya - r1 * r1,
22117 r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B);
22118 return {
22119 x: x1 + xa + xb * r,
22120 y: y1 + ya + yb * r,
22121 r: r
22122 };
22123}
22124
22125
22126/***/ }),
22127
22128/***/ "./node_modules/d3-hierarchy/src/pack/index.js":
22129/*!*****************************************************!*\
22130 !*** ./node_modules/d3-hierarchy/src/pack/index.js ***!
22131 \*****************************************************/
22132/*! exports provided: default */
22133/***/ (function(module, __webpack_exports__, __webpack_require__) {
22134
22135"use strict";
22136__webpack_require__.r(__webpack_exports__);
22137/* harmony import */ var _siblings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./siblings.js */ "./node_modules/d3-hierarchy/src/pack/siblings.js");
22138/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js");
22139/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js");
22140
22141
22142
22143
22144function defaultRadius(d) {
22145 return Math.sqrt(d.value);
22146}
22147
22148/* harmony default export */ __webpack_exports__["default"] = (function() {
22149 var radius = null,
22150 dx = 1,
22151 dy = 1,
22152 padding = _constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"];
22153
22154 function pack(root) {
22155 root.x = dx / 2, root.y = dy / 2;
22156 if (radius) {
22157 root.eachBefore(radiusLeaf(radius))
22158 .eachAfter(packChildren(padding, 0.5))
22159 .eachBefore(translateChild(1));
22160 } else {
22161 root.eachBefore(radiusLeaf(defaultRadius))
22162 .eachAfter(packChildren(_constant_js__WEBPACK_IMPORTED_MODULE_2__["constantZero"], 1))
22163 .eachAfter(packChildren(padding, root.r / Math.min(dx, dy)))
22164 .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r)));
22165 }
22166 return root;
22167 }
22168
22169 pack.radius = function(x) {
22170 return arguments.length ? (radius = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_1__["optional"])(x), pack) : radius;
22171 };
22172
22173 pack.size = function(x) {
22174 return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy];
22175 };
22176
22177 pack.padding = function(x) {
22178 return arguments.length ? (padding = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+x), pack) : padding;
22179 };
22180
22181 return pack;
22182});
22183
22184function radiusLeaf(radius) {
22185 return function(node) {
22186 if (!node.children) {
22187 node.r = Math.max(0, +radius(node) || 0);
22188 }
22189 };
22190}
22191
22192function packChildren(padding, k) {
22193 return function(node) {
22194 if (children = node.children) {
22195 var children,
22196 i,
22197 n = children.length,
22198 r = padding(node) * k || 0,
22199 e;
22200
22201 if (r) for (i = 0; i < n; ++i) children[i].r += r;
22202 e = Object(_siblings_js__WEBPACK_IMPORTED_MODULE_0__["packEnclose"])(children);
22203 if (r) for (i = 0; i < n; ++i) children[i].r -= r;
22204 node.r = e + r;
22205 }
22206 };
22207}
22208
22209function translateChild(k) {
22210 return function(node) {
22211 var parent = node.parent;
22212 node.r *= k;
22213 if (parent) {
22214 node.x = parent.x + k * node.x;
22215 node.y = parent.y + k * node.y;
22216 }
22217 };
22218}
22219
22220
22221/***/ }),
22222
22223/***/ "./node_modules/d3-hierarchy/src/pack/siblings.js":
22224/*!********************************************************!*\
22225 !*** ./node_modules/d3-hierarchy/src/pack/siblings.js ***!
22226 \********************************************************/
22227/*! exports provided: packEnclose, default */
22228/***/ (function(module, __webpack_exports__, __webpack_require__) {
22229
22230"use strict";
22231__webpack_require__.r(__webpack_exports__);
22232/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return packEnclose; });
22233/* harmony import */ var _enclose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./enclose.js */ "./node_modules/d3-hierarchy/src/pack/enclose.js");
22234
22235
22236function place(b, a, c) {
22237 var dx = b.x - a.x, x, a2,
22238 dy = b.y - a.y, y, b2,
22239 d2 = dx * dx + dy * dy;
22240 if (d2) {
22241 a2 = a.r + c.r, a2 *= a2;
22242 b2 = b.r + c.r, b2 *= b2;
22243 if (a2 > b2) {
22244 x = (d2 + b2 - a2) / (2 * d2);
22245 y = Math.sqrt(Math.max(0, b2 / d2 - x * x));
22246 c.x = b.x - x * dx - y * dy;
22247 c.y = b.y - x * dy + y * dx;
22248 } else {
22249 x = (d2 + a2 - b2) / (2 * d2);
22250 y = Math.sqrt(Math.max(0, a2 / d2 - x * x));
22251 c.x = a.x + x * dx - y * dy;
22252 c.y = a.y + x * dy + y * dx;
22253 }
22254 } else {
22255 c.x = a.x + c.r;
22256 c.y = a.y;
22257 }
22258}
22259
22260function intersects(a, b) {
22261 var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;
22262 return dr > 0 && dr * dr > dx * dx + dy * dy;
22263}
22264
22265function score(node) {
22266 var a = node._,
22267 b = node.next._,
22268 ab = a.r + b.r,
22269 dx = (a.x * b.r + b.x * a.r) / ab,
22270 dy = (a.y * b.r + b.y * a.r) / ab;
22271 return dx * dx + dy * dy;
22272}
22273
22274function Node(circle) {
22275 this._ = circle;
22276 this.next = null;
22277 this.previous = null;
22278}
22279
22280function packEnclose(circles) {
22281 if (!(n = circles.length)) return 0;
22282
22283 var a, b, c, n, aa, ca, i, j, k, sj, sk;
22284
22285 // Place the first circle.
22286 a = circles[0], a.x = 0, a.y = 0;
22287 if (!(n > 1)) return a.r;
22288
22289 // Place the second circle.
22290 b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0;
22291 if (!(n > 2)) return a.r + b.r;
22292
22293 // Place the third circle.
22294 place(b, a, c = circles[2]);
22295
22296 // Initialize the front-chain using the first three circles a, b and c.
22297 a = new Node(a), b = new Node(b), c = new Node(c);
22298 a.next = c.previous = b;
22299 b.next = a.previous = c;
22300 c.next = b.previous = a;
22301
22302 // Attempt to place each remaining circle…
22303 pack: for (i = 3; i < n; ++i) {
22304 place(a._, b._, c = circles[i]), c = new Node(c);
22305
22306 // Find the closest intersecting circle on the front-chain, if any.
22307 // “Closeness” is determined by linear distance along the front-chain.
22308 // “Ahead” or “behind” is likewise determined by linear distance.
22309 j = b.next, k = a.previous, sj = b._.r, sk = a._.r;
22310 do {
22311 if (sj <= sk) {
22312 if (intersects(j._, c._)) {
22313 b = j, a.next = b, b.previous = a, --i;
22314 continue pack;
22315 }
22316 sj += j._.r, j = j.next;
22317 } else {
22318 if (intersects(k._, c._)) {
22319 a = k, a.next = b, b.previous = a, --i;
22320 continue pack;
22321 }
22322 sk += k._.r, k = k.previous;
22323 }
22324 } while (j !== k.next);
22325
22326 // Success! Insert the new circle c between a and b.
22327 c.previous = a, c.next = b, a.next = b.previous = b = c;
22328
22329 // Compute the new closest circle pair to the centroid.
22330 aa = score(a);
22331 while ((c = c.next) !== b) {
22332 if ((ca = score(c)) < aa) {
22333 a = c, aa = ca;
22334 }
22335 }
22336 b = a.next;
22337 }
22338
22339 // Compute the enclosing circle of the front chain.
22340 a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = Object(_enclose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a);
22341
22342 // Translate the circles to put the enclosing circle around the origin.
22343 for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y;
22344
22345 return c.r;
22346}
22347
22348/* harmony default export */ __webpack_exports__["default"] = (function(circles) {
22349 packEnclose(circles);
22350 return circles;
22351});
22352
22353
22354/***/ }),
22355
22356/***/ "./node_modules/d3-hierarchy/src/partition.js":
22357/*!****************************************************!*\
22358 !*** ./node_modules/d3-hierarchy/src/partition.js ***!
22359 \****************************************************/
22360/*! exports provided: default */
22361/***/ (function(module, __webpack_exports__, __webpack_require__) {
22362
22363"use strict";
22364__webpack_require__.r(__webpack_exports__);
22365/* harmony import */ var _treemap_round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./treemap/round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js");
22366/* harmony import */ var _treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./treemap/dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js");
22367
22368
22369
22370/* harmony default export */ __webpack_exports__["default"] = (function() {
22371 var dx = 1,
22372 dy = 1,
22373 padding = 0,
22374 round = false;
22375
22376 function partition(root) {
22377 var n = root.height + 1;
22378 root.x0 =
22379 root.y0 = padding;
22380 root.x1 = dx;
22381 root.y1 = dy / n;
22382 root.eachBefore(positionNode(dy, n));
22383 if (round) root.eachBefore(_treemap_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
22384 return root;
22385 }
22386
22387 function positionNode(dy, n) {
22388 return function(node) {
22389 if (node.children) {
22390 Object(_treemap_dice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n);
22391 }
22392 var x0 = node.x0,
22393 y0 = node.y0,
22394 x1 = node.x1 - padding,
22395 y1 = node.y1 - padding;
22396 if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
22397 if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
22398 node.x0 = x0;
22399 node.y0 = y0;
22400 node.x1 = x1;
22401 node.y1 = y1;
22402 };
22403 }
22404
22405 partition.round = function(x) {
22406 return arguments.length ? (round = !!x, partition) : round;
22407 };
22408
22409 partition.size = function(x) {
22410 return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy];
22411 };
22412
22413 partition.padding = function(x) {
22414 return arguments.length ? (padding = +x, partition) : padding;
22415 };
22416
22417 return partition;
22418});
22419
22420
22421/***/ }),
22422
22423/***/ "./node_modules/d3-hierarchy/src/stratify.js":
22424/*!***************************************************!*\
22425 !*** ./node_modules/d3-hierarchy/src/stratify.js ***!
22426 \***************************************************/
22427/*! exports provided: default */
22428/***/ (function(module, __webpack_exports__, __webpack_require__) {
22429
22430"use strict";
22431__webpack_require__.r(__webpack_exports__);
22432/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js");
22433/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js");
22434
22435
22436
22437var keyPrefix = "$", // Protect against keys like “__proto__”.
22438 preroot = {depth: -1},
22439 ambiguous = {};
22440
22441function defaultId(d) {
22442 return d.id;
22443}
22444
22445function defaultParentId(d) {
22446 return d.parentId;
22447}
22448
22449/* harmony default export */ __webpack_exports__["default"] = (function() {
22450 var id = defaultId,
22451 parentId = defaultParentId;
22452
22453 function stratify(data) {
22454 var d,
22455 i,
22456 n = data.length,
22457 root,
22458 parent,
22459 node,
22460 nodes = new Array(n),
22461 nodeId,
22462 nodeKey,
22463 nodeByKey = {};
22464
22465 for (i = 0; i < n; ++i) {
22466 d = data[i], node = nodes[i] = new _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["Node"](d);
22467 if ((nodeId = id(d, i, data)) != null && (nodeId += "")) {
22468 nodeKey = keyPrefix + (node.id = nodeId);
22469 nodeByKey[nodeKey] = nodeKey in nodeByKey ? ambiguous : node;
22470 }
22471 }
22472
22473 for (i = 0; i < n; ++i) {
22474 node = nodes[i], nodeId = parentId(data[i], i, data);
22475 if (nodeId == null || !(nodeId += "")) {
22476 if (root) throw new Error("multiple roots");
22477 root = node;
22478 } else {
22479 parent = nodeByKey[keyPrefix + nodeId];
22480 if (!parent) throw new Error("missing: " + nodeId);
22481 if (parent === ambiguous) throw new Error("ambiguous: " + nodeId);
22482 if (parent.children) parent.children.push(node);
22483 else parent.children = [node];
22484 node.parent = parent;
22485 }
22486 }
22487
22488 if (!root) throw new Error("no root");
22489 root.parent = preroot;
22490 root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_1__["computeHeight"]);
22491 root.parent = null;
22492 if (n > 0) throw new Error("cycle");
22493
22494 return root;
22495 }
22496
22497 stratify.id = function(x) {
22498 return arguments.length ? (id = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : id;
22499 };
22500
22501 stratify.parentId = function(x) {
22502 return arguments.length ? (parentId = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_0__["required"])(x), stratify) : parentId;
22503 };
22504
22505 return stratify;
22506});
22507
22508
22509/***/ }),
22510
22511/***/ "./node_modules/d3-hierarchy/src/tree.js":
22512/*!***********************************************!*\
22513 !*** ./node_modules/d3-hierarchy/src/tree.js ***!
22514 \***********************************************/
22515/*! exports provided: default */
22516/***/ (function(module, __webpack_exports__, __webpack_require__) {
22517
22518"use strict";
22519__webpack_require__.r(__webpack_exports__);
22520/* harmony import */ var _hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hierarchy/index.js */ "./node_modules/d3-hierarchy/src/hierarchy/index.js");
22521
22522
22523function defaultSeparation(a, b) {
22524 return a.parent === b.parent ? 1 : 2;
22525}
22526
22527// function radialSeparation(a, b) {
22528// return (a.parent === b.parent ? 1 : 2) / a.depth;
22529// }
22530
22531// This function is used to traverse the left contour of a subtree (or
22532// subforest). It returns the successor of v on this contour. This successor is
22533// either given by the leftmost child of v or by the thread of v. The function
22534// returns null if and only if v is on the highest level of its subtree.
22535function nextLeft(v) {
22536 var children = v.children;
22537 return children ? children[0] : v.t;
22538}
22539
22540// This function works analogously to nextLeft.
22541function nextRight(v) {
22542 var children = v.children;
22543 return children ? children[children.length - 1] : v.t;
22544}
22545
22546// Shifts the current subtree rooted at w+. This is done by increasing
22547// prelim(w+) and mod(w+) by shift.
22548function moveSubtree(wm, wp, shift) {
22549 var change = shift / (wp.i - wm.i);
22550 wp.c -= change;
22551 wp.s += shift;
22552 wm.c += change;
22553 wp.z += shift;
22554 wp.m += shift;
22555}
22556
22557// All other shifts, applied to the smaller subtrees between w- and w+, are
22558// performed by this function. To prepare the shifts, we have to adjust
22559// change(w+), shift(w+), and change(w-).
22560function executeShifts(v) {
22561 var shift = 0,
22562 change = 0,
22563 children = v.children,
22564 i = children.length,
22565 w;
22566 while (--i >= 0) {
22567 w = children[i];
22568 w.z += shift;
22569 w.m += shift;
22570 shift += w.s + (change += w.c);
22571 }
22572}
22573
22574// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,
22575// returns the specified (default) ancestor.
22576function nextAncestor(vim, v, ancestor) {
22577 return vim.a.parent === v.parent ? vim.a : ancestor;
22578}
22579
22580function TreeNode(node, i) {
22581 this._ = node;
22582 this.parent = null;
22583 this.children = null;
22584 this.A = null; // default ancestor
22585 this.a = this; // ancestor
22586 this.z = 0; // prelim
22587 this.m = 0; // mod
22588 this.c = 0; // change
22589 this.s = 0; // shift
22590 this.t = null; // thread
22591 this.i = i; // number
22592}
22593
22594TreeNode.prototype = Object.create(_hierarchy_index_js__WEBPACK_IMPORTED_MODULE_0__["Node"].prototype);
22595
22596function treeRoot(root) {
22597 var tree = new TreeNode(root, 0),
22598 node,
22599 nodes = [tree],
22600 child,
22601 children,
22602 i,
22603 n;
22604
22605 while (node = nodes.pop()) {
22606 if (children = node._.children) {
22607 node.children = new Array(n = children.length);
22608 for (i = n - 1; i >= 0; --i) {
22609 nodes.push(child = node.children[i] = new TreeNode(children[i], i));
22610 child.parent = node;
22611 }
22612 }
22613 }
22614
22615 (tree.parent = new TreeNode(null, 0)).children = [tree];
22616 return tree;
22617}
22618
22619// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
22620/* harmony default export */ __webpack_exports__["default"] = (function() {
22621 var separation = defaultSeparation,
22622 dx = 1,
22623 dy = 1,
22624 nodeSize = null;
22625
22626 function tree(root) {
22627 var t = treeRoot(root);
22628
22629 // Compute the layout using Buchheim et al.’s algorithm.
22630 t.eachAfter(firstWalk), t.parent.m = -t.z;
22631 t.eachBefore(secondWalk);
22632
22633 // If a fixed node size is specified, scale x and y.
22634 if (nodeSize) root.eachBefore(sizeNode);
22635
22636 // If a fixed tree size is specified, scale x and y based on the extent.
22637 // Compute the left-most, right-most, and depth-most nodes for extents.
22638 else {
22639 var left = root,
22640 right = root,
22641 bottom = root;
22642 root.eachBefore(function(node) {
22643 if (node.x < left.x) left = node;
22644 if (node.x > right.x) right = node;
22645 if (node.depth > bottom.depth) bottom = node;
22646 });
22647 var s = left === right ? 1 : separation(left, right) / 2,
22648 tx = s - left.x,
22649 kx = dx / (right.x + s + tx),
22650 ky = dy / (bottom.depth || 1);
22651 root.eachBefore(function(node) {
22652 node.x = (node.x + tx) * kx;
22653 node.y = node.depth * ky;
22654 });
22655 }
22656
22657 return root;
22658 }
22659
22660 // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is
22661 // applied recursively to the children of v, as well as the function
22662 // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the
22663 // node v is placed to the midpoint of its outermost children.
22664 function firstWalk(v) {
22665 var children = v.children,
22666 siblings = v.parent.children,
22667 w = v.i ? siblings[v.i - 1] : null;
22668 if (children) {
22669 executeShifts(v);
22670 var midpoint = (children[0].z + children[children.length - 1].z) / 2;
22671 if (w) {
22672 v.z = w.z + separation(v._, w._);
22673 v.m = v.z - midpoint;
22674 } else {
22675 v.z = midpoint;
22676 }
22677 } else if (w) {
22678 v.z = w.z + separation(v._, w._);
22679 }
22680 v.parent.A = apportion(v, w, v.parent.A || siblings[0]);
22681 }
22682
22683 // Computes all real x-coordinates by summing up the modifiers recursively.
22684 function secondWalk(v) {
22685 v._.x = v.z + v.parent.m;
22686 v.m += v.parent.m;
22687 }
22688
22689 // The core of the algorithm. Here, a new subtree is combined with the
22690 // previous subtrees. Threads are used to traverse the inside and outside
22691 // contours of the left and right subtree up to the highest common level. The
22692 // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the
22693 // superscript o means outside and i means inside, the subscript - means left
22694 // subtree and + means right subtree. For summing up the modifiers along the
22695 // contour, we use respective variables si+, si-, so-, and so+. Whenever two
22696 // nodes of the inside contours conflict, we compute the left one of the
22697 // greatest uncommon ancestors using the function ANCESTOR and call MOVE
22698 // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.
22699 // Finally, we add a new thread (if necessary).
22700 function apportion(v, w, ancestor) {
22701 if (w) {
22702 var vip = v,
22703 vop = v,
22704 vim = w,
22705 vom = vip.parent.children[0],
22706 sip = vip.m,
22707 sop = vop.m,
22708 sim = vim.m,
22709 som = vom.m,
22710 shift;
22711 while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) {
22712 vom = nextLeft(vom);
22713 vop = nextRight(vop);
22714 vop.a = v;
22715 shift = vim.z + sim - vip.z - sip + separation(vim._, vip._);
22716 if (shift > 0) {
22717 moveSubtree(nextAncestor(vim, v, ancestor), v, shift);
22718 sip += shift;
22719 sop += shift;
22720 }
22721 sim += vim.m;
22722 sip += vip.m;
22723 som += vom.m;
22724 sop += vop.m;
22725 }
22726 if (vim && !nextRight(vop)) {
22727 vop.t = vim;
22728 vop.m += sim - sop;
22729 }
22730 if (vip && !nextLeft(vom)) {
22731 vom.t = vip;
22732 vom.m += sip - som;
22733 ancestor = v;
22734 }
22735 }
22736 return ancestor;
22737 }
22738
22739 function sizeNode(node) {
22740 node.x *= dx;
22741 node.y = node.depth * dy;
22742 }
22743
22744 tree.separation = function(x) {
22745 return arguments.length ? (separation = x, tree) : separation;
22746 };
22747
22748 tree.size = function(x) {
22749 return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]);
22750 };
22751
22752 tree.nodeSize = function(x) {
22753 return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null);
22754 };
22755
22756 return tree;
22757});
22758
22759
22760/***/ }),
22761
22762/***/ "./node_modules/d3-hierarchy/src/treemap/binary.js":
22763/*!*********************************************************!*\
22764 !*** ./node_modules/d3-hierarchy/src/treemap/binary.js ***!
22765 \*********************************************************/
22766/*! exports provided: default */
22767/***/ (function(module, __webpack_exports__, __webpack_require__) {
22768
22769"use strict";
22770__webpack_require__.r(__webpack_exports__);
22771/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) {
22772 var nodes = parent.children,
22773 i, n = nodes.length,
22774 sum, sums = new Array(n + 1);
22775
22776 for (sums[0] = sum = i = 0; i < n; ++i) {
22777 sums[i + 1] = sum += nodes[i].value;
22778 }
22779
22780 partition(0, n, parent.value, x0, y0, x1, y1);
22781
22782 function partition(i, j, value, x0, y0, x1, y1) {
22783 if (i >= j - 1) {
22784 var node = nodes[i];
22785 node.x0 = x0, node.y0 = y0;
22786 node.x1 = x1, node.y1 = y1;
22787 return;
22788 }
22789
22790 var valueOffset = sums[i],
22791 valueTarget = (value / 2) + valueOffset,
22792 k = i + 1,
22793 hi = j - 1;
22794
22795 while (k < hi) {
22796 var mid = k + hi >>> 1;
22797 if (sums[mid] < valueTarget) k = mid + 1;
22798 else hi = mid;
22799 }
22800
22801 if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k;
22802
22803 var valueLeft = sums[k] - valueOffset,
22804 valueRight = value - valueLeft;
22805
22806 if ((x1 - x0) > (y1 - y0)) {
22807 var xk = (x0 * valueRight + x1 * valueLeft) / value;
22808 partition(i, k, valueLeft, x0, y0, xk, y1);
22809 partition(k, j, valueRight, xk, y0, x1, y1);
22810 } else {
22811 var yk = (y0 * valueRight + y1 * valueLeft) / value;
22812 partition(i, k, valueLeft, x0, y0, x1, yk);
22813 partition(k, j, valueRight, x0, yk, x1, y1);
22814 }
22815 }
22816});
22817
22818
22819/***/ }),
22820
22821/***/ "./node_modules/d3-hierarchy/src/treemap/dice.js":
22822/*!*******************************************************!*\
22823 !*** ./node_modules/d3-hierarchy/src/treemap/dice.js ***!
22824 \*******************************************************/
22825/*! exports provided: default */
22826/***/ (function(module, __webpack_exports__, __webpack_require__) {
22827
22828"use strict";
22829__webpack_require__.r(__webpack_exports__);
22830/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) {
22831 var nodes = parent.children,
22832 node,
22833 i = -1,
22834 n = nodes.length,
22835 k = parent.value && (x1 - x0) / parent.value;
22836
22837 while (++i < n) {
22838 node = nodes[i], node.y0 = y0, node.y1 = y1;
22839 node.x0 = x0, node.x1 = x0 += node.value * k;
22840 }
22841});
22842
22843
22844/***/ }),
22845
22846/***/ "./node_modules/d3-hierarchy/src/treemap/index.js":
22847/*!********************************************************!*\
22848 !*** ./node_modules/d3-hierarchy/src/treemap/index.js ***!
22849 \********************************************************/
22850/*! exports provided: default */
22851/***/ (function(module, __webpack_exports__, __webpack_require__) {
22852
22853"use strict";
22854__webpack_require__.r(__webpack_exports__);
22855/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-hierarchy/src/treemap/round.js");
22856/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js");
22857/* harmony import */ var _accessors_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../accessors.js */ "./node_modules/d3-hierarchy/src/accessors.js");
22858/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-hierarchy/src/constant.js");
22859
22860
22861
22862
22863
22864/* harmony default export */ __webpack_exports__["default"] = (function() {
22865 var tile = _squarify_js__WEBPACK_IMPORTED_MODULE_1__["default"],
22866 round = false,
22867 dx = 1,
22868 dy = 1,
22869 paddingStack = [0],
22870 paddingInner = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"],
22871 paddingTop = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"],
22872 paddingRight = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"],
22873 paddingBottom = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"],
22874 paddingLeft = _constant_js__WEBPACK_IMPORTED_MODULE_3__["constantZero"];
22875
22876 function treemap(root) {
22877 root.x0 =
22878 root.y0 = 0;
22879 root.x1 = dx;
22880 root.y1 = dy;
22881 root.eachBefore(positionNode);
22882 paddingStack = [0];
22883 if (round) root.eachBefore(_round_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
22884 return root;
22885 }
22886
22887 function positionNode(node) {
22888 var p = paddingStack[node.depth],
22889 x0 = node.x0 + p,
22890 y0 = node.y0 + p,
22891 x1 = node.x1 - p,
22892 y1 = node.y1 - p;
22893 if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
22894 if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
22895 node.x0 = x0;
22896 node.y0 = y0;
22897 node.x1 = x1;
22898 node.y1 = y1;
22899 if (node.children) {
22900 p = paddingStack[node.depth + 1] = paddingInner(node) / 2;
22901 x0 += paddingLeft(node) - p;
22902 y0 += paddingTop(node) - p;
22903 x1 -= paddingRight(node) - p;
22904 y1 -= paddingBottom(node) - p;
22905 if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
22906 if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
22907 tile(node, x0, y0, x1, y1);
22908 }
22909 }
22910
22911 treemap.round = function(x) {
22912 return arguments.length ? (round = !!x, treemap) : round;
22913 };
22914
22915 treemap.size = function(x) {
22916 return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy];
22917 };
22918
22919 treemap.tile = function(x) {
22920 return arguments.length ? (tile = Object(_accessors_js__WEBPACK_IMPORTED_MODULE_2__["required"])(x), treemap) : tile;
22921 };
22922
22923 treemap.padding = function(x) {
22924 return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner();
22925 };
22926
22927 treemap.paddingInner = function(x) {
22928 return arguments.length ? (paddingInner = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingInner;
22929 };
22930
22931 treemap.paddingOuter = function(x) {
22932 return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop();
22933 };
22934
22935 treemap.paddingTop = function(x) {
22936 return arguments.length ? (paddingTop = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingTop;
22937 };
22938
22939 treemap.paddingRight = function(x) {
22940 return arguments.length ? (paddingRight = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingRight;
22941 };
22942
22943 treemap.paddingBottom = function(x) {
22944 return arguments.length ? (paddingBottom = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingBottom;
22945 };
22946
22947 treemap.paddingLeft = function(x) {
22948 return arguments.length ? (paddingLeft = typeof x === "function" ? x : Object(_constant_js__WEBPACK_IMPORTED_MODULE_3__["default"])(+x), treemap) : paddingLeft;
22949 };
22950
22951 return treemap;
22952});
22953
22954
22955/***/ }),
22956
22957/***/ "./node_modules/d3-hierarchy/src/treemap/resquarify.js":
22958/*!*************************************************************!*\
22959 !*** ./node_modules/d3-hierarchy/src/treemap/resquarify.js ***!
22960 \*************************************************************/
22961/*! exports provided: default */
22962/***/ (function(module, __webpack_exports__, __webpack_require__) {
22963
22964"use strict";
22965__webpack_require__.r(__webpack_exports__);
22966/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js");
22967/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js");
22968/* harmony import */ var _squarify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./squarify.js */ "./node_modules/d3-hierarchy/src/treemap/squarify.js");
22969
22970
22971
22972
22973/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) {
22974
22975 function resquarify(parent, x0, y0, x1, y1) {
22976 if ((rows = parent._squarify) && (rows.ratio === ratio)) {
22977 var rows,
22978 row,
22979 nodes,
22980 i,
22981 j = -1,
22982 n,
22983 m = rows.length,
22984 value = parent.value;
22985
22986 while (++j < m) {
22987 row = rows[j], nodes = row.children;
22988 for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
22989 if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);
22990 else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);
22991 value -= row.value;
22992 }
22993 } else {
22994 parent._squarify = rows = Object(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["squarifyRatio"])(ratio, parent, x0, y0, x1, y1);
22995 rows.ratio = ratio;
22996 }
22997 }
22998
22999 resquarify.ratio = function(x) {
23000 return custom((x = +x) > 1 ? x : 1);
23001 };
23002
23003 return resquarify;
23004})(_squarify_js__WEBPACK_IMPORTED_MODULE_2__["phi"]));
23005
23006
23007/***/ }),
23008
23009/***/ "./node_modules/d3-hierarchy/src/treemap/round.js":
23010/*!********************************************************!*\
23011 !*** ./node_modules/d3-hierarchy/src/treemap/round.js ***!
23012 \********************************************************/
23013/*! exports provided: default */
23014/***/ (function(module, __webpack_exports__, __webpack_require__) {
23015
23016"use strict";
23017__webpack_require__.r(__webpack_exports__);
23018/* harmony default export */ __webpack_exports__["default"] = (function(node) {
23019 node.x0 = Math.round(node.x0);
23020 node.y0 = Math.round(node.y0);
23021 node.x1 = Math.round(node.x1);
23022 node.y1 = Math.round(node.y1);
23023});
23024
23025
23026/***/ }),
23027
23028/***/ "./node_modules/d3-hierarchy/src/treemap/slice.js":
23029/*!********************************************************!*\
23030 !*** ./node_modules/d3-hierarchy/src/treemap/slice.js ***!
23031 \********************************************************/
23032/*! exports provided: default */
23033/***/ (function(module, __webpack_exports__, __webpack_require__) {
23034
23035"use strict";
23036__webpack_require__.r(__webpack_exports__);
23037/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) {
23038 var nodes = parent.children,
23039 node,
23040 i = -1,
23041 n = nodes.length,
23042 k = parent.value && (y1 - y0) / parent.value;
23043
23044 while (++i < n) {
23045 node = nodes[i], node.x0 = x0, node.x1 = x1;
23046 node.y0 = y0, node.y1 = y0 += node.value * k;
23047 }
23048});
23049
23050
23051/***/ }),
23052
23053/***/ "./node_modules/d3-hierarchy/src/treemap/sliceDice.js":
23054/*!************************************************************!*\
23055 !*** ./node_modules/d3-hierarchy/src/treemap/sliceDice.js ***!
23056 \************************************************************/
23057/*! exports provided: default */
23058/***/ (function(module, __webpack_exports__, __webpack_require__) {
23059
23060"use strict";
23061__webpack_require__.r(__webpack_exports__);
23062/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js");
23063/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js");
23064
23065
23066
23067/* harmony default export */ __webpack_exports__["default"] = (function(parent, x0, y0, x1, y1) {
23068 (parent.depth & 1 ? _slice_js__WEBPACK_IMPORTED_MODULE_1__["default"] : _dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(parent, x0, y0, x1, y1);
23069});
23070
23071
23072/***/ }),
23073
23074/***/ "./node_modules/d3-hierarchy/src/treemap/squarify.js":
23075/*!***********************************************************!*\
23076 !*** ./node_modules/d3-hierarchy/src/treemap/squarify.js ***!
23077 \***********************************************************/
23078/*! exports provided: phi, squarifyRatio, default */
23079/***/ (function(module, __webpack_exports__, __webpack_require__) {
23080
23081"use strict";
23082__webpack_require__.r(__webpack_exports__);
23083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "phi", function() { return phi; });
23084/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "squarifyRatio", function() { return squarifyRatio; });
23085/* harmony import */ var _dice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dice.js */ "./node_modules/d3-hierarchy/src/treemap/dice.js");
23086/* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/d3-hierarchy/src/treemap/slice.js");
23087
23088
23089
23090var phi = (1 + Math.sqrt(5)) / 2;
23091
23092function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
23093 var rows = [],
23094 nodes = parent.children,
23095 row,
23096 nodeValue,
23097 i0 = 0,
23098 i1 = 0,
23099 n = nodes.length,
23100 dx, dy,
23101 value = parent.value,
23102 sumValue,
23103 minValue,
23104 maxValue,
23105 newRatio,
23106 minRatio,
23107 alpha,
23108 beta;
23109
23110 while (i0 < n) {
23111 dx = x1 - x0, dy = y1 - y0;
23112
23113 // Find the next non-empty node.
23114 do sumValue = nodes[i1++].value; while (!sumValue && i1 < n);
23115 minValue = maxValue = sumValue;
23116 alpha = Math.max(dy / dx, dx / dy) / (value * ratio);
23117 beta = sumValue * sumValue * alpha;
23118 minRatio = Math.max(maxValue / beta, beta / minValue);
23119
23120 // Keep adding nodes while the aspect ratio maintains or improves.
23121 for (; i1 < n; ++i1) {
23122 sumValue += nodeValue = nodes[i1].value;
23123 if (nodeValue < minValue) minValue = nodeValue;
23124 if (nodeValue > maxValue) maxValue = nodeValue;
23125 beta = sumValue * sumValue * alpha;
23126 newRatio = Math.max(maxValue / beta, beta / minValue);
23127 if (newRatio > minRatio) { sumValue -= nodeValue; break; }
23128 minRatio = newRatio;
23129 }
23130
23131 // Position and record the row orientation.
23132 rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)});
23133 if (row.dice) Object(_dice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
23134 else Object(_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
23135 value -= sumValue, i0 = i1;
23136 }
23137
23138 return rows;
23139}
23140
23141/* harmony default export */ __webpack_exports__["default"] = ((function custom(ratio) {
23142
23143 function squarify(parent, x0, y0, x1, y1) {
23144 squarifyRatio(ratio, parent, x0, y0, x1, y1);
23145 }
23146
23147 squarify.ratio = function(x) {
23148 return custom((x = +x) > 1 ? x : 1);
23149 };
23150
23151 return squarify;
23152})(phi));
23153
23154
23155/***/ }),
23156
23157/***/ "./node_modules/d3-interpolate/src/array.js":
23158/*!**************************************************!*\
23159 !*** ./node_modules/d3-interpolate/src/array.js ***!
23160 \**************************************************/
23161/*! exports provided: default, genericArray */
23162/***/ (function(module, __webpack_exports__, __webpack_require__) {
23163
23164"use strict";
23165__webpack_require__.r(__webpack_exports__);
23166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "genericArray", function() { return genericArray; });
23167/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js");
23168/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js");
23169
23170
23171
23172/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23173 return (Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_1__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_1__["default"] : genericArray)(a, b);
23174});
23175
23176function genericArray(a, b) {
23177 var nb = b ? b.length : 0,
23178 na = a ? Math.min(nb, a.length) : 0,
23179 x = new Array(na),
23180 c = new Array(nb),
23181 i;
23182
23183 for (i = 0; i < na; ++i) x[i] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[i], b[i]);
23184 for (; i < nb; ++i) c[i] = b[i];
23185
23186 return function(t) {
23187 for (i = 0; i < na; ++i) c[i] = x[i](t);
23188 return c;
23189 };
23190}
23191
23192
23193/***/ }),
23194
23195/***/ "./node_modules/d3-interpolate/src/basis.js":
23196/*!**************************************************!*\
23197 !*** ./node_modules/d3-interpolate/src/basis.js ***!
23198 \**************************************************/
23199/*! exports provided: basis, default */
23200/***/ (function(module, __webpack_exports__, __webpack_require__) {
23201
23202"use strict";
23203__webpack_require__.r(__webpack_exports__);
23204/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "basis", function() { return basis; });
23205function basis(t1, v0, v1, v2, v3) {
23206 var t2 = t1 * t1, t3 = t2 * t1;
23207 return ((1 - 3 * t1 + 3 * t2 - t3) * v0
23208 + (4 - 6 * t2 + 3 * t3) * v1
23209 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2
23210 + t3 * v3) / 6;
23211}
23212
23213/* harmony default export */ __webpack_exports__["default"] = (function(values) {
23214 var n = values.length - 1;
23215 return function(t) {
23216 var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),
23217 v1 = values[i],
23218 v2 = values[i + 1],
23219 v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,
23220 v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;
23221 return basis((t - i / n) * n, v0, v1, v2, v3);
23222 };
23223});
23224
23225
23226/***/ }),
23227
23228/***/ "./node_modules/d3-interpolate/src/basisClosed.js":
23229/*!********************************************************!*\
23230 !*** ./node_modules/d3-interpolate/src/basisClosed.js ***!
23231 \********************************************************/
23232/*! exports provided: default */
23233/***/ (function(module, __webpack_exports__, __webpack_require__) {
23234
23235"use strict";
23236__webpack_require__.r(__webpack_exports__);
23237/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js");
23238
23239
23240/* harmony default export */ __webpack_exports__["default"] = (function(values) {
23241 var n = values.length;
23242 return function(t) {
23243 var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),
23244 v0 = values[(i + n - 1) % n],
23245 v1 = values[i % n],
23246 v2 = values[(i + 1) % n],
23247 v3 = values[(i + 2) % n];
23248 return Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["basis"])((t - i / n) * n, v0, v1, v2, v3);
23249 };
23250});
23251
23252
23253/***/ }),
23254
23255/***/ "./node_modules/d3-interpolate/src/color.js":
23256/*!**************************************************!*\
23257 !*** ./node_modules/d3-interpolate/src/color.js ***!
23258 \**************************************************/
23259/*! exports provided: hue, gamma, default */
23260/***/ (function(module, __webpack_exports__, __webpack_require__) {
23261
23262"use strict";
23263__webpack_require__.r(__webpack_exports__);
23264/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hue", function() { return hue; });
23265/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gamma", function() { return gamma; });
23266/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nogamma; });
23267/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js");
23268
23269
23270function linear(a, d) {
23271 return function(t) {
23272 return a + t * d;
23273 };
23274}
23275
23276function exponential(a, b, y) {
23277 return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {
23278 return Math.pow(a + t * b, y);
23279 };
23280}
23281
23282function hue(a, b) {
23283 var d = b - a;
23284 return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a);
23285}
23286
23287function gamma(y) {
23288 return (y = +y) === 1 ? nogamma : function(a, b) {
23289 return b - a ? exponential(a, b, y) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a);
23290 };
23291}
23292
23293function nogamma(a, b) {
23294 var d = b - a;
23295 return d ? linear(a, d) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(isNaN(a) ? b : a);
23296}
23297
23298
23299/***/ }),
23300
23301/***/ "./node_modules/d3-interpolate/src/constant.js":
23302/*!*****************************************************!*\
23303 !*** ./node_modules/d3-interpolate/src/constant.js ***!
23304 \*****************************************************/
23305/*! exports provided: default */
23306/***/ (function(module, __webpack_exports__, __webpack_require__) {
23307
23308"use strict";
23309__webpack_require__.r(__webpack_exports__);
23310/* harmony default export */ __webpack_exports__["default"] = (function(x) {
23311 return function() {
23312 return x;
23313 };
23314});
23315
23316
23317/***/ }),
23318
23319/***/ "./node_modules/d3-interpolate/src/cubehelix.js":
23320/*!******************************************************!*\
23321 !*** ./node_modules/d3-interpolate/src/cubehelix.js ***!
23322 \******************************************************/
23323/*! exports provided: default, cubehelixLong */
23324/***/ (function(module, __webpack_exports__, __webpack_require__) {
23325
23326"use strict";
23327__webpack_require__.r(__webpack_exports__);
23328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cubehelixLong", function() { return cubehelixLong; });
23329/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
23330/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23331
23332
23333
23334function cubehelix(hue) {
23335 return (function cubehelixGamma(y) {
23336 y = +y;
23337
23338 function cubehelix(start, end) {
23339 var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(end)).h),
23340 s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s),
23341 l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l),
23342 opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity);
23343 return function(t) {
23344 start.h = h(t);
23345 start.s = s(t);
23346 start.l = l(Math.pow(t, y));
23347 start.opacity = opacity(t);
23348 return start + "";
23349 };
23350 }
23351
23352 cubehelix.gamma = cubehelixGamma;
23353
23354 return cubehelix;
23355 })(1);
23356}
23357
23358/* harmony default export */ __webpack_exports__["default"] = (cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"]));
23359var cubehelixLong = cubehelix(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]);
23360
23361
23362/***/ }),
23363
23364/***/ "./node_modules/d3-interpolate/src/date.js":
23365/*!*************************************************!*\
23366 !*** ./node_modules/d3-interpolate/src/date.js ***!
23367 \*************************************************/
23368/*! exports provided: default */
23369/***/ (function(module, __webpack_exports__, __webpack_require__) {
23370
23371"use strict";
23372__webpack_require__.r(__webpack_exports__);
23373/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23374 var d = new Date;
23375 return a = +a, b = +b, function(t) {
23376 return d.setTime(a * (1 - t) + b * t), d;
23377 };
23378});
23379
23380
23381/***/ }),
23382
23383/***/ "./node_modules/d3-interpolate/src/discrete.js":
23384/*!*****************************************************!*\
23385 !*** ./node_modules/d3-interpolate/src/discrete.js ***!
23386 \*****************************************************/
23387/*! exports provided: default */
23388/***/ (function(module, __webpack_exports__, __webpack_require__) {
23389
23390"use strict";
23391__webpack_require__.r(__webpack_exports__);
23392/* harmony default export */ __webpack_exports__["default"] = (function(range) {
23393 var n = range.length;
23394 return function(t) {
23395 return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
23396 };
23397});
23398
23399
23400/***/ }),
23401
23402/***/ "./node_modules/d3-interpolate/src/hcl.js":
23403/*!************************************************!*\
23404 !*** ./node_modules/d3-interpolate/src/hcl.js ***!
23405 \************************************************/
23406/*! exports provided: default, hclLong */
23407/***/ (function(module, __webpack_exports__, __webpack_require__) {
23408
23409"use strict";
23410__webpack_require__.r(__webpack_exports__);
23411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hclLong", function() { return hclLong; });
23412/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
23413/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23414
23415
23416
23417function hcl(hue) {
23418 return function(start, end) {
23419 var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hcl"])(end)).h),
23420 c = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.c, end.c),
23421 l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l),
23422 opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity);
23423 return function(t) {
23424 start.h = h(t);
23425 start.c = c(t);
23426 start.l = l(t);
23427 start.opacity = opacity(t);
23428 return start + "";
23429 };
23430 }
23431}
23432
23433/* harmony default export */ __webpack_exports__["default"] = (hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"]));
23434var hclLong = hcl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]);
23435
23436
23437/***/ }),
23438
23439/***/ "./node_modules/d3-interpolate/src/hsl.js":
23440/*!************************************************!*\
23441 !*** ./node_modules/d3-interpolate/src/hsl.js ***!
23442 \************************************************/
23443/*! exports provided: default, hslLong */
23444/***/ (function(module, __webpack_exports__, __webpack_require__) {
23445
23446"use strict";
23447__webpack_require__.r(__webpack_exports__);
23448/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hslLong", function() { return hslLong; });
23449/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
23450/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23451
23452
23453
23454function hsl(hue) {
23455 return function(start, end) {
23456 var h = hue((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(start)).h, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["hsl"])(end)).h),
23457 s = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.s, end.s),
23458 l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.l, end.l),
23459 opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity);
23460 return function(t) {
23461 start.h = h(t);
23462 start.s = s(t);
23463 start.l = l(t);
23464 start.opacity = opacity(t);
23465 return start + "";
23466 };
23467 }
23468}
23469
23470/* harmony default export */ __webpack_exports__["default"] = (hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["hue"]));
23471var hslLong = hsl(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"]);
23472
23473
23474/***/ }),
23475
23476/***/ "./node_modules/d3-interpolate/src/hue.js":
23477/*!************************************************!*\
23478 !*** ./node_modules/d3-interpolate/src/hue.js ***!
23479 \************************************************/
23480/*! exports provided: default */
23481/***/ (function(module, __webpack_exports__, __webpack_require__) {
23482
23483"use strict";
23484__webpack_require__.r(__webpack_exports__);
23485/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23486
23487
23488/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23489 var i = Object(_color_js__WEBPACK_IMPORTED_MODULE_0__["hue"])(+a, +b);
23490 return function(t) {
23491 var x = i(t);
23492 return x - 360 * Math.floor(x / 360);
23493 };
23494});
23495
23496
23497/***/ }),
23498
23499/***/ "./node_modules/d3-interpolate/src/index.js":
23500/*!**************************************************!*\
23501 !*** ./node_modules/d3-interpolate/src/index.js ***!
23502 \**************************************************/
23503/*! exports provided: interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize */
23504/***/ (function(module, __webpack_exports__, __webpack_require__) {
23505
23506"use strict";
23507__webpack_require__.r(__webpack_exports__);
23508/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js");
23509/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _value_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
23510
23511/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js");
23512/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return _array_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
23513
23514/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js");
23515/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return _basis_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
23516
23517/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js");
23518/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return _basisClosed_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
23519
23520/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js");
23521/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return _date_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
23522
23523/* harmony import */ var _discrete_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./discrete.js */ "./node_modules/d3-interpolate/src/discrete.js");
23524/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return _discrete_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
23525
23526/* harmony import */ var _hue_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./hue.js */ "./node_modules/d3-interpolate/src/hue.js");
23527/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return _hue_js__WEBPACK_IMPORTED_MODULE_6__["default"]; });
23528
23529/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js");
23530/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return _number_js__WEBPACK_IMPORTED_MODULE_7__["default"]; });
23531
23532/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js");
23533/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
23534
23535/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js");
23536/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return _object_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
23537
23538/* harmony import */ var _round_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./round.js */ "./node_modules/d3-interpolate/src/round.js");
23539/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return _round_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
23540
23541/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js");
23542/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return _string_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
23543
23544/* harmony import */ var _transform_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transform/index.js */ "./node_modules/d3-interpolate/src/transform/index.js");
23545/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformCss"]; });
23546
23547/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return _transform_index_js__WEBPACK_IMPORTED_MODULE_12__["interpolateTransformSvg"]; });
23548
23549/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-interpolate/src/zoom.js");
23550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
23551
23552/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js");
23553/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
23554
23555/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasis"]; });
23556
23557/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return _rgb_js__WEBPACK_IMPORTED_MODULE_14__["rgbBasisClosed"]; });
23558
23559/* harmony import */ var _hsl_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./hsl.js */ "./node_modules/d3-interpolate/src/hsl.js");
23560/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["default"]; });
23561
23562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return _hsl_js__WEBPACK_IMPORTED_MODULE_15__["hslLong"]; });
23563
23564/* harmony import */ var _lab_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./lab.js */ "./node_modules/d3-interpolate/src/lab.js");
23565/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return _lab_js__WEBPACK_IMPORTED_MODULE_16__["default"]; });
23566
23567/* harmony import */ var _hcl_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./hcl.js */ "./node_modules/d3-interpolate/src/hcl.js");
23568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["default"]; });
23569
23570/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return _hcl_js__WEBPACK_IMPORTED_MODULE_17__["hclLong"]; });
23571
23572/* harmony import */ var _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./cubehelix.js */ "./node_modules/d3-interpolate/src/cubehelix.js");
23573/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["default"]; });
23574
23575/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return _cubehelix_js__WEBPACK_IMPORTED_MODULE_18__["cubehelixLong"]; });
23576
23577/* harmony import */ var _piecewise_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./piecewise.js */ "./node_modules/d3-interpolate/src/piecewise.js");
23578/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return _piecewise_js__WEBPACK_IMPORTED_MODULE_19__["default"]; });
23579
23580/* harmony import */ var _quantize_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./quantize.js */ "./node_modules/d3-interpolate/src/quantize.js");
23581/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return _quantize_js__WEBPACK_IMPORTED_MODULE_20__["default"]; });
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606/***/ }),
23607
23608/***/ "./node_modules/d3-interpolate/src/lab.js":
23609/*!************************************************!*\
23610 !*** ./node_modules/d3-interpolate/src/lab.js ***!
23611 \************************************************/
23612/*! exports provided: default */
23613/***/ (function(module, __webpack_exports__, __webpack_require__) {
23614
23615"use strict";
23616__webpack_require__.r(__webpack_exports__);
23617/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lab; });
23618/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
23619/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23620
23621
23622
23623function lab(start, end) {
23624 var l = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(start)).l, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["lab"])(end)).l),
23625 a = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.a, end.a),
23626 b = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.b, end.b),
23627 opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_1__["default"])(start.opacity, end.opacity);
23628 return function(t) {
23629 start.l = l(t);
23630 start.a = a(t);
23631 start.b = b(t);
23632 start.opacity = opacity(t);
23633 return start + "";
23634 };
23635}
23636
23637
23638/***/ }),
23639
23640/***/ "./node_modules/d3-interpolate/src/number.js":
23641/*!***************************************************!*\
23642 !*** ./node_modules/d3-interpolate/src/number.js ***!
23643 \***************************************************/
23644/*! exports provided: default */
23645/***/ (function(module, __webpack_exports__, __webpack_require__) {
23646
23647"use strict";
23648__webpack_require__.r(__webpack_exports__);
23649/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23650 return a = +a, b = +b, function(t) {
23651 return a * (1 - t) + b * t;
23652 };
23653});
23654
23655
23656/***/ }),
23657
23658/***/ "./node_modules/d3-interpolate/src/numberArray.js":
23659/*!********************************************************!*\
23660 !*** ./node_modules/d3-interpolate/src/numberArray.js ***!
23661 \********************************************************/
23662/*! exports provided: default, isNumberArray */
23663/***/ (function(module, __webpack_exports__, __webpack_require__) {
23664
23665"use strict";
23666__webpack_require__.r(__webpack_exports__);
23667/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isNumberArray", function() { return isNumberArray; });
23668/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23669 if (!b) b = [];
23670 var n = a ? Math.min(b.length, a.length) : 0,
23671 c = b.slice(),
23672 i;
23673 return function(t) {
23674 for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
23675 return c;
23676 };
23677});
23678
23679function isNumberArray(x) {
23680 return ArrayBuffer.isView(x) && !(x instanceof DataView);
23681}
23682
23683
23684/***/ }),
23685
23686/***/ "./node_modules/d3-interpolate/src/object.js":
23687/*!***************************************************!*\
23688 !*** ./node_modules/d3-interpolate/src/object.js ***!
23689 \***************************************************/
23690/*! exports provided: default */
23691/***/ (function(module, __webpack_exports__, __webpack_require__) {
23692
23693"use strict";
23694__webpack_require__.r(__webpack_exports__);
23695/* harmony import */ var _value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./value.js */ "./node_modules/d3-interpolate/src/value.js");
23696
23697
23698/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23699 var i = {},
23700 c = {},
23701 k;
23702
23703 if (a === null || typeof a !== "object") a = {};
23704 if (b === null || typeof b !== "object") b = {};
23705
23706 for (k in b) {
23707 if (k in a) {
23708 i[k] = Object(_value_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a[k], b[k]);
23709 } else {
23710 c[k] = b[k];
23711 }
23712 }
23713
23714 return function(t) {
23715 for (k in i) c[k] = i[k](t);
23716 return c;
23717 };
23718});
23719
23720
23721/***/ }),
23722
23723/***/ "./node_modules/d3-interpolate/src/piecewise.js":
23724/*!******************************************************!*\
23725 !*** ./node_modules/d3-interpolate/src/piecewise.js ***!
23726 \******************************************************/
23727/*! exports provided: default */
23728/***/ (function(module, __webpack_exports__, __webpack_require__) {
23729
23730"use strict";
23731__webpack_require__.r(__webpack_exports__);
23732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return piecewise; });
23733function piecewise(interpolate, values) {
23734 var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
23735 while (i < n) I[i] = interpolate(v, v = values[++i]);
23736 return function(t) {
23737 var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
23738 return I[i](t - i);
23739 };
23740}
23741
23742
23743/***/ }),
23744
23745/***/ "./node_modules/d3-interpolate/src/quantize.js":
23746/*!*****************************************************!*\
23747 !*** ./node_modules/d3-interpolate/src/quantize.js ***!
23748 \*****************************************************/
23749/*! exports provided: default */
23750/***/ (function(module, __webpack_exports__, __webpack_require__) {
23751
23752"use strict";
23753__webpack_require__.r(__webpack_exports__);
23754/* harmony default export */ __webpack_exports__["default"] = (function(interpolator, n) {
23755 var samples = new Array(n);
23756 for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
23757 return samples;
23758});
23759
23760
23761/***/ }),
23762
23763/***/ "./node_modules/d3-interpolate/src/rgb.js":
23764/*!************************************************!*\
23765 !*** ./node_modules/d3-interpolate/src/rgb.js ***!
23766 \************************************************/
23767/*! exports provided: default, rgbBasis, rgbBasisClosed */
23768/***/ (function(module, __webpack_exports__, __webpack_require__) {
23769
23770"use strict";
23771__webpack_require__.r(__webpack_exports__);
23772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasis", function() { return rgbBasis; });
23773/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rgbBasisClosed", function() { return rgbBasisClosed; });
23774/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
23775/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-interpolate/src/basis.js");
23776/* harmony import */ var _basisClosed_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./basisClosed.js */ "./node_modules/d3-interpolate/src/basisClosed.js");
23777/* harmony import */ var _color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./color.js */ "./node_modules/d3-interpolate/src/color.js");
23778
23779
23780
23781
23782
23783/* harmony default export */ __webpack_exports__["default"] = ((function rgbGamma(y) {
23784 var color = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["gamma"])(y);
23785
23786 function rgb(start, end) {
23787 var r = color((start = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(start)).r, (end = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(end)).r),
23788 g = color(start.g, end.g),
23789 b = color(start.b, end.b),
23790 opacity = Object(_color_js__WEBPACK_IMPORTED_MODULE_3__["default"])(start.opacity, end.opacity);
23791 return function(t) {
23792 start.r = r(t);
23793 start.g = g(t);
23794 start.b = b(t);
23795 start.opacity = opacity(t);
23796 return start + "";
23797 };
23798 }
23799
23800 rgb.gamma = rgbGamma;
23801
23802 return rgb;
23803})(1));
23804
23805function rgbSpline(spline) {
23806 return function(colors) {
23807 var n = colors.length,
23808 r = new Array(n),
23809 g = new Array(n),
23810 b = new Array(n),
23811 i, color;
23812 for (i = 0; i < n; ++i) {
23813 color = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(colors[i]);
23814 r[i] = color.r || 0;
23815 g[i] = color.g || 0;
23816 b[i] = color.b || 0;
23817 }
23818 r = spline(r);
23819 g = spline(g);
23820 b = spline(b);
23821 color.opacity = 1;
23822 return function(t) {
23823 color.r = r(t);
23824 color.g = g(t);
23825 color.b = b(t);
23826 return color + "";
23827 };
23828 };
23829}
23830
23831var rgbBasis = rgbSpline(_basis_js__WEBPACK_IMPORTED_MODULE_1__["default"]);
23832var rgbBasisClosed = rgbSpline(_basisClosed_js__WEBPACK_IMPORTED_MODULE_2__["default"]);
23833
23834
23835/***/ }),
23836
23837/***/ "./node_modules/d3-interpolate/src/round.js":
23838/*!**************************************************!*\
23839 !*** ./node_modules/d3-interpolate/src/round.js ***!
23840 \**************************************************/
23841/*! exports provided: default */
23842/***/ (function(module, __webpack_exports__, __webpack_require__) {
23843
23844"use strict";
23845__webpack_require__.r(__webpack_exports__);
23846/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23847 return a = +a, b = +b, function(t) {
23848 return Math.round(a * (1 - t) + b * t);
23849 };
23850});
23851
23852
23853/***/ }),
23854
23855/***/ "./node_modules/d3-interpolate/src/string.js":
23856/*!***************************************************!*\
23857 !*** ./node_modules/d3-interpolate/src/string.js ***!
23858 \***************************************************/
23859/*! exports provided: default */
23860/***/ (function(module, __webpack_exports__, __webpack_require__) {
23861
23862"use strict";
23863__webpack_require__.r(__webpack_exports__);
23864/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js");
23865
23866
23867var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
23868 reB = new RegExp(reA.source, "g");
23869
23870function zero(b) {
23871 return function() {
23872 return b;
23873 };
23874}
23875
23876function one(b) {
23877 return function(t) {
23878 return b(t) + "";
23879 };
23880}
23881
23882/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
23883 var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b
23884 am, // current match in a
23885 bm, // current match in b
23886 bs, // string preceding current number in b, if any
23887 i = -1, // index in s
23888 s = [], // string constants and placeholders
23889 q = []; // number interpolators
23890
23891 // Coerce inputs to strings.
23892 a = a + "", b = b + "";
23893
23894 // Interpolate pairs of numbers in a & b.
23895 while ((am = reA.exec(a))
23896 && (bm = reB.exec(b))) {
23897 if ((bs = bm.index) > bi) { // a string precedes the next number in b
23898 bs = b.slice(bi, bs);
23899 if (s[i]) s[i] += bs; // coalesce with previous string
23900 else s[++i] = bs;
23901 }
23902 if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match
23903 if (s[i]) s[i] += bm; // coalesce with previous string
23904 else s[++i] = bm;
23905 } else { // interpolate non-matching numbers
23906 s[++i] = null;
23907 q.push({i: i, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(am, bm)});
23908 }
23909 bi = reB.lastIndex;
23910 }
23911
23912 // Add remains of b.
23913 if (bi < b.length) {
23914 bs = b.slice(bi);
23915 if (s[i]) s[i] += bs; // coalesce with previous string
23916 else s[++i] = bs;
23917 }
23918
23919 // Special optimization for only a single match.
23920 // Otherwise, interpolate each of the numbers and rejoin the string.
23921 return s.length < 2 ? (q[0]
23922 ? one(q[0].x)
23923 : zero(b))
23924 : (b = q.length, function(t) {
23925 for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);
23926 return s.join("");
23927 });
23928});
23929
23930
23931/***/ }),
23932
23933/***/ "./node_modules/d3-interpolate/src/transform/decompose.js":
23934/*!****************************************************************!*\
23935 !*** ./node_modules/d3-interpolate/src/transform/decompose.js ***!
23936 \****************************************************************/
23937/*! exports provided: identity, default */
23938/***/ (function(module, __webpack_exports__, __webpack_require__) {
23939
23940"use strict";
23941__webpack_require__.r(__webpack_exports__);
23942/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
23943var degrees = 180 / Math.PI;
23944
23945var identity = {
23946 translateX: 0,
23947 translateY: 0,
23948 rotate: 0,
23949 skewX: 0,
23950 scaleX: 1,
23951 scaleY: 1
23952};
23953
23954/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c, d, e, f) {
23955 var scaleX, scaleY, skewX;
23956 if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
23957 if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
23958 if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
23959 if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
23960 return {
23961 translateX: e,
23962 translateY: f,
23963 rotate: Math.atan2(b, a) * degrees,
23964 skewX: Math.atan(skewX) * degrees,
23965 scaleX: scaleX,
23966 scaleY: scaleY
23967 };
23968});
23969
23970
23971/***/ }),
23972
23973/***/ "./node_modules/d3-interpolate/src/transform/index.js":
23974/*!************************************************************!*\
23975 !*** ./node_modules/d3-interpolate/src/transform/index.js ***!
23976 \************************************************************/
23977/*! exports provided: interpolateTransformCss, interpolateTransformSvg */
23978/***/ (function(module, __webpack_exports__, __webpack_require__) {
23979
23980"use strict";
23981__webpack_require__.r(__webpack_exports__);
23982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; });
23983/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; });
23984/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../number.js */ "./node_modules/d3-interpolate/src/number.js");
23985/* harmony import */ var _parse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parse.js */ "./node_modules/d3-interpolate/src/transform/parse.js");
23986
23987
23988
23989function interpolateTransform(parse, pxComma, pxParen, degParen) {
23990
23991 function pop(s) {
23992 return s.length ? s.pop() + " " : "";
23993 }
23994
23995 function translate(xa, ya, xb, yb, s, q) {
23996 if (xa !== xb || ya !== yb) {
23997 var i = s.push("translate(", null, pxComma, null, pxParen);
23998 q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)});
23999 } else if (xb || yb) {
24000 s.push("translate(" + xb + pxComma + yb + pxParen);
24001 }
24002 }
24003
24004 function rotate(a, b, s, q) {
24005 if (a !== b) {
24006 if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path
24007 q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)});
24008 } else if (b) {
24009 s.push(pop(s) + "rotate(" + b + degParen);
24010 }
24011 }
24012
24013 function skewX(a, b, s, q) {
24014 if (a !== b) {
24015 q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b)});
24016 } else if (b) {
24017 s.push(pop(s) + "skewX(" + b + degParen);
24018 }
24019 }
24020
24021 function scale(xa, ya, xb, yb, s, q) {
24022 if (xa !== xb || ya !== yb) {
24023 var i = s.push(pop(s) + "scale(", null, ",", null, ")");
24024 q.push({i: i - 4, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xa, xb)}, {i: i - 2, x: Object(_number_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ya, yb)});
24025 } else if (xb !== 1 || yb !== 1) {
24026 s.push(pop(s) + "scale(" + xb + "," + yb + ")");
24027 }
24028 }
24029
24030 return function(a, b) {
24031 var s = [], // string constants and placeholders
24032 q = []; // number interpolators
24033 a = parse(a), b = parse(b);
24034 translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);
24035 rotate(a.rotate, b.rotate, s, q);
24036 skewX(a.skewX, b.skewX, s, q);
24037 scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);
24038 a = b = null; // gc
24039 return function(t) {
24040 var i = -1, n = q.length, o;
24041 while (++i < n) s[(o = q[i]).i] = o.x(t);
24042 return s.join("");
24043 };
24044 };
24045}
24046
24047var interpolateTransformCss = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseCss"], "px, ", "px)", "deg)");
24048var interpolateTransformSvg = interpolateTransform(_parse_js__WEBPACK_IMPORTED_MODULE_1__["parseSvg"], ", ", ")", ")");
24049
24050
24051/***/ }),
24052
24053/***/ "./node_modules/d3-interpolate/src/transform/parse.js":
24054/*!************************************************************!*\
24055 !*** ./node_modules/d3-interpolate/src/transform/parse.js ***!
24056 \************************************************************/
24057/*! exports provided: parseCss, parseSvg */
24058/***/ (function(module, __webpack_exports__, __webpack_require__) {
24059
24060"use strict";
24061__webpack_require__.r(__webpack_exports__);
24062/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCss", function() { return parseCss; });
24063/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseSvg", function() { return parseSvg; });
24064/* harmony import */ var _decompose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./decompose.js */ "./node_modules/d3-interpolate/src/transform/decompose.js");
24065
24066
24067var cssNode,
24068 cssRoot,
24069 cssView,
24070 svgNode;
24071
24072function parseCss(value) {
24073 if (value === "none") return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"];
24074 if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView;
24075 cssNode.style.transform = value;
24076 value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform");
24077 cssRoot.removeChild(cssNode);
24078 value = value.slice(7, -1).split(",");
24079 return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]);
24080}
24081
24082function parseSvg(value) {
24083 if (value == null) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"];
24084 if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
24085 svgNode.setAttribute("transform", value);
24086 if (!(value = svgNode.transform.baseVal.consolidate())) return _decompose_js__WEBPACK_IMPORTED_MODULE_0__["identity"];
24087 value = value.matrix;
24088 return Object(_decompose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value.a, value.b, value.c, value.d, value.e, value.f);
24089}
24090
24091
24092/***/ }),
24093
24094/***/ "./node_modules/d3-interpolate/src/value.js":
24095/*!**************************************************!*\
24096 !*** ./node_modules/d3-interpolate/src/value.js ***!
24097 \**************************************************/
24098/*! exports provided: default */
24099/***/ (function(module, __webpack_exports__, __webpack_require__) {
24100
24101"use strict";
24102__webpack_require__.r(__webpack_exports__);
24103/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
24104/* harmony import */ var _rgb_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgb.js */ "./node_modules/d3-interpolate/src/rgb.js");
24105/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-interpolate/src/array.js");
24106/* harmony import */ var _date_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./date.js */ "./node_modules/d3-interpolate/src/date.js");
24107/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number.js */ "./node_modules/d3-interpolate/src/number.js");
24108/* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./object.js */ "./node_modules/d3-interpolate/src/object.js");
24109/* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./string.js */ "./node_modules/d3-interpolate/src/string.js");
24110/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-interpolate/src/constant.js");
24111/* harmony import */ var _numberArray_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./numberArray.js */ "./node_modules/d3-interpolate/src/numberArray.js");
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
24123 var t = typeof b, c;
24124 return b == null || t === "boolean" ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_7__["default"])(b)
24125 : (t === "number" ? _number_js__WEBPACK_IMPORTED_MODULE_4__["default"]
24126 : t === "string" ? ((c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]) : _string_js__WEBPACK_IMPORTED_MODULE_6__["default"])
24127 : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? _rgb_js__WEBPACK_IMPORTED_MODULE_1__["default"]
24128 : b instanceof Date ? _date_js__WEBPACK_IMPORTED_MODULE_3__["default"]
24129 : Object(_numberArray_js__WEBPACK_IMPORTED_MODULE_8__["isNumberArray"])(b) ? _numberArray_js__WEBPACK_IMPORTED_MODULE_8__["default"]
24130 : Array.isArray(b) ? _array_js__WEBPACK_IMPORTED_MODULE_2__["genericArray"]
24131 : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? _object_js__WEBPACK_IMPORTED_MODULE_5__["default"]
24132 : _number_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b);
24133});
24134
24135
24136/***/ }),
24137
24138/***/ "./node_modules/d3-interpolate/src/zoom.js":
24139/*!*************************************************!*\
24140 !*** ./node_modules/d3-interpolate/src/zoom.js ***!
24141 \*************************************************/
24142/*! exports provided: default */
24143/***/ (function(module, __webpack_exports__, __webpack_require__) {
24144
24145"use strict";
24146__webpack_require__.r(__webpack_exports__);
24147var rho = Math.SQRT2,
24148 rho2 = 2,
24149 rho4 = 4,
24150 epsilon2 = 1e-12;
24151
24152function cosh(x) {
24153 return ((x = Math.exp(x)) + 1 / x) / 2;
24154}
24155
24156function sinh(x) {
24157 return ((x = Math.exp(x)) - 1 / x) / 2;
24158}
24159
24160function tanh(x) {
24161 return ((x = Math.exp(2 * x)) - 1) / (x + 1);
24162}
24163
24164// p0 = [ux0, uy0, w0]
24165// p1 = [ux1, uy1, w1]
24166/* harmony default export */ __webpack_exports__["default"] = (function(p0, p1) {
24167 var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],
24168 ux1 = p1[0], uy1 = p1[1], w1 = p1[2],
24169 dx = ux1 - ux0,
24170 dy = uy1 - uy0,
24171 d2 = dx * dx + dy * dy,
24172 i,
24173 S;
24174
24175 // Special case for u0 ≅ u1.
24176 if (d2 < epsilon2) {
24177 S = Math.log(w1 / w0) / rho;
24178 i = function(t) {
24179 return [
24180 ux0 + t * dx,
24181 uy0 + t * dy,
24182 w0 * Math.exp(rho * t * S)
24183 ];
24184 }
24185 }
24186
24187 // General case.
24188 else {
24189 var d1 = Math.sqrt(d2),
24190 b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
24191 b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
24192 r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
24193 r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
24194 S = (r1 - r0) / rho;
24195 i = function(t) {
24196 var s = t * S,
24197 coshr0 = cosh(r0),
24198 u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
24199 return [
24200 ux0 + u * dx,
24201 uy0 + u * dy,
24202 w0 * coshr0 / cosh(rho * s + r0)
24203 ];
24204 }
24205 }
24206
24207 i.duration = S * 1000;
24208
24209 return i;
24210});
24211
24212
24213/***/ }),
24214
24215/***/ "./node_modules/d3-path/src/index.js":
24216/*!*******************************************!*\
24217 !*** ./node_modules/d3-path/src/index.js ***!
24218 \*******************************************/
24219/*! exports provided: path */
24220/***/ (function(module, __webpack_exports__, __webpack_require__) {
24221
24222"use strict";
24223__webpack_require__.r(__webpack_exports__);
24224/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "./node_modules/d3-path/src/path.js");
24225/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
24226
24227
24228
24229
24230/***/ }),
24231
24232/***/ "./node_modules/d3-path/src/path.js":
24233/*!******************************************!*\
24234 !*** ./node_modules/d3-path/src/path.js ***!
24235 \******************************************/
24236/*! exports provided: default */
24237/***/ (function(module, __webpack_exports__, __webpack_require__) {
24238
24239"use strict";
24240__webpack_require__.r(__webpack_exports__);
24241var pi = Math.PI,
24242 tau = 2 * pi,
24243 epsilon = 1e-6,
24244 tauEpsilon = tau - epsilon;
24245
24246function Path() {
24247 this._x0 = this._y0 = // start of current subpath
24248 this._x1 = this._y1 = null; // end of current subpath
24249 this._ = "";
24250}
24251
24252function path() {
24253 return new Path;
24254}
24255
24256Path.prototype = path.prototype = {
24257 constructor: Path,
24258 moveTo: function(x, y) {
24259 this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
24260 },
24261 closePath: function() {
24262 if (this._x1 !== null) {
24263 this._x1 = this._x0, this._y1 = this._y0;
24264 this._ += "Z";
24265 }
24266 },
24267 lineTo: function(x, y) {
24268 this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
24269 },
24270 quadraticCurveTo: function(x1, y1, x, y) {
24271 this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
24272 },
24273 bezierCurveTo: function(x1, y1, x2, y2, x, y) {
24274 this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
24275 },
24276 arcTo: function(x1, y1, x2, y2, r) {
24277 x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
24278 var x0 = this._x1,
24279 y0 = this._y1,
24280 x21 = x2 - x1,
24281 y21 = y2 - y1,
24282 x01 = x0 - x1,
24283 y01 = y0 - y1,
24284 l01_2 = x01 * x01 + y01 * y01;
24285
24286 // Is the radius negative? Error.
24287 if (r < 0) throw new Error("negative radius: " + r);
24288
24289 // Is this path empty? Move to (x1,y1).
24290 if (this._x1 === null) {
24291 this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
24292 }
24293
24294 // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
24295 else if (!(l01_2 > epsilon));
24296
24297 // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
24298 // Equivalently, is (x1,y1) coincident with (x2,y2)?
24299 // Or, is the radius zero? Line to (x1,y1).
24300 else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
24301 this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
24302 }
24303
24304 // Otherwise, draw an arc!
24305 else {
24306 var x20 = x2 - x0,
24307 y20 = y2 - y0,
24308 l21_2 = x21 * x21 + y21 * y21,
24309 l20_2 = x20 * x20 + y20 * y20,
24310 l21 = Math.sqrt(l21_2),
24311 l01 = Math.sqrt(l01_2),
24312 l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
24313 t01 = l / l01,
24314 t21 = l / l21;
24315
24316 // If the start tangent is not coincident with (x0,y0), line to.
24317 if (Math.abs(t01 - 1) > epsilon) {
24318 this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
24319 }
24320
24321 this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
24322 }
24323 },
24324 arc: function(x, y, r, a0, a1, ccw) {
24325 x = +x, y = +y, r = +r, ccw = !!ccw;
24326 var dx = r * Math.cos(a0),
24327 dy = r * Math.sin(a0),
24328 x0 = x + dx,
24329 y0 = y + dy,
24330 cw = 1 ^ ccw,
24331 da = ccw ? a0 - a1 : a1 - a0;
24332
24333 // Is the radius negative? Error.
24334 if (r < 0) throw new Error("negative radius: " + r);
24335
24336 // Is this path empty? Move to (x0,y0).
24337 if (this._x1 === null) {
24338 this._ += "M" + x0 + "," + y0;
24339 }
24340
24341 // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
24342 else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
24343 this._ += "L" + x0 + "," + y0;
24344 }
24345
24346 // Is this arc empty? We’re done.
24347 if (!r) return;
24348
24349 // Does the angle go the wrong way? Flip the direction.
24350 if (da < 0) da = da % tau + tau;
24351
24352 // Is this a complete circle? Draw two arcs to complete the circle.
24353 if (da > tauEpsilon) {
24354 this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
24355 }
24356
24357 // Is this arc non-empty? Draw an arc!
24358 else if (da > epsilon) {
24359 this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
24360 }
24361 },
24362 rect: function(x, y, w, h) {
24363 this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z";
24364 },
24365 toString: function() {
24366 return this._;
24367 }
24368};
24369
24370/* harmony default export */ __webpack_exports__["default"] = (path);
24371
24372
24373/***/ }),
24374
24375/***/ "./node_modules/d3-polygon/src/area.js":
24376/*!*********************************************!*\
24377 !*** ./node_modules/d3-polygon/src/area.js ***!
24378 \*********************************************/
24379/*! exports provided: default */
24380/***/ (function(module, __webpack_exports__, __webpack_require__) {
24381
24382"use strict";
24383__webpack_require__.r(__webpack_exports__);
24384/* harmony default export */ __webpack_exports__["default"] = (function(polygon) {
24385 var i = -1,
24386 n = polygon.length,
24387 a,
24388 b = polygon[n - 1],
24389 area = 0;
24390
24391 while (++i < n) {
24392 a = b;
24393 b = polygon[i];
24394 area += a[1] * b[0] - a[0] * b[1];
24395 }
24396
24397 return area / 2;
24398});
24399
24400
24401/***/ }),
24402
24403/***/ "./node_modules/d3-polygon/src/centroid.js":
24404/*!*************************************************!*\
24405 !*** ./node_modules/d3-polygon/src/centroid.js ***!
24406 \*************************************************/
24407/*! exports provided: default */
24408/***/ (function(module, __webpack_exports__, __webpack_require__) {
24409
24410"use strict";
24411__webpack_require__.r(__webpack_exports__);
24412/* harmony default export */ __webpack_exports__["default"] = (function(polygon) {
24413 var i = -1,
24414 n = polygon.length,
24415 x = 0,
24416 y = 0,
24417 a,
24418 b = polygon[n - 1],
24419 c,
24420 k = 0;
24421
24422 while (++i < n) {
24423 a = b;
24424 b = polygon[i];
24425 k += c = a[0] * b[1] - b[0] * a[1];
24426 x += (a[0] + b[0]) * c;
24427 y += (a[1] + b[1]) * c;
24428 }
24429
24430 return k *= 3, [x / k, y / k];
24431});
24432
24433
24434/***/ }),
24435
24436/***/ "./node_modules/d3-polygon/src/contains.js":
24437/*!*************************************************!*\
24438 !*** ./node_modules/d3-polygon/src/contains.js ***!
24439 \*************************************************/
24440/*! exports provided: default */
24441/***/ (function(module, __webpack_exports__, __webpack_require__) {
24442
24443"use strict";
24444__webpack_require__.r(__webpack_exports__);
24445/* harmony default export */ __webpack_exports__["default"] = (function(polygon, point) {
24446 var n = polygon.length,
24447 p = polygon[n - 1],
24448 x = point[0], y = point[1],
24449 x0 = p[0], y0 = p[1],
24450 x1, y1,
24451 inside = false;
24452
24453 for (var i = 0; i < n; ++i) {
24454 p = polygon[i], x1 = p[0], y1 = p[1];
24455 if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside;
24456 x0 = x1, y0 = y1;
24457 }
24458
24459 return inside;
24460});
24461
24462
24463/***/ }),
24464
24465/***/ "./node_modules/d3-polygon/src/cross.js":
24466/*!**********************************************!*\
24467 !*** ./node_modules/d3-polygon/src/cross.js ***!
24468 \**********************************************/
24469/*! exports provided: default */
24470/***/ (function(module, __webpack_exports__, __webpack_require__) {
24471
24472"use strict";
24473__webpack_require__.r(__webpack_exports__);
24474// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of
24475// the 3D cross product in a quadrant I Cartesian coordinate system (+x is
24476// right, +y is up). Returns a positive value if ABC is counter-clockwise,
24477// negative if clockwise, and zero if the points are collinear.
24478/* harmony default export */ __webpack_exports__["default"] = (function(a, b, c) {
24479 return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);
24480});
24481
24482
24483/***/ }),
24484
24485/***/ "./node_modules/d3-polygon/src/hull.js":
24486/*!*********************************************!*\
24487 !*** ./node_modules/d3-polygon/src/hull.js ***!
24488 \*********************************************/
24489/*! exports provided: default */
24490/***/ (function(module, __webpack_exports__, __webpack_require__) {
24491
24492"use strict";
24493__webpack_require__.r(__webpack_exports__);
24494/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cross.js */ "./node_modules/d3-polygon/src/cross.js");
24495
24496
24497function lexicographicOrder(a, b) {
24498 return a[0] - b[0] || a[1] - b[1];
24499}
24500
24501// Computes the upper convex hull per the monotone chain algorithm.
24502// Assumes points.length >= 3, is sorted by x, unique in y.
24503// Returns an array of indices into points in left-to-right order.
24504function computeUpperHullIndexes(points) {
24505 var n = points.length,
24506 indexes = [0, 1],
24507 size = 2;
24508
24509 for (var i = 2; i < n; ++i) {
24510 while (size > 1 && Object(_cross_js__WEBPACK_IMPORTED_MODULE_0__["default"])(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size;
24511 indexes[size++] = i;
24512 }
24513
24514 return indexes.slice(0, size); // remove popped points
24515}
24516
24517/* harmony default export */ __webpack_exports__["default"] = (function(points) {
24518 if ((n = points.length) < 3) return null;
24519
24520 var i,
24521 n,
24522 sortedPoints = new Array(n),
24523 flippedPoints = new Array(n);
24524
24525 for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i];
24526 sortedPoints.sort(lexicographicOrder);
24527 for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]];
24528
24529 var upperIndexes = computeUpperHullIndexes(sortedPoints),
24530 lowerIndexes = computeUpperHullIndexes(flippedPoints);
24531
24532 // Construct the hull polygon, removing possible duplicate endpoints.
24533 var skipLeft = lowerIndexes[0] === upperIndexes[0],
24534 skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1],
24535 hull = [];
24536
24537 // Add upper hull in right-to-l order.
24538 // Then add lower hull in left-to-right order.
24539 for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]);
24540 for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]);
24541
24542 return hull;
24543});
24544
24545
24546/***/ }),
24547
24548/***/ "./node_modules/d3-polygon/src/index.js":
24549/*!**********************************************!*\
24550 !*** ./node_modules/d3-polygon/src/index.js ***!
24551 \**********************************************/
24552/*! exports provided: polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength */
24553/***/ (function(module, __webpack_exports__, __webpack_require__) {
24554
24555"use strict";
24556__webpack_require__.r(__webpack_exports__);
24557/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-polygon/src/area.js");
24558/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return _area_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
24559
24560/* harmony import */ var _centroid_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./centroid.js */ "./node_modules/d3-polygon/src/centroid.js");
24561/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return _centroid_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
24562
24563/* harmony import */ var _hull_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hull.js */ "./node_modules/d3-polygon/src/hull.js");
24564/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return _hull_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
24565
24566/* harmony import */ var _contains_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./contains.js */ "./node_modules/d3-polygon/src/contains.js");
24567/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return _contains_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
24568
24569/* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./length.js */ "./node_modules/d3-polygon/src/length.js");
24570/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return _length_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
24571
24572
24573
24574
24575
24576
24577
24578
24579/***/ }),
24580
24581/***/ "./node_modules/d3-polygon/src/length.js":
24582/*!***********************************************!*\
24583 !*** ./node_modules/d3-polygon/src/length.js ***!
24584 \***********************************************/
24585/*! exports provided: default */
24586/***/ (function(module, __webpack_exports__, __webpack_require__) {
24587
24588"use strict";
24589__webpack_require__.r(__webpack_exports__);
24590/* harmony default export */ __webpack_exports__["default"] = (function(polygon) {
24591 var i = -1,
24592 n = polygon.length,
24593 b = polygon[n - 1],
24594 xa,
24595 ya,
24596 xb = b[0],
24597 yb = b[1],
24598 perimeter = 0;
24599
24600 while (++i < n) {
24601 xa = xb;
24602 ya = yb;
24603 b = polygon[i];
24604 xb = b[0];
24605 yb = b[1];
24606 xa -= xb;
24607 ya -= yb;
24608 perimeter += Math.sqrt(xa * xa + ya * ya);
24609 }
24610
24611 return perimeter;
24612});
24613
24614
24615/***/ }),
24616
24617/***/ "./node_modules/d3-quadtree/src/add.js":
24618/*!*********************************************!*\
24619 !*** ./node_modules/d3-quadtree/src/add.js ***!
24620 \*********************************************/
24621/*! exports provided: default, addAll */
24622/***/ (function(module, __webpack_exports__, __webpack_require__) {
24623
24624"use strict";
24625__webpack_require__.r(__webpack_exports__);
24626/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAll", function() { return addAll; });
24627/* harmony default export */ __webpack_exports__["default"] = (function(d) {
24628 var x = +this._x.call(null, d),
24629 y = +this._y.call(null, d);
24630 return add(this.cover(x, y), x, y, d);
24631});
24632
24633function add(tree, x, y, d) {
24634 if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points
24635
24636 var parent,
24637 node = tree._root,
24638 leaf = {data: d},
24639 x0 = tree._x0,
24640 y0 = tree._y0,
24641 x1 = tree._x1,
24642 y1 = tree._y1,
24643 xm,
24644 ym,
24645 xp,
24646 yp,
24647 right,
24648 bottom,
24649 i,
24650 j;
24651
24652 // If the tree is empty, initialize the root as a leaf.
24653 if (!node) return tree._root = leaf, tree;
24654
24655 // Find the existing leaf for the new point, or add it.
24656 while (node.length) {
24657 if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
24658 if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
24659 if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;
24660 }
24661
24662 // Is the new point is exactly coincident with the existing point?
24663 xp = +tree._x.call(null, node.data);
24664 yp = +tree._y.call(null, node.data);
24665 if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;
24666
24667 // Otherwise, split the leaf node until the old and new point are separated.
24668 do {
24669 parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);
24670 if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
24671 if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
24672 } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));
24673 return parent[j] = node, parent[i] = leaf, tree;
24674}
24675
24676function addAll(data) {
24677 var d, i, n = data.length,
24678 x,
24679 y,
24680 xz = new Array(n),
24681 yz = new Array(n),
24682 x0 = Infinity,
24683 y0 = Infinity,
24684 x1 = -Infinity,
24685 y1 = -Infinity;
24686
24687 // Compute the points and their extent.
24688 for (i = 0; i < n; ++i) {
24689 if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;
24690 xz[i] = x;
24691 yz[i] = y;
24692 if (x < x0) x0 = x;
24693 if (x > x1) x1 = x;
24694 if (y < y0) y0 = y;
24695 if (y > y1) y1 = y;
24696 }
24697
24698 // If there were no (valid) points, abort.
24699 if (x0 > x1 || y0 > y1) return this;
24700
24701 // Expand the tree to cover the new points.
24702 this.cover(x0, y0).cover(x1, y1);
24703
24704 // Add the new points.
24705 for (i = 0; i < n; ++i) {
24706 add(this, xz[i], yz[i], data[i]);
24707 }
24708
24709 return this;
24710}
24711
24712
24713/***/ }),
24714
24715/***/ "./node_modules/d3-quadtree/src/cover.js":
24716/*!***********************************************!*\
24717 !*** ./node_modules/d3-quadtree/src/cover.js ***!
24718 \***********************************************/
24719/*! exports provided: default */
24720/***/ (function(module, __webpack_exports__, __webpack_require__) {
24721
24722"use strict";
24723__webpack_require__.r(__webpack_exports__);
24724/* harmony default export */ __webpack_exports__["default"] = (function(x, y) {
24725 if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points
24726
24727 var x0 = this._x0,
24728 y0 = this._y0,
24729 x1 = this._x1,
24730 y1 = this._y1;
24731
24732 // If the quadtree has no extent, initialize them.
24733 // Integer extent are necessary so that if we later double the extent,
24734 // the existing quadrant boundaries don’t change due to floating point error!
24735 if (isNaN(x0)) {
24736 x1 = (x0 = Math.floor(x)) + 1;
24737 y1 = (y0 = Math.floor(y)) + 1;
24738 }
24739
24740 // Otherwise, double repeatedly to cover.
24741 else {
24742 var z = x1 - x0,
24743 node = this._root,
24744 parent,
24745 i;
24746
24747 while (x0 > x || x >= x1 || y0 > y || y >= y1) {
24748 i = (y < y0) << 1 | (x < x0);
24749 parent = new Array(4), parent[i] = node, node = parent, z *= 2;
24750 switch (i) {
24751 case 0: x1 = x0 + z, y1 = y0 + z; break;
24752 case 1: x0 = x1 - z, y1 = y0 + z; break;
24753 case 2: x1 = x0 + z, y0 = y1 - z; break;
24754 case 3: x0 = x1 - z, y0 = y1 - z; break;
24755 }
24756 }
24757
24758 if (this._root && this._root.length) this._root = node;
24759 }
24760
24761 this._x0 = x0;
24762 this._y0 = y0;
24763 this._x1 = x1;
24764 this._y1 = y1;
24765 return this;
24766});
24767
24768
24769/***/ }),
24770
24771/***/ "./node_modules/d3-quadtree/src/data.js":
24772/*!**********************************************!*\
24773 !*** ./node_modules/d3-quadtree/src/data.js ***!
24774 \**********************************************/
24775/*! exports provided: default */
24776/***/ (function(module, __webpack_exports__, __webpack_require__) {
24777
24778"use strict";
24779__webpack_require__.r(__webpack_exports__);
24780/* harmony default export */ __webpack_exports__["default"] = (function() {
24781 var data = [];
24782 this.visit(function(node) {
24783 if (!node.length) do data.push(node.data); while (node = node.next)
24784 });
24785 return data;
24786});
24787
24788
24789/***/ }),
24790
24791/***/ "./node_modules/d3-quadtree/src/extent.js":
24792/*!************************************************!*\
24793 !*** ./node_modules/d3-quadtree/src/extent.js ***!
24794 \************************************************/
24795/*! exports provided: default */
24796/***/ (function(module, __webpack_exports__, __webpack_require__) {
24797
24798"use strict";
24799__webpack_require__.r(__webpack_exports__);
24800/* harmony default export */ __webpack_exports__["default"] = (function(_) {
24801 return arguments.length
24802 ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])
24803 : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];
24804});
24805
24806
24807/***/ }),
24808
24809/***/ "./node_modules/d3-quadtree/src/find.js":
24810/*!**********************************************!*\
24811 !*** ./node_modules/d3-quadtree/src/find.js ***!
24812 \**********************************************/
24813/*! exports provided: default */
24814/***/ (function(module, __webpack_exports__, __webpack_require__) {
24815
24816"use strict";
24817__webpack_require__.r(__webpack_exports__);
24818/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js");
24819
24820
24821/* harmony default export */ __webpack_exports__["default"] = (function(x, y, radius) {
24822 var data,
24823 x0 = this._x0,
24824 y0 = this._y0,
24825 x1,
24826 y1,
24827 x2,
24828 y2,
24829 x3 = this._x1,
24830 y3 = this._y1,
24831 quads = [],
24832 node = this._root,
24833 q,
24834 i;
24835
24836 if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, x0, y0, x3, y3));
24837 if (radius == null) radius = Infinity;
24838 else {
24839 x0 = x - radius, y0 = y - radius;
24840 x3 = x + radius, y3 = y + radius;
24841 radius *= radius;
24842 }
24843
24844 while (q = quads.pop()) {
24845
24846 // Stop searching if this quadrant can’t contain a closer node.
24847 if (!(node = q.node)
24848 || (x1 = q.x0) > x3
24849 || (y1 = q.y0) > y3
24850 || (x2 = q.x1) < x0
24851 || (y2 = q.y1) < y0) continue;
24852
24853 // Bisect the current quadrant.
24854 if (node.length) {
24855 var xm = (x1 + x2) / 2,
24856 ym = (y1 + y2) / 2;
24857
24858 quads.push(
24859 new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[3], xm, ym, x2, y2),
24860 new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[2], x1, ym, xm, y2),
24861 new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[1], xm, y1, x2, ym),
24862 new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node[0], x1, y1, xm, ym)
24863 );
24864
24865 // Visit the closest quadrant first.
24866 if (i = (y >= ym) << 1 | (x >= xm)) {
24867 q = quads[quads.length - 1];
24868 quads[quads.length - 1] = quads[quads.length - 1 - i];
24869 quads[quads.length - 1 - i] = q;
24870 }
24871 }
24872
24873 // Visit this point. (Visiting coincident points isn’t necessary!)
24874 else {
24875 var dx = x - +this._x.call(null, node.data),
24876 dy = y - +this._y.call(null, node.data),
24877 d2 = dx * dx + dy * dy;
24878 if (d2 < radius) {
24879 var d = Math.sqrt(radius = d2);
24880 x0 = x - d, y0 = y - d;
24881 x3 = x + d, y3 = y + d;
24882 data = node.data;
24883 }
24884 }
24885 }
24886
24887 return data;
24888});
24889
24890
24891/***/ }),
24892
24893/***/ "./node_modules/d3-quadtree/src/index.js":
24894/*!***********************************************!*\
24895 !*** ./node_modules/d3-quadtree/src/index.js ***!
24896 \***********************************************/
24897/*! exports provided: quadtree */
24898/***/ (function(module, __webpack_exports__, __webpack_require__) {
24899
24900"use strict";
24901__webpack_require__.r(__webpack_exports__);
24902/* harmony import */ var _quadtree_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quadtree.js */ "./node_modules/d3-quadtree/src/quadtree.js");
24903/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return _quadtree_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
24904
24905
24906
24907
24908/***/ }),
24909
24910/***/ "./node_modules/d3-quadtree/src/quad.js":
24911/*!**********************************************!*\
24912 !*** ./node_modules/d3-quadtree/src/quad.js ***!
24913 \**********************************************/
24914/*! exports provided: default */
24915/***/ (function(module, __webpack_exports__, __webpack_require__) {
24916
24917"use strict";
24918__webpack_require__.r(__webpack_exports__);
24919/* harmony default export */ __webpack_exports__["default"] = (function(node, x0, y0, x1, y1) {
24920 this.node = node;
24921 this.x0 = x0;
24922 this.y0 = y0;
24923 this.x1 = x1;
24924 this.y1 = y1;
24925});
24926
24927
24928/***/ }),
24929
24930/***/ "./node_modules/d3-quadtree/src/quadtree.js":
24931/*!**************************************************!*\
24932 !*** ./node_modules/d3-quadtree/src/quadtree.js ***!
24933 \**************************************************/
24934/*! exports provided: default */
24935/***/ (function(module, __webpack_exports__, __webpack_require__) {
24936
24937"use strict";
24938__webpack_require__.r(__webpack_exports__);
24939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quadtree; });
24940/* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/d3-quadtree/src/add.js");
24941/* harmony import */ var _cover_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cover.js */ "./node_modules/d3-quadtree/src/cover.js");
24942/* harmony import */ var _data_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data.js */ "./node_modules/d3-quadtree/src/data.js");
24943/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "./node_modules/d3-quadtree/src/extent.js");
24944/* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./find.js */ "./node_modules/d3-quadtree/src/find.js");
24945/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-quadtree/src/remove.js");
24946/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./root.js */ "./node_modules/d3-quadtree/src/root.js");
24947/* harmony import */ var _size_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./size.js */ "./node_modules/d3-quadtree/src/size.js");
24948/* harmony import */ var _visit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./visit.js */ "./node_modules/d3-quadtree/src/visit.js");
24949/* harmony import */ var _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./visitAfter.js */ "./node_modules/d3-quadtree/src/visitAfter.js");
24950/* harmony import */ var _x_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./x.js */ "./node_modules/d3-quadtree/src/x.js");
24951/* harmony import */ var _y_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./y.js */ "./node_modules/d3-quadtree/src/y.js");
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965function quadtree(nodes, x, y) {
24966 var tree = new Quadtree(x == null ? _x_js__WEBPACK_IMPORTED_MODULE_10__["defaultX"] : x, y == null ? _y_js__WEBPACK_IMPORTED_MODULE_11__["defaultY"] : y, NaN, NaN, NaN, NaN);
24967 return nodes == null ? tree : tree.addAll(nodes);
24968}
24969
24970function Quadtree(x, y, x0, y0, x1, y1) {
24971 this._x = x;
24972 this._y = y;
24973 this._x0 = x0;
24974 this._y0 = y0;
24975 this._x1 = x1;
24976 this._y1 = y1;
24977 this._root = undefined;
24978}
24979
24980function leaf_copy(leaf) {
24981 var copy = {data: leaf.data}, next = copy;
24982 while (leaf = leaf.next) next = next.next = {data: leaf.data};
24983 return copy;
24984}
24985
24986var treeProto = quadtree.prototype = Quadtree.prototype;
24987
24988treeProto.copy = function() {
24989 var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),
24990 node = this._root,
24991 nodes,
24992 child;
24993
24994 if (!node) return copy;
24995
24996 if (!node.length) return copy._root = leaf_copy(node), copy;
24997
24998 nodes = [{source: node, target: copy._root = new Array(4)}];
24999 while (node = nodes.pop()) {
25000 for (var i = 0; i < 4; ++i) {
25001 if (child = node.source[i]) {
25002 if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});
25003 else node.target[i] = leaf_copy(child);
25004 }
25005 }
25006 }
25007
25008 return copy;
25009};
25010
25011treeProto.add = _add_js__WEBPACK_IMPORTED_MODULE_0__["default"];
25012treeProto.addAll = _add_js__WEBPACK_IMPORTED_MODULE_0__["addAll"];
25013treeProto.cover = _cover_js__WEBPACK_IMPORTED_MODULE_1__["default"];
25014treeProto.data = _data_js__WEBPACK_IMPORTED_MODULE_2__["default"];
25015treeProto.extent = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"];
25016treeProto.find = _find_js__WEBPACK_IMPORTED_MODULE_4__["default"];
25017treeProto.remove = _remove_js__WEBPACK_IMPORTED_MODULE_5__["default"];
25018treeProto.removeAll = _remove_js__WEBPACK_IMPORTED_MODULE_5__["removeAll"];
25019treeProto.root = _root_js__WEBPACK_IMPORTED_MODULE_6__["default"];
25020treeProto.size = _size_js__WEBPACK_IMPORTED_MODULE_7__["default"];
25021treeProto.visit = _visit_js__WEBPACK_IMPORTED_MODULE_8__["default"];
25022treeProto.visitAfter = _visitAfter_js__WEBPACK_IMPORTED_MODULE_9__["default"];
25023treeProto.x = _x_js__WEBPACK_IMPORTED_MODULE_10__["default"];
25024treeProto.y = _y_js__WEBPACK_IMPORTED_MODULE_11__["default"];
25025
25026
25027/***/ }),
25028
25029/***/ "./node_modules/d3-quadtree/src/remove.js":
25030/*!************************************************!*\
25031 !*** ./node_modules/d3-quadtree/src/remove.js ***!
25032 \************************************************/
25033/*! exports provided: default, removeAll */
25034/***/ (function(module, __webpack_exports__, __webpack_require__) {
25035
25036"use strict";
25037__webpack_require__.r(__webpack_exports__);
25038/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAll", function() { return removeAll; });
25039/* harmony default export */ __webpack_exports__["default"] = (function(d) {
25040 if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points
25041
25042 var parent,
25043 node = this._root,
25044 retainer,
25045 previous,
25046 next,
25047 x0 = this._x0,
25048 y0 = this._y0,
25049 x1 = this._x1,
25050 y1 = this._y1,
25051 x,
25052 y,
25053 xm,
25054 ym,
25055 right,
25056 bottom,
25057 i,
25058 j;
25059
25060 // If the tree is empty, initialize the root as a leaf.
25061 if (!node) return this;
25062
25063 // Find the leaf node for the point.
25064 // While descending, also retain the deepest parent with a non-removed sibling.
25065 if (node.length) while (true) {
25066 if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;
25067 if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;
25068 if (!(parent = node, node = node[i = bottom << 1 | right])) return this;
25069 if (!node.length) break;
25070 if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;
25071 }
25072
25073 // Find the point to remove.
25074 while (node.data !== d) if (!(previous = node, node = node.next)) return this;
25075 if (next = node.next) delete node.next;
25076
25077 // If there are multiple coincident points, remove just the point.
25078 if (previous) return (next ? previous.next = next : delete previous.next), this;
25079
25080 // If this is the root point, remove it.
25081 if (!parent) return this._root = next, this;
25082
25083 // Remove this leaf.
25084 next ? parent[i] = next : delete parent[i];
25085
25086 // If the parent now contains exactly one leaf, collapse superfluous parents.
25087 if ((node = parent[0] || parent[1] || parent[2] || parent[3])
25088 && node === (parent[3] || parent[2] || parent[1] || parent[0])
25089 && !node.length) {
25090 if (retainer) retainer[j] = node;
25091 else this._root = node;
25092 }
25093
25094 return this;
25095});
25096
25097function removeAll(data) {
25098 for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);
25099 return this;
25100}
25101
25102
25103/***/ }),
25104
25105/***/ "./node_modules/d3-quadtree/src/root.js":
25106/*!**********************************************!*\
25107 !*** ./node_modules/d3-quadtree/src/root.js ***!
25108 \**********************************************/
25109/*! exports provided: default */
25110/***/ (function(module, __webpack_exports__, __webpack_require__) {
25111
25112"use strict";
25113__webpack_require__.r(__webpack_exports__);
25114/* harmony default export */ __webpack_exports__["default"] = (function() {
25115 return this._root;
25116});
25117
25118
25119/***/ }),
25120
25121/***/ "./node_modules/d3-quadtree/src/size.js":
25122/*!**********************************************!*\
25123 !*** ./node_modules/d3-quadtree/src/size.js ***!
25124 \**********************************************/
25125/*! exports provided: default */
25126/***/ (function(module, __webpack_exports__, __webpack_require__) {
25127
25128"use strict";
25129__webpack_require__.r(__webpack_exports__);
25130/* harmony default export */ __webpack_exports__["default"] = (function() {
25131 var size = 0;
25132 this.visit(function(node) {
25133 if (!node.length) do ++size; while (node = node.next)
25134 });
25135 return size;
25136});
25137
25138
25139/***/ }),
25140
25141/***/ "./node_modules/d3-quadtree/src/visit.js":
25142/*!***********************************************!*\
25143 !*** ./node_modules/d3-quadtree/src/visit.js ***!
25144 \***********************************************/
25145/*! exports provided: default */
25146/***/ (function(module, __webpack_exports__, __webpack_require__) {
25147
25148"use strict";
25149__webpack_require__.r(__webpack_exports__);
25150/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js");
25151
25152
25153/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
25154 var quads = [], q, node = this._root, child, x0, y0, x1, y1;
25155 if (node) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](node, this._x0, this._y0, this._x1, this._y1));
25156 while (q = quads.pop()) {
25157 if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {
25158 var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
25159 if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1));
25160 if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1));
25161 if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym));
25162 if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym));
25163 }
25164 }
25165 return this;
25166});
25167
25168
25169/***/ }),
25170
25171/***/ "./node_modules/d3-quadtree/src/visitAfter.js":
25172/*!****************************************************!*\
25173 !*** ./node_modules/d3-quadtree/src/visitAfter.js ***!
25174 \****************************************************/
25175/*! exports provided: default */
25176/***/ (function(module, __webpack_exports__, __webpack_require__) {
25177
25178"use strict";
25179__webpack_require__.r(__webpack_exports__);
25180/* harmony import */ var _quad_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quad.js */ "./node_modules/d3-quadtree/src/quad.js");
25181
25182
25183/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
25184 var quads = [], next = [], q;
25185 if (this._root) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](this._root, this._x0, this._y0, this._x1, this._y1));
25186 while (q = quads.pop()) {
25187 var node = q.node;
25188 if (node.length) {
25189 var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;
25190 if (child = node[0]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, y0, xm, ym));
25191 if (child = node[1]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, y0, x1, ym));
25192 if (child = node[2]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, x0, ym, xm, y1));
25193 if (child = node[3]) quads.push(new _quad_js__WEBPACK_IMPORTED_MODULE_0__["default"](child, xm, ym, x1, y1));
25194 }
25195 next.push(q);
25196 }
25197 while (q = next.pop()) {
25198 callback(q.node, q.x0, q.y0, q.x1, q.y1);
25199 }
25200 return this;
25201});
25202
25203
25204/***/ }),
25205
25206/***/ "./node_modules/d3-quadtree/src/x.js":
25207/*!*******************************************!*\
25208 !*** ./node_modules/d3-quadtree/src/x.js ***!
25209 \*******************************************/
25210/*! exports provided: defaultX, default */
25211/***/ (function(module, __webpack_exports__, __webpack_require__) {
25212
25213"use strict";
25214__webpack_require__.r(__webpack_exports__);
25215/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultX", function() { return defaultX; });
25216function defaultX(d) {
25217 return d[0];
25218}
25219
25220/* harmony default export */ __webpack_exports__["default"] = (function(_) {
25221 return arguments.length ? (this._x = _, this) : this._x;
25222});
25223
25224
25225/***/ }),
25226
25227/***/ "./node_modules/d3-quadtree/src/y.js":
25228/*!*******************************************!*\
25229 !*** ./node_modules/d3-quadtree/src/y.js ***!
25230 \*******************************************/
25231/*! exports provided: defaultY, default */
25232/***/ (function(module, __webpack_exports__, __webpack_require__) {
25233
25234"use strict";
25235__webpack_require__.r(__webpack_exports__);
25236/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultY", function() { return defaultY; });
25237function defaultY(d) {
25238 return d[1];
25239}
25240
25241/* harmony default export */ __webpack_exports__["default"] = (function(_) {
25242 return arguments.length ? (this._y = _, this) : this._y;
25243});
25244
25245
25246/***/ }),
25247
25248/***/ "./node_modules/d3-random/src/bates.js":
25249/*!*********************************************!*\
25250 !*** ./node_modules/d3-random/src/bates.js ***!
25251 \*********************************************/
25252/*! exports provided: default */
25253/***/ (function(module, __webpack_exports__, __webpack_require__) {
25254
25255"use strict";
25256__webpack_require__.r(__webpack_exports__);
25257/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25258/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js");
25259
25260
25261
25262/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomBates(source) {
25263 function randomBates(n) {
25264 var randomIrwinHall = _irwinHall__WEBPACK_IMPORTED_MODULE_1__["default"].source(source)(n);
25265 return function() {
25266 return randomIrwinHall() / n;
25267 };
25268 }
25269
25270 randomBates.source = sourceRandomBates;
25271
25272 return randomBates;
25273})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25274
25275
25276/***/ }),
25277
25278/***/ "./node_modules/d3-random/src/defaultSource.js":
25279/*!*****************************************************!*\
25280 !*** ./node_modules/d3-random/src/defaultSource.js ***!
25281 \*****************************************************/
25282/*! exports provided: default */
25283/***/ (function(module, __webpack_exports__, __webpack_require__) {
25284
25285"use strict";
25286__webpack_require__.r(__webpack_exports__);
25287/* harmony default export */ __webpack_exports__["default"] = (function() {
25288 return Math.random();
25289});
25290
25291
25292/***/ }),
25293
25294/***/ "./node_modules/d3-random/src/exponential.js":
25295/*!***************************************************!*\
25296 !*** ./node_modules/d3-random/src/exponential.js ***!
25297 \***************************************************/
25298/*! exports provided: default */
25299/***/ (function(module, __webpack_exports__, __webpack_require__) {
25300
25301"use strict";
25302__webpack_require__.r(__webpack_exports__);
25303/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25304
25305
25306/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomExponential(source) {
25307 function randomExponential(lambda) {
25308 return function() {
25309 return -Math.log(1 - source()) / lambda;
25310 };
25311 }
25312
25313 randomExponential.source = sourceRandomExponential;
25314
25315 return randomExponential;
25316})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25317
25318
25319/***/ }),
25320
25321/***/ "./node_modules/d3-random/src/index.js":
25322/*!*********************************************!*\
25323 !*** ./node_modules/d3-random/src/index.js ***!
25324 \*********************************************/
25325/*! exports provided: randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential */
25326/***/ (function(module, __webpack_exports__, __webpack_require__) {
25327
25328"use strict";
25329__webpack_require__.r(__webpack_exports__);
25330/* harmony import */ var _uniform__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./uniform */ "./node_modules/d3-random/src/uniform.js");
25331/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return _uniform__WEBPACK_IMPORTED_MODULE_0__["default"]; });
25332
25333/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js");
25334/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return _normal__WEBPACK_IMPORTED_MODULE_1__["default"]; });
25335
25336/* harmony import */ var _logNormal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logNormal */ "./node_modules/d3-random/src/logNormal.js");
25337/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return _logNormal__WEBPACK_IMPORTED_MODULE_2__["default"]; });
25338
25339/* harmony import */ var _bates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bates */ "./node_modules/d3-random/src/bates.js");
25340/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return _bates__WEBPACK_IMPORTED_MODULE_3__["default"]; });
25341
25342/* harmony import */ var _irwinHall__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./irwinHall */ "./node_modules/d3-random/src/irwinHall.js");
25343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return _irwinHall__WEBPACK_IMPORTED_MODULE_4__["default"]; });
25344
25345/* harmony import */ var _exponential__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exponential */ "./node_modules/d3-random/src/exponential.js");
25346/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return _exponential__WEBPACK_IMPORTED_MODULE_5__["default"]; });
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356/***/ }),
25357
25358/***/ "./node_modules/d3-random/src/irwinHall.js":
25359/*!*************************************************!*\
25360 !*** ./node_modules/d3-random/src/irwinHall.js ***!
25361 \*************************************************/
25362/*! exports provided: default */
25363/***/ (function(module, __webpack_exports__, __webpack_require__) {
25364
25365"use strict";
25366__webpack_require__.r(__webpack_exports__);
25367/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25368
25369
25370/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomIrwinHall(source) {
25371 function randomIrwinHall(n) {
25372 return function() {
25373 for (var sum = 0, i = 0; i < n; ++i) sum += source();
25374 return sum;
25375 };
25376 }
25377
25378 randomIrwinHall.source = sourceRandomIrwinHall;
25379
25380 return randomIrwinHall;
25381})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25382
25383
25384/***/ }),
25385
25386/***/ "./node_modules/d3-random/src/logNormal.js":
25387/*!*************************************************!*\
25388 !*** ./node_modules/d3-random/src/logNormal.js ***!
25389 \*************************************************/
25390/*! exports provided: default */
25391/***/ (function(module, __webpack_exports__, __webpack_require__) {
25392
25393"use strict";
25394__webpack_require__.r(__webpack_exports__);
25395/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25396/* harmony import */ var _normal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./normal */ "./node_modules/d3-random/src/normal.js");
25397
25398
25399
25400/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomLogNormal(source) {
25401 function randomLogNormal() {
25402 var randomNormal = _normal__WEBPACK_IMPORTED_MODULE_1__["default"].source(source).apply(this, arguments);
25403 return function() {
25404 return Math.exp(randomNormal());
25405 };
25406 }
25407
25408 randomLogNormal.source = sourceRandomLogNormal;
25409
25410 return randomLogNormal;
25411})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25412
25413
25414/***/ }),
25415
25416/***/ "./node_modules/d3-random/src/normal.js":
25417/*!**********************************************!*\
25418 !*** ./node_modules/d3-random/src/normal.js ***!
25419 \**********************************************/
25420/*! exports provided: default */
25421/***/ (function(module, __webpack_exports__, __webpack_require__) {
25422
25423"use strict";
25424__webpack_require__.r(__webpack_exports__);
25425/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25426
25427
25428/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomNormal(source) {
25429 function randomNormal(mu, sigma) {
25430 var x, r;
25431 mu = mu == null ? 0 : +mu;
25432 sigma = sigma == null ? 1 : +sigma;
25433 return function() {
25434 var y;
25435
25436 // If available, use the second previously-generated uniform random.
25437 if (x != null) y = x, x = null;
25438
25439 // Otherwise, generate a new x and y.
25440 else do {
25441 x = source() * 2 - 1;
25442 y = source() * 2 - 1;
25443 r = x * x + y * y;
25444 } while (!r || r > 1);
25445
25446 return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r);
25447 };
25448 }
25449
25450 randomNormal.source = sourceRandomNormal;
25451
25452 return randomNormal;
25453})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25454
25455
25456/***/ }),
25457
25458/***/ "./node_modules/d3-random/src/uniform.js":
25459/*!***********************************************!*\
25460 !*** ./node_modules/d3-random/src/uniform.js ***!
25461 \***********************************************/
25462/*! exports provided: default */
25463/***/ (function(module, __webpack_exports__, __webpack_require__) {
25464
25465"use strict";
25466__webpack_require__.r(__webpack_exports__);
25467/* harmony import */ var _defaultSource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultSource */ "./node_modules/d3-random/src/defaultSource.js");
25468
25469
25470/* harmony default export */ __webpack_exports__["default"] = ((function sourceRandomUniform(source) {
25471 function randomUniform(min, max) {
25472 min = min == null ? 0 : +min;
25473 max = max == null ? 1 : +max;
25474 if (arguments.length === 1) max = min, min = 0;
25475 else max -= min;
25476 return function() {
25477 return source() * max + min;
25478 };
25479 }
25480
25481 randomUniform.source = sourceRandomUniform;
25482
25483 return randomUniform;
25484})(_defaultSource__WEBPACK_IMPORTED_MODULE_0__["default"]));
25485
25486
25487/***/ }),
25488
25489/***/ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js":
25490/*!*******************************************************************!*\
25491 !*** ./node_modules/d3-scale-chromatic/src/categorical/Accent.js ***!
25492 \*******************************************************************/
25493/*! exports provided: default */
25494/***/ (function(module, __webpack_exports__, __webpack_require__) {
25495
25496"use strict";
25497__webpack_require__.r(__webpack_exports__);
25498/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25499
25500
25501/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"));
25502
25503
25504/***/ }),
25505
25506/***/ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js":
25507/*!******************************************************************!*\
25508 !*** ./node_modules/d3-scale-chromatic/src/categorical/Dark2.js ***!
25509 \******************************************************************/
25510/*! exports provided: default */
25511/***/ (function(module, __webpack_exports__, __webpack_require__) {
25512
25513"use strict";
25514__webpack_require__.r(__webpack_exports__);
25515/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25516
25517
25518/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"));
25519
25520
25521/***/ }),
25522
25523/***/ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js":
25524/*!*******************************************************************!*\
25525 !*** ./node_modules/d3-scale-chromatic/src/categorical/Paired.js ***!
25526 \*******************************************************************/
25527/*! exports provided: default */
25528/***/ (function(module, __webpack_exports__, __webpack_require__) {
25529
25530"use strict";
25531__webpack_require__.r(__webpack_exports__);
25532/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25533
25534
25535/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"));
25536
25537
25538/***/ }),
25539
25540/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js":
25541/*!********************************************************************!*\
25542 !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js ***!
25543 \********************************************************************/
25544/*! exports provided: default */
25545/***/ (function(module, __webpack_exports__, __webpack_require__) {
25546
25547"use strict";
25548__webpack_require__.r(__webpack_exports__);
25549/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25550
25551
25552/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"));
25553
25554
25555/***/ }),
25556
25557/***/ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js":
25558/*!********************************************************************!*\
25559 !*** ./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js ***!
25560 \********************************************************************/
25561/*! exports provided: default */
25562/***/ (function(module, __webpack_exports__, __webpack_require__) {
25563
25564"use strict";
25565__webpack_require__.r(__webpack_exports__);
25566/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25567
25568
25569/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"));
25570
25571
25572/***/ }),
25573
25574/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js":
25575/*!*****************************************************************!*\
25576 !*** ./node_modules/d3-scale-chromatic/src/categorical/Set1.js ***!
25577 \*****************************************************************/
25578/*! exports provided: default */
25579/***/ (function(module, __webpack_exports__, __webpack_require__) {
25580
25581"use strict";
25582__webpack_require__.r(__webpack_exports__);
25583/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25584
25585
25586/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"));
25587
25588
25589/***/ }),
25590
25591/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js":
25592/*!*****************************************************************!*\
25593 !*** ./node_modules/d3-scale-chromatic/src/categorical/Set2.js ***!
25594 \*****************************************************************/
25595/*! exports provided: default */
25596/***/ (function(module, __webpack_exports__, __webpack_require__) {
25597
25598"use strict";
25599__webpack_require__.r(__webpack_exports__);
25600/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25601
25602
25603/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"));
25604
25605
25606/***/ }),
25607
25608/***/ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js":
25609/*!*****************************************************************!*\
25610 !*** ./node_modules/d3-scale-chromatic/src/categorical/Set3.js ***!
25611 \*****************************************************************/
25612/*! exports provided: default */
25613/***/ (function(module, __webpack_exports__, __webpack_require__) {
25614
25615"use strict";
25616__webpack_require__.r(__webpack_exports__);
25617/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25618
25619
25620/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"));
25621
25622
25623/***/ }),
25624
25625/***/ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js":
25626/*!**********************************************************************!*\
25627 !*** ./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js ***!
25628 \**********************************************************************/
25629/*! exports provided: default */
25630/***/ (function(module, __webpack_exports__, __webpack_require__) {
25631
25632"use strict";
25633__webpack_require__.r(__webpack_exports__);
25634/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25635
25636
25637/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"));
25638
25639
25640/***/ }),
25641
25642/***/ "./node_modules/d3-scale-chromatic/src/categorical/category10.js":
25643/*!***********************************************************************!*\
25644 !*** ./node_modules/d3-scale-chromatic/src/categorical/category10.js ***!
25645 \***********************************************************************/
25646/*! exports provided: default */
25647/***/ (function(module, __webpack_exports__, __webpack_require__) {
25648
25649"use strict";
25650__webpack_require__.r(__webpack_exports__);
25651/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25652
25653
25654/* harmony default export */ __webpack_exports__["default"] = (Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"));
25655
25656
25657/***/ }),
25658
25659/***/ "./node_modules/d3-scale-chromatic/src/colors.js":
25660/*!*******************************************************!*\
25661 !*** ./node_modules/d3-scale-chromatic/src/colors.js ***!
25662 \*******************************************************/
25663/*! exports provided: default */
25664/***/ (function(module, __webpack_exports__, __webpack_require__) {
25665
25666"use strict";
25667__webpack_require__.r(__webpack_exports__);
25668/* harmony default export */ __webpack_exports__["default"] = (function(specifier) {
25669 var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
25670 while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
25671 return colors;
25672});
25673
25674
25675/***/ }),
25676
25677/***/ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js":
25678/*!***************************************************************!*\
25679 !*** ./node_modules/d3-scale-chromatic/src/diverging/BrBG.js ***!
25680 \***************************************************************/
25681/*! exports provided: scheme, default */
25682/***/ (function(module, __webpack_exports__, __webpack_require__) {
25683
25684"use strict";
25685__webpack_require__.r(__webpack_exports__);
25686/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25687/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25688/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25689
25690
25691
25692var scheme = new Array(3).concat(
25693 "d8b365f5f5f55ab4ac",
25694 "a6611adfc27d80cdc1018571",
25695 "a6611adfc27df5f5f580cdc1018571",
25696 "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
25697 "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
25698 "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
25699 "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
25700 "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
25701 "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
25702).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25703
25704/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25705
25706
25707/***/ }),
25708
25709/***/ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js":
25710/*!***************************************************************!*\
25711 !*** ./node_modules/d3-scale-chromatic/src/diverging/PRGn.js ***!
25712 \***************************************************************/
25713/*! exports provided: scheme, default */
25714/***/ (function(module, __webpack_exports__, __webpack_require__) {
25715
25716"use strict";
25717__webpack_require__.r(__webpack_exports__);
25718/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25719/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25720/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25721
25722
25723
25724var scheme = new Array(3).concat(
25725 "af8dc3f7f7f77fbf7b",
25726 "7b3294c2a5cfa6dba0008837",
25727 "7b3294c2a5cff7f7f7a6dba0008837",
25728 "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
25729 "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
25730 "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
25731 "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
25732 "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
25733 "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
25734).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25735
25736/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25737
25738
25739/***/ }),
25740
25741/***/ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js":
25742/*!***************************************************************!*\
25743 !*** ./node_modules/d3-scale-chromatic/src/diverging/PiYG.js ***!
25744 \***************************************************************/
25745/*! exports provided: scheme, default */
25746/***/ (function(module, __webpack_exports__, __webpack_require__) {
25747
25748"use strict";
25749__webpack_require__.r(__webpack_exports__);
25750/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25751/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25752/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25753
25754
25755
25756var scheme = new Array(3).concat(
25757 "e9a3c9f7f7f7a1d76a",
25758 "d01c8bf1b6dab8e1864dac26",
25759 "d01c8bf1b6daf7f7f7b8e1864dac26",
25760 "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
25761 "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
25762 "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
25763 "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
25764 "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
25765 "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
25766).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25767
25768/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25769
25770
25771/***/ }),
25772
25773/***/ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js":
25774/*!***************************************************************!*\
25775 !*** ./node_modules/d3-scale-chromatic/src/diverging/PuOr.js ***!
25776 \***************************************************************/
25777/*! exports provided: scheme, default */
25778/***/ (function(module, __webpack_exports__, __webpack_require__) {
25779
25780"use strict";
25781__webpack_require__.r(__webpack_exports__);
25782/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25783/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25784/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25785
25786
25787
25788var scheme = new Array(3).concat(
25789 "998ec3f7f7f7f1a340",
25790 "5e3c99b2abd2fdb863e66101",
25791 "5e3c99b2abd2f7f7f7fdb863e66101",
25792 "542788998ec3d8daebfee0b6f1a340b35806",
25793 "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
25794 "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
25795 "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
25796 "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
25797 "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
25798).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25799
25800/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25801
25802
25803/***/ }),
25804
25805/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js":
25806/*!***************************************************************!*\
25807 !*** ./node_modules/d3-scale-chromatic/src/diverging/RdBu.js ***!
25808 \***************************************************************/
25809/*! exports provided: scheme, default */
25810/***/ (function(module, __webpack_exports__, __webpack_require__) {
25811
25812"use strict";
25813__webpack_require__.r(__webpack_exports__);
25814/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25815/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25816/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25817
25818
25819
25820var scheme = new Array(3).concat(
25821 "ef8a62f7f7f767a9cf",
25822 "ca0020f4a58292c5de0571b0",
25823 "ca0020f4a582f7f7f792c5de0571b0",
25824 "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
25825 "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
25826 "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
25827 "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
25828 "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
25829 "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
25830).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25831
25832/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25833
25834
25835/***/ }),
25836
25837/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js":
25838/*!***************************************************************!*\
25839 !*** ./node_modules/d3-scale-chromatic/src/diverging/RdGy.js ***!
25840 \***************************************************************/
25841/*! exports provided: scheme, default */
25842/***/ (function(module, __webpack_exports__, __webpack_require__) {
25843
25844"use strict";
25845__webpack_require__.r(__webpack_exports__);
25846/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25847/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25848/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25849
25850
25851
25852var scheme = new Array(3).concat(
25853 "ef8a62ffffff999999",
25854 "ca0020f4a582bababa404040",
25855 "ca0020f4a582ffffffbababa404040",
25856 "b2182bef8a62fddbc7e0e0e09999994d4d4d",
25857 "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
25858 "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
25859 "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
25860 "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
25861 "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
25862).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25863
25864/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25865
25866
25867/***/ }),
25868
25869/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js":
25870/*!*****************************************************************!*\
25871 !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js ***!
25872 \*****************************************************************/
25873/*! exports provided: scheme, default */
25874/***/ (function(module, __webpack_exports__, __webpack_require__) {
25875
25876"use strict";
25877__webpack_require__.r(__webpack_exports__);
25878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25879/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25880/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25881
25882
25883
25884var scheme = new Array(3).concat(
25885 "fc8d59ffffbf91bfdb",
25886 "d7191cfdae61abd9e92c7bb6",
25887 "d7191cfdae61ffffbfabd9e92c7bb6",
25888 "d73027fc8d59fee090e0f3f891bfdb4575b4",
25889 "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
25890 "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
25891 "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
25892 "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
25893 "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
25894).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25895
25896/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25897
25898
25899/***/ }),
25900
25901/***/ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js":
25902/*!*****************************************************************!*\
25903 !*** ./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js ***!
25904 \*****************************************************************/
25905/*! exports provided: scheme, default */
25906/***/ (function(module, __webpack_exports__, __webpack_require__) {
25907
25908"use strict";
25909__webpack_require__.r(__webpack_exports__);
25910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25911/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25912/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25913
25914
25915
25916var scheme = new Array(3).concat(
25917 "fc8d59ffffbf91cf60",
25918 "d7191cfdae61a6d96a1a9641",
25919 "d7191cfdae61ffffbfa6d96a1a9641",
25920 "d73027fc8d59fee08bd9ef8b91cf601a9850",
25921 "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
25922 "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
25923 "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
25924 "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
25925 "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
25926).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25927
25928/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25929
25930
25931/***/ }),
25932
25933/***/ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js":
25934/*!*******************************************************************!*\
25935 !*** ./node_modules/d3-scale-chromatic/src/diverging/Spectral.js ***!
25936 \*******************************************************************/
25937/*! exports provided: scheme, default */
25938/***/ (function(module, __webpack_exports__, __webpack_require__) {
25939
25940"use strict";
25941__webpack_require__.r(__webpack_exports__);
25942/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
25943/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
25944/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
25945
25946
25947
25948var scheme = new Array(3).concat(
25949 "fc8d59ffffbf99d594",
25950 "d7191cfdae61abdda42b83ba",
25951 "d7191cfdae61ffffbfabdda42b83ba",
25952 "d53e4ffc8d59fee08be6f59899d5943288bd",
25953 "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
25954 "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
25955 "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
25956 "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
25957 "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
25958).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
25959
25960/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
25961
25962
25963/***/ }),
25964
25965/***/ "./node_modules/d3-scale-chromatic/src/index.js":
25966/*!******************************************************!*\
25967 !*** ./node_modules/d3-scale-chromatic/src/index.js ***!
25968 \******************************************************/
25969/*! exports provided: schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma */
25970/***/ (function(module, __webpack_exports__, __webpack_require__) {
25971
25972"use strict";
25973__webpack_require__.r(__webpack_exports__);
25974/* harmony import */ var _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./categorical/category10.js */ "./node_modules/d3-scale-chromatic/src/categorical/category10.js");
25975/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return _categorical_category10_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
25976
25977/* harmony import */ var _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./categorical/Accent.js */ "./node_modules/d3-scale-chromatic/src/categorical/Accent.js");
25978/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return _categorical_Accent_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
25979
25980/* harmony import */ var _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./categorical/Dark2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Dark2.js");
25981/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return _categorical_Dark2_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
25982
25983/* harmony import */ var _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./categorical/Paired.js */ "./node_modules/d3-scale-chromatic/src/categorical/Paired.js");
25984/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return _categorical_Paired_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
25985
25986/* harmony import */ var _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./categorical/Pastel1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel1.js");
25987/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return _categorical_Pastel1_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
25988
25989/* harmony import */ var _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./categorical/Pastel2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Pastel2.js");
25990/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return _categorical_Pastel2_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
25991
25992/* harmony import */ var _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./categorical/Set1.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set1.js");
25993/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return _categorical_Set1_js__WEBPACK_IMPORTED_MODULE_6__["default"]; });
25994
25995/* harmony import */ var _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./categorical/Set2.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set2.js");
25996/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return _categorical_Set2_js__WEBPACK_IMPORTED_MODULE_7__["default"]; });
25997
25998/* harmony import */ var _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./categorical/Set3.js */ "./node_modules/d3-scale-chromatic/src/categorical/Set3.js");
25999/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return _categorical_Set3_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
26000
26001/* harmony import */ var _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./categorical/Tableau10.js */ "./node_modules/d3-scale-chromatic/src/categorical/Tableau10.js");
26002/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return _categorical_Tableau10_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
26003
26004/* harmony import */ var _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diverging/BrBG.js */ "./node_modules/d3-scale-chromatic/src/diverging/BrBG.js");
26005/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
26006
26007/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return _diverging_BrBG_js__WEBPACK_IMPORTED_MODULE_10__["scheme"]; });
26008
26009/* harmony import */ var _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diverging/PRGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/PRGn.js");
26010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
26011
26012/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return _diverging_PRGn_js__WEBPACK_IMPORTED_MODULE_11__["scheme"]; });
26013
26014/* harmony import */ var _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diverging/PiYG.js */ "./node_modules/d3-scale-chromatic/src/diverging/PiYG.js");
26015/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["default"]; });
26016
26017/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return _diverging_PiYG_js__WEBPACK_IMPORTED_MODULE_12__["scheme"]; });
26018
26019/* harmony import */ var _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diverging/PuOr.js */ "./node_modules/d3-scale-chromatic/src/diverging/PuOr.js");
26020/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
26021
26022/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return _diverging_PuOr_js__WEBPACK_IMPORTED_MODULE_13__["scheme"]; });
26023
26024/* harmony import */ var _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging/RdBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdBu.js");
26025/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
26026
26027/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return _diverging_RdBu_js__WEBPACK_IMPORTED_MODULE_14__["scheme"]; });
26028
26029/* harmony import */ var _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diverging/RdGy.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdGy.js");
26030/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["default"]; });
26031
26032/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return _diverging_RdGy_js__WEBPACK_IMPORTED_MODULE_15__["scheme"]; });
26033
26034/* harmony import */ var _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diverging/RdYlBu.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js");
26035/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["default"]; });
26036
26037/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return _diverging_RdYlBu_js__WEBPACK_IMPORTED_MODULE_16__["scheme"]; });
26038
26039/* harmony import */ var _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diverging/RdYlGn.js */ "./node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js");
26040/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["default"]; });
26041
26042/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return _diverging_RdYlGn_js__WEBPACK_IMPORTED_MODULE_17__["scheme"]; });
26043
26044/* harmony import */ var _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diverging/Spectral.js */ "./node_modules/d3-scale-chromatic/src/diverging/Spectral.js");
26045/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["default"]; });
26046
26047/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return _diverging_Spectral_js__WEBPACK_IMPORTED_MODULE_18__["scheme"]; });
26048
26049/* harmony import */ var _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./sequential-multi/BuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js");
26050/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["default"]; });
26051
26052/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return _sequential_multi_BuGn_js__WEBPACK_IMPORTED_MODULE_19__["scheme"]; });
26053
26054/* harmony import */ var _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./sequential-multi/BuPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js");
26055/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["default"]; });
26056
26057/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return _sequential_multi_BuPu_js__WEBPACK_IMPORTED_MODULE_20__["scheme"]; });
26058
26059/* harmony import */ var _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./sequential-multi/GnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js");
26060/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["default"]; });
26061
26062/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return _sequential_multi_GnBu_js__WEBPACK_IMPORTED_MODULE_21__["scheme"]; });
26063
26064/* harmony import */ var _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./sequential-multi/OrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js");
26065/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["default"]; });
26066
26067/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return _sequential_multi_OrRd_js__WEBPACK_IMPORTED_MODULE_22__["scheme"]; });
26068
26069/* harmony import */ var _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./sequential-multi/PuBuGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js");
26070/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["default"]; });
26071
26072/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return _sequential_multi_PuBuGn_js__WEBPACK_IMPORTED_MODULE_23__["scheme"]; });
26073
26074/* harmony import */ var _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./sequential-multi/PuBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js");
26075/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["default"]; });
26076
26077/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return _sequential_multi_PuBu_js__WEBPACK_IMPORTED_MODULE_24__["scheme"]; });
26078
26079/* harmony import */ var _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./sequential-multi/PuRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js");
26080/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["default"]; });
26081
26082/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return _sequential_multi_PuRd_js__WEBPACK_IMPORTED_MODULE_25__["scheme"]; });
26083
26084/* harmony import */ var _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./sequential-multi/RdPu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js");
26085/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["default"]; });
26086
26087/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return _sequential_multi_RdPu_js__WEBPACK_IMPORTED_MODULE_26__["scheme"]; });
26088
26089/* harmony import */ var _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./sequential-multi/YlGnBu.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js");
26090/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["default"]; });
26091
26092/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return _sequential_multi_YlGnBu_js__WEBPACK_IMPORTED_MODULE_27__["scheme"]; });
26093
26094/* harmony import */ var _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./sequential-multi/YlGn.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js");
26095/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["default"]; });
26096
26097/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return _sequential_multi_YlGn_js__WEBPACK_IMPORTED_MODULE_28__["scheme"]; });
26098
26099/* harmony import */ var _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./sequential-multi/YlOrBr.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js");
26100/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["default"]; });
26101
26102/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return _sequential_multi_YlOrBr_js__WEBPACK_IMPORTED_MODULE_29__["scheme"]; });
26103
26104/* harmony import */ var _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./sequential-multi/YlOrRd.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js");
26105/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["default"]; });
26106
26107/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return _sequential_multi_YlOrRd_js__WEBPACK_IMPORTED_MODULE_30__["scheme"]; });
26108
26109/* harmony import */ var _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./sequential-single/Blues.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js");
26110/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["default"]; });
26111
26112/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return _sequential_single_Blues_js__WEBPACK_IMPORTED_MODULE_31__["scheme"]; });
26113
26114/* harmony import */ var _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./sequential-single/Greens.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js");
26115/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["default"]; });
26116
26117/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return _sequential_single_Greens_js__WEBPACK_IMPORTED_MODULE_32__["scheme"]; });
26118
26119/* harmony import */ var _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./sequential-single/Greys.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js");
26120/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["default"]; });
26121
26122/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return _sequential_single_Greys_js__WEBPACK_IMPORTED_MODULE_33__["scheme"]; });
26123
26124/* harmony import */ var _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sequential-single/Purples.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js");
26125/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["default"]; });
26126
26127/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return _sequential_single_Purples_js__WEBPACK_IMPORTED_MODULE_34__["scheme"]; });
26128
26129/* harmony import */ var _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./sequential-single/Reds.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js");
26130/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["default"]; });
26131
26132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return _sequential_single_Reds_js__WEBPACK_IMPORTED_MODULE_35__["scheme"]; });
26133
26134/* harmony import */ var _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./sequential-single/Oranges.js */ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js");
26135/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["default"]; });
26136
26137/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return _sequential_single_Oranges_js__WEBPACK_IMPORTED_MODULE_36__["scheme"]; });
26138
26139/* harmony import */ var _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./sequential-multi/cividis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js");
26140/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return _sequential_multi_cividis_js__WEBPACK_IMPORTED_MODULE_37__["default"]; });
26141
26142/* harmony import */ var _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./sequential-multi/cubehelix.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js");
26143/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return _sequential_multi_cubehelix_js__WEBPACK_IMPORTED_MODULE_38__["default"]; });
26144
26145/* harmony import */ var _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./sequential-multi/rainbow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js");
26146/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["default"]; });
26147
26148/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["warm"]; });
26149
26150/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return _sequential_multi_rainbow_js__WEBPACK_IMPORTED_MODULE_39__["cool"]; });
26151
26152/* harmony import */ var _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./sequential-multi/sinebow.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js");
26153/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return _sequential_multi_sinebow_js__WEBPACK_IMPORTED_MODULE_40__["default"]; });
26154
26155/* harmony import */ var _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./sequential-multi/turbo.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js");
26156/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return _sequential_multi_turbo_js__WEBPACK_IMPORTED_MODULE_41__["default"]; });
26157
26158/* harmony import */ var _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./sequential-multi/viridis.js */ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js");
26159/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["default"]; });
26160
26161/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["magma"]; });
26162
26163/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["inferno"]; });
26164
26165/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return _sequential_multi_viridis_js__WEBPACK_IMPORTED_MODULE_42__["plasma"]; });
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212/***/ }),
26213
26214/***/ "./node_modules/d3-scale-chromatic/src/ramp.js":
26215/*!*****************************************************!*\
26216 !*** ./node_modules/d3-scale-chromatic/src/ramp.js ***!
26217 \*****************************************************/
26218/*! exports provided: default */
26219/***/ (function(module, __webpack_exports__, __webpack_require__) {
26220
26221"use strict";
26222__webpack_require__.r(__webpack_exports__);
26223/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
26224
26225
26226/* harmony default export */ __webpack_exports__["default"] = (function(scheme) {
26227 return Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateRgbBasis"])(scheme[scheme.length - 1]);
26228});
26229
26230
26231/***/ }),
26232
26233/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js":
26234/*!**********************************************************************!*\
26235 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js ***!
26236 \**********************************************************************/
26237/*! exports provided: scheme, default */
26238/***/ (function(module, __webpack_exports__, __webpack_require__) {
26239
26240"use strict";
26241__webpack_require__.r(__webpack_exports__);
26242/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26243/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26244/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26245
26246
26247
26248var scheme = new Array(3).concat(
26249 "e5f5f999d8c92ca25f",
26250 "edf8fbb2e2e266c2a4238b45",
26251 "edf8fbb2e2e266c2a42ca25f006d2c",
26252 "edf8fbccece699d8c966c2a42ca25f006d2c",
26253 "edf8fbccece699d8c966c2a441ae76238b45005824",
26254 "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
26255 "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
26256).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26257
26258/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26259
26260
26261/***/ }),
26262
26263/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js":
26264/*!**********************************************************************!*\
26265 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js ***!
26266 \**********************************************************************/
26267/*! exports provided: scheme, default */
26268/***/ (function(module, __webpack_exports__, __webpack_require__) {
26269
26270"use strict";
26271__webpack_require__.r(__webpack_exports__);
26272/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26273/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26274/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26275
26276
26277
26278var scheme = new Array(3).concat(
26279 "e0ecf49ebcda8856a7",
26280 "edf8fbb3cde38c96c688419d",
26281 "edf8fbb3cde38c96c68856a7810f7c",
26282 "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
26283 "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
26284 "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
26285 "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
26286).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26287
26288/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26289
26290
26291/***/ }),
26292
26293/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js":
26294/*!**********************************************************************!*\
26295 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js ***!
26296 \**********************************************************************/
26297/*! exports provided: scheme, default */
26298/***/ (function(module, __webpack_exports__, __webpack_require__) {
26299
26300"use strict";
26301__webpack_require__.r(__webpack_exports__);
26302/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26303/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26304/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26305
26306
26307
26308var scheme = new Array(3).concat(
26309 "e0f3dba8ddb543a2ca",
26310 "f0f9e8bae4bc7bccc42b8cbe",
26311 "f0f9e8bae4bc7bccc443a2ca0868ac",
26312 "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
26313 "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
26314 "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
26315 "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
26316).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26317
26318/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26319
26320
26321/***/ }),
26322
26323/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js":
26324/*!**********************************************************************!*\
26325 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js ***!
26326 \**********************************************************************/
26327/*! exports provided: scheme, default */
26328/***/ (function(module, __webpack_exports__, __webpack_require__) {
26329
26330"use strict";
26331__webpack_require__.r(__webpack_exports__);
26332/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26333/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26334/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26335
26336
26337
26338var scheme = new Array(3).concat(
26339 "fee8c8fdbb84e34a33",
26340 "fef0d9fdcc8afc8d59d7301f",
26341 "fef0d9fdcc8afc8d59e34a33b30000",
26342 "fef0d9fdd49efdbb84fc8d59e34a33b30000",
26343 "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
26344 "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
26345 "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
26346).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26347
26348/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26349
26350
26351/***/ }),
26352
26353/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js":
26354/*!**********************************************************************!*\
26355 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js ***!
26356 \**********************************************************************/
26357/*! exports provided: scheme, default */
26358/***/ (function(module, __webpack_exports__, __webpack_require__) {
26359
26360"use strict";
26361__webpack_require__.r(__webpack_exports__);
26362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26363/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26364/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26365
26366
26367
26368var scheme = new Array(3).concat(
26369 "ece7f2a6bddb2b8cbe",
26370 "f1eef6bdc9e174a9cf0570b0",
26371 "f1eef6bdc9e174a9cf2b8cbe045a8d",
26372 "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
26373 "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
26374 "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
26375 "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
26376).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26377
26378/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26379
26380
26381/***/ }),
26382
26383/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js":
26384/*!************************************************************************!*\
26385 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js ***!
26386 \************************************************************************/
26387/*! exports provided: scheme, default */
26388/***/ (function(module, __webpack_exports__, __webpack_require__) {
26389
26390"use strict";
26391__webpack_require__.r(__webpack_exports__);
26392/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26393/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26394/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26395
26396
26397
26398var scheme = new Array(3).concat(
26399 "ece2f0a6bddb1c9099",
26400 "f6eff7bdc9e167a9cf02818a",
26401 "f6eff7bdc9e167a9cf1c9099016c59",
26402 "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
26403 "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
26404 "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
26405 "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
26406).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26407
26408/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26409
26410
26411/***/ }),
26412
26413/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js":
26414/*!**********************************************************************!*\
26415 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js ***!
26416 \**********************************************************************/
26417/*! exports provided: scheme, default */
26418/***/ (function(module, __webpack_exports__, __webpack_require__) {
26419
26420"use strict";
26421__webpack_require__.r(__webpack_exports__);
26422/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26423/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26424/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26425
26426
26427
26428var scheme = new Array(3).concat(
26429 "e7e1efc994c7dd1c77",
26430 "f1eef6d7b5d8df65b0ce1256",
26431 "f1eef6d7b5d8df65b0dd1c77980043",
26432 "f1eef6d4b9dac994c7df65b0dd1c77980043",
26433 "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
26434 "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
26435 "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
26436).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26437
26438/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26439
26440
26441/***/ }),
26442
26443/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js":
26444/*!**********************************************************************!*\
26445 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js ***!
26446 \**********************************************************************/
26447/*! exports provided: scheme, default */
26448/***/ (function(module, __webpack_exports__, __webpack_require__) {
26449
26450"use strict";
26451__webpack_require__.r(__webpack_exports__);
26452/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26453/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26454/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26455
26456
26457
26458var scheme = new Array(3).concat(
26459 "fde0ddfa9fb5c51b8a",
26460 "feebe2fbb4b9f768a1ae017e",
26461 "feebe2fbb4b9f768a1c51b8a7a0177",
26462 "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
26463 "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
26464 "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
26465 "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
26466).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26467
26468/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26469
26470
26471/***/ }),
26472
26473/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js":
26474/*!**********************************************************************!*\
26475 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js ***!
26476 \**********************************************************************/
26477/*! exports provided: scheme, default */
26478/***/ (function(module, __webpack_exports__, __webpack_require__) {
26479
26480"use strict";
26481__webpack_require__.r(__webpack_exports__);
26482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26483/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26484/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26485
26486
26487
26488var scheme = new Array(3).concat(
26489 "f7fcb9addd8e31a354",
26490 "ffffccc2e69978c679238443",
26491 "ffffccc2e69978c67931a354006837",
26492 "ffffccd9f0a3addd8e78c67931a354006837",
26493 "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
26494 "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
26495 "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
26496).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26497
26498/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26499
26500
26501/***/ }),
26502
26503/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js":
26504/*!************************************************************************!*\
26505 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js ***!
26506 \************************************************************************/
26507/*! exports provided: scheme, default */
26508/***/ (function(module, __webpack_exports__, __webpack_require__) {
26509
26510"use strict";
26511__webpack_require__.r(__webpack_exports__);
26512/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26513/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26514/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26515
26516
26517
26518var scheme = new Array(3).concat(
26519 "edf8b17fcdbb2c7fb8",
26520 "ffffcca1dab441b6c4225ea8",
26521 "ffffcca1dab441b6c42c7fb8253494",
26522 "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
26523 "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
26524 "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
26525 "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
26526).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26527
26528/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26529
26530
26531/***/ }),
26532
26533/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js":
26534/*!************************************************************************!*\
26535 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js ***!
26536 \************************************************************************/
26537/*! exports provided: scheme, default */
26538/***/ (function(module, __webpack_exports__, __webpack_require__) {
26539
26540"use strict";
26541__webpack_require__.r(__webpack_exports__);
26542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26543/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26544/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26545
26546
26547
26548var scheme = new Array(3).concat(
26549 "fff7bcfec44fd95f0e",
26550 "ffffd4fed98efe9929cc4c02",
26551 "ffffd4fed98efe9929d95f0e993404",
26552 "ffffd4fee391fec44ffe9929d95f0e993404",
26553 "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
26554 "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
26555 "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
26556).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26557
26558/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26559
26560
26561/***/ }),
26562
26563/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js":
26564/*!************************************************************************!*\
26565 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js ***!
26566 \************************************************************************/
26567/*! exports provided: scheme, default */
26568/***/ (function(module, __webpack_exports__, __webpack_require__) {
26569
26570"use strict";
26571__webpack_require__.r(__webpack_exports__);
26572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26573/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26574/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26575
26576
26577
26578var scheme = new Array(3).concat(
26579 "ffeda0feb24cf03b20",
26580 "ffffb2fecc5cfd8d3ce31a1c",
26581 "ffffb2fecc5cfd8d3cf03b20bd0026",
26582 "ffffb2fed976feb24cfd8d3cf03b20bd0026",
26583 "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
26584 "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
26585 "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
26586).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26587
26588/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26589
26590
26591/***/ }),
26592
26593/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js":
26594/*!*************************************************************************!*\
26595 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js ***!
26596 \*************************************************************************/
26597/*! exports provided: default */
26598/***/ (function(module, __webpack_exports__, __webpack_require__) {
26599
26600"use strict";
26601__webpack_require__.r(__webpack_exports__);
26602/* harmony default export */ __webpack_exports__["default"] = (function(t) {
26603 t = Math.max(0, Math.min(1, t));
26604 return "rgb("
26605 + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", "
26606 + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", "
26607 + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67)))))))
26608 + ")";
26609});
26610
26611
26612/***/ }),
26613
26614/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js":
26615/*!***************************************************************************!*\
26616 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js ***!
26617 \***************************************************************************/
26618/*! exports provided: default */
26619/***/ (function(module, __webpack_exports__, __webpack_require__) {
26620
26621"use strict";
26622__webpack_require__.r(__webpack_exports__);
26623/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
26624/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
26625
26626
26627
26628/* harmony default export */ __webpack_exports__["default"] = (Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(300, 0.5, 0.0), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-240, 0.5, 1.0)));
26629
26630
26631/***/ }),
26632
26633/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js":
26634/*!*************************************************************************!*\
26635 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js ***!
26636 \*************************************************************************/
26637/*! exports provided: warm, cool, default */
26638/***/ (function(module, __webpack_exports__, __webpack_require__) {
26639
26640"use strict";
26641__webpack_require__.r(__webpack_exports__);
26642/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "warm", function() { return warm; });
26643/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cool", function() { return cool; });
26644/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
26645/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
26646
26647
26648
26649var warm = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(-100, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8));
26650
26651var cool = Object(d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateCubehelixLong"])(Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(260, 0.75, 0.35), Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])(80, 1.50, 0.8));
26652
26653var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["cubehelix"])();
26654
26655/* harmony default export */ __webpack_exports__["default"] = (function(t) {
26656 if (t < 0 || t > 1) t -= Math.floor(t);
26657 var ts = Math.abs(t - 0.5);
26658 c.h = 360 * t - 100;
26659 c.s = 1.5 - 1.5 * ts;
26660 c.l = 0.8 - 0.9 * ts;
26661 return c + "";
26662});
26663
26664
26665/***/ }),
26666
26667/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js":
26668/*!*************************************************************************!*\
26669 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js ***!
26670 \*************************************************************************/
26671/*! exports provided: default */
26672/***/ (function(module, __webpack_exports__, __webpack_require__) {
26673
26674"use strict";
26675__webpack_require__.r(__webpack_exports__);
26676/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
26677
26678
26679var c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["rgb"])(),
26680 pi_1_3 = Math.PI / 3,
26681 pi_2_3 = Math.PI * 2 / 3;
26682
26683/* harmony default export */ __webpack_exports__["default"] = (function(t) {
26684 var x;
26685 t = (0.5 - t) * Math.PI;
26686 c.r = 255 * (x = Math.sin(t)) * x;
26687 c.g = 255 * (x = Math.sin(t + pi_1_3)) * x;
26688 c.b = 255 * (x = Math.sin(t + pi_2_3)) * x;
26689 return c + "";
26690});
26691
26692
26693/***/ }),
26694
26695/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js":
26696/*!***********************************************************************!*\
26697 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js ***!
26698 \***********************************************************************/
26699/*! exports provided: default */
26700/***/ (function(module, __webpack_exports__, __webpack_require__) {
26701
26702"use strict";
26703__webpack_require__.r(__webpack_exports__);
26704/* harmony default export */ __webpack_exports__["default"] = (function(t) {
26705 t = Math.max(0, Math.min(1, t));
26706 return "rgb("
26707 + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", "
26708 + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", "
26709 + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66)))))))
26710 + ")";
26711});
26712
26713
26714/***/ }),
26715
26716/***/ "./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js":
26717/*!*************************************************************************!*\
26718 !*** ./node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js ***!
26719 \*************************************************************************/
26720/*! exports provided: default, magma, inferno, plasma */
26721/***/ (function(module, __webpack_exports__, __webpack_require__) {
26722
26723"use strict";
26724__webpack_require__.r(__webpack_exports__);
26725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "magma", function() { return magma; });
26726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "inferno", function() { return inferno; });
26727/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plasma", function() { return plasma; });
26728/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26729
26730
26731function ramp(range) {
26732 var n = range.length;
26733 return function(t) {
26734 return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
26735 };
26736}
26737
26738/* harmony default export */ __webpack_exports__["default"] = (ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")));
26739
26740var magma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
26741
26742var inferno = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
26743
26744var plasma = ramp(Object(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"])("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
26745
26746
26747/***/ }),
26748
26749/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js":
26750/*!************************************************************************!*\
26751 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Blues.js ***!
26752 \************************************************************************/
26753/*! exports provided: scheme, default */
26754/***/ (function(module, __webpack_exports__, __webpack_require__) {
26755
26756"use strict";
26757__webpack_require__.r(__webpack_exports__);
26758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26759/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26760/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26761
26762
26763
26764var scheme = new Array(3).concat(
26765 "deebf79ecae13182bd",
26766 "eff3ffbdd7e76baed62171b5",
26767 "eff3ffbdd7e76baed63182bd08519c",
26768 "eff3ffc6dbef9ecae16baed63182bd08519c",
26769 "eff3ffc6dbef9ecae16baed64292c62171b5084594",
26770 "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
26771 "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
26772).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26773
26774/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26775
26776
26777/***/ }),
26778
26779/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js":
26780/*!*************************************************************************!*\
26781 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greens.js ***!
26782 \*************************************************************************/
26783/*! exports provided: scheme, default */
26784/***/ (function(module, __webpack_exports__, __webpack_require__) {
26785
26786"use strict";
26787__webpack_require__.r(__webpack_exports__);
26788/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26789/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26790/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26791
26792
26793
26794var scheme = new Array(3).concat(
26795 "e5f5e0a1d99b31a354",
26796 "edf8e9bae4b374c476238b45",
26797 "edf8e9bae4b374c47631a354006d2c",
26798 "edf8e9c7e9c0a1d99b74c47631a354006d2c",
26799 "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
26800 "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
26801 "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
26802).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26803
26804/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26805
26806
26807/***/ }),
26808
26809/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js":
26810/*!************************************************************************!*\
26811 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Greys.js ***!
26812 \************************************************************************/
26813/*! exports provided: scheme, default */
26814/***/ (function(module, __webpack_exports__, __webpack_require__) {
26815
26816"use strict";
26817__webpack_require__.r(__webpack_exports__);
26818/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26819/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26820/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26821
26822
26823
26824var scheme = new Array(3).concat(
26825 "f0f0f0bdbdbd636363",
26826 "f7f7f7cccccc969696525252",
26827 "f7f7f7cccccc969696636363252525",
26828 "f7f7f7d9d9d9bdbdbd969696636363252525",
26829 "f7f7f7d9d9d9bdbdbd969696737373525252252525",
26830 "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
26831 "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
26832).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26833
26834/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26835
26836
26837/***/ }),
26838
26839/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js":
26840/*!**************************************************************************!*\
26841 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js ***!
26842 \**************************************************************************/
26843/*! exports provided: scheme, default */
26844/***/ (function(module, __webpack_exports__, __webpack_require__) {
26845
26846"use strict";
26847__webpack_require__.r(__webpack_exports__);
26848/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26849/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26850/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26851
26852
26853
26854var scheme = new Array(3).concat(
26855 "fee6cefdae6be6550d",
26856 "feeddefdbe85fd8d3cd94701",
26857 "feeddefdbe85fd8d3ce6550da63603",
26858 "feeddefdd0a2fdae6bfd8d3ce6550da63603",
26859 "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
26860 "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
26861 "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
26862).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26863
26864/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26865
26866
26867/***/ }),
26868
26869/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js":
26870/*!**************************************************************************!*\
26871 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Purples.js ***!
26872 \**************************************************************************/
26873/*! exports provided: scheme, default */
26874/***/ (function(module, __webpack_exports__, __webpack_require__) {
26875
26876"use strict";
26877__webpack_require__.r(__webpack_exports__);
26878/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26879/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26880/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26881
26882
26883
26884var scheme = new Array(3).concat(
26885 "efedf5bcbddc756bb1",
26886 "f2f0f7cbc9e29e9ac86a51a3",
26887 "f2f0f7cbc9e29e9ac8756bb154278f",
26888 "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
26889 "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
26890 "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
26891 "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
26892).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26893
26894/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26895
26896
26897/***/ }),
26898
26899/***/ "./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js":
26900/*!***********************************************************************!*\
26901 !*** ./node_modules/d3-scale-chromatic/src/sequential-single/Reds.js ***!
26902 \***********************************************************************/
26903/*! exports provided: scheme, default */
26904/***/ (function(module, __webpack_exports__, __webpack_require__) {
26905
26906"use strict";
26907__webpack_require__.r(__webpack_exports__);
26908/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scheme", function() { return scheme; });
26909/* harmony import */ var _colors_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../colors.js */ "./node_modules/d3-scale-chromatic/src/colors.js");
26910/* harmony import */ var _ramp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ramp.js */ "./node_modules/d3-scale-chromatic/src/ramp.js");
26911
26912
26913
26914var scheme = new Array(3).concat(
26915 "fee0d2fc9272de2d26",
26916 "fee5d9fcae91fb6a4acb181d",
26917 "fee5d9fcae91fb6a4ade2d26a50f15",
26918 "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
26919 "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
26920 "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
26921 "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
26922).map(_colors_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
26923
26924/* harmony default export */ __webpack_exports__["default"] = (Object(_ramp_js__WEBPACK_IMPORTED_MODULE_1__["default"])(scheme));
26925
26926
26927/***/ }),
26928
26929/***/ "./node_modules/d3-scale/src/array.js":
26930/*!********************************************!*\
26931 !*** ./node_modules/d3-scale/src/array.js ***!
26932 \********************************************/
26933/*! exports provided: map, slice */
26934/***/ (function(module, __webpack_exports__, __webpack_require__) {
26935
26936"use strict";
26937__webpack_require__.r(__webpack_exports__);
26938/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; });
26939/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
26940var array = Array.prototype;
26941
26942var map = array.map;
26943var slice = array.slice;
26944
26945
26946/***/ }),
26947
26948/***/ "./node_modules/d3-scale/src/band.js":
26949/*!*******************************************!*\
26950 !*** ./node_modules/d3-scale/src/band.js ***!
26951 \*******************************************/
26952/*! exports provided: default, point */
26953/***/ (function(module, __webpack_exports__, __webpack_require__) {
26954
26955"use strict";
26956__webpack_require__.r(__webpack_exports__);
26957/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return band; });
26958/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; });
26959/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
26960/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
26961/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js");
26962
26963
26964
26965
26966function band() {
26967 var scale = Object(_ordinal__WEBPACK_IMPORTED_MODULE_2__["default"])().unknown(undefined),
26968 domain = scale.domain,
26969 ordinalRange = scale.range,
26970 range = [0, 1],
26971 step,
26972 bandwidth,
26973 round = false,
26974 paddingInner = 0,
26975 paddingOuter = 0,
26976 align = 0.5;
26977
26978 delete scale.unknown;
26979
26980 function rescale() {
26981 var n = domain().length,
26982 reverse = range[1] < range[0],
26983 start = range[reverse - 0],
26984 stop = range[1 - reverse];
26985 step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);
26986 if (round) step = Math.floor(step);
26987 start += (stop - start - step * (n - paddingInner)) * align;
26988 bandwidth = step * (1 - paddingInner);
26989 if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);
26990 var values = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["range"])(n).map(function(i) { return start + step * i; });
26991 return ordinalRange(reverse ? values.reverse() : values);
26992 }
26993
26994 scale.domain = function(_) {
26995 return arguments.length ? (domain(_), rescale()) : domain();
26996 };
26997
26998 scale.range = function(_) {
26999 return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice();
27000 };
27001
27002 scale.rangeRound = function(_) {
27003 return range = [+_[0], +_[1]], round = true, rescale();
27004 };
27005
27006 scale.bandwidth = function() {
27007 return bandwidth;
27008 };
27009
27010 scale.step = function() {
27011 return step;
27012 };
27013
27014 scale.round = function(_) {
27015 return arguments.length ? (round = !!_, rescale()) : round;
27016 };
27017
27018 scale.padding = function(_) {
27019 return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;
27020 };
27021
27022 scale.paddingInner = function(_) {
27023 return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;
27024 };
27025
27026 scale.paddingOuter = function(_) {
27027 return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;
27028 };
27029
27030 scale.align = function(_) {
27031 return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;
27032 };
27033
27034 scale.copy = function() {
27035 return band(domain(), range)
27036 .round(round)
27037 .paddingInner(paddingInner)
27038 .paddingOuter(paddingOuter)
27039 .align(align);
27040 };
27041
27042 return _init__WEBPACK_IMPORTED_MODULE_1__["initRange"].apply(rescale(), arguments);
27043}
27044
27045function pointish(scale) {
27046 var copy = scale.copy;
27047
27048 scale.padding = scale.paddingOuter;
27049 delete scale.paddingInner;
27050 delete scale.paddingOuter;
27051
27052 scale.copy = function() {
27053 return pointish(copy());
27054 };
27055
27056 return scale;
27057}
27058
27059function point() {
27060 return pointish(band.apply(null, arguments).paddingInner(1));
27061}
27062
27063
27064/***/ }),
27065
27066/***/ "./node_modules/d3-scale/src/constant.js":
27067/*!***********************************************!*\
27068 !*** ./node_modules/d3-scale/src/constant.js ***!
27069 \***********************************************/
27070/*! exports provided: default */
27071/***/ (function(module, __webpack_exports__, __webpack_require__) {
27072
27073"use strict";
27074__webpack_require__.r(__webpack_exports__);
27075/* harmony default export */ __webpack_exports__["default"] = (function(x) {
27076 return function() {
27077 return x;
27078 };
27079});
27080
27081
27082/***/ }),
27083
27084/***/ "./node_modules/d3-scale/src/continuous.js":
27085/*!*************************************************!*\
27086 !*** ./node_modules/d3-scale/src/continuous.js ***!
27087 \*************************************************/
27088/*! exports provided: identity, copy, transformer, default */
27089/***/ (function(module, __webpack_exports__, __webpack_require__) {
27090
27091"use strict";
27092__webpack_require__.r(__webpack_exports__);
27093/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
27094/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
27095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformer", function() { return transformer; });
27096/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return continuous; });
27097/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
27098/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
27099/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
27100/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-scale/src/constant.js");
27101/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js");
27102
27103
27104
27105
27106
27107
27108var unit = [0, 1];
27109
27110function identity(x) {
27111 return x;
27112}
27113
27114function normalize(a, b) {
27115 return (b -= (a = +a))
27116 ? function(x) { return (x - a) / b; }
27117 : Object(_constant__WEBPACK_IMPORTED_MODULE_3__["default"])(isNaN(b) ? NaN : 0.5);
27118}
27119
27120function clamper(domain) {
27121 var a = domain[0], b = domain[domain.length - 1], t;
27122 if (a > b) t = a, a = b, b = t;
27123 return function(x) { return Math.max(a, Math.min(b, x)); };
27124}
27125
27126// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
27127// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
27128function bimap(domain, range, interpolate) {
27129 var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
27130 if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
27131 else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
27132 return function(x) { return r0(d0(x)); };
27133}
27134
27135function polymap(domain, range, interpolate) {
27136 var j = Math.min(domain.length, range.length) - 1,
27137 d = new Array(j),
27138 r = new Array(j),
27139 i = -1;
27140
27141 // Reverse descending domains.
27142 if (domain[j] < domain[0]) {
27143 domain = domain.slice().reverse();
27144 range = range.slice().reverse();
27145 }
27146
27147 while (++i < j) {
27148 d[i] = normalize(domain[i], domain[i + 1]);
27149 r[i] = interpolate(range[i], range[i + 1]);
27150 }
27151
27152 return function(x) {
27153 var i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 1, j) - 1;
27154 return r[i](d[i](x));
27155 };
27156}
27157
27158function copy(source, target) {
27159 return target
27160 .domain(source.domain())
27161 .range(source.range())
27162 .interpolate(source.interpolate())
27163 .clamp(source.clamp())
27164 .unknown(source.unknown());
27165}
27166
27167function transformer() {
27168 var domain = unit,
27169 range = unit,
27170 interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolate"],
27171 transform,
27172 untransform,
27173 unknown,
27174 clamp = identity,
27175 piecewise,
27176 output,
27177 input;
27178
27179 function rescale() {
27180 piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
27181 output = input = null;
27182 return scale;
27183 }
27184
27185 function scale(x) {
27186 return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x)));
27187 }
27188
27189 scale.invert = function(y) {
27190 return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"])))(y)));
27191 };
27192
27193 scale.domain = function(_) {
27194 return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_2__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_4__["default"]), clamp === identity || (clamp = clamper(domain)), rescale()) : domain.slice();
27195 };
27196
27197 scale.range = function(_) {
27198 return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), rescale()) : range.slice();
27199 };
27200
27201 scale.rangeRound = function(_) {
27202 return range = _array__WEBPACK_IMPORTED_MODULE_2__["slice"].call(_), interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRound"], rescale();
27203 };
27204
27205 scale.clamp = function(_) {
27206 return arguments.length ? (clamp = _ ? clamper(domain) : identity, scale) : clamp !== identity;
27207 };
27208
27209 scale.interpolate = function(_) {
27210 return arguments.length ? (interpolate = _, rescale()) : interpolate;
27211 };
27212
27213 scale.unknown = function(_) {
27214 return arguments.length ? (unknown = _, scale) : unknown;
27215 };
27216
27217 return function(t, u) {
27218 transform = t, untransform = u;
27219 return rescale();
27220 };
27221}
27222
27223function continuous(transform, untransform) {
27224 return transformer()(transform, untransform);
27225}
27226
27227
27228/***/ }),
27229
27230/***/ "./node_modules/d3-scale/src/diverging.js":
27231/*!************************************************!*\
27232 !*** ./node_modules/d3-scale/src/diverging.js ***!
27233 \************************************************/
27234/*! exports provided: default, divergingLog, divergingSymlog, divergingPow, divergingSqrt */
27235/***/ (function(module, __webpack_exports__, __webpack_require__) {
27236
27237"use strict";
27238__webpack_require__.r(__webpack_exports__);
27239/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return diverging; });
27240/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingLog", function() { return divergingLog; });
27241/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSymlog", function() { return divergingSymlog; });
27242/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingPow", function() { return divergingPow; });
27243/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "divergingSqrt", function() { return divergingSqrt; });
27244/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
27245/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27246/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
27247/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js");
27248/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js");
27249/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js");
27250/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js");
27251
27252
27253
27254
27255
27256
27257
27258
27259function transformer() {
27260 var x0 = 0,
27261 x1 = 0.5,
27262 x2 = 1,
27263 t0,
27264 t1,
27265 t2,
27266 k10,
27267 k21,
27268 interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"],
27269 transform,
27270 clamp = false,
27271 unknown;
27272
27273 function scale(x) {
27274 return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (x < t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x));
27275 }
27276
27277 scale.domain = function(_) {
27278 return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), t2 = transform(x2 = +_[2]), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), scale) : [x0, x1, x2];
27279 };
27280
27281 scale.clamp = function(_) {
27282 return arguments.length ? (clamp = !!_, scale) : clamp;
27283 };
27284
27285 scale.interpolator = function(_) {
27286 return arguments.length ? (interpolator = _, scale) : interpolator;
27287 };
27288
27289 scale.unknown = function(_) {
27290 return arguments.length ? (unknown = _, scale) : unknown;
27291 };
27292
27293 return function(t) {
27294 transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1);
27295 return scale;
27296 };
27297}
27298
27299function diverging() {
27300 var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"]));
27301
27302 scale.copy = function() {
27303 return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, diverging());
27304 };
27305
27306 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
27307}
27308
27309function divergingLog() {
27310 var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([0.1, 1, 10]);
27311
27312 scale.copy = function() {
27313 return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingLog()).base(scale.base());
27314 };
27315
27316 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
27317}
27318
27319function divergingSymlog() {
27320 var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_5__["symlogish"])(transformer());
27321
27322 scale.copy = function() {
27323 return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingSymlog()).constant(scale.constant());
27324 };
27325
27326 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
27327}
27328
27329function divergingPow() {
27330 var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_6__["powish"])(transformer());
27331
27332 scale.copy = function() {
27333 return Object(_sequential__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, divergingPow()).exponent(scale.exponent());
27334 };
27335
27336 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
27337}
27338
27339function divergingSqrt() {
27340 return divergingPow.apply(null, arguments).exponent(0.5);
27341}
27342
27343
27344/***/ }),
27345
27346/***/ "./node_modules/d3-scale/src/identity.js":
27347/*!***********************************************!*\
27348 !*** ./node_modules/d3-scale/src/identity.js ***!
27349 \***********************************************/
27350/*! exports provided: default */
27351/***/ (function(module, __webpack_exports__, __webpack_require__) {
27352
27353"use strict";
27354__webpack_require__.r(__webpack_exports__);
27355/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return identity; });
27356/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
27357/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
27358/* harmony import */ var _number__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number */ "./node_modules/d3-scale/src/number.js");
27359
27360
27361
27362
27363function identity(domain) {
27364 var unknown;
27365
27366 function scale(x) {
27367 return isNaN(x = +x) ? unknown : x;
27368 }
27369
27370 scale.invert = scale;
27371
27372 scale.domain = scale.range = function(_) {
27373 return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(_, _number__WEBPACK_IMPORTED_MODULE_2__["default"]), scale) : domain.slice();
27374 };
27375
27376 scale.unknown = function(_) {
27377 return arguments.length ? (unknown = _, scale) : unknown;
27378 };
27379
27380 scale.copy = function() {
27381 return identity(domain).unknown(unknown);
27382 };
27383
27384 domain = arguments.length ? _array__WEBPACK_IMPORTED_MODULE_0__["map"].call(domain, _number__WEBPACK_IMPORTED_MODULE_2__["default"]) : [0, 1];
27385
27386 return Object(_linear__WEBPACK_IMPORTED_MODULE_1__["linearish"])(scale);
27387}
27388
27389
27390/***/ }),
27391
27392/***/ "./node_modules/d3-scale/src/index.js":
27393/*!********************************************!*\
27394 !*** ./node_modules/d3-scale/src/index.js ***!
27395 \********************************************/
27396/*! exports provided: scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat */
27397/***/ (function(module, __webpack_exports__, __webpack_require__) {
27398
27399"use strict";
27400__webpack_require__.r(__webpack_exports__);
27401/* harmony import */ var _band__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./band */ "./node_modules/d3-scale/src/band.js");
27402/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["default"]; });
27403
27404/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return _band__WEBPACK_IMPORTED_MODULE_0__["point"]; });
27405
27406/* harmony import */ var _identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity */ "./node_modules/d3-scale/src/identity.js");
27407/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return _identity__WEBPACK_IMPORTED_MODULE_1__["default"]; });
27408
27409/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
27410/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return _linear__WEBPACK_IMPORTED_MODULE_2__["default"]; });
27411
27412/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js");
27413/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return _log__WEBPACK_IMPORTED_MODULE_3__["default"]; });
27414
27415/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js");
27416/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return _symlog__WEBPACK_IMPORTED_MODULE_4__["default"]; });
27417
27418/* harmony import */ var _ordinal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ordinal */ "./node_modules/d3-scale/src/ordinal.js");
27419/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["default"]; });
27420
27421/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return _ordinal__WEBPACK_IMPORTED_MODULE_5__["implicit"]; });
27422
27423/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js");
27424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["default"]; });
27425
27426/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return _pow__WEBPACK_IMPORTED_MODULE_6__["sqrt"]; });
27427
27428/* harmony import */ var _quantile__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./quantile */ "./node_modules/d3-scale/src/quantile.js");
27429/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return _quantile__WEBPACK_IMPORTED_MODULE_7__["default"]; });
27430
27431/* harmony import */ var _quantize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./quantize */ "./node_modules/d3-scale/src/quantize.js");
27432/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return _quantize__WEBPACK_IMPORTED_MODULE_8__["default"]; });
27433
27434/* harmony import */ var _threshold__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./threshold */ "./node_modules/d3-scale/src/threshold.js");
27435/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return _threshold__WEBPACK_IMPORTED_MODULE_9__["default"]; });
27436
27437/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js");
27438/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return _time__WEBPACK_IMPORTED_MODULE_10__["default"]; });
27439
27440/* harmony import */ var _utcTime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcTime */ "./node_modules/d3-scale/src/utcTime.js");
27441/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return _utcTime__WEBPACK_IMPORTED_MODULE_11__["default"]; });
27442
27443/* harmony import */ var _sequential__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./sequential */ "./node_modules/d3-scale/src/sequential.js");
27444/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["default"]; });
27445
27446/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialLog"]; });
27447
27448/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialPow"]; });
27449
27450/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSqrt"]; });
27451
27452/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return _sequential__WEBPACK_IMPORTED_MODULE_12__["sequentialSymlog"]; });
27453
27454/* harmony import */ var _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./sequentialQuantile */ "./node_modules/d3-scale/src/sequentialQuantile.js");
27455/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return _sequentialQuantile__WEBPACK_IMPORTED_MODULE_13__["default"]; });
27456
27457/* harmony import */ var _diverging__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diverging */ "./node_modules/d3-scale/src/diverging.js");
27458/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["default"]; });
27459
27460/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingLog"]; });
27461
27462/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingPow"]; });
27463
27464/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSqrt"]; });
27465
27466/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return _diverging__WEBPACK_IMPORTED_MODULE_14__["divergingSymlog"]; });
27467
27468/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js");
27469/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return _tickFormat__WEBPACK_IMPORTED_MODULE_15__["default"]; });
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504/***/ }),
27505
27506/***/ "./node_modules/d3-scale/src/init.js":
27507/*!*******************************************!*\
27508 !*** ./node_modules/d3-scale/src/init.js ***!
27509 \*******************************************/
27510/*! exports provided: initRange, initInterpolator */
27511/***/ (function(module, __webpack_exports__, __webpack_require__) {
27512
27513"use strict";
27514__webpack_require__.r(__webpack_exports__);
27515/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initRange", function() { return initRange; });
27516/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initInterpolator", function() { return initInterpolator; });
27517function initRange(domain, range) {
27518 switch (arguments.length) {
27519 case 0: break;
27520 case 1: this.range(domain); break;
27521 default: this.range(range).domain(domain); break;
27522 }
27523 return this;
27524}
27525
27526function initInterpolator(domain, interpolator) {
27527 switch (arguments.length) {
27528 case 0: break;
27529 case 1: this.interpolator(domain); break;
27530 default: this.interpolator(interpolator).domain(domain); break;
27531 }
27532 return this;
27533}
27534
27535
27536/***/ }),
27537
27538/***/ "./node_modules/d3-scale/src/linear.js":
27539/*!*********************************************!*\
27540 !*** ./node_modules/d3-scale/src/linear.js ***!
27541 \*********************************************/
27542/*! exports provided: linearish, default */
27543/***/ (function(module, __webpack_exports__, __webpack_require__) {
27544
27545"use strict";
27546__webpack_require__.r(__webpack_exports__);
27547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linearish", function() { return linearish; });
27548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return linear; });
27549/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
27550/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
27551/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27552/* harmony import */ var _tickFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tickFormat */ "./node_modules/d3-scale/src/tickFormat.js");
27553
27554
27555
27556
27557
27558function linearish(scale) {
27559 var domain = scale.domain;
27560
27561 scale.ticks = function(count) {
27562 var d = domain();
27563 return Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count);
27564 };
27565
27566 scale.tickFormat = function(count, specifier) {
27567 var d = domain();
27568 return Object(_tickFormat__WEBPACK_IMPORTED_MODULE_3__["default"])(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
27569 };
27570
27571 scale.nice = function(count) {
27572 if (count == null) count = 10;
27573
27574 var d = domain(),
27575 i0 = 0,
27576 i1 = d.length - 1,
27577 start = d[i0],
27578 stop = d[i1],
27579 step;
27580
27581 if (stop < start) {
27582 step = start, start = stop, stop = step;
27583 step = i0, i0 = i1, i1 = step;
27584 }
27585
27586 step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count);
27587
27588 if (step > 0) {
27589 start = Math.floor(start / step) * step;
27590 stop = Math.ceil(stop / step) * step;
27591 step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count);
27592 } else if (step < 0) {
27593 start = Math.ceil(start * step) / step;
27594 stop = Math.floor(stop * step) / step;
27595 step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count);
27596 }
27597
27598 if (step > 0) {
27599 d[i0] = Math.floor(start / step) * step;
27600 d[i1] = Math.ceil(stop / step) * step;
27601 domain(d);
27602 } else if (step < 0) {
27603 d[i0] = Math.ceil(start * step) / step;
27604 d[i1] = Math.floor(stop * step) / step;
27605 domain(d);
27606 }
27607
27608 return scale;
27609 };
27610
27611 return scale;
27612}
27613
27614function linear() {
27615 var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]);
27616
27617 scale.copy = function() {
27618 return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, linear());
27619 };
27620
27621 _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
27622
27623 return linearish(scale);
27624}
27625
27626
27627/***/ }),
27628
27629/***/ "./node_modules/d3-scale/src/log.js":
27630/*!******************************************!*\
27631 !*** ./node_modules/d3-scale/src/log.js ***!
27632 \******************************************/
27633/*! exports provided: loggish, default */
27634/***/ (function(module, __webpack_exports__, __webpack_require__) {
27635
27636"use strict";
27637__webpack_require__.r(__webpack_exports__);
27638/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "loggish", function() { return loggish; });
27639/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return log; });
27640/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
27641/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js");
27642/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js");
27643/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
27644/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27645
27646
27647
27648
27649
27650
27651function transformLog(x) {
27652 return Math.log(x);
27653}
27654
27655function transformExp(x) {
27656 return Math.exp(x);
27657}
27658
27659function transformLogn(x) {
27660 return -Math.log(-x);
27661}
27662
27663function transformExpn(x) {
27664 return -Math.exp(-x);
27665}
27666
27667function pow10(x) {
27668 return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x;
27669}
27670
27671function powp(base) {
27672 return base === 10 ? pow10
27673 : base === Math.E ? Math.exp
27674 : function(x) { return Math.pow(base, x); };
27675}
27676
27677function logp(base) {
27678 return base === Math.E ? Math.log
27679 : base === 10 && Math.log10
27680 || base === 2 && Math.log2
27681 || (base = Math.log(base), function(x) { return Math.log(x) / base; });
27682}
27683
27684function reflect(f) {
27685 return function(x) {
27686 return -f(-x);
27687 };
27688}
27689
27690function loggish(transform) {
27691 var scale = transform(transformLog, transformExp),
27692 domain = scale.domain,
27693 base = 10,
27694 logs,
27695 pows;
27696
27697 function rescale() {
27698 logs = logp(base), pows = powp(base);
27699 if (domain()[0] < 0) {
27700 logs = reflect(logs), pows = reflect(pows);
27701 transform(transformLogn, transformExpn);
27702 } else {
27703 transform(transformLog, transformExp);
27704 }
27705 return scale;
27706 }
27707
27708 scale.base = function(_) {
27709 return arguments.length ? (base = +_, rescale()) : base;
27710 };
27711
27712 scale.domain = function(_) {
27713 return arguments.length ? (domain(_), rescale()) : domain();
27714 };
27715
27716 scale.ticks = function(count) {
27717 var d = domain(),
27718 u = d[0],
27719 v = d[d.length - 1],
27720 r;
27721
27722 if (r = v < u) i = u, u = v, v = i;
27723
27724 var i = logs(u),
27725 j = logs(v),
27726 p,
27727 k,
27728 t,
27729 n = count == null ? 10 : +count,
27730 z = [];
27731
27732 if (!(base % 1) && j - i < n) {
27733 i = Math.round(i) - 1, j = Math.round(j) + 1;
27734 if (u > 0) for (; i < j; ++i) {
27735 for (k = 1, p = pows(i); k < base; ++k) {
27736 t = p * k;
27737 if (t < u) continue;
27738 if (t > v) break;
27739 z.push(t);
27740 }
27741 } else for (; i < j; ++i) {
27742 for (k = base - 1, p = pows(i); k >= 1; --k) {
27743 t = p * k;
27744 if (t < u) continue;
27745 if (t > v) break;
27746 z.push(t);
27747 }
27748 }
27749 } else {
27750 z = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["ticks"])(i, j, Math.min(j - i, n)).map(pows);
27751 }
27752
27753 return r ? z.reverse() : z;
27754 };
27755
27756 scale.tickFormat = function(count, specifier) {
27757 if (specifier == null) specifier = base === 10 ? ".0e" : ",";
27758 if (typeof specifier !== "function") specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier);
27759 if (count === Infinity) return specifier;
27760 if (count == null) count = 10;
27761 var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
27762 return function(d) {
27763 var i = d / pows(Math.round(logs(d)));
27764 if (i * base < base - 0.5) i *= base;
27765 return i <= k ? specifier(d) : "";
27766 };
27767 };
27768
27769 scale.nice = function() {
27770 return domain(Object(_nice__WEBPACK_IMPORTED_MODULE_2__["default"])(domain(), {
27771 floor: function(x) { return pows(Math.floor(logs(x))); },
27772 ceil: function(x) { return pows(Math.ceil(logs(x))); }
27773 }));
27774 };
27775
27776 return scale;
27777}
27778
27779function log() {
27780 var scale = loggish(Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["transformer"])()).domain([1, 10]);
27781
27782 scale.copy = function() {
27783 return Object(_continuous__WEBPACK_IMPORTED_MODULE_3__["copy"])(scale, log()).base(scale.base());
27784 };
27785
27786 _init__WEBPACK_IMPORTED_MODULE_4__["initRange"].apply(scale, arguments);
27787
27788 return scale;
27789}
27790
27791
27792/***/ }),
27793
27794/***/ "./node_modules/d3-scale/src/nice.js":
27795/*!*******************************************!*\
27796 !*** ./node_modules/d3-scale/src/nice.js ***!
27797 \*******************************************/
27798/*! exports provided: default */
27799/***/ (function(module, __webpack_exports__, __webpack_require__) {
27800
27801"use strict";
27802__webpack_require__.r(__webpack_exports__);
27803/* harmony default export */ __webpack_exports__["default"] = (function(domain, interval) {
27804 domain = domain.slice();
27805
27806 var i0 = 0,
27807 i1 = domain.length - 1,
27808 x0 = domain[i0],
27809 x1 = domain[i1],
27810 t;
27811
27812 if (x1 < x0) {
27813 t = i0, i0 = i1, i1 = t;
27814 t = x0, x0 = x1, x1 = t;
27815 }
27816
27817 domain[i0] = interval.floor(x0);
27818 domain[i1] = interval.ceil(x1);
27819 return domain;
27820});
27821
27822
27823/***/ }),
27824
27825/***/ "./node_modules/d3-scale/src/number.js":
27826/*!*********************************************!*\
27827 !*** ./node_modules/d3-scale/src/number.js ***!
27828 \*********************************************/
27829/*! exports provided: default */
27830/***/ (function(module, __webpack_exports__, __webpack_require__) {
27831
27832"use strict";
27833__webpack_require__.r(__webpack_exports__);
27834/* harmony default export */ __webpack_exports__["default"] = (function(x) {
27835 return +x;
27836});
27837
27838
27839/***/ }),
27840
27841/***/ "./node_modules/d3-scale/src/ordinal.js":
27842/*!**********************************************!*\
27843 !*** ./node_modules/d3-scale/src/ordinal.js ***!
27844 \**********************************************/
27845/*! exports provided: implicit, default */
27846/***/ (function(module, __webpack_exports__, __webpack_require__) {
27847
27848"use strict";
27849__webpack_require__.r(__webpack_exports__);
27850/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "implicit", function() { return implicit; });
27851/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ordinal; });
27852/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js");
27853/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
27854/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27855
27856
27857
27858
27859var implicit = {name: "implicit"};
27860
27861function ordinal() {
27862 var index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])(),
27863 domain = [],
27864 range = [],
27865 unknown = implicit;
27866
27867 function scale(d) {
27868 var key = d + "", i = index.get(key);
27869 if (!i) {
27870 if (unknown !== implicit) return unknown;
27871 index.set(key, i = domain.push(d));
27872 }
27873 return range[(i - 1) % range.length];
27874 }
27875
27876 scale.domain = function(_) {
27877 if (!arguments.length) return domain.slice();
27878 domain = [], index = Object(d3_collection__WEBPACK_IMPORTED_MODULE_0__["map"])();
27879 var i = -1, n = _.length, d, key;
27880 while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d));
27881 return scale;
27882 };
27883
27884 scale.range = function(_) {
27885 return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), scale) : range.slice();
27886 };
27887
27888 scale.unknown = function(_) {
27889 return arguments.length ? (unknown = _, scale) : unknown;
27890 };
27891
27892 scale.copy = function() {
27893 return ordinal(domain, range).unknown(unknown);
27894 };
27895
27896 _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
27897
27898 return scale;
27899}
27900
27901
27902/***/ }),
27903
27904/***/ "./node_modules/d3-scale/src/pow.js":
27905/*!******************************************!*\
27906 !*** ./node_modules/d3-scale/src/pow.js ***!
27907 \******************************************/
27908/*! exports provided: powish, default, sqrt */
27909/***/ (function(module, __webpack_exports__, __webpack_require__) {
27910
27911"use strict";
27912__webpack_require__.r(__webpack_exports__);
27913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "powish", function() { return powish; });
27914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pow; });
27915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; });
27916/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
27917/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
27918/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27919
27920
27921
27922
27923function transformPow(exponent) {
27924 return function(x) {
27925 return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
27926 };
27927}
27928
27929function transformSqrt(x) {
27930 return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x);
27931}
27932
27933function transformSquare(x) {
27934 return x < 0 ? -x * x : x * x;
27935}
27936
27937function powish(transform) {
27938 var scale = transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"]),
27939 exponent = 1;
27940
27941 function rescale() {
27942 return exponent === 1 ? transform(_continuous__WEBPACK_IMPORTED_MODULE_1__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"])
27943 : exponent === 0.5 ? transform(transformSqrt, transformSquare)
27944 : transform(transformPow(exponent), transformPow(1 / exponent));
27945 }
27946
27947 scale.exponent = function(_) {
27948 return arguments.length ? (exponent = +_, rescale()) : exponent;
27949 };
27950
27951 return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale);
27952}
27953
27954function pow() {
27955 var scale = powish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])());
27956
27957 scale.copy = function() {
27958 return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, pow()).exponent(scale.exponent());
27959 };
27960
27961 _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
27962
27963 return scale;
27964}
27965
27966function sqrt() {
27967 return pow.apply(null, arguments).exponent(0.5);
27968}
27969
27970
27971/***/ }),
27972
27973/***/ "./node_modules/d3-scale/src/quantile.js":
27974/*!***********************************************!*\
27975 !*** ./node_modules/d3-scale/src/quantile.js ***!
27976 \***********************************************/
27977/*! exports provided: default */
27978/***/ (function(module, __webpack_exports__, __webpack_require__) {
27979
27980"use strict";
27981__webpack_require__.r(__webpack_exports__);
27982/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; });
27983/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
27984/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
27985/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
27986
27987
27988
27989
27990function quantile() {
27991 var domain = [],
27992 range = [],
27993 thresholds = [],
27994 unknown;
27995
27996 function rescale() {
27997 var i = 0, n = Math.max(1, range.length);
27998 thresholds = new Array(n - 1);
27999 while (++i < n) thresholds[i - 1] = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["quantile"])(domain, i / n);
28000 return scale;
28001 }
28002
28003 function scale(x) {
28004 return isNaN(x = +x) ? unknown : range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(thresholds, x)];
28005 }
28006
28007 scale.invertExtent = function(y) {
28008 var i = range.indexOf(y);
28009 return i < 0 ? [NaN, NaN] : [
28010 i > 0 ? thresholds[i - 1] : domain[0],
28011 i < thresholds.length ? thresholds[i] : domain[domain.length - 1]
28012 ];
28013 };
28014
28015 scale.domain = function(_) {
28016 if (!arguments.length) return domain.slice();
28017 domain = [];
28018 for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
28019 domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]);
28020 return rescale();
28021 };
28022
28023 scale.range = function(_) {
28024 return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), rescale()) : range.slice();
28025 };
28026
28027 scale.unknown = function(_) {
28028 return arguments.length ? (unknown = _, scale) : unknown;
28029 };
28030
28031 scale.quantiles = function() {
28032 return thresholds.slice();
28033 };
28034
28035 scale.copy = function() {
28036 return quantile()
28037 .domain(domain)
28038 .range(range)
28039 .unknown(unknown);
28040 };
28041
28042 return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
28043}
28044
28045
28046/***/ }),
28047
28048/***/ "./node_modules/d3-scale/src/quantize.js":
28049/*!***********************************************!*\
28050 !*** ./node_modules/d3-scale/src/quantize.js ***!
28051 \***********************************************/
28052/*! exports provided: default */
28053/***/ (function(module, __webpack_exports__, __webpack_require__) {
28054
28055"use strict";
28056__webpack_require__.r(__webpack_exports__);
28057/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantize; });
28058/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
28059/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
28060/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
28061/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28062
28063
28064
28065
28066
28067function quantize() {
28068 var x0 = 0,
28069 x1 = 1,
28070 n = 1,
28071 domain = [0.5],
28072 range = [0, 1],
28073 unknown;
28074
28075 function scale(x) {
28076 return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown;
28077 }
28078
28079 function rescale() {
28080 var i = -1;
28081 domain = new Array(n);
28082 while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1);
28083 return scale;
28084 }
28085
28086 scale.domain = function(_) {
28087 return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1];
28088 };
28089
28090 scale.range = function(_) {
28091 return arguments.length ? (n = (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_)).length - 1, rescale()) : range.slice();
28092 };
28093
28094 scale.invertExtent = function(y) {
28095 var i = range.indexOf(y);
28096 return i < 0 ? [NaN, NaN]
28097 : i < 1 ? [x0, domain[0]]
28098 : i >= n ? [domain[n - 1], x1]
28099 : [domain[i - 1], domain[i]];
28100 };
28101
28102 scale.unknown = function(_) {
28103 return arguments.length ? (unknown = _, scale) : scale;
28104 };
28105
28106 scale.thresholds = function() {
28107 return domain.slice();
28108 };
28109
28110 scale.copy = function() {
28111 return quantize()
28112 .domain([x0, x1])
28113 .range(range)
28114 .unknown(unknown);
28115 };
28116
28117 return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(scale), arguments);
28118}
28119
28120
28121/***/ }),
28122
28123/***/ "./node_modules/d3-scale/src/sequential.js":
28124/*!*************************************************!*\
28125 !*** ./node_modules/d3-scale/src/sequential.js ***!
28126 \*************************************************/
28127/*! exports provided: copy, default, sequentialLog, sequentialSymlog, sequentialPow, sequentialSqrt */
28128/***/ (function(module, __webpack_exports__, __webpack_require__) {
28129
28130"use strict";
28131__webpack_require__.r(__webpack_exports__);
28132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copy", function() { return copy; });
28133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequential; });
28134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialLog", function() { return sequentialLog; });
28135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSymlog", function() { return sequentialSymlog; });
28136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialPow", function() { return sequentialPow; });
28137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialSqrt", function() { return sequentialSqrt; });
28138/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
28139/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28140/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
28141/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./log */ "./node_modules/d3-scale/src/log.js");
28142/* harmony import */ var _symlog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symlog */ "./node_modules/d3-scale/src/symlog.js");
28143/* harmony import */ var _pow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pow */ "./node_modules/d3-scale/src/pow.js");
28144
28145
28146
28147
28148
28149
28150
28151function transformer() {
28152 var x0 = 0,
28153 x1 = 1,
28154 t0,
28155 t1,
28156 k10,
28157 transform,
28158 interpolator = _continuous__WEBPACK_IMPORTED_MODULE_0__["identity"],
28159 clamp = false,
28160 unknown;
28161
28162 function scale(x) {
28163 return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));
28164 }
28165
28166 scale.domain = function(_) {
28167 return arguments.length ? (t0 = transform(x0 = +_[0]), t1 = transform(x1 = +_[1]), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];
28168 };
28169
28170 scale.clamp = function(_) {
28171 return arguments.length ? (clamp = !!_, scale) : clamp;
28172 };
28173
28174 scale.interpolator = function(_) {
28175 return arguments.length ? (interpolator = _, scale) : interpolator;
28176 };
28177
28178 scale.unknown = function(_) {
28179 return arguments.length ? (unknown = _, scale) : unknown;
28180 };
28181
28182 return function(t) {
28183 transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);
28184 return scale;
28185 };
28186}
28187
28188function copy(source, target) {
28189 return target
28190 .domain(source.domain())
28191 .interpolator(source.interpolator())
28192 .clamp(source.clamp())
28193 .unknown(source.unknown());
28194}
28195
28196function sequential() {
28197 var scale = Object(_linear__WEBPACK_IMPORTED_MODULE_2__["linearish"])(transformer()(_continuous__WEBPACK_IMPORTED_MODULE_0__["identity"]));
28198
28199 scale.copy = function() {
28200 return copy(scale, sequential());
28201 };
28202
28203 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
28204}
28205
28206function sequentialLog() {
28207 var scale = Object(_log__WEBPACK_IMPORTED_MODULE_3__["loggish"])(transformer()).domain([1, 10]);
28208
28209 scale.copy = function() {
28210 return copy(scale, sequentialLog()).base(scale.base());
28211 };
28212
28213 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
28214}
28215
28216function sequentialSymlog() {
28217 var scale = Object(_symlog__WEBPACK_IMPORTED_MODULE_4__["symlogish"])(transformer());
28218
28219 scale.copy = function() {
28220 return copy(scale, sequentialSymlog()).constant(scale.constant());
28221 };
28222
28223 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
28224}
28225
28226function sequentialPow() {
28227 var scale = Object(_pow__WEBPACK_IMPORTED_MODULE_5__["powish"])(transformer());
28228
28229 scale.copy = function() {
28230 return copy(scale, sequentialPow()).exponent(scale.exponent());
28231 };
28232
28233 return _init__WEBPACK_IMPORTED_MODULE_1__["initInterpolator"].apply(scale, arguments);
28234}
28235
28236function sequentialSqrt() {
28237 return sequentialPow.apply(null, arguments).exponent(0.5);
28238}
28239
28240
28241/***/ }),
28242
28243/***/ "./node_modules/d3-scale/src/sequentialQuantile.js":
28244/*!*********************************************************!*\
28245 !*** ./node_modules/d3-scale/src/sequentialQuantile.js ***!
28246 \*********************************************************/
28247/*! exports provided: default */
28248/***/ (function(module, __webpack_exports__, __webpack_require__) {
28249
28250"use strict";
28251__webpack_require__.r(__webpack_exports__);
28252/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sequentialQuantile; });
28253/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
28254/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
28255/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28256
28257
28258
28259
28260function sequentialQuantile() {
28261 var domain = [],
28262 interpolator = _continuous__WEBPACK_IMPORTED_MODULE_1__["identity"];
28263
28264 function scale(x) {
28265 if (!isNaN(x = +x)) return interpolator((Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x) - 1) / (domain.length - 1));
28266 }
28267
28268 scale.domain = function(_) {
28269 if (!arguments.length) return domain.slice();
28270 domain = [];
28271 for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d);
28272 domain.sort(d3_array__WEBPACK_IMPORTED_MODULE_0__["ascending"]);
28273 return scale;
28274 };
28275
28276 scale.interpolator = function(_) {
28277 return arguments.length ? (interpolator = _, scale) : interpolator;
28278 };
28279
28280 scale.copy = function() {
28281 return sequentialQuantile(interpolator).domain(domain);
28282 };
28283
28284 return _init__WEBPACK_IMPORTED_MODULE_2__["initInterpolator"].apply(scale, arguments);
28285}
28286
28287
28288/***/ }),
28289
28290/***/ "./node_modules/d3-scale/src/symlog.js":
28291/*!*********************************************!*\
28292 !*** ./node_modules/d3-scale/src/symlog.js ***!
28293 \*********************************************/
28294/*! exports provided: symlogish, default */
28295/***/ (function(module, __webpack_exports__, __webpack_require__) {
28296
28297"use strict";
28298__webpack_require__.r(__webpack_exports__);
28299/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symlogish", function() { return symlogish; });
28300/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symlog; });
28301/* harmony import */ var _linear__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear */ "./node_modules/d3-scale/src/linear.js");
28302/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
28303/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28304
28305
28306
28307
28308function transformSymlog(c) {
28309 return function(x) {
28310 return Math.sign(x) * Math.log1p(Math.abs(x / c));
28311 };
28312}
28313
28314function transformSymexp(c) {
28315 return function(x) {
28316 return Math.sign(x) * Math.expm1(Math.abs(x)) * c;
28317 };
28318}
28319
28320function symlogish(transform) {
28321 var c = 1, scale = transform(transformSymlog(c), transformSymexp(c));
28322
28323 scale.constant = function(_) {
28324 return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c;
28325 };
28326
28327 return Object(_linear__WEBPACK_IMPORTED_MODULE_0__["linearish"])(scale);
28328}
28329
28330function symlog() {
28331 var scale = symlogish(Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["transformer"])());
28332
28333 scale.copy = function() {
28334 return Object(_continuous__WEBPACK_IMPORTED_MODULE_1__["copy"])(scale, symlog()).constant(scale.constant());
28335 };
28336
28337 return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
28338}
28339
28340
28341/***/ }),
28342
28343/***/ "./node_modules/d3-scale/src/threshold.js":
28344/*!************************************************!*\
28345 !*** ./node_modules/d3-scale/src/threshold.js ***!
28346 \************************************************/
28347/*! exports provided: default */
28348/***/ (function(module, __webpack_exports__, __webpack_require__) {
28349
28350"use strict";
28351__webpack_require__.r(__webpack_exports__);
28352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return threshold; });
28353/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
28354/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
28355/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28356
28357
28358
28359
28360function threshold() {
28361 var domain = [0.5],
28362 range = [0, 1],
28363 unknown,
28364 n = 1;
28365
28366 function scale(x) {
28367 return x <= x ? range[Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisect"])(domain, x, 0, n)] : unknown;
28368 }
28369
28370 scale.domain = function(_) {
28371 return arguments.length ? (domain = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice();
28372 };
28373
28374 scale.range = function(_) {
28375 return arguments.length ? (range = _array__WEBPACK_IMPORTED_MODULE_1__["slice"].call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice();
28376 };
28377
28378 scale.invertExtent = function(y) {
28379 var i = range.indexOf(y);
28380 return [domain[i - 1], domain[i]];
28381 };
28382
28383 scale.unknown = function(_) {
28384 return arguments.length ? (unknown = _, scale) : unknown;
28385 };
28386
28387 scale.copy = function() {
28388 return threshold()
28389 .domain(domain)
28390 .range(range)
28391 .unknown(unknown);
28392 };
28393
28394 return _init__WEBPACK_IMPORTED_MODULE_2__["initRange"].apply(scale, arguments);
28395}
28396
28397
28398/***/ }),
28399
28400/***/ "./node_modules/d3-scale/src/tickFormat.js":
28401/*!*************************************************!*\
28402 !*** ./node_modules/d3-scale/src/tickFormat.js ***!
28403 \*************************************************/
28404/*! exports provided: default */
28405/***/ (function(module, __webpack_exports__, __webpack_require__) {
28406
28407"use strict";
28408__webpack_require__.r(__webpack_exports__);
28409/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
28410/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js");
28411
28412
28413
28414/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count, specifier) {
28415 var step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, count),
28416 precision;
28417 specifier = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatSpecifier"])(specifier == null ? ",f" : specifier);
28418 switch (specifier.type) {
28419 case "s": {
28420 var value = Math.max(Math.abs(start), Math.abs(stop));
28421 if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionPrefix"])(step, value))) specifier.precision = precision;
28422 return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["formatPrefix"])(specifier, value);
28423 }
28424 case "":
28425 case "e":
28426 case "g":
28427 case "p":
28428 case "r": {
28429 if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionRound"])(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
28430 break;
28431 }
28432 case "f":
28433 case "%": {
28434 if (specifier.precision == null && !isNaN(precision = Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["precisionFixed"])(step))) specifier.precision = precision - (specifier.type === "%") * 2;
28435 break;
28436 }
28437 }
28438 return Object(d3_format__WEBPACK_IMPORTED_MODULE_1__["format"])(specifier);
28439});
28440
28441
28442/***/ }),
28443
28444/***/ "./node_modules/d3-scale/src/time.js":
28445/*!*******************************************!*\
28446 !*** ./node_modules/d3-scale/src/time.js ***!
28447 \*******************************************/
28448/*! exports provided: calendar, default */
28449/***/ (function(module, __webpack_exports__, __webpack_require__) {
28450
28451"use strict";
28452__webpack_require__.r(__webpack_exports__);
28453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calendar", function() { return calendar; });
28454/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
28455/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js");
28456/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js");
28457/* harmony import */ var _array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./array */ "./node_modules/d3-scale/src/array.js");
28458/* harmony import */ var _continuous__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./continuous */ "./node_modules/d3-scale/src/continuous.js");
28459/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28460/* harmony import */ var _nice__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nice */ "./node_modules/d3-scale/src/nice.js");
28461
28462
28463
28464
28465
28466
28467
28468
28469var durationSecond = 1000,
28470 durationMinute = durationSecond * 60,
28471 durationHour = durationMinute * 60,
28472 durationDay = durationHour * 24,
28473 durationWeek = durationDay * 7,
28474 durationMonth = durationDay * 30,
28475 durationYear = durationDay * 365;
28476
28477function date(t) {
28478 return new Date(t);
28479}
28480
28481function number(t) {
28482 return t instanceof Date ? +t : +new Date(+t);
28483}
28484
28485function calendar(year, month, week, day, hour, minute, second, millisecond, format) {
28486 var scale = Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["default"])(_continuous__WEBPACK_IMPORTED_MODULE_4__["identity"], _continuous__WEBPACK_IMPORTED_MODULE_4__["identity"]),
28487 invert = scale.invert,
28488 domain = scale.domain;
28489
28490 var formatMillisecond = format(".%L"),
28491 formatSecond = format(":%S"),
28492 formatMinute = format("%I:%M"),
28493 formatHour = format("%I %p"),
28494 formatDay = format("%a %d"),
28495 formatWeek = format("%b %d"),
28496 formatMonth = format("%B"),
28497 formatYear = format("%Y");
28498
28499 var tickIntervals = [
28500 [second, 1, durationSecond],
28501 [second, 5, 5 * durationSecond],
28502 [second, 15, 15 * durationSecond],
28503 [second, 30, 30 * durationSecond],
28504 [minute, 1, durationMinute],
28505 [minute, 5, 5 * durationMinute],
28506 [minute, 15, 15 * durationMinute],
28507 [minute, 30, 30 * durationMinute],
28508 [ hour, 1, durationHour ],
28509 [ hour, 3, 3 * durationHour ],
28510 [ hour, 6, 6 * durationHour ],
28511 [ hour, 12, 12 * durationHour ],
28512 [ day, 1, durationDay ],
28513 [ day, 2, 2 * durationDay ],
28514 [ week, 1, durationWeek ],
28515 [ month, 1, durationMonth ],
28516 [ month, 3, 3 * durationMonth ],
28517 [ year, 1, durationYear ]
28518 ];
28519
28520 function tickFormat(date) {
28521 return (second(date) < date ? formatMillisecond
28522 : minute(date) < date ? formatSecond
28523 : hour(date) < date ? formatMinute
28524 : day(date) < date ? formatHour
28525 : month(date) < date ? (week(date) < date ? formatDay : formatWeek)
28526 : year(date) < date ? formatMonth
28527 : formatYear)(date);
28528 }
28529
28530 function tickInterval(interval, start, stop, step) {
28531 if (interval == null) interval = 10;
28532
28533 // If a desired tick count is specified, pick a reasonable tick interval
28534 // based on the extent of the domain and a rough estimate of tick size.
28535 // Otherwise, assume interval is already a time interval and use it.
28536 if (typeof interval === "number") {
28537 var target = Math.abs(stop - start) / interval,
28538 i = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target);
28539 if (i === tickIntervals.length) {
28540 step = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start / durationYear, stop / durationYear, interval);
28541 interval = year;
28542 } else if (i) {
28543 i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
28544 step = i[1];
28545 interval = i[0];
28546 } else {
28547 step = Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["tickStep"])(start, stop, interval), 1);
28548 interval = millisecond;
28549 }
28550 }
28551
28552 return step == null ? interval : interval.every(step);
28553 }
28554
28555 scale.invert = function(y) {
28556 return new Date(invert(y));
28557 };
28558
28559 scale.domain = function(_) {
28560 return arguments.length ? domain(_array__WEBPACK_IMPORTED_MODULE_3__["map"].call(_, number)) : domain().map(date);
28561 };
28562
28563 scale.ticks = function(interval, step) {
28564 var d = domain(),
28565 t0 = d[0],
28566 t1 = d[d.length - 1],
28567 r = t1 < t0,
28568 t;
28569 if (r) t = t0, t0 = t1, t1 = t;
28570 t = tickInterval(interval, t0, t1, step);
28571 t = t ? t.range(t0, t1 + 1) : []; // inclusive stop
28572 return r ? t.reverse() : t;
28573 };
28574
28575 scale.tickFormat = function(count, specifier) {
28576 return specifier == null ? tickFormat : format(specifier);
28577 };
28578
28579 scale.nice = function(interval, step) {
28580 var d = domain();
28581 return (interval = tickInterval(interval, d[0], d[d.length - 1], step))
28582 ? domain(Object(_nice__WEBPACK_IMPORTED_MODULE_6__["default"])(d, interval))
28583 : scale;
28584 };
28585
28586 scale.copy = function() {
28587 return Object(_continuous__WEBPACK_IMPORTED_MODULE_4__["copy"])(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format));
28588 };
28589
28590 return scale;
28591}
28592
28593/* harmony default export */ __webpack_exports__["default"] = (function() {
28594 return _init__WEBPACK_IMPORTED_MODULE_5__["initRange"].apply(calendar(d3_time__WEBPACK_IMPORTED_MODULE_1__["timeYear"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMonth"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeWeek"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeDay"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeHour"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMinute"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeSecond"], d3_time__WEBPACK_IMPORTED_MODULE_1__["timeMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_2__["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);
28595});
28596
28597
28598/***/ }),
28599
28600/***/ "./node_modules/d3-scale/src/utcTime.js":
28601/*!**********************************************!*\
28602 !*** ./node_modules/d3-scale/src/utcTime.js ***!
28603 \**********************************************/
28604/*! exports provided: default */
28605/***/ (function(module, __webpack_exports__, __webpack_require__) {
28606
28607"use strict";
28608__webpack_require__.r(__webpack_exports__);
28609/* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./time */ "./node_modules/d3-scale/src/time.js");
28610/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js");
28611/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js");
28612/* harmony import */ var _init__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./init */ "./node_modules/d3-scale/src/init.js");
28613
28614
28615
28616
28617
28618/* harmony default export */ __webpack_exports__["default"] = (function() {
28619 return _init__WEBPACK_IMPORTED_MODULE_3__["initRange"].apply(Object(_time__WEBPACK_IMPORTED_MODULE_0__["calendar"])(d3_time__WEBPACK_IMPORTED_MODULE_2__["utcYear"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMonth"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcWeek"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcDay"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcHour"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMinute"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcSecond"], d3_time__WEBPACK_IMPORTED_MODULE_2__["utcMillisecond"], d3_time_format__WEBPACK_IMPORTED_MODULE_1__["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);
28620});
28621
28622
28623/***/ }),
28624
28625/***/ "./node_modules/d3-selection/src/constant.js":
28626/*!***************************************************!*\
28627 !*** ./node_modules/d3-selection/src/constant.js ***!
28628 \***************************************************/
28629/*! exports provided: default */
28630/***/ (function(module, __webpack_exports__, __webpack_require__) {
28631
28632"use strict";
28633__webpack_require__.r(__webpack_exports__);
28634/* harmony default export */ __webpack_exports__["default"] = (function(x) {
28635 return function() {
28636 return x;
28637 };
28638});
28639
28640
28641/***/ }),
28642
28643/***/ "./node_modules/d3-selection/src/create.js":
28644/*!*************************************************!*\
28645 !*** ./node_modules/d3-selection/src/create.js ***!
28646 \*************************************************/
28647/*! exports provided: default */
28648/***/ (function(module, __webpack_exports__, __webpack_require__) {
28649
28650"use strict";
28651__webpack_require__.r(__webpack_exports__);
28652/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js");
28653/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js");
28654
28655
28656
28657/* harmony default export */ __webpack_exports__["default"] = (function(name) {
28658 return Object(_select__WEBPACK_IMPORTED_MODULE_1__["default"])(Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name).call(document.documentElement));
28659});
28660
28661
28662/***/ }),
28663
28664/***/ "./node_modules/d3-selection/src/creator.js":
28665/*!**************************************************!*\
28666 !*** ./node_modules/d3-selection/src/creator.js ***!
28667 \**************************************************/
28668/*! exports provided: default */
28669/***/ (function(module, __webpack_exports__, __webpack_require__) {
28670
28671"use strict";
28672__webpack_require__.r(__webpack_exports__);
28673/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js");
28674/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js");
28675
28676
28677
28678function creatorInherit(name) {
28679 return function() {
28680 var document = this.ownerDocument,
28681 uri = this.namespaceURI;
28682 return uri === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"] && document.documentElement.namespaceURI === _namespaces__WEBPACK_IMPORTED_MODULE_1__["xhtml"]
28683 ? document.createElement(name)
28684 : document.createElementNS(uri, name);
28685 };
28686}
28687
28688function creatorFixed(fullname) {
28689 return function() {
28690 return this.ownerDocument.createElementNS(fullname.space, fullname.local);
28691 };
28692}
28693
28694/* harmony default export */ __webpack_exports__["default"] = (function(name) {
28695 var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name);
28696 return (fullname.local
28697 ? creatorFixed
28698 : creatorInherit)(fullname);
28699});
28700
28701
28702/***/ }),
28703
28704/***/ "./node_modules/d3-selection/src/index.js":
28705/*!************************************************!*\
28706 !*** ./node_modules/d3-selection/src/index.js ***!
28707 \************************************************/
28708/*! exports provided: create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent */
28709/***/ (function(module, __webpack_exports__, __webpack_require__) {
28710
28711"use strict";
28712__webpack_require__.r(__webpack_exports__);
28713/* harmony import */ var _create__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./create */ "./node_modules/d3-selection/src/create.js");
28714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return _create__WEBPACK_IMPORTED_MODULE_0__["default"]; });
28715
28716/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./creator */ "./node_modules/d3-selection/src/creator.js");
28717/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return _creator__WEBPACK_IMPORTED_MODULE_1__["default"]; });
28718
28719/* harmony import */ var _local__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./local */ "./node_modules/d3-selection/src/local.js");
28720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return _local__WEBPACK_IMPORTED_MODULE_2__["default"]; });
28721
28722/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./matcher */ "./node_modules/d3-selection/src/matcher.js");
28723/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return _matcher__WEBPACK_IMPORTED_MODULE_3__["default"]; });
28724
28725/* harmony import */ var _mouse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mouse */ "./node_modules/d3-selection/src/mouse.js");
28726/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return _mouse__WEBPACK_IMPORTED_MODULE_4__["default"]; });
28727
28728/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./namespace */ "./node_modules/d3-selection/src/namespace.js");
28729/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return _namespace__WEBPACK_IMPORTED_MODULE_5__["default"]; });
28730
28731/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js");
28732/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return _namespaces__WEBPACK_IMPORTED_MODULE_6__["default"]; });
28733
28734/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js");
28735/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return _point__WEBPACK_IMPORTED_MODULE_7__["default"]; });
28736
28737/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/select.js");
28738/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return _select__WEBPACK_IMPORTED_MODULE_8__["default"]; });
28739
28740/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selectAll.js");
28741/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return _selectAll__WEBPACK_IMPORTED_MODULE_9__["default"]; });
28742
28743/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js");
28744/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return _selection_index__WEBPACK_IMPORTED_MODULE_10__["default"]; });
28745
28746/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selector */ "./node_modules/d3-selection/src/selector.js");
28747/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _selector__WEBPACK_IMPORTED_MODULE_11__["default"]; });
28748
28749/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selectorAll */ "./node_modules/d3-selection/src/selectorAll.js");
28750/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return _selectorAll__WEBPACK_IMPORTED_MODULE_12__["default"]; });
28751
28752/* harmony import */ var _selection_style__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./selection/style */ "./node_modules/d3-selection/src/selection/style.js");
28753/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return _selection_style__WEBPACK_IMPORTED_MODULE_13__["styleValue"]; });
28754
28755/* harmony import */ var _touch__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./touch */ "./node_modules/d3-selection/src/touch.js");
28756/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return _touch__WEBPACK_IMPORTED_MODULE_14__["default"]; });
28757
28758/* harmony import */ var _touches__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./touches */ "./node_modules/d3-selection/src/touches.js");
28759/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return _touches__WEBPACK_IMPORTED_MODULE_15__["default"]; });
28760
28761/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./window */ "./node_modules/d3-selection/src/window.js");
28762/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return _window__WEBPACK_IMPORTED_MODULE_16__["default"]; });
28763
28764/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js");
28765/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["event"]; });
28766
28767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return _selection_on__WEBPACK_IMPORTED_MODULE_17__["customEvent"]; });
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789/***/ }),
28790
28791/***/ "./node_modules/d3-selection/src/local.js":
28792/*!************************************************!*\
28793 !*** ./node_modules/d3-selection/src/local.js ***!
28794 \************************************************/
28795/*! exports provided: default */
28796/***/ (function(module, __webpack_exports__, __webpack_require__) {
28797
28798"use strict";
28799__webpack_require__.r(__webpack_exports__);
28800/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return local; });
28801var nextId = 0;
28802
28803function local() {
28804 return new Local;
28805}
28806
28807function Local() {
28808 this._ = "@" + (++nextId).toString(36);
28809}
28810
28811Local.prototype = local.prototype = {
28812 constructor: Local,
28813 get: function(node) {
28814 var id = this._;
28815 while (!(id in node)) if (!(node = node.parentNode)) return;
28816 return node[id];
28817 },
28818 set: function(node, value) {
28819 return node[this._] = value;
28820 },
28821 remove: function(node) {
28822 return this._ in node && delete node[this._];
28823 },
28824 toString: function() {
28825 return this._;
28826 }
28827};
28828
28829
28830/***/ }),
28831
28832/***/ "./node_modules/d3-selection/src/matcher.js":
28833/*!**************************************************!*\
28834 !*** ./node_modules/d3-selection/src/matcher.js ***!
28835 \**************************************************/
28836/*! exports provided: default */
28837/***/ (function(module, __webpack_exports__, __webpack_require__) {
28838
28839"use strict";
28840__webpack_require__.r(__webpack_exports__);
28841/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
28842 return function() {
28843 return this.matches(selector);
28844 };
28845});
28846
28847
28848/***/ }),
28849
28850/***/ "./node_modules/d3-selection/src/mouse.js":
28851/*!************************************************!*\
28852 !*** ./node_modules/d3-selection/src/mouse.js ***!
28853 \************************************************/
28854/*! exports provided: default */
28855/***/ (function(module, __webpack_exports__, __webpack_require__) {
28856
28857"use strict";
28858__webpack_require__.r(__webpack_exports__);
28859/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js");
28860/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js");
28861
28862
28863
28864/* harmony default export */ __webpack_exports__["default"] = (function(node) {
28865 var event = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])();
28866 if (event.changedTouches) event = event.changedTouches[0];
28867 return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, event);
28868});
28869
28870
28871/***/ }),
28872
28873/***/ "./node_modules/d3-selection/src/namespace.js":
28874/*!****************************************************!*\
28875 !*** ./node_modules/d3-selection/src/namespace.js ***!
28876 \****************************************************/
28877/*! exports provided: default */
28878/***/ (function(module, __webpack_exports__, __webpack_require__) {
28879
28880"use strict";
28881__webpack_require__.r(__webpack_exports__);
28882/* harmony import */ var _namespaces__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./namespaces */ "./node_modules/d3-selection/src/namespaces.js");
28883
28884
28885/* harmony default export */ __webpack_exports__["default"] = (function(name) {
28886 var prefix = name += "", i = prefix.indexOf(":");
28887 if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
28888 return _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"].hasOwnProperty(prefix) ? {space: _namespaces__WEBPACK_IMPORTED_MODULE_0__["default"][prefix], local: name} : name;
28889});
28890
28891
28892/***/ }),
28893
28894/***/ "./node_modules/d3-selection/src/namespaces.js":
28895/*!*****************************************************!*\
28896 !*** ./node_modules/d3-selection/src/namespaces.js ***!
28897 \*****************************************************/
28898/*! exports provided: xhtml, default */
28899/***/ (function(module, __webpack_exports__, __webpack_require__) {
28900
28901"use strict";
28902__webpack_require__.r(__webpack_exports__);
28903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "xhtml", function() { return xhtml; });
28904var xhtml = "http://www.w3.org/1999/xhtml";
28905
28906/* harmony default export */ __webpack_exports__["default"] = ({
28907 svg: "http://www.w3.org/2000/svg",
28908 xhtml: xhtml,
28909 xlink: "http://www.w3.org/1999/xlink",
28910 xml: "http://www.w3.org/XML/1998/namespace",
28911 xmlns: "http://www.w3.org/2000/xmlns/"
28912});
28913
28914
28915/***/ }),
28916
28917/***/ "./node_modules/d3-selection/src/point.js":
28918/*!************************************************!*\
28919 !*** ./node_modules/d3-selection/src/point.js ***!
28920 \************************************************/
28921/*! exports provided: default */
28922/***/ (function(module, __webpack_exports__, __webpack_require__) {
28923
28924"use strict";
28925__webpack_require__.r(__webpack_exports__);
28926/* harmony default export */ __webpack_exports__["default"] = (function(node, event) {
28927 var svg = node.ownerSVGElement || node;
28928
28929 if (svg.createSVGPoint) {
28930 var point = svg.createSVGPoint();
28931 point.x = event.clientX, point.y = event.clientY;
28932 point = point.matrixTransform(node.getScreenCTM().inverse());
28933 return [point.x, point.y];
28934 }
28935
28936 var rect = node.getBoundingClientRect();
28937 return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];
28938});
28939
28940
28941/***/ }),
28942
28943/***/ "./node_modules/d3-selection/src/select.js":
28944/*!*************************************************!*\
28945 !*** ./node_modules/d3-selection/src/select.js ***!
28946 \*************************************************/
28947/*! exports provided: default */
28948/***/ (function(module, __webpack_exports__, __webpack_require__) {
28949
28950"use strict";
28951__webpack_require__.r(__webpack_exports__);
28952/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js");
28953
28954
28955/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
28956 return typeof selector === "string"
28957 ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[document.querySelector(selector)]], [document.documentElement])
28958 : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([[selector]], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]);
28959});
28960
28961
28962/***/ }),
28963
28964/***/ "./node_modules/d3-selection/src/selectAll.js":
28965/*!****************************************************!*\
28966 !*** ./node_modules/d3-selection/src/selectAll.js ***!
28967 \****************************************************/
28968/*! exports provided: default */
28969/***/ (function(module, __webpack_exports__, __webpack_require__) {
28970
28971"use strict";
28972__webpack_require__.r(__webpack_exports__);
28973/* harmony import */ var _selection_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index */ "./node_modules/d3-selection/src/selection/index.js");
28974
28975
28976/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
28977 return typeof selector === "string"
28978 ? new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([document.querySelectorAll(selector)], [document.documentElement])
28979 : new _selection_index__WEBPACK_IMPORTED_MODULE_0__["Selection"]([selector == null ? [] : selector], _selection_index__WEBPACK_IMPORTED_MODULE_0__["root"]);
28980});
28981
28982
28983/***/ }),
28984
28985/***/ "./node_modules/d3-selection/src/selection/append.js":
28986/*!***********************************************************!*\
28987 !*** ./node_modules/d3-selection/src/selection/append.js ***!
28988 \***********************************************************/
28989/*! exports provided: default */
28990/***/ (function(module, __webpack_exports__, __webpack_require__) {
28991
28992"use strict";
28993__webpack_require__.r(__webpack_exports__);
28994/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js");
28995
28996
28997/* harmony default export */ __webpack_exports__["default"] = (function(name) {
28998 var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name);
28999 return this.select(function() {
29000 return this.appendChild(create.apply(this, arguments));
29001 });
29002});
29003
29004
29005/***/ }),
29006
29007/***/ "./node_modules/d3-selection/src/selection/attr.js":
29008/*!*********************************************************!*\
29009 !*** ./node_modules/d3-selection/src/selection/attr.js ***!
29010 \*********************************************************/
29011/*! exports provided: default */
29012/***/ (function(module, __webpack_exports__, __webpack_require__) {
29013
29014"use strict";
29015__webpack_require__.r(__webpack_exports__);
29016/* harmony import */ var _namespace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../namespace */ "./node_modules/d3-selection/src/namespace.js");
29017
29018
29019function attrRemove(name) {
29020 return function() {
29021 this.removeAttribute(name);
29022 };
29023}
29024
29025function attrRemoveNS(fullname) {
29026 return function() {
29027 this.removeAttributeNS(fullname.space, fullname.local);
29028 };
29029}
29030
29031function attrConstant(name, value) {
29032 return function() {
29033 this.setAttribute(name, value);
29034 };
29035}
29036
29037function attrConstantNS(fullname, value) {
29038 return function() {
29039 this.setAttributeNS(fullname.space, fullname.local, value);
29040 };
29041}
29042
29043function attrFunction(name, value) {
29044 return function() {
29045 var v = value.apply(this, arguments);
29046 if (v == null) this.removeAttribute(name);
29047 else this.setAttribute(name, v);
29048 };
29049}
29050
29051function attrFunctionNS(fullname, value) {
29052 return function() {
29053 var v = value.apply(this, arguments);
29054 if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
29055 else this.setAttributeNS(fullname.space, fullname.local, v);
29056 };
29057}
29058
29059/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
29060 var fullname = Object(_namespace__WEBPACK_IMPORTED_MODULE_0__["default"])(name);
29061
29062 if (arguments.length < 2) {
29063 var node = this.node();
29064 return fullname.local
29065 ? node.getAttributeNS(fullname.space, fullname.local)
29066 : node.getAttribute(fullname);
29067 }
29068
29069 return this.each((value == null
29070 ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function"
29071 ? (fullname.local ? attrFunctionNS : attrFunction)
29072 : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));
29073});
29074
29075
29076/***/ }),
29077
29078/***/ "./node_modules/d3-selection/src/selection/call.js":
29079/*!*********************************************************!*\
29080 !*** ./node_modules/d3-selection/src/selection/call.js ***!
29081 \*********************************************************/
29082/*! exports provided: default */
29083/***/ (function(module, __webpack_exports__, __webpack_require__) {
29084
29085"use strict";
29086__webpack_require__.r(__webpack_exports__);
29087/* harmony default export */ __webpack_exports__["default"] = (function() {
29088 var callback = arguments[0];
29089 arguments[0] = this;
29090 callback.apply(null, arguments);
29091 return this;
29092});
29093
29094
29095/***/ }),
29096
29097/***/ "./node_modules/d3-selection/src/selection/classed.js":
29098/*!************************************************************!*\
29099 !*** ./node_modules/d3-selection/src/selection/classed.js ***!
29100 \************************************************************/
29101/*! exports provided: default */
29102/***/ (function(module, __webpack_exports__, __webpack_require__) {
29103
29104"use strict";
29105__webpack_require__.r(__webpack_exports__);
29106function classArray(string) {
29107 return string.trim().split(/^|\s+/);
29108}
29109
29110function classList(node) {
29111 return node.classList || new ClassList(node);
29112}
29113
29114function ClassList(node) {
29115 this._node = node;
29116 this._names = classArray(node.getAttribute("class") || "");
29117}
29118
29119ClassList.prototype = {
29120 add: function(name) {
29121 var i = this._names.indexOf(name);
29122 if (i < 0) {
29123 this._names.push(name);
29124 this._node.setAttribute("class", this._names.join(" "));
29125 }
29126 },
29127 remove: function(name) {
29128 var i = this._names.indexOf(name);
29129 if (i >= 0) {
29130 this._names.splice(i, 1);
29131 this._node.setAttribute("class", this._names.join(" "));
29132 }
29133 },
29134 contains: function(name) {
29135 return this._names.indexOf(name) >= 0;
29136 }
29137};
29138
29139function classedAdd(node, names) {
29140 var list = classList(node), i = -1, n = names.length;
29141 while (++i < n) list.add(names[i]);
29142}
29143
29144function classedRemove(node, names) {
29145 var list = classList(node), i = -1, n = names.length;
29146 while (++i < n) list.remove(names[i]);
29147}
29148
29149function classedTrue(names) {
29150 return function() {
29151 classedAdd(this, names);
29152 };
29153}
29154
29155function classedFalse(names) {
29156 return function() {
29157 classedRemove(this, names);
29158 };
29159}
29160
29161function classedFunction(names, value) {
29162 return function() {
29163 (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);
29164 };
29165}
29166
29167/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
29168 var names = classArray(name + "");
29169
29170 if (arguments.length < 2) {
29171 var list = classList(this.node()), i = -1, n = names.length;
29172 while (++i < n) if (!list.contains(names[i])) return false;
29173 return true;
29174 }
29175
29176 return this.each((typeof value === "function"
29177 ? classedFunction : value
29178 ? classedTrue
29179 : classedFalse)(names, value));
29180});
29181
29182
29183/***/ }),
29184
29185/***/ "./node_modules/d3-selection/src/selection/clone.js":
29186/*!**********************************************************!*\
29187 !*** ./node_modules/d3-selection/src/selection/clone.js ***!
29188 \**********************************************************/
29189/*! exports provided: default */
29190/***/ (function(module, __webpack_exports__, __webpack_require__) {
29191
29192"use strict";
29193__webpack_require__.r(__webpack_exports__);
29194function selection_cloneShallow() {
29195 var clone = this.cloneNode(false), parent = this.parentNode;
29196 return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
29197}
29198
29199function selection_cloneDeep() {
29200 var clone = this.cloneNode(true), parent = this.parentNode;
29201 return parent ? parent.insertBefore(clone, this.nextSibling) : clone;
29202}
29203
29204/* harmony default export */ __webpack_exports__["default"] = (function(deep) {
29205 return this.select(deep ? selection_cloneDeep : selection_cloneShallow);
29206});
29207
29208
29209/***/ }),
29210
29211/***/ "./node_modules/d3-selection/src/selection/data.js":
29212/*!*********************************************************!*\
29213 !*** ./node_modules/d3-selection/src/selection/data.js ***!
29214 \*********************************************************/
29215/*! exports provided: default */
29216/***/ (function(module, __webpack_exports__, __webpack_require__) {
29217
29218"use strict";
29219__webpack_require__.r(__webpack_exports__);
29220/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
29221/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js");
29222/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant */ "./node_modules/d3-selection/src/constant.js");
29223
29224
29225
29226
29227var keyPrefix = "$"; // Protect against keys like “__proto__”.
29228
29229function bindIndex(parent, group, enter, update, exit, data) {
29230 var i = 0,
29231 node,
29232 groupLength = group.length,
29233 dataLength = data.length;
29234
29235 // Put any non-null nodes that fit into update.
29236 // Put any null nodes into enter.
29237 // Put any remaining data into enter.
29238 for (; i < dataLength; ++i) {
29239 if (node = group[i]) {
29240 node.__data__ = data[i];
29241 update[i] = node;
29242 } else {
29243 enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]);
29244 }
29245 }
29246
29247 // Put any non-null nodes that don’t fit into exit.
29248 for (; i < groupLength; ++i) {
29249 if (node = group[i]) {
29250 exit[i] = node;
29251 }
29252 }
29253}
29254
29255function bindKey(parent, group, enter, update, exit, data, key) {
29256 var i,
29257 node,
29258 nodeByKeyValue = {},
29259 groupLength = group.length,
29260 dataLength = data.length,
29261 keyValues = new Array(groupLength),
29262 keyValue;
29263
29264 // Compute the key for each node.
29265 // If multiple nodes have the same key, the duplicates are added to exit.
29266 for (i = 0; i < groupLength; ++i) {
29267 if (node = group[i]) {
29268 keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);
29269 if (keyValue in nodeByKeyValue) {
29270 exit[i] = node;
29271 } else {
29272 nodeByKeyValue[keyValue] = node;
29273 }
29274 }
29275 }
29276
29277 // Compute the key for each datum.
29278 // If there a node associated with this key, join and add it to update.
29279 // If there is not (or the key is a duplicate), add it to enter.
29280 for (i = 0; i < dataLength; ++i) {
29281 keyValue = keyPrefix + key.call(parent, data[i], i, data);
29282 if (node = nodeByKeyValue[keyValue]) {
29283 update[i] = node;
29284 node.__data__ = data[i];
29285 nodeByKeyValue[keyValue] = null;
29286 } else {
29287 enter[i] = new _enter__WEBPACK_IMPORTED_MODULE_1__["EnterNode"](parent, data[i]);
29288 }
29289 }
29290
29291 // Add any remaining nodes that were not bound to data to exit.
29292 for (i = 0; i < groupLength; ++i) {
29293 if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {
29294 exit[i] = node;
29295 }
29296 }
29297}
29298
29299/* harmony default export */ __webpack_exports__["default"] = (function(value, key) {
29300 if (!value) {
29301 data = new Array(this.size()), j = -1;
29302 this.each(function(d) { data[++j] = d; });
29303 return data;
29304 }
29305
29306 var bind = key ? bindKey : bindIndex,
29307 parents = this._parents,
29308 groups = this._groups;
29309
29310 if (typeof value !== "function") value = Object(_constant__WEBPACK_IMPORTED_MODULE_2__["default"])(value);
29311
29312 for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
29313 var parent = parents[j],
29314 group = groups[j],
29315 groupLength = group.length,
29316 data = value.call(parent, parent && parent.__data__, j, parents),
29317 dataLength = data.length,
29318 enterGroup = enter[j] = new Array(dataLength),
29319 updateGroup = update[j] = new Array(dataLength),
29320 exitGroup = exit[j] = new Array(groupLength);
29321
29322 bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
29323
29324 // Now connect the enter nodes to their following update node, such that
29325 // appendChild can insert the materialized enter node before this node,
29326 // rather than at the end of the parent node.
29327 for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
29328 if (previous = enterGroup[i0]) {
29329 if (i0 >= i1) i1 = i0 + 1;
29330 while (!(next = updateGroup[i1]) && ++i1 < dataLength);
29331 previous._next = next || null;
29332 }
29333 }
29334 }
29335
29336 update = new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](update, parents);
29337 update._enter = enter;
29338 update._exit = exit;
29339 return update;
29340});
29341
29342
29343/***/ }),
29344
29345/***/ "./node_modules/d3-selection/src/selection/datum.js":
29346/*!**********************************************************!*\
29347 !*** ./node_modules/d3-selection/src/selection/datum.js ***!
29348 \**********************************************************/
29349/*! exports provided: default */
29350/***/ (function(module, __webpack_exports__, __webpack_require__) {
29351
29352"use strict";
29353__webpack_require__.r(__webpack_exports__);
29354/* harmony default export */ __webpack_exports__["default"] = (function(value) {
29355 return arguments.length
29356 ? this.property("__data__", value)
29357 : this.node().__data__;
29358});
29359
29360
29361/***/ }),
29362
29363/***/ "./node_modules/d3-selection/src/selection/dispatch.js":
29364/*!*************************************************************!*\
29365 !*** ./node_modules/d3-selection/src/selection/dispatch.js ***!
29366 \*************************************************************/
29367/*! exports provided: default */
29368/***/ (function(module, __webpack_exports__, __webpack_require__) {
29369
29370"use strict";
29371__webpack_require__.r(__webpack_exports__);
29372/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js");
29373
29374
29375function dispatchEvent(node, type, params) {
29376 var window = Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node),
29377 event = window.CustomEvent;
29378
29379 if (typeof event === "function") {
29380 event = new event(type, params);
29381 } else {
29382 event = window.document.createEvent("Event");
29383 if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
29384 else event.initEvent(type, false, false);
29385 }
29386
29387 node.dispatchEvent(event);
29388}
29389
29390function dispatchConstant(type, params) {
29391 return function() {
29392 return dispatchEvent(this, type, params);
29393 };
29394}
29395
29396function dispatchFunction(type, params) {
29397 return function() {
29398 return dispatchEvent(this, type, params.apply(this, arguments));
29399 };
29400}
29401
29402/* harmony default export */ __webpack_exports__["default"] = (function(type, params) {
29403 return this.each((typeof params === "function"
29404 ? dispatchFunction
29405 : dispatchConstant)(type, params));
29406});
29407
29408
29409/***/ }),
29410
29411/***/ "./node_modules/d3-selection/src/selection/each.js":
29412/*!*********************************************************!*\
29413 !*** ./node_modules/d3-selection/src/selection/each.js ***!
29414 \*********************************************************/
29415/*! exports provided: default */
29416/***/ (function(module, __webpack_exports__, __webpack_require__) {
29417
29418"use strict";
29419__webpack_require__.r(__webpack_exports__);
29420/* harmony default export */ __webpack_exports__["default"] = (function(callback) {
29421
29422 for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
29423 for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
29424 if (node = group[i]) callback.call(node, node.__data__, i, group);
29425 }
29426 }
29427
29428 return this;
29429});
29430
29431
29432/***/ }),
29433
29434/***/ "./node_modules/d3-selection/src/selection/empty.js":
29435/*!**********************************************************!*\
29436 !*** ./node_modules/d3-selection/src/selection/empty.js ***!
29437 \**********************************************************/
29438/*! exports provided: default */
29439/***/ (function(module, __webpack_exports__, __webpack_require__) {
29440
29441"use strict";
29442__webpack_require__.r(__webpack_exports__);
29443/* harmony default export */ __webpack_exports__["default"] = (function() {
29444 return !this.node();
29445});
29446
29447
29448/***/ }),
29449
29450/***/ "./node_modules/d3-selection/src/selection/enter.js":
29451/*!**********************************************************!*\
29452 !*** ./node_modules/d3-selection/src/selection/enter.js ***!
29453 \**********************************************************/
29454/*! exports provided: default, EnterNode */
29455/***/ (function(module, __webpack_exports__, __webpack_require__) {
29456
29457"use strict";
29458__webpack_require__.r(__webpack_exports__);
29459/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EnterNode", function() { return EnterNode; });
29460/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js");
29461/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
29462
29463
29464
29465/* harmony default export */ __webpack_exports__["default"] = (function() {
29466 return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._enter || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents);
29467});
29468
29469function EnterNode(parent, datum) {
29470 this.ownerDocument = parent.ownerDocument;
29471 this.namespaceURI = parent.namespaceURI;
29472 this._next = null;
29473 this._parent = parent;
29474 this.__data__ = datum;
29475}
29476
29477EnterNode.prototype = {
29478 constructor: EnterNode,
29479 appendChild: function(child) { return this._parent.insertBefore(child, this._next); },
29480 insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },
29481 querySelector: function(selector) { return this._parent.querySelector(selector); },
29482 querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }
29483};
29484
29485
29486/***/ }),
29487
29488/***/ "./node_modules/d3-selection/src/selection/exit.js":
29489/*!*********************************************************!*\
29490 !*** ./node_modules/d3-selection/src/selection/exit.js ***!
29491 \*********************************************************/
29492/*! exports provided: default */
29493/***/ (function(module, __webpack_exports__, __webpack_require__) {
29494
29495"use strict";
29496__webpack_require__.r(__webpack_exports__);
29497/* harmony import */ var _sparse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sparse */ "./node_modules/d3-selection/src/selection/sparse.js");
29498/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
29499
29500
29501
29502/* harmony default export */ __webpack_exports__["default"] = (function() {
29503 return new _index__WEBPACK_IMPORTED_MODULE_1__["Selection"](this._exit || this._groups.map(_sparse__WEBPACK_IMPORTED_MODULE_0__["default"]), this._parents);
29504});
29505
29506
29507/***/ }),
29508
29509/***/ "./node_modules/d3-selection/src/selection/filter.js":
29510/*!***********************************************************!*\
29511 !*** ./node_modules/d3-selection/src/selection/filter.js ***!
29512 \***********************************************************/
29513/*! exports provided: default */
29514/***/ (function(module, __webpack_exports__, __webpack_require__) {
29515
29516"use strict";
29517__webpack_require__.r(__webpack_exports__);
29518/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
29519/* harmony import */ var _matcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../matcher */ "./node_modules/d3-selection/src/matcher.js");
29520
29521
29522
29523/* harmony default export */ __webpack_exports__["default"] = (function(match) {
29524 if (typeof match !== "function") match = Object(_matcher__WEBPACK_IMPORTED_MODULE_1__["default"])(match);
29525
29526 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
29527 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
29528 if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
29529 subgroup.push(node);
29530 }
29531 }
29532 }
29533
29534 return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents);
29535});
29536
29537
29538/***/ }),
29539
29540/***/ "./node_modules/d3-selection/src/selection/html.js":
29541/*!*********************************************************!*\
29542 !*** ./node_modules/d3-selection/src/selection/html.js ***!
29543 \*********************************************************/
29544/*! exports provided: default */
29545/***/ (function(module, __webpack_exports__, __webpack_require__) {
29546
29547"use strict";
29548__webpack_require__.r(__webpack_exports__);
29549function htmlRemove() {
29550 this.innerHTML = "";
29551}
29552
29553function htmlConstant(value) {
29554 return function() {
29555 this.innerHTML = value;
29556 };
29557}
29558
29559function htmlFunction(value) {
29560 return function() {
29561 var v = value.apply(this, arguments);
29562 this.innerHTML = v == null ? "" : v;
29563 };
29564}
29565
29566/* harmony default export */ __webpack_exports__["default"] = (function(value) {
29567 return arguments.length
29568 ? this.each(value == null
29569 ? htmlRemove : (typeof value === "function"
29570 ? htmlFunction
29571 : htmlConstant)(value))
29572 : this.node().innerHTML;
29573});
29574
29575
29576/***/ }),
29577
29578/***/ "./node_modules/d3-selection/src/selection/index.js":
29579/*!**********************************************************!*\
29580 !*** ./node_modules/d3-selection/src/selection/index.js ***!
29581 \**********************************************************/
29582/*! exports provided: root, Selection, default */
29583/***/ (function(module, __webpack_exports__, __webpack_require__) {
29584
29585"use strict";
29586__webpack_require__.r(__webpack_exports__);
29587/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "root", function() { return root; });
29588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Selection", function() { return Selection; });
29589/* harmony import */ var _select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./select */ "./node_modules/d3-selection/src/selection/select.js");
29590/* harmony import */ var _selectAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./selectAll */ "./node_modules/d3-selection/src/selection/selectAll.js");
29591/* harmony import */ var _filter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter */ "./node_modules/d3-selection/src/selection/filter.js");
29592/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data */ "./node_modules/d3-selection/src/selection/data.js");
29593/* harmony import */ var _enter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./enter */ "./node_modules/d3-selection/src/selection/enter.js");
29594/* harmony import */ var _exit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./exit */ "./node_modules/d3-selection/src/selection/exit.js");
29595/* harmony import */ var _join__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./join */ "./node_modules/d3-selection/src/selection/join.js");
29596/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge */ "./node_modules/d3-selection/src/selection/merge.js");
29597/* harmony import */ var _order__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./order */ "./node_modules/d3-selection/src/selection/order.js");
29598/* harmony import */ var _sort__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./sort */ "./node_modules/d3-selection/src/selection/sort.js");
29599/* harmony import */ var _call__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./call */ "./node_modules/d3-selection/src/selection/call.js");
29600/* harmony import */ var _nodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./nodes */ "./node_modules/d3-selection/src/selection/nodes.js");
29601/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node */ "./node_modules/d3-selection/src/selection/node.js");
29602/* harmony import */ var _size__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./size */ "./node_modules/d3-selection/src/selection/size.js");
29603/* harmony import */ var _empty__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./empty */ "./node_modules/d3-selection/src/selection/empty.js");
29604/* harmony import */ var _each__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./each */ "./node_modules/d3-selection/src/selection/each.js");
29605/* harmony import */ var _attr__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./attr */ "./node_modules/d3-selection/src/selection/attr.js");
29606/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./style */ "./node_modules/d3-selection/src/selection/style.js");
29607/* harmony import */ var _property__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./property */ "./node_modules/d3-selection/src/selection/property.js");
29608/* harmony import */ var _classed__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./classed */ "./node_modules/d3-selection/src/selection/classed.js");
29609/* harmony import */ var _text__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./text */ "./node_modules/d3-selection/src/selection/text.js");
29610/* harmony import */ var _html__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./html */ "./node_modules/d3-selection/src/selection/html.js");
29611/* harmony import */ var _raise__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./raise */ "./node_modules/d3-selection/src/selection/raise.js");
29612/* harmony import */ var _lower__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./lower */ "./node_modules/d3-selection/src/selection/lower.js");
29613/* harmony import */ var _append__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./append */ "./node_modules/d3-selection/src/selection/append.js");
29614/* harmony import */ var _insert__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./insert */ "./node_modules/d3-selection/src/selection/insert.js");
29615/* harmony import */ var _remove__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./remove */ "./node_modules/d3-selection/src/selection/remove.js");
29616/* harmony import */ var _clone__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clone */ "./node_modules/d3-selection/src/selection/clone.js");
29617/* harmony import */ var _datum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./datum */ "./node_modules/d3-selection/src/selection/datum.js");
29618/* harmony import */ var _on__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./on */ "./node_modules/d3-selection/src/selection/on.js");
29619/* harmony import */ var _dispatch__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./dispatch */ "./node_modules/d3-selection/src/selection/dispatch.js");
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652var root = [null];
29653
29654function Selection(groups, parents) {
29655 this._groups = groups;
29656 this._parents = parents;
29657}
29658
29659function selection() {
29660 return new Selection([[document.documentElement]], root);
29661}
29662
29663Selection.prototype = selection.prototype = {
29664 constructor: Selection,
29665 select: _select__WEBPACK_IMPORTED_MODULE_0__["default"],
29666 selectAll: _selectAll__WEBPACK_IMPORTED_MODULE_1__["default"],
29667 filter: _filter__WEBPACK_IMPORTED_MODULE_2__["default"],
29668 data: _data__WEBPACK_IMPORTED_MODULE_3__["default"],
29669 enter: _enter__WEBPACK_IMPORTED_MODULE_4__["default"],
29670 exit: _exit__WEBPACK_IMPORTED_MODULE_5__["default"],
29671 join: _join__WEBPACK_IMPORTED_MODULE_6__["default"],
29672 merge: _merge__WEBPACK_IMPORTED_MODULE_7__["default"],
29673 order: _order__WEBPACK_IMPORTED_MODULE_8__["default"],
29674 sort: _sort__WEBPACK_IMPORTED_MODULE_9__["default"],
29675 call: _call__WEBPACK_IMPORTED_MODULE_10__["default"],
29676 nodes: _nodes__WEBPACK_IMPORTED_MODULE_11__["default"],
29677 node: _node__WEBPACK_IMPORTED_MODULE_12__["default"],
29678 size: _size__WEBPACK_IMPORTED_MODULE_13__["default"],
29679 empty: _empty__WEBPACK_IMPORTED_MODULE_14__["default"],
29680 each: _each__WEBPACK_IMPORTED_MODULE_15__["default"],
29681 attr: _attr__WEBPACK_IMPORTED_MODULE_16__["default"],
29682 style: _style__WEBPACK_IMPORTED_MODULE_17__["default"],
29683 property: _property__WEBPACK_IMPORTED_MODULE_18__["default"],
29684 classed: _classed__WEBPACK_IMPORTED_MODULE_19__["default"],
29685 text: _text__WEBPACK_IMPORTED_MODULE_20__["default"],
29686 html: _html__WEBPACK_IMPORTED_MODULE_21__["default"],
29687 raise: _raise__WEBPACK_IMPORTED_MODULE_22__["default"],
29688 lower: _lower__WEBPACK_IMPORTED_MODULE_23__["default"],
29689 append: _append__WEBPACK_IMPORTED_MODULE_24__["default"],
29690 insert: _insert__WEBPACK_IMPORTED_MODULE_25__["default"],
29691 remove: _remove__WEBPACK_IMPORTED_MODULE_26__["default"],
29692 clone: _clone__WEBPACK_IMPORTED_MODULE_27__["default"],
29693 datum: _datum__WEBPACK_IMPORTED_MODULE_28__["default"],
29694 on: _on__WEBPACK_IMPORTED_MODULE_29__["default"],
29695 dispatch: _dispatch__WEBPACK_IMPORTED_MODULE_30__["default"]
29696};
29697
29698/* harmony default export */ __webpack_exports__["default"] = (selection);
29699
29700
29701/***/ }),
29702
29703/***/ "./node_modules/d3-selection/src/selection/insert.js":
29704/*!***********************************************************!*\
29705 !*** ./node_modules/d3-selection/src/selection/insert.js ***!
29706 \***********************************************************/
29707/*! exports provided: default */
29708/***/ (function(module, __webpack_exports__, __webpack_require__) {
29709
29710"use strict";
29711__webpack_require__.r(__webpack_exports__);
29712/* harmony import */ var _creator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../creator */ "./node_modules/d3-selection/src/creator.js");
29713/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js");
29714
29715
29716
29717function constantNull() {
29718 return null;
29719}
29720
29721/* harmony default export */ __webpack_exports__["default"] = (function(name, before) {
29722 var create = typeof name === "function" ? name : Object(_creator__WEBPACK_IMPORTED_MODULE_0__["default"])(name),
29723 select = before == null ? constantNull : typeof before === "function" ? before : Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(before);
29724 return this.select(function() {
29725 return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);
29726 });
29727});
29728
29729
29730/***/ }),
29731
29732/***/ "./node_modules/d3-selection/src/selection/join.js":
29733/*!*********************************************************!*\
29734 !*** ./node_modules/d3-selection/src/selection/join.js ***!
29735 \*********************************************************/
29736/*! exports provided: default */
29737/***/ (function(module, __webpack_exports__, __webpack_require__) {
29738
29739"use strict";
29740__webpack_require__.r(__webpack_exports__);
29741/* harmony default export */ __webpack_exports__["default"] = (function(onenter, onupdate, onexit) {
29742 var enter = this.enter(), update = this, exit = this.exit();
29743 enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + "");
29744 if (onupdate != null) update = onupdate(update);
29745 if (onexit == null) exit.remove(); else onexit(exit);
29746 return enter && update ? enter.merge(update).order() : update;
29747});
29748
29749
29750/***/ }),
29751
29752/***/ "./node_modules/d3-selection/src/selection/lower.js":
29753/*!**********************************************************!*\
29754 !*** ./node_modules/d3-selection/src/selection/lower.js ***!
29755 \**********************************************************/
29756/*! exports provided: default */
29757/***/ (function(module, __webpack_exports__, __webpack_require__) {
29758
29759"use strict";
29760__webpack_require__.r(__webpack_exports__);
29761function lower() {
29762 if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
29763}
29764
29765/* harmony default export */ __webpack_exports__["default"] = (function() {
29766 return this.each(lower);
29767});
29768
29769
29770/***/ }),
29771
29772/***/ "./node_modules/d3-selection/src/selection/merge.js":
29773/*!**********************************************************!*\
29774 !*** ./node_modules/d3-selection/src/selection/merge.js ***!
29775 \**********************************************************/
29776/*! exports provided: default */
29777/***/ (function(module, __webpack_exports__, __webpack_require__) {
29778
29779"use strict";
29780__webpack_require__.r(__webpack_exports__);
29781/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
29782
29783
29784/* harmony default export */ __webpack_exports__["default"] = (function(selection) {
29785
29786 for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
29787 for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
29788 if (node = group0[i] || group1[i]) {
29789 merge[i] = node;
29790 }
29791 }
29792 }
29793
29794 for (; j < m0; ++j) {
29795 merges[j] = groups0[j];
29796 }
29797
29798 return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](merges, this._parents);
29799});
29800
29801
29802/***/ }),
29803
29804/***/ "./node_modules/d3-selection/src/selection/node.js":
29805/*!*********************************************************!*\
29806 !*** ./node_modules/d3-selection/src/selection/node.js ***!
29807 \*********************************************************/
29808/*! exports provided: default */
29809/***/ (function(module, __webpack_exports__, __webpack_require__) {
29810
29811"use strict";
29812__webpack_require__.r(__webpack_exports__);
29813/* harmony default export */ __webpack_exports__["default"] = (function() {
29814
29815 for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
29816 for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
29817 var node = group[i];
29818 if (node) return node;
29819 }
29820 }
29821
29822 return null;
29823});
29824
29825
29826/***/ }),
29827
29828/***/ "./node_modules/d3-selection/src/selection/nodes.js":
29829/*!**********************************************************!*\
29830 !*** ./node_modules/d3-selection/src/selection/nodes.js ***!
29831 \**********************************************************/
29832/*! exports provided: default */
29833/***/ (function(module, __webpack_exports__, __webpack_require__) {
29834
29835"use strict";
29836__webpack_require__.r(__webpack_exports__);
29837/* harmony default export */ __webpack_exports__["default"] = (function() {
29838 var nodes = new Array(this.size()), i = -1;
29839 this.each(function() { nodes[++i] = this; });
29840 return nodes;
29841});
29842
29843
29844/***/ }),
29845
29846/***/ "./node_modules/d3-selection/src/selection/on.js":
29847/*!*******************************************************!*\
29848 !*** ./node_modules/d3-selection/src/selection/on.js ***!
29849 \*******************************************************/
29850/*! exports provided: event, default, customEvent */
29851/***/ (function(module, __webpack_exports__, __webpack_require__) {
29852
29853"use strict";
29854__webpack_require__.r(__webpack_exports__);
29855/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "event", function() { return event; });
29856/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return customEvent; });
29857var filterEvents = {};
29858
29859var event = null;
29860
29861if (typeof document !== "undefined") {
29862 var element = document.documentElement;
29863 if (!("onmouseenter" in element)) {
29864 filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"};
29865 }
29866}
29867
29868function filterContextListener(listener, index, group) {
29869 listener = contextListener(listener, index, group);
29870 return function(event) {
29871 var related = event.relatedTarget;
29872 if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {
29873 listener.call(this, event);
29874 }
29875 };
29876}
29877
29878function contextListener(listener, index, group) {
29879 return function(event1) {
29880 var event0 = event; // Events can be reentrant (e.g., focus).
29881 event = event1;
29882 try {
29883 listener.call(this, this.__data__, index, group);
29884 } finally {
29885 event = event0;
29886 }
29887 };
29888}
29889
29890function parseTypenames(typenames) {
29891 return typenames.trim().split(/^|\s+/).map(function(t) {
29892 var name = "", i = t.indexOf(".");
29893 if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
29894 return {type: t, name: name};
29895 });
29896}
29897
29898function onRemove(typename) {
29899 return function() {
29900 var on = this.__on;
29901 if (!on) return;
29902 for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
29903 if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
29904 this.removeEventListener(o.type, o.listener, o.capture);
29905 } else {
29906 on[++i] = o;
29907 }
29908 }
29909 if (++i) on.length = i;
29910 else delete this.__on;
29911 };
29912}
29913
29914function onAdd(typename, value, capture) {
29915 var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;
29916 return function(d, i, group) {
29917 var on = this.__on, o, listener = wrap(value, i, group);
29918 if (on) for (var j = 0, m = on.length; j < m; ++j) {
29919 if ((o = on[j]).type === typename.type && o.name === typename.name) {
29920 this.removeEventListener(o.type, o.listener, o.capture);
29921 this.addEventListener(o.type, o.listener = listener, o.capture = capture);
29922 o.value = value;
29923 return;
29924 }
29925 }
29926 this.addEventListener(typename.type, listener, capture);
29927 o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};
29928 if (!on) this.__on = [o];
29929 else on.push(o);
29930 };
29931}
29932
29933/* harmony default export */ __webpack_exports__["default"] = (function(typename, value, capture) {
29934 var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
29935
29936 if (arguments.length < 2) {
29937 var on = this.node().__on;
29938 if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
29939 for (i = 0, o = on[j]; i < n; ++i) {
29940 if ((t = typenames[i]).type === o.type && t.name === o.name) {
29941 return o.value;
29942 }
29943 }
29944 }
29945 return;
29946 }
29947
29948 on = value ? onAdd : onRemove;
29949 if (capture == null) capture = false;
29950 for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));
29951 return this;
29952});
29953
29954function customEvent(event1, listener, that, args) {
29955 var event0 = event;
29956 event1.sourceEvent = event;
29957 event = event1;
29958 try {
29959 return listener.apply(that, args);
29960 } finally {
29961 event = event0;
29962 }
29963}
29964
29965
29966/***/ }),
29967
29968/***/ "./node_modules/d3-selection/src/selection/order.js":
29969/*!**********************************************************!*\
29970 !*** ./node_modules/d3-selection/src/selection/order.js ***!
29971 \**********************************************************/
29972/*! exports provided: default */
29973/***/ (function(module, __webpack_exports__, __webpack_require__) {
29974
29975"use strict";
29976__webpack_require__.r(__webpack_exports__);
29977/* harmony default export */ __webpack_exports__["default"] = (function() {
29978
29979 for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {
29980 for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {
29981 if (node = group[i]) {
29982 if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
29983 next = node;
29984 }
29985 }
29986 }
29987
29988 return this;
29989});
29990
29991
29992/***/ }),
29993
29994/***/ "./node_modules/d3-selection/src/selection/property.js":
29995/*!*************************************************************!*\
29996 !*** ./node_modules/d3-selection/src/selection/property.js ***!
29997 \*************************************************************/
29998/*! exports provided: default */
29999/***/ (function(module, __webpack_exports__, __webpack_require__) {
30000
30001"use strict";
30002__webpack_require__.r(__webpack_exports__);
30003function propertyRemove(name) {
30004 return function() {
30005 delete this[name];
30006 };
30007}
30008
30009function propertyConstant(name, value) {
30010 return function() {
30011 this[name] = value;
30012 };
30013}
30014
30015function propertyFunction(name, value) {
30016 return function() {
30017 var v = value.apply(this, arguments);
30018 if (v == null) delete this[name];
30019 else this[name] = v;
30020 };
30021}
30022
30023/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
30024 return arguments.length > 1
30025 ? this.each((value == null
30026 ? propertyRemove : typeof value === "function"
30027 ? propertyFunction
30028 : propertyConstant)(name, value))
30029 : this.node()[name];
30030});
30031
30032
30033/***/ }),
30034
30035/***/ "./node_modules/d3-selection/src/selection/raise.js":
30036/*!**********************************************************!*\
30037 !*** ./node_modules/d3-selection/src/selection/raise.js ***!
30038 \**********************************************************/
30039/*! exports provided: default */
30040/***/ (function(module, __webpack_exports__, __webpack_require__) {
30041
30042"use strict";
30043__webpack_require__.r(__webpack_exports__);
30044function raise() {
30045 if (this.nextSibling) this.parentNode.appendChild(this);
30046}
30047
30048/* harmony default export */ __webpack_exports__["default"] = (function() {
30049 return this.each(raise);
30050});
30051
30052
30053/***/ }),
30054
30055/***/ "./node_modules/d3-selection/src/selection/remove.js":
30056/*!***********************************************************!*\
30057 !*** ./node_modules/d3-selection/src/selection/remove.js ***!
30058 \***********************************************************/
30059/*! exports provided: default */
30060/***/ (function(module, __webpack_exports__, __webpack_require__) {
30061
30062"use strict";
30063__webpack_require__.r(__webpack_exports__);
30064function remove() {
30065 var parent = this.parentNode;
30066 if (parent) parent.removeChild(this);
30067}
30068
30069/* harmony default export */ __webpack_exports__["default"] = (function() {
30070 return this.each(remove);
30071});
30072
30073
30074/***/ }),
30075
30076/***/ "./node_modules/d3-selection/src/selection/select.js":
30077/*!***********************************************************!*\
30078 !*** ./node_modules/d3-selection/src/selection/select.js ***!
30079 \***********************************************************/
30080/*! exports provided: default */
30081/***/ (function(module, __webpack_exports__, __webpack_require__) {
30082
30083"use strict";
30084__webpack_require__.r(__webpack_exports__);
30085/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
30086/* harmony import */ var _selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selector */ "./node_modules/d3-selection/src/selector.js");
30087
30088
30089
30090/* harmony default export */ __webpack_exports__["default"] = (function(select) {
30091 if (typeof select !== "function") select = Object(_selector__WEBPACK_IMPORTED_MODULE_1__["default"])(select);
30092
30093 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
30094 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
30095 if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
30096 if ("__data__" in node) subnode.__data__ = node.__data__;
30097 subgroup[i] = subnode;
30098 }
30099 }
30100 }
30101
30102 return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, this._parents);
30103});
30104
30105
30106/***/ }),
30107
30108/***/ "./node_modules/d3-selection/src/selection/selectAll.js":
30109/*!**************************************************************!*\
30110 !*** ./node_modules/d3-selection/src/selection/selectAll.js ***!
30111 \**************************************************************/
30112/*! exports provided: default */
30113/***/ (function(module, __webpack_exports__, __webpack_require__) {
30114
30115"use strict";
30116__webpack_require__.r(__webpack_exports__);
30117/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
30118/* harmony import */ var _selectorAll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../selectorAll */ "./node_modules/d3-selection/src/selectorAll.js");
30119
30120
30121
30122/* harmony default export */ __webpack_exports__["default"] = (function(select) {
30123 if (typeof select !== "function") select = Object(_selectorAll__WEBPACK_IMPORTED_MODULE_1__["default"])(select);
30124
30125 for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
30126 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
30127 if (node = group[i]) {
30128 subgroups.push(select.call(node, node.__data__, i, group));
30129 parents.push(node);
30130 }
30131 }
30132 }
30133
30134 return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](subgroups, parents);
30135});
30136
30137
30138/***/ }),
30139
30140/***/ "./node_modules/d3-selection/src/selection/size.js":
30141/*!*********************************************************!*\
30142 !*** ./node_modules/d3-selection/src/selection/size.js ***!
30143 \*********************************************************/
30144/*! exports provided: default */
30145/***/ (function(module, __webpack_exports__, __webpack_require__) {
30146
30147"use strict";
30148__webpack_require__.r(__webpack_exports__);
30149/* harmony default export */ __webpack_exports__["default"] = (function() {
30150 var size = 0;
30151 this.each(function() { ++size; });
30152 return size;
30153});
30154
30155
30156/***/ }),
30157
30158/***/ "./node_modules/d3-selection/src/selection/sort.js":
30159/*!*********************************************************!*\
30160 !*** ./node_modules/d3-selection/src/selection/sort.js ***!
30161 \*********************************************************/
30162/*! exports provided: default */
30163/***/ (function(module, __webpack_exports__, __webpack_require__) {
30164
30165"use strict";
30166__webpack_require__.r(__webpack_exports__);
30167/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./node_modules/d3-selection/src/selection/index.js");
30168
30169
30170/* harmony default export */ __webpack_exports__["default"] = (function(compare) {
30171 if (!compare) compare = ascending;
30172
30173 function compareNode(a, b) {
30174 return a && b ? compare(a.__data__, b.__data__) : !a - !b;
30175 }
30176
30177 for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {
30178 for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {
30179 if (node = group[i]) {
30180 sortgroup[i] = node;
30181 }
30182 }
30183 sortgroup.sort(compareNode);
30184 }
30185
30186 return new _index__WEBPACK_IMPORTED_MODULE_0__["Selection"](sortgroups, this._parents).order();
30187});
30188
30189function ascending(a, b) {
30190 return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
30191}
30192
30193
30194/***/ }),
30195
30196/***/ "./node_modules/d3-selection/src/selection/sparse.js":
30197/*!***********************************************************!*\
30198 !*** ./node_modules/d3-selection/src/selection/sparse.js ***!
30199 \***********************************************************/
30200/*! exports provided: default */
30201/***/ (function(module, __webpack_exports__, __webpack_require__) {
30202
30203"use strict";
30204__webpack_require__.r(__webpack_exports__);
30205/* harmony default export */ __webpack_exports__["default"] = (function(update) {
30206 return new Array(update.length);
30207});
30208
30209
30210/***/ }),
30211
30212/***/ "./node_modules/d3-selection/src/selection/style.js":
30213/*!**********************************************************!*\
30214 !*** ./node_modules/d3-selection/src/selection/style.js ***!
30215 \**********************************************************/
30216/*! exports provided: default, styleValue */
30217/***/ (function(module, __webpack_exports__, __webpack_require__) {
30218
30219"use strict";
30220__webpack_require__.r(__webpack_exports__);
30221/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styleValue", function() { return styleValue; });
30222/* harmony import */ var _window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../window */ "./node_modules/d3-selection/src/window.js");
30223
30224
30225function styleRemove(name) {
30226 return function() {
30227 this.style.removeProperty(name);
30228 };
30229}
30230
30231function styleConstant(name, value, priority) {
30232 return function() {
30233 this.style.setProperty(name, value, priority);
30234 };
30235}
30236
30237function styleFunction(name, value, priority) {
30238 return function() {
30239 var v = value.apply(this, arguments);
30240 if (v == null) this.style.removeProperty(name);
30241 else this.style.setProperty(name, v, priority);
30242 };
30243}
30244
30245/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) {
30246 return arguments.length > 1
30247 ? this.each((value == null
30248 ? styleRemove : typeof value === "function"
30249 ? styleFunction
30250 : styleConstant)(name, value, priority == null ? "" : priority))
30251 : styleValue(this.node(), name);
30252});
30253
30254function styleValue(node, name) {
30255 return node.style.getPropertyValue(name)
30256 || Object(_window__WEBPACK_IMPORTED_MODULE_0__["default"])(node).getComputedStyle(node, null).getPropertyValue(name);
30257}
30258
30259
30260/***/ }),
30261
30262/***/ "./node_modules/d3-selection/src/selection/text.js":
30263/*!*********************************************************!*\
30264 !*** ./node_modules/d3-selection/src/selection/text.js ***!
30265 \*********************************************************/
30266/*! exports provided: default */
30267/***/ (function(module, __webpack_exports__, __webpack_require__) {
30268
30269"use strict";
30270__webpack_require__.r(__webpack_exports__);
30271function textRemove() {
30272 this.textContent = "";
30273}
30274
30275function textConstant(value) {
30276 return function() {
30277 this.textContent = value;
30278 };
30279}
30280
30281function textFunction(value) {
30282 return function() {
30283 var v = value.apply(this, arguments);
30284 this.textContent = v == null ? "" : v;
30285 };
30286}
30287
30288/* harmony default export */ __webpack_exports__["default"] = (function(value) {
30289 return arguments.length
30290 ? this.each(value == null
30291 ? textRemove : (typeof value === "function"
30292 ? textFunction
30293 : textConstant)(value))
30294 : this.node().textContent;
30295});
30296
30297
30298/***/ }),
30299
30300/***/ "./node_modules/d3-selection/src/selector.js":
30301/*!***************************************************!*\
30302 !*** ./node_modules/d3-selection/src/selector.js ***!
30303 \***************************************************/
30304/*! exports provided: default */
30305/***/ (function(module, __webpack_exports__, __webpack_require__) {
30306
30307"use strict";
30308__webpack_require__.r(__webpack_exports__);
30309function none() {}
30310
30311/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
30312 return selector == null ? none : function() {
30313 return this.querySelector(selector);
30314 };
30315});
30316
30317
30318/***/ }),
30319
30320/***/ "./node_modules/d3-selection/src/selectorAll.js":
30321/*!******************************************************!*\
30322 !*** ./node_modules/d3-selection/src/selectorAll.js ***!
30323 \******************************************************/
30324/*! exports provided: default */
30325/***/ (function(module, __webpack_exports__, __webpack_require__) {
30326
30327"use strict";
30328__webpack_require__.r(__webpack_exports__);
30329function empty() {
30330 return [];
30331}
30332
30333/* harmony default export */ __webpack_exports__["default"] = (function(selector) {
30334 return selector == null ? empty : function() {
30335 return this.querySelectorAll(selector);
30336 };
30337});
30338
30339
30340/***/ }),
30341
30342/***/ "./node_modules/d3-selection/src/sourceEvent.js":
30343/*!******************************************************!*\
30344 !*** ./node_modules/d3-selection/src/sourceEvent.js ***!
30345 \******************************************************/
30346/*! exports provided: default */
30347/***/ (function(module, __webpack_exports__, __webpack_require__) {
30348
30349"use strict";
30350__webpack_require__.r(__webpack_exports__);
30351/* harmony import */ var _selection_on__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/on */ "./node_modules/d3-selection/src/selection/on.js");
30352
30353
30354/* harmony default export */ __webpack_exports__["default"] = (function() {
30355 var current = _selection_on__WEBPACK_IMPORTED_MODULE_0__["event"], source;
30356 while (source = current.sourceEvent) current = source;
30357 return current;
30358});
30359
30360
30361/***/ }),
30362
30363/***/ "./node_modules/d3-selection/src/touch.js":
30364/*!************************************************!*\
30365 !*** ./node_modules/d3-selection/src/touch.js ***!
30366 \************************************************/
30367/*! exports provided: default */
30368/***/ (function(module, __webpack_exports__, __webpack_require__) {
30369
30370"use strict";
30371__webpack_require__.r(__webpack_exports__);
30372/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js");
30373/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js");
30374
30375
30376
30377/* harmony default export */ __webpack_exports__["default"] = (function(node, touches, identifier) {
30378 if (arguments.length < 3) identifier = touches, touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().changedTouches;
30379
30380 for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {
30381 if ((touch = touches[i]).identifier === identifier) {
30382 return Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touch);
30383 }
30384 }
30385
30386 return null;
30387});
30388
30389
30390/***/ }),
30391
30392/***/ "./node_modules/d3-selection/src/touches.js":
30393/*!**************************************************!*\
30394 !*** ./node_modules/d3-selection/src/touches.js ***!
30395 \**************************************************/
30396/*! exports provided: default */
30397/***/ (function(module, __webpack_exports__, __webpack_require__) {
30398
30399"use strict";
30400__webpack_require__.r(__webpack_exports__);
30401/* harmony import */ var _sourceEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sourceEvent */ "./node_modules/d3-selection/src/sourceEvent.js");
30402/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-selection/src/point.js");
30403
30404
30405
30406/* harmony default export */ __webpack_exports__["default"] = (function(node, touches) {
30407 if (touches == null) touches = Object(_sourceEvent__WEBPACK_IMPORTED_MODULE_0__["default"])().touches;
30408
30409 for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) {
30410 points[i] = Object(_point__WEBPACK_IMPORTED_MODULE_1__["default"])(node, touches[i]);
30411 }
30412
30413 return points;
30414});
30415
30416
30417/***/ }),
30418
30419/***/ "./node_modules/d3-selection/src/window.js":
30420/*!*************************************************!*\
30421 !*** ./node_modules/d3-selection/src/window.js ***!
30422 \*************************************************/
30423/*! exports provided: default */
30424/***/ (function(module, __webpack_exports__, __webpack_require__) {
30425
30426"use strict";
30427__webpack_require__.r(__webpack_exports__);
30428/* harmony default export */ __webpack_exports__["default"] = (function(node) {
30429 return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node
30430 || (node.document && node) // node is a Window
30431 || node.defaultView; // node is a Document
30432});
30433
30434
30435/***/ }),
30436
30437/***/ "./node_modules/d3-shape/src/arc.js":
30438/*!******************************************!*\
30439 !*** ./node_modules/d3-shape/src/arc.js ***!
30440 \******************************************/
30441/*! exports provided: default */
30442/***/ (function(module, __webpack_exports__, __webpack_require__) {
30443
30444"use strict";
30445__webpack_require__.r(__webpack_exports__);
30446/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
30447/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
30448/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js");
30449
30450
30451
30452
30453function arcInnerRadius(d) {
30454 return d.innerRadius;
30455}
30456
30457function arcOuterRadius(d) {
30458 return d.outerRadius;
30459}
30460
30461function arcStartAngle(d) {
30462 return d.startAngle;
30463}
30464
30465function arcEndAngle(d) {
30466 return d.endAngle;
30467}
30468
30469function arcPadAngle(d) {
30470 return d && d.padAngle; // Note: optional!
30471}
30472
30473function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
30474 var x10 = x1 - x0, y10 = y1 - y0,
30475 x32 = x3 - x2, y32 = y3 - y2,
30476 t = y32 * x10 - x32 * y10;
30477 if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return;
30478 t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
30479 return [x0 + t * x10, y0 + t * y10];
30480}
30481
30482// Compute perpendicular offset line of length rc.
30483// http://mathworld.wolfram.com/Circle-LineIntersection.html
30484function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
30485 var x01 = x0 - x1,
30486 y01 = y0 - y1,
30487 lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(x01 * x01 + y01 * y01),
30488 ox = lo * y01,
30489 oy = -lo * x01,
30490 x11 = x0 + ox,
30491 y11 = y0 + oy,
30492 x10 = x1 + ox,
30493 y10 = y1 + oy,
30494 x00 = (x11 + x10) / 2,
30495 y00 = (y11 + y10) / 2,
30496 dx = x10 - x11,
30497 dy = y10 - y11,
30498 d2 = dx * dx + dy * dy,
30499 r = r1 - rc,
30500 D = x11 * y10 - x10 * y11,
30501 d = (dy < 0 ? -1 : 1) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["max"])(0, r * r * d2 - D * D)),
30502 cx0 = (D * dy - dx * d) / d2,
30503 cy0 = (-D * dx - dy * d) / d2,
30504 cx1 = (D * dy + dx * d) / d2,
30505 cy1 = (-D * dx + dy * d) / d2,
30506 dx0 = cx0 - x00,
30507 dy0 = cy0 - y00,
30508 dx1 = cx1 - x00,
30509 dy1 = cy1 - y00;
30510
30511 // Pick the closer of the two intersection points.
30512 // TODO Is there a faster way to determine which intersection to use?
30513 if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
30514
30515 return {
30516 cx: cx0,
30517 cy: cy0,
30518 x01: -ox,
30519 y01: -oy,
30520 x11: cx0 * (r1 / r - 1),
30521 y11: cy0 * (r1 / r - 1)
30522 };
30523}
30524
30525/* harmony default export */ __webpack_exports__["default"] = (function() {
30526 var innerRadius = arcInnerRadius,
30527 outerRadius = arcOuterRadius,
30528 cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0),
30529 padRadius = null,
30530 startAngle = arcStartAngle,
30531 endAngle = arcEndAngle,
30532 padAngle = arcPadAngle,
30533 context = null;
30534
30535 function arc() {
30536 var buffer,
30537 r,
30538 r0 = +innerRadius.apply(this, arguments),
30539 r1 = +outerRadius.apply(this, arguments),
30540 a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"],
30541 a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"],
30542 da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0),
30543 cw = a1 > a0;
30544
30545 if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])();
30546
30547 // Ensure that the outer radius is always larger than the inner radius.
30548 if (r1 < r0) r = r1, r1 = r0, r0 = r;
30549
30550 // Is it a point?
30551 if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0);
30552
30553 // Or is it a circle or annulus?
30554 else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30555 context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0));
30556 context.arc(0, 0, r1, a0, a1, !cw);
30557 if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30558 context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1));
30559 context.arc(0, 0, r0, a1, a0, cw);
30560 }
30561 }
30562
30563 // Or is it a circular or annular sector?
30564 else {
30565 var a01 = a0,
30566 a11 = a1,
30567 a00 = a0,
30568 a10 = a1,
30569 da0 = da,
30570 da1 = da,
30571 ap = padAngle.apply(this, arguments) / 2,
30572 rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)),
30573 rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),
30574 rc0 = rc,
30575 rc1 = rc,
30576 t0,
30577 t1;
30578
30579 // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.
30580 if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30581 var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)),
30582 p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap));
30583 if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;
30584 else da0 = 0, a00 = a10 = (a0 + a1) / 2;
30585 if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;
30586 else da1 = 0, a01 = a11 = (a0 + a1) / 2;
30587 }
30588
30589 var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01),
30590 y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01),
30591 x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10),
30592 y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10);
30593
30594 // Apply rounded corners?
30595 if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30596 var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11),
30597 y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11),
30598 x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00),
30599 y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00),
30600 oc;
30601
30602 // Restrict the corner radius according to the sector angle.
30603 if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {
30604 var ax = x01 - oc[0],
30605 ay = y01 - oc[1],
30606 bx = x11 - oc[0],
30607 by = y11 - oc[1],
30608 kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2),
30609 lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]);
30610 rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1));
30611 rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1));
30612 }
30613 }
30614
30615 // Is the sector collapsed to a line?
30616 if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01);
30617
30618 // Does the sector’s outer ring have rounded corners?
30619 else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30620 t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
30621 t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
30622
30623 context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
30624
30625 // Have the corners merged?
30626 if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw);
30627
30628 // Otherwise, draw the two corners and the ring.
30629 else {
30630 context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw);
30631 context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
30632 context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw);
30633 }
30634 }
30635
30636 // Or is the outer ring just a circular arc?
30637 else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
30638
30639 // Is there no inner ring, and it’s a circular sector?
30640 // Or perhaps it’s an annular sector collapsed due to padding?
30641 if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10);
30642
30643 // Does the sector’s inner ring (or point) have rounded corners?
30644 else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) {
30645 t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
30646 t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
30647
30648 context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
30649
30650 // Have the corners merged?
30651 if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw);
30652
30653 // Otherwise, draw the two corners and the ring.
30654 else {
30655 context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw);
30656 context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw);
30657 context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw);
30658 }
30659 }
30660
30661 // Or is the inner ring just a circular arc?
30662 else context.arc(0, 0, r0, a10, a00, cw);
30663 }
30664
30665 context.closePath();
30666
30667 if (buffer) return context = null, buffer + "" || null;
30668 }
30669
30670 arc.centroid = function() {
30671 var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,
30672 a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2;
30673 return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r];
30674 };
30675
30676 arc.innerRadius = function(_) {
30677 return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius;
30678 };
30679
30680 arc.outerRadius = function(_) {
30681 return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius;
30682 };
30683
30684 arc.cornerRadius = function(_) {
30685 return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius;
30686 };
30687
30688 arc.padRadius = function(_) {
30689 return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius;
30690 };
30691
30692 arc.startAngle = function(_) {
30693 return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle;
30694 };
30695
30696 arc.endAngle = function(_) {
30697 return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle;
30698 };
30699
30700 arc.padAngle = function(_) {
30701 return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle;
30702 };
30703
30704 arc.context = function(_) {
30705 return arguments.length ? ((context = _ == null ? null : _), arc) : context;
30706 };
30707
30708 return arc;
30709});
30710
30711
30712/***/ }),
30713
30714/***/ "./node_modules/d3-shape/src/area.js":
30715/*!*******************************************!*\
30716 !*** ./node_modules/d3-shape/src/area.js ***!
30717 \*******************************************/
30718/*! exports provided: default */
30719/***/ (function(module, __webpack_exports__, __webpack_require__) {
30720
30721"use strict";
30722__webpack_require__.r(__webpack_exports__);
30723/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
30724/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
30725/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js");
30726/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js");
30727/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js");
30728
30729
30730
30731
30732
30733
30734/* harmony default export */ __webpack_exports__["default"] = (function() {
30735 var x0 = _point_js__WEBPACK_IMPORTED_MODULE_4__["x"],
30736 x1 = null,
30737 y0 = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0),
30738 y1 = _point_js__WEBPACK_IMPORTED_MODULE_4__["y"],
30739 defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true),
30740 context = null,
30741 curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"],
30742 output = null;
30743
30744 function area(data) {
30745 var i,
30746 j,
30747 k,
30748 n = data.length,
30749 d,
30750 defined0 = false,
30751 buffer,
30752 x0z = new Array(n),
30753 y0z = new Array(n);
30754
30755 if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])());
30756
30757 for (i = 0; i <= n; ++i) {
30758 if (!(i < n && defined(d = data[i], i, data)) === defined0) {
30759 if (defined0 = !defined0) {
30760 j = i;
30761 output.areaStart();
30762 output.lineStart();
30763 } else {
30764 output.lineEnd();
30765 output.lineStart();
30766 for (k = i - 1; k >= j; --k) {
30767 output.point(x0z[k], y0z[k]);
30768 }
30769 output.lineEnd();
30770 output.areaEnd();
30771 }
30772 }
30773 if (defined0) {
30774 x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);
30775 output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
30776 }
30777 }
30778
30779 if (buffer) return output = null, buffer + "" || null;
30780 }
30781
30782 function arealine() {
30783 return Object(_line_js__WEBPACK_IMPORTED_MODULE_3__["default"])().defined(defined).curve(curve).context(context);
30784 }
30785
30786 area.x = function(_) {
30787 return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), x1 = null, area) : x0;
30788 };
30789
30790 area.x0 = function(_) {
30791 return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x0;
30792 };
30793
30794 area.x1 = function(_) {
30795 return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x1;
30796 };
30797
30798 area.y = function(_) {
30799 return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), y1 = null, area) : y0;
30800 };
30801
30802 area.y0 = function(_) {
30803 return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y0;
30804 };
30805
30806 area.y1 = function(_) {
30807 return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y1;
30808 };
30809
30810 area.lineX0 =
30811 area.lineY0 = function() {
30812 return arealine().x(x0).y(y0);
30813 };
30814
30815 area.lineY1 = function() {
30816 return arealine().x(x0).y(y1);
30817 };
30818
30819 area.lineX1 = function() {
30820 return arealine().x(x1).y(y0);
30821 };
30822
30823 area.defined = function(_) {
30824 return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), area) : defined;
30825 };
30826
30827 area.curve = function(_) {
30828 return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;
30829 };
30830
30831 area.context = function(_) {
30832 return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;
30833 };
30834
30835 return area;
30836});
30837
30838
30839/***/ }),
30840
30841/***/ "./node_modules/d3-shape/src/areaRadial.js":
30842/*!*************************************************!*\
30843 !*** ./node_modules/d3-shape/src/areaRadial.js ***!
30844 \*************************************************/
30845/*! exports provided: default */
30846/***/ (function(module, __webpack_exports__, __webpack_require__) {
30847
30848"use strict";
30849__webpack_require__.r(__webpack_exports__);
30850/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js");
30851/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js");
30852/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js");
30853
30854
30855
30856
30857/* harmony default export */ __webpack_exports__["default"] = (function() {
30858 var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]),
30859 c = a.curve,
30860 x0 = a.lineX0,
30861 x1 = a.lineX1,
30862 y0 = a.lineY0,
30863 y1 = a.lineY1;
30864
30865 a.angle = a.x, delete a.x;
30866 a.startAngle = a.x0, delete a.x0;
30867 a.endAngle = a.x1, delete a.x1;
30868 a.radius = a.y, delete a.y;
30869 a.innerRadius = a.y0, delete a.y0;
30870 a.outerRadius = a.y1, delete a.y1;
30871 a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0;
30872 a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1;
30873 a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0;
30874 a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1;
30875
30876 a.curve = function(_) {
30877 return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve;
30878 };
30879
30880 return a;
30881});
30882
30883
30884/***/ }),
30885
30886/***/ "./node_modules/d3-shape/src/array.js":
30887/*!********************************************!*\
30888 !*** ./node_modules/d3-shape/src/array.js ***!
30889 \********************************************/
30890/*! exports provided: slice */
30891/***/ (function(module, __webpack_exports__, __webpack_require__) {
30892
30893"use strict";
30894__webpack_require__.r(__webpack_exports__);
30895/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; });
30896var slice = Array.prototype.slice;
30897
30898
30899/***/ }),
30900
30901/***/ "./node_modules/d3-shape/src/constant.js":
30902/*!***********************************************!*\
30903 !*** ./node_modules/d3-shape/src/constant.js ***!
30904 \***********************************************/
30905/*! exports provided: default */
30906/***/ (function(module, __webpack_exports__, __webpack_require__) {
30907
30908"use strict";
30909__webpack_require__.r(__webpack_exports__);
30910/* harmony default export */ __webpack_exports__["default"] = (function(x) {
30911 return function constant() {
30912 return x;
30913 };
30914});
30915
30916
30917/***/ }),
30918
30919/***/ "./node_modules/d3-shape/src/curve/basis.js":
30920/*!**************************************************!*\
30921 !*** ./node_modules/d3-shape/src/curve/basis.js ***!
30922 \**************************************************/
30923/*! exports provided: point, Basis, default */
30924/***/ (function(module, __webpack_exports__, __webpack_require__) {
30925
30926"use strict";
30927__webpack_require__.r(__webpack_exports__);
30928/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; });
30929/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; });
30930function point(that, x, y) {
30931 that._context.bezierCurveTo(
30932 (2 * that._x0 + that._x1) / 3,
30933 (2 * that._y0 + that._y1) / 3,
30934 (that._x0 + 2 * that._x1) / 3,
30935 (that._y0 + 2 * that._y1) / 3,
30936 (that._x0 + 4 * that._x1 + x) / 6,
30937 (that._y0 + 4 * that._y1 + y) / 6
30938 );
30939}
30940
30941function Basis(context) {
30942 this._context = context;
30943}
30944
30945Basis.prototype = {
30946 areaStart: function() {
30947 this._line = 0;
30948 },
30949 areaEnd: function() {
30950 this._line = NaN;
30951 },
30952 lineStart: function() {
30953 this._x0 = this._x1 =
30954 this._y0 = this._y1 = NaN;
30955 this._point = 0;
30956 },
30957 lineEnd: function() {
30958 switch (this._point) {
30959 case 3: point(this, this._x1, this._y1); // proceed
30960 case 2: this._context.lineTo(this._x1, this._y1); break;
30961 }
30962 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
30963 this._line = 1 - this._line;
30964 },
30965 point: function(x, y) {
30966 x = +x, y = +y;
30967 switch (this._point) {
30968 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
30969 case 1: this._point = 2; break;
30970 case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
30971 default: point(this, x, y); break;
30972 }
30973 this._x0 = this._x1, this._x1 = x;
30974 this._y0 = this._y1, this._y1 = y;
30975 }
30976};
30977
30978/* harmony default export */ __webpack_exports__["default"] = (function(context) {
30979 return new Basis(context);
30980});
30981
30982
30983/***/ }),
30984
30985/***/ "./node_modules/d3-shape/src/curve/basisClosed.js":
30986/*!********************************************************!*\
30987 !*** ./node_modules/d3-shape/src/curve/basisClosed.js ***!
30988 \********************************************************/
30989/*! exports provided: default */
30990/***/ (function(module, __webpack_exports__, __webpack_require__) {
30991
30992"use strict";
30993__webpack_require__.r(__webpack_exports__);
30994/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js");
30995/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js");
30996
30997
30998
30999function BasisClosed(context) {
31000 this._context = context;
31001}
31002
31003BasisClosed.prototype = {
31004 areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31005 areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31006 lineStart: function() {
31007 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =
31008 this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
31009 this._point = 0;
31010 },
31011 lineEnd: function() {
31012 switch (this._point) {
31013 case 1: {
31014 this._context.moveTo(this._x2, this._y2);
31015 this._context.closePath();
31016 break;
31017 }
31018 case 2: {
31019 this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);
31020 this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);
31021 this._context.closePath();
31022 break;
31023 }
31024 case 3: {
31025 this.point(this._x2, this._y2);
31026 this.point(this._x3, this._y3);
31027 this.point(this._x4, this._y4);
31028 break;
31029 }
31030 }
31031 },
31032 point: function(x, y) {
31033 x = +x, y = +y;
31034 switch (this._point) {
31035 case 0: this._point = 1; this._x2 = x, this._y2 = y; break;
31036 case 1: this._point = 2; this._x3 = x, this._y3 = y; break;
31037 case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;
31038 default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break;
31039 }
31040 this._x0 = this._x1, this._x1 = x;
31041 this._y0 = this._y1, this._y1 = y;
31042 }
31043};
31044
31045/* harmony default export */ __webpack_exports__["default"] = (function(context) {
31046 return new BasisClosed(context);
31047});
31048
31049
31050/***/ }),
31051
31052/***/ "./node_modules/d3-shape/src/curve/basisOpen.js":
31053/*!******************************************************!*\
31054 !*** ./node_modules/d3-shape/src/curve/basisOpen.js ***!
31055 \******************************************************/
31056/*! exports provided: default */
31057/***/ (function(module, __webpack_exports__, __webpack_require__) {
31058
31059"use strict";
31060__webpack_require__.r(__webpack_exports__);
31061/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js");
31062
31063
31064function BasisOpen(context) {
31065 this._context = context;
31066}
31067
31068BasisOpen.prototype = {
31069 areaStart: function() {
31070 this._line = 0;
31071 },
31072 areaEnd: function() {
31073 this._line = NaN;
31074 },
31075 lineStart: function() {
31076 this._x0 = this._x1 =
31077 this._y0 = this._y1 = NaN;
31078 this._point = 0;
31079 },
31080 lineEnd: function() {
31081 if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
31082 this._line = 1 - this._line;
31083 },
31084 point: function(x, y) {
31085 x = +x, y = +y;
31086 switch (this._point) {
31087 case 0: this._point = 1; break;
31088 case 1: this._point = 2; break;
31089 case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;
31090 case 3: this._point = 4; // proceed
31091 default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break;
31092 }
31093 this._x0 = this._x1, this._x1 = x;
31094 this._y0 = this._y1, this._y1 = y;
31095 }
31096};
31097
31098/* harmony default export */ __webpack_exports__["default"] = (function(context) {
31099 return new BasisOpen(context);
31100});
31101
31102
31103/***/ }),
31104
31105/***/ "./node_modules/d3-shape/src/curve/bundle.js":
31106/*!***************************************************!*\
31107 !*** ./node_modules/d3-shape/src/curve/bundle.js ***!
31108 \***************************************************/
31109/*! exports provided: default */
31110/***/ (function(module, __webpack_exports__, __webpack_require__) {
31111
31112"use strict";
31113__webpack_require__.r(__webpack_exports__);
31114/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "./node_modules/d3-shape/src/curve/basis.js");
31115
31116
31117function Bundle(context, beta) {
31118 this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context);
31119 this._beta = beta;
31120}
31121
31122Bundle.prototype = {
31123 lineStart: function() {
31124 this._x = [];
31125 this._y = [];
31126 this._basis.lineStart();
31127 },
31128 lineEnd: function() {
31129 var x = this._x,
31130 y = this._y,
31131 j = x.length - 1;
31132
31133 if (j > 0) {
31134 var x0 = x[0],
31135 y0 = y[0],
31136 dx = x[j] - x0,
31137 dy = y[j] - y0,
31138 i = -1,
31139 t;
31140
31141 while (++i <= j) {
31142 t = i / j;
31143 this._basis.point(
31144 this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),
31145 this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)
31146 );
31147 }
31148 }
31149
31150 this._x = this._y = null;
31151 this._basis.lineEnd();
31152 },
31153 point: function(x, y) {
31154 this._x.push(+x);
31155 this._y.push(+y);
31156 }
31157};
31158
31159/* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) {
31160
31161 function bundle(context) {
31162 return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta);
31163 }
31164
31165 bundle.beta = function(beta) {
31166 return custom(+beta);
31167 };
31168
31169 return bundle;
31170})(0.85));
31171
31172
31173/***/ }),
31174
31175/***/ "./node_modules/d3-shape/src/curve/cardinal.js":
31176/*!*****************************************************!*\
31177 !*** ./node_modules/d3-shape/src/curve/cardinal.js ***!
31178 \*****************************************************/
31179/*! exports provided: point, Cardinal, default */
31180/***/ (function(module, __webpack_exports__, __webpack_require__) {
31181
31182"use strict";
31183__webpack_require__.r(__webpack_exports__);
31184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; });
31185/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; });
31186function point(that, x, y) {
31187 that._context.bezierCurveTo(
31188 that._x1 + that._k * (that._x2 - that._x0),
31189 that._y1 + that._k * (that._y2 - that._y0),
31190 that._x2 + that._k * (that._x1 - x),
31191 that._y2 + that._k * (that._y1 - y),
31192 that._x2,
31193 that._y2
31194 );
31195}
31196
31197function Cardinal(context, tension) {
31198 this._context = context;
31199 this._k = (1 - tension) / 6;
31200}
31201
31202Cardinal.prototype = {
31203 areaStart: function() {
31204 this._line = 0;
31205 },
31206 areaEnd: function() {
31207 this._line = NaN;
31208 },
31209 lineStart: function() {
31210 this._x0 = this._x1 = this._x2 =
31211 this._y0 = this._y1 = this._y2 = NaN;
31212 this._point = 0;
31213 },
31214 lineEnd: function() {
31215 switch (this._point) {
31216 case 2: this._context.lineTo(this._x2, this._y2); break;
31217 case 3: point(this, this._x1, this._y1); break;
31218 }
31219 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
31220 this._line = 1 - this._line;
31221 },
31222 point: function(x, y) {
31223 x = +x, y = +y;
31224 switch (this._point) {
31225 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
31226 case 1: this._point = 2; this._x1 = x, this._y1 = y; break;
31227 case 2: this._point = 3; // proceed
31228 default: point(this, x, y); break;
31229 }
31230 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31231 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31232 }
31233};
31234
31235/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) {
31236
31237 function cardinal(context) {
31238 return new Cardinal(context, tension);
31239 }
31240
31241 cardinal.tension = function(tension) {
31242 return custom(+tension);
31243 };
31244
31245 return cardinal;
31246})(0));
31247
31248
31249/***/ }),
31250
31251/***/ "./node_modules/d3-shape/src/curve/cardinalClosed.js":
31252/*!***********************************************************!*\
31253 !*** ./node_modules/d3-shape/src/curve/cardinalClosed.js ***!
31254 \***********************************************************/
31255/*! exports provided: CardinalClosed, default */
31256/***/ (function(module, __webpack_exports__, __webpack_require__) {
31257
31258"use strict";
31259__webpack_require__.r(__webpack_exports__);
31260/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; });
31261/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js");
31262/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js");
31263
31264
31265
31266function CardinalClosed(context, tension) {
31267 this._context = context;
31268 this._k = (1 - tension) / 6;
31269}
31270
31271CardinalClosed.prototype = {
31272 areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31273 areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31274 lineStart: function() {
31275 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
31276 this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
31277 this._point = 0;
31278 },
31279 lineEnd: function() {
31280 switch (this._point) {
31281 case 1: {
31282 this._context.moveTo(this._x3, this._y3);
31283 this._context.closePath();
31284 break;
31285 }
31286 case 2: {
31287 this._context.lineTo(this._x3, this._y3);
31288 this._context.closePath();
31289 break;
31290 }
31291 case 3: {
31292 this.point(this._x3, this._y3);
31293 this.point(this._x4, this._y4);
31294 this.point(this._x5, this._y5);
31295 break;
31296 }
31297 }
31298 },
31299 point: function(x, y) {
31300 x = +x, y = +y;
31301 switch (this._point) {
31302 case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
31303 case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
31304 case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
31305 default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break;
31306 }
31307 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31308 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31309 }
31310};
31311
31312/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) {
31313
31314 function cardinal(context) {
31315 return new CardinalClosed(context, tension);
31316 }
31317
31318 cardinal.tension = function(tension) {
31319 return custom(+tension);
31320 };
31321
31322 return cardinal;
31323})(0));
31324
31325
31326/***/ }),
31327
31328/***/ "./node_modules/d3-shape/src/curve/cardinalOpen.js":
31329/*!*********************************************************!*\
31330 !*** ./node_modules/d3-shape/src/curve/cardinalOpen.js ***!
31331 \*********************************************************/
31332/*! exports provided: CardinalOpen, default */
31333/***/ (function(module, __webpack_exports__, __webpack_require__) {
31334
31335"use strict";
31336__webpack_require__.r(__webpack_exports__);
31337/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; });
31338/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js");
31339
31340
31341function CardinalOpen(context, tension) {
31342 this._context = context;
31343 this._k = (1 - tension) / 6;
31344}
31345
31346CardinalOpen.prototype = {
31347 areaStart: function() {
31348 this._line = 0;
31349 },
31350 areaEnd: function() {
31351 this._line = NaN;
31352 },
31353 lineStart: function() {
31354 this._x0 = this._x1 = this._x2 =
31355 this._y0 = this._y1 = this._y2 = NaN;
31356 this._point = 0;
31357 },
31358 lineEnd: function() {
31359 if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
31360 this._line = 1 - this._line;
31361 },
31362 point: function(x, y) {
31363 x = +x, y = +y;
31364 switch (this._point) {
31365 case 0: this._point = 1; break;
31366 case 1: this._point = 2; break;
31367 case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
31368 case 3: this._point = 4; // proceed
31369 default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break;
31370 }
31371 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31372 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31373 }
31374};
31375
31376/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) {
31377
31378 function cardinal(context) {
31379 return new CardinalOpen(context, tension);
31380 }
31381
31382 cardinal.tension = function(tension) {
31383 return custom(+tension);
31384 };
31385
31386 return cardinal;
31387})(0));
31388
31389
31390/***/ }),
31391
31392/***/ "./node_modules/d3-shape/src/curve/catmullRom.js":
31393/*!*******************************************************!*\
31394 !*** ./node_modules/d3-shape/src/curve/catmullRom.js ***!
31395 \*******************************************************/
31396/*! exports provided: point, default */
31397/***/ (function(module, __webpack_exports__, __webpack_require__) {
31398
31399"use strict";
31400__webpack_require__.r(__webpack_exports__);
31401/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; });
31402/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js");
31403/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js");
31404
31405
31406
31407function point(that, x, y) {
31408 var x1 = that._x1,
31409 y1 = that._y1,
31410 x2 = that._x2,
31411 y2 = that._y2;
31412
31413 if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) {
31414 var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,
31415 n = 3 * that._l01_a * (that._l01_a + that._l12_a);
31416 x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;
31417 y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;
31418 }
31419
31420 if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) {
31421 var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,
31422 m = 3 * that._l23_a * (that._l23_a + that._l12_a);
31423 x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;
31424 y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;
31425 }
31426
31427 that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);
31428}
31429
31430function CatmullRom(context, alpha) {
31431 this._context = context;
31432 this._alpha = alpha;
31433}
31434
31435CatmullRom.prototype = {
31436 areaStart: function() {
31437 this._line = 0;
31438 },
31439 areaEnd: function() {
31440 this._line = NaN;
31441 },
31442 lineStart: function() {
31443 this._x0 = this._x1 = this._x2 =
31444 this._y0 = this._y1 = this._y2 = NaN;
31445 this._l01_a = this._l12_a = this._l23_a =
31446 this._l01_2a = this._l12_2a = this._l23_2a =
31447 this._point = 0;
31448 },
31449 lineEnd: function() {
31450 switch (this._point) {
31451 case 2: this._context.lineTo(this._x2, this._y2); break;
31452 case 3: this.point(this._x2, this._y2); break;
31453 }
31454 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
31455 this._line = 1 - this._line;
31456 },
31457 point: function(x, y) {
31458 x = +x, y = +y;
31459
31460 if (this._point) {
31461 var x23 = this._x2 - x,
31462 y23 = this._y2 - y;
31463 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31464 }
31465
31466 switch (this._point) {
31467 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
31468 case 1: this._point = 2; break;
31469 case 2: this._point = 3; // proceed
31470 default: point(this, x, y); break;
31471 }
31472
31473 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31474 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31475 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31476 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31477 }
31478};
31479
31480/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) {
31481
31482 function catmullRom(context) {
31483 return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0);
31484 }
31485
31486 catmullRom.alpha = function(alpha) {
31487 return custom(+alpha);
31488 };
31489
31490 return catmullRom;
31491})(0.5));
31492
31493
31494/***/ }),
31495
31496/***/ "./node_modules/d3-shape/src/curve/catmullRomClosed.js":
31497/*!*************************************************************!*\
31498 !*** ./node_modules/d3-shape/src/curve/catmullRomClosed.js ***!
31499 \*************************************************************/
31500/*! exports provided: default */
31501/***/ (function(module, __webpack_exports__, __webpack_require__) {
31502
31503"use strict";
31504__webpack_require__.r(__webpack_exports__);
31505/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js");
31506/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js");
31507/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js");
31508
31509
31510
31511
31512function CatmullRomClosed(context, alpha) {
31513 this._context = context;
31514 this._alpha = alpha;
31515}
31516
31517CatmullRomClosed.prototype = {
31518 areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"],
31519 areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"],
31520 lineStart: function() {
31521 this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
31522 this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
31523 this._l01_a = this._l12_a = this._l23_a =
31524 this._l01_2a = this._l12_2a = this._l23_2a =
31525 this._point = 0;
31526 },
31527 lineEnd: function() {
31528 switch (this._point) {
31529 case 1: {
31530 this._context.moveTo(this._x3, this._y3);
31531 this._context.closePath();
31532 break;
31533 }
31534 case 2: {
31535 this._context.lineTo(this._x3, this._y3);
31536 this._context.closePath();
31537 break;
31538 }
31539 case 3: {
31540 this.point(this._x3, this._y3);
31541 this.point(this._x4, this._y4);
31542 this.point(this._x5, this._y5);
31543 break;
31544 }
31545 }
31546 },
31547 point: function(x, y) {
31548 x = +x, y = +y;
31549
31550 if (this._point) {
31551 var x23 = this._x2 - x,
31552 y23 = this._y2 - y;
31553 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31554 }
31555
31556 switch (this._point) {
31557 case 0: this._point = 1; this._x3 = x, this._y3 = y; break;
31558 case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;
31559 case 2: this._point = 3; this._x5 = x, this._y5 = y; break;
31560 default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break;
31561 }
31562
31563 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31564 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31565 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31566 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31567 }
31568};
31569
31570/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) {
31571
31572 function catmullRom(context) {
31573 return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0);
31574 }
31575
31576 catmullRom.alpha = function(alpha) {
31577 return custom(+alpha);
31578 };
31579
31580 return catmullRom;
31581})(0.5));
31582
31583
31584/***/ }),
31585
31586/***/ "./node_modules/d3-shape/src/curve/catmullRomOpen.js":
31587/*!***********************************************************!*\
31588 !*** ./node_modules/d3-shape/src/curve/catmullRomOpen.js ***!
31589 \***********************************************************/
31590/*! exports provided: default */
31591/***/ (function(module, __webpack_exports__, __webpack_require__) {
31592
31593"use strict";
31594__webpack_require__.r(__webpack_exports__);
31595/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js");
31596/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js");
31597
31598
31599
31600function CatmullRomOpen(context, alpha) {
31601 this._context = context;
31602 this._alpha = alpha;
31603}
31604
31605CatmullRomOpen.prototype = {
31606 areaStart: function() {
31607 this._line = 0;
31608 },
31609 areaEnd: function() {
31610 this._line = NaN;
31611 },
31612 lineStart: function() {
31613 this._x0 = this._x1 = this._x2 =
31614 this._y0 = this._y1 = this._y2 = NaN;
31615 this._l01_a = this._l12_a = this._l23_a =
31616 this._l01_2a = this._l12_2a = this._l23_2a =
31617 this._point = 0;
31618 },
31619 lineEnd: function() {
31620 if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();
31621 this._line = 1 - this._line;
31622 },
31623 point: function(x, y) {
31624 x = +x, y = +y;
31625
31626 if (this._point) {
31627 var x23 = this._x2 - x,
31628 y23 = this._y2 - y;
31629 this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));
31630 }
31631
31632 switch (this._point) {
31633 case 0: this._point = 1; break;
31634 case 1: this._point = 2; break;
31635 case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;
31636 case 3: this._point = 4; // proceed
31637 default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break;
31638 }
31639
31640 this._l01_a = this._l12_a, this._l12_a = this._l23_a;
31641 this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;
31642 this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;
31643 this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;
31644 }
31645};
31646
31647/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) {
31648
31649 function catmullRom(context) {
31650 return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0);
31651 }
31652
31653 catmullRom.alpha = function(alpha) {
31654 return custom(+alpha);
31655 };
31656
31657 return catmullRom;
31658})(0.5));
31659
31660
31661/***/ }),
31662
31663/***/ "./node_modules/d3-shape/src/curve/linear.js":
31664/*!***************************************************!*\
31665 !*** ./node_modules/d3-shape/src/curve/linear.js ***!
31666 \***************************************************/
31667/*! exports provided: default */
31668/***/ (function(module, __webpack_exports__, __webpack_require__) {
31669
31670"use strict";
31671__webpack_require__.r(__webpack_exports__);
31672function Linear(context) {
31673 this._context = context;
31674}
31675
31676Linear.prototype = {
31677 areaStart: function() {
31678 this._line = 0;
31679 },
31680 areaEnd: function() {
31681 this._line = NaN;
31682 },
31683 lineStart: function() {
31684 this._point = 0;
31685 },
31686 lineEnd: function() {
31687 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
31688 this._line = 1 - this._line;
31689 },
31690 point: function(x, y) {
31691 x = +x, y = +y;
31692 switch (this._point) {
31693 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
31694 case 1: this._point = 2; // proceed
31695 default: this._context.lineTo(x, y); break;
31696 }
31697 }
31698};
31699
31700/* harmony default export */ __webpack_exports__["default"] = (function(context) {
31701 return new Linear(context);
31702});
31703
31704
31705/***/ }),
31706
31707/***/ "./node_modules/d3-shape/src/curve/linearClosed.js":
31708/*!*********************************************************!*\
31709 !*** ./node_modules/d3-shape/src/curve/linearClosed.js ***!
31710 \*********************************************************/
31711/*! exports provided: default */
31712/***/ (function(module, __webpack_exports__, __webpack_require__) {
31713
31714"use strict";
31715__webpack_require__.r(__webpack_exports__);
31716/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/d3-shape/src/noop.js");
31717
31718
31719function LinearClosed(context) {
31720 this._context = context;
31721}
31722
31723LinearClosed.prototype = {
31724 areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31725 areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"],
31726 lineStart: function() {
31727 this._point = 0;
31728 },
31729 lineEnd: function() {
31730 if (this._point) this._context.closePath();
31731 },
31732 point: function(x, y) {
31733 x = +x, y = +y;
31734 if (this._point) this._context.lineTo(x, y);
31735 else this._point = 1, this._context.moveTo(x, y);
31736 }
31737};
31738
31739/* harmony default export */ __webpack_exports__["default"] = (function(context) {
31740 return new LinearClosed(context);
31741});
31742
31743
31744/***/ }),
31745
31746/***/ "./node_modules/d3-shape/src/curve/monotone.js":
31747/*!*****************************************************!*\
31748 !*** ./node_modules/d3-shape/src/curve/monotone.js ***!
31749 \*****************************************************/
31750/*! exports provided: monotoneX, monotoneY */
31751/***/ (function(module, __webpack_exports__, __webpack_require__) {
31752
31753"use strict";
31754__webpack_require__.r(__webpack_exports__);
31755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; });
31756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; });
31757function sign(x) {
31758 return x < 0 ? -1 : 1;
31759}
31760
31761// Calculate the slopes of the tangents (Hermite-type interpolation) based on
31762// the following paper: Steffen, M. 1990. A Simple Method for Monotonic
31763// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.
31764// NOV(II), P. 443, 1990.
31765function slope3(that, x2, y2) {
31766 var h0 = that._x1 - that._x0,
31767 h1 = x2 - that._x1,
31768 s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),
31769 s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),
31770 p = (s0 * h1 + s1 * h0) / (h0 + h1);
31771 return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;
31772}
31773
31774// Calculate a one-sided slope.
31775function slope2(that, t) {
31776 var h = that._x1 - that._x0;
31777 return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;
31778}
31779
31780// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations
31781// "you can express cubic Hermite interpolation in terms of cubic Bézier curves
31782// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1".
31783function point(that, t0, t1) {
31784 var x0 = that._x0,
31785 y0 = that._y0,
31786 x1 = that._x1,
31787 y1 = that._y1,
31788 dx = (x1 - x0) / 3;
31789 that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);
31790}
31791
31792function MonotoneX(context) {
31793 this._context = context;
31794}
31795
31796MonotoneX.prototype = {
31797 areaStart: function() {
31798 this._line = 0;
31799 },
31800 areaEnd: function() {
31801 this._line = NaN;
31802 },
31803 lineStart: function() {
31804 this._x0 = this._x1 =
31805 this._y0 = this._y1 =
31806 this._t0 = NaN;
31807 this._point = 0;
31808 },
31809 lineEnd: function() {
31810 switch (this._point) {
31811 case 2: this._context.lineTo(this._x1, this._y1); break;
31812 case 3: point(this, this._t0, slope2(this, this._t0)); break;
31813 }
31814 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
31815 this._line = 1 - this._line;
31816 },
31817 point: function(x, y) {
31818 var t1 = NaN;
31819
31820 x = +x, y = +y;
31821 if (x === this._x1 && y === this._y1) return; // Ignore coincident points.
31822 switch (this._point) {
31823 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
31824 case 1: this._point = 2; break;
31825 case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;
31826 default: point(this, this._t0, t1 = slope3(this, x, y)); break;
31827 }
31828
31829 this._x0 = this._x1, this._x1 = x;
31830 this._y0 = this._y1, this._y1 = y;
31831 this._t0 = t1;
31832 }
31833}
31834
31835function MonotoneY(context) {
31836 this._context = new ReflectContext(context);
31837}
31838
31839(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {
31840 MonotoneX.prototype.point.call(this, y, x);
31841};
31842
31843function ReflectContext(context) {
31844 this._context = context;
31845}
31846
31847ReflectContext.prototype = {
31848 moveTo: function(x, y) { this._context.moveTo(y, x); },
31849 closePath: function() { this._context.closePath(); },
31850 lineTo: function(x, y) { this._context.lineTo(y, x); },
31851 bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }
31852};
31853
31854function monotoneX(context) {
31855 return new MonotoneX(context);
31856}
31857
31858function monotoneY(context) {
31859 return new MonotoneY(context);
31860}
31861
31862
31863/***/ }),
31864
31865/***/ "./node_modules/d3-shape/src/curve/natural.js":
31866/*!****************************************************!*\
31867 !*** ./node_modules/d3-shape/src/curve/natural.js ***!
31868 \****************************************************/
31869/*! exports provided: default */
31870/***/ (function(module, __webpack_exports__, __webpack_require__) {
31871
31872"use strict";
31873__webpack_require__.r(__webpack_exports__);
31874function Natural(context) {
31875 this._context = context;
31876}
31877
31878Natural.prototype = {
31879 areaStart: function() {
31880 this._line = 0;
31881 },
31882 areaEnd: function() {
31883 this._line = NaN;
31884 },
31885 lineStart: function() {
31886 this._x = [];
31887 this._y = [];
31888 },
31889 lineEnd: function() {
31890 var x = this._x,
31891 y = this._y,
31892 n = x.length;
31893
31894 if (n) {
31895 this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);
31896 if (n === 2) {
31897 this._context.lineTo(x[1], y[1]);
31898 } else {
31899 var px = controlPoints(x),
31900 py = controlPoints(y);
31901 for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {
31902 this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);
31903 }
31904 }
31905 }
31906
31907 if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();
31908 this._line = 1 - this._line;
31909 this._x = this._y = null;
31910 },
31911 point: function(x, y) {
31912 this._x.push(+x);
31913 this._y.push(+y);
31914 }
31915};
31916
31917// See https://www.particleincell.com/2012/bezier-splines/ for derivation.
31918function controlPoints(x) {
31919 var i,
31920 n = x.length - 1,
31921 m,
31922 a = new Array(n),
31923 b = new Array(n),
31924 r = new Array(n);
31925 a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
31926 for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
31927 a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
31928 for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
31929 a[n - 1] = r[n - 1] / b[n - 1];
31930 for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
31931 b[n - 1] = (x[n] + a[n - 1]) / 2;
31932 for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
31933 return [a, b];
31934}
31935
31936/* harmony default export */ __webpack_exports__["default"] = (function(context) {
31937 return new Natural(context);
31938});
31939
31940
31941/***/ }),
31942
31943/***/ "./node_modules/d3-shape/src/curve/radial.js":
31944/*!***************************************************!*\
31945 !*** ./node_modules/d3-shape/src/curve/radial.js ***!
31946 \***************************************************/
31947/*! exports provided: curveRadialLinear, default */
31948/***/ (function(module, __webpack_exports__, __webpack_require__) {
31949
31950"use strict";
31951__webpack_require__.r(__webpack_exports__);
31952/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; });
31953/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; });
31954/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "./node_modules/d3-shape/src/curve/linear.js");
31955
31956
31957var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
31958
31959function Radial(curve) {
31960 this._curve = curve;
31961}
31962
31963Radial.prototype = {
31964 areaStart: function() {
31965 this._curve.areaStart();
31966 },
31967 areaEnd: function() {
31968 this._curve.areaEnd();
31969 },
31970 lineStart: function() {
31971 this._curve.lineStart();
31972 },
31973 lineEnd: function() {
31974 this._curve.lineEnd();
31975 },
31976 point: function(a, r) {
31977 this._curve.point(r * Math.sin(a), r * -Math.cos(a));
31978 }
31979};
31980
31981function curveRadial(curve) {
31982
31983 function radial(context) {
31984 return new Radial(curve(context));
31985 }
31986
31987 radial._curve = curve;
31988
31989 return radial;
31990}
31991
31992
31993/***/ }),
31994
31995/***/ "./node_modules/d3-shape/src/curve/step.js":
31996/*!*************************************************!*\
31997 !*** ./node_modules/d3-shape/src/curve/step.js ***!
31998 \*************************************************/
31999/*! exports provided: default, stepBefore, stepAfter */
32000/***/ (function(module, __webpack_exports__, __webpack_require__) {
32001
32002"use strict";
32003__webpack_require__.r(__webpack_exports__);
32004/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; });
32005/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; });
32006function Step(context, t) {
32007 this._context = context;
32008 this._t = t;
32009}
32010
32011Step.prototype = {
32012 areaStart: function() {
32013 this._line = 0;
32014 },
32015 areaEnd: function() {
32016 this._line = NaN;
32017 },
32018 lineStart: function() {
32019 this._x = this._y = NaN;
32020 this._point = 0;
32021 },
32022 lineEnd: function() {
32023 if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
32024 if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
32025 if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
32026 },
32027 point: function(x, y) {
32028 x = +x, y = +y;
32029 switch (this._point) {
32030 case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
32031 case 1: this._point = 2; // proceed
32032 default: {
32033 if (this._t <= 0) {
32034 this._context.lineTo(this._x, y);
32035 this._context.lineTo(x, y);
32036 } else {
32037 var x1 = this._x * (1 - this._t) + x * this._t;
32038 this._context.lineTo(x1, this._y);
32039 this._context.lineTo(x1, y);
32040 }
32041 break;
32042 }
32043 }
32044 this._x = x, this._y = y;
32045 }
32046};
32047
32048/* harmony default export */ __webpack_exports__["default"] = (function(context) {
32049 return new Step(context, 0.5);
32050});
32051
32052function stepBefore(context) {
32053 return new Step(context, 0);
32054}
32055
32056function stepAfter(context) {
32057 return new Step(context, 1);
32058}
32059
32060
32061/***/ }),
32062
32063/***/ "./node_modules/d3-shape/src/descending.js":
32064/*!*************************************************!*\
32065 !*** ./node_modules/d3-shape/src/descending.js ***!
32066 \*************************************************/
32067/*! exports provided: default */
32068/***/ (function(module, __webpack_exports__, __webpack_require__) {
32069
32070"use strict";
32071__webpack_require__.r(__webpack_exports__);
32072/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
32073 return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
32074});
32075
32076
32077/***/ }),
32078
32079/***/ "./node_modules/d3-shape/src/identity.js":
32080/*!***********************************************!*\
32081 !*** ./node_modules/d3-shape/src/identity.js ***!
32082 \***********************************************/
32083/*! exports provided: default */
32084/***/ (function(module, __webpack_exports__, __webpack_require__) {
32085
32086"use strict";
32087__webpack_require__.r(__webpack_exports__);
32088/* harmony default export */ __webpack_exports__["default"] = (function(d) {
32089 return d;
32090});
32091
32092
32093/***/ }),
32094
32095/***/ "./node_modules/d3-shape/src/index.js":
32096/*!********************************************!*\
32097 !*** ./node_modules/d3-shape/src/index.js ***!
32098 \********************************************/
32099/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */
32100/***/ (function(module, __webpack_exports__, __webpack_require__) {
32101
32102"use strict";
32103__webpack_require__.r(__webpack_exports__);
32104/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "./node_modules/d3-shape/src/arc.js");
32105/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
32106
32107/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "./node_modules/d3-shape/src/area.js");
32108/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
32109
32110/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js");
32111/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
32112
32113/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "./node_modules/d3-shape/src/pie.js");
32114/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
32115
32116/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "./node_modules/d3-shape/src/areaRadial.js");
32117/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
32118
32119/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
32120
32121/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "./node_modules/d3-shape/src/lineRadial.js");
32122/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
32123
32124/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
32125
32126/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js");
32127/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; });
32128
32129/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "./node_modules/d3-shape/src/link/index.js");
32130/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; });
32131
32132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; });
32133
32134/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; });
32135
32136/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "./node_modules/d3-shape/src/symbol.js");
32137/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
32138
32139/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; });
32140
32141/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js");
32142/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
32143
32144/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js");
32145/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
32146
32147/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js");
32148/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
32149
32150/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js");
32151/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; });
32152
32153/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js");
32154/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
32155
32156/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js");
32157/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
32158
32159/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js");
32160/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; });
32161
32162/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "./node_modules/d3-shape/src/curve/basisClosed.js");
32163/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; });
32164
32165/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "./node_modules/d3-shape/src/curve/basisOpen.js");
32166/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; });
32167
32168/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "./node_modules/d3-shape/src/curve/basis.js");
32169/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; });
32170
32171/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bundle.js */ "./node_modules/d3-shape/src/curve/bundle.js");
32172/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__["default"]; });
32173
32174/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "./node_modules/d3-shape/src/curve/cardinalClosed.js");
32175/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__["default"]; });
32176
32177/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "./node_modules/d3-shape/src/curve/cardinalOpen.js");
32178/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__["default"]; });
32179
32180/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinal.js */ "./node_modules/d3-shape/src/curve/cardinal.js");
32181/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__["default"]; });
32182
32183/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "./node_modules/d3-shape/src/curve/catmullRomClosed.js");
32184/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__["default"]; });
32185
32186/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "./node_modules/d3-shape/src/curve/catmullRomOpen.js");
32187/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__["default"]; });
32188
32189/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRom.js */ "./node_modules/d3-shape/src/curve/catmullRom.js");
32190/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__["default"]; });
32191
32192/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/linearClosed.js */ "./node_modules/d3-shape/src/curve/linearClosed.js");
32193/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__["default"]; });
32194
32195/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js");
32196/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__["default"]; });
32197
32198/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/monotone.js */ "./node_modules/d3-shape/src/curve/monotone.js");
32199/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneX"]; });
32200
32201/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneY"]; });
32202
32203/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/natural.js */ "./node_modules/d3-shape/src/curve/natural.js");
32204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__["default"]; });
32205
32206/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/step.js */ "./node_modules/d3-shape/src/curve/step.js");
32207/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["default"]; });
32208
32209/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepAfter"]; });
32210
32211/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepBefore"]; });
32212
32213/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stack.js */ "./node_modules/d3-shape/src/stack.js");
32214/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_31__["default"]; });
32215
32216/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./offset/expand.js */ "./node_modules/d3-shape/src/offset/expand.js");
32217/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__["default"]; });
32218
32219/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/diverging.js */ "./node_modules/d3-shape/src/offset/diverging.js");
32220/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__["default"]; });
32221
32222/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js");
32223/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_34__["default"]; });
32224
32225/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/silhouette.js */ "./node_modules/d3-shape/src/offset/silhouette.js");
32226/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__["default"]; });
32227
32228/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/wiggle.js */ "./node_modules/d3-shape/src/offset/wiggle.js");
32229/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__["default"]; });
32230
32231/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./order/appearance.js */ "./node_modules/d3-shape/src/order/appearance.js");
32232/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__["default"]; });
32233
32234/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/ascending.js */ "./node_modules/d3-shape/src/order/ascending.js");
32235/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__["default"]; });
32236
32237/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/descending.js */ "./node_modules/d3-shape/src/order/descending.js");
32238/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; });
32239
32240/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/insideOut.js */ "./node_modules/d3-shape/src/order/insideOut.js");
32241/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__["default"]; });
32242
32243/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js");
32244/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_41__["default"]; });
32245
32246/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/reverse.js */ "./node_modules/d3-shape/src/order/reverse.js");
32247/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__["default"]; });
32248
32249
32250
32251
32252
32253 // Note: radialArea is deprecated!
32254 // Note: radialLine is deprecated!
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297/***/ }),
32298
32299/***/ "./node_modules/d3-shape/src/line.js":
32300/*!*******************************************!*\
32301 !*** ./node_modules/d3-shape/src/line.js ***!
32302 \*******************************************/
32303/*! exports provided: default */
32304/***/ (function(module, __webpack_exports__, __webpack_require__) {
32305
32306"use strict";
32307__webpack_require__.r(__webpack_exports__);
32308/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
32309/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
32310/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "./node_modules/d3-shape/src/curve/linear.js");
32311/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point.js */ "./node_modules/d3-shape/src/point.js");
32312
32313
32314
32315
32316
32317/* harmony default export */ __webpack_exports__["default"] = (function() {
32318 var x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"],
32319 y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"],
32320 defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true),
32321 context = null,
32322 curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"],
32323 output = null;
32324
32325 function line(data) {
32326 var i,
32327 n = data.length,
32328 d,
32329 defined0 = false,
32330 buffer;
32331
32332 if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])());
32333
32334 for (i = 0; i <= n; ++i) {
32335 if (!(i < n && defined(d = data[i], i, data)) === defined0) {
32336 if (defined0 = !defined0) output.lineStart();
32337 else output.lineEnd();
32338 }
32339 if (defined0) output.point(+x(d, i, data), +y(d, i, data));
32340 }
32341
32342 if (buffer) return output = null, buffer + "" || null;
32343 }
32344
32345 line.x = function(_) {
32346 return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : x;
32347 };
32348
32349 line.y = function(_) {
32350 return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : y;
32351 };
32352
32353 line.defined = function(_) {
32354 return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), line) : defined;
32355 };
32356
32357 line.curve = function(_) {
32358 return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
32359 };
32360
32361 line.context = function(_) {
32362 return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
32363 };
32364
32365 return line;
32366});
32367
32368
32369/***/ }),
32370
32371/***/ "./node_modules/d3-shape/src/lineRadial.js":
32372/*!*************************************************!*\
32373 !*** ./node_modules/d3-shape/src/lineRadial.js ***!
32374 \*************************************************/
32375/*! exports provided: lineRadial, default */
32376/***/ (function(module, __webpack_exports__, __webpack_require__) {
32377
32378"use strict";
32379__webpack_require__.r(__webpack_exports__);
32380/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; });
32381/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "./node_modules/d3-shape/src/curve/radial.js");
32382/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "./node_modules/d3-shape/src/line.js");
32383
32384
32385
32386function lineRadial(l) {
32387 var c = l.curve;
32388
32389 l.angle = l.x, delete l.x;
32390 l.radius = l.y, delete l.y;
32391
32392 l.curve = function(_) {
32393 return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve;
32394 };
32395
32396 return l;
32397}
32398
32399/* harmony default export */ __webpack_exports__["default"] = (function() {
32400 return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]));
32401});
32402
32403
32404/***/ }),
32405
32406/***/ "./node_modules/d3-shape/src/link/index.js":
32407/*!*************************************************!*\
32408 !*** ./node_modules/d3-shape/src/link/index.js ***!
32409 \*************************************************/
32410/*! exports provided: linkHorizontal, linkVertical, linkRadial */
32411/***/ (function(module, __webpack_exports__, __webpack_require__) {
32412
32413"use strict";
32414__webpack_require__.r(__webpack_exports__);
32415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; });
32416/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; });
32417/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; });
32418/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
32419/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "./node_modules/d3-shape/src/array.js");
32420/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "./node_modules/d3-shape/src/constant.js");
32421/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "./node_modules/d3-shape/src/point.js");
32422/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "./node_modules/d3-shape/src/pointRadial.js");
32423
32424
32425
32426
32427
32428
32429function linkSource(d) {
32430 return d.source;
32431}
32432
32433function linkTarget(d) {
32434 return d.target;
32435}
32436
32437function link(curve) {
32438 var source = linkSource,
32439 target = linkTarget,
32440 x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"],
32441 y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"],
32442 context = null;
32443
32444 function link() {
32445 var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);
32446 if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])();
32447 curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));
32448 if (buffer) return context = null, buffer + "" || null;
32449 }
32450
32451 link.source = function(_) {
32452 return arguments.length ? (source = _, link) : source;
32453 };
32454
32455 link.target = function(_) {
32456 return arguments.length ? (target = _, link) : target;
32457 };
32458
32459 link.x = function(_) {
32460 return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x;
32461 };
32462
32463 link.y = function(_) {
32464 return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y;
32465 };
32466
32467 link.context = function(_) {
32468 return arguments.length ? ((context = _ == null ? null : _), link) : context;
32469 };
32470
32471 return link;
32472}
32473
32474function curveHorizontal(context, x0, y0, x1, y1) {
32475 context.moveTo(x0, y0);
32476 context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);
32477}
32478
32479function curveVertical(context, x0, y0, x1, y1) {
32480 context.moveTo(x0, y0);
32481 context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);
32482}
32483
32484function curveRadial(context, x0, y0, x1, y1) {
32485 var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0),
32486 p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2),
32487 p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0),
32488 p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1);
32489 context.moveTo(p0[0], p0[1]);
32490 context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);
32491}
32492
32493function linkHorizontal() {
32494 return link(curveHorizontal);
32495}
32496
32497function linkVertical() {
32498 return link(curveVertical);
32499}
32500
32501function linkRadial() {
32502 var l = link(curveRadial);
32503 l.angle = l.x, delete l.x;
32504 l.radius = l.y, delete l.y;
32505 return l;
32506}
32507
32508
32509/***/ }),
32510
32511/***/ "./node_modules/d3-shape/src/math.js":
32512/*!*******************************************!*\
32513 !*** ./node_modules/d3-shape/src/math.js ***!
32514 \*******************************************/
32515/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */
32516/***/ (function(module, __webpack_exports__, __webpack_require__) {
32517
32518"use strict";
32519__webpack_require__.r(__webpack_exports__);
32520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; });
32521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; });
32522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; });
32523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; });
32524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; });
32525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; });
32526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; });
32527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; });
32528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; });
32529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; });
32530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; });
32531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; });
32532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; });
32533var abs = Math.abs;
32534var atan2 = Math.atan2;
32535var cos = Math.cos;
32536var max = Math.max;
32537var min = Math.min;
32538var sin = Math.sin;
32539var sqrt = Math.sqrt;
32540
32541var epsilon = 1e-12;
32542var pi = Math.PI;
32543var halfPi = pi / 2;
32544var tau = 2 * pi;
32545
32546function acos(x) {
32547 return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);
32548}
32549
32550function asin(x) {
32551 return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);
32552}
32553
32554
32555/***/ }),
32556
32557/***/ "./node_modules/d3-shape/src/noop.js":
32558/*!*******************************************!*\
32559 !*** ./node_modules/d3-shape/src/noop.js ***!
32560 \*******************************************/
32561/*! exports provided: default */
32562/***/ (function(module, __webpack_exports__, __webpack_require__) {
32563
32564"use strict";
32565__webpack_require__.r(__webpack_exports__);
32566/* harmony default export */ __webpack_exports__["default"] = (function() {});
32567
32568
32569/***/ }),
32570
32571/***/ "./node_modules/d3-shape/src/offset/diverging.js":
32572/*!*******************************************************!*\
32573 !*** ./node_modules/d3-shape/src/offset/diverging.js ***!
32574 \*******************************************************/
32575/*! exports provided: default */
32576/***/ (function(module, __webpack_exports__, __webpack_require__) {
32577
32578"use strict";
32579__webpack_require__.r(__webpack_exports__);
32580/* harmony default export */ __webpack_exports__["default"] = (function(series, order) {
32581 if (!((n = series.length) > 0)) return;
32582 for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {
32583 for (yp = yn = 0, i = 0; i < n; ++i) {
32584 if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {
32585 d[0] = yp, d[1] = yp += dy;
32586 } else if (dy < 0) {
32587 d[1] = yn, d[0] = yn += dy;
32588 } else {
32589 d[0] = 0, d[1] = dy;
32590 }
32591 }
32592 }
32593});
32594
32595
32596/***/ }),
32597
32598/***/ "./node_modules/d3-shape/src/offset/expand.js":
32599/*!****************************************************!*\
32600 !*** ./node_modules/d3-shape/src/offset/expand.js ***!
32601 \****************************************************/
32602/*! exports provided: default */
32603/***/ (function(module, __webpack_exports__, __webpack_require__) {
32604
32605"use strict";
32606__webpack_require__.r(__webpack_exports__);
32607/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js");
32608
32609
32610/* harmony default export */ __webpack_exports__["default"] = (function(series, order) {
32611 if (!((n = series.length) > 0)) return;
32612 for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {
32613 for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;
32614 if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;
32615 }
32616 Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order);
32617});
32618
32619
32620/***/ }),
32621
32622/***/ "./node_modules/d3-shape/src/offset/none.js":
32623/*!**************************************************!*\
32624 !*** ./node_modules/d3-shape/src/offset/none.js ***!
32625 \**************************************************/
32626/*! exports provided: default */
32627/***/ (function(module, __webpack_exports__, __webpack_require__) {
32628
32629"use strict";
32630__webpack_require__.r(__webpack_exports__);
32631/* harmony default export */ __webpack_exports__["default"] = (function(series, order) {
32632 if (!((n = series.length) > 1)) return;
32633 for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {
32634 s0 = s1, s1 = series[order[i]];
32635 for (j = 0; j < m; ++j) {
32636 s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];
32637 }
32638 }
32639});
32640
32641
32642/***/ }),
32643
32644/***/ "./node_modules/d3-shape/src/offset/silhouette.js":
32645/*!********************************************************!*\
32646 !*** ./node_modules/d3-shape/src/offset/silhouette.js ***!
32647 \********************************************************/
32648/*! exports provided: default */
32649/***/ (function(module, __webpack_exports__, __webpack_require__) {
32650
32651"use strict";
32652__webpack_require__.r(__webpack_exports__);
32653/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js");
32654
32655
32656/* harmony default export */ __webpack_exports__["default"] = (function(series, order) {
32657 if (!((n = series.length) > 0)) return;
32658 for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {
32659 for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;
32660 s0[j][1] += s0[j][0] = -y / 2;
32661 }
32662 Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order);
32663});
32664
32665
32666/***/ }),
32667
32668/***/ "./node_modules/d3-shape/src/offset/wiggle.js":
32669/*!****************************************************!*\
32670 !*** ./node_modules/d3-shape/src/offset/wiggle.js ***!
32671 \****************************************************/
32672/*! exports provided: default */
32673/***/ (function(module, __webpack_exports__, __webpack_require__) {
32674
32675"use strict";
32676__webpack_require__.r(__webpack_exports__);
32677/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/offset/none.js");
32678
32679
32680/* harmony default export */ __webpack_exports__["default"] = (function(series, order) {
32681 if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;
32682 for (var y = 0, j = 1, s0, m, n; j < m; ++j) {
32683 for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {
32684 var si = series[order[i]],
32685 sij0 = si[j][1] || 0,
32686 sij1 = si[j - 1][1] || 0,
32687 s3 = (sij0 - sij1) / 2;
32688 for (var k = 0; k < i; ++k) {
32689 var sk = series[order[k]],
32690 skj0 = sk[j][1] || 0,
32691 skj1 = sk[j - 1][1] || 0;
32692 s3 += skj0 - skj1;
32693 }
32694 s1 += sij0, s2 += s3 * sij0;
32695 }
32696 s0[j - 1][1] += s0[j - 1][0] = y;
32697 if (s1) y -= s2 / s1;
32698 }
32699 s0[j - 1][1] += s0[j - 1][0] = y;
32700 Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order);
32701});
32702
32703
32704/***/ }),
32705
32706/***/ "./node_modules/d3-shape/src/order/appearance.js":
32707/*!*******************************************************!*\
32708 !*** ./node_modules/d3-shape/src/order/appearance.js ***!
32709 \*******************************************************/
32710/*! exports provided: default */
32711/***/ (function(module, __webpack_exports__, __webpack_require__) {
32712
32713"use strict";
32714__webpack_require__.r(__webpack_exports__);
32715/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js");
32716
32717
32718/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32719 var peaks = series.map(peak);
32720 return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; });
32721});
32722
32723function peak(series) {
32724 var i = -1, j = 0, n = series.length, vi, vj = -Infinity;
32725 while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;
32726 return j;
32727}
32728
32729
32730/***/ }),
32731
32732/***/ "./node_modules/d3-shape/src/order/ascending.js":
32733/*!******************************************************!*\
32734 !*** ./node_modules/d3-shape/src/order/ascending.js ***!
32735 \******************************************************/
32736/*! exports provided: default, sum */
32737/***/ (function(module, __webpack_exports__, __webpack_require__) {
32738
32739"use strict";
32740__webpack_require__.r(__webpack_exports__);
32741/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; });
32742/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js");
32743
32744
32745/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32746 var sums = series.map(sum);
32747 return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; });
32748});
32749
32750function sum(series) {
32751 var s = 0, i = -1, n = series.length, v;
32752 while (++i < n) if (v = +series[i][1]) s += v;
32753 return s;
32754}
32755
32756
32757/***/ }),
32758
32759/***/ "./node_modules/d3-shape/src/order/descending.js":
32760/*!*******************************************************!*\
32761 !*** ./node_modules/d3-shape/src/order/descending.js ***!
32762 \*******************************************************/
32763/*! exports provided: default */
32764/***/ (function(module, __webpack_exports__, __webpack_require__) {
32765
32766"use strict";
32767__webpack_require__.r(__webpack_exports__);
32768/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js");
32769
32770
32771/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32772 return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse();
32773});
32774
32775
32776/***/ }),
32777
32778/***/ "./node_modules/d3-shape/src/order/insideOut.js":
32779/*!******************************************************!*\
32780 !*** ./node_modules/d3-shape/src/order/insideOut.js ***!
32781 \******************************************************/
32782/*! exports provided: default */
32783/***/ (function(module, __webpack_exports__, __webpack_require__) {
32784
32785"use strict";
32786__webpack_require__.r(__webpack_exports__);
32787/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "./node_modules/d3-shape/src/order/appearance.js");
32788/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "./node_modules/d3-shape/src/order/ascending.js");
32789
32790
32791
32792/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32793 var n = series.length,
32794 i,
32795 j,
32796 sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]),
32797 order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series),
32798 top = 0,
32799 bottom = 0,
32800 tops = [],
32801 bottoms = [];
32802
32803 for (i = 0; i < n; ++i) {
32804 j = order[i];
32805 if (top < bottom) {
32806 top += sums[j];
32807 tops.push(j);
32808 } else {
32809 bottom += sums[j];
32810 bottoms.push(j);
32811 }
32812 }
32813
32814 return bottoms.reverse().concat(tops);
32815});
32816
32817
32818/***/ }),
32819
32820/***/ "./node_modules/d3-shape/src/order/none.js":
32821/*!*************************************************!*\
32822 !*** ./node_modules/d3-shape/src/order/none.js ***!
32823 \*************************************************/
32824/*! exports provided: default */
32825/***/ (function(module, __webpack_exports__, __webpack_require__) {
32826
32827"use strict";
32828__webpack_require__.r(__webpack_exports__);
32829/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32830 var n = series.length, o = new Array(n);
32831 while (--n >= 0) o[n] = n;
32832 return o;
32833});
32834
32835
32836/***/ }),
32837
32838/***/ "./node_modules/d3-shape/src/order/reverse.js":
32839/*!****************************************************!*\
32840 !*** ./node_modules/d3-shape/src/order/reverse.js ***!
32841 \****************************************************/
32842/*! exports provided: default */
32843/***/ (function(module, __webpack_exports__, __webpack_require__) {
32844
32845"use strict";
32846__webpack_require__.r(__webpack_exports__);
32847/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "./node_modules/d3-shape/src/order/none.js");
32848
32849
32850/* harmony default export */ __webpack_exports__["default"] = (function(series) {
32851 return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse();
32852});
32853
32854
32855/***/ }),
32856
32857/***/ "./node_modules/d3-shape/src/pie.js":
32858/*!******************************************!*\
32859 !*** ./node_modules/d3-shape/src/pie.js ***!
32860 \******************************************/
32861/*! exports provided: default */
32862/***/ (function(module, __webpack_exports__, __webpack_require__) {
32863
32864"use strict";
32865__webpack_require__.r(__webpack_exports__);
32866/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
32867/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending.js */ "./node_modules/d3-shape/src/descending.js");
32868/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ "./node_modules/d3-shape/src/identity.js");
32869/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "./node_modules/d3-shape/src/math.js");
32870
32871
32872
32873
32874
32875/* harmony default export */ __webpack_exports__["default"] = (function() {
32876 var value = _identity_js__WEBPACK_IMPORTED_MODULE_2__["default"],
32877 sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_1__["default"],
32878 sort = null,
32879 startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0),
32880 endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"]),
32881 padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0);
32882
32883 function pie(data) {
32884 var i,
32885 n = data.length,
32886 j,
32887 k,
32888 sum = 0,
32889 index = new Array(n),
32890 arcs = new Array(n),
32891 a0 = +startAngle.apply(this, arguments),
32892 da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], endAngle.apply(this, arguments) - a0)),
32893 a1,
32894 p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),
32895 pa = p * (da < 0 ? -1 : 1),
32896 v;
32897
32898 for (i = 0; i < n; ++i) {
32899 if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {
32900 sum += v;
32901 }
32902 }
32903
32904 // Optionally sort the arcs by previously-computed values or by data.
32905 if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });
32906 else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });
32907
32908 // Compute the arcs! They are stored in the original data's order.
32909 for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
32910 j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
32911 data: data[j],
32912 index: i,
32913 value: v,
32914 startAngle: a0,
32915 endAngle: a1,
32916 padAngle: p
32917 };
32918 }
32919
32920 return arcs;
32921 }
32922
32923 pie.value = function(_) {
32924 return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : value;
32925 };
32926
32927 pie.sortValues = function(_) {
32928 return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;
32929 };
32930
32931 pie.sort = function(_) {
32932 return arguments.length ? (sort = _, sortValues = null, pie) : sort;
32933 };
32934
32935 pie.startAngle = function(_) {
32936 return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : startAngle;
32937 };
32938
32939 pie.endAngle = function(_) {
32940 return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : endAngle;
32941 };
32942
32943 pie.padAngle = function(_) {
32944 return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : padAngle;
32945 };
32946
32947 return pie;
32948});
32949
32950
32951/***/ }),
32952
32953/***/ "./node_modules/d3-shape/src/point.js":
32954/*!********************************************!*\
32955 !*** ./node_modules/d3-shape/src/point.js ***!
32956 \********************************************/
32957/*! exports provided: x, y */
32958/***/ (function(module, __webpack_exports__, __webpack_require__) {
32959
32960"use strict";
32961__webpack_require__.r(__webpack_exports__);
32962/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; });
32963/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; });
32964function x(p) {
32965 return p[0];
32966}
32967
32968function y(p) {
32969 return p[1];
32970}
32971
32972
32973/***/ }),
32974
32975/***/ "./node_modules/d3-shape/src/pointRadial.js":
32976/*!**************************************************!*\
32977 !*** ./node_modules/d3-shape/src/pointRadial.js ***!
32978 \**************************************************/
32979/*! exports provided: default */
32980/***/ (function(module, __webpack_exports__, __webpack_require__) {
32981
32982"use strict";
32983__webpack_require__.r(__webpack_exports__);
32984/* harmony default export */ __webpack_exports__["default"] = (function(x, y) {
32985 return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];
32986});
32987
32988
32989/***/ }),
32990
32991/***/ "./node_modules/d3-shape/src/stack.js":
32992/*!********************************************!*\
32993 !*** ./node_modules/d3-shape/src/stack.js ***!
32994 \********************************************/
32995/*! exports provided: default */
32996/***/ (function(module, __webpack_exports__, __webpack_require__) {
32997
32998"use strict";
32999__webpack_require__.r(__webpack_exports__);
33000/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "./node_modules/d3-shape/src/array.js");
33001/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
33002/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "./node_modules/d3-shape/src/offset/none.js");
33003/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "./node_modules/d3-shape/src/order/none.js");
33004
33005
33006
33007
33008
33009function stackValue(d, key) {
33010 return d[key];
33011}
33012
33013/* harmony default export */ __webpack_exports__["default"] = (function() {
33014 var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]),
33015 order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"],
33016 offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"],
33017 value = stackValue;
33018
33019 function stack(data) {
33020 var kz = keys.apply(this, arguments),
33021 i,
33022 m = data.length,
33023 n = kz.length,
33024 sz = new Array(n),
33025 oz;
33026
33027 for (i = 0; i < n; ++i) {
33028 for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {
33029 si[j] = sij = [0, +value(data[j], ki, j, data)];
33030 sij.data = data[j];
33031 }
33032 si.key = ki;
33033 }
33034
33035 for (i = 0, oz = order(sz); i < n; ++i) {
33036 sz[oz[i]].index = i;
33037 }
33038
33039 offset(sz, oz);
33040 return sz;
33041 }
33042
33043 stack.keys = function(_) {
33044 return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : keys;
33045 };
33046
33047 stack.value = function(_) {
33048 return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value;
33049 };
33050
33051 stack.order = function(_) {
33052 return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : order;
33053 };
33054
33055 stack.offset = function(_) {
33056 return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset;
33057 };
33058
33059 return stack;
33060});
33061
33062
33063/***/ }),
33064
33065/***/ "./node_modules/d3-shape/src/symbol.js":
33066/*!*********************************************!*\
33067 !*** ./node_modules/d3-shape/src/symbol.js ***!
33068 \*********************************************/
33069/*! exports provided: symbols, default */
33070/***/ (function(module, __webpack_exports__, __webpack_require__) {
33071
33072"use strict";
33073__webpack_require__.r(__webpack_exports__);
33074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; });
33075/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
33076/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "./node_modules/d3-shape/src/symbol/circle.js");
33077/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "./node_modules/d3-shape/src/symbol/cross.js");
33078/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "./node_modules/d3-shape/src/symbol/diamond.js");
33079/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "./node_modules/d3-shape/src/symbol/star.js");
33080/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "./node_modules/d3-shape/src/symbol/square.js");
33081/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "./node_modules/d3-shape/src/symbol/triangle.js");
33082/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "./node_modules/d3-shape/src/symbol/wye.js");
33083/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-shape/src/constant.js");
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094var symbols = [
33095 _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"],
33096 _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"],
33097 _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"],
33098 _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"],
33099 _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"],
33100 _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"],
33101 _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"]
33102];
33103
33104/* harmony default export */ __webpack_exports__["default"] = (function() {
33105 var type = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
33106 size = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(64),
33107 context = null;
33108
33109 function symbol() {
33110 var buffer;
33111 if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])();
33112 type.apply(this, arguments).draw(context, +size.apply(this, arguments));
33113 if (buffer) return context = null, buffer + "" || null;
33114 }
33115
33116 symbol.type = function(_) {
33117 return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type;
33118 };
33119
33120 symbol.size = function(_) {
33121 return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size;
33122 };
33123
33124 symbol.context = function(_) {
33125 return arguments.length ? (context = _ == null ? null : _, symbol) : context;
33126 };
33127
33128 return symbol;
33129});
33130
33131
33132/***/ }),
33133
33134/***/ "./node_modules/d3-shape/src/symbol/circle.js":
33135/*!****************************************************!*\
33136 !*** ./node_modules/d3-shape/src/symbol/circle.js ***!
33137 \****************************************************/
33138/*! exports provided: default */
33139/***/ (function(module, __webpack_exports__, __webpack_require__) {
33140
33141"use strict";
33142__webpack_require__.r(__webpack_exports__);
33143/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js");
33144
33145
33146/* harmony default export */ __webpack_exports__["default"] = ({
33147 draw: function(context, size) {
33148 var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]);
33149 context.moveTo(r, 0);
33150 context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]);
33151 }
33152});
33153
33154
33155/***/ }),
33156
33157/***/ "./node_modules/d3-shape/src/symbol/cross.js":
33158/*!***************************************************!*\
33159 !*** ./node_modules/d3-shape/src/symbol/cross.js ***!
33160 \***************************************************/
33161/*! exports provided: default */
33162/***/ (function(module, __webpack_exports__, __webpack_require__) {
33163
33164"use strict";
33165__webpack_require__.r(__webpack_exports__);
33166/* harmony default export */ __webpack_exports__["default"] = ({
33167 draw: function(context, size) {
33168 var r = Math.sqrt(size / 5) / 2;
33169 context.moveTo(-3 * r, -r);
33170 context.lineTo(-r, -r);
33171 context.lineTo(-r, -3 * r);
33172 context.lineTo(r, -3 * r);
33173 context.lineTo(r, -r);
33174 context.lineTo(3 * r, -r);
33175 context.lineTo(3 * r, r);
33176 context.lineTo(r, r);
33177 context.lineTo(r, 3 * r);
33178 context.lineTo(-r, 3 * r);
33179 context.lineTo(-r, r);
33180 context.lineTo(-3 * r, r);
33181 context.closePath();
33182 }
33183});
33184
33185
33186/***/ }),
33187
33188/***/ "./node_modules/d3-shape/src/symbol/diamond.js":
33189/*!*****************************************************!*\
33190 !*** ./node_modules/d3-shape/src/symbol/diamond.js ***!
33191 \*****************************************************/
33192/*! exports provided: default */
33193/***/ (function(module, __webpack_exports__, __webpack_require__) {
33194
33195"use strict";
33196__webpack_require__.r(__webpack_exports__);
33197var tan30 = Math.sqrt(1 / 3),
33198 tan30_2 = tan30 * 2;
33199
33200/* harmony default export */ __webpack_exports__["default"] = ({
33201 draw: function(context, size) {
33202 var y = Math.sqrt(size / tan30_2),
33203 x = y * tan30;
33204 context.moveTo(0, -y);
33205 context.lineTo(x, 0);
33206 context.lineTo(0, y);
33207 context.lineTo(-x, 0);
33208 context.closePath();
33209 }
33210});
33211
33212
33213/***/ }),
33214
33215/***/ "./node_modules/d3-shape/src/symbol/square.js":
33216/*!****************************************************!*\
33217 !*** ./node_modules/d3-shape/src/symbol/square.js ***!
33218 \****************************************************/
33219/*! exports provided: default */
33220/***/ (function(module, __webpack_exports__, __webpack_require__) {
33221
33222"use strict";
33223__webpack_require__.r(__webpack_exports__);
33224/* harmony default export */ __webpack_exports__["default"] = ({
33225 draw: function(context, size) {
33226 var w = Math.sqrt(size),
33227 x = -w / 2;
33228 context.rect(x, x, w, w);
33229 }
33230});
33231
33232
33233/***/ }),
33234
33235/***/ "./node_modules/d3-shape/src/symbol/star.js":
33236/*!**************************************************!*\
33237 !*** ./node_modules/d3-shape/src/symbol/star.js ***!
33238 \**************************************************/
33239/*! exports provided: default */
33240/***/ (function(module, __webpack_exports__, __webpack_require__) {
33241
33242"use strict";
33243__webpack_require__.r(__webpack_exports__);
33244/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "./node_modules/d3-shape/src/math.js");
33245
33246
33247var ka = 0.89081309152928522810,
33248 kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10),
33249 kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr,
33250 ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr;
33251
33252/* harmony default export */ __webpack_exports__["default"] = ({
33253 draw: function(context, size) {
33254 var r = Math.sqrt(size * ka),
33255 x = kx * r,
33256 y = ky * r;
33257 context.moveTo(0, -r);
33258 context.lineTo(x, y);
33259 for (var i = 1; i < 5; ++i) {
33260 var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5,
33261 c = Math.cos(a),
33262 s = Math.sin(a);
33263 context.lineTo(s * r, -c * r);
33264 context.lineTo(c * x - s * y, s * x + c * y);
33265 }
33266 context.closePath();
33267 }
33268});
33269
33270
33271/***/ }),
33272
33273/***/ "./node_modules/d3-shape/src/symbol/triangle.js":
33274/*!******************************************************!*\
33275 !*** ./node_modules/d3-shape/src/symbol/triangle.js ***!
33276 \******************************************************/
33277/*! exports provided: default */
33278/***/ (function(module, __webpack_exports__, __webpack_require__) {
33279
33280"use strict";
33281__webpack_require__.r(__webpack_exports__);
33282var sqrt3 = Math.sqrt(3);
33283
33284/* harmony default export */ __webpack_exports__["default"] = ({
33285 draw: function(context, size) {
33286 var y = -Math.sqrt(size / (sqrt3 * 3));
33287 context.moveTo(0, y * 2);
33288 context.lineTo(-sqrt3 * y, -y);
33289 context.lineTo(sqrt3 * y, -y);
33290 context.closePath();
33291 }
33292});
33293
33294
33295/***/ }),
33296
33297/***/ "./node_modules/d3-shape/src/symbol/wye.js":
33298/*!*************************************************!*\
33299 !*** ./node_modules/d3-shape/src/symbol/wye.js ***!
33300 \*************************************************/
33301/*! exports provided: default */
33302/***/ (function(module, __webpack_exports__, __webpack_require__) {
33303
33304"use strict";
33305__webpack_require__.r(__webpack_exports__);
33306var c = -0.5,
33307 s = Math.sqrt(3) / 2,
33308 k = 1 / Math.sqrt(12),
33309 a = (k / 2 + 1) * 3;
33310
33311/* harmony default export */ __webpack_exports__["default"] = ({
33312 draw: function(context, size) {
33313 var r = Math.sqrt(size / a),
33314 x0 = r / 2,
33315 y0 = r * k,
33316 x1 = x0,
33317 y1 = r * k + r,
33318 x2 = -x1,
33319 y2 = y1;
33320 context.moveTo(x0, y0);
33321 context.lineTo(x1, y1);
33322 context.lineTo(x2, y2);
33323 context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
33324 context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
33325 context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
33326 context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
33327 context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
33328 context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
33329 context.closePath();
33330 }
33331});
33332
33333
33334/***/ }),
33335
33336/***/ "./node_modules/d3-time-format/src/defaultLocale.js":
33337/*!**********************************************************!*\
33338 !*** ./node_modules/d3-time-format/src/defaultLocale.js ***!
33339 \**********************************************************/
33340/*! exports provided: timeFormat, timeParse, utcFormat, utcParse, default */
33341/***/ (function(module, __webpack_exports__, __webpack_require__) {
33342
33343"use strict";
33344__webpack_require__.r(__webpack_exports__);
33345/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; });
33346/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; });
33347/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; });
33348/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; });
33349/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return defaultLocale; });
33350/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js");
33351
33352
33353var locale;
33354var timeFormat;
33355var timeParse;
33356var utcFormat;
33357var utcParse;
33358
33359defaultLocale({
33360 dateTime: "%x, %X",
33361 date: "%-m/%-d/%Y",
33362 time: "%-I:%M:%S %p",
33363 periods: ["AM", "PM"],
33364 days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
33365 shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
33366 months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
33367 shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
33368});
33369
33370function defaultLocale(definition) {
33371 locale = Object(_locale_js__WEBPACK_IMPORTED_MODULE_0__["default"])(definition);
33372 timeFormat = locale.format;
33373 timeParse = locale.parse;
33374 utcFormat = locale.utcFormat;
33375 utcParse = locale.utcParse;
33376 return locale;
33377}
33378
33379
33380/***/ }),
33381
33382/***/ "./node_modules/d3-time-format/src/index.js":
33383/*!**************************************************!*\
33384 !*** ./node_modules/d3-time-format/src/index.js ***!
33385 \**************************************************/
33386/*! exports provided: timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse */
33387/***/ (function(module, __webpack_exports__, __webpack_require__) {
33388
33389"use strict";
33390__webpack_require__.r(__webpack_exports__);
33391/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js");
33392/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
33393
33394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeFormat"]; });
33395
33396/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["timeParse"]; });
33397
33398/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"]; });
33399
33400/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcParse"]; });
33401
33402/* harmony import */ var _locale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./locale.js */ "./node_modules/d3-time-format/src/locale.js");
33403/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return _locale_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
33404
33405/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js");
33406/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return _isoFormat_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
33407
33408/* harmony import */ var _isoParse_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./isoParse.js */ "./node_modules/d3-time-format/src/isoParse.js");
33409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return _isoParse_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
33410
33411
33412
33413
33414
33415
33416
33417/***/ }),
33418
33419/***/ "./node_modules/d3-time-format/src/isoFormat.js":
33420/*!******************************************************!*\
33421 !*** ./node_modules/d3-time-format/src/isoFormat.js ***!
33422 \******************************************************/
33423/*! exports provided: isoSpecifier, default */
33424/***/ (function(module, __webpack_exports__, __webpack_require__) {
33425
33426"use strict";
33427__webpack_require__.r(__webpack_exports__);
33428/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isoSpecifier", function() { return isoSpecifier; });
33429/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js");
33430
33431
33432var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ";
33433
33434function formatIsoNative(date) {
33435 return date.toISOString();
33436}
33437
33438var formatIso = Date.prototype.toISOString
33439 ? formatIsoNative
33440 : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_0__["utcFormat"])(isoSpecifier);
33441
33442/* harmony default export */ __webpack_exports__["default"] = (formatIso);
33443
33444
33445/***/ }),
33446
33447/***/ "./node_modules/d3-time-format/src/isoParse.js":
33448/*!*****************************************************!*\
33449 !*** ./node_modules/d3-time-format/src/isoParse.js ***!
33450 \*****************************************************/
33451/*! exports provided: default */
33452/***/ (function(module, __webpack_exports__, __webpack_require__) {
33453
33454"use strict";
33455__webpack_require__.r(__webpack_exports__);
33456/* harmony import */ var _isoFormat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isoFormat.js */ "./node_modules/d3-time-format/src/isoFormat.js");
33457/* harmony import */ var _defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultLocale.js */ "./node_modules/d3-time-format/src/defaultLocale.js");
33458
33459
33460
33461function parseIsoNative(string) {
33462 var date = new Date(string);
33463 return isNaN(date) ? null : date;
33464}
33465
33466var parseIso = +new Date("2000-01-01T00:00:00.000Z")
33467 ? parseIsoNative
33468 : Object(_defaultLocale_js__WEBPACK_IMPORTED_MODULE_1__["utcParse"])(_isoFormat_js__WEBPACK_IMPORTED_MODULE_0__["isoSpecifier"]);
33469
33470/* harmony default export */ __webpack_exports__["default"] = (parseIso);
33471
33472
33473/***/ }),
33474
33475/***/ "./node_modules/d3-time-format/src/locale.js":
33476/*!***************************************************!*\
33477 !*** ./node_modules/d3-time-format/src/locale.js ***!
33478 \***************************************************/
33479/*! exports provided: default */
33480/***/ (function(module, __webpack_exports__, __webpack_require__) {
33481
33482"use strict";
33483__webpack_require__.r(__webpack_exports__);
33484/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatLocale; });
33485/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js");
33486
33487
33488function localDate(d) {
33489 if (0 <= d.y && d.y < 100) {
33490 var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
33491 date.setFullYear(d.y);
33492 return date;
33493 }
33494 return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
33495}
33496
33497function utcDate(d) {
33498 if (0 <= d.y && d.y < 100) {
33499 var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
33500 date.setUTCFullYear(d.y);
33501 return date;
33502 }
33503 return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
33504}
33505
33506function newDate(y, m, d) {
33507 return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0};
33508}
33509
33510function formatLocale(locale) {
33511 var locale_dateTime = locale.dateTime,
33512 locale_date = locale.date,
33513 locale_time = locale.time,
33514 locale_periods = locale.periods,
33515 locale_weekdays = locale.days,
33516 locale_shortWeekdays = locale.shortDays,
33517 locale_months = locale.months,
33518 locale_shortMonths = locale.shortMonths;
33519
33520 var periodRe = formatRe(locale_periods),
33521 periodLookup = formatLookup(locale_periods),
33522 weekdayRe = formatRe(locale_weekdays),
33523 weekdayLookup = formatLookup(locale_weekdays),
33524 shortWeekdayRe = formatRe(locale_shortWeekdays),
33525 shortWeekdayLookup = formatLookup(locale_shortWeekdays),
33526 monthRe = formatRe(locale_months),
33527 monthLookup = formatLookup(locale_months),
33528 shortMonthRe = formatRe(locale_shortMonths),
33529 shortMonthLookup = formatLookup(locale_shortMonths);
33530
33531 var formats = {
33532 "a": formatShortWeekday,
33533 "A": formatWeekday,
33534 "b": formatShortMonth,
33535 "B": formatMonth,
33536 "c": null,
33537 "d": formatDayOfMonth,
33538 "e": formatDayOfMonth,
33539 "f": formatMicroseconds,
33540 "H": formatHour24,
33541 "I": formatHour12,
33542 "j": formatDayOfYear,
33543 "L": formatMilliseconds,
33544 "m": formatMonthNumber,
33545 "M": formatMinutes,
33546 "p": formatPeriod,
33547 "q": formatQuarter,
33548 "Q": formatUnixTimestamp,
33549 "s": formatUnixTimestampSeconds,
33550 "S": formatSeconds,
33551 "u": formatWeekdayNumberMonday,
33552 "U": formatWeekNumberSunday,
33553 "V": formatWeekNumberISO,
33554 "w": formatWeekdayNumberSunday,
33555 "W": formatWeekNumberMonday,
33556 "x": null,
33557 "X": null,
33558 "y": formatYear,
33559 "Y": formatFullYear,
33560 "Z": formatZone,
33561 "%": formatLiteralPercent
33562 };
33563
33564 var utcFormats = {
33565 "a": formatUTCShortWeekday,
33566 "A": formatUTCWeekday,
33567 "b": formatUTCShortMonth,
33568 "B": formatUTCMonth,
33569 "c": null,
33570 "d": formatUTCDayOfMonth,
33571 "e": formatUTCDayOfMonth,
33572 "f": formatUTCMicroseconds,
33573 "H": formatUTCHour24,
33574 "I": formatUTCHour12,
33575 "j": formatUTCDayOfYear,
33576 "L": formatUTCMilliseconds,
33577 "m": formatUTCMonthNumber,
33578 "M": formatUTCMinutes,
33579 "p": formatUTCPeriod,
33580 "q": formatUTCQuarter,
33581 "Q": formatUnixTimestamp,
33582 "s": formatUnixTimestampSeconds,
33583 "S": formatUTCSeconds,
33584 "u": formatUTCWeekdayNumberMonday,
33585 "U": formatUTCWeekNumberSunday,
33586 "V": formatUTCWeekNumberISO,
33587 "w": formatUTCWeekdayNumberSunday,
33588 "W": formatUTCWeekNumberMonday,
33589 "x": null,
33590 "X": null,
33591 "y": formatUTCYear,
33592 "Y": formatUTCFullYear,
33593 "Z": formatUTCZone,
33594 "%": formatLiteralPercent
33595 };
33596
33597 var parses = {
33598 "a": parseShortWeekday,
33599 "A": parseWeekday,
33600 "b": parseShortMonth,
33601 "B": parseMonth,
33602 "c": parseLocaleDateTime,
33603 "d": parseDayOfMonth,
33604 "e": parseDayOfMonth,
33605 "f": parseMicroseconds,
33606 "H": parseHour24,
33607 "I": parseHour24,
33608 "j": parseDayOfYear,
33609 "L": parseMilliseconds,
33610 "m": parseMonthNumber,
33611 "M": parseMinutes,
33612 "p": parsePeriod,
33613 "q": parseQuarter,
33614 "Q": parseUnixTimestamp,
33615 "s": parseUnixTimestampSeconds,
33616 "S": parseSeconds,
33617 "u": parseWeekdayNumberMonday,
33618 "U": parseWeekNumberSunday,
33619 "V": parseWeekNumberISO,
33620 "w": parseWeekdayNumberSunday,
33621 "W": parseWeekNumberMonday,
33622 "x": parseLocaleDate,
33623 "X": parseLocaleTime,
33624 "y": parseYear,
33625 "Y": parseFullYear,
33626 "Z": parseZone,
33627 "%": parseLiteralPercent
33628 };
33629
33630 // These recursive directive definitions must be deferred.
33631 formats.x = newFormat(locale_date, formats);
33632 formats.X = newFormat(locale_time, formats);
33633 formats.c = newFormat(locale_dateTime, formats);
33634 utcFormats.x = newFormat(locale_date, utcFormats);
33635 utcFormats.X = newFormat(locale_time, utcFormats);
33636 utcFormats.c = newFormat(locale_dateTime, utcFormats);
33637
33638 function newFormat(specifier, formats) {
33639 return function(date) {
33640 var string = [],
33641 i = -1,
33642 j = 0,
33643 n = specifier.length,
33644 c,
33645 pad,
33646 format;
33647
33648 if (!(date instanceof Date)) date = new Date(+date);
33649
33650 while (++i < n) {
33651 if (specifier.charCodeAt(i) === 37) {
33652 string.push(specifier.slice(j, i));
33653 if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
33654 else pad = c === "e" ? " " : "0";
33655 if (format = formats[c]) c = format(date, pad);
33656 string.push(c);
33657 j = i + 1;
33658 }
33659 }
33660
33661 string.push(specifier.slice(j, i));
33662 return string.join("");
33663 };
33664 }
33665
33666 function newParse(specifier, Z) {
33667 return function(string) {
33668 var d = newDate(1900, undefined, 1),
33669 i = parseSpecifier(d, specifier, string += "", 0),
33670 week, day;
33671 if (i != string.length) return null;
33672
33673 // If a UNIX timestamp is specified, return it.
33674 if ("Q" in d) return new Date(d.Q);
33675 if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0));
33676
33677 // If this is utcParse, never use the local timezone.
33678 if (Z && !("Z" in d)) d.Z = 0;
33679
33680 // The am-pm flag is 0 for AM, and 1 for PM.
33681 if ("p" in d) d.H = d.H % 12 + d.p * 12;
33682
33683 // If the month was not specified, inherit from the quarter.
33684 if (d.m === undefined) d.m = "q" in d ? d.q : 0;
33685
33686 // Convert day-of-week and week-of-year to day-of-year.
33687 if ("V" in d) {
33688 if (d.V < 1 || d.V > 53) return null;
33689 if (!("w" in d)) d.w = 1;
33690 if ("Z" in d) {
33691 week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
33692 week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"])(week);
33693 week = d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].offset(week, (d.V - 1) * 7);
33694 d.y = week.getUTCFullYear();
33695 d.m = week.getUTCMonth();
33696 d.d = week.getUTCDate() + (d.w + 6) % 7;
33697 } else {
33698 week = localDate(newDate(d.y, 0, 1)), day = week.getDay();
33699 week = day > 4 || day === 0 ? d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].ceil(week) : Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"])(week);
33700 week = d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].offset(week, (d.V - 1) * 7);
33701 d.y = week.getFullYear();
33702 d.m = week.getMonth();
33703 d.d = week.getDate() + (d.w + 6) % 7;
33704 }
33705 } else if ("W" in d || "U" in d) {
33706 if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
33707 day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
33708 d.m = 0;
33709 d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
33710 }
33711
33712 // If a time zone is specified, all fields are interpreted as UTC and then
33713 // offset according to the specified time zone.
33714 if ("Z" in d) {
33715 d.H += d.Z / 100 | 0;
33716 d.M += d.Z % 100;
33717 return utcDate(d);
33718 }
33719
33720 // Otherwise, all fields are in local time.
33721 return localDate(d);
33722 };
33723 }
33724
33725 function parseSpecifier(d, specifier, string, j) {
33726 var i = 0,
33727 n = specifier.length,
33728 m = string.length,
33729 c,
33730 parse;
33731
33732 while (i < n) {
33733 if (j >= m) return -1;
33734 c = specifier.charCodeAt(i++);
33735 if (c === 37) {
33736 c = specifier.charAt(i++);
33737 parse = parses[c in pads ? specifier.charAt(i++) : c];
33738 if (!parse || ((j = parse(d, string, j)) < 0)) return -1;
33739 } else if (c != string.charCodeAt(j++)) {
33740 return -1;
33741 }
33742 }
33743
33744 return j;
33745 }
33746
33747 function parsePeriod(d, string, i) {
33748 var n = periodRe.exec(string.slice(i));
33749 return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
33750 }
33751
33752 function parseShortWeekday(d, string, i) {
33753 var n = shortWeekdayRe.exec(string.slice(i));
33754 return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
33755 }
33756
33757 function parseWeekday(d, string, i) {
33758 var n = weekdayRe.exec(string.slice(i));
33759 return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
33760 }
33761
33762 function parseShortMonth(d, string, i) {
33763 var n = shortMonthRe.exec(string.slice(i));
33764 return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
33765 }
33766
33767 function parseMonth(d, string, i) {
33768 var n = monthRe.exec(string.slice(i));
33769 return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
33770 }
33771
33772 function parseLocaleDateTime(d, string, i) {
33773 return parseSpecifier(d, locale_dateTime, string, i);
33774 }
33775
33776 function parseLocaleDate(d, string, i) {
33777 return parseSpecifier(d, locale_date, string, i);
33778 }
33779
33780 function parseLocaleTime(d, string, i) {
33781 return parseSpecifier(d, locale_time, string, i);
33782 }
33783
33784 function formatShortWeekday(d) {
33785 return locale_shortWeekdays[d.getDay()];
33786 }
33787
33788 function formatWeekday(d) {
33789 return locale_weekdays[d.getDay()];
33790 }
33791
33792 function formatShortMonth(d) {
33793 return locale_shortMonths[d.getMonth()];
33794 }
33795
33796 function formatMonth(d) {
33797 return locale_months[d.getMonth()];
33798 }
33799
33800 function formatPeriod(d) {
33801 return locale_periods[+(d.getHours() >= 12)];
33802 }
33803
33804 function formatQuarter(d) {
33805 return 1 + ~~(d.getMonth() / 3);
33806 }
33807
33808 function formatUTCShortWeekday(d) {
33809 return locale_shortWeekdays[d.getUTCDay()];
33810 }
33811
33812 function formatUTCWeekday(d) {
33813 return locale_weekdays[d.getUTCDay()];
33814 }
33815
33816 function formatUTCShortMonth(d) {
33817 return locale_shortMonths[d.getUTCMonth()];
33818 }
33819
33820 function formatUTCMonth(d) {
33821 return locale_months[d.getUTCMonth()];
33822 }
33823
33824 function formatUTCPeriod(d) {
33825 return locale_periods[+(d.getUTCHours() >= 12)];
33826 }
33827
33828 function formatUTCQuarter(d) {
33829 return 1 + ~~(d.getUTCMonth() / 3);
33830 }
33831
33832 return {
33833 format: function(specifier) {
33834 var f = newFormat(specifier += "", formats);
33835 f.toString = function() { return specifier; };
33836 return f;
33837 },
33838 parse: function(specifier) {
33839 var p = newParse(specifier += "", false);
33840 p.toString = function() { return specifier; };
33841 return p;
33842 },
33843 utcFormat: function(specifier) {
33844 var f = newFormat(specifier += "", utcFormats);
33845 f.toString = function() { return specifier; };
33846 return f;
33847 },
33848 utcParse: function(specifier) {
33849 var p = newParse(specifier += "", true);
33850 p.toString = function() { return specifier; };
33851 return p;
33852 }
33853 };
33854}
33855
33856var pads = {"-": "", "_": " ", "0": "0"},
33857 numberRe = /^\s*\d+/, // note: ignores next directive
33858 percentRe = /^%/,
33859 requoteRe = /[\\^$*+?|[\]().{}]/g;
33860
33861function pad(value, fill, width) {
33862 var sign = value < 0 ? "-" : "",
33863 string = (sign ? -value : value) + "",
33864 length = string.length;
33865 return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
33866}
33867
33868function requote(s) {
33869 return s.replace(requoteRe, "\\$&");
33870}
33871
33872function formatRe(names) {
33873 return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
33874}
33875
33876function formatLookup(names) {
33877 var map = {}, i = -1, n = names.length;
33878 while (++i < n) map[names[i].toLowerCase()] = i;
33879 return map;
33880}
33881
33882function parseWeekdayNumberSunday(d, string, i) {
33883 var n = numberRe.exec(string.slice(i, i + 1));
33884 return n ? (d.w = +n[0], i + n[0].length) : -1;
33885}
33886
33887function parseWeekdayNumberMonday(d, string, i) {
33888 var n = numberRe.exec(string.slice(i, i + 1));
33889 return n ? (d.u = +n[0], i + n[0].length) : -1;
33890}
33891
33892function parseWeekNumberSunday(d, string, i) {
33893 var n = numberRe.exec(string.slice(i, i + 2));
33894 return n ? (d.U = +n[0], i + n[0].length) : -1;
33895}
33896
33897function parseWeekNumberISO(d, string, i) {
33898 var n = numberRe.exec(string.slice(i, i + 2));
33899 return n ? (d.V = +n[0], i + n[0].length) : -1;
33900}
33901
33902function parseWeekNumberMonday(d, string, i) {
33903 var n = numberRe.exec(string.slice(i, i + 2));
33904 return n ? (d.W = +n[0], i + n[0].length) : -1;
33905}
33906
33907function parseFullYear(d, string, i) {
33908 var n = numberRe.exec(string.slice(i, i + 4));
33909 return n ? (d.y = +n[0], i + n[0].length) : -1;
33910}
33911
33912function parseYear(d, string, i) {
33913 var n = numberRe.exec(string.slice(i, i + 2));
33914 return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;
33915}
33916
33917function parseZone(d, string, i) {
33918 var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
33919 return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
33920}
33921
33922function parseQuarter(d, string, i) {
33923 var n = numberRe.exec(string.slice(i, i + 1));
33924 return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
33925}
33926
33927function parseMonthNumber(d, string, i) {
33928 var n = numberRe.exec(string.slice(i, i + 2));
33929 return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
33930}
33931
33932function parseDayOfMonth(d, string, i) {
33933 var n = numberRe.exec(string.slice(i, i + 2));
33934 return n ? (d.d = +n[0], i + n[0].length) : -1;
33935}
33936
33937function parseDayOfYear(d, string, i) {
33938 var n = numberRe.exec(string.slice(i, i + 3));
33939 return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
33940}
33941
33942function parseHour24(d, string, i) {
33943 var n = numberRe.exec(string.slice(i, i + 2));
33944 return n ? (d.H = +n[0], i + n[0].length) : -1;
33945}
33946
33947function parseMinutes(d, string, i) {
33948 var n = numberRe.exec(string.slice(i, i + 2));
33949 return n ? (d.M = +n[0], i + n[0].length) : -1;
33950}
33951
33952function parseSeconds(d, string, i) {
33953 var n = numberRe.exec(string.slice(i, i + 2));
33954 return n ? (d.S = +n[0], i + n[0].length) : -1;
33955}
33956
33957function parseMilliseconds(d, string, i) {
33958 var n = numberRe.exec(string.slice(i, i + 3));
33959 return n ? (d.L = +n[0], i + n[0].length) : -1;
33960}
33961
33962function parseMicroseconds(d, string, i) {
33963 var n = numberRe.exec(string.slice(i, i + 6));
33964 return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;
33965}
33966
33967function parseLiteralPercent(d, string, i) {
33968 var n = percentRe.exec(string.slice(i, i + 1));
33969 return n ? i + n[0].length : -1;
33970}
33971
33972function parseUnixTimestamp(d, string, i) {
33973 var n = numberRe.exec(string.slice(i));
33974 return n ? (d.Q = +n[0], i + n[0].length) : -1;
33975}
33976
33977function parseUnixTimestampSeconds(d, string, i) {
33978 var n = numberRe.exec(string.slice(i));
33979 return n ? (d.s = +n[0], i + n[0].length) : -1;
33980}
33981
33982function formatDayOfMonth(d, p) {
33983 return pad(d.getDate(), p, 2);
33984}
33985
33986function formatHour24(d, p) {
33987 return pad(d.getHours(), p, 2);
33988}
33989
33990function formatHour12(d, p) {
33991 return pad(d.getHours() % 12 || 12, p, 2);
33992}
33993
33994function formatDayOfYear(d, p) {
33995 return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["timeDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d), p, 3);
33996}
33997
33998function formatMilliseconds(d, p) {
33999 return pad(d.getMilliseconds(), p, 3);
34000}
34001
34002function formatMicroseconds(d, p) {
34003 return formatMilliseconds(d, p) + "000";
34004}
34005
34006function formatMonthNumber(d, p) {
34007 return pad(d.getMonth() + 1, p, 2);
34008}
34009
34010function formatMinutes(d, p) {
34011 return pad(d.getMinutes(), p, 2);
34012}
34013
34014function formatSeconds(d, p) {
34015 return pad(d.getSeconds(), p, 2);
34016}
34017
34018function formatWeekdayNumberMonday(d) {
34019 var day = d.getDay();
34020 return day === 0 ? 7 : day;
34021}
34022
34023function formatWeekNumberSunday(d, p) {
34024 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2);
34025}
34026
34027function formatWeekNumberISO(d, p) {
34028 var day = d.getDay();
34029 d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].ceil(d);
34030 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d).getDay() === 4), p, 2);
34031}
34032
34033function formatWeekdayNumberSunday(d) {
34034 return d.getDay();
34035}
34036
34037function formatWeekNumberMonday(d, p) {
34038 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["timeYear"])(d) - 1, d), p, 2);
34039}
34040
34041function formatYear(d, p) {
34042 return pad(d.getFullYear() % 100, p, 2);
34043}
34044
34045function formatFullYear(d, p) {
34046 return pad(d.getFullYear() % 10000, p, 4);
34047}
34048
34049function formatZone(d) {
34050 var z = d.getTimezoneOffset();
34051 return (z > 0 ? "-" : (z *= -1, "+"))
34052 + pad(z / 60 | 0, "0", 2)
34053 + pad(z % 60, "0", 2);
34054}
34055
34056function formatUTCDayOfMonth(d, p) {
34057 return pad(d.getUTCDate(), p, 2);
34058}
34059
34060function formatUTCHour24(d, p) {
34061 return pad(d.getUTCHours(), p, 2);
34062}
34063
34064function formatUTCHour12(d, p) {
34065 return pad(d.getUTCHours() % 12 || 12, p, 2);
34066}
34067
34068function formatUTCDayOfYear(d, p) {
34069 return pad(1 + d3_time__WEBPACK_IMPORTED_MODULE_0__["utcDay"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d), p, 3);
34070}
34071
34072function formatUTCMilliseconds(d, p) {
34073 return pad(d.getUTCMilliseconds(), p, 3);
34074}
34075
34076function formatUTCMicroseconds(d, p) {
34077 return formatUTCMilliseconds(d, p) + "000";
34078}
34079
34080function formatUTCMonthNumber(d, p) {
34081 return pad(d.getUTCMonth() + 1, p, 2);
34082}
34083
34084function formatUTCMinutes(d, p) {
34085 return pad(d.getUTCMinutes(), p, 2);
34086}
34087
34088function formatUTCSeconds(d, p) {
34089 return pad(d.getUTCSeconds(), p, 2);
34090}
34091
34092function formatUTCWeekdayNumberMonday(d) {
34093 var dow = d.getUTCDay();
34094 return dow === 0 ? 7 : dow;
34095}
34096
34097function formatUTCWeekNumberSunday(d, p) {
34098 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcSunday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2);
34099}
34100
34101function formatUTCWeekNumberISO(d, p) {
34102 var day = d.getUTCDay();
34103 d = (day >= 4 || day === 0) ? Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"])(d) : d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].ceil(d);
34104 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcThursday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d), d) + (Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d).getUTCDay() === 4), p, 2);
34105}
34106
34107function formatUTCWeekdayNumberSunday(d) {
34108 return d.getUTCDay();
34109}
34110
34111function formatUTCWeekNumberMonday(d, p) {
34112 return pad(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcMonday"].count(Object(d3_time__WEBPACK_IMPORTED_MODULE_0__["utcYear"])(d) - 1, d), p, 2);
34113}
34114
34115function formatUTCYear(d, p) {
34116 return pad(d.getUTCFullYear() % 100, p, 2);
34117}
34118
34119function formatUTCFullYear(d, p) {
34120 return pad(d.getUTCFullYear() % 10000, p, 4);
34121}
34122
34123function formatUTCZone() {
34124 return "+0000";
34125}
34126
34127function formatLiteralPercent() {
34128 return "%";
34129}
34130
34131function formatUnixTimestamp(d) {
34132 return +d;
34133}
34134
34135function formatUnixTimestampSeconds(d) {
34136 return Math.floor(+d / 1000);
34137}
34138
34139
34140/***/ }),
34141
34142/***/ "./node_modules/d3-time/src/day.js":
34143/*!*****************************************!*\
34144 !*** ./node_modules/d3-time/src/day.js ***!
34145 \*****************************************/
34146/*! exports provided: default, days */
34147/***/ (function(module, __webpack_exports__, __webpack_require__) {
34148
34149"use strict";
34150__webpack_require__.r(__webpack_exports__);
34151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "days", function() { return days; });
34152/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34153/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34154
34155
34156
34157var day = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34158 date.setHours(0, 0, 0, 0);
34159}, function(date, step) {
34160 date.setDate(date.getDate() + step);
34161}, function(start, end) {
34162 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"];
34163}, function(date) {
34164 return date.getDate() - 1;
34165});
34166
34167/* harmony default export */ __webpack_exports__["default"] = (day);
34168var days = day.range;
34169
34170
34171/***/ }),
34172
34173/***/ "./node_modules/d3-time/src/duration.js":
34174/*!**********************************************!*\
34175 !*** ./node_modules/d3-time/src/duration.js ***!
34176 \**********************************************/
34177/*! exports provided: durationSecond, durationMinute, durationHour, durationDay, durationWeek */
34178/***/ (function(module, __webpack_exports__, __webpack_require__) {
34179
34180"use strict";
34181__webpack_require__.r(__webpack_exports__);
34182/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationSecond", function() { return durationSecond; });
34183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationMinute", function() { return durationMinute; });
34184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationHour", function() { return durationHour; });
34185/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationDay", function() { return durationDay; });
34186/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "durationWeek", function() { return durationWeek; });
34187var durationSecond = 1e3;
34188var durationMinute = 6e4;
34189var durationHour = 36e5;
34190var durationDay = 864e5;
34191var durationWeek = 6048e5;
34192
34193
34194/***/ }),
34195
34196/***/ "./node_modules/d3-time/src/hour.js":
34197/*!******************************************!*\
34198 !*** ./node_modules/d3-time/src/hour.js ***!
34199 \******************************************/
34200/*! exports provided: default, hours */
34201/***/ (function(module, __webpack_exports__, __webpack_require__) {
34202
34203"use strict";
34204__webpack_require__.r(__webpack_exports__);
34205/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hours", function() { return hours; });
34206/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34207/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34208
34209
34210
34211var hour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34212 date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"] - date.getMinutes() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]);
34213}, function(date, step) {
34214 date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]);
34215}, function(start, end) {
34216 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"];
34217}, function(date) {
34218 return date.getHours();
34219});
34220
34221/* harmony default export */ __webpack_exports__["default"] = (hour);
34222var hours = hour.range;
34223
34224
34225/***/ }),
34226
34227/***/ "./node_modules/d3-time/src/index.js":
34228/*!*******************************************!*\
34229 !*** ./node_modules/d3-time/src/index.js ***!
34230 \*******************************************/
34231/*! exports provided: timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears */
34232/***/ (function(module, __webpack_exports__, __webpack_require__) {
34233
34234"use strict";
34235__webpack_require__.r(__webpack_exports__);
34236/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34237/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
34238
34239/* harmony import */ var _millisecond_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./millisecond.js */ "./node_modules/d3-time/src/millisecond.js");
34240/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
34241
34242/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; });
34243
34244/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
34245
34246/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return _millisecond_js__WEBPACK_IMPORTED_MODULE_1__["milliseconds"]; });
34247
34248/* harmony import */ var _second_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./second.js */ "./node_modules/d3-time/src/second.js");
34249/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
34250
34251/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; });
34252
34253/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
34254
34255/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return _second_js__WEBPACK_IMPORTED_MODULE_2__["seconds"]; });
34256
34257/* harmony import */ var _minute_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./minute.js */ "./node_modules/d3-time/src/minute.js");
34258/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
34259
34260/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return _minute_js__WEBPACK_IMPORTED_MODULE_3__["minutes"]; });
34261
34262/* harmony import */ var _hour_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hour.js */ "./node_modules/d3-time/src/hour.js");
34263/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["default"]; });
34264
34265/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return _hour_js__WEBPACK_IMPORTED_MODULE_4__["hours"]; });
34266
34267/* harmony import */ var _day_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./day.js */ "./node_modules/d3-time/src/day.js");
34268/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["default"]; });
34269
34270/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return _day_js__WEBPACK_IMPORTED_MODULE_5__["days"]; });
34271
34272/* harmony import */ var _week_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./week.js */ "./node_modules/d3-time/src/week.js");
34273/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; });
34274
34275/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; });
34276
34277/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sunday"]; });
34278
34279/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["sundays"]; });
34280
34281/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["monday"]; });
34282
34283/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["mondays"]; });
34284
34285/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesday"]; });
34286
34287/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["tuesdays"]; });
34288
34289/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesday"]; });
34290
34291/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["wednesdays"]; });
34292
34293/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursday"]; });
34294
34295/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["thursdays"]; });
34296
34297/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["friday"]; });
34298
34299/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["fridays"]; });
34300
34301/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturday"]; });
34302
34303/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return _week_js__WEBPACK_IMPORTED_MODULE_6__["saturdays"]; });
34304
34305/* harmony import */ var _month_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./month.js */ "./node_modules/d3-time/src/month.js");
34306/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["default"]; });
34307
34308/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return _month_js__WEBPACK_IMPORTED_MODULE_7__["months"]; });
34309
34310/* harmony import */ var _year_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./year.js */ "./node_modules/d3-time/src/year.js");
34311/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["default"]; });
34312
34313/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return _year_js__WEBPACK_IMPORTED_MODULE_8__["years"]; });
34314
34315/* harmony import */ var _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utcMinute.js */ "./node_modules/d3-time/src/utcMinute.js");
34316/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["default"]; });
34317
34318/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return _utcMinute_js__WEBPACK_IMPORTED_MODULE_9__["utcMinutes"]; });
34319
34320/* harmony import */ var _utcHour_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utcHour.js */ "./node_modules/d3-time/src/utcHour.js");
34321/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["default"]; });
34322
34323/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return _utcHour_js__WEBPACK_IMPORTED_MODULE_10__["utcHours"]; });
34324
34325/* harmony import */ var _utcDay_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utcDay.js */ "./node_modules/d3-time/src/utcDay.js");
34326/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["default"]; });
34327
34328/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return _utcDay_js__WEBPACK_IMPORTED_MODULE_11__["utcDays"]; });
34329
34330/* harmony import */ var _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utcWeek.js */ "./node_modules/d3-time/src/utcWeek.js");
34331/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; });
34332
34333/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; });
34334
34335/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSunday"]; });
34336
34337/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSundays"]; });
34338
34339/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMonday"]; });
34340
34341/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcMondays"]; });
34342
34343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesday"]; });
34344
34345/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcTuesdays"]; });
34346
34347/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesday"]; });
34348
34349/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcWednesdays"]; });
34350
34351/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursday"]; });
34352
34353/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcThursdays"]; });
34354
34355/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFriday"]; });
34356
34357/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcFridays"]; });
34358
34359/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturday"]; });
34360
34361/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return _utcWeek_js__WEBPACK_IMPORTED_MODULE_12__["utcSaturdays"]; });
34362
34363/* harmony import */ var _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./utcMonth.js */ "./node_modules/d3-time/src/utcMonth.js");
34364/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["default"]; });
34365
34366/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return _utcMonth_js__WEBPACK_IMPORTED_MODULE_13__["utcMonths"]; });
34367
34368/* harmony import */ var _utcYear_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utcYear.js */ "./node_modules/d3-time/src/utcYear.js");
34369/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["default"]; });
34370
34371/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return _utcYear_js__WEBPACK_IMPORTED_MODULE_14__["utcYears"]; });
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404/***/ }),
34405
34406/***/ "./node_modules/d3-time/src/interval.js":
34407/*!**********************************************!*\
34408 !*** ./node_modules/d3-time/src/interval.js ***!
34409 \**********************************************/
34410/*! exports provided: default */
34411/***/ (function(module, __webpack_exports__, __webpack_require__) {
34412
34413"use strict";
34414__webpack_require__.r(__webpack_exports__);
34415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return newInterval; });
34416var t0 = new Date,
34417 t1 = new Date;
34418
34419function newInterval(floori, offseti, count, field) {
34420
34421 function interval(date) {
34422 return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;
34423 }
34424
34425 interval.floor = function(date) {
34426 return floori(date = new Date(+date)), date;
34427 };
34428
34429 interval.ceil = function(date) {
34430 return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
34431 };
34432
34433 interval.round = function(date) {
34434 var d0 = interval(date),
34435 d1 = interval.ceil(date);
34436 return date - d0 < d1 - date ? d0 : d1;
34437 };
34438
34439 interval.offset = function(date, step) {
34440 return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
34441 };
34442
34443 interval.range = function(start, stop, step) {
34444 var range = [], previous;
34445 start = interval.ceil(start);
34446 step = step == null ? 1 : Math.floor(step);
34447 if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
34448 do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
34449 while (previous < start && start < stop);
34450 return range;
34451 };
34452
34453 interval.filter = function(test) {
34454 return newInterval(function(date) {
34455 if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
34456 }, function(date, step) {
34457 if (date >= date) {
34458 if (step < 0) while (++step <= 0) {
34459 while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
34460 } else while (--step >= 0) {
34461 while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
34462 }
34463 }
34464 });
34465 };
34466
34467 if (count) {
34468 interval.count = function(start, end) {
34469 t0.setTime(+start), t1.setTime(+end);
34470 floori(t0), floori(t1);
34471 return Math.floor(count(t0, t1));
34472 };
34473
34474 interval.every = function(step) {
34475 step = Math.floor(step);
34476 return !isFinite(step) || !(step > 0) ? null
34477 : !(step > 1) ? interval
34478 : interval.filter(field
34479 ? function(d) { return field(d) % step === 0; }
34480 : function(d) { return interval.count(0, d) % step === 0; });
34481 };
34482 }
34483
34484 return interval;
34485}
34486
34487
34488/***/ }),
34489
34490/***/ "./node_modules/d3-time/src/millisecond.js":
34491/*!*************************************************!*\
34492 !*** ./node_modules/d3-time/src/millisecond.js ***!
34493 \*************************************************/
34494/*! exports provided: default, milliseconds */
34495/***/ (function(module, __webpack_exports__, __webpack_require__) {
34496
34497"use strict";
34498__webpack_require__.r(__webpack_exports__);
34499/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return milliseconds; });
34500/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34501
34502
34503var millisecond = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function() {
34504 // noop
34505}, function(date, step) {
34506 date.setTime(+date + step);
34507}, function(start, end) {
34508 return end - start;
34509});
34510
34511// An optimized implementation for this simple case.
34512millisecond.every = function(k) {
34513 k = Math.floor(k);
34514 if (!isFinite(k) || !(k > 0)) return null;
34515 if (!(k > 1)) return millisecond;
34516 return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34517 date.setTime(Math.floor(date / k) * k);
34518 }, function(date, step) {
34519 date.setTime(+date + step * k);
34520 }, function(start, end) {
34521 return (end - start) / k;
34522 });
34523};
34524
34525/* harmony default export */ __webpack_exports__["default"] = (millisecond);
34526var milliseconds = millisecond.range;
34527
34528
34529/***/ }),
34530
34531/***/ "./node_modules/d3-time/src/minute.js":
34532/*!********************************************!*\
34533 !*** ./node_modules/d3-time/src/minute.js ***!
34534 \********************************************/
34535/*! exports provided: default, minutes */
34536/***/ (function(module, __webpack_exports__, __webpack_require__) {
34537
34538"use strict";
34539__webpack_require__.r(__webpack_exports__);
34540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "minutes", function() { return minutes; });
34541/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34542/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34543
34544
34545
34546var minute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34547 date.setTime(date - date.getMilliseconds() - date.getSeconds() * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]);
34548}, function(date, step) {
34549 date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]);
34550}, function(start, end) {
34551 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"];
34552}, function(date) {
34553 return date.getMinutes();
34554});
34555
34556/* harmony default export */ __webpack_exports__["default"] = (minute);
34557var minutes = minute.range;
34558
34559
34560/***/ }),
34561
34562/***/ "./node_modules/d3-time/src/month.js":
34563/*!*******************************************!*\
34564 !*** ./node_modules/d3-time/src/month.js ***!
34565 \*******************************************/
34566/*! exports provided: default, months */
34567/***/ (function(module, __webpack_exports__, __webpack_require__) {
34568
34569"use strict";
34570__webpack_require__.r(__webpack_exports__);
34571/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "months", function() { return months; });
34572/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34573
34574
34575var month = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34576 date.setDate(1);
34577 date.setHours(0, 0, 0, 0);
34578}, function(date, step) {
34579 date.setMonth(date.getMonth() + step);
34580}, function(start, end) {
34581 return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
34582}, function(date) {
34583 return date.getMonth();
34584});
34585
34586/* harmony default export */ __webpack_exports__["default"] = (month);
34587var months = month.range;
34588
34589
34590/***/ }),
34591
34592/***/ "./node_modules/d3-time/src/second.js":
34593/*!********************************************!*\
34594 !*** ./node_modules/d3-time/src/second.js ***!
34595 \********************************************/
34596/*! exports provided: default, seconds */
34597/***/ (function(module, __webpack_exports__, __webpack_require__) {
34598
34599"use strict";
34600__webpack_require__.r(__webpack_exports__);
34601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "seconds", function() { return seconds; });
34602/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34603/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34604
34605
34606
34607var second = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34608 date.setTime(date - date.getMilliseconds());
34609}, function(date, step) {
34610 date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"]);
34611}, function(start, end) {
34612 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationSecond"];
34613}, function(date) {
34614 return date.getUTCSeconds();
34615});
34616
34617/* harmony default export */ __webpack_exports__["default"] = (second);
34618var seconds = second.range;
34619
34620
34621/***/ }),
34622
34623/***/ "./node_modules/d3-time/src/utcDay.js":
34624/*!********************************************!*\
34625 !*** ./node_modules/d3-time/src/utcDay.js ***!
34626 \********************************************/
34627/*! exports provided: default, utcDays */
34628/***/ (function(module, __webpack_exports__, __webpack_require__) {
34629
34630"use strict";
34631__webpack_require__.r(__webpack_exports__);
34632/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; });
34633/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34634/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34635
34636
34637
34638var utcDay = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34639 date.setUTCHours(0, 0, 0, 0);
34640}, function(date, step) {
34641 date.setUTCDate(date.getUTCDate() + step);
34642}, function(start, end) {
34643 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationDay"];
34644}, function(date) {
34645 return date.getUTCDate() - 1;
34646});
34647
34648/* harmony default export */ __webpack_exports__["default"] = (utcDay);
34649var utcDays = utcDay.range;
34650
34651
34652/***/ }),
34653
34654/***/ "./node_modules/d3-time/src/utcHour.js":
34655/*!*********************************************!*\
34656 !*** ./node_modules/d3-time/src/utcHour.js ***!
34657 \*********************************************/
34658/*! exports provided: default, utcHours */
34659/***/ (function(module, __webpack_exports__, __webpack_require__) {
34660
34661"use strict";
34662__webpack_require__.r(__webpack_exports__);
34663/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; });
34664/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34665/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34666
34667
34668
34669var utcHour = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34670 date.setUTCMinutes(0, 0, 0);
34671}, function(date, step) {
34672 date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"]);
34673}, function(start, end) {
34674 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationHour"];
34675}, function(date) {
34676 return date.getUTCHours();
34677});
34678
34679/* harmony default export */ __webpack_exports__["default"] = (utcHour);
34680var utcHours = utcHour.range;
34681
34682
34683/***/ }),
34684
34685/***/ "./node_modules/d3-time/src/utcMinute.js":
34686/*!***********************************************!*\
34687 !*** ./node_modules/d3-time/src/utcMinute.js ***!
34688 \***********************************************/
34689/*! exports provided: default, utcMinutes */
34690/***/ (function(module, __webpack_exports__, __webpack_require__) {
34691
34692"use strict";
34693__webpack_require__.r(__webpack_exports__);
34694/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; });
34695/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34696/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34697
34698
34699
34700var utcMinute = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34701 date.setUTCSeconds(0, 0);
34702}, function(date, step) {
34703 date.setTime(+date + step * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]);
34704}, function(start, end) {
34705 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"];
34706}, function(date) {
34707 return date.getUTCMinutes();
34708});
34709
34710/* harmony default export */ __webpack_exports__["default"] = (utcMinute);
34711var utcMinutes = utcMinute.range;
34712
34713
34714/***/ }),
34715
34716/***/ "./node_modules/d3-time/src/utcMonth.js":
34717/*!**********************************************!*\
34718 !*** ./node_modules/d3-time/src/utcMonth.js ***!
34719 \**********************************************/
34720/*! exports provided: default, utcMonths */
34721/***/ (function(module, __webpack_exports__, __webpack_require__) {
34722
34723"use strict";
34724__webpack_require__.r(__webpack_exports__);
34725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; });
34726/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34727
34728
34729var utcMonth = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34730 date.setUTCDate(1);
34731 date.setUTCHours(0, 0, 0, 0);
34732}, function(date, step) {
34733 date.setUTCMonth(date.getUTCMonth() + step);
34734}, function(start, end) {
34735 return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
34736}, function(date) {
34737 return date.getUTCMonth();
34738});
34739
34740/* harmony default export */ __webpack_exports__["default"] = (utcMonth);
34741var utcMonths = utcMonth.range;
34742
34743
34744/***/ }),
34745
34746/***/ "./node_modules/d3-time/src/utcWeek.js":
34747/*!*********************************************!*\
34748 !*** ./node_modules/d3-time/src/utcWeek.js ***!
34749 \*********************************************/
34750/*! exports provided: utcSunday, utcMonday, utcTuesday, utcWednesday, utcThursday, utcFriday, utcSaturday, utcSundays, utcMondays, utcTuesdays, utcWednesdays, utcThursdays, utcFridays, utcSaturdays */
34751/***/ (function(module, __webpack_exports__, __webpack_require__) {
34752
34753"use strict";
34754__webpack_require__.r(__webpack_exports__);
34755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; });
34756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; });
34757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; });
34758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; });
34759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; });
34760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; });
34761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; });
34762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; });
34763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; });
34764/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; });
34765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; });
34766/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; });
34767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; });
34768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; });
34769/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34770/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34771
34772
34773
34774function utcWeekday(i) {
34775 return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34776 date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
34777 date.setUTCHours(0, 0, 0, 0);
34778 }, function(date, step) {
34779 date.setUTCDate(date.getUTCDate() + step * 7);
34780 }, function(start, end) {
34781 return (end - start) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"];
34782 });
34783}
34784
34785var utcSunday = utcWeekday(0);
34786var utcMonday = utcWeekday(1);
34787var utcTuesday = utcWeekday(2);
34788var utcWednesday = utcWeekday(3);
34789var utcThursday = utcWeekday(4);
34790var utcFriday = utcWeekday(5);
34791var utcSaturday = utcWeekday(6);
34792
34793var utcSundays = utcSunday.range;
34794var utcMondays = utcMonday.range;
34795var utcTuesdays = utcTuesday.range;
34796var utcWednesdays = utcWednesday.range;
34797var utcThursdays = utcThursday.range;
34798var utcFridays = utcFriday.range;
34799var utcSaturdays = utcSaturday.range;
34800
34801
34802/***/ }),
34803
34804/***/ "./node_modules/d3-time/src/utcYear.js":
34805/*!*********************************************!*\
34806 !*** ./node_modules/d3-time/src/utcYear.js ***!
34807 \*********************************************/
34808/*! exports provided: default, utcYears */
34809/***/ (function(module, __webpack_exports__, __webpack_require__) {
34810
34811"use strict";
34812__webpack_require__.r(__webpack_exports__);
34813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; });
34814/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34815
34816
34817var utcYear = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34818 date.setUTCMonth(0, 1);
34819 date.setUTCHours(0, 0, 0, 0);
34820}, function(date, step) {
34821 date.setUTCFullYear(date.getUTCFullYear() + step);
34822}, function(start, end) {
34823 return end.getUTCFullYear() - start.getUTCFullYear();
34824}, function(date) {
34825 return date.getUTCFullYear();
34826});
34827
34828// An optimized implementation for this simple case.
34829utcYear.every = function(k) {
34830 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34831 date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
34832 date.setUTCMonth(0, 1);
34833 date.setUTCHours(0, 0, 0, 0);
34834 }, function(date, step) {
34835 date.setUTCFullYear(date.getUTCFullYear() + step * k);
34836 });
34837};
34838
34839/* harmony default export */ __webpack_exports__["default"] = (utcYear);
34840var utcYears = utcYear.range;
34841
34842
34843/***/ }),
34844
34845/***/ "./node_modules/d3-time/src/week.js":
34846/*!******************************************!*\
34847 !*** ./node_modules/d3-time/src/week.js ***!
34848 \******************************************/
34849/*! exports provided: sunday, monday, tuesday, wednesday, thursday, friday, saturday, sundays, mondays, tuesdays, wednesdays, thursdays, fridays, saturdays */
34850/***/ (function(module, __webpack_exports__, __webpack_require__) {
34851
34852"use strict";
34853__webpack_require__.r(__webpack_exports__);
34854/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sunday", function() { return sunday; });
34855/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monday", function() { return monday; });
34856/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesday", function() { return tuesday; });
34857/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesday", function() { return wednesday; });
34858/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursday", function() { return thursday; });
34859/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "friday", function() { return friday; });
34860/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturday", function() { return saturday; });
34861/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sundays", function() { return sundays; });
34862/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mondays", function() { return mondays; });
34863/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tuesdays", function() { return tuesdays; });
34864/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wednesdays", function() { return wednesdays; });
34865/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "thursdays", function() { return thursdays; });
34866/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fridays", function() { return fridays; });
34867/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "saturdays", function() { return saturdays; });
34868/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34869/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-time/src/duration.js");
34870
34871
34872
34873function weekday(i) {
34874 return Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34875 date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
34876 date.setHours(0, 0, 0, 0);
34877 }, function(date, step) {
34878 date.setDate(date.getDate() + step * 7);
34879 }, function(start, end) {
34880 return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationMinute"]) / _duration_js__WEBPACK_IMPORTED_MODULE_1__["durationWeek"];
34881 });
34882}
34883
34884var sunday = weekday(0);
34885var monday = weekday(1);
34886var tuesday = weekday(2);
34887var wednesday = weekday(3);
34888var thursday = weekday(4);
34889var friday = weekday(5);
34890var saturday = weekday(6);
34891
34892var sundays = sunday.range;
34893var mondays = monday.range;
34894var tuesdays = tuesday.range;
34895var wednesdays = wednesday.range;
34896var thursdays = thursday.range;
34897var fridays = friday.range;
34898var saturdays = saturday.range;
34899
34900
34901/***/ }),
34902
34903/***/ "./node_modules/d3-time/src/year.js":
34904/*!******************************************!*\
34905 !*** ./node_modules/d3-time/src/year.js ***!
34906 \******************************************/
34907/*! exports provided: default, years */
34908/***/ (function(module, __webpack_exports__, __webpack_require__) {
34909
34910"use strict";
34911__webpack_require__.r(__webpack_exports__);
34912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "years", function() { return years; });
34913/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-time/src/interval.js");
34914
34915
34916var year = Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34917 date.setMonth(0, 1);
34918 date.setHours(0, 0, 0, 0);
34919}, function(date, step) {
34920 date.setFullYear(date.getFullYear() + step);
34921}, function(start, end) {
34922 return end.getFullYear() - start.getFullYear();
34923}, function(date) {
34924 return date.getFullYear();
34925});
34926
34927// An optimized implementation for this simple case.
34928year.every = function(k) {
34929 return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : Object(_interval_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function(date) {
34930 date.setFullYear(Math.floor(date.getFullYear() / k) * k);
34931 date.setMonth(0, 1);
34932 date.setHours(0, 0, 0, 0);
34933 }, function(date, step) {
34934 date.setFullYear(date.getFullYear() + step * k);
34935 });
34936};
34937
34938/* harmony default export */ __webpack_exports__["default"] = (year);
34939var years = year.range;
34940
34941
34942/***/ }),
34943
34944/***/ "./node_modules/d3-timer/src/index.js":
34945/*!********************************************!*\
34946 !*** ./node_modules/d3-timer/src/index.js ***!
34947 \********************************************/
34948/*! exports provided: now, timer, timerFlush, timeout, interval */
34949/***/ (function(module, __webpack_exports__, __webpack_require__) {
34950
34951"use strict";
34952__webpack_require__.r(__webpack_exports__);
34953/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js");
34954/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["now"]; });
34955
34956/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timer"]; });
34957
34958/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return _timer_js__WEBPACK_IMPORTED_MODULE_0__["timerFlush"]; });
34959
34960/* harmony import */ var _timeout_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./timeout.js */ "./node_modules/d3-timer/src/timeout.js");
34961/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return _timeout_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
34962
34963/* harmony import */ var _interval_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interval.js */ "./node_modules/d3-timer/src/interval.js");
34964/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return _interval_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
34965
34966
34967
34968
34969
34970
34971
34972
34973/***/ }),
34974
34975/***/ "./node_modules/d3-timer/src/interval.js":
34976/*!***********************************************!*\
34977 !*** ./node_modules/d3-timer/src/interval.js ***!
34978 \***********************************************/
34979/*! exports provided: default */
34980/***/ (function(module, __webpack_exports__, __webpack_require__) {
34981
34982"use strict";
34983__webpack_require__.r(__webpack_exports__);
34984/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js");
34985
34986
34987/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) {
34988 var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"], total = delay;
34989 if (delay == null) return t.restart(callback, delay, time), t;
34990 delay = +delay, time = time == null ? Object(_timer_js__WEBPACK_IMPORTED_MODULE_0__["now"])() : +time;
34991 t.restart(function tick(elapsed) {
34992 elapsed += total;
34993 t.restart(tick, total += delay, time);
34994 callback(elapsed);
34995 }, delay, time);
34996 return t;
34997});
34998
34999
35000/***/ }),
35001
35002/***/ "./node_modules/d3-timer/src/timeout.js":
35003/*!**********************************************!*\
35004 !*** ./node_modules/d3-timer/src/timeout.js ***!
35005 \**********************************************/
35006/*! exports provided: default */
35007/***/ (function(module, __webpack_exports__, __webpack_require__) {
35008
35009"use strict";
35010__webpack_require__.r(__webpack_exports__);
35011/* harmony import */ var _timer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./timer.js */ "./node_modules/d3-timer/src/timer.js");
35012
35013
35014/* harmony default export */ __webpack_exports__["default"] = (function(callback, delay, time) {
35015 var t = new _timer_js__WEBPACK_IMPORTED_MODULE_0__["Timer"];
35016 delay = delay == null ? 0 : +delay;
35017 t.restart(function(elapsed) {
35018 t.stop();
35019 callback(elapsed + delay);
35020 }, delay, time);
35021 return t;
35022});
35023
35024
35025/***/ }),
35026
35027/***/ "./node_modules/d3-timer/src/timer.js":
35028/*!********************************************!*\
35029 !*** ./node_modules/d3-timer/src/timer.js ***!
35030 \********************************************/
35031/*! exports provided: now, Timer, timer, timerFlush */
35032/***/ (function(module, __webpack_exports__, __webpack_require__) {
35033
35034"use strict";
35035__webpack_require__.r(__webpack_exports__);
35036/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "now", function() { return now; });
35037/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timer", function() { return Timer; });
35038/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return timer; });
35039/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return timerFlush; });
35040var frame = 0, // is an animation frame pending?
35041 timeout = 0, // is a timeout pending?
35042 interval = 0, // are any timers active?
35043 pokeDelay = 1000, // how frequently we check for clock skew
35044 taskHead,
35045 taskTail,
35046 clockLast = 0,
35047 clockNow = 0,
35048 clockSkew = 0,
35049 clock = typeof performance === "object" && performance.now ? performance : Date,
35050 setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
35051
35052function now() {
35053 return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
35054}
35055
35056function clearNow() {
35057 clockNow = 0;
35058}
35059
35060function Timer() {
35061 this._call =
35062 this._time =
35063 this._next = null;
35064}
35065
35066Timer.prototype = timer.prototype = {
35067 constructor: Timer,
35068 restart: function(callback, delay, time) {
35069 if (typeof callback !== "function") throw new TypeError("callback is not a function");
35070 time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
35071 if (!this._next && taskTail !== this) {
35072 if (taskTail) taskTail._next = this;
35073 else taskHead = this;
35074 taskTail = this;
35075 }
35076 this._call = callback;
35077 this._time = time;
35078 sleep();
35079 },
35080 stop: function() {
35081 if (this._call) {
35082 this._call = null;
35083 this._time = Infinity;
35084 sleep();
35085 }
35086 }
35087};
35088
35089function timer(callback, delay, time) {
35090 var t = new Timer;
35091 t.restart(callback, delay, time);
35092 return t;
35093}
35094
35095function timerFlush() {
35096 now(); // Get the current time, if not already set.
35097 ++frame; // Pretend we’ve set an alarm, if we haven’t already.
35098 var t = taskHead, e;
35099 while (t) {
35100 if ((e = clockNow - t._time) >= 0) t._call.call(null, e);
35101 t = t._next;
35102 }
35103 --frame;
35104}
35105
35106function wake() {
35107 clockNow = (clockLast = clock.now()) + clockSkew;
35108 frame = timeout = 0;
35109 try {
35110 timerFlush();
35111 } finally {
35112 frame = 0;
35113 nap();
35114 clockNow = 0;
35115 }
35116}
35117
35118function poke() {
35119 var now = clock.now(), delay = now - clockLast;
35120 if (delay > pokeDelay) clockSkew -= delay, clockLast = now;
35121}
35122
35123function nap() {
35124 var t0, t1 = taskHead, t2, time = Infinity;
35125 while (t1) {
35126 if (t1._call) {
35127 if (time > t1._time) time = t1._time;
35128 t0 = t1, t1 = t1._next;
35129 } else {
35130 t2 = t1._next, t1._next = null;
35131 t1 = t0 ? t0._next = t2 : taskHead = t2;
35132 }
35133 }
35134 taskTail = t0;
35135 sleep(time);
35136}
35137
35138function sleep(time) {
35139 if (frame) return; // Soonest alarm already set, or will be.
35140 if (timeout) timeout = clearTimeout(timeout);
35141 var delay = time - clockNow; // Strictly less than if we recomputed clockNow.
35142 if (delay > 24) {
35143 if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
35144 if (interval) interval = clearInterval(interval);
35145 } else {
35146 if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
35147 frame = 1, setFrame(wake);
35148 }
35149}
35150
35151
35152/***/ }),
35153
35154/***/ "./node_modules/d3-transition/src/active.js":
35155/*!**************************************************!*\
35156 !*** ./node_modules/d3-transition/src/active.js ***!
35157 \**************************************************/
35158/*! exports provided: default */
35159/***/ (function(module, __webpack_exports__, __webpack_require__) {
35160
35161"use strict";
35162__webpack_require__.r(__webpack_exports__);
35163/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js");
35164/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35165
35166
35167
35168var root = [null];
35169
35170/* harmony default export */ __webpack_exports__["default"] = (function(node, name) {
35171 var schedules = node.__transition,
35172 schedule,
35173 i;
35174
35175 if (schedules) {
35176 name = name == null ? null : name + "";
35177 for (i in schedules) {
35178 if ((schedule = schedules[i]).state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["SCHEDULED"] && schedule.name === name) {
35179 return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]([[node]], root, name, +i);
35180 }
35181 }
35182 }
35183
35184 return null;
35185});
35186
35187
35188/***/ }),
35189
35190/***/ "./node_modules/d3-transition/src/index.js":
35191/*!*************************************************!*\
35192 !*** ./node_modules/d3-transition/src/index.js ***!
35193 \*************************************************/
35194/*! exports provided: transition, active, interrupt */
35195/***/ (function(module, __webpack_exports__, __webpack_require__) {
35196
35197"use strict";
35198__webpack_require__.r(__webpack_exports__);
35199/* harmony import */ var _selection_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./selection/index.js */ "./node_modules/d3-transition/src/selection/index.js");
35200/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition/index.js */ "./node_modules/d3-transition/src/transition/index.js");
35201/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return _transition_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
35202
35203/* harmony import */ var _active_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./active.js */ "./node_modules/d3-transition/src/active.js");
35204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return _active_js__WEBPACK_IMPORTED_MODULE_2__["default"]; });
35205
35206/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/interrupt.js");
35207/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return _interrupt_js__WEBPACK_IMPORTED_MODULE_3__["default"]; });
35208
35209
35210
35211
35212
35213
35214
35215/***/ }),
35216
35217/***/ "./node_modules/d3-transition/src/interrupt.js":
35218/*!*****************************************************!*\
35219 !*** ./node_modules/d3-transition/src/interrupt.js ***!
35220 \*****************************************************/
35221/*! exports provided: default */
35222/***/ (function(module, __webpack_exports__, __webpack_require__) {
35223
35224"use strict";
35225__webpack_require__.r(__webpack_exports__);
35226/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35227
35228
35229/* harmony default export */ __webpack_exports__["default"] = (function(node, name) {
35230 var schedules = node.__transition,
35231 schedule,
35232 active,
35233 empty = true,
35234 i;
35235
35236 if (!schedules) return;
35237
35238 name = name == null ? null : name + "";
35239
35240 for (i in schedules) {
35241 if ((schedule = schedules[i]).name !== name) { empty = false; continue; }
35242 active = schedule.state > _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["STARTING"] && schedule.state < _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDING"];
35243 schedule.state = _transition_schedule_js__WEBPACK_IMPORTED_MODULE_0__["ENDED"];
35244 schedule.timer.stop();
35245 schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
35246 delete schedules[i];
35247 }
35248
35249 if (empty) delete node.__transition;
35250});
35251
35252
35253/***/ }),
35254
35255/***/ "./node_modules/d3-transition/src/selection/index.js":
35256/*!***********************************************************!*\
35257 !*** ./node_modules/d3-transition/src/selection/index.js ***!
35258 \***********************************************************/
35259/*! no exports provided */
35260/***/ (function(module, __webpack_exports__, __webpack_require__) {
35261
35262"use strict";
35263__webpack_require__.r(__webpack_exports__);
35264/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
35265/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interrupt.js */ "./node_modules/d3-transition/src/selection/interrupt.js");
35266/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/selection/transition.js");
35267
35268
35269
35270
35271d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.interrupt = _interrupt_js__WEBPACK_IMPORTED_MODULE_1__["default"];
35272d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.transition = _transition_js__WEBPACK_IMPORTED_MODULE_2__["default"];
35273
35274
35275/***/ }),
35276
35277/***/ "./node_modules/d3-transition/src/selection/interrupt.js":
35278/*!***************************************************************!*\
35279 !*** ./node_modules/d3-transition/src/selection/interrupt.js ***!
35280 \***************************************************************/
35281/*! exports provided: default */
35282/***/ (function(module, __webpack_exports__, __webpack_require__) {
35283
35284"use strict";
35285__webpack_require__.r(__webpack_exports__);
35286/* harmony import */ var _interrupt_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../interrupt.js */ "./node_modules/d3-transition/src/interrupt.js");
35287
35288
35289/* harmony default export */ __webpack_exports__["default"] = (function(name) {
35290 return this.each(function() {
35291 Object(_interrupt_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this, name);
35292 });
35293});
35294
35295
35296/***/ }),
35297
35298/***/ "./node_modules/d3-transition/src/selection/transition.js":
35299/*!****************************************************************!*\
35300 !*** ./node_modules/d3-transition/src/selection/transition.js ***!
35301 \****************************************************************/
35302/*! exports provided: default */
35303/***/ (function(module, __webpack_exports__, __webpack_require__) {
35304
35305"use strict";
35306__webpack_require__.r(__webpack_exports__);
35307/* harmony import */ var _transition_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/index.js */ "./node_modules/d3-transition/src/transition/index.js");
35308/* harmony import */ var _transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35309/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js");
35310/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js");
35311
35312
35313
35314
35315
35316var defaultTiming = {
35317 time: null, // Set on use.
35318 delay: 0,
35319 duration: 250,
35320 ease: d3_ease__WEBPACK_IMPORTED_MODULE_2__["easeCubicInOut"]
35321};
35322
35323function inherit(node, id) {
35324 var timing;
35325 while (!(timing = node.__transition) || !(timing = timing[id])) {
35326 if (!(node = node.parentNode)) {
35327 return defaultTiming.time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), defaultTiming;
35328 }
35329 }
35330 return timing;
35331}
35332
35333/* harmony default export */ __webpack_exports__["default"] = (function(name) {
35334 var id,
35335 timing;
35336
35337 if (name instanceof _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"]) {
35338 id = name._id, name = name._name;
35339 } else {
35340 id = Object(_transition_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])(), (timing = defaultTiming).time = Object(d3_timer__WEBPACK_IMPORTED_MODULE_3__["now"])(), name = name == null ? null : name + "";
35341 }
35342
35343 for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
35344 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
35345 if (node = group[i]) {
35346 Object(_transition_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id, i, group, timing || inherit(node, id));
35347 }
35348 }
35349 }
35350
35351 return new _transition_index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id);
35352});
35353
35354
35355/***/ }),
35356
35357/***/ "./node_modules/d3-transition/src/transition/attr.js":
35358/*!***********************************************************!*\
35359 !*** ./node_modules/d3-transition/src/transition/attr.js ***!
35360 \***********************************************************/
35361/*! exports provided: default */
35362/***/ (function(module, __webpack_exports__, __webpack_require__) {
35363
35364"use strict";
35365__webpack_require__.r(__webpack_exports__);
35366/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
35367/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
35368/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js");
35369/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js");
35370
35371
35372
35373
35374
35375function attrRemove(name) {
35376 return function() {
35377 this.removeAttribute(name);
35378 };
35379}
35380
35381function attrRemoveNS(fullname) {
35382 return function() {
35383 this.removeAttributeNS(fullname.space, fullname.local);
35384 };
35385}
35386
35387function attrConstant(name, interpolate, value1) {
35388 var string00,
35389 string1 = value1 + "",
35390 interpolate0;
35391 return function() {
35392 var string0 = this.getAttribute(name);
35393 return string0 === string1 ? null
35394 : string0 === string00 ? interpolate0
35395 : interpolate0 = interpolate(string00 = string0, value1);
35396 };
35397}
35398
35399function attrConstantNS(fullname, interpolate, value1) {
35400 var string00,
35401 string1 = value1 + "",
35402 interpolate0;
35403 return function() {
35404 var string0 = this.getAttributeNS(fullname.space, fullname.local);
35405 return string0 === string1 ? null
35406 : string0 === string00 ? interpolate0
35407 : interpolate0 = interpolate(string00 = string0, value1);
35408 };
35409}
35410
35411function attrFunction(name, interpolate, value) {
35412 var string00,
35413 string10,
35414 interpolate0;
35415 return function() {
35416 var string0, value1 = value(this), string1;
35417 if (value1 == null) return void this.removeAttribute(name);
35418 string0 = this.getAttribute(name);
35419 string1 = value1 + "";
35420 return string0 === string1 ? null
35421 : string0 === string00 && string1 === string10 ? interpolate0
35422 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
35423 };
35424}
35425
35426function attrFunctionNS(fullname, interpolate, value) {
35427 var string00,
35428 string10,
35429 interpolate0;
35430 return function() {
35431 var string0, value1 = value(this), string1;
35432 if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
35433 string0 = this.getAttributeNS(fullname.space, fullname.local);
35434 string1 = value1 + "";
35435 return string0 === string1 ? null
35436 : string0 === string00 && string1 === string10 ? interpolate0
35437 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
35438 };
35439}
35440
35441/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
35442 var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["namespace"])(name), i = fullname === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformSvg"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_3__["default"];
35443 return this.attrTween(name, typeof value === "function"
35444 ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_2__["tweenValue"])(this, "attr." + name, value))
35445 : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)
35446 : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));
35447});
35448
35449
35450/***/ }),
35451
35452/***/ "./node_modules/d3-transition/src/transition/attrTween.js":
35453/*!****************************************************************!*\
35454 !*** ./node_modules/d3-transition/src/transition/attrTween.js ***!
35455 \****************************************************************/
35456/*! exports provided: default */
35457/***/ (function(module, __webpack_exports__, __webpack_require__) {
35458
35459"use strict";
35460__webpack_require__.r(__webpack_exports__);
35461/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
35462
35463
35464function attrInterpolate(name, i) {
35465 return function(t) {
35466 this.setAttribute(name, i.call(this, t));
35467 };
35468}
35469
35470function attrInterpolateNS(fullname, i) {
35471 return function(t) {
35472 this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));
35473 };
35474}
35475
35476function attrTweenNS(fullname, value) {
35477 var t0, i0;
35478 function tween() {
35479 var i = value.apply(this, arguments);
35480 if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
35481 return t0;
35482 }
35483 tween._value = value;
35484 return tween;
35485}
35486
35487function attrTween(name, value) {
35488 var t0, i0;
35489 function tween() {
35490 var i = value.apply(this, arguments);
35491 if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
35492 return t0;
35493 }
35494 tween._value = value;
35495 return tween;
35496}
35497
35498/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
35499 var key = "attr." + name;
35500 if (arguments.length < 2) return (key = this.tween(key)) && key._value;
35501 if (value == null) return this.tween(key, null);
35502 if (typeof value !== "function") throw new Error;
35503 var fullname = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["namespace"])(name);
35504 return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
35505});
35506
35507
35508/***/ }),
35509
35510/***/ "./node_modules/d3-transition/src/transition/delay.js":
35511/*!************************************************************!*\
35512 !*** ./node_modules/d3-transition/src/transition/delay.js ***!
35513 \************************************************************/
35514/*! exports provided: default */
35515/***/ (function(module, __webpack_exports__, __webpack_require__) {
35516
35517"use strict";
35518__webpack_require__.r(__webpack_exports__);
35519/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35520
35521
35522function delayFunction(id, value) {
35523 return function() {
35524 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = +value.apply(this, arguments);
35525 };
35526}
35527
35528function delayConstant(id, value) {
35529 return value = +value, function() {
35530 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"])(this, id).delay = value;
35531 };
35532}
35533
35534/* harmony default export */ __webpack_exports__["default"] = (function(value) {
35535 var id = this._id;
35536
35537 return arguments.length
35538 ? this.each((typeof value === "function"
35539 ? delayFunction
35540 : delayConstant)(id, value))
35541 : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).delay;
35542});
35543
35544
35545/***/ }),
35546
35547/***/ "./node_modules/d3-transition/src/transition/duration.js":
35548/*!***************************************************************!*\
35549 !*** ./node_modules/d3-transition/src/transition/duration.js ***!
35550 \***************************************************************/
35551/*! exports provided: default */
35552/***/ (function(module, __webpack_exports__, __webpack_require__) {
35553
35554"use strict";
35555__webpack_require__.r(__webpack_exports__);
35556/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35557
35558
35559function durationFunction(id, value) {
35560 return function() {
35561 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = +value.apply(this, arguments);
35562 };
35563}
35564
35565function durationConstant(id, value) {
35566 return value = +value, function() {
35567 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).duration = value;
35568 };
35569}
35570
35571/* harmony default export */ __webpack_exports__["default"] = (function(value) {
35572 var id = this._id;
35573
35574 return arguments.length
35575 ? this.each((typeof value === "function"
35576 ? durationFunction
35577 : durationConstant)(id, value))
35578 : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).duration;
35579});
35580
35581
35582/***/ }),
35583
35584/***/ "./node_modules/d3-transition/src/transition/ease.js":
35585/*!***********************************************************!*\
35586 !*** ./node_modules/d3-transition/src/transition/ease.js ***!
35587 \***********************************************************/
35588/*! exports provided: default */
35589/***/ (function(module, __webpack_exports__, __webpack_require__) {
35590
35591"use strict";
35592__webpack_require__.r(__webpack_exports__);
35593/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35594
35595
35596function easeConstant(id, value) {
35597 if (typeof value !== "function") throw new Error;
35598 return function() {
35599 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id).ease = value;
35600 };
35601}
35602
35603/* harmony default export */ __webpack_exports__["default"] = (function(value) {
35604 var id = this._id;
35605
35606 return arguments.length
35607 ? this.each(easeConstant(id, value))
35608 : Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).ease;
35609});
35610
35611
35612/***/ }),
35613
35614/***/ "./node_modules/d3-transition/src/transition/end.js":
35615/*!**********************************************************!*\
35616 !*** ./node_modules/d3-transition/src/transition/end.js ***!
35617 \**********************************************************/
35618/*! exports provided: default */
35619/***/ (function(module, __webpack_exports__, __webpack_require__) {
35620
35621"use strict";
35622__webpack_require__.r(__webpack_exports__);
35623/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35624
35625
35626/* harmony default export */ __webpack_exports__["default"] = (function() {
35627 var on0, on1, that = this, id = that._id, size = that.size();
35628 return new Promise(function(resolve, reject) {
35629 var cancel = {value: reject},
35630 end = {value: function() { if (--size === 0) resolve(); }};
35631
35632 that.each(function() {
35633 var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id),
35634 on = schedule.on;
35635
35636 // If this node shared a dispatch with the previous node,
35637 // just assign the updated shared dispatch and we’re done!
35638 // Otherwise, copy-on-write.
35639 if (on !== on0) {
35640 on1 = (on0 = on).copy();
35641 on1._.cancel.push(cancel);
35642 on1._.interrupt.push(cancel);
35643 on1._.end.push(end);
35644 }
35645
35646 schedule.on = on1;
35647 });
35648 });
35649});
35650
35651
35652/***/ }),
35653
35654/***/ "./node_modules/d3-transition/src/transition/filter.js":
35655/*!*************************************************************!*\
35656 !*** ./node_modules/d3-transition/src/transition/filter.js ***!
35657 \*************************************************************/
35658/*! exports provided: default */
35659/***/ (function(module, __webpack_exports__, __webpack_require__) {
35660
35661"use strict";
35662__webpack_require__.r(__webpack_exports__);
35663/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
35664/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js");
35665
35666
35667
35668/* harmony default export */ __webpack_exports__["default"] = (function(match) {
35669 if (typeof match !== "function") match = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["matcher"])(match);
35670
35671 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
35672 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
35673 if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
35674 subgroup.push(node);
35675 }
35676 }
35677 }
35678
35679 return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, this._name, this._id);
35680});
35681
35682
35683/***/ }),
35684
35685/***/ "./node_modules/d3-transition/src/transition/index.js":
35686/*!************************************************************!*\
35687 !*** ./node_modules/d3-transition/src/transition/index.js ***!
35688 \************************************************************/
35689/*! exports provided: Transition, default, newId */
35690/***/ (function(module, __webpack_exports__, __webpack_require__) {
35691
35692"use strict";
35693__webpack_require__.r(__webpack_exports__);
35694/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transition", function() { return Transition; });
35695/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transition; });
35696/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "newId", function() { return newId; });
35697/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
35698/* harmony import */ var _attr_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./attr.js */ "./node_modules/d3-transition/src/transition/attr.js");
35699/* harmony import */ var _attrTween_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./attrTween.js */ "./node_modules/d3-transition/src/transition/attrTween.js");
35700/* harmony import */ var _delay_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./delay.js */ "./node_modules/d3-transition/src/transition/delay.js");
35701/* harmony import */ var _duration_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./duration.js */ "./node_modules/d3-transition/src/transition/duration.js");
35702/* harmony import */ var _ease_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./ease.js */ "./node_modules/d3-transition/src/transition/ease.js");
35703/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./filter.js */ "./node_modules/d3-transition/src/transition/filter.js");
35704/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./merge.js */ "./node_modules/d3-transition/src/transition/merge.js");
35705/* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./on.js */ "./node_modules/d3-transition/src/transition/on.js");
35706/* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./remove.js */ "./node_modules/d3-transition/src/transition/remove.js");
35707/* harmony import */ var _select_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./select.js */ "./node_modules/d3-transition/src/transition/select.js");
35708/* harmony import */ var _selectAll_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./selectAll.js */ "./node_modules/d3-transition/src/transition/selectAll.js");
35709/* harmony import */ var _selection_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./selection.js */ "./node_modules/d3-transition/src/transition/selection.js");
35710/* harmony import */ var _style_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./style.js */ "./node_modules/d3-transition/src/transition/style.js");
35711/* harmony import */ var _styleTween_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./styleTween.js */ "./node_modules/d3-transition/src/transition/styleTween.js");
35712/* harmony import */ var _text_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./text.js */ "./node_modules/d3-transition/src/transition/text.js");
35713/* harmony import */ var _textTween_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./textTween.js */ "./node_modules/d3-transition/src/transition/textTween.js");
35714/* harmony import */ var _transition_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./transition.js */ "./node_modules/d3-transition/src/transition/transition.js");
35715/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js");
35716/* harmony import */ var _end_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./end.js */ "./node_modules/d3-transition/src/transition/end.js");
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738var id = 0;
35739
35740function Transition(groups, parents, name, id) {
35741 this._groups = groups;
35742 this._parents = parents;
35743 this._name = name;
35744 this._id = id;
35745}
35746
35747function transition(name) {
35748 return Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"])().transition(name);
35749}
35750
35751function newId() {
35752 return ++id;
35753}
35754
35755var selection_prototype = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype;
35756
35757Transition.prototype = transition.prototype = {
35758 constructor: Transition,
35759 select: _select_js__WEBPACK_IMPORTED_MODULE_10__["default"],
35760 selectAll: _selectAll_js__WEBPACK_IMPORTED_MODULE_11__["default"],
35761 filter: _filter_js__WEBPACK_IMPORTED_MODULE_6__["default"],
35762 merge: _merge_js__WEBPACK_IMPORTED_MODULE_7__["default"],
35763 selection: _selection_js__WEBPACK_IMPORTED_MODULE_12__["default"],
35764 transition: _transition_js__WEBPACK_IMPORTED_MODULE_17__["default"],
35765 call: selection_prototype.call,
35766 nodes: selection_prototype.nodes,
35767 node: selection_prototype.node,
35768 size: selection_prototype.size,
35769 empty: selection_prototype.empty,
35770 each: selection_prototype.each,
35771 on: _on_js__WEBPACK_IMPORTED_MODULE_8__["default"],
35772 attr: _attr_js__WEBPACK_IMPORTED_MODULE_1__["default"],
35773 attrTween: _attrTween_js__WEBPACK_IMPORTED_MODULE_2__["default"],
35774 style: _style_js__WEBPACK_IMPORTED_MODULE_13__["default"],
35775 styleTween: _styleTween_js__WEBPACK_IMPORTED_MODULE_14__["default"],
35776 text: _text_js__WEBPACK_IMPORTED_MODULE_15__["default"],
35777 textTween: _textTween_js__WEBPACK_IMPORTED_MODULE_16__["default"],
35778 remove: _remove_js__WEBPACK_IMPORTED_MODULE_9__["default"],
35779 tween: _tween_js__WEBPACK_IMPORTED_MODULE_18__["default"],
35780 delay: _delay_js__WEBPACK_IMPORTED_MODULE_3__["default"],
35781 duration: _duration_js__WEBPACK_IMPORTED_MODULE_4__["default"],
35782 ease: _ease_js__WEBPACK_IMPORTED_MODULE_5__["default"],
35783 end: _end_js__WEBPACK_IMPORTED_MODULE_19__["default"]
35784};
35785
35786
35787/***/ }),
35788
35789/***/ "./node_modules/d3-transition/src/transition/interpolate.js":
35790/*!******************************************************************!*\
35791 !*** ./node_modules/d3-transition/src/transition/interpolate.js ***!
35792 \******************************************************************/
35793/*! exports provided: default */
35794/***/ (function(module, __webpack_exports__, __webpack_require__) {
35795
35796"use strict";
35797__webpack_require__.r(__webpack_exports__);
35798/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
35799/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
35800
35801
35802
35803/* harmony default export */ __webpack_exports__["default"] = (function(a, b) {
35804 var c;
35805 return (typeof b === "number" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateNumber"]
35806 : b instanceof d3_color__WEBPACK_IMPORTED_MODULE_0__["color"] ? d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"]
35807 : (c = Object(d3_color__WEBPACK_IMPORTED_MODULE_0__["color"])(b)) ? (b = c, d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateRgb"])
35808 : d3_interpolate__WEBPACK_IMPORTED_MODULE_1__["interpolateString"])(a, b);
35809});
35810
35811
35812/***/ }),
35813
35814/***/ "./node_modules/d3-transition/src/transition/merge.js":
35815/*!************************************************************!*\
35816 !*** ./node_modules/d3-transition/src/transition/merge.js ***!
35817 \************************************************************/
35818/*! exports provided: default */
35819/***/ (function(module, __webpack_exports__, __webpack_require__) {
35820
35821"use strict";
35822__webpack_require__.r(__webpack_exports__);
35823/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js");
35824
35825
35826/* harmony default export */ __webpack_exports__["default"] = (function(transition) {
35827 if (transition._id !== this._id) throw new Error;
35828
35829 for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
35830 for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
35831 if (node = group0[i] || group1[i]) {
35832 merge[i] = node;
35833 }
35834 }
35835 }
35836
35837 for (; j < m0; ++j) {
35838 merges[j] = groups0[j];
35839 }
35840
35841 return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](merges, this._parents, this._name, this._id);
35842});
35843
35844
35845/***/ }),
35846
35847/***/ "./node_modules/d3-transition/src/transition/on.js":
35848/*!*********************************************************!*\
35849 !*** ./node_modules/d3-transition/src/transition/on.js ***!
35850 \*********************************************************/
35851/*! exports provided: default */
35852/***/ (function(module, __webpack_exports__, __webpack_require__) {
35853
35854"use strict";
35855__webpack_require__.r(__webpack_exports__);
35856/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
35857
35858
35859function start(name) {
35860 return (name + "").trim().split(/^|\s+/).every(function(t) {
35861 var i = t.indexOf(".");
35862 if (i >= 0) t = t.slice(0, i);
35863 return !t || t === "start";
35864 });
35865}
35866
35867function onFunction(id, name, listener) {
35868 var on0, on1, sit = start(name) ? _schedule_js__WEBPACK_IMPORTED_MODULE_0__["init"] : _schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"];
35869 return function() {
35870 var schedule = sit(this, id),
35871 on = schedule.on;
35872
35873 // If this node shared a dispatch with the previous node,
35874 // just assign the updated shared dispatch and we’re done!
35875 // Otherwise, copy-on-write.
35876 if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
35877
35878 schedule.on = on1;
35879 };
35880}
35881
35882/* harmony default export */ __webpack_exports__["default"] = (function(name, listener) {
35883 var id = this._id;
35884
35885 return arguments.length < 2
35886 ? Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).on.on(name)
35887 : this.each(onFunction(id, name, listener));
35888});
35889
35890
35891/***/ }),
35892
35893/***/ "./node_modules/d3-transition/src/transition/remove.js":
35894/*!*************************************************************!*\
35895 !*** ./node_modules/d3-transition/src/transition/remove.js ***!
35896 \*************************************************************/
35897/*! exports provided: default */
35898/***/ (function(module, __webpack_exports__, __webpack_require__) {
35899
35900"use strict";
35901__webpack_require__.r(__webpack_exports__);
35902function removeFunction(id) {
35903 return function() {
35904 var parent = this.parentNode;
35905 for (var i in this.__transition) if (+i !== id) return;
35906 if (parent) parent.removeChild(this);
35907 };
35908}
35909
35910/* harmony default export */ __webpack_exports__["default"] = (function() {
35911 return this.on("end.remove", removeFunction(this._id));
35912});
35913
35914
35915/***/ }),
35916
35917/***/ "./node_modules/d3-transition/src/transition/schedule.js":
35918/*!***************************************************************!*\
35919 !*** ./node_modules/d3-transition/src/transition/schedule.js ***!
35920 \***************************************************************/
35921/*! exports provided: CREATED, SCHEDULED, STARTING, STARTED, RUNNING, ENDING, ENDED, default, init, set, get */
35922/***/ (function(module, __webpack_exports__, __webpack_require__) {
35923
35924"use strict";
35925__webpack_require__.r(__webpack_exports__);
35926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CREATED", function() { return CREATED; });
35927/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SCHEDULED", function() { return SCHEDULED; });
35928/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTING", function() { return STARTING; });
35929/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "STARTED", function() { return STARTED; });
35930/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RUNNING", function() { return RUNNING; });
35931/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDING", function() { return ENDING; });
35932/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENDED", function() { return ENDED; });
35933/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "init", function() { return init; });
35934/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
35935/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
35936/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
35937/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js");
35938
35939
35940
35941var emptyOn = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "end", "cancel", "interrupt");
35942var emptyTween = [];
35943
35944var CREATED = 0;
35945var SCHEDULED = 1;
35946var STARTING = 2;
35947var STARTED = 3;
35948var RUNNING = 4;
35949var ENDING = 5;
35950var ENDED = 6;
35951
35952/* harmony default export */ __webpack_exports__["default"] = (function(node, name, id, index, group, timing) {
35953 var schedules = node.__transition;
35954 if (!schedules) node.__transition = {};
35955 else if (id in schedules) return;
35956 create(node, id, {
35957 name: name,
35958 index: index, // For context during callback.
35959 group: group, // For context during callback.
35960 on: emptyOn,
35961 tween: emptyTween,
35962 time: timing.time,
35963 delay: timing.delay,
35964 duration: timing.duration,
35965 ease: timing.ease,
35966 timer: null,
35967 state: CREATED
35968 });
35969});
35970
35971function init(node, id) {
35972 var schedule = get(node, id);
35973 if (schedule.state > CREATED) throw new Error("too late; already scheduled");
35974 return schedule;
35975}
35976
35977function set(node, id) {
35978 var schedule = get(node, id);
35979 if (schedule.state > STARTED) throw new Error("too late; already running");
35980 return schedule;
35981}
35982
35983function get(node, id) {
35984 var schedule = node.__transition;
35985 if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
35986 return schedule;
35987}
35988
35989function create(node, id, self) {
35990 var schedules = node.__transition,
35991 tween;
35992
35993 // Initialize the self timer when the transition is created.
35994 // Note the actual delay is not known until the first callback!
35995 schedules[id] = self;
35996 self.timer = Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timer"])(schedule, 0, self.time);
35997
35998 function schedule(elapsed) {
35999 self.state = SCHEDULED;
36000 self.timer.restart(start, self.delay, self.time);
36001
36002 // If the elapsed delay is less than our first sleep, start immediately.
36003 if (self.delay <= elapsed) start(elapsed - self.delay);
36004 }
36005
36006 function start(elapsed) {
36007 var i, j, n, o;
36008
36009 // If the state is not SCHEDULED, then we previously errored on start.
36010 if (self.state !== SCHEDULED) return stop();
36011
36012 for (i in schedules) {
36013 o = schedules[i];
36014 if (o.name !== self.name) continue;
36015
36016 // While this element already has a starting transition during this frame,
36017 // defer starting an interrupting transition until that transition has a
36018 // chance to tick (and possibly end); see d3/d3-transition#54!
36019 if (o.state === STARTED) return Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(start);
36020
36021 // Interrupt the active transition, if any.
36022 if (o.state === RUNNING) {
36023 o.state = ENDED;
36024 o.timer.stop();
36025 o.on.call("interrupt", node, node.__data__, o.index, o.group);
36026 delete schedules[i];
36027 }
36028
36029 // Cancel any pre-empted transitions.
36030 else if (+i < id) {
36031 o.state = ENDED;
36032 o.timer.stop();
36033 o.on.call("cancel", node, node.__data__, o.index, o.group);
36034 delete schedules[i];
36035 }
36036 }
36037
36038 // Defer the first tick to end of the current frame; see d3/d3#1576.
36039 // Note the transition may be canceled after start and before the first tick!
36040 // Note this must be scheduled before the start event; see d3/d3-transition#16!
36041 // Assuming this is successful, subsequent callbacks go straight to tick.
36042 Object(d3_timer__WEBPACK_IMPORTED_MODULE_1__["timeout"])(function() {
36043 if (self.state === STARTED) {
36044 self.state = RUNNING;
36045 self.timer.restart(tick, self.delay, self.time);
36046 tick(elapsed);
36047 }
36048 });
36049
36050 // Dispatch the start event.
36051 // Note this must be done before the tween are initialized.
36052 self.state = STARTING;
36053 self.on.call("start", node, node.__data__, self.index, self.group);
36054 if (self.state !== STARTING) return; // interrupted
36055 self.state = STARTED;
36056
36057 // Initialize the tween, deleting null tween.
36058 tween = new Array(n = self.tween.length);
36059 for (i = 0, j = -1; i < n; ++i) {
36060 if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {
36061 tween[++j] = o;
36062 }
36063 }
36064 tween.length = j + 1;
36065 }
36066
36067 function tick(elapsed) {
36068 var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),
36069 i = -1,
36070 n = tween.length;
36071
36072 while (++i < n) {
36073 tween[i].call(node, t);
36074 }
36075
36076 // Dispatch the end event.
36077 if (self.state === ENDING) {
36078 self.on.call("end", node, node.__data__, self.index, self.group);
36079 stop();
36080 }
36081 }
36082
36083 function stop() {
36084 self.state = ENDED;
36085 self.timer.stop();
36086 delete schedules[id];
36087 for (var i in schedules) return; // eslint-disable-line no-unused-vars
36088 delete node.__transition;
36089 }
36090}
36091
36092
36093/***/ }),
36094
36095/***/ "./node_modules/d3-transition/src/transition/select.js":
36096/*!*************************************************************!*\
36097 !*** ./node_modules/d3-transition/src/transition/select.js ***!
36098 \*************************************************************/
36099/*! exports provided: default */
36100/***/ (function(module, __webpack_exports__, __webpack_require__) {
36101
36102"use strict";
36103__webpack_require__.r(__webpack_exports__);
36104/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
36105/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js");
36106/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
36107
36108
36109
36110
36111/* harmony default export */ __webpack_exports__["default"] = (function(select) {
36112 var name = this._name,
36113 id = this._id;
36114
36115 if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selector"])(select);
36116
36117 for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
36118 for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
36119 if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
36120 if ("__data__" in node) subnode.__data__ = node.__data__;
36121 subgroup[i] = subnode;
36122 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(subgroup[i], name, id, i, subgroup, Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id));
36123 }
36124 }
36125 }
36126
36127 return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, this._parents, name, id);
36128});
36129
36130
36131/***/ }),
36132
36133/***/ "./node_modules/d3-transition/src/transition/selectAll.js":
36134/*!****************************************************************!*\
36135 !*** ./node_modules/d3-transition/src/transition/selectAll.js ***!
36136 \****************************************************************/
36137/*! exports provided: default */
36138/***/ (function(module, __webpack_exports__, __webpack_require__) {
36139
36140"use strict";
36141__webpack_require__.r(__webpack_exports__);
36142/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
36143/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js");
36144/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
36145
36146
36147
36148
36149/* harmony default export */ __webpack_exports__["default"] = (function(select) {
36150 var name = this._name,
36151 id = this._id;
36152
36153 if (typeof select !== "function") select = Object(d3_selection__WEBPACK_IMPORTED_MODULE_0__["selectorAll"])(select);
36154
36155 for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
36156 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
36157 if (node = group[i]) {
36158 for (var children = select.call(node, node.__data__, i, group), child, inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["get"])(node, id), k = 0, l = children.length; k < l; ++k) {
36159 if (child = children[k]) {
36160 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["default"])(child, name, id, k, children, inherit);
36161 }
36162 }
36163 subgroups.push(children);
36164 parents.push(node);
36165 }
36166 }
36167 }
36168
36169 return new _index_js__WEBPACK_IMPORTED_MODULE_1__["Transition"](subgroups, parents, name, id);
36170});
36171
36172
36173/***/ }),
36174
36175/***/ "./node_modules/d3-transition/src/transition/selection.js":
36176/*!****************************************************************!*\
36177 !*** ./node_modules/d3-transition/src/transition/selection.js ***!
36178 \****************************************************************/
36179/*! exports provided: default */
36180/***/ (function(module, __webpack_exports__, __webpack_require__) {
36181
36182"use strict";
36183__webpack_require__.r(__webpack_exports__);
36184/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
36185
36186
36187var Selection = d3_selection__WEBPACK_IMPORTED_MODULE_0__["selection"].prototype.constructor;
36188
36189/* harmony default export */ __webpack_exports__["default"] = (function() {
36190 return new Selection(this._groups, this._parents);
36191});
36192
36193
36194/***/ }),
36195
36196/***/ "./node_modules/d3-transition/src/transition/style.js":
36197/*!************************************************************!*\
36198 !*** ./node_modules/d3-transition/src/transition/style.js ***!
36199 \************************************************************/
36200/*! exports provided: default */
36201/***/ (function(module, __webpack_exports__, __webpack_require__) {
36202
36203"use strict";
36204__webpack_require__.r(__webpack_exports__);
36205/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
36206/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
36207/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
36208/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js");
36209/* harmony import */ var _interpolate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interpolate.js */ "./node_modules/d3-transition/src/transition/interpolate.js");
36210
36211
36212
36213
36214
36215
36216function styleNull(name, interpolate) {
36217 var string00,
36218 string10,
36219 interpolate0;
36220 return function() {
36221 var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name),
36222 string1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name));
36223 return string0 === string1 ? null
36224 : string0 === string00 && string1 === string10 ? interpolate0
36225 : interpolate0 = interpolate(string00 = string0, string10 = string1);
36226 };
36227}
36228
36229function styleRemove(name) {
36230 return function() {
36231 this.style.removeProperty(name);
36232 };
36233}
36234
36235function styleConstant(name, interpolate, value1) {
36236 var string00,
36237 string1 = value1 + "",
36238 interpolate0;
36239 return function() {
36240 var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name);
36241 return string0 === string1 ? null
36242 : string0 === string00 ? interpolate0
36243 : interpolate0 = interpolate(string00 = string0, value1);
36244 };
36245}
36246
36247function styleFunction(name, interpolate, value) {
36248 var string00,
36249 string10,
36250 interpolate0;
36251 return function() {
36252 var string0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name),
36253 value1 = value(this),
36254 string1 = value1 + "";
36255 if (value1 == null) string1 = value1 = (this.style.removeProperty(name), Object(d3_selection__WEBPACK_IMPORTED_MODULE_1__["style"])(this, name));
36256 return string0 === string1 ? null
36257 : string0 === string00 && string1 === string10 ? interpolate0
36258 : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));
36259 };
36260}
36261
36262function styleMaybeRemove(id, name) {
36263 var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
36264 return function() {
36265 var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_2__["set"])(this, id),
36266 on = schedule.on,
36267 listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;
36268
36269 // If this node shared a dispatch with the previous node,
36270 // just assign the updated shared dispatch and we’re done!
36271 // Otherwise, copy-on-write.
36272 if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
36273
36274 schedule.on = on1;
36275 };
36276}
36277
36278/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) {
36279 var i = (name += "") === "transform" ? d3_interpolate__WEBPACK_IMPORTED_MODULE_0__["interpolateTransformCss"] : _interpolate_js__WEBPACK_IMPORTED_MODULE_4__["default"];
36280 return value == null ? this
36281 .styleTween(name, styleNull(name, i))
36282 .on("end.style." + name, styleRemove(name))
36283 : typeof value === "function" ? this
36284 .styleTween(name, styleFunction(name, i, Object(_tween_js__WEBPACK_IMPORTED_MODULE_3__["tweenValue"])(this, "style." + name, value)))
36285 .each(styleMaybeRemove(this._id, name))
36286 : this
36287 .styleTween(name, styleConstant(name, i, value), priority)
36288 .on("end.style." + name, null);
36289});
36290
36291
36292/***/ }),
36293
36294/***/ "./node_modules/d3-transition/src/transition/styleTween.js":
36295/*!*****************************************************************!*\
36296 !*** ./node_modules/d3-transition/src/transition/styleTween.js ***!
36297 \*****************************************************************/
36298/*! exports provided: default */
36299/***/ (function(module, __webpack_exports__, __webpack_require__) {
36300
36301"use strict";
36302__webpack_require__.r(__webpack_exports__);
36303function styleInterpolate(name, i, priority) {
36304 return function(t) {
36305 this.style.setProperty(name, i.call(this, t), priority);
36306 };
36307}
36308
36309function styleTween(name, value, priority) {
36310 var t, i0;
36311 function tween() {
36312 var i = value.apply(this, arguments);
36313 if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
36314 return t;
36315 }
36316 tween._value = value;
36317 return tween;
36318}
36319
36320/* harmony default export */ __webpack_exports__["default"] = (function(name, value, priority) {
36321 var key = "style." + (name += "");
36322 if (arguments.length < 2) return (key = this.tween(key)) && key._value;
36323 if (value == null) return this.tween(key, null);
36324 if (typeof value !== "function") throw new Error;
36325 return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
36326});
36327
36328
36329/***/ }),
36330
36331/***/ "./node_modules/d3-transition/src/transition/text.js":
36332/*!***********************************************************!*\
36333 !*** ./node_modules/d3-transition/src/transition/text.js ***!
36334 \***********************************************************/
36335/*! exports provided: default */
36336/***/ (function(module, __webpack_exports__, __webpack_require__) {
36337
36338"use strict";
36339__webpack_require__.r(__webpack_exports__);
36340/* harmony import */ var _tween_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./tween.js */ "./node_modules/d3-transition/src/transition/tween.js");
36341
36342
36343function textConstant(value) {
36344 return function() {
36345 this.textContent = value;
36346 };
36347}
36348
36349function textFunction(value) {
36350 return function() {
36351 var value1 = value(this);
36352 this.textContent = value1 == null ? "" : value1;
36353 };
36354}
36355
36356/* harmony default export */ __webpack_exports__["default"] = (function(value) {
36357 return this.tween("text", typeof value === "function"
36358 ? textFunction(Object(_tween_js__WEBPACK_IMPORTED_MODULE_0__["tweenValue"])(this, "text", value))
36359 : textConstant(value == null ? "" : value + ""));
36360});
36361
36362
36363/***/ }),
36364
36365/***/ "./node_modules/d3-transition/src/transition/textTween.js":
36366/*!****************************************************************!*\
36367 !*** ./node_modules/d3-transition/src/transition/textTween.js ***!
36368 \****************************************************************/
36369/*! exports provided: default */
36370/***/ (function(module, __webpack_exports__, __webpack_require__) {
36371
36372"use strict";
36373__webpack_require__.r(__webpack_exports__);
36374function textInterpolate(i) {
36375 return function(t) {
36376 this.textContent = i.call(this, t);
36377 };
36378}
36379
36380function textTween(value) {
36381 var t0, i0;
36382 function tween() {
36383 var i = value.apply(this, arguments);
36384 if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
36385 return t0;
36386 }
36387 tween._value = value;
36388 return tween;
36389}
36390
36391/* harmony default export */ __webpack_exports__["default"] = (function(value) {
36392 var key = "text";
36393 if (arguments.length < 1) return (key = this.tween(key)) && key._value;
36394 if (value == null) return this.tween(key, null);
36395 if (typeof value !== "function") throw new Error;
36396 return this.tween(key, textTween(value));
36397});
36398
36399
36400/***/ }),
36401
36402/***/ "./node_modules/d3-transition/src/transition/transition.js":
36403/*!*****************************************************************!*\
36404 !*** ./node_modules/d3-transition/src/transition/transition.js ***!
36405 \*****************************************************************/
36406/*! exports provided: default */
36407/***/ (function(module, __webpack_exports__, __webpack_require__) {
36408
36409"use strict";
36410__webpack_require__.r(__webpack_exports__);
36411/* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/d3-transition/src/transition/index.js");
36412/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
36413
36414
36415
36416/* harmony default export */ __webpack_exports__["default"] = (function() {
36417 var name = this._name,
36418 id0 = this._id,
36419 id1 = Object(_index_js__WEBPACK_IMPORTED_MODULE_0__["newId"])();
36420
36421 for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
36422 for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
36423 if (node = group[i]) {
36424 var inherit = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["get"])(node, id0);
36425 Object(_schedule_js__WEBPACK_IMPORTED_MODULE_1__["default"])(node, name, id1, i, group, {
36426 time: inherit.time + inherit.delay + inherit.duration,
36427 delay: 0,
36428 duration: inherit.duration,
36429 ease: inherit.ease
36430 });
36431 }
36432 }
36433 }
36434
36435 return new _index_js__WEBPACK_IMPORTED_MODULE_0__["Transition"](groups, this._parents, name, id1);
36436});
36437
36438
36439/***/ }),
36440
36441/***/ "./node_modules/d3-transition/src/transition/tween.js":
36442/*!************************************************************!*\
36443 !*** ./node_modules/d3-transition/src/transition/tween.js ***!
36444 \************************************************************/
36445/*! exports provided: default, tweenValue */
36446/***/ (function(module, __webpack_exports__, __webpack_require__) {
36447
36448"use strict";
36449__webpack_require__.r(__webpack_exports__);
36450/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tweenValue", function() { return tweenValue; });
36451/* harmony import */ var _schedule_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./schedule.js */ "./node_modules/d3-transition/src/transition/schedule.js");
36452
36453
36454function tweenRemove(id, name) {
36455 var tween0, tween1;
36456 return function() {
36457 var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id),
36458 tween = schedule.tween;
36459
36460 // If this node shared tween with the previous node,
36461 // just assign the updated shared tween and we’re done!
36462 // Otherwise, copy-on-write.
36463 if (tween !== tween0) {
36464 tween1 = tween0 = tween;
36465 for (var i = 0, n = tween1.length; i < n; ++i) {
36466 if (tween1[i].name === name) {
36467 tween1 = tween1.slice();
36468 tween1.splice(i, 1);
36469 break;
36470 }
36471 }
36472 }
36473
36474 schedule.tween = tween1;
36475 };
36476}
36477
36478function tweenFunction(id, name, value) {
36479 var tween0, tween1;
36480 if (typeof value !== "function") throw new Error;
36481 return function() {
36482 var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id),
36483 tween = schedule.tween;
36484
36485 // If this node shared tween with the previous node,
36486 // just assign the updated shared tween and we’re done!
36487 // Otherwise, copy-on-write.
36488 if (tween !== tween0) {
36489 tween1 = (tween0 = tween).slice();
36490 for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {
36491 if (tween1[i].name === name) {
36492 tween1[i] = t;
36493 break;
36494 }
36495 }
36496 if (i === n) tween1.push(t);
36497 }
36498
36499 schedule.tween = tween1;
36500 };
36501}
36502
36503/* harmony default export */ __webpack_exports__["default"] = (function(name, value) {
36504 var id = this._id;
36505
36506 name += "";
36507
36508 if (arguments.length < 2) {
36509 var tween = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(this.node(), id).tween;
36510 for (var i = 0, n = tween.length, t; i < n; ++i) {
36511 if ((t = tween[i]).name === name) {
36512 return t.value;
36513 }
36514 }
36515 return null;
36516 }
36517
36518 return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));
36519});
36520
36521function tweenValue(transition, name, value) {
36522 var id = transition._id;
36523
36524 transition.each(function() {
36525 var schedule = Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["set"])(this, id);
36526 (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);
36527 });
36528
36529 return function(node) {
36530 return Object(_schedule_js__WEBPACK_IMPORTED_MODULE_0__["get"])(node, id).value[name];
36531 };
36532}
36533
36534
36535/***/ }),
36536
36537/***/ "./node_modules/d3-voronoi/src/Beach.js":
36538/*!**********************************************!*\
36539 !*** ./node_modules/d3-voronoi/src/Beach.js ***!
36540 \**********************************************/
36541/*! exports provided: removeBeach, addBeach */
36542/***/ (function(module, __webpack_exports__, __webpack_require__) {
36543
36544"use strict";
36545__webpack_require__.r(__webpack_exports__);
36546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeBeach", function() { return removeBeach; });
36547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addBeach", function() { return addBeach; });
36548/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js");
36549/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js");
36550/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js");
36551/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js");
36552/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js");
36553
36554
36555
36556
36557
36558
36559var beachPool = [];
36560
36561function Beach() {
36562 Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this);
36563 this.edge =
36564 this.site =
36565 this.circle = null;
36566}
36567
36568function createBeach(site) {
36569 var beach = beachPool.pop() || new Beach;
36570 beach.site = site;
36571 return beach;
36572}
36573
36574function detachBeach(beach) {
36575 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(beach);
36576 _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].remove(beach);
36577 beachPool.push(beach);
36578 Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(beach);
36579}
36580
36581function removeBeach(beach) {
36582 var circle = beach.circle,
36583 x = circle.x,
36584 y = circle.cy,
36585 vertex = [x, y],
36586 previous = beach.P,
36587 next = beach.N,
36588 disappearing = [beach];
36589
36590 detachBeach(beach);
36591
36592 var lArc = previous;
36593 while (lArc.circle
36594 && Math.abs(x - lArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]
36595 && Math.abs(y - lArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) {
36596 previous = lArc.P;
36597 disappearing.unshift(lArc);
36598 detachBeach(lArc);
36599 lArc = previous;
36600 }
36601
36602 disappearing.unshift(lArc);
36603 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc);
36604
36605 var rArc = next;
36606 while (rArc.circle
36607 && Math.abs(x - rArc.circle.x) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]
36608 && Math.abs(y - rArc.circle.cy) < _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) {
36609 next = rArc.N;
36610 disappearing.push(rArc);
36611 detachBeach(rArc);
36612 rArc = next;
36613 }
36614
36615 disappearing.push(rArc);
36616 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc);
36617
36618 var nArcs = disappearing.length,
36619 iArc;
36620 for (iArc = 1; iArc < nArcs; ++iArc) {
36621 rArc = disappearing[iArc];
36622 lArc = disappearing[iArc - 1];
36623 Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lArc.site, rArc.site, vertex);
36624 }
36625
36626 lArc = disappearing[0];
36627 rArc = disappearing[nArcs - 1];
36628 rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, rArc.site, null, vertex);
36629
36630 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc);
36631 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc);
36632}
36633
36634function addBeach(site) {
36635 var x = site[0],
36636 directrix = site[1],
36637 lArc,
36638 rArc,
36639 dxl,
36640 dxr,
36641 node = _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"]._;
36642
36643 while (node) {
36644 dxl = leftBreakPoint(node, directrix) - x;
36645 if (dxl > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) node = node.L; else {
36646 dxr = x - rightBreakPoint(node, directrix);
36647 if (dxr > _Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) {
36648 if (!node.R) {
36649 lArc = node;
36650 break;
36651 }
36652 node = node.R;
36653 } else {
36654 if (dxl > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) {
36655 lArc = node.P;
36656 rArc = node;
36657 } else if (dxr > -_Diagram__WEBPACK_IMPORTED_MODULE_4__["epsilon"]) {
36658 lArc = node;
36659 rArc = node.N;
36660 } else {
36661 lArc = rArc = node;
36662 }
36663 break;
36664 }
36665 }
36666 }
36667
36668 Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["createCell"])(site);
36669 var newArc = createBeach(site);
36670 _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(lArc, newArc);
36671
36672 if (!lArc && !rArc) return;
36673
36674 if (lArc === rArc) {
36675 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc);
36676 rArc = createBeach(lArc.site);
36677 _Diagram__WEBPACK_IMPORTED_MODULE_4__["beaches"].insert(newArc, rArc);
36678 newArc.edge = rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site);
36679 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc);
36680 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc);
36681 return;
36682 }
36683
36684 if (!rArc) { // && lArc
36685 newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lArc.site, newArc.site);
36686 return;
36687 }
36688
36689 // else lArc !== rArc
36690 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(lArc);
36691 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["detachCircle"])(rArc);
36692
36693 var lSite = lArc.site,
36694 ax = lSite[0],
36695 ay = lSite[1],
36696 bx = site[0] - ax,
36697 by = site[1] - ay,
36698 rSite = rArc.site,
36699 cx = rSite[0] - ax,
36700 cy = rSite[1] - ay,
36701 d = 2 * (bx * cy - by * cx),
36702 hb = bx * bx + by * by,
36703 hc = cx * cx + cy * cy,
36704 vertex = [(cy * hb - by * hc) / d + ax, (bx * hc - cx * hb) / d + ay];
36705
36706 Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["setEdgeEnd"])(rArc.edge, lSite, rSite, vertex);
36707 newArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(lSite, site, null, vertex);
36708 rArc.edge = Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["createEdge"])(site, rSite, null, vertex);
36709 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(lArc);
36710 Object(_Circle__WEBPACK_IMPORTED_MODULE_2__["attachCircle"])(rArc);
36711}
36712
36713function leftBreakPoint(arc, directrix) {
36714 var site = arc.site,
36715 rfocx = site[0],
36716 rfocy = site[1],
36717 pby2 = rfocy - directrix;
36718
36719 if (!pby2) return rfocx;
36720
36721 var lArc = arc.P;
36722 if (!lArc) return -Infinity;
36723
36724 site = lArc.site;
36725 var lfocx = site[0],
36726 lfocy = site[1],
36727 plby2 = lfocy - directrix;
36728
36729 if (!plby2) return lfocx;
36730
36731 var hl = lfocx - rfocx,
36732 aby2 = 1 / pby2 - 1 / plby2,
36733 b = hl / plby2;
36734
36735 if (aby2) return (-b + Math.sqrt(b * b - 2 * aby2 * (hl * hl / (-2 * plby2) - lfocy + plby2 / 2 + rfocy - pby2 / 2))) / aby2 + rfocx;
36736
36737 return (rfocx + lfocx) / 2;
36738}
36739
36740function rightBreakPoint(arc, directrix) {
36741 var rArc = arc.N;
36742 if (rArc) return leftBreakPoint(rArc, directrix);
36743 var site = arc.site;
36744 return site[1] === directrix ? site[0] : Infinity;
36745}
36746
36747
36748/***/ }),
36749
36750/***/ "./node_modules/d3-voronoi/src/Cell.js":
36751/*!*********************************************!*\
36752 !*** ./node_modules/d3-voronoi/src/Cell.js ***!
36753 \*********************************************/
36754/*! exports provided: createCell, cellHalfedgeStart, cellHalfedgeEnd, sortCellHalfedges, clipCells */
36755/***/ (function(module, __webpack_exports__, __webpack_require__) {
36756
36757"use strict";
36758__webpack_require__.r(__webpack_exports__);
36759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createCell", function() { return createCell; });
36760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeStart", function() { return cellHalfedgeStart; });
36761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cellHalfedgeEnd", function() { return cellHalfedgeEnd; });
36762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sortCellHalfedges", function() { return sortCellHalfedges; });
36763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipCells", function() { return clipCells; });
36764/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js");
36765/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js");
36766
36767
36768
36769function createCell(site) {
36770 return _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][site.index] = {
36771 site: site,
36772 halfedges: []
36773 };
36774}
36775
36776function cellHalfedgeAngle(cell, edge) {
36777 var site = cell.site,
36778 va = edge.left,
36779 vb = edge.right;
36780 if (site === vb) vb = va, va = site;
36781 if (vb) return Math.atan2(vb[1] - va[1], vb[0] - va[0]);
36782 if (site === va) va = edge[1], vb = edge[0];
36783 else va = edge[0], vb = edge[1];
36784 return Math.atan2(va[0] - vb[0], vb[1] - va[1]);
36785}
36786
36787function cellHalfedgeStart(cell, edge) {
36788 return edge[+(edge.left !== cell.site)];
36789}
36790
36791function cellHalfedgeEnd(cell, edge) {
36792 return edge[+(edge.left === cell.site)];
36793}
36794
36795function sortCellHalfedges() {
36796 for (var i = 0, n = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length, cell, halfedges, j, m; i < n; ++i) {
36797 if ((cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][i]) && (m = (halfedges = cell.halfedges).length)) {
36798 var index = new Array(m),
36799 array = new Array(m);
36800 for (j = 0; j < m; ++j) index[j] = j, array[j] = cellHalfedgeAngle(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[j]]);
36801 index.sort(function(i, j) { return array[j] - array[i]; });
36802 for (j = 0; j < m; ++j) array[j] = halfedges[index[j]];
36803 for (j = 0; j < m; ++j) halfedges[j] = array[j];
36804 }
36805 }
36806}
36807
36808function clipCells(x0, y0, x1, y1) {
36809 var nCells = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"].length,
36810 iCell,
36811 cell,
36812 site,
36813 iHalfedge,
36814 halfedges,
36815 nHalfedges,
36816 start,
36817 startX,
36818 startY,
36819 end,
36820 endX,
36821 endY,
36822 cover = true;
36823
36824 for (iCell = 0; iCell < nCells; ++iCell) {
36825 if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) {
36826 site = cell.site;
36827 halfedges = cell.halfedges;
36828 iHalfedge = halfedges.length;
36829
36830 // Remove any dangling clipped edges.
36831 while (iHalfedge--) {
36832 if (!_Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]) {
36833 halfedges.splice(iHalfedge, 1);
36834 }
36835 }
36836
36837 // Insert any border edges as necessary.
36838 iHalfedge = 0, nHalfedges = halfedges.length;
36839 while (iHalfedge < nHalfedges) {
36840 end = cellHalfedgeEnd(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[iHalfedge]]), endX = end[0], endY = end[1];
36841 start = cellHalfedgeStart(cell, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"][halfedges[++iHalfedge % nHalfedges]]), startX = start[0], startY = start[1];
36842 if (Math.abs(endX - startX) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] || Math.abs(endY - startY) > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"]) {
36843 halfedges.splice(iHalfedge, 0, _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, end,
36844 Math.abs(endX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && y1 - endY > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x0, Math.abs(startX - x0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y1]
36845 : Math.abs(endY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && x1 - endX > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x1, y1]
36846 : Math.abs(endX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endY - y0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [x1, Math.abs(startX - x1) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startY : y0]
36847 : Math.abs(endY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] && endX - x0 > _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? [Math.abs(startY - y0) < _Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon"] ? startX : x0, y0]
36848 : null)) - 1);
36849 ++nHalfedges;
36850 }
36851 }
36852
36853 if (nHalfedges) cover = false;
36854 }
36855 }
36856
36857 // If there weren’t any edges, have the closest site cover the extent.
36858 // It doesn’t matter which corner of the extent we measure!
36859 if (cover) {
36860 var dx, dy, d2, dc = Infinity;
36861
36862 for (iCell = 0, cover = null; iCell < nCells; ++iCell) {
36863 if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) {
36864 site = cell.site;
36865 dx = site[0] - x0;
36866 dy = site[1] - y0;
36867 d2 = dx * dx + dy * dy;
36868 if (d2 < dc) dc = d2, cover = cell;
36869 }
36870 }
36871
36872 if (cover) {
36873 var v00 = [x0, y0], v01 = [x0, y1], v11 = [x1, y1], v10 = [x1, y0];
36874 cover.halfedges.push(
36875 _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site = cover.site, v00, v01)) - 1,
36876 _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v01, v11)) - 1,
36877 _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v11, v10)) - 1,
36878 _Diagram__WEBPACK_IMPORTED_MODULE_1__["edges"].push(Object(_Edge__WEBPACK_IMPORTED_MODULE_0__["createBorderEdge"])(site, v10, v00)) - 1
36879 );
36880 }
36881 }
36882
36883 // Lastly delete any cells with no edges; these were entirely clipped.
36884 for (iCell = 0; iCell < nCells; ++iCell) {
36885 if (cell = _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell]) {
36886 if (!cell.halfedges.length) {
36887 delete _Diagram__WEBPACK_IMPORTED_MODULE_1__["cells"][iCell];
36888 }
36889 }
36890 }
36891}
36892
36893
36894/***/ }),
36895
36896/***/ "./node_modules/d3-voronoi/src/Circle.js":
36897/*!***********************************************!*\
36898 !*** ./node_modules/d3-voronoi/src/Circle.js ***!
36899 \***********************************************/
36900/*! exports provided: firstCircle, attachCircle, detachCircle */
36901/***/ (function(module, __webpack_exports__, __webpack_require__) {
36902
36903"use strict";
36904__webpack_require__.r(__webpack_exports__);
36905/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstCircle", function() { return firstCircle; });
36906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attachCircle", function() { return attachCircle; });
36907/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detachCircle", function() { return detachCircle; });
36908/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js");
36909/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js");
36910
36911
36912
36913var circlePool = [];
36914
36915var firstCircle;
36916
36917function Circle() {
36918 Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(this);
36919 this.x =
36920 this.y =
36921 this.arc =
36922 this.site =
36923 this.cy = null;
36924}
36925
36926function attachCircle(arc) {
36927 var lArc = arc.P,
36928 rArc = arc.N;
36929
36930 if (!lArc || !rArc) return;
36931
36932 var lSite = lArc.site,
36933 cSite = arc.site,
36934 rSite = rArc.site;
36935
36936 if (lSite === rSite) return;
36937
36938 var bx = cSite[0],
36939 by = cSite[1],
36940 ax = lSite[0] - bx,
36941 ay = lSite[1] - by,
36942 cx = rSite[0] - bx,
36943 cy = rSite[1] - by;
36944
36945 var d = 2 * (ax * cy - ay * cx);
36946 if (d >= -_Diagram__WEBPACK_IMPORTED_MODULE_1__["epsilon2"]) return;
36947
36948 var ha = ax * ax + ay * ay,
36949 hc = cx * cx + cy * cy,
36950 x = (cy * ha - ay * hc) / d,
36951 y = (ax * hc - cx * ha) / d;
36952
36953 var circle = circlePool.pop() || new Circle;
36954 circle.arc = arc;
36955 circle.site = cSite;
36956 circle.x = x + bx;
36957 circle.y = (circle.cy = y + by) + Math.sqrt(x * x + y * y); // y bottom
36958
36959 arc.circle = circle;
36960
36961 var before = null,
36962 node = _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"]._;
36963
36964 while (node) {
36965 if (circle.y < node.y || (circle.y === node.y && circle.x <= node.x)) {
36966 if (node.L) node = node.L;
36967 else { before = node.P; break; }
36968 } else {
36969 if (node.R) node = node.R;
36970 else { before = node; break; }
36971 }
36972 }
36973
36974 _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].insert(before, circle);
36975 if (!before) firstCircle = circle;
36976}
36977
36978function detachCircle(arc) {
36979 var circle = arc.circle;
36980 if (circle) {
36981 if (!circle.P) firstCircle = circle.N;
36982 _Diagram__WEBPACK_IMPORTED_MODULE_1__["circles"].remove(circle);
36983 circlePool.push(circle);
36984 Object(_RedBlackTree__WEBPACK_IMPORTED_MODULE_0__["RedBlackNode"])(circle);
36985 arc.circle = null;
36986 }
36987}
36988
36989
36990/***/ }),
36991
36992/***/ "./node_modules/d3-voronoi/src/Diagram.js":
36993/*!************************************************!*\
36994 !*** ./node_modules/d3-voronoi/src/Diagram.js ***!
36995 \************************************************/
36996/*! exports provided: epsilon, epsilon2, beaches, cells, circles, edges, default */
36997/***/ (function(module, __webpack_exports__, __webpack_require__) {
36998
36999"use strict";
37000__webpack_require__.r(__webpack_exports__);
37001/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; });
37002/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon2", function() { return epsilon2; });
37003/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "beaches", function() { return beaches; });
37004/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cells", function() { return cells; });
37005/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "circles", function() { return circles; });
37006/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "edges", function() { return edges; });
37007/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Diagram; });
37008/* harmony import */ var _Beach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Beach */ "./node_modules/d3-voronoi/src/Beach.js");
37009/* harmony import */ var _Cell__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cell */ "./node_modules/d3-voronoi/src/Cell.js");
37010/* harmony import */ var _Circle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Circle */ "./node_modules/d3-voronoi/src/Circle.js");
37011/* harmony import */ var _Edge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Edge */ "./node_modules/d3-voronoi/src/Edge.js");
37012/* harmony import */ var _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RedBlackTree */ "./node_modules/d3-voronoi/src/RedBlackTree.js");
37013
37014
37015
37016
37017
37018
37019var epsilon = 1e-6;
37020var epsilon2 = 1e-12;
37021var beaches;
37022var cells;
37023var circles;
37024var edges;
37025
37026function triangleArea(a, b, c) {
37027 return (a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1]);
37028}
37029
37030function lexicographic(a, b) {
37031 return b[1] - a[1]
37032 || b[0] - a[0];
37033}
37034
37035function Diagram(sites, extent) {
37036 var site = sites.sort(lexicographic).pop(),
37037 x,
37038 y,
37039 circle;
37040
37041 edges = [];
37042 cells = new Array(sites.length);
37043 beaches = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"];
37044 circles = new _RedBlackTree__WEBPACK_IMPORTED_MODULE_4__["default"];
37045
37046 while (true) {
37047 circle = _Circle__WEBPACK_IMPORTED_MODULE_2__["firstCircle"];
37048 if (site && (!circle || site[1] < circle.y || (site[1] === circle.y && site[0] < circle.x))) {
37049 if (site[0] !== x || site[1] !== y) {
37050 Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["addBeach"])(site);
37051 x = site[0], y = site[1];
37052 }
37053 site = sites.pop();
37054 } else if (circle) {
37055 Object(_Beach__WEBPACK_IMPORTED_MODULE_0__["removeBeach"])(circle.arc);
37056 } else {
37057 break;
37058 }
37059 }
37060
37061 Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["sortCellHalfedges"])();
37062
37063 if (extent) {
37064 var x0 = +extent[0][0],
37065 y0 = +extent[0][1],
37066 x1 = +extent[1][0],
37067 y1 = +extent[1][1];
37068 Object(_Edge__WEBPACK_IMPORTED_MODULE_3__["clipEdges"])(x0, y0, x1, y1);
37069 Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["clipCells"])(x0, y0, x1, y1);
37070 }
37071
37072 this.edges = edges;
37073 this.cells = cells;
37074
37075 beaches =
37076 circles =
37077 edges =
37078 cells = null;
37079}
37080
37081Diagram.prototype = {
37082 constructor: Diagram,
37083
37084 polygons: function() {
37085 var edges = this.edges;
37086
37087 return this.cells.map(function(cell) {
37088 var polygon = cell.halfedges.map(function(i) { return Object(_Cell__WEBPACK_IMPORTED_MODULE_1__["cellHalfedgeStart"])(cell, edges[i]); });
37089 polygon.data = cell.site.data;
37090 return polygon;
37091 });
37092 },
37093
37094 triangles: function() {
37095 var triangles = [],
37096 edges = this.edges;
37097
37098 this.cells.forEach(function(cell, i) {
37099 if (!(m = (halfedges = cell.halfedges).length)) return;
37100 var site = cell.site,
37101 halfedges,
37102 j = -1,
37103 m,
37104 s0,
37105 e1 = edges[halfedges[m - 1]],
37106 s1 = e1.left === site ? e1.right : e1.left;
37107
37108 while (++j < m) {
37109 s0 = s1;
37110 e1 = edges[halfedges[j]];
37111 s1 = e1.left === site ? e1.right : e1.left;
37112 if (s0 && s1 && i < s0.index && i < s1.index && triangleArea(site, s0, s1) < 0) {
37113 triangles.push([site.data, s0.data, s1.data]);
37114 }
37115 }
37116 });
37117
37118 return triangles;
37119 },
37120
37121 links: function() {
37122 return this.edges.filter(function(edge) {
37123 return edge.right;
37124 }).map(function(edge) {
37125 return {
37126 source: edge.left.data,
37127 target: edge.right.data
37128 };
37129 });
37130 },
37131
37132 find: function(x, y, radius) {
37133 var that = this, i0, i1 = that._found || 0, n = that.cells.length, cell;
37134
37135 // Use the previously-found cell, or start with an arbitrary one.
37136 while (!(cell = that.cells[i1])) if (++i1 >= n) return null;
37137 var dx = x - cell.site[0], dy = y - cell.site[1], d2 = dx * dx + dy * dy;
37138
37139 // Traverse the half-edges to find a closer cell, if any.
37140 do {
37141 cell = that.cells[i0 = i1], i1 = null;
37142 cell.halfedges.forEach(function(e) {
37143 var edge = that.edges[e], v = edge.left;
37144 if ((v === cell.site || !v) && !(v = edge.right)) return;
37145 var vx = x - v[0], vy = y - v[1], v2 = vx * vx + vy * vy;
37146 if (v2 < d2) d2 = v2, i1 = v.index;
37147 });
37148 } while (i1 !== null);
37149
37150 that._found = i0;
37151
37152 return radius == null || d2 <= radius * radius ? cell.site : null;
37153 }
37154}
37155
37156
37157/***/ }),
37158
37159/***/ "./node_modules/d3-voronoi/src/Edge.js":
37160/*!*********************************************!*\
37161 !*** ./node_modules/d3-voronoi/src/Edge.js ***!
37162 \*********************************************/
37163/*! exports provided: createEdge, createBorderEdge, setEdgeEnd, clipEdges */
37164/***/ (function(module, __webpack_exports__, __webpack_require__) {
37165
37166"use strict";
37167__webpack_require__.r(__webpack_exports__);
37168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createEdge", function() { return createEdge; });
37169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBorderEdge", function() { return createBorderEdge; });
37170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setEdgeEnd", function() { return setEdgeEnd; });
37171/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clipEdges", function() { return clipEdges; });
37172/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js");
37173
37174
37175function createEdge(left, right, v0, v1) {
37176 var edge = [null, null],
37177 index = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].push(edge) - 1;
37178 edge.left = left;
37179 edge.right = right;
37180 if (v0) setEdgeEnd(edge, left, right, v0);
37181 if (v1) setEdgeEnd(edge, right, left, v1);
37182 _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][left.index].halfedges.push(index);
37183 _Diagram__WEBPACK_IMPORTED_MODULE_0__["cells"][right.index].halfedges.push(index);
37184 return edge;
37185}
37186
37187function createBorderEdge(left, v0, v1) {
37188 var edge = [v0, v1];
37189 edge.left = left;
37190 return edge;
37191}
37192
37193function setEdgeEnd(edge, left, right, vertex) {
37194 if (!edge[0] && !edge[1]) {
37195 edge[0] = vertex;
37196 edge.left = left;
37197 edge.right = right;
37198 } else if (edge.left === right) {
37199 edge[1] = vertex;
37200 } else {
37201 edge[0] = vertex;
37202 }
37203}
37204
37205// Liang–Barsky line clipping.
37206function clipEdge(edge, x0, y0, x1, y1) {
37207 var a = edge[0],
37208 b = edge[1],
37209 ax = a[0],
37210 ay = a[1],
37211 bx = b[0],
37212 by = b[1],
37213 t0 = 0,
37214 t1 = 1,
37215 dx = bx - ax,
37216 dy = by - ay,
37217 r;
37218
37219 r = x0 - ax;
37220 if (!dx && r > 0) return;
37221 r /= dx;
37222 if (dx < 0) {
37223 if (r < t0) return;
37224 if (r < t1) t1 = r;
37225 } else if (dx > 0) {
37226 if (r > t1) return;
37227 if (r > t0) t0 = r;
37228 }
37229
37230 r = x1 - ax;
37231 if (!dx && r < 0) return;
37232 r /= dx;
37233 if (dx < 0) {
37234 if (r > t1) return;
37235 if (r > t0) t0 = r;
37236 } else if (dx > 0) {
37237 if (r < t0) return;
37238 if (r < t1) t1 = r;
37239 }
37240
37241 r = y0 - ay;
37242 if (!dy && r > 0) return;
37243 r /= dy;
37244 if (dy < 0) {
37245 if (r < t0) return;
37246 if (r < t1) t1 = r;
37247 } else if (dy > 0) {
37248 if (r > t1) return;
37249 if (r > t0) t0 = r;
37250 }
37251
37252 r = y1 - ay;
37253 if (!dy && r < 0) return;
37254 r /= dy;
37255 if (dy < 0) {
37256 if (r > t1) return;
37257 if (r > t0) t0 = r;
37258 } else if (dy > 0) {
37259 if (r < t0) return;
37260 if (r < t1) t1 = r;
37261 }
37262
37263 if (!(t0 > 0) && !(t1 < 1)) return true; // TODO Better check?
37264
37265 if (t0 > 0) edge[0] = [ax + t0 * dx, ay + t0 * dy];
37266 if (t1 < 1) edge[1] = [ax + t1 * dx, ay + t1 * dy];
37267 return true;
37268}
37269
37270function connectEdge(edge, x0, y0, x1, y1) {
37271 var v1 = edge[1];
37272 if (v1) return true;
37273
37274 var v0 = edge[0],
37275 left = edge.left,
37276 right = edge.right,
37277 lx = left[0],
37278 ly = left[1],
37279 rx = right[0],
37280 ry = right[1],
37281 fx = (lx + rx) / 2,
37282 fy = (ly + ry) / 2,
37283 fm,
37284 fb;
37285
37286 if (ry === ly) {
37287 if (fx < x0 || fx >= x1) return;
37288 if (lx > rx) {
37289 if (!v0) v0 = [fx, y0];
37290 else if (v0[1] >= y1) return;
37291 v1 = [fx, y1];
37292 } else {
37293 if (!v0) v0 = [fx, y1];
37294 else if (v0[1] < y0) return;
37295 v1 = [fx, y0];
37296 }
37297 } else {
37298 fm = (lx - rx) / (ry - ly);
37299 fb = fy - fm * fx;
37300 if (fm < -1 || fm > 1) {
37301 if (lx > rx) {
37302 if (!v0) v0 = [(y0 - fb) / fm, y0];
37303 else if (v0[1] >= y1) return;
37304 v1 = [(y1 - fb) / fm, y1];
37305 } else {
37306 if (!v0) v0 = [(y1 - fb) / fm, y1];
37307 else if (v0[1] < y0) return;
37308 v1 = [(y0 - fb) / fm, y0];
37309 }
37310 } else {
37311 if (ly < ry) {
37312 if (!v0) v0 = [x0, fm * x0 + fb];
37313 else if (v0[0] >= x1) return;
37314 v1 = [x1, fm * x1 + fb];
37315 } else {
37316 if (!v0) v0 = [x1, fm * x1 + fb];
37317 else if (v0[0] < x0) return;
37318 v1 = [x0, fm * x0 + fb];
37319 }
37320 }
37321 }
37322
37323 edge[0] = v0;
37324 edge[1] = v1;
37325 return true;
37326}
37327
37328function clipEdges(x0, y0, x1, y1) {
37329 var i = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"].length,
37330 edge;
37331
37332 while (i--) {
37333 if (!connectEdge(edge = _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i], x0, y0, x1, y1)
37334 || !clipEdge(edge, x0, y0, x1, y1)
37335 || !(Math.abs(edge[0][0] - edge[1][0]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"]
37336 || Math.abs(edge[0][1] - edge[1][1]) > _Diagram__WEBPACK_IMPORTED_MODULE_0__["epsilon"])) {
37337 delete _Diagram__WEBPACK_IMPORTED_MODULE_0__["edges"][i];
37338 }
37339 }
37340}
37341
37342
37343/***/ }),
37344
37345/***/ "./node_modules/d3-voronoi/src/RedBlackTree.js":
37346/*!*****************************************************!*\
37347 !*** ./node_modules/d3-voronoi/src/RedBlackTree.js ***!
37348 \*****************************************************/
37349/*! exports provided: RedBlackNode, default */
37350/***/ (function(module, __webpack_exports__, __webpack_require__) {
37351
37352"use strict";
37353__webpack_require__.r(__webpack_exports__);
37354/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RedBlackNode", function() { return RedBlackNode; });
37355function RedBlackTree() {
37356 this._ = null; // root node
37357}
37358
37359function RedBlackNode(node) {
37360 node.U = // parent node
37361 node.C = // color - true for red, false for black
37362 node.L = // left node
37363 node.R = // right node
37364 node.P = // previous node
37365 node.N = null; // next node
37366}
37367
37368RedBlackTree.prototype = {
37369 constructor: RedBlackTree,
37370
37371 insert: function(after, node) {
37372 var parent, grandpa, uncle;
37373
37374 if (after) {
37375 node.P = after;
37376 node.N = after.N;
37377 if (after.N) after.N.P = node;
37378 after.N = node;
37379 if (after.R) {
37380 after = after.R;
37381 while (after.L) after = after.L;
37382 after.L = node;
37383 } else {
37384 after.R = node;
37385 }
37386 parent = after;
37387 } else if (this._) {
37388 after = RedBlackFirst(this._);
37389 node.P = null;
37390 node.N = after;
37391 after.P = after.L = node;
37392 parent = after;
37393 } else {
37394 node.P = node.N = null;
37395 this._ = node;
37396 parent = null;
37397 }
37398 node.L = node.R = null;
37399 node.U = parent;
37400 node.C = true;
37401
37402 after = node;
37403 while (parent && parent.C) {
37404 grandpa = parent.U;
37405 if (parent === grandpa.L) {
37406 uncle = grandpa.R;
37407 if (uncle && uncle.C) {
37408 parent.C = uncle.C = false;
37409 grandpa.C = true;
37410 after = grandpa;
37411 } else {
37412 if (after === parent.R) {
37413 RedBlackRotateLeft(this, parent);
37414 after = parent;
37415 parent = after.U;
37416 }
37417 parent.C = false;
37418 grandpa.C = true;
37419 RedBlackRotateRight(this, grandpa);
37420 }
37421 } else {
37422 uncle = grandpa.L;
37423 if (uncle && uncle.C) {
37424 parent.C = uncle.C = false;
37425 grandpa.C = true;
37426 after = grandpa;
37427 } else {
37428 if (after === parent.L) {
37429 RedBlackRotateRight(this, parent);
37430 after = parent;
37431 parent = after.U;
37432 }
37433 parent.C = false;
37434 grandpa.C = true;
37435 RedBlackRotateLeft(this, grandpa);
37436 }
37437 }
37438 parent = after.U;
37439 }
37440 this._.C = false;
37441 },
37442
37443 remove: function(node) {
37444 if (node.N) node.N.P = node.P;
37445 if (node.P) node.P.N = node.N;
37446 node.N = node.P = null;
37447
37448 var parent = node.U,
37449 sibling,
37450 left = node.L,
37451 right = node.R,
37452 next,
37453 red;
37454
37455 if (!left) next = right;
37456 else if (!right) next = left;
37457 else next = RedBlackFirst(right);
37458
37459 if (parent) {
37460 if (parent.L === node) parent.L = next;
37461 else parent.R = next;
37462 } else {
37463 this._ = next;
37464 }
37465
37466 if (left && right) {
37467 red = next.C;
37468 next.C = node.C;
37469 next.L = left;
37470 left.U = next;
37471 if (next !== right) {
37472 parent = next.U;
37473 next.U = node.U;
37474 node = next.R;
37475 parent.L = node;
37476 next.R = right;
37477 right.U = next;
37478 } else {
37479 next.U = parent;
37480 parent = next;
37481 node = next.R;
37482 }
37483 } else {
37484 red = node.C;
37485 node = next;
37486 }
37487
37488 if (node) node.U = parent;
37489 if (red) return;
37490 if (node && node.C) { node.C = false; return; }
37491
37492 do {
37493 if (node === this._) break;
37494 if (node === parent.L) {
37495 sibling = parent.R;
37496 if (sibling.C) {
37497 sibling.C = false;
37498 parent.C = true;
37499 RedBlackRotateLeft(this, parent);
37500 sibling = parent.R;
37501 }
37502 if ((sibling.L && sibling.L.C)
37503 || (sibling.R && sibling.R.C)) {
37504 if (!sibling.R || !sibling.R.C) {
37505 sibling.L.C = false;
37506 sibling.C = true;
37507 RedBlackRotateRight(this, sibling);
37508 sibling = parent.R;
37509 }
37510 sibling.C = parent.C;
37511 parent.C = sibling.R.C = false;
37512 RedBlackRotateLeft(this, parent);
37513 node = this._;
37514 break;
37515 }
37516 } else {
37517 sibling = parent.L;
37518 if (sibling.C) {
37519 sibling.C = false;
37520 parent.C = true;
37521 RedBlackRotateRight(this, parent);
37522 sibling = parent.L;
37523 }
37524 if ((sibling.L && sibling.L.C)
37525 || (sibling.R && sibling.R.C)) {
37526 if (!sibling.L || !sibling.L.C) {
37527 sibling.R.C = false;
37528 sibling.C = true;
37529 RedBlackRotateLeft(this, sibling);
37530 sibling = parent.L;
37531 }
37532 sibling.C = parent.C;
37533 parent.C = sibling.L.C = false;
37534 RedBlackRotateRight(this, parent);
37535 node = this._;
37536 break;
37537 }
37538 }
37539 sibling.C = true;
37540 node = parent;
37541 parent = parent.U;
37542 } while (!node.C);
37543
37544 if (node) node.C = false;
37545 }
37546};
37547
37548function RedBlackRotateLeft(tree, node) {
37549 var p = node,
37550 q = node.R,
37551 parent = p.U;
37552
37553 if (parent) {
37554 if (parent.L === p) parent.L = q;
37555 else parent.R = q;
37556 } else {
37557 tree._ = q;
37558 }
37559
37560 q.U = parent;
37561 p.U = q;
37562 p.R = q.L;
37563 if (p.R) p.R.U = p;
37564 q.L = p;
37565}
37566
37567function RedBlackRotateRight(tree, node) {
37568 var p = node,
37569 q = node.L,
37570 parent = p.U;
37571
37572 if (parent) {
37573 if (parent.L === p) parent.L = q;
37574 else parent.R = q;
37575 } else {
37576 tree._ = q;
37577 }
37578
37579 q.U = parent;
37580 p.U = q;
37581 p.L = q.R;
37582 if (p.L) p.L.U = p;
37583 q.R = p;
37584}
37585
37586function RedBlackFirst(node) {
37587 while (node.L) node = node.L;
37588 return node;
37589}
37590
37591/* harmony default export */ __webpack_exports__["default"] = (RedBlackTree);
37592
37593
37594/***/ }),
37595
37596/***/ "./node_modules/d3-voronoi/src/constant.js":
37597/*!*************************************************!*\
37598 !*** ./node_modules/d3-voronoi/src/constant.js ***!
37599 \*************************************************/
37600/*! exports provided: default */
37601/***/ (function(module, __webpack_exports__, __webpack_require__) {
37602
37603"use strict";
37604__webpack_require__.r(__webpack_exports__);
37605/* harmony default export */ __webpack_exports__["default"] = (function(x) {
37606 return function() {
37607 return x;
37608 };
37609});
37610
37611
37612/***/ }),
37613
37614/***/ "./node_modules/d3-voronoi/src/index.js":
37615/*!**********************************************!*\
37616 !*** ./node_modules/d3-voronoi/src/index.js ***!
37617 \**********************************************/
37618/*! exports provided: voronoi */
37619/***/ (function(module, __webpack_exports__, __webpack_require__) {
37620
37621"use strict";
37622__webpack_require__.r(__webpack_exports__);
37623/* harmony import */ var _voronoi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./voronoi */ "./node_modules/d3-voronoi/src/voronoi.js");
37624/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return _voronoi__WEBPACK_IMPORTED_MODULE_0__["default"]; });
37625
37626
37627
37628
37629/***/ }),
37630
37631/***/ "./node_modules/d3-voronoi/src/point.js":
37632/*!**********************************************!*\
37633 !*** ./node_modules/d3-voronoi/src/point.js ***!
37634 \**********************************************/
37635/*! exports provided: x, y */
37636/***/ (function(module, __webpack_exports__, __webpack_require__) {
37637
37638"use strict";
37639__webpack_require__.r(__webpack_exports__);
37640/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; });
37641/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; });
37642function x(d) {
37643 return d[0];
37644}
37645
37646function y(d) {
37647 return d[1];
37648}
37649
37650
37651/***/ }),
37652
37653/***/ "./node_modules/d3-voronoi/src/voronoi.js":
37654/*!************************************************!*\
37655 !*** ./node_modules/d3-voronoi/src/voronoi.js ***!
37656 \************************************************/
37657/*! exports provided: default */
37658/***/ (function(module, __webpack_exports__, __webpack_require__) {
37659
37660"use strict";
37661__webpack_require__.r(__webpack_exports__);
37662/* harmony import */ var _constant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant */ "./node_modules/d3-voronoi/src/constant.js");
37663/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./point */ "./node_modules/d3-voronoi/src/point.js");
37664/* harmony import */ var _Diagram__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Diagram */ "./node_modules/d3-voronoi/src/Diagram.js");
37665
37666
37667
37668
37669/* harmony default export */ __webpack_exports__["default"] = (function() {
37670 var x = _point__WEBPACK_IMPORTED_MODULE_1__["x"],
37671 y = _point__WEBPACK_IMPORTED_MODULE_1__["y"],
37672 extent = null;
37673
37674 function voronoi(data) {
37675 return new _Diagram__WEBPACK_IMPORTED_MODULE_2__["default"](data.map(function(d, i) {
37676 var s = [Math.round(x(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"], Math.round(y(d, i, data) / _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) * _Diagram__WEBPACK_IMPORTED_MODULE_2__["epsilon"]];
37677 s.index = i;
37678 s.data = d;
37679 return s;
37680 }), extent);
37681 }
37682
37683 voronoi.polygons = function(data) {
37684 return voronoi(data).polygons();
37685 };
37686
37687 voronoi.links = function(data) {
37688 return voronoi(data).links();
37689 };
37690
37691 voronoi.triangles = function(data) {
37692 return voronoi(data).triangles();
37693 };
37694
37695 voronoi.x = function(_) {
37696 return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : x;
37697 };
37698
37699 voronoi.y = function(_) {
37700 return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), voronoi) : y;
37701 };
37702
37703 voronoi.extent = function(_) {
37704 return arguments.length ? (extent = _ == null ? null : [[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]], voronoi) : extent && [[extent[0][0], extent[0][1]], [extent[1][0], extent[1][1]]];
37705 };
37706
37707 voronoi.size = function(_) {
37708 return arguments.length ? (extent = _ == null ? null : [[0, 0], [+_[0], +_[1]]], voronoi) : extent && [extent[1][0] - extent[0][0], extent[1][1] - extent[0][1]];
37709 };
37710
37711 return voronoi;
37712});
37713
37714
37715/***/ }),
37716
37717/***/ "./node_modules/d3-zoom/src/constant.js":
37718/*!**********************************************!*\
37719 !*** ./node_modules/d3-zoom/src/constant.js ***!
37720 \**********************************************/
37721/*! exports provided: default */
37722/***/ (function(module, __webpack_exports__, __webpack_require__) {
37723
37724"use strict";
37725__webpack_require__.r(__webpack_exports__);
37726/* harmony default export */ __webpack_exports__["default"] = (function(x) {
37727 return function() {
37728 return x;
37729 };
37730});
37731
37732
37733/***/ }),
37734
37735/***/ "./node_modules/d3-zoom/src/event.js":
37736/*!*******************************************!*\
37737 !*** ./node_modules/d3-zoom/src/event.js ***!
37738 \*******************************************/
37739/*! exports provided: default */
37740/***/ (function(module, __webpack_exports__, __webpack_require__) {
37741
37742"use strict";
37743__webpack_require__.r(__webpack_exports__);
37744/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ZoomEvent; });
37745function ZoomEvent(target, type, transform) {
37746 this.target = target;
37747 this.type = type;
37748 this.transform = transform;
37749}
37750
37751
37752/***/ }),
37753
37754/***/ "./node_modules/d3-zoom/src/index.js":
37755/*!*******************************************!*\
37756 !*** ./node_modules/d3-zoom/src/index.js ***!
37757 \*******************************************/
37758/*! exports provided: zoom, zoomTransform, zoomIdentity */
37759/***/ (function(module, __webpack_exports__, __webpack_require__) {
37760
37761"use strict";
37762__webpack_require__.r(__webpack_exports__);
37763/* harmony import */ var _zoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./zoom.js */ "./node_modules/d3-zoom/src/zoom.js");
37764/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return _zoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]; });
37765
37766/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js");
37767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["default"]; });
37768
37769/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return _transform_js__WEBPACK_IMPORTED_MODULE_1__["identity"]; });
37770
37771
37772
37773
37774
37775/***/ }),
37776
37777/***/ "./node_modules/d3-zoom/src/noevent.js":
37778/*!*********************************************!*\
37779 !*** ./node_modules/d3-zoom/src/noevent.js ***!
37780 \*********************************************/
37781/*! exports provided: nopropagation, default */
37782/***/ (function(module, __webpack_exports__, __webpack_require__) {
37783
37784"use strict";
37785__webpack_require__.r(__webpack_exports__);
37786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nopropagation", function() { return nopropagation; });
37787/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
37788
37789
37790function nopropagation() {
37791 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
37792}
37793
37794/* harmony default export */ __webpack_exports__["default"] = (function() {
37795 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].preventDefault();
37796 d3_selection__WEBPACK_IMPORTED_MODULE_0__["event"].stopImmediatePropagation();
37797});
37798
37799
37800/***/ }),
37801
37802/***/ "./node_modules/d3-zoom/src/transform.js":
37803/*!***********************************************!*\
37804 !*** ./node_modules/d3-zoom/src/transform.js ***!
37805 \***********************************************/
37806/*! exports provided: Transform, identity, default */
37807/***/ (function(module, __webpack_exports__, __webpack_require__) {
37808
37809"use strict";
37810__webpack_require__.r(__webpack_exports__);
37811/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Transform", function() { return Transform; });
37812/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "identity", function() { return identity; });
37813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return transform; });
37814function Transform(k, x, y) {
37815 this.k = k;
37816 this.x = x;
37817 this.y = y;
37818}
37819
37820Transform.prototype = {
37821 constructor: Transform,
37822 scale: function(k) {
37823 return k === 1 ? this : new Transform(this.k * k, this.x, this.y);
37824 },
37825 translate: function(x, y) {
37826 return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
37827 },
37828 apply: function(point) {
37829 return [point[0] * this.k + this.x, point[1] * this.k + this.y];
37830 },
37831 applyX: function(x) {
37832 return x * this.k + this.x;
37833 },
37834 applyY: function(y) {
37835 return y * this.k + this.y;
37836 },
37837 invert: function(location) {
37838 return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];
37839 },
37840 invertX: function(x) {
37841 return (x - this.x) / this.k;
37842 },
37843 invertY: function(y) {
37844 return (y - this.y) / this.k;
37845 },
37846 rescaleX: function(x) {
37847 return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));
37848 },
37849 rescaleY: function(y) {
37850 return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));
37851 },
37852 toString: function() {
37853 return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
37854 }
37855};
37856
37857var identity = new Transform(1, 0, 0);
37858
37859transform.prototype = Transform.prototype;
37860
37861function transform(node) {
37862 while (!node.__zoom) if (!(node = node.parentNode)) return identity;
37863 return node.__zoom;
37864}
37865
37866
37867/***/ }),
37868
37869/***/ "./node_modules/d3-zoom/src/zoom.js":
37870/*!******************************************!*\
37871 !*** ./node_modules/d3-zoom/src/zoom.js ***!
37872 \******************************************/
37873/*! exports provided: default */
37874/***/ (function(module, __webpack_exports__, __webpack_require__) {
37875
37876"use strict";
37877__webpack_require__.r(__webpack_exports__);
37878/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
37879/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js");
37880/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
37881/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
37882/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js");
37883/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constant.js */ "./node_modules/d3-zoom/src/constant.js");
37884/* harmony import */ var _event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./event.js */ "./node_modules/d3-zoom/src/event.js");
37885/* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transform.js */ "./node_modules/d3-zoom/src/transform.js");
37886/* harmony import */ var _noevent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./noevent.js */ "./node_modules/d3-zoom/src/noevent.js");
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897// Ignore right-click, since that should open the context menu.
37898function defaultFilter() {
37899 return !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].ctrlKey && !d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].button;
37900}
37901
37902function defaultExtent() {
37903 var e = this;
37904 if (e instanceof SVGElement) {
37905 e = e.ownerSVGElement || e;
37906 if (e.hasAttribute("viewBox")) {
37907 e = e.viewBox.baseVal;
37908 return [[e.x, e.y], [e.x + e.width, e.y + e.height]];
37909 }
37910 return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];
37911 }
37912 return [[0, 0], [e.clientWidth, e.clientHeight]];
37913}
37914
37915function defaultTransform() {
37916 return this.__zoom || _transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"];
37917}
37918
37919function defaultWheelDelta() {
37920 return -d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaY * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode === 1 ? 0.05 : d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].deltaMode ? 1 : 0.002);
37921}
37922
37923function defaultTouchable() {
37924 return navigator.maxTouchPoints || ("ontouchstart" in this);
37925}
37926
37927function defaultConstrain(transform, extent, translateExtent) {
37928 var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
37929 dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
37930 dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
37931 dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
37932 return transform.translate(
37933 dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
37934 dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
37935 );
37936}
37937
37938/* harmony default export */ __webpack_exports__["default"] = (function() {
37939 var filter = defaultFilter,
37940 extent = defaultExtent,
37941 constrain = defaultConstrain,
37942 wheelDelta = defaultWheelDelta,
37943 touchable = defaultTouchable,
37944 scaleExtent = [0, Infinity],
37945 translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],
37946 duration = 250,
37947 interpolate = d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["interpolateZoom"],
37948 listeners = Object(d3_dispatch__WEBPACK_IMPORTED_MODULE_0__["dispatch"])("start", "zoom", "end"),
37949 touchstarting,
37950 touchending,
37951 touchDelay = 500,
37952 wheelDelay = 150,
37953 clickDistance2 = 0;
37954
37955 function zoom(selection) {
37956 selection
37957 .property("__zoom", defaultTransform)
37958 .on("wheel.zoom", wheeled)
37959 .on("mousedown.zoom", mousedowned)
37960 .on("dblclick.zoom", dblclicked)
37961 .filter(touchable)
37962 .on("touchstart.zoom", touchstarted)
37963 .on("touchmove.zoom", touchmoved)
37964 .on("touchend.zoom touchcancel.zoom", touchended)
37965 .style("touch-action", "none")
37966 .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
37967 }
37968
37969 zoom.transform = function(collection, transform, point) {
37970 var selection = collection.selection ? collection.selection() : collection;
37971 selection.property("__zoom", defaultTransform);
37972 if (collection !== selection) {
37973 schedule(collection, transform, point);
37974 } else {
37975 selection.interrupt().each(function() {
37976 gesture(this, arguments)
37977 .start()
37978 .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform)
37979 .end();
37980 });
37981 }
37982 };
37983
37984 zoom.scaleBy = function(selection, k, p) {
37985 zoom.scaleTo(selection, function() {
37986 var k0 = this.__zoom.k,
37987 k1 = typeof k === "function" ? k.apply(this, arguments) : k;
37988 return k0 * k1;
37989 }, p);
37990 };
37991
37992 zoom.scaleTo = function(selection, k, p) {
37993 zoom.transform(selection, function() {
37994 var e = extent.apply(this, arguments),
37995 t0 = this.__zoom,
37996 p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p,
37997 p1 = t0.invert(p0),
37998 k1 = typeof k === "function" ? k.apply(this, arguments) : k;
37999 return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);
38000 }, p);
38001 };
38002
38003 zoom.translateBy = function(selection, x, y) {
38004 zoom.transform(selection, function() {
38005 return constrain(this.__zoom.translate(
38006 typeof x === "function" ? x.apply(this, arguments) : x,
38007 typeof y === "function" ? y.apply(this, arguments) : y
38008 ), extent.apply(this, arguments), translateExtent);
38009 });
38010 };
38011
38012 zoom.translateTo = function(selection, x, y, p) {
38013 zoom.transform(selection, function() {
38014 var e = extent.apply(this, arguments),
38015 t = this.__zoom,
38016 p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p;
38017 return constrain(_transform_js__WEBPACK_IMPORTED_MODULE_7__["identity"].translate(p0[0], p0[1]).scale(t.k).translate(
38018 typeof x === "function" ? -x.apply(this, arguments) : -x,
38019 typeof y === "function" ? -y.apply(this, arguments) : -y
38020 ), e, translateExtent);
38021 }, p);
38022 };
38023
38024 function scale(transform, k) {
38025 k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
38026 return k === transform.k ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, transform.x, transform.y);
38027 }
38028
38029 function translate(transform, p0, p1) {
38030 var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;
38031 return x === transform.x && y === transform.y ? transform : new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](transform.k, x, y);
38032 }
38033
38034 function centroid(extent) {
38035 return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
38036 }
38037
38038 function schedule(transition, transform, point) {
38039 transition
38040 .on("start.zoom", function() { gesture(this, arguments).start(); })
38041 .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); })
38042 .tween("zoom", function() {
38043 var that = this,
38044 args = arguments,
38045 g = gesture(that, args),
38046 e = extent.apply(that, args),
38047 p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point,
38048 w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
38049 a = that.__zoom,
38050 b = typeof transform === "function" ? transform.apply(that, args) : transform,
38051 i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
38052 return function(t) {
38053 if (t === 1) t = b; // Avoid rounding error on end.
38054 else { var l = i(t), k = w / l[2]; t = new _transform_js__WEBPACK_IMPORTED_MODULE_7__["Transform"](k, p[0] - l[0] * k, p[1] - l[1] * k); }
38055 g.zoom(null, t);
38056 };
38057 });
38058 }
38059
38060 function gesture(that, args, clean) {
38061 return (!clean && that.__zooming) || new Gesture(that, args);
38062 }
38063
38064 function Gesture(that, args) {
38065 this.that = that;
38066 this.args = args;
38067 this.active = 0;
38068 this.extent = extent.apply(that, args);
38069 this.taps = 0;
38070 }
38071
38072 Gesture.prototype = {
38073 start: function() {
38074 if (++this.active === 1) {
38075 this.that.__zooming = this;
38076 this.emit("start");
38077 }
38078 return this;
38079 },
38080 zoom: function(key, transform) {
38081 if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
38082 if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
38083 if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
38084 this.that.__zoom = transform;
38085 this.emit("zoom");
38086 return this;
38087 },
38088 end: function() {
38089 if (--this.active === 0) {
38090 delete this.that.__zooming;
38091 this.emit("end");
38092 }
38093 return this;
38094 },
38095 emit: function(type) {
38096 Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["customEvent"])(new _event_js__WEBPACK_IMPORTED_MODULE_6__["default"](zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]);
38097 }
38098 };
38099
38100 function wheeled() {
38101 if (!filter.apply(this, arguments)) return;
38102 var g = gesture(this, arguments),
38103 t = this.__zoom,
38104 k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),
38105 p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this);
38106
38107 // If the mouse is in the same location as before, reuse it.
38108 // If there were recent wheel events, reset the wheel idle timeout.
38109 if (g.wheel) {
38110 if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
38111 g.mouse[1] = t.invert(g.mouse[0] = p);
38112 }
38113 clearTimeout(g.wheel);
38114 }
38115
38116 // If this wheel event won’t trigger a transform change, ignore it.
38117 else if (t.k === k) return;
38118
38119 // Otherwise, capture the mouse point and location at the start.
38120 else {
38121 g.mouse = [p, t.invert(p)];
38122 Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this);
38123 g.start();
38124 }
38125
38126 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])();
38127 g.wheel = setTimeout(wheelidled, wheelDelay);
38128 g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));
38129
38130 function wheelidled() {
38131 g.wheel = null;
38132 g.end();
38133 }
38134 }
38135
38136 function mousedowned() {
38137 if (touchending || !filter.apply(this, arguments)) return;
38138 var g = gesture(this, arguments, true),
38139 v = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true),
38140 p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this),
38141 x0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX,
38142 y0 = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY;
38143
38144 Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragDisable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view);
38145 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])();
38146 g.mouse = [p, this.__zoom.invert(p)];
38147 Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this);
38148 g.start();
38149
38150 function mousemoved() {
38151 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])();
38152 if (!g.moved) {
38153 var dx = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientX - x0, dy = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].clientY - y0;
38154 g.moved = dx * dx + dy * dy > clickDistance2;
38155 }
38156 g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(g.that), g.mouse[1]), g.extent, translateExtent));
38157 }
38158
38159 function mouseupped() {
38160 v.on("mousemove.zoom mouseup.zoom", null);
38161 Object(d3_drag__WEBPACK_IMPORTED_MODULE_1__["dragEnable"])(d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].view, g.moved);
38162 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])();
38163 g.end();
38164 }
38165 }
38166
38167 function dblclicked() {
38168 if (!filter.apply(this, arguments)) return;
38169 var t0 = this.__zoom,
38170 p0 = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["mouse"])(this),
38171 p1 = t0.invert(p0),
38172 k1 = t0.k * (d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].shiftKey ? 0.5 : 2),
38173 t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent);
38174
38175 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])();
38176 if (duration > 0) Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).transition().duration(duration).call(schedule, t1, p0);
38177 else Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).call(zoom.transform, t1);
38178 }
38179
38180 function touchstarted() {
38181 if (!filter.apply(this, arguments)) return;
38182 var touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].touches,
38183 n = touches.length,
38184 g = gesture(this, arguments, d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches.length === n),
38185 started, i, t, p;
38186
38187 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])();
38188 for (i = 0; i < n; ++i) {
38189 t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier);
38190 p = [p, this.__zoom.invert(p), t.identifier];
38191 if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
38192 else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
38193 }
38194
38195 if (touchstarting) touchstarting = clearTimeout(touchstarting);
38196
38197 if (started) {
38198 if (g.taps < 2) touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);
38199 Object(d3_transition__WEBPACK_IMPORTED_MODULE_4__["interrupt"])(this);
38200 g.start();
38201 }
38202 }
38203
38204 function touchmoved() {
38205 if (!this.__zooming) return;
38206 var g = gesture(this, arguments),
38207 touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches,
38208 n = touches.length, i, t, p, l;
38209
38210 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["default"])();
38211 if (touchstarting) touchstarting = clearTimeout(touchstarting);
38212 g.taps = 0;
38213 for (i = 0; i < n; ++i) {
38214 t = touches[i], p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["touch"])(this, touches, t.identifier);
38215 if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
38216 else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
38217 }
38218 t = g.that.__zoom;
38219 if (g.touch1) {
38220 var p0 = g.touch0[0], l0 = g.touch0[1],
38221 p1 = g.touch1[0], l1 = g.touch1[1],
38222 dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,
38223 dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;
38224 t = scale(t, Math.sqrt(dp / dl));
38225 p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
38226 l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
38227 }
38228 else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
38229 else return;
38230 g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
38231 }
38232
38233 function touchended() {
38234 if (!this.__zooming) return;
38235 var g = gesture(this, arguments),
38236 touches = d3_selection__WEBPACK_IMPORTED_MODULE_3__["event"].changedTouches,
38237 n = touches.length, i, t;
38238
38239 Object(_noevent_js__WEBPACK_IMPORTED_MODULE_8__["nopropagation"])();
38240 if (touchending) clearTimeout(touchending);
38241 touchending = setTimeout(function() { touchending = null; }, touchDelay);
38242 for (i = 0; i < n; ++i) {
38243 t = touches[i];
38244 if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
38245 else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
38246 }
38247 if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
38248 if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
38249 else {
38250 g.end();
38251 // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
38252 if (g.taps === 2) {
38253 var p = Object(d3_selection__WEBPACK_IMPORTED_MODULE_3__["select"])(this).on("dblclick.zoom");
38254 if (p) p.apply(this, arguments);
38255 }
38256 }
38257 }
38258
38259 zoom.wheelDelta = function(_) {
38260 return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(+_), zoom) : wheelDelta;
38261 };
38262
38263 zoom.filter = function(_) {
38264 return arguments.length ? (filter = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : filter;
38265 };
38266
38267 zoom.touchable = function(_) {
38268 return arguments.length ? (touchable = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])(!!_), zoom) : touchable;
38269 };
38270
38271 zoom.extent = function(_) {
38272 return arguments.length ? (extent = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_5__["default"])([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
38273 };
38274
38275 zoom.scaleExtent = function(_) {
38276 return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];
38277 };
38278
38279 zoom.translateExtent = function(_) {
38280 return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];
38281 };
38282
38283 zoom.constrain = function(_) {
38284 return arguments.length ? (constrain = _, zoom) : constrain;
38285 };
38286
38287 zoom.duration = function(_) {
38288 return arguments.length ? (duration = +_, zoom) : duration;
38289 };
38290
38291 zoom.interpolate = function(_) {
38292 return arguments.length ? (interpolate = _, zoom) : interpolate;
38293 };
38294
38295 zoom.on = function() {
38296 var value = listeners.on.apply(listeners, arguments);
38297 return value === listeners ? zoom : value;
38298 };
38299
38300 zoom.clickDistance = function(_) {
38301 return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);
38302 };
38303
38304 return zoom;
38305});
38306
38307
38308/***/ }),
38309
38310/***/ "./node_modules/d3/dist/package.js":
38311/*!*****************************************!*\
38312 !*** ./node_modules/d3/dist/package.js ***!
38313 \*****************************************/
38314/*! exports provided: name, version, description, keywords, homepage, license, author, main, unpkg, jsdelivr, module, repository, files, scripts, devDependencies, dependencies */
38315/***/ (function(module, __webpack_exports__, __webpack_require__) {
38316
38317"use strict";
38318__webpack_require__.r(__webpack_exports__);
38319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; });
38320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "version", function() { return version; });
38321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "description", function() { return description; });
38322/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keywords", function() { return keywords; });
38323/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "homepage", function() { return homepage; });
38324/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "license", function() { return license; });
38325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "author", function() { return author; });
38326/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "main", function() { return main; });
38327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unpkg", function() { return unpkg; });
38328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jsdelivr", function() { return jsdelivr; });
38329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "module", function() { return module; });
38330/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "repository", function() { return repository; });
38331/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "files", function() { return files; });
38332/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scripts", function() { return scripts; });
38333/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "devDependencies", function() { return devDependencies; });
38334/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dependencies", function() { return dependencies; });
38335var name = "d3";
38336var version = "5.14.2";
38337var description = "Data-Driven Documents";
38338var keywords = ["dom","visualization","svg","animation","canvas"];
38339var homepage = "https://d3js.org";
38340var license = "BSD-3-Clause";
38341var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"};
38342var main = "dist/d3.node.js";
38343var unpkg = "dist/d3.min.js";
38344var jsdelivr = "dist/d3.min.js";
38345var module = "index.js";
38346var repository = {"type":"git","url":"https://github.com/d3/d3.git"};
38347var files = ["dist/**/*.js","index.js"];
38348var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"};
38349var devDependencies = {"json2module":"0.0","rimraf":"2","rollup":"1","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"3","rollup-plugin-terser":"5","tape":"4"};
38350var dependencies = {"d3-array":"1","d3-axis":"1","d3-brush":"1","d3-chord":"1","d3-collection":"1","d3-color":"1","d3-contour":"1","d3-dispatch":"1","d3-drag":"1","d3-dsv":"1","d3-ease":"1","d3-fetch":"1","d3-force":"1","d3-format":"1","d3-geo":"1","d3-hierarchy":"1","d3-interpolate":"1","d3-path":"1","d3-polygon":"1","d3-quadtree":"1","d3-random":"1","d3-scale":"2","d3-scale-chromatic":"1","d3-selection":"1","d3-shape":"1","d3-time":"1","d3-time-format":"2","d3-timer":"1","d3-transition":"1","d3-voronoi":"1","d3-zoom":"1"};
38351
38352
38353/***/ }),
38354
38355/***/ "./node_modules/d3/index.js":
38356/*!**********************************!*\
38357 !*** ./node_modules/d3/index.js ***!
38358 \**********************************/
38359/*! exports provided: version, bisect, bisectRight, bisectLeft, ascending, bisector, cross, descending, deviation, extent, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, mean, median, merge, min, pairs, permute, quantile, range, scan, shuffle, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, axisTop, axisRight, axisBottom, axisLeft, brush, brushX, brushY, brushSelection, chord, ribbon, nest, set, map, keys, values, entries, color, rgb, hsl, lab, hcl, lch, gray, cubehelix, contours, contourDensity, dispatch, drag, dragDisable, dragEnable, dsvFormat, csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue, tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue, autoType, easeLinear, easeQuad, easeQuadIn, easeQuadOut, easeQuadInOut, easeCubic, easeCubicIn, easeCubicOut, easeCubicInOut, easePoly, easePolyIn, easePolyOut, easePolyInOut, easeSin, easeSinIn, easeSinOut, easeSinInOut, easeExp, easeExpIn, easeExpOut, easeExpInOut, easeCircle, easeCircleIn, easeCircleOut, easeCircleInOut, easeBounce, easeBounceIn, easeBounceOut, easeBounceInOut, easeBack, easeBackIn, easeBackOut, easeBackInOut, easeElastic, easeElasticIn, easeElasticOut, easeElasticInOut, blob, buffer, dsv, csv, tsv, image, json, text, xml, html, svg, forceCenter, forceCollide, forceLink, forceManyBody, forceRadial, forceSimulation, forceX, forceY, formatDefaultLocale, format, formatPrefix, formatLocale, formatSpecifier, FormatSpecifier, precisionFixed, precisionPrefix, precisionRound, geoArea, geoBounds, geoCentroid, geoCircle, geoClipAntimeridian, geoClipCircle, geoClipExtent, geoClipRectangle, geoContains, geoDistance, geoGraticule, geoGraticule10, geoInterpolate, geoLength, geoPath, geoAlbers, geoAlbersUsa, geoAzimuthalEqualArea, geoAzimuthalEqualAreaRaw, geoAzimuthalEquidistant, geoAzimuthalEquidistantRaw, geoConicConformal, geoConicConformalRaw, geoConicEqualArea, geoConicEqualAreaRaw, geoConicEquidistant, geoConicEquidistantRaw, geoEqualEarth, geoEqualEarthRaw, geoEquirectangular, geoEquirectangularRaw, geoGnomonic, geoGnomonicRaw, geoIdentity, geoProjection, geoProjectionMutator, geoMercator, geoMercatorRaw, geoNaturalEarth1, geoNaturalEarth1Raw, geoOrthographic, geoOrthographicRaw, geoStereographic, geoStereographicRaw, geoTransverseMercator, geoTransverseMercatorRaw, geoRotation, geoStream, geoTransform, cluster, hierarchy, pack, packSiblings, packEnclose, partition, stratify, tree, treemap, treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, interpolate, interpolateArray, interpolateBasis, interpolateBasisClosed, interpolateDate, interpolateDiscrete, interpolateHue, interpolateNumber, interpolateNumberArray, interpolateObject, interpolateRound, interpolateString, interpolateTransformCss, interpolateTransformSvg, interpolateZoom, interpolateRgb, interpolateRgbBasis, interpolateRgbBasisClosed, interpolateHsl, interpolateHslLong, interpolateLab, interpolateHcl, interpolateHclLong, interpolateCubehelix, interpolateCubehelixLong, piecewise, quantize, path, polygonArea, polygonCentroid, polygonHull, polygonContains, polygonLength, quadtree, randomUniform, randomNormal, randomLogNormal, randomBates, randomIrwinHall, randomExponential, scaleBand, scalePoint, scaleIdentity, scaleLinear, scaleLog, scaleSymlog, scaleOrdinal, scaleImplicit, scalePow, scaleSqrt, scaleQuantile, scaleQuantize, scaleThreshold, scaleTime, scaleUtc, scaleSequential, scaleSequentialLog, scaleSequentialPow, scaleSequentialSqrt, scaleSequentialSymlog, scaleSequentialQuantile, scaleDiverging, scaleDivergingLog, scaleDivergingPow, scaleDivergingSqrt, scaleDivergingSymlog, tickFormat, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, schemeTableau10, interpolateBrBG, schemeBrBG, interpolatePRGn, schemePRGn, interpolatePiYG, schemePiYG, interpolatePuOr, schemePuOr, interpolateRdBu, schemeRdBu, interpolateRdGy, schemeRdGy, interpolateRdYlBu, schemeRdYlBu, interpolateRdYlGn, schemeRdYlGn, interpolateSpectral, schemeSpectral, interpolateBuGn, schemeBuGn, interpolateBuPu, schemeBuPu, interpolateGnBu, schemeGnBu, interpolateOrRd, schemeOrRd, interpolatePuBuGn, schemePuBuGn, interpolatePuBu, schemePuBu, interpolatePuRd, schemePuRd, interpolateRdPu, schemeRdPu, interpolateYlGnBu, schemeYlGnBu, interpolateYlGn, schemeYlGn, interpolateYlOrBr, schemeYlOrBr, interpolateYlOrRd, schemeYlOrRd, interpolateBlues, schemeBlues, interpolateGreens, schemeGreens, interpolateGreys, schemeGreys, interpolatePurples, schemePurples, interpolateReds, schemeReds, interpolateOranges, schemeOranges, interpolateCividis, interpolateCubehelixDefault, interpolateRainbow, interpolateWarm, interpolateCool, interpolateSinebow, interpolateTurbo, interpolateViridis, interpolateMagma, interpolateInferno, interpolatePlasma, create, creator, local, matcher, mouse, namespace, namespaces, clientPoint, select, selectAll, selection, selector, selectorAll, style, touch, touches, window, event, customEvent, arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, timeInterval, timeMillisecond, timeMilliseconds, utcMillisecond, utcMilliseconds, timeSecond, timeSeconds, utcSecond, utcSeconds, timeMinute, timeMinutes, timeHour, timeHours, timeDay, timeDays, timeWeek, timeWeeks, timeSunday, timeSundays, timeMonday, timeMondays, timeTuesday, timeTuesdays, timeWednesday, timeWednesdays, timeThursday, timeThursdays, timeFriday, timeFridays, timeSaturday, timeSaturdays, timeMonth, timeMonths, timeYear, timeYears, utcMinute, utcMinutes, utcHour, utcHours, utcDay, utcDays, utcWeek, utcWeeks, utcSunday, utcSundays, utcMonday, utcMondays, utcTuesday, utcTuesdays, utcWednesday, utcWednesdays, utcThursday, utcThursdays, utcFriday, utcFridays, utcSaturday, utcSaturdays, utcMonth, utcMonths, utcYear, utcYears, timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse, timeFormatLocale, isoFormat, isoParse, now, timer, timerFlush, timeout, interval, transition, active, interrupt, voronoi, zoom, zoomTransform, zoomIdentity */
38360/***/ (function(module, __webpack_exports__, __webpack_require__) {
38361
38362"use strict";
38363__webpack_require__.r(__webpack_exports__);
38364/* harmony import */ var _dist_package_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dist/package.js */ "./node_modules/d3/dist/package.js");
38365/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "version", function() { return _dist_package_js__WEBPACK_IMPORTED_MODULE_0__["version"]; });
38366
38367/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-array */ "./node_modules/d3-array/src/index.js");
38368/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisect"]; });
38369
38370/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectRight"]; });
38371
38372/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisectLeft"]; });
38373
38374/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ascending"]; });
38375
38376/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["bisector"]; });
38377
38378/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["cross"]; });
38379
38380/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["descending"]; });
38381
38382/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["deviation"]; });
38383
38384/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["extent"]; });
38385
38386/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["histogram"]; });
38387
38388/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdFreedmanDiaconis"]; });
38389
38390/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdScott"]; });
38391
38392/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["thresholdSturges"]; });
38393
38394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["max"]; });
38395
38396/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["mean"]; });
38397
38398/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["median"]; });
38399
38400/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["merge"]; });
38401
38402/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["min"]; });
38403
38404/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["pairs"]; });
38405
38406/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["permute"]; });
38407
38408/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["quantile"]; });
38409
38410/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["range"]; });
38411
38412/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["scan"]; });
38413
38414/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["shuffle"]; });
38415
38416/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["sum"]; });
38417
38418/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["ticks"]; });
38419
38420/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickIncrement"]; });
38421
38422/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["tickStep"]; });
38423
38424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["transpose"]; });
38425
38426/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["variance"]; });
38427
38428/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return d3_array__WEBPACK_IMPORTED_MODULE_1__["zip"]; });
38429
38430/* harmony import */ var d3_axis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3-axis */ "./node_modules/d3-axis/src/index.js");
38431/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisTop", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisTop"]; });
38432
38433/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisRight", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisRight"]; });
38434
38435/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisBottom", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisBottom"]; });
38436
38437/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "axisLeft", function() { return d3_axis__WEBPACK_IMPORTED_MODULE_2__["axisLeft"]; });
38438
38439/* harmony import */ var d3_brush__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! d3-brush */ "./node_modules/d3-brush/src/index.js");
38440/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brush", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brush"]; });
38441
38442/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushX", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushX"]; });
38443
38444/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushY", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushY"]; });
38445
38446/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "brushSelection", function() { return d3_brush__WEBPACK_IMPORTED_MODULE_3__["brushSelection"]; });
38447
38448/* harmony import */ var d3_chord__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! d3-chord */ "./node_modules/d3-chord/src/index.js");
38449/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "chord", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["chord"]; });
38450
38451/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ribbon", function() { return d3_chord__WEBPACK_IMPORTED_MODULE_4__["ribbon"]; });
38452
38453/* harmony import */ var d3_collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! d3-collection */ "./node_modules/d3-collection/src/index.js");
38454/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nest", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["nest"]; });
38455
38456/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["set"]; });
38457
38458/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["map"]; });
38459
38460/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["keys"]; });
38461
38462/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "values", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["values"]; });
38463
38464/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "entries", function() { return d3_collection__WEBPACK_IMPORTED_MODULE_5__["entries"]; });
38465
38466/* harmony import */ var d3_color__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! d3-color */ "./node_modules/d3-color/src/index.js");
38467/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "color", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["color"]; });
38468
38469/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rgb", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["rgb"]; });
38470
38471/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hsl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hsl"]; });
38472
38473/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lab", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lab"]; });
38474
38475/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hcl", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["hcl"]; });
38476
38477/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lch", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["lch"]; });
38478
38479/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "gray", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["gray"]; });
38480
38481/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cubehelix", function() { return d3_color__WEBPACK_IMPORTED_MODULE_6__["cubehelix"]; });
38482
38483/* harmony import */ var d3_contour__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! d3-contour */ "./node_modules/d3-contour/src/index.js");
38484/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contours", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contours"]; });
38485
38486/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "contourDensity", function() { return d3_contour__WEBPACK_IMPORTED_MODULE_7__["contourDensity"]; });
38487
38488/* harmony import */ var d3_dispatch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! d3-dispatch */ "./node_modules/d3-dispatch/src/index.js");
38489/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dispatch", function() { return d3_dispatch__WEBPACK_IMPORTED_MODULE_8__["dispatch"]; });
38490
38491/* harmony import */ var d3_drag__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! d3-drag */ "./node_modules/d3-drag/src/index.js");
38492/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "drag", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["drag"]; });
38493
38494/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragDisable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragDisable"]; });
38495
38496/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dragEnable", function() { return d3_drag__WEBPACK_IMPORTED_MODULE_9__["dragEnable"]; });
38497
38498/* harmony import */ var d3_dsv__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! d3-dsv */ "./node_modules/d3-dsv/src/index.js");
38499/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["dsvFormat"]; });
38500
38501/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParse"]; });
38502
38503/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvParseRows"]; });
38504
38505/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormat"]; });
38506
38507/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatBody"]; });
38508
38509/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRows"]; });
38510
38511/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatRow"]; });
38512
38513/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["csvFormatValue"]; });
38514
38515/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParse", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParse"]; });
38516
38517/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvParseRows"]; });
38518
38519/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormat"]; });
38520
38521/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatBody", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatBody"]; });
38522
38523/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRows"]; });
38524
38525/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatRow", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatRow"]; });
38526
38527/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsvFormatValue", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["tsvFormatValue"]; });
38528
38529/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "autoType", function() { return d3_dsv__WEBPACK_IMPORTED_MODULE_10__["autoType"]; });
38530
38531/* harmony import */ var d3_ease__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! d3-ease */ "./node_modules/d3-ease/src/index.js");
38532/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeLinear", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeLinear"]; });
38533
38534/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuad", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuad"]; });
38535
38536/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadIn"]; });
38537
38538/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadOut"]; });
38539
38540/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeQuadInOut"]; });
38541
38542/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubic"]; });
38543
38544/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicIn"]; });
38545
38546/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicOut"]; });
38547
38548/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCubicInOut"]; });
38549
38550/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePoly", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePoly"]; });
38551
38552/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyIn"]; });
38553
38554/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyOut"]; });
38555
38556/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easePolyInOut"]; });
38557
38558/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSin", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSin"]; });
38559
38560/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinIn"]; });
38561
38562/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinOut"]; });
38563
38564/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeSinInOut"]; });
38565
38566/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExp", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExp"]; });
38567
38568/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpIn"]; });
38569
38570/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpOut"]; });
38571
38572/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeExpInOut"]; });
38573
38574/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircle", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircle"]; });
38575
38576/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleIn"]; });
38577
38578/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleOut"]; });
38579
38580/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeCircleInOut"]; });
38581
38582/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounce", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounce"]; });
38583
38584/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceIn"]; });
38585
38586/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceOut"]; });
38587
38588/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBounceInOut"]; });
38589
38590/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBack", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBack"]; });
38591
38592/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackIn"]; });
38593
38594/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackOut"]; });
38595
38596/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeBackInOut"]; });
38597
38598/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElastic", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElastic"]; });
38599
38600/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticIn"]; });
38601
38602/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticOut"]; });
38603
38604/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return d3_ease__WEBPACK_IMPORTED_MODULE_11__["easeElasticInOut"]; });
38605
38606/* harmony import */ var d3_fetch__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! d3-fetch */ "./node_modules/d3-fetch/src/index.js");
38607/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["blob"]; });
38608
38609/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buffer", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["buffer"]; });
38610
38611/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "dsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["dsv"]; });
38612
38613/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "csv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["csv"]; });
38614
38615/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tsv", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["tsv"]; });
38616
38617/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "image", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["image"]; });
38618
38619/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "json", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["json"]; });
38620
38621/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "text", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["text"]; });
38622
38623/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "xml", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["xml"]; });
38624
38625/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "html", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["html"]; });
38626
38627/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "svg", function() { return d3_fetch__WEBPACK_IMPORTED_MODULE_12__["svg"]; });
38628
38629/* harmony import */ var d3_force__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! d3-force */ "./node_modules/d3-force/src/index.js");
38630/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCenter", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCenter"]; });
38631
38632/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceCollide", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceCollide"]; });
38633
38634/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceLink", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceLink"]; });
38635
38636/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceManyBody", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceManyBody"]; });
38637
38638/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceRadial", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceRadial"]; });
38639
38640/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceSimulation", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceSimulation"]; });
38641
38642/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceX", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceX"]; });
38643
38644/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "forceY", function() { return d3_force__WEBPACK_IMPORTED_MODULE_13__["forceY"]; });
38645
38646/* harmony import */ var d3_format__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! d3-format */ "./node_modules/d3-format/src/index.js");
38647/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDefaultLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatDefaultLocale"]; });
38648
38649/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["format"]; });
38650
38651/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatPrefix"]; });
38652
38653/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatLocale", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatLocale"]; });
38654
38655/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["formatSpecifier"]; });
38656
38657/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FormatSpecifier", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["FormatSpecifier"]; });
38658
38659/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionFixed", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionFixed"]; });
38660
38661/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionPrefix", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionPrefix"]; });
38662
38663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "precisionRound", function() { return d3_format__WEBPACK_IMPORTED_MODULE_14__["precisionRound"]; });
38664
38665/* harmony import */ var d3_geo__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! d3-geo */ "./node_modules/d3-geo/src/index.js");
38666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoArea"]; });
38667
38668/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoBounds", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoBounds"]; });
38669
38670/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCentroid", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCentroid"]; });
38671
38672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoCircle"]; });
38673
38674/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipAntimeridian", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipAntimeridian"]; });
38675
38676/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipCircle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipCircle"]; });
38677
38678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipExtent", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipExtent"]; });
38679
38680/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoClipRectangle", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoClipRectangle"]; });
38681
38682/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoContains", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoContains"]; });
38683
38684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoDistance", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoDistance"]; });
38685
38686/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule"]; });
38687
38688/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGraticule10", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGraticule10"]; });
38689
38690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoInterpolate", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoInterpolate"]; });
38691
38692/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoLength", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoLength"]; });
38693
38694/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoPath", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoPath"]; });
38695
38696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbers", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbers"]; });
38697
38698/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAlbersUsa", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAlbersUsa"]; });
38699
38700/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualArea"]; });
38701
38702/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEqualAreaRaw"]; });
38703
38704/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistant"]; });
38705
38706/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoAzimuthalEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoAzimuthalEquidistantRaw"]; });
38707
38708/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformal", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformal"]; });
38709
38710/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicConformalRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicConformalRaw"]; });
38711
38712/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualArea", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualArea"]; });
38713
38714/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEqualAreaRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEqualAreaRaw"]; });
38715
38716/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistant", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistant"]; });
38717
38718/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoConicEquidistantRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoConicEquidistantRaw"]; });
38719
38720/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarth", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarth"]; });
38721
38722/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEqualEarthRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEqualEarthRaw"]; });
38723
38724/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangular", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangular"]; });
38725
38726/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoEquirectangularRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoEquirectangularRaw"]; });
38727
38728/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonic"]; });
38729
38730/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoGnomonicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoGnomonicRaw"]; });
38731
38732/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoIdentity", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoIdentity"]; });
38733
38734/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjection", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjection"]; });
38735
38736/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoProjectionMutator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoProjectionMutator"]; });
38737
38738/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercator"]; });
38739
38740/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoMercatorRaw"]; });
38741
38742/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1"]; });
38743
38744/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoNaturalEarth1Raw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoNaturalEarth1Raw"]; });
38745
38746/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographic"]; });
38747
38748/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoOrthographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoOrthographicRaw"]; });
38749
38750/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographic", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographic"]; });
38751
38752/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStereographicRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStereographicRaw"]; });
38753
38754/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercator", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercator"]; });
38755
38756/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransverseMercatorRaw", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransverseMercatorRaw"]; });
38757
38758/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoRotation", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoRotation"]; });
38759
38760/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoStream", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoStream"]; });
38761
38762/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "geoTransform", function() { return d3_geo__WEBPACK_IMPORTED_MODULE_15__["geoTransform"]; });
38763
38764/* harmony import */ var d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! d3-hierarchy */ "./node_modules/d3-hierarchy/src/index.js");
38765/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cluster", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["cluster"]; });
38766
38767/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hierarchy", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["hierarchy"]; });
38768
38769/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pack", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["pack"]; });
38770
38771/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packSiblings", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packSiblings"]; });
38772
38773/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "packEnclose", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["packEnclose"]; });
38774
38775/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "partition", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["partition"]; });
38776
38777/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stratify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["stratify"]; });
38778
38779/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tree", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["tree"]; });
38780
38781/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemap", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemap"]; });
38782
38783/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapBinary", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapBinary"]; });
38784
38785/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapDice"]; });
38786
38787/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSlice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSlice"]; });
38788
38789/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSliceDice", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSliceDice"]; });
38790
38791/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapSquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapSquarify"]; });
38792
38793/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "treemapResquarify", function() { return d3_hierarchy__WEBPACK_IMPORTED_MODULE_16__["treemapResquarify"]; });
38794
38795/* harmony import */ var d3_interpolate__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! d3-interpolate */ "./node_modules/d3-interpolate/src/index.js");
38796/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolate"]; });
38797
38798/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateArray"]; });
38799
38800/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasis"]; });
38801
38802/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateBasisClosed"]; });
38803
38804/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDate"]; });
38805
38806/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateDiscrete", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateDiscrete"]; });
38807
38808/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHue", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHue"]; });
38809
38810/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumber"]; });
38811
38812/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateNumberArray", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateNumberArray"]; });
38813
38814/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateObject"]; });
38815
38816/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRound"]; });
38817
38818/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateString", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateString"]; });
38819
38820/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformCss"]; });
38821
38822/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateTransformSvg"]; });
38823
38824/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateZoom"]; });
38825
38826/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgb"]; });
38827
38828/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasis"]; });
38829
38830/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateRgbBasisClosed"]; });
38831
38832/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHsl"]; });
38833
38834/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHslLong"]; });
38835
38836/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateLab"]; });
38837
38838/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHcl"]; });
38839
38840/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateHclLong"]; });
38841
38842/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelix"]; });
38843
38844/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["interpolateCubehelixLong"]; });
38845
38846/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "piecewise", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["piecewise"]; });
38847
38848/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantize", function() { return d3_interpolate__WEBPACK_IMPORTED_MODULE_17__["quantize"]; });
38849
38850/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! d3-path */ "./node_modules/d3-path/src/index.js");
38851/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return d3_path__WEBPACK_IMPORTED_MODULE_18__["path"]; });
38852
38853/* harmony import */ var d3_polygon__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! d3-polygon */ "./node_modules/d3-polygon/src/index.js");
38854/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonArea", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonArea"]; });
38855
38856/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonCentroid", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonCentroid"]; });
38857
38858/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonHull", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonHull"]; });
38859
38860/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonContains", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonContains"]; });
38861
38862/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "polygonLength", function() { return d3_polygon__WEBPACK_IMPORTED_MODULE_19__["polygonLength"]; });
38863
38864/* harmony import */ var d3_quadtree__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! d3-quadtree */ "./node_modules/d3-quadtree/src/index.js");
38865/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quadtree", function() { return d3_quadtree__WEBPACK_IMPORTED_MODULE_20__["quadtree"]; });
38866
38867/* harmony import */ var d3_random__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! d3-random */ "./node_modules/d3-random/src/index.js");
38868/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomUniform", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomUniform"]; });
38869
38870/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomNormal"]; });
38871
38872/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomLogNormal", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomLogNormal"]; });
38873
38874/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomBates", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomBates"]; });
38875
38876/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomIrwinHall", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomIrwinHall"]; });
38877
38878/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "randomExponential", function() { return d3_random__WEBPACK_IMPORTED_MODULE_21__["randomExponential"]; });
38879
38880/* harmony import */ var d3_scale__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! d3-scale */ "./node_modules/d3-scale/src/index.js");
38881/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleBand", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleBand"]; });
38882
38883/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePoint", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePoint"]; });
38884
38885/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleIdentity"]; });
38886
38887/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLinear"]; });
38888
38889/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleLog"]; });
38890
38891/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSymlog"]; });
38892
38893/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleOrdinal"]; });
38894
38895/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleImplicit"]; });
38896
38897/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scalePow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scalePow"]; });
38898
38899/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSqrt"]; });
38900
38901/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantile"]; });
38902
38903/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleQuantize"]; });
38904
38905/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleThreshold"]; });
38906
38907/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleTime", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleTime"]; });
38908
38909/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleUtc"]; });
38910
38911/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequential"]; });
38912
38913/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialLog"]; });
38914
38915/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialPow"]; });
38916
38917/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSqrt"]; });
38918
38919/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialSymlog"]; });
38920
38921/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleSequentialQuantile", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleSequentialQuantile"]; });
38922
38923/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDiverging"]; });
38924
38925/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingLog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingLog"]; });
38926
38927/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingPow", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingPow"]; });
38928
38929/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSqrt", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSqrt"]; });
38930
38931/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scaleDivergingSymlog", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["scaleDivergingSymlog"]; });
38932
38933/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickFormat", function() { return d3_scale__WEBPACK_IMPORTED_MODULE_22__["tickFormat"]; });
38934
38935/* harmony import */ var d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! d3-scale-chromatic */ "./node_modules/d3-scale-chromatic/src/index.js");
38936/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeCategory10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeCategory10"]; });
38937
38938/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeAccent", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeAccent"]; });
38939
38940/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeDark2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeDark2"]; });
38941
38942/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePaired", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePaired"]; });
38943
38944/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel1"]; });
38945
38946/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePastel2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePastel2"]; });
38947
38948/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet1", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet1"]; });
38949
38950/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet2", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet2"]; });
38951
38952/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSet3", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSet3"]; });
38953
38954/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeTableau10", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeTableau10"]; });
38955
38956/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBrBG"]; });
38957
38958/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBrBG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBrBG"]; });
38959
38960/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePRGn"]; });
38961
38962/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePRGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePRGn"]; });
38963
38964/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePiYG"]; });
38965
38966/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePiYG", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePiYG"]; });
38967
38968/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuOr"]; });
38969
38970/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuOr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuOr"]; });
38971
38972/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdBu"]; });
38973
38974/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdBu"]; });
38975
38976/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdGy"]; });
38977
38978/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdGy", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdGy"]; });
38979
38980/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlBu"]; });
38981
38982/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlBu"]; });
38983
38984/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdYlGn"]; });
38985
38986/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdYlGn"]; });
38987
38988/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSpectral"]; });
38989
38990/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeSpectral", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeSpectral"]; });
38991
38992/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuGn"]; });
38993
38994/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuGn"]; });
38995
38996/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBuPu"]; });
38997
38998/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBuPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBuPu"]; });
38999
39000/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGnBu"]; });
39001
39002/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGnBu"]; });
39003
39004/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOrRd"]; });
39005
39006/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOrRd"]; });
39007
39008/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBuGn"]; });
39009
39010/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBuGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBuGn"]; });
39011
39012/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuBu"]; });
39013
39014/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuBu"]; });
39015
39016/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePuRd"]; });
39017
39018/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePuRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePuRd"]; });
39019
39020/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRdPu"]; });
39021
39022/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeRdPu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeRdPu"]; });
39023
39024/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGnBu"]; });
39025
39026/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGnBu", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGnBu"]; });
39027
39028/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlGn"]; });
39029
39030/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlGn", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlGn"]; });
39031
39032/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrBr"]; });
39033
39034/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrBr", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrBr"]; });
39035
39036/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateYlOrRd"]; });
39037
39038/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeYlOrRd", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeYlOrRd"]; });
39039
39040/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateBlues"]; });
39041
39042/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeBlues", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeBlues"]; });
39043
39044/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreens"]; });
39045
39046/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreens", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreens"]; });
39047
39048/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateGreys"]; });
39049
39050/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeGreys", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeGreys"]; });
39051
39052/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePurples"]; });
39053
39054/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemePurples", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemePurples"]; });
39055
39056/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateReds"]; });
39057
39058/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeReds", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeReds"]; });
39059
39060/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateOranges"]; });
39061
39062/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "schemeOranges", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["schemeOranges"]; });
39063
39064/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCividis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCividis"]; });
39065
39066/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCubehelixDefault", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCubehelixDefault"]; });
39067
39068/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateRainbow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateRainbow"]; });
39069
39070/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateWarm", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateWarm"]; });
39071
39072/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateCool", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateCool"]; });
39073
39074/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateSinebow", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateSinebow"]; });
39075
39076/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateTurbo", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateTurbo"]; });
39077
39078/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateViridis", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateViridis"]; });
39079
39080/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateMagma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateMagma"]; });
39081
39082/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolateInferno", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolateInferno"]; });
39083
39084/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolatePlasma", function() { return d3_scale_chromatic__WEBPACK_IMPORTED_MODULE_23__["interpolatePlasma"]; });
39085
39086/* harmony import */ var d3_selection__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! d3-selection */ "./node_modules/d3-selection/src/index.js");
39087/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "create", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["create"]; });
39088
39089/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "creator", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["creator"]; });
39090
39091/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "local", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["local"]; });
39092
39093/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matcher", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["matcher"]; });
39094
39095/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mouse", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["mouse"]; });
39096
39097/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespace", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespace"]; });
39098
39099/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "namespaces", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["namespaces"]; });
39100
39101/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clientPoint", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["clientPoint"]; });
39102
39103/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "select", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["select"]; });
39104
39105/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectAll"]; });
39106
39107/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selection", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selection"]; });
39108
39109/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selector"]; });
39110
39111/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectorAll", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["selectorAll"]; });
39112
39113/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "style", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["style"]; });
39114
39115/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touch", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touch"]; });
39116
39117/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "touches", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["touches"]; });
39118
39119/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "window", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["window"]; });
39120
39121/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "event", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["event"]; });
39122
39123/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "customEvent", function() { return d3_selection__WEBPACK_IMPORTED_MODULE_24__["customEvent"]; });
39124
39125/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! d3-shape */ "./node_modules/d3-shape/src/index.js");
39126/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["arc"]; });
39127
39128/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["area"]; });
39129
39130/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["line"]; });
39131
39132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pie"]; });
39133
39134/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["areaRadial"]; });
39135
39136/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialArea"]; });
39137
39138/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["lineRadial"]; });
39139
39140/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["radialLine"]; });
39141
39142/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["pointRadial"]; });
39143
39144/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkHorizontal"]; });
39145
39146/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkVertical"]; });
39147
39148/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["linkRadial"]; });
39149
39150/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbol"]; });
39151
39152/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbols"]; });
39153
39154/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCircle"]; });
39155
39156/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolCross"]; });
39157
39158/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolDiamond"]; });
39159
39160/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolSquare"]; });
39161
39162/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolStar"]; });
39163
39164/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolTriangle"]; });
39165
39166/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["symbolWye"]; });
39167
39168/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisClosed"]; });
39169
39170/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasisOpen"]; });
39171
39172/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBasis"]; });
39173
39174/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveBundle"]; });
39175
39176/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalClosed"]; });
39177
39178/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinalOpen"]; });
39179
39180/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCardinal"]; });
39181
39182/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomClosed"]; });
39183
39184/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRomOpen"]; });
39185
39186/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveCatmullRom"]; });
39187
39188/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinearClosed"]; });
39189
39190/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveLinear"]; });
39191
39192/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneX"]; });
39193
39194/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveMonotoneY"]; });
39195
39196/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveNatural"]; });
39197
39198/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStep"]; });
39199
39200/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepAfter"]; });
39201
39202/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["curveStepBefore"]; });
39203
39204/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stack"]; });
39205
39206/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetExpand"]; });
39207
39208/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetDiverging"]; });
39209
39210/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetNone"]; });
39211
39212/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetSilhouette"]; });
39213
39214/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOffsetWiggle"]; });
39215
39216/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAppearance"]; });
39217
39218/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderAscending"]; });
39219
39220/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderDescending"]; });
39221
39222/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderInsideOut"]; });
39223
39224/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderNone"]; });
39225
39226/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return d3_shape__WEBPACK_IMPORTED_MODULE_25__["stackOrderReverse"]; });
39227
39228/* harmony import */ var d3_time__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! d3-time */ "./node_modules/d3-time/src/index.js");
39229/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeInterval", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeInterval"]; });
39230
39231/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMillisecond"]; });
39232
39233/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMilliseconds"]; });
39234
39235/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMillisecond"]; });
39236
39237/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMilliseconds"]; });
39238
39239/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSecond"]; });
39240
39241/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSeconds"]; });
39242
39243/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSecond", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSecond"]; });
39244
39245/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSeconds"]; });
39246
39247/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinute"]; });
39248
39249/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMinutes"]; });
39250
39251/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHour"]; });
39252
39253/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeHours"]; });
39254
39255/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDay"]; });
39256
39257/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeDays"]; });
39258
39259/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeek"]; });
39260
39261/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWeeks"]; });
39262
39263/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSunday"]; });
39264
39265/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSundays"]; });
39266
39267/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonday"]; });
39268
39269/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMondays"]; });
39270
39271/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesday"]; });
39272
39273/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeTuesdays"]; });
39274
39275/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesday"]; });
39276
39277/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeWednesdays"]; });
39278
39279/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursday"]; });
39280
39281/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeThursdays"]; });
39282
39283/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFriday"]; });
39284
39285/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeFridays"]; });
39286
39287/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturday"]; });
39288
39289/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeSaturdays"]; });
39290
39291/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonth"]; });
39292
39293/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeMonths"]; });
39294
39295/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYear"]; });
39296
39297/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["timeYears"]; });
39298
39299/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinute", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinute"]; });
39300
39301/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMinutes"]; });
39302
39303/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHour", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHour"]; });
39304
39305/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcHours", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcHours"]; });
39306
39307/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDay", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDay"]; });
39308
39309/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcDays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcDays"]; });
39310
39311/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeek", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeek"]; });
39312
39313/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWeeks"]; });
39314
39315/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSunday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSunday"]; });
39316
39317/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSundays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSundays"]; });
39318
39319/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonday"]; });
39320
39321/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMondays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMondays"]; });
39322
39323/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesday"]; });
39324
39325/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcTuesdays"]; });
39326
39327/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesday"]; });
39328
39329/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcWednesdays"]; });
39330
39331/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursday"]; });
39332
39333/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcThursdays"]; });
39334
39335/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFriday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFriday"]; });
39336
39337/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFridays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcFridays"]; });
39338
39339/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturday"]; });
39340
39341/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcSaturdays"]; });
39342
39343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonth", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonth"]; });
39344
39345/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcMonths", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcMonths"]; });
39346
39347/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYear", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYear"]; });
39348
39349/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcYears", function() { return d3_time__WEBPACK_IMPORTED_MODULE_26__["utcYears"]; });
39350
39351/* harmony import */ var d3_time_format__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! d3-time-format */ "./node_modules/d3-time-format/src/index.js");
39352/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatDefaultLocale"]; });
39353
39354/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormat"]; });
39355
39356/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeParse"]; });
39357
39358/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcFormat"]; });
39359
39360/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "utcParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["utcParse"]; });
39361
39362/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["timeFormatLocale"]; });
39363
39364/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoFormat", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoFormat"]; });
39365
39366/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isoParse", function() { return d3_time_format__WEBPACK_IMPORTED_MODULE_27__["isoParse"]; });
39367
39368/* harmony import */ var d3_timer__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! d3-timer */ "./node_modules/d3-timer/src/index.js");
39369/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "now", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["now"]; });
39370
39371/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timer", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timer"]; });
39372
39373/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timerFlush", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timerFlush"]; });
39374
39375/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "timeout", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["timeout"]; });
39376
39377/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interval", function() { return d3_timer__WEBPACK_IMPORTED_MODULE_28__["interval"]; });
39378
39379/* harmony import */ var d3_transition__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! d3-transition */ "./node_modules/d3-transition/src/index.js");
39380/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["transition"]; });
39381
39382/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "active", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["active"]; });
39383
39384/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interrupt", function() { return d3_transition__WEBPACK_IMPORTED_MODULE_29__["interrupt"]; });
39385
39386/* harmony import */ var d3_voronoi__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! d3-voronoi */ "./node_modules/d3-voronoi/src/index.js");
39387/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "voronoi", function() { return d3_voronoi__WEBPACK_IMPORTED_MODULE_30__["voronoi"]; });
39388
39389/* harmony import */ var d3_zoom__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! d3-zoom */ "./node_modules/d3-zoom/src/index.js");
39390/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoom", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoom"]; });
39391
39392/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomTransform"]; });
39393
39394/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return d3_zoom__WEBPACK_IMPORTED_MODULE_31__["zoomIdentity"]; });
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430/***/ }),
39431
39432/***/ "./node_modules/dagre-d3/index.js":
39433/*!****************************************!*\
39434 !*** ./node_modules/dagre-d3/index.js ***!
39435 \****************************************/
39436/*! no static exports found */
39437/***/ (function(module, exports, __webpack_require__) {
39438
39439/**
39440 * @license
39441 * Copyright (c) 2012-2013 Chris Pettitt
39442 *
39443 * Permission is hereby granted, free of charge, to any person obtaining a copy
39444 * of this software and associated documentation files (the "Software"), to deal
39445 * in the Software without restriction, including without limitation the rights
39446 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
39447 * copies of the Software, and to permit persons to whom the Software is
39448 * furnished to do so, subject to the following conditions:
39449 *
39450 * The above copyright notice and this permission notice shall be included in
39451 * all copies or substantial portions of the Software.
39452 *
39453 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39454 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39455 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39456 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39457 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39458 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
39459 * THE SOFTWARE.
39460 */
39461module.exports = {
39462 graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre-d3/lib/graphlib.js"),
39463 dagre: __webpack_require__(/*! ./lib/dagre */ "./node_modules/dagre-d3/lib/dagre.js"),
39464 intersect: __webpack_require__(/*! ./lib/intersect */ "./node_modules/dagre-d3/lib/intersect/index.js"),
39465 render: __webpack_require__(/*! ./lib/render */ "./node_modules/dagre-d3/lib/render.js"),
39466 util: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre-d3/lib/util.js"),
39467 version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre-d3/lib/version.js")
39468};
39469
39470
39471/***/ }),
39472
39473/***/ "./node_modules/dagre-d3/lib/arrows.js":
39474/*!*********************************************!*\
39475 !*** ./node_modules/dagre-d3/lib/arrows.js ***!
39476 \*********************************************/
39477/*! no static exports found */
39478/***/ (function(module, exports, __webpack_require__) {
39479
39480var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
39481
39482module.exports = {
39483 "default": normal,
39484 "normal": normal,
39485 "vee": vee,
39486 "undirected": undirected
39487};
39488
39489function normal(parent, id, edge, type) {
39490 var marker = parent.append("marker")
39491 .attr("id", id)
39492 .attr("viewBox", "0 0 10 10")
39493 .attr("refX", 9)
39494 .attr("refY", 5)
39495 .attr("markerUnits", "strokeWidth")
39496 .attr("markerWidth", 8)
39497 .attr("markerHeight", 6)
39498 .attr("orient", "auto");
39499
39500 var path = marker.append("path")
39501 .attr("d", "M 0 0 L 10 5 L 0 10 z")
39502 .style("stroke-width", 1)
39503 .style("stroke-dasharray", "1,0");
39504 util.applyStyle(path, edge[type + "Style"]);
39505 if (edge[type + "Class"]) {
39506 path.attr("class", edge[type + "Class"]);
39507 }
39508}
39509
39510function vee(parent, id, edge, type) {
39511 var marker = parent.append("marker")
39512 .attr("id", id)
39513 .attr("viewBox", "0 0 10 10")
39514 .attr("refX", 9)
39515 .attr("refY", 5)
39516 .attr("markerUnits", "strokeWidth")
39517 .attr("markerWidth", 8)
39518 .attr("markerHeight", 6)
39519 .attr("orient", "auto");
39520
39521 var path = marker.append("path")
39522 .attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z")
39523 .style("stroke-width", 1)
39524 .style("stroke-dasharray", "1,0");
39525 util.applyStyle(path, edge[type + "Style"]);
39526 if (edge[type + "Class"]) {
39527 path.attr("class", edge[type + "Class"]);
39528 }
39529}
39530
39531function undirected(parent, id, edge, type) {
39532 var marker = parent.append("marker")
39533 .attr("id", id)
39534 .attr("viewBox", "0 0 10 10")
39535 .attr("refX", 9)
39536 .attr("refY", 5)
39537 .attr("markerUnits", "strokeWidth")
39538 .attr("markerWidth", 8)
39539 .attr("markerHeight", 6)
39540 .attr("orient", "auto");
39541
39542 var path = marker.append("path")
39543 .attr("d", "M 0 5 L 10 5")
39544 .style("stroke-width", 1)
39545 .style("stroke-dasharray", "1,0");
39546 util.applyStyle(path, edge[type + "Style"]);
39547 if (edge[type + "Class"]) {
39548 path.attr("class", edge[type + "Class"]);
39549 }
39550}
39551
39552
39553/***/ }),
39554
39555/***/ "./node_modules/dagre-d3/lib/create-clusters.js":
39556/*!******************************************************!*\
39557 !*** ./node_modules/dagre-d3/lib/create-clusters.js ***!
39558 \******************************************************/
39559/*! no static exports found */
39560/***/ (function(module, exports, __webpack_require__) {
39561
39562var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
39563var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
39564var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js");
39565
39566module.exports = createClusters;
39567
39568function createClusters(selection, g) {
39569 var clusters = g.nodes().filter(function(v) { return util.isSubgraph(g, v); });
39570 var svgClusters = selection.selectAll("g.cluster")
39571 .data(clusters, function(v) { return v; });
39572
39573 svgClusters.selectAll("*").remove();
39574 svgClusters.enter().append("g")
39575 .attr("class", "cluster")
39576 .attr("id",function(v){
39577 var node = g.node(v);
39578 return node.id;
39579 })
39580 .style("opacity", 0);
39581
39582 svgClusters = selection.selectAll("g.cluster");
39583
39584 util.applyTransition(svgClusters, g)
39585 .style("opacity", 1);
39586
39587 svgClusters.each(function(v) {
39588 var node = g.node(v);
39589 var thisGroup = d3.select(this);
39590 d3.select(this).append("rect");
39591 var labelGroup = thisGroup.append("g").attr("class", "label");
39592 addLabel(labelGroup, node, node.clusterLabelPos);
39593 });
39594
39595 svgClusters.selectAll("rect").each(function(c) {
39596 var node = g.node(c);
39597 var domCluster = d3.select(this);
39598 util.applyStyle(domCluster, node.style);
39599 });
39600
39601 var exitSelection;
39602
39603 if (svgClusters.exit) {
39604 exitSelection = svgClusters.exit();
39605 } else {
39606 exitSelection = svgClusters.selectAll(null); // empty selection
39607 }
39608
39609 util.applyTransition(exitSelection, g)
39610 .style("opacity", 0)
39611 .remove();
39612
39613 return svgClusters;
39614}
39615
39616
39617/***/ }),
39618
39619/***/ "./node_modules/dagre-d3/lib/create-edge-labels.js":
39620/*!*********************************************************!*\
39621 !*** ./node_modules/dagre-d3/lib/create-edge-labels.js ***!
39622 \*********************************************************/
39623/*! no static exports found */
39624/***/ (function(module, exports, __webpack_require__) {
39625
39626"use strict";
39627
39628
39629var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
39630var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js");
39631var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
39632var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
39633
39634module.exports = createEdgeLabels;
39635
39636function createEdgeLabels(selection, g) {
39637 var svgEdgeLabels = selection.selectAll("g.edgeLabel")
39638 .data(g.edges(), function(e) { return util.edgeToId(e); })
39639 .classed("update", true);
39640
39641 svgEdgeLabels.exit().remove();
39642 svgEdgeLabels.enter().append("g")
39643 .classed("edgeLabel", true)
39644 .style("opacity", 0);
39645
39646 svgEdgeLabels = selection.selectAll("g.edgeLabel");
39647
39648 svgEdgeLabels.each(function(e) {
39649 var root = d3.select(this);
39650 root.select(".label").remove();
39651 var edge = g.edge(e);
39652 var label = addLabel(root, g.edge(e), 0, 0).classed("label", true);
39653 var bbox = label.node().getBBox();
39654
39655 if (edge.labelId) { label.attr("id", edge.labelId); }
39656 if (!_.has(edge, "width")) { edge.width = bbox.width; }
39657 if (!_.has(edge, "height")) { edge.height = bbox.height; }
39658 });
39659
39660 var exitSelection;
39661
39662 if (svgEdgeLabels.exit) {
39663 exitSelection = svgEdgeLabels.exit();
39664 } else {
39665 exitSelection = svgEdgeLabels.selectAll(null); // empty selection
39666 }
39667
39668 util.applyTransition(exitSelection, g)
39669 .style("opacity", 0)
39670 .remove();
39671
39672 return svgEdgeLabels;
39673}
39674
39675
39676/***/ }),
39677
39678/***/ "./node_modules/dagre-d3/lib/create-edge-paths.js":
39679/*!********************************************************!*\
39680 !*** ./node_modules/dagre-d3/lib/create-edge-paths.js ***!
39681 \********************************************************/
39682/*! no static exports found */
39683/***/ (function(module, exports, __webpack_require__) {
39684
39685"use strict";
39686
39687
39688var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
39689var intersectNode = __webpack_require__(/*! ./intersect/intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js");
39690var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
39691var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
39692module.exports = createEdgePaths;
39693
39694function createEdgePaths(selection, g, arrows) {
39695 var previousPaths = selection.selectAll("g.edgePath")
39696 .data(g.edges(), function(e) { return util.edgeToId(e); })
39697 .classed("update", true);
39698
39699 var newPaths = enter(previousPaths, g);
39700 exit(previousPaths, g);
39701
39702 var svgPaths = previousPaths.merge !== undefined ? previousPaths.merge(newPaths) : previousPaths;
39703 util.applyTransition(svgPaths, g)
39704 .style("opacity", 1);
39705
39706 // Save DOM element in the path group, and set ID and class
39707 svgPaths.each(function(e) {
39708 var domEdge = d3.select(this);
39709 var edge = g.edge(e);
39710 edge.elem = this;
39711
39712 if (edge.id) {
39713 domEdge.attr("id", edge.id);
39714 }
39715
39716 util.applyClass(domEdge, edge["class"],
39717 (domEdge.classed("update") ? "update " : "") + "edgePath");
39718 });
39719
39720 svgPaths.selectAll("path.path")
39721 .each(function(e) {
39722 var edge = g.edge(e);
39723 edge.arrowheadId = _.uniqueId("arrowhead");
39724
39725 var domEdge = d3.select(this)
39726 .attr("marker-end", function() {
39727 return "url(" + makeFragmentRef(location.href, edge.arrowheadId) + ")";
39728 })
39729 .style("fill", "none");
39730
39731 util.applyTransition(domEdge, g)
39732 .attr("d", function(e) { return calcPoints(g, e); });
39733
39734 util.applyStyle(domEdge, edge.style);
39735 });
39736
39737 svgPaths.selectAll("defs *").remove();
39738 svgPaths.selectAll("defs")
39739 .each(function(e) {
39740 var edge = g.edge(e);
39741 var arrowhead = arrows[edge.arrowhead];
39742 arrowhead(d3.select(this), edge.arrowheadId, edge, "arrowhead");
39743 });
39744
39745 return svgPaths;
39746}
39747
39748function makeFragmentRef(url, fragmentId) {
39749 var baseUrl = url.split("#")[0];
39750 return baseUrl + "#" + fragmentId;
39751}
39752
39753function calcPoints(g, e) {
39754 var edge = g.edge(e);
39755 var tail = g.node(e.v);
39756 var head = g.node(e.w);
39757 var points = edge.points.slice(1, edge.points.length - 1);
39758 points.unshift(intersectNode(tail, points[0]));
39759 points.push(intersectNode(head, points[points.length - 1]));
39760
39761 return createLine(edge, points);
39762}
39763
39764function createLine(edge, points) {
39765 var line = (d3.line || d3.svg.line)()
39766 .x(function(d) { return d.x; })
39767 .y(function(d) { return d.y; });
39768
39769 (line.curve || line.interpolate)(edge.curve);
39770
39771 return line(points);
39772}
39773
39774function getCoords(elem) {
39775 var bbox = elem.getBBox();
39776 var matrix = elem.ownerSVGElement.getScreenCTM()
39777 .inverse()
39778 .multiply(elem.getScreenCTM())
39779 .translate(bbox.width / 2, bbox.height / 2);
39780 return { x: matrix.e, y: matrix.f };
39781}
39782
39783function enter(svgPaths, g) {
39784 var svgPathsEnter = svgPaths.enter().append("g")
39785 .attr("class", "edgePath")
39786 .style("opacity", 0);
39787 svgPathsEnter.append("path")
39788 .attr("class", "path")
39789 .attr("d", function(e) {
39790 var edge = g.edge(e);
39791 var sourceElem = g.node(e.v).elem;
39792 var points = _.range(edge.points.length).map(function() { return getCoords(sourceElem); });
39793 return createLine(edge, points);
39794 });
39795 svgPathsEnter.append("defs");
39796 return svgPathsEnter;
39797}
39798
39799function exit(svgPaths, g) {
39800 var svgPathExit = svgPaths.exit();
39801 util.applyTransition(svgPathExit, g)
39802 .style("opacity", 0)
39803 .remove();
39804}
39805
39806
39807/***/ }),
39808
39809/***/ "./node_modules/dagre-d3/lib/create-nodes.js":
39810/*!***************************************************!*\
39811 !*** ./node_modules/dagre-d3/lib/create-nodes.js ***!
39812 \***************************************************/
39813/*! no static exports found */
39814/***/ (function(module, exports, __webpack_require__) {
39815
39816"use strict";
39817
39818
39819var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
39820var addLabel = __webpack_require__(/*! ./label/add-label */ "./node_modules/dagre-d3/lib/label/add-label.js");
39821var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
39822var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
39823
39824module.exports = createNodes;
39825
39826function createNodes(selection, g, shapes) {
39827 var simpleNodes = g.nodes().filter(function(v) { return !util.isSubgraph(g, v); });
39828 var svgNodes = selection.selectAll("g.node")
39829 .data(simpleNodes, function(v) { return v; })
39830 .classed("update", true);
39831
39832 svgNodes.exit().remove();
39833
39834 svgNodes.enter().append("g")
39835 .attr("class", "node")
39836 .style("opacity", 0);
39837
39838 svgNodes = selection.selectAll("g.node");
39839
39840 svgNodes.each(function(v) {
39841 var node = g.node(v);
39842 var thisGroup = d3.select(this);
39843 util.applyClass(thisGroup, node["class"],
39844 (thisGroup.classed("update") ? "update " : "") + "node");
39845
39846 thisGroup.select("g.label").remove();
39847 var labelGroup = thisGroup.append("g").attr("class", "label");
39848 var labelDom = addLabel(labelGroup, node);
39849 var shape = shapes[node.shape];
39850 var bbox = _.pick(labelDom.node().getBBox(), "width", "height");
39851
39852 node.elem = this;
39853
39854 if (node.id) { thisGroup.attr("id", node.id); }
39855 if (node.labelId) { labelGroup.attr("id", node.labelId); }
39856
39857 if (_.has(node, "width")) { bbox.width = node.width; }
39858 if (_.has(node, "height")) { bbox.height = node.height; }
39859
39860 bbox.width += node.paddingLeft + node.paddingRight;
39861 bbox.height += node.paddingTop + node.paddingBottom;
39862 labelGroup.attr("transform", "translate(" +
39863 ((node.paddingLeft - node.paddingRight) / 2) + "," +
39864 ((node.paddingTop - node.paddingBottom) / 2) + ")");
39865
39866 var root = d3.select(this);
39867 root.select(".label-container").remove();
39868 var shapeSvg = shape(root, bbox, node).classed("label-container", true);
39869 util.applyStyle(shapeSvg, node.style);
39870
39871 var shapeBBox = shapeSvg.node().getBBox();
39872 node.width = shapeBBox.width;
39873 node.height = shapeBBox.height;
39874 });
39875
39876 var exitSelection;
39877
39878 if (svgNodes.exit) {
39879 exitSelection = svgNodes.exit();
39880 } else {
39881 exitSelection = svgNodes.selectAll(null); // empty selection
39882 }
39883
39884 util.applyTransition(exitSelection, g)
39885 .style("opacity", 0)
39886 .remove();
39887
39888 return svgNodes;
39889}
39890
39891
39892/***/ }),
39893
39894/***/ "./node_modules/dagre-d3/lib/d3.js":
39895/*!*****************************************!*\
39896 !*** ./node_modules/dagre-d3/lib/d3.js ***!
39897 \*****************************************/
39898/*! no static exports found */
39899/***/ (function(module, exports, __webpack_require__) {
39900
39901// Stub to get D3 either via NPM or from the global object
39902var d3;
39903
39904if (!d3) {
39905 if (true) {
39906 try {
39907 d3 = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
39908 }
39909 catch (e) {
39910 // continue regardless of error
39911 }
39912 }
39913}
39914
39915if (!d3) {
39916 d3 = window.d3;
39917}
39918
39919module.exports = d3;
39920
39921
39922/***/ }),
39923
39924/***/ "./node_modules/dagre-d3/lib/dagre.js":
39925/*!********************************************!*\
39926 !*** ./node_modules/dagre-d3/lib/dagre.js ***!
39927 \********************************************/
39928/*! no static exports found */
39929/***/ (function(module, exports, __webpack_require__) {
39930
39931/* global window */
39932
39933var dagre;
39934
39935if (true) {
39936 try {
39937 dagre = __webpack_require__(/*! dagre */ "./node_modules/dagre/index.js");
39938 } catch (e) {
39939 // continue regardless of error
39940 }
39941}
39942
39943if (!dagre) {
39944 dagre = window.dagre;
39945}
39946
39947module.exports = dagre;
39948
39949
39950/***/ }),
39951
39952/***/ "./node_modules/dagre-d3/lib/graphlib.js":
39953/*!***********************************************!*\
39954 !*** ./node_modules/dagre-d3/lib/graphlib.js ***!
39955 \***********************************************/
39956/*! no static exports found */
39957/***/ (function(module, exports, __webpack_require__) {
39958
39959/* global window */
39960
39961var graphlib;
39962
39963if (true) {
39964 try {
39965 graphlib = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js");
39966 }
39967 catch (e) {
39968 // continue regardless of error
39969 }
39970}
39971
39972if (!graphlib) {
39973 graphlib = window.graphlib;
39974}
39975
39976module.exports = graphlib;
39977
39978
39979/***/ }),
39980
39981/***/ "./node_modules/dagre-d3/lib/intersect/index.js":
39982/*!******************************************************!*\
39983 !*** ./node_modules/dagre-d3/lib/intersect/index.js ***!
39984 \******************************************************/
39985/*! no static exports found */
39986/***/ (function(module, exports, __webpack_require__) {
39987
39988module.exports = {
39989 node: __webpack_require__(/*! ./intersect-node */ "./node_modules/dagre-d3/lib/intersect/intersect-node.js"),
39990 circle: __webpack_require__(/*! ./intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js"),
39991 ellipse: __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js"),
39992 polygon: __webpack_require__(/*! ./intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js"),
39993 rect: __webpack_require__(/*! ./intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js")
39994};
39995
39996
39997/***/ }),
39998
39999/***/ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js":
40000/*!*****************************************************************!*\
40001 !*** ./node_modules/dagre-d3/lib/intersect/intersect-circle.js ***!
40002 \*****************************************************************/
40003/*! no static exports found */
40004/***/ (function(module, exports, __webpack_require__) {
40005
40006var intersectEllipse = __webpack_require__(/*! ./intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js");
40007
40008module.exports = intersectCircle;
40009
40010function intersectCircle(node, rx, point) {
40011 return intersectEllipse(node, rx, rx, point);
40012}
40013
40014
40015/***/ }),
40016
40017/***/ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js":
40018/*!******************************************************************!*\
40019 !*** ./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js ***!
40020 \******************************************************************/
40021/*! no static exports found */
40022/***/ (function(module, exports) {
40023
40024module.exports = intersectEllipse;
40025
40026function intersectEllipse(node, rx, ry, point) {
40027 // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html
40028
40029 var cx = node.x;
40030 var cy = node.y;
40031
40032 var px = cx - point.x;
40033 var py = cy - point.y;
40034
40035 var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
40036
40037 var dx = Math.abs(rx * ry * px / det);
40038 if (point.x < cx) {
40039 dx = -dx;
40040 }
40041 var dy = Math.abs(rx * ry * py / det);
40042 if (point.y < cy) {
40043 dy = -dy;
40044 }
40045
40046 return {x: cx + dx, y: cy + dy};
40047}
40048
40049
40050
40051/***/ }),
40052
40053/***/ "./node_modules/dagre-d3/lib/intersect/intersect-line.js":
40054/*!***************************************************************!*\
40055 !*** ./node_modules/dagre-d3/lib/intersect/intersect-line.js ***!
40056 \***************************************************************/
40057/*! no static exports found */
40058/***/ (function(module, exports) {
40059
40060module.exports = intersectLine;
40061
40062/*
40063 * Returns the point at which two lines, p and q, intersect or returns
40064 * undefined if they do not intersect.
40065 */
40066function intersectLine(p1, p2, q1, q2) {
40067 // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,
40068 // p7 and p473.
40069
40070 var a1, a2, b1, b2, c1, c2;
40071 var r1, r2 , r3, r4;
40072 var denom, offset, num;
40073 var x, y;
40074
40075 // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +
40076 // b1 y + c1 = 0.
40077 a1 = p2.y - p1.y;
40078 b1 = p1.x - p2.x;
40079 c1 = (p2.x * p1.y) - (p1.x * p2.y);
40080
40081 // Compute r3 and r4.
40082 r3 = ((a1 * q1.x) + (b1 * q1.y) + c1);
40083 r4 = ((a1 * q2.x) + (b1 * q2.y) + c1);
40084
40085 // Check signs of r3 and r4. If both point 3 and point 4 lie on
40086 // same side of line 1, the line segments do not intersect.
40087 if ((r3 !== 0) && (r4 !== 0) && sameSign(r3, r4)) {
40088 return /*DONT_INTERSECT*/;
40089 }
40090
40091 // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0
40092 a2 = q2.y - q1.y;
40093 b2 = q1.x - q2.x;
40094 c2 = (q2.x * q1.y) - (q1.x * q2.y);
40095
40096 // Compute r1 and r2
40097 r1 = (a2 * p1.x) + (b2 * p1.y) + c2;
40098 r2 = (a2 * p2.x) + (b2 * p2.y) + c2;
40099
40100 // Check signs of r1 and r2. If both point 1 and point 2 lie
40101 // on same side of second line segment, the line segments do
40102 // not intersect.
40103 if ((r1 !== 0) && (r2 !== 0) && (sameSign(r1, r2))) {
40104 return /*DONT_INTERSECT*/;
40105 }
40106
40107 // Line segments intersect: compute intersection point.
40108 denom = (a1 * b2) - (a2 * b1);
40109 if (denom === 0) {
40110 return /*COLLINEAR*/;
40111 }
40112
40113 offset = Math.abs(denom / 2);
40114
40115 // The denom/2 is to get rounding instead of truncating. It
40116 // is added or subtracted to the numerator, depending upon the
40117 // sign of the numerator.
40118 num = (b1 * c2) - (b2 * c1);
40119 x = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom);
40120
40121 num = (a2 * c1) - (a1 * c2);
40122 y = (num < 0) ? ((num - offset) / denom) : ((num + offset) / denom);
40123
40124 return { x: x, y: y };
40125}
40126
40127function sameSign(r1, r2) {
40128 return r1 * r2 > 0;
40129}
40130
40131
40132/***/ }),
40133
40134/***/ "./node_modules/dagre-d3/lib/intersect/intersect-node.js":
40135/*!***************************************************************!*\
40136 !*** ./node_modules/dagre-d3/lib/intersect/intersect-node.js ***!
40137 \***************************************************************/
40138/*! no static exports found */
40139/***/ (function(module, exports) {
40140
40141module.exports = intersectNode;
40142
40143function intersectNode(node, point) {
40144 return node.intersect(point);
40145}
40146
40147
40148/***/ }),
40149
40150/***/ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js":
40151/*!******************************************************************!*\
40152 !*** ./node_modules/dagre-d3/lib/intersect/intersect-polygon.js ***!
40153 \******************************************************************/
40154/*! no static exports found */
40155/***/ (function(module, exports, __webpack_require__) {
40156
40157/* eslint "no-console": off */
40158
40159var intersectLine = __webpack_require__(/*! ./intersect-line */ "./node_modules/dagre-d3/lib/intersect/intersect-line.js");
40160
40161module.exports = intersectPolygon;
40162
40163/*
40164 * Returns the point ({x, y}) at which the point argument intersects with the
40165 * node argument assuming that it has the shape specified by polygon.
40166 */
40167function intersectPolygon(node, polyPoints, point) {
40168 var x1 = node.x;
40169 var y1 = node.y;
40170
40171 var intersections = [];
40172
40173 var minX = Number.POSITIVE_INFINITY;
40174 var minY = Number.POSITIVE_INFINITY;
40175 polyPoints.forEach(function(entry) {
40176 minX = Math.min(minX, entry.x);
40177 minY = Math.min(minY, entry.y);
40178 });
40179
40180 var left = x1 - node.width / 2 - minX;
40181 var top = y1 - node.height / 2 - minY;
40182
40183 for (var i = 0; i < polyPoints.length; i++) {
40184 var p1 = polyPoints[i];
40185 var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
40186 var intersect = intersectLine(node, point,
40187 {x: left + p1.x, y: top + p1.y}, {x: left + p2.x, y: top + p2.y});
40188 if (intersect) {
40189 intersections.push(intersect);
40190 }
40191 }
40192
40193 if (!intersections.length) {
40194 console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", node);
40195 return node;
40196 }
40197
40198 if (intersections.length > 1) {
40199 // More intersections, find the one nearest to edge end point
40200 intersections.sort(function(p, q) {
40201 var pdx = p.x - point.x;
40202 var pdy = p.y - point.y;
40203 var distp = Math.sqrt(pdx * pdx + pdy * pdy);
40204
40205 var qdx = q.x - point.x;
40206 var qdy = q.y - point.y;
40207 var distq = Math.sqrt(qdx * qdx + qdy * qdy);
40208
40209 return (distp < distq) ? -1 : (distp === distq ? 0 : 1);
40210 });
40211 }
40212 return intersections[0];
40213}
40214
40215
40216/***/ }),
40217
40218/***/ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js":
40219/*!***************************************************************!*\
40220 !*** ./node_modules/dagre-d3/lib/intersect/intersect-rect.js ***!
40221 \***************************************************************/
40222/*! no static exports found */
40223/***/ (function(module, exports) {
40224
40225module.exports = intersectRect;
40226
40227function intersectRect(node, point) {
40228 var x = node.x;
40229 var y = node.y;
40230
40231 // Rectangle intersection algorithm from:
40232 // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes
40233 var dx = point.x - x;
40234 var dy = point.y - y;
40235 var w = node.width / 2;
40236 var h = node.height / 2;
40237
40238 var sx, sy;
40239 if (Math.abs(dy) * w > Math.abs(dx) * h) {
40240 // Intersection is top or bottom of rect.
40241 if (dy < 0) {
40242 h = -h;
40243 }
40244 sx = dy === 0 ? 0 : h * dx / dy;
40245 sy = h;
40246 } else {
40247 // Intersection is left or right of rect.
40248 if (dx < 0) {
40249 w = -w;
40250 }
40251 sx = w;
40252 sy = dx === 0 ? 0 : w * dy / dx;
40253 }
40254
40255 return {x: x + sx, y: y + sy};
40256}
40257
40258
40259/***/ }),
40260
40261/***/ "./node_modules/dagre-d3/lib/label/add-html-label.js":
40262/*!***********************************************************!*\
40263 !*** ./node_modules/dagre-d3/lib/label/add-html-label.js ***!
40264 \***********************************************************/
40265/*! no static exports found */
40266/***/ (function(module, exports, __webpack_require__) {
40267
40268var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js");
40269
40270module.exports = addHtmlLabel;
40271
40272function addHtmlLabel(root, node) {
40273 var fo = root
40274 .append("foreignObject")
40275 .attr("width", "100000");
40276
40277 var div = fo
40278 .append("xhtml:div");
40279 div.attr("xmlns", "http://www.w3.org/1999/xhtml");
40280
40281 var label = node.label;
40282 switch(typeof label) {
40283 case "function":
40284 div.insert(label);
40285 break;
40286 case "object":
40287 // Currently we assume this is a DOM object.
40288 div.insert(function() { return label; });
40289 break;
40290 default: div.html(label);
40291 }
40292
40293 util.applyStyle(div, node.labelStyle);
40294 div.style("display", "inline-block");
40295 // Fix for firefox
40296 div.style("white-space", "nowrap");
40297
40298 var client = div.node().getBoundingClientRect();
40299 fo
40300 .attr("width", client.width)
40301 .attr("height", client.height);
40302
40303 return fo;
40304}
40305
40306
40307/***/ }),
40308
40309/***/ "./node_modules/dagre-d3/lib/label/add-label.js":
40310/*!******************************************************!*\
40311 !*** ./node_modules/dagre-d3/lib/label/add-label.js ***!
40312 \******************************************************/
40313/*! no static exports found */
40314/***/ (function(module, exports, __webpack_require__) {
40315
40316var addTextLabel = __webpack_require__(/*! ./add-text-label */ "./node_modules/dagre-d3/lib/label/add-text-label.js");
40317var addHtmlLabel = __webpack_require__(/*! ./add-html-label */ "./node_modules/dagre-d3/lib/label/add-html-label.js");
40318var addSVGLabel = __webpack_require__(/*! ./add-svg-label */ "./node_modules/dagre-d3/lib/label/add-svg-label.js");
40319
40320module.exports = addLabel;
40321
40322function addLabel(root, node, location) {
40323 var label = node.label;
40324 var labelSvg = root.append("g");
40325
40326 // Allow the label to be a string, a function that returns a DOM element, or
40327 // a DOM element itself.
40328 if (node.labelType === "svg") {
40329 addSVGLabel(labelSvg, node);
40330 } else if (typeof label !== "string" || node.labelType === "html") {
40331 addHtmlLabel(labelSvg, node);
40332 } else {
40333 addTextLabel(labelSvg, node);
40334 }
40335
40336 var labelBBox = labelSvg.node().getBBox();
40337 var y;
40338 switch(location) {
40339 case "top":
40340 y = (-node.height / 2);
40341 break;
40342 case "bottom":
40343 y = (node.height / 2) - labelBBox.height;
40344 break;
40345 default:
40346 y = (-labelBBox.height / 2);
40347 }
40348 labelSvg.attr(
40349 "transform",
40350 "translate(" + (-labelBBox.width / 2) + "," + y + ")");
40351
40352 return labelSvg;
40353}
40354
40355
40356/***/ }),
40357
40358/***/ "./node_modules/dagre-d3/lib/label/add-svg-label.js":
40359/*!**********************************************************!*\
40360 !*** ./node_modules/dagre-d3/lib/label/add-svg-label.js ***!
40361 \**********************************************************/
40362/*! no static exports found */
40363/***/ (function(module, exports, __webpack_require__) {
40364
40365var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js");
40366
40367module.exports = addSVGLabel;
40368
40369function addSVGLabel(root, node) {
40370 var domNode = root;
40371
40372 domNode.node().appendChild(node.label);
40373
40374 util.applyStyle(domNode, node.labelStyle);
40375
40376 return domNode;
40377}
40378
40379
40380/***/ }),
40381
40382/***/ "./node_modules/dagre-d3/lib/label/add-text-label.js":
40383/*!***********************************************************!*\
40384 !*** ./node_modules/dagre-d3/lib/label/add-text-label.js ***!
40385 \***********************************************************/
40386/*! no static exports found */
40387/***/ (function(module, exports, __webpack_require__) {
40388
40389var util = __webpack_require__(/*! ../util */ "./node_modules/dagre-d3/lib/util.js");
40390
40391module.exports = addTextLabel;
40392
40393/*
40394 * Attaches a text label to the specified root. Handles escape sequences.
40395 */
40396function addTextLabel(root, node) {
40397 var domNode = root.append("text");
40398
40399 var lines = processEscapeSequences(node.label).split("\n");
40400 for (var i = 0; i < lines.length; i++) {
40401 domNode.append("tspan")
40402 .attr("xml:space", "preserve")
40403 .attr("dy", "1em")
40404 .attr("x", "1")
40405 .text(lines[i]);
40406 }
40407
40408 util.applyStyle(domNode, node.labelStyle);
40409
40410 return domNode;
40411}
40412
40413function processEscapeSequences(text) {
40414 var newText = "";
40415 var escaped = false;
40416 var ch;
40417 for (var i = 0; i < text.length; ++i) {
40418 ch = text[i];
40419 if (escaped) {
40420 switch(ch) {
40421 case "n": newText += "\n"; break;
40422 default: newText += ch;
40423 }
40424 escaped = false;
40425 } else if (ch === "\\") {
40426 escaped = true;
40427 } else {
40428 newText += ch;
40429 }
40430 }
40431 return newText;
40432}
40433
40434
40435/***/ }),
40436
40437/***/ "./node_modules/dagre-d3/lib/lodash.js":
40438/*!*********************************************!*\
40439 !*** ./node_modules/dagre-d3/lib/lodash.js ***!
40440 \*********************************************/
40441/*! no static exports found */
40442/***/ (function(module, exports, __webpack_require__) {
40443
40444/* global window */
40445
40446var lodash;
40447
40448if (true) {
40449 try {
40450 lodash = {
40451 defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"),
40452 each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"),
40453 isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"),
40454 isPlainObject: __webpack_require__(/*! lodash/isPlainObject */ "./node_modules/lodash/isPlainObject.js"),
40455 pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"),
40456 has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"),
40457 range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"),
40458 uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js")
40459 };
40460 }
40461 catch (e) {
40462 // continue regardless of error
40463 }
40464}
40465
40466if (!lodash) {
40467 lodash = window._;
40468}
40469
40470module.exports = lodash;
40471
40472
40473/***/ }),
40474
40475/***/ "./node_modules/dagre-d3/lib/position-clusters.js":
40476/*!********************************************************!*\
40477 !*** ./node_modules/dagre-d3/lib/position-clusters.js ***!
40478 \********************************************************/
40479/*! no static exports found */
40480/***/ (function(module, exports, __webpack_require__) {
40481
40482"use strict";
40483
40484
40485var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
40486var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
40487
40488module.exports = positionClusters;
40489
40490function positionClusters(selection, g) {
40491 var created = selection.filter(function() { return !d3.select(this).classed("update"); });
40492
40493 function translate(v) {
40494 var node = g.node(v);
40495 return "translate(" + node.x + "," + node.y + ")";
40496 }
40497
40498 created.attr("transform", translate);
40499
40500 util.applyTransition(selection, g)
40501 .style("opacity", 1)
40502 .attr("transform", translate);
40503
40504 util.applyTransition(created.selectAll("rect"), g)
40505 .attr("width", function(v) { return g.node(v).width; })
40506 .attr("height", function(v) { return g.node(v).height; })
40507 .attr("x", function(v) {
40508 var node = g.node(v);
40509 return -node.width / 2;
40510 })
40511 .attr("y", function(v) {
40512 var node = g.node(v);
40513 return -node.height / 2;
40514 });
40515}
40516
40517
40518/***/ }),
40519
40520/***/ "./node_modules/dagre-d3/lib/position-edge-labels.js":
40521/*!***********************************************************!*\
40522 !*** ./node_modules/dagre-d3/lib/position-edge-labels.js ***!
40523 \***********************************************************/
40524/*! no static exports found */
40525/***/ (function(module, exports, __webpack_require__) {
40526
40527"use strict";
40528
40529
40530var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
40531var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
40532var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
40533
40534module.exports = positionEdgeLabels;
40535
40536function positionEdgeLabels(selection, g) {
40537 var created = selection.filter(function() { return !d3.select(this).classed("update"); });
40538
40539 function translate(e) {
40540 var edge = g.edge(e);
40541 return _.has(edge, "x") ? "translate(" + edge.x + "," + edge.y + ")" : "";
40542 }
40543
40544 created.attr("transform", translate);
40545
40546 util.applyTransition(selection, g)
40547 .style("opacity", 1)
40548 .attr("transform", translate);
40549}
40550
40551
40552/***/ }),
40553
40554/***/ "./node_modules/dagre-d3/lib/position-nodes.js":
40555/*!*****************************************************!*\
40556 !*** ./node_modules/dagre-d3/lib/position-nodes.js ***!
40557 \*****************************************************/
40558/*! no static exports found */
40559/***/ (function(module, exports, __webpack_require__) {
40560
40561"use strict";
40562
40563
40564var util = __webpack_require__(/*! ./util */ "./node_modules/dagre-d3/lib/util.js");
40565var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
40566
40567module.exports = positionNodes;
40568
40569function positionNodes(selection, g) {
40570 var created = selection.filter(function() { return !d3.select(this).classed("update"); });
40571
40572 function translate(v) {
40573 var node = g.node(v);
40574 return "translate(" + node.x + "," + node.y + ")";
40575 }
40576
40577 created.attr("transform", translate);
40578
40579 util.applyTransition(selection, g)
40580 .style("opacity", 1)
40581 .attr("transform", translate);
40582}
40583
40584
40585/***/ }),
40586
40587/***/ "./node_modules/dagre-d3/lib/render.js":
40588/*!*********************************************!*\
40589 !*** ./node_modules/dagre-d3/lib/render.js ***!
40590 \*********************************************/
40591/*! no static exports found */
40592/***/ (function(module, exports, __webpack_require__) {
40593
40594var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
40595var d3 = __webpack_require__(/*! ./d3 */ "./node_modules/dagre-d3/lib/d3.js");
40596var layout = __webpack_require__(/*! ./dagre */ "./node_modules/dagre-d3/lib/dagre.js").layout;
40597
40598module.exports = render;
40599
40600// This design is based on http://bost.ocks.org/mike/chart/.
40601function render() {
40602 var createNodes = __webpack_require__(/*! ./create-nodes */ "./node_modules/dagre-d3/lib/create-nodes.js");
40603 var createClusters = __webpack_require__(/*! ./create-clusters */ "./node_modules/dagre-d3/lib/create-clusters.js");
40604 var createEdgeLabels = __webpack_require__(/*! ./create-edge-labels */ "./node_modules/dagre-d3/lib/create-edge-labels.js");
40605 var createEdgePaths = __webpack_require__(/*! ./create-edge-paths */ "./node_modules/dagre-d3/lib/create-edge-paths.js");
40606 var positionNodes = __webpack_require__(/*! ./position-nodes */ "./node_modules/dagre-d3/lib/position-nodes.js");
40607 var positionEdgeLabels = __webpack_require__(/*! ./position-edge-labels */ "./node_modules/dagre-d3/lib/position-edge-labels.js");
40608 var positionClusters = __webpack_require__(/*! ./position-clusters */ "./node_modules/dagre-d3/lib/position-clusters.js");
40609 var shapes = __webpack_require__(/*! ./shapes */ "./node_modules/dagre-d3/lib/shapes.js");
40610 var arrows = __webpack_require__(/*! ./arrows */ "./node_modules/dagre-d3/lib/arrows.js");
40611
40612 var fn = function(svg, g) {
40613 preProcessGraph(g);
40614
40615 var outputGroup = createOrSelectGroup(svg, "output");
40616 var clustersGroup = createOrSelectGroup(outputGroup, "clusters");
40617 var edgePathsGroup = createOrSelectGroup(outputGroup, "edgePaths");
40618 var edgeLabels = createEdgeLabels(createOrSelectGroup(outputGroup, "edgeLabels"), g);
40619 var nodes = createNodes(createOrSelectGroup(outputGroup, "nodes"), g, shapes);
40620
40621 layout(g);
40622
40623 positionNodes(nodes, g);
40624 positionEdgeLabels(edgeLabels, g);
40625 createEdgePaths(edgePathsGroup, g, arrows);
40626
40627 var clusters = createClusters(clustersGroup, g);
40628 positionClusters(clusters, g);
40629
40630 postProcessGraph(g);
40631 };
40632
40633 fn.createNodes = function(value) {
40634 if (!arguments.length) return createNodes;
40635 createNodes = value;
40636 return fn;
40637 };
40638
40639 fn.createClusters = function(value) {
40640 if (!arguments.length) return createClusters;
40641 createClusters = value;
40642 return fn;
40643 };
40644
40645 fn.createEdgeLabels = function(value) {
40646 if (!arguments.length) return createEdgeLabels;
40647 createEdgeLabels = value;
40648 return fn;
40649 };
40650
40651 fn.createEdgePaths = function(value) {
40652 if (!arguments.length) return createEdgePaths;
40653 createEdgePaths = value;
40654 return fn;
40655 };
40656
40657 fn.shapes = function(value) {
40658 if (!arguments.length) return shapes;
40659 shapes = value;
40660 return fn;
40661 };
40662
40663 fn.arrows = function(value) {
40664 if (!arguments.length) return arrows;
40665 arrows = value;
40666 return fn;
40667 };
40668
40669 return fn;
40670}
40671
40672var NODE_DEFAULT_ATTRS = {
40673 paddingLeft: 10,
40674 paddingRight: 10,
40675 paddingTop: 10,
40676 paddingBottom: 10,
40677 rx: 0,
40678 ry: 0,
40679 shape: "rect"
40680};
40681
40682var EDGE_DEFAULT_ATTRS = {
40683 arrowhead: "normal",
40684 curve: d3.curveLinear
40685};
40686
40687function preProcessGraph(g) {
40688 g.nodes().forEach(function(v) {
40689 var node = g.node(v);
40690 if (!_.has(node, "label") && !g.children(v).length) { node.label = v; }
40691
40692 if (_.has(node, "paddingX")) {
40693 _.defaults(node, {
40694 paddingLeft: node.paddingX,
40695 paddingRight: node.paddingX
40696 });
40697 }
40698
40699 if (_.has(node, "paddingY")) {
40700 _.defaults(node, {
40701 paddingTop: node.paddingY,
40702 paddingBottom: node.paddingY
40703 });
40704 }
40705
40706 if (_.has(node, "padding")) {
40707 _.defaults(node, {
40708 paddingLeft: node.padding,
40709 paddingRight: node.padding,
40710 paddingTop: node.padding,
40711 paddingBottom: node.padding
40712 });
40713 }
40714
40715 _.defaults(node, NODE_DEFAULT_ATTRS);
40716
40717 _.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(k) {
40718 node[k] = Number(node[k]);
40719 });
40720
40721 // Save dimensions for restore during post-processing
40722 if (_.has(node, "width")) { node._prevWidth = node.width; }
40723 if (_.has(node, "height")) { node._prevHeight = node.height; }
40724 });
40725
40726 g.edges().forEach(function(e) {
40727 var edge = g.edge(e);
40728 if (!_.has(edge, "label")) { edge.label = ""; }
40729 _.defaults(edge, EDGE_DEFAULT_ATTRS);
40730 });
40731}
40732
40733function postProcessGraph(g) {
40734 _.each(g.nodes(), function(v) {
40735 var node = g.node(v);
40736
40737 // Restore original dimensions
40738 if (_.has(node, "_prevWidth")) {
40739 node.width = node._prevWidth;
40740 } else {
40741 delete node.width;
40742 }
40743
40744 if (_.has(node, "_prevHeight")) {
40745 node.height = node._prevHeight;
40746 } else {
40747 delete node.height;
40748 }
40749
40750 delete node._prevWidth;
40751 delete node._prevHeight;
40752 });
40753}
40754
40755function createOrSelectGroup(root, name) {
40756 var selection = root.select("g." + name);
40757 if (selection.empty()) {
40758 selection = root.append("g").attr("class", name);
40759 }
40760 return selection;
40761}
40762
40763
40764/***/ }),
40765
40766/***/ "./node_modules/dagre-d3/lib/shapes.js":
40767/*!*********************************************!*\
40768 !*** ./node_modules/dagre-d3/lib/shapes.js ***!
40769 \*********************************************/
40770/*! no static exports found */
40771/***/ (function(module, exports, __webpack_require__) {
40772
40773"use strict";
40774
40775
40776var intersectRect = __webpack_require__(/*! ./intersect/intersect-rect */ "./node_modules/dagre-d3/lib/intersect/intersect-rect.js");
40777var intersectEllipse = __webpack_require__(/*! ./intersect/intersect-ellipse */ "./node_modules/dagre-d3/lib/intersect/intersect-ellipse.js");
40778var intersectCircle = __webpack_require__(/*! ./intersect/intersect-circle */ "./node_modules/dagre-d3/lib/intersect/intersect-circle.js");
40779var intersectPolygon = __webpack_require__(/*! ./intersect/intersect-polygon */ "./node_modules/dagre-d3/lib/intersect/intersect-polygon.js");
40780
40781module.exports = {
40782 rect: rect,
40783 ellipse: ellipse,
40784 circle: circle,
40785 diamond: diamond
40786};
40787
40788function rect(parent, bbox, node) {
40789 var shapeSvg = parent.insert("rect", ":first-child")
40790 .attr("rx", node.rx)
40791 .attr("ry", node.ry)
40792 .attr("x", -bbox.width / 2)
40793 .attr("y", -bbox.height / 2)
40794 .attr("width", bbox.width)
40795 .attr("height", bbox.height);
40796
40797 node.intersect = function(point) {
40798 return intersectRect(node, point);
40799 };
40800
40801 return shapeSvg;
40802}
40803
40804function ellipse(parent, bbox, node) {
40805 var rx = bbox.width / 2;
40806 var ry = bbox.height / 2;
40807 var shapeSvg = parent.insert("ellipse", ":first-child")
40808 .attr("x", -bbox.width / 2)
40809 .attr("y", -bbox.height / 2)
40810 .attr("rx", rx)
40811 .attr("ry", ry);
40812
40813 node.intersect = function(point) {
40814 return intersectEllipse(node, rx, ry, point);
40815 };
40816
40817 return shapeSvg;
40818}
40819
40820function circle(parent, bbox, node) {
40821 var r = Math.max(bbox.width, bbox.height) / 2;
40822 var shapeSvg = parent.insert("circle", ":first-child")
40823 .attr("x", -bbox.width / 2)
40824 .attr("y", -bbox.height / 2)
40825 .attr("r", r);
40826
40827 node.intersect = function(point) {
40828 return intersectCircle(node, r, point);
40829 };
40830
40831 return shapeSvg;
40832}
40833
40834// Circumscribe an ellipse for the bounding box with a diamond shape. I derived
40835// the function to calculate the diamond shape from:
40836// http://mathforum.org/kb/message.jspa?messageID=3750236
40837function diamond(parent, bbox, node) {
40838 var w = (bbox.width * Math.SQRT2) / 2;
40839 var h = (bbox.height * Math.SQRT2) / 2;
40840 var points = [
40841 { x: 0, y: -h },
40842 { x: -w, y: 0 },
40843 { x: 0, y: h },
40844 { x: w, y: 0 }
40845 ];
40846 var shapeSvg = parent.insert("polygon", ":first-child")
40847 .attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" "));
40848
40849 node.intersect = function(p) {
40850 return intersectPolygon(node, points, p);
40851 };
40852
40853 return shapeSvg;
40854}
40855
40856
40857/***/ }),
40858
40859/***/ "./node_modules/dagre-d3/lib/util.js":
40860/*!*******************************************!*\
40861 !*** ./node_modules/dagre-d3/lib/util.js ***!
40862 \*******************************************/
40863/*! no static exports found */
40864/***/ (function(module, exports, __webpack_require__) {
40865
40866var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre-d3/lib/lodash.js");
40867
40868// Public utility functions
40869module.exports = {
40870 isSubgraph: isSubgraph,
40871 edgeToId: edgeToId,
40872 applyStyle: applyStyle,
40873 applyClass: applyClass,
40874 applyTransition: applyTransition
40875};
40876
40877/*
40878 * Returns true if the specified node in the graph is a subgraph node. A
40879 * subgraph node is one that contains other nodes.
40880 */
40881function isSubgraph(g, v) {
40882 return !!g.children(v).length;
40883}
40884
40885function edgeToId(e) {
40886 return escapeId(e.v) + ":" + escapeId(e.w) + ":" + escapeId(e.name);
40887}
40888
40889var ID_DELIM = /:/g;
40890function escapeId(str) {
40891 return str ? String(str).replace(ID_DELIM, "\\:") : "";
40892}
40893
40894function applyStyle(dom, styleFn) {
40895 if (styleFn) {
40896 dom.attr("style", styleFn);
40897 }
40898}
40899
40900function applyClass(dom, classFn, otherClasses) {
40901 if (classFn) {
40902 dom
40903 .attr("class", classFn)
40904 .attr("class", otherClasses + " " + dom.attr("class"));
40905 }
40906}
40907
40908function applyTransition(selection, g) {
40909 var graph = g.graph();
40910
40911 if (_.isPlainObject(graph)) {
40912 var transition = graph.transition;
40913 if (_.isFunction(transition)) {
40914 return transition(selection);
40915 }
40916 }
40917
40918 return selection;
40919}
40920
40921
40922/***/ }),
40923
40924/***/ "./node_modules/dagre-d3/lib/version.js":
40925/*!**********************************************!*\
40926 !*** ./node_modules/dagre-d3/lib/version.js ***!
40927 \**********************************************/
40928/*! no static exports found */
40929/***/ (function(module, exports) {
40930
40931module.exports = "0.6.4";
40932
40933
40934/***/ }),
40935
40936/***/ "./node_modules/dagre/index.js":
40937/*!*************************************!*\
40938 !*** ./node_modules/dagre/index.js ***!
40939 \*************************************/
40940/*! no static exports found */
40941/***/ (function(module, exports, __webpack_require__) {
40942
40943/*
40944Copyright (c) 2012-2014 Chris Pettitt
40945
40946Permission is hereby granted, free of charge, to any person obtaining a copy
40947of this software and associated documentation files (the "Software"), to deal
40948in the Software without restriction, including without limitation the rights
40949to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40950copies of the Software, and to permit persons to whom the Software is
40951furnished to do so, subject to the following conditions:
40952
40953The above copyright notice and this permission notice shall be included in
40954all copies or substantial portions of the Software.
40955
40956THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40957IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40958FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40959AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40960LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40961OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
40962THE SOFTWARE.
40963*/
40964
40965module.exports = {
40966 graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre/lib/graphlib.js"),
40967
40968 layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre/lib/layout.js"),
40969 debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre/lib/debug.js"),
40970 util: {
40971 time: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").time,
40972 notime: __webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").notime
40973 },
40974 version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre/lib/version.js")
40975};
40976
40977
40978/***/ }),
40979
40980/***/ "./node_modules/dagre/lib/acyclic.js":
40981/*!*******************************************!*\
40982 !*** ./node_modules/dagre/lib/acyclic.js ***!
40983 \*******************************************/
40984/*! no static exports found */
40985/***/ (function(module, exports, __webpack_require__) {
40986
40987"use strict";
40988
40989
40990var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
40991var greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre/lib/greedy-fas.js");
40992
40993module.exports = {
40994 run: run,
40995 undo: undo
40996};
40997
40998function run(g) {
40999 var fas = (g.graph().acyclicer === "greedy"
41000 ? greedyFAS(g, weightFn(g))
41001 : dfsFAS(g));
41002 _.forEach(fas, function(e) {
41003 var label = g.edge(e);
41004 g.removeEdge(e);
41005 label.forwardName = e.name;
41006 label.reversed = true;
41007 g.setEdge(e.w, e.v, label, _.uniqueId("rev"));
41008 });
41009
41010 function weightFn(g) {
41011 return function(e) {
41012 return g.edge(e).weight;
41013 };
41014 }
41015}
41016
41017function dfsFAS(g) {
41018 var fas = [];
41019 var stack = {};
41020 var visited = {};
41021
41022 function dfs(v) {
41023 if (_.has(visited, v)) {
41024 return;
41025 }
41026 visited[v] = true;
41027 stack[v] = true;
41028 _.forEach(g.outEdges(v), function(e) {
41029 if (_.has(stack, e.w)) {
41030 fas.push(e);
41031 } else {
41032 dfs(e.w);
41033 }
41034 });
41035 delete stack[v];
41036 }
41037
41038 _.forEach(g.nodes(), dfs);
41039 return fas;
41040}
41041
41042function undo(g) {
41043 _.forEach(g.edges(), function(e) {
41044 var label = g.edge(e);
41045 if (label.reversed) {
41046 g.removeEdge(e);
41047
41048 var forwardName = label.forwardName;
41049 delete label.reversed;
41050 delete label.forwardName;
41051 g.setEdge(e.w, e.v, label, forwardName);
41052 }
41053 });
41054}
41055
41056
41057/***/ }),
41058
41059/***/ "./node_modules/dagre/lib/add-border-segments.js":
41060/*!*******************************************************!*\
41061 !*** ./node_modules/dagre/lib/add-border-segments.js ***!
41062 \*******************************************************/
41063/*! no static exports found */
41064/***/ (function(module, exports, __webpack_require__) {
41065
41066var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41067var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js");
41068
41069module.exports = addBorderSegments;
41070
41071function addBorderSegments(g) {
41072 function dfs(v) {
41073 var children = g.children(v);
41074 var node = g.node(v);
41075 if (children.length) {
41076 _.forEach(children, dfs);
41077 }
41078
41079 if (_.has(node, "minRank")) {
41080 node.borderLeft = [];
41081 node.borderRight = [];
41082 for (var rank = node.minRank, maxRank = node.maxRank + 1;
41083 rank < maxRank;
41084 ++rank) {
41085 addBorderNode(g, "borderLeft", "_bl", v, node, rank);
41086 addBorderNode(g, "borderRight", "_br", v, node, rank);
41087 }
41088 }
41089 }
41090
41091 _.forEach(g.children(), dfs);
41092}
41093
41094function addBorderNode(g, prop, prefix, sg, sgNode, rank) {
41095 var label = { width: 0, height: 0, rank: rank, borderType: prop };
41096 var prev = sgNode[prop][rank - 1];
41097 var curr = util.addDummyNode(g, "border", label, prefix);
41098 sgNode[prop][rank] = curr;
41099 g.setParent(curr, sg);
41100 if (prev) {
41101 g.setEdge(prev, curr, { weight: 1 });
41102 }
41103}
41104
41105
41106/***/ }),
41107
41108/***/ "./node_modules/dagre/lib/coordinate-system.js":
41109/*!*****************************************************!*\
41110 !*** ./node_modules/dagre/lib/coordinate-system.js ***!
41111 \*****************************************************/
41112/*! no static exports found */
41113/***/ (function(module, exports, __webpack_require__) {
41114
41115"use strict";
41116
41117
41118var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41119
41120module.exports = {
41121 adjust: adjust,
41122 undo: undo
41123};
41124
41125function adjust(g) {
41126 var rankDir = g.graph().rankdir.toLowerCase();
41127 if (rankDir === "lr" || rankDir === "rl") {
41128 swapWidthHeight(g);
41129 }
41130}
41131
41132function undo(g) {
41133 var rankDir = g.graph().rankdir.toLowerCase();
41134 if (rankDir === "bt" || rankDir === "rl") {
41135 reverseY(g);
41136 }
41137
41138 if (rankDir === "lr" || rankDir === "rl") {
41139 swapXY(g);
41140 swapWidthHeight(g);
41141 }
41142}
41143
41144function swapWidthHeight(g) {
41145 _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); });
41146 _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); });
41147}
41148
41149function swapWidthHeightOne(attrs) {
41150 var w = attrs.width;
41151 attrs.width = attrs.height;
41152 attrs.height = w;
41153}
41154
41155function reverseY(g) {
41156 _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); });
41157
41158 _.forEach(g.edges(), function(e) {
41159 var edge = g.edge(e);
41160 _.forEach(edge.points, reverseYOne);
41161 if (_.has(edge, "y")) {
41162 reverseYOne(edge);
41163 }
41164 });
41165}
41166
41167function reverseYOne(attrs) {
41168 attrs.y = -attrs.y;
41169}
41170
41171function swapXY(g) {
41172 _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); });
41173
41174 _.forEach(g.edges(), function(e) {
41175 var edge = g.edge(e);
41176 _.forEach(edge.points, swapXYOne);
41177 if (_.has(edge, "x")) {
41178 swapXYOne(edge);
41179 }
41180 });
41181}
41182
41183function swapXYOne(attrs) {
41184 var x = attrs.x;
41185 attrs.x = attrs.y;
41186 attrs.y = x;
41187}
41188
41189
41190/***/ }),
41191
41192/***/ "./node_modules/dagre/lib/data/list.js":
41193/*!*********************************************!*\
41194 !*** ./node_modules/dagre/lib/data/list.js ***!
41195 \*********************************************/
41196/*! no static exports found */
41197/***/ (function(module, exports) {
41198
41199/*
41200 * Simple doubly linked list implementation derived from Cormen, et al.,
41201 * "Introduction to Algorithms".
41202 */
41203
41204module.exports = List;
41205
41206function List() {
41207 var sentinel = {};
41208 sentinel._next = sentinel._prev = sentinel;
41209 this._sentinel = sentinel;
41210}
41211
41212List.prototype.dequeue = function() {
41213 var sentinel = this._sentinel;
41214 var entry = sentinel._prev;
41215 if (entry !== sentinel) {
41216 unlink(entry);
41217 return entry;
41218 }
41219};
41220
41221List.prototype.enqueue = function(entry) {
41222 var sentinel = this._sentinel;
41223 if (entry._prev && entry._next) {
41224 unlink(entry);
41225 }
41226 entry._next = sentinel._next;
41227 sentinel._next._prev = entry;
41228 sentinel._next = entry;
41229 entry._prev = sentinel;
41230};
41231
41232List.prototype.toString = function() {
41233 var strs = [];
41234 var sentinel = this._sentinel;
41235 var curr = sentinel._prev;
41236 while (curr !== sentinel) {
41237 strs.push(JSON.stringify(curr, filterOutLinks));
41238 curr = curr._prev;
41239 }
41240 return "[" + strs.join(", ") + "]";
41241};
41242
41243function unlink(entry) {
41244 entry._prev._next = entry._next;
41245 entry._next._prev = entry._prev;
41246 delete entry._next;
41247 delete entry._prev;
41248}
41249
41250function filterOutLinks(k, v) {
41251 if (k !== "_next" && k !== "_prev") {
41252 return v;
41253 }
41254}
41255
41256
41257/***/ }),
41258
41259/***/ "./node_modules/dagre/lib/debug.js":
41260/*!*****************************************!*\
41261 !*** ./node_modules/dagre/lib/debug.js ***!
41262 \*****************************************/
41263/*! no static exports found */
41264/***/ (function(module, exports, __webpack_require__) {
41265
41266var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41267var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js");
41268var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
41269
41270module.exports = {
41271 debugOrdering: debugOrdering
41272};
41273
41274/* istanbul ignore next */
41275function debugOrdering(g) {
41276 var layerMatrix = util.buildLayerMatrix(g);
41277
41278 var h = new Graph({ compound: true, multigraph: true }).setGraph({});
41279
41280 _.forEach(g.nodes(), function(v) {
41281 h.setNode(v, { label: v });
41282 h.setParent(v, "layer" + g.node(v).rank);
41283 });
41284
41285 _.forEach(g.edges(), function(e) {
41286 h.setEdge(e.v, e.w, {}, e.name);
41287 });
41288
41289 _.forEach(layerMatrix, function(layer, i) {
41290 var layerV = "layer" + i;
41291 h.setNode(layerV, { rank: "same" });
41292 _.reduce(layer, function(u, v) {
41293 h.setEdge(u, v, { style: "invis" });
41294 return v;
41295 });
41296 });
41297
41298 return h;
41299}
41300
41301
41302/***/ }),
41303
41304/***/ "./node_modules/dagre/lib/graphlib.js":
41305/*!********************************************!*\
41306 !*** ./node_modules/dagre/lib/graphlib.js ***!
41307 \********************************************/
41308/*! no static exports found */
41309/***/ (function(module, exports, __webpack_require__) {
41310
41311/* global window */
41312
41313var graphlib;
41314
41315if (true) {
41316 try {
41317 graphlib = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js");
41318 } catch (e) {
41319 // continue regardless of error
41320 }
41321}
41322
41323if (!graphlib) {
41324 graphlib = window.graphlib;
41325}
41326
41327module.exports = graphlib;
41328
41329
41330/***/ }),
41331
41332/***/ "./node_modules/dagre/lib/greedy-fas.js":
41333/*!**********************************************!*\
41334 !*** ./node_modules/dagre/lib/greedy-fas.js ***!
41335 \**********************************************/
41336/*! no static exports found */
41337/***/ (function(module, exports, __webpack_require__) {
41338
41339var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41340var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
41341var List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre/lib/data/list.js");
41342
41343/*
41344 * A greedy heuristic for finding a feedback arc set for a graph. A feedback
41345 * arc set is a set of edges that can be removed to make a graph acyclic.
41346 * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and
41347 * effective heuristic for the feedback arc set problem." This implementation
41348 * adjusts that from the paper to allow for weighted edges.
41349 */
41350module.exports = greedyFAS;
41351
41352var DEFAULT_WEIGHT_FN = _.constant(1);
41353
41354function greedyFAS(g, weightFn) {
41355 if (g.nodeCount() <= 1) {
41356 return [];
41357 }
41358 var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN);
41359 var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx);
41360
41361 // Expand multi-edges
41362 return _.flatten(_.map(results, function(e) {
41363 return g.outEdges(e.v, e.w);
41364 }), true);
41365}
41366
41367function doGreedyFAS(g, buckets, zeroIdx) {
41368 var results = [];
41369 var sources = buckets[buckets.length - 1];
41370 var sinks = buckets[0];
41371
41372 var entry;
41373 while (g.nodeCount()) {
41374 while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); }
41375 while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); }
41376 if (g.nodeCount()) {
41377 for (var i = buckets.length - 2; i > 0; --i) {
41378 entry = buckets[i].dequeue();
41379 if (entry) {
41380 results = results.concat(removeNode(g, buckets, zeroIdx, entry, true));
41381 break;
41382 }
41383 }
41384 }
41385 }
41386
41387 return results;
41388}
41389
41390function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) {
41391 var results = collectPredecessors ? [] : undefined;
41392
41393 _.forEach(g.inEdges(entry.v), function(edge) {
41394 var weight = g.edge(edge);
41395 var uEntry = g.node(edge.v);
41396
41397 if (collectPredecessors) {
41398 results.push({ v: edge.v, w: edge.w });
41399 }
41400
41401 uEntry.out -= weight;
41402 assignBucket(buckets, zeroIdx, uEntry);
41403 });
41404
41405 _.forEach(g.outEdges(entry.v), function(edge) {
41406 var weight = g.edge(edge);
41407 var w = edge.w;
41408 var wEntry = g.node(w);
41409 wEntry["in"] -= weight;
41410 assignBucket(buckets, zeroIdx, wEntry);
41411 });
41412
41413 g.removeNode(entry.v);
41414
41415 return results;
41416}
41417
41418function buildState(g, weightFn) {
41419 var fasGraph = new Graph();
41420 var maxIn = 0;
41421 var maxOut = 0;
41422
41423 _.forEach(g.nodes(), function(v) {
41424 fasGraph.setNode(v, { v: v, "in": 0, out: 0 });
41425 });
41426
41427 // Aggregate weights on nodes, but also sum the weights across multi-edges
41428 // into a single edge for the fasGraph.
41429 _.forEach(g.edges(), function(e) {
41430 var prevWeight = fasGraph.edge(e.v, e.w) || 0;
41431 var weight = weightFn(e);
41432 var edgeWeight = prevWeight + weight;
41433 fasGraph.setEdge(e.v, e.w, edgeWeight);
41434 maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight);
41435 maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight);
41436 });
41437
41438 var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); });
41439 var zeroIdx = maxIn + 1;
41440
41441 _.forEach(fasGraph.nodes(), function(v) {
41442 assignBucket(buckets, zeroIdx, fasGraph.node(v));
41443 });
41444
41445 return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx };
41446}
41447
41448function assignBucket(buckets, zeroIdx, entry) {
41449 if (!entry.out) {
41450 buckets[0].enqueue(entry);
41451 } else if (!entry["in"]) {
41452 buckets[buckets.length - 1].enqueue(entry);
41453 } else {
41454 buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry);
41455 }
41456}
41457
41458
41459/***/ }),
41460
41461/***/ "./node_modules/dagre/lib/layout.js":
41462/*!******************************************!*\
41463 !*** ./node_modules/dagre/lib/layout.js ***!
41464 \******************************************/
41465/*! no static exports found */
41466/***/ (function(module, exports, __webpack_require__) {
41467
41468"use strict";
41469
41470
41471var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41472var acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre/lib/acyclic.js");
41473var normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre/lib/normalize.js");
41474var rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre/lib/rank/index.js");
41475var normalizeRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").normalizeRanks;
41476var parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre/lib/parent-dummy-chains.js");
41477var removeEmptyRanks = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").removeEmptyRanks;
41478var nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre/lib/nesting-graph.js");
41479var addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre/lib/add-border-segments.js");
41480var coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre/lib/coordinate-system.js");
41481var order = __webpack_require__(/*! ./order */ "./node_modules/dagre/lib/order/index.js");
41482var position = __webpack_require__(/*! ./position */ "./node_modules/dagre/lib/position/index.js");
41483var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js");
41484var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
41485
41486module.exports = layout;
41487
41488function layout(g, opts) {
41489 var time = opts && opts.debugTiming ? util.time : util.notime;
41490 time("layout", function() {
41491 var layoutGraph =
41492 time(" buildLayoutGraph", function() { return buildLayoutGraph(g); });
41493 time(" runLayout", function() { runLayout(layoutGraph, time); });
41494 time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); });
41495 });
41496}
41497
41498function runLayout(g, time) {
41499 time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); });
41500 time(" removeSelfEdges", function() { removeSelfEdges(g); });
41501 time(" acyclic", function() { acyclic.run(g); });
41502 time(" nestingGraph.run", function() { nestingGraph.run(g); });
41503 time(" rank", function() { rank(util.asNonCompoundGraph(g)); });
41504 time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); });
41505 time(" removeEmptyRanks", function() { removeEmptyRanks(g); });
41506 time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); });
41507 time(" normalizeRanks", function() { normalizeRanks(g); });
41508 time(" assignRankMinMax", function() { assignRankMinMax(g); });
41509 time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); });
41510 time(" normalize.run", function() { normalize.run(g); });
41511 time(" parentDummyChains", function() { parentDummyChains(g); });
41512 time(" addBorderSegments", function() { addBorderSegments(g); });
41513 time(" order", function() { order(g); });
41514 time(" insertSelfEdges", function() { insertSelfEdges(g); });
41515 time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); });
41516 time(" position", function() { position(g); });
41517 time(" positionSelfEdges", function() { positionSelfEdges(g); });
41518 time(" removeBorderNodes", function() { removeBorderNodes(g); });
41519 time(" normalize.undo", function() { normalize.undo(g); });
41520 time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); });
41521 time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); });
41522 time(" translateGraph", function() { translateGraph(g); });
41523 time(" assignNodeIntersects", function() { assignNodeIntersects(g); });
41524 time(" reversePoints", function() { reversePointsForReversedEdges(g); });
41525 time(" acyclic.undo", function() { acyclic.undo(g); });
41526}
41527
41528/*
41529 * Copies final layout information from the layout graph back to the input
41530 * graph. This process only copies whitelisted attributes from the layout graph
41531 * to the input graph, so it serves as a good place to determine what
41532 * attributes can influence layout.
41533 */
41534function updateInputGraph(inputGraph, layoutGraph) {
41535 _.forEach(inputGraph.nodes(), function(v) {
41536 var inputLabel = inputGraph.node(v);
41537 var layoutLabel = layoutGraph.node(v);
41538
41539 if (inputLabel) {
41540 inputLabel.x = layoutLabel.x;
41541 inputLabel.y = layoutLabel.y;
41542
41543 if (layoutGraph.children(v).length) {
41544 inputLabel.width = layoutLabel.width;
41545 inputLabel.height = layoutLabel.height;
41546 }
41547 }
41548 });
41549
41550 _.forEach(inputGraph.edges(), function(e) {
41551 var inputLabel = inputGraph.edge(e);
41552 var layoutLabel = layoutGraph.edge(e);
41553
41554 inputLabel.points = layoutLabel.points;
41555 if (_.has(layoutLabel, "x")) {
41556 inputLabel.x = layoutLabel.x;
41557 inputLabel.y = layoutLabel.y;
41558 }
41559 });
41560
41561 inputGraph.graph().width = layoutGraph.graph().width;
41562 inputGraph.graph().height = layoutGraph.graph().height;
41563}
41564
41565var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"];
41566var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" };
41567var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"];
41568var nodeNumAttrs = ["width", "height"];
41569var nodeDefaults = { width: 0, height: 0 };
41570var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"];
41571var edgeDefaults = {
41572 minlen: 1, weight: 1, width: 0, height: 0,
41573 labeloffset: 10, labelpos: "r"
41574};
41575var edgeAttrs = ["labelpos"];
41576
41577/*
41578 * Constructs a new graph from the input graph, which can be used for layout.
41579 * This process copies only whitelisted attributes from the input graph to the
41580 * layout graph. Thus this function serves as a good place to determine what
41581 * attributes can influence layout.
41582 */
41583function buildLayoutGraph(inputGraph) {
41584 var g = new Graph({ multigraph: true, compound: true });
41585 var graph = canonicalize(inputGraph.graph());
41586
41587 g.setGraph(_.merge({},
41588 graphDefaults,
41589 selectNumberAttrs(graph, graphNumAttrs),
41590 _.pick(graph, graphAttrs)));
41591
41592 _.forEach(inputGraph.nodes(), function(v) {
41593 var node = canonicalize(inputGraph.node(v));
41594 g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults));
41595 g.setParent(v, inputGraph.parent(v));
41596 });
41597
41598 _.forEach(inputGraph.edges(), function(e) {
41599 var edge = canonicalize(inputGraph.edge(e));
41600 g.setEdge(e, _.merge({},
41601 edgeDefaults,
41602 selectNumberAttrs(edge, edgeNumAttrs),
41603 _.pick(edge, edgeAttrs)));
41604 });
41605
41606 return g;
41607}
41608
41609/*
41610 * This idea comes from the Gansner paper: to account for edge labels in our
41611 * layout we split each rank in half by doubling minlen and halving ranksep.
41612 * Then we can place labels at these mid-points between nodes.
41613 *
41614 * We also add some minimal padding to the width to push the label for the edge
41615 * away from the edge itself a bit.
41616 */
41617function makeSpaceForEdgeLabels(g) {
41618 var graph = g.graph();
41619 graph.ranksep /= 2;
41620 _.forEach(g.edges(), function(e) {
41621 var edge = g.edge(e);
41622 edge.minlen *= 2;
41623 if (edge.labelpos.toLowerCase() !== "c") {
41624 if (graph.rankdir === "TB" || graph.rankdir === "BT") {
41625 edge.width += edge.labeloffset;
41626 } else {
41627 edge.height += edge.labeloffset;
41628 }
41629 }
41630 });
41631}
41632
41633/*
41634 * Creates temporary dummy nodes that capture the rank in which each edge's
41635 * label is going to, if it has one of non-zero width and height. We do this
41636 * so that we can safely remove empty ranks while preserving balance for the
41637 * label's position.
41638 */
41639function injectEdgeLabelProxies(g) {
41640 _.forEach(g.edges(), function(e) {
41641 var edge = g.edge(e);
41642 if (edge.width && edge.height) {
41643 var v = g.node(e.v);
41644 var w = g.node(e.w);
41645 var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e };
41646 util.addDummyNode(g, "edge-proxy", label, "_ep");
41647 }
41648 });
41649}
41650
41651function assignRankMinMax(g) {
41652 var maxRank = 0;
41653 _.forEach(g.nodes(), function(v) {
41654 var node = g.node(v);
41655 if (node.borderTop) {
41656 node.minRank = g.node(node.borderTop).rank;
41657 node.maxRank = g.node(node.borderBottom).rank;
41658 maxRank = _.max(maxRank, node.maxRank);
41659 }
41660 });
41661 g.graph().maxRank = maxRank;
41662}
41663
41664function removeEdgeLabelProxies(g) {
41665 _.forEach(g.nodes(), function(v) {
41666 var node = g.node(v);
41667 if (node.dummy === "edge-proxy") {
41668 g.edge(node.e).labelRank = node.rank;
41669 g.removeNode(v);
41670 }
41671 });
41672}
41673
41674function translateGraph(g) {
41675 var minX = Number.POSITIVE_INFINITY;
41676 var maxX = 0;
41677 var minY = Number.POSITIVE_INFINITY;
41678 var maxY = 0;
41679 var graphLabel = g.graph();
41680 var marginX = graphLabel.marginx || 0;
41681 var marginY = graphLabel.marginy || 0;
41682
41683 function getExtremes(attrs) {
41684 var x = attrs.x;
41685 var y = attrs.y;
41686 var w = attrs.width;
41687 var h = attrs.height;
41688 minX = Math.min(minX, x - w / 2);
41689 maxX = Math.max(maxX, x + w / 2);
41690 minY = Math.min(minY, y - h / 2);
41691 maxY = Math.max(maxY, y + h / 2);
41692 }
41693
41694 _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); });
41695 _.forEach(g.edges(), function(e) {
41696 var edge = g.edge(e);
41697 if (_.has(edge, "x")) {
41698 getExtremes(edge);
41699 }
41700 });
41701
41702 minX -= marginX;
41703 minY -= marginY;
41704
41705 _.forEach(g.nodes(), function(v) {
41706 var node = g.node(v);
41707 node.x -= minX;
41708 node.y -= minY;
41709 });
41710
41711 _.forEach(g.edges(), function(e) {
41712 var edge = g.edge(e);
41713 _.forEach(edge.points, function(p) {
41714 p.x -= minX;
41715 p.y -= minY;
41716 });
41717 if (_.has(edge, "x")) { edge.x -= minX; }
41718 if (_.has(edge, "y")) { edge.y -= minY; }
41719 });
41720
41721 graphLabel.width = maxX - minX + marginX;
41722 graphLabel.height = maxY - minY + marginY;
41723}
41724
41725function assignNodeIntersects(g) {
41726 _.forEach(g.edges(), function(e) {
41727 var edge = g.edge(e);
41728 var nodeV = g.node(e.v);
41729 var nodeW = g.node(e.w);
41730 var p1, p2;
41731 if (!edge.points) {
41732 edge.points = [];
41733 p1 = nodeW;
41734 p2 = nodeV;
41735 } else {
41736 p1 = edge.points[0];
41737 p2 = edge.points[edge.points.length - 1];
41738 }
41739 edge.points.unshift(util.intersectRect(nodeV, p1));
41740 edge.points.push(util.intersectRect(nodeW, p2));
41741 });
41742}
41743
41744function fixupEdgeLabelCoords(g) {
41745 _.forEach(g.edges(), function(e) {
41746 var edge = g.edge(e);
41747 if (_.has(edge, "x")) {
41748 if (edge.labelpos === "l" || edge.labelpos === "r") {
41749 edge.width -= edge.labeloffset;
41750 }
41751 switch (edge.labelpos) {
41752 case "l": edge.x -= edge.width / 2 + edge.labeloffset; break;
41753 case "r": edge.x += edge.width / 2 + edge.labeloffset; break;
41754 }
41755 }
41756 });
41757}
41758
41759function reversePointsForReversedEdges(g) {
41760 _.forEach(g.edges(), function(e) {
41761 var edge = g.edge(e);
41762 if (edge.reversed) {
41763 edge.points.reverse();
41764 }
41765 });
41766}
41767
41768function removeBorderNodes(g) {
41769 _.forEach(g.nodes(), function(v) {
41770 if (g.children(v).length) {
41771 var node = g.node(v);
41772 var t = g.node(node.borderTop);
41773 var b = g.node(node.borderBottom);
41774 var l = g.node(_.last(node.borderLeft));
41775 var r = g.node(_.last(node.borderRight));
41776
41777 node.width = Math.abs(r.x - l.x);
41778 node.height = Math.abs(b.y - t.y);
41779 node.x = l.x + node.width / 2;
41780 node.y = t.y + node.height / 2;
41781 }
41782 });
41783
41784 _.forEach(g.nodes(), function(v) {
41785 if (g.node(v).dummy === "border") {
41786 g.removeNode(v);
41787 }
41788 });
41789}
41790
41791function removeSelfEdges(g) {
41792 _.forEach(g.edges(), function(e) {
41793 if (e.v === e.w) {
41794 var node = g.node(e.v);
41795 if (!node.selfEdges) {
41796 node.selfEdges = [];
41797 }
41798 node.selfEdges.push({ e: e, label: g.edge(e) });
41799 g.removeEdge(e);
41800 }
41801 });
41802}
41803
41804function insertSelfEdges(g) {
41805 var layers = util.buildLayerMatrix(g);
41806 _.forEach(layers, function(layer) {
41807 var orderShift = 0;
41808 _.forEach(layer, function(v, i) {
41809 var node = g.node(v);
41810 node.order = i + orderShift;
41811 _.forEach(node.selfEdges, function(selfEdge) {
41812 util.addDummyNode(g, "selfedge", {
41813 width: selfEdge.label.width,
41814 height: selfEdge.label.height,
41815 rank: node.rank,
41816 order: i + (++orderShift),
41817 e: selfEdge.e,
41818 label: selfEdge.label
41819 }, "_se");
41820 });
41821 delete node.selfEdges;
41822 });
41823 });
41824}
41825
41826function positionSelfEdges(g) {
41827 _.forEach(g.nodes(), function(v) {
41828 var node = g.node(v);
41829 if (node.dummy === "selfedge") {
41830 var selfNode = g.node(node.e.v);
41831 var x = selfNode.x + selfNode.width / 2;
41832 var y = selfNode.y;
41833 var dx = node.x - x;
41834 var dy = selfNode.height / 2;
41835 g.setEdge(node.e, node.label);
41836 g.removeNode(v);
41837 node.label.points = [
41838 { x: x + 2 * dx / 3, y: y - dy },
41839 { x: x + 5 * dx / 6, y: y - dy },
41840 { x: x + dx , y: y },
41841 { x: x + 5 * dx / 6, y: y + dy },
41842 { x: x + 2 * dx / 3, y: y + dy }
41843 ];
41844 node.label.x = node.x;
41845 node.label.y = node.y;
41846 }
41847 });
41848}
41849
41850function selectNumberAttrs(obj, attrs) {
41851 return _.mapValues(_.pick(obj, attrs), Number);
41852}
41853
41854function canonicalize(attrs) {
41855 var newAttrs = {};
41856 _.forEach(attrs, function(v, k) {
41857 newAttrs[k.toLowerCase()] = v;
41858 });
41859 return newAttrs;
41860}
41861
41862
41863/***/ }),
41864
41865/***/ "./node_modules/dagre/lib/lodash.js":
41866/*!******************************************!*\
41867 !*** ./node_modules/dagre/lib/lodash.js ***!
41868 \******************************************/
41869/*! no static exports found */
41870/***/ (function(module, exports, __webpack_require__) {
41871
41872/* global window */
41873
41874var lodash;
41875
41876if (true) {
41877 try {
41878 lodash = {
41879 cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"),
41880 constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"),
41881 defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"),
41882 each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"),
41883 filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"),
41884 find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"),
41885 flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"),
41886 forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"),
41887 forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"),
41888 has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"),
41889 isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"),
41890 last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"),
41891 map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"),
41892 mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"),
41893 max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"),
41894 merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"),
41895 min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"),
41896 minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"),
41897 now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"),
41898 pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"),
41899 range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"),
41900 reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"),
41901 sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"),
41902 uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"),
41903 values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"),
41904 zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"),
41905 };
41906 } catch (e) {
41907 // continue regardless of error
41908 }
41909}
41910
41911if (!lodash) {
41912 lodash = window._;
41913}
41914
41915module.exports = lodash;
41916
41917
41918/***/ }),
41919
41920/***/ "./node_modules/dagre/lib/nesting-graph.js":
41921/*!*************************************************!*\
41922 !*** ./node_modules/dagre/lib/nesting-graph.js ***!
41923 \*************************************************/
41924/*! no static exports found */
41925/***/ (function(module, exports, __webpack_require__) {
41926
41927var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
41928var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js");
41929
41930module.exports = {
41931 run: run,
41932 cleanup: cleanup
41933};
41934
41935/*
41936 * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs,
41937 * adds appropriate edges to ensure that all cluster nodes are placed between
41938 * these boundries, and ensures that the graph is connected.
41939 *
41940 * In addition we ensure, through the use of the minlen property, that nodes
41941 * and subgraph border nodes to not end up on the same rank.
41942 *
41943 * Preconditions:
41944 *
41945 * 1. Input graph is a DAG
41946 * 2. Nodes in the input graph has a minlen attribute
41947 *
41948 * Postconditions:
41949 *
41950 * 1. Input graph is connected.
41951 * 2. Dummy nodes are added for the tops and bottoms of subgraphs.
41952 * 3. The minlen attribute for nodes is adjusted to ensure nodes do not
41953 * get placed on the same rank as subgraph border nodes.
41954 *
41955 * The nesting graph idea comes from Sander, "Layout of Compound Directed
41956 * Graphs."
41957 */
41958function run(g) {
41959 var root = util.addDummyNode(g, "root", {}, "_root");
41960 var depths = treeDepths(g);
41961 var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array
41962 var nodeSep = 2 * height + 1;
41963
41964 g.graph().nestingRoot = root;
41965
41966 // Multiply minlen by nodeSep to align nodes on non-border ranks.
41967 _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; });
41968
41969 // Calculate a weight that is sufficient to keep subgraphs vertically compact
41970 var weight = sumWeights(g) + 1;
41971
41972 // Create border nodes and link them up
41973 _.forEach(g.children(), function(child) {
41974 dfs(g, root, nodeSep, weight, height, depths, child);
41975 });
41976
41977 // Save the multiplier for node layers for later removal of empty border
41978 // layers.
41979 g.graph().nodeRankFactor = nodeSep;
41980}
41981
41982function dfs(g, root, nodeSep, weight, height, depths, v) {
41983 var children = g.children(v);
41984 if (!children.length) {
41985 if (v !== root) {
41986 g.setEdge(root, v, { weight: 0, minlen: nodeSep });
41987 }
41988 return;
41989 }
41990
41991 var top = util.addBorderNode(g, "_bt");
41992 var bottom = util.addBorderNode(g, "_bb");
41993 var label = g.node(v);
41994
41995 g.setParent(top, v);
41996 label.borderTop = top;
41997 g.setParent(bottom, v);
41998 label.borderBottom = bottom;
41999
42000 _.forEach(children, function(child) {
42001 dfs(g, root, nodeSep, weight, height, depths, child);
42002
42003 var childNode = g.node(child);
42004 var childTop = childNode.borderTop ? childNode.borderTop : child;
42005 var childBottom = childNode.borderBottom ? childNode.borderBottom : child;
42006 var thisWeight = childNode.borderTop ? weight : 2 * weight;
42007 var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1;
42008
42009 g.setEdge(top, childTop, {
42010 weight: thisWeight,
42011 minlen: minlen,
42012 nestingEdge: true
42013 });
42014
42015 g.setEdge(childBottom, bottom, {
42016 weight: thisWeight,
42017 minlen: minlen,
42018 nestingEdge: true
42019 });
42020 });
42021
42022 if (!g.parent(v)) {
42023 g.setEdge(root, top, { weight: 0, minlen: height + depths[v] });
42024 }
42025}
42026
42027function treeDepths(g) {
42028 var depths = {};
42029 function dfs(v, depth) {
42030 var children = g.children(v);
42031 if (children && children.length) {
42032 _.forEach(children, function(child) {
42033 dfs(child, depth + 1);
42034 });
42035 }
42036 depths[v] = depth;
42037 }
42038 _.forEach(g.children(), function(v) { dfs(v, 1); });
42039 return depths;
42040}
42041
42042function sumWeights(g) {
42043 return _.reduce(g.edges(), function(acc, e) {
42044 return acc + g.edge(e).weight;
42045 }, 0);
42046}
42047
42048function cleanup(g) {
42049 var graphLabel = g.graph();
42050 g.removeNode(graphLabel.nestingRoot);
42051 delete graphLabel.nestingRoot;
42052 _.forEach(g.edges(), function(e) {
42053 var edge = g.edge(e);
42054 if (edge.nestingEdge) {
42055 g.removeEdge(e);
42056 }
42057 });
42058}
42059
42060
42061/***/ }),
42062
42063/***/ "./node_modules/dagre/lib/normalize.js":
42064/*!*********************************************!*\
42065 !*** ./node_modules/dagre/lib/normalize.js ***!
42066 \*********************************************/
42067/*! no static exports found */
42068/***/ (function(module, exports, __webpack_require__) {
42069
42070"use strict";
42071
42072
42073var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
42074var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js");
42075
42076module.exports = {
42077 run: run,
42078 undo: undo
42079};
42080
42081/*
42082 * Breaks any long edges in the graph into short segments that span 1 layer
42083 * each. This operation is undoable with the denormalize function.
42084 *
42085 * Pre-conditions:
42086 *
42087 * 1. The input graph is a DAG.
42088 * 2. Each node in the graph has a "rank" property.
42089 *
42090 * Post-condition:
42091 *
42092 * 1. All edges in the graph have a length of 1.
42093 * 2. Dummy nodes are added where edges have been split into segments.
42094 * 3. The graph is augmented with a "dummyChains" attribute which contains
42095 * the first dummy in each chain of dummy nodes produced.
42096 */
42097function run(g) {
42098 g.graph().dummyChains = [];
42099 _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); });
42100}
42101
42102function normalizeEdge(g, e) {
42103 var v = e.v;
42104 var vRank = g.node(v).rank;
42105 var w = e.w;
42106 var wRank = g.node(w).rank;
42107 var name = e.name;
42108 var edgeLabel = g.edge(e);
42109 var labelRank = edgeLabel.labelRank;
42110
42111 if (wRank === vRank + 1) return;
42112
42113 g.removeEdge(e);
42114
42115 var dummy, attrs, i;
42116 for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) {
42117 edgeLabel.points = [];
42118 attrs = {
42119 width: 0, height: 0,
42120 edgeLabel: edgeLabel, edgeObj: e,
42121 rank: vRank
42122 };
42123 dummy = util.addDummyNode(g, "edge", attrs, "_d");
42124 if (vRank === labelRank) {
42125 attrs.width = edgeLabel.width;
42126 attrs.height = edgeLabel.height;
42127 attrs.dummy = "edge-label";
42128 attrs.labelpos = edgeLabel.labelpos;
42129 }
42130 g.setEdge(v, dummy, { weight: edgeLabel.weight }, name);
42131 if (i === 0) {
42132 g.graph().dummyChains.push(dummy);
42133 }
42134 v = dummy;
42135 }
42136
42137 g.setEdge(v, w, { weight: edgeLabel.weight }, name);
42138}
42139
42140function undo(g) {
42141 _.forEach(g.graph().dummyChains, function(v) {
42142 var node = g.node(v);
42143 var origLabel = node.edgeLabel;
42144 var w;
42145 g.setEdge(node.edgeObj, origLabel);
42146 while (node.dummy) {
42147 w = g.successors(v)[0];
42148 g.removeNode(v);
42149 origLabel.points.push({ x: node.x, y: node.y });
42150 if (node.dummy === "edge-label") {
42151 origLabel.x = node.x;
42152 origLabel.y = node.y;
42153 origLabel.width = node.width;
42154 origLabel.height = node.height;
42155 }
42156 v = w;
42157 node = g.node(v);
42158 }
42159 });
42160}
42161
42162
42163/***/ }),
42164
42165/***/ "./node_modules/dagre/lib/order/add-subgraph-constraints.js":
42166/*!******************************************************************!*\
42167 !*** ./node_modules/dagre/lib/order/add-subgraph-constraints.js ***!
42168 \******************************************************************/
42169/*! no static exports found */
42170/***/ (function(module, exports, __webpack_require__) {
42171
42172var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42173
42174module.exports = addSubgraphConstraints;
42175
42176function addSubgraphConstraints(g, cg, vs) {
42177 var prev = {},
42178 rootPrev;
42179
42180 _.forEach(vs, function(v) {
42181 var child = g.parent(v),
42182 parent,
42183 prevChild;
42184 while (child) {
42185 parent = g.parent(child);
42186 if (parent) {
42187 prevChild = prev[parent];
42188 prev[parent] = child;
42189 } else {
42190 prevChild = rootPrev;
42191 rootPrev = child;
42192 }
42193 if (prevChild && prevChild !== child) {
42194 cg.setEdge(prevChild, child);
42195 return;
42196 }
42197 child = parent;
42198 }
42199 });
42200
42201 /*
42202 function dfs(v) {
42203 var children = v ? g.children(v) : g.children();
42204 if (children.length) {
42205 var min = Number.POSITIVE_INFINITY,
42206 subgraphs = [];
42207 _.each(children, function(child) {
42208 var childMin = dfs(child);
42209 if (g.children(child).length) {
42210 subgraphs.push({ v: child, order: childMin });
42211 }
42212 min = Math.min(min, childMin);
42213 });
42214 _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) {
42215 cg.setEdge(prev.v, curr.v);
42216 return curr;
42217 });
42218 return min;
42219 }
42220 return g.node(v).order;
42221 }
42222 dfs(undefined);
42223 */
42224}
42225
42226
42227/***/ }),
42228
42229/***/ "./node_modules/dagre/lib/order/barycenter.js":
42230/*!****************************************************!*\
42231 !*** ./node_modules/dagre/lib/order/barycenter.js ***!
42232 \****************************************************/
42233/*! no static exports found */
42234/***/ (function(module, exports, __webpack_require__) {
42235
42236var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42237
42238module.exports = barycenter;
42239
42240function barycenter(g, movable) {
42241 return _.map(movable, function(v) {
42242 var inV = g.inEdges(v);
42243 if (!inV.length) {
42244 return { v: v };
42245 } else {
42246 var result = _.reduce(inV, function(acc, e) {
42247 var edge = g.edge(e),
42248 nodeU = g.node(e.v);
42249 return {
42250 sum: acc.sum + (edge.weight * nodeU.order),
42251 weight: acc.weight + edge.weight
42252 };
42253 }, { sum: 0, weight: 0 });
42254
42255 return {
42256 v: v,
42257 barycenter: result.sum / result.weight,
42258 weight: result.weight
42259 };
42260 }
42261 });
42262}
42263
42264
42265
42266/***/ }),
42267
42268/***/ "./node_modules/dagre/lib/order/build-layer-graph.js":
42269/*!***********************************************************!*\
42270 !*** ./node_modules/dagre/lib/order/build-layer-graph.js ***!
42271 \***********************************************************/
42272/*! no static exports found */
42273/***/ (function(module, exports, __webpack_require__) {
42274
42275var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42276var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
42277
42278module.exports = buildLayerGraph;
42279
42280/*
42281 * Constructs a graph that can be used to sort a layer of nodes. The graph will
42282 * contain all base and subgraph nodes from the request layer in their original
42283 * hierarchy and any edges that are incident on these nodes and are of the type
42284 * requested by the "relationship" parameter.
42285 *
42286 * Nodes from the requested rank that do not have parents are assigned a root
42287 * node in the output graph, which is set in the root graph attribute. This
42288 * makes it easy to walk the hierarchy of movable nodes during ordering.
42289 *
42290 * Pre-conditions:
42291 *
42292 * 1. Input graph is a DAG
42293 * 2. Base nodes in the input graph have a rank attribute
42294 * 3. Subgraph nodes in the input graph has minRank and maxRank attributes
42295 * 4. Edges have an assigned weight
42296 *
42297 * Post-conditions:
42298 *
42299 * 1. Output graph has all nodes in the movable rank with preserved
42300 * hierarchy.
42301 * 2. Root nodes in the movable layer are made children of the node
42302 * indicated by the root attribute of the graph.
42303 * 3. Non-movable nodes incident on movable nodes, selected by the
42304 * relationship parameter, are included in the graph (without hierarchy).
42305 * 4. Edges incident on movable nodes, selected by the relationship
42306 * parameter, are added to the output graph.
42307 * 5. The weights for copied edges are aggregated as need, since the output
42308 * graph is not a multi-graph.
42309 */
42310function buildLayerGraph(g, rank, relationship) {
42311 var root = createRootNode(g),
42312 result = new Graph({ compound: true }).setGraph({ root: root })
42313 .setDefaultNodeLabel(function(v) { return g.node(v); });
42314
42315 _.forEach(g.nodes(), function(v) {
42316 var node = g.node(v),
42317 parent = g.parent(v);
42318
42319 if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) {
42320 result.setNode(v);
42321 result.setParent(v, parent || root);
42322
42323 // This assumes we have only short edges!
42324 _.forEach(g[relationship](v), function(e) {
42325 var u = e.v === v ? e.w : e.v,
42326 edge = result.edge(u, v),
42327 weight = !_.isUndefined(edge) ? edge.weight : 0;
42328 result.setEdge(u, v, { weight: g.edge(e).weight + weight });
42329 });
42330
42331 if (_.has(node, "minRank")) {
42332 result.setNode(v, {
42333 borderLeft: node.borderLeft[rank],
42334 borderRight: node.borderRight[rank]
42335 });
42336 }
42337 }
42338 });
42339
42340 return result;
42341}
42342
42343function createRootNode(g) {
42344 var v;
42345 while (g.hasNode((v = _.uniqueId("_root"))));
42346 return v;
42347}
42348
42349
42350/***/ }),
42351
42352/***/ "./node_modules/dagre/lib/order/cross-count.js":
42353/*!*****************************************************!*\
42354 !*** ./node_modules/dagre/lib/order/cross-count.js ***!
42355 \*****************************************************/
42356/*! no static exports found */
42357/***/ (function(module, exports, __webpack_require__) {
42358
42359"use strict";
42360
42361
42362var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42363
42364module.exports = crossCount;
42365
42366/*
42367 * A function that takes a layering (an array of layers, each with an array of
42368 * ordererd nodes) and a graph and returns a weighted crossing count.
42369 *
42370 * Pre-conditions:
42371 *
42372 * 1. Input graph must be simple (not a multigraph), directed, and include
42373 * only simple edges.
42374 * 2. Edges in the input graph must have assigned weights.
42375 *
42376 * Post-conditions:
42377 *
42378 * 1. The graph and layering matrix are left unchanged.
42379 *
42380 * This algorithm is derived from Barth, et al., "Bilayer Cross Counting."
42381 */
42382function crossCount(g, layering) {
42383 var cc = 0;
42384 for (var i = 1; i < layering.length; ++i) {
42385 cc += twoLayerCrossCount(g, layering[i-1], layering[i]);
42386 }
42387 return cc;
42388}
42389
42390function twoLayerCrossCount(g, northLayer, southLayer) {
42391 // Sort all of the edges between the north and south layers by their position
42392 // in the north layer and then the south. Map these edges to the position of
42393 // their head in the south layer.
42394 var southPos = _.zipObject(southLayer,
42395 _.map(southLayer, function (v, i) { return i; }));
42396 var southEntries = _.flatten(_.map(northLayer, function(v) {
42397 return _.sortBy(_.map(g.outEdges(v), function(e) {
42398 return { pos: southPos[e.w], weight: g.edge(e).weight };
42399 }), "pos");
42400 }), true);
42401
42402 // Build the accumulator tree
42403 var firstIndex = 1;
42404 while (firstIndex < southLayer.length) firstIndex <<= 1;
42405 var treeSize = 2 * firstIndex - 1;
42406 firstIndex -= 1;
42407 var tree = _.map(new Array(treeSize), function() { return 0; });
42408
42409 // Calculate the weighted crossings
42410 var cc = 0;
42411 _.forEach(southEntries.forEach(function(entry) {
42412 var index = entry.pos + firstIndex;
42413 tree[index] += entry.weight;
42414 var weightSum = 0;
42415 while (index > 0) {
42416 if (index % 2) {
42417 weightSum += tree[index + 1];
42418 }
42419 index = (index - 1) >> 1;
42420 tree[index] += entry.weight;
42421 }
42422 cc += entry.weight * weightSum;
42423 }));
42424
42425 return cc;
42426}
42427
42428
42429/***/ }),
42430
42431/***/ "./node_modules/dagre/lib/order/index.js":
42432/*!***********************************************!*\
42433 !*** ./node_modules/dagre/lib/order/index.js ***!
42434 \***********************************************/
42435/*! no static exports found */
42436/***/ (function(module, exports, __webpack_require__) {
42437
42438"use strict";
42439
42440
42441var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42442var initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre/lib/order/init-order.js");
42443var crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre/lib/order/cross-count.js");
42444var sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre/lib/order/sort-subgraph.js");
42445var buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre/lib/order/build-layer-graph.js");
42446var addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre/lib/order/add-subgraph-constraints.js");
42447var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
42448var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js");
42449
42450module.exports = order;
42451
42452/*
42453 * Applies heuristics to minimize edge crossings in the graph and sets the best
42454 * order solution as an order attribute on each node.
42455 *
42456 * Pre-conditions:
42457 *
42458 * 1. Graph must be DAG
42459 * 2. Graph nodes must be objects with a "rank" attribute
42460 * 3. Graph edges must have the "weight" attribute
42461 *
42462 * Post-conditions:
42463 *
42464 * 1. Graph nodes will have an "order" attribute based on the results of the
42465 * algorithm.
42466 */
42467function order(g) {
42468 var maxRank = util.maxRank(g),
42469 downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"),
42470 upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges");
42471
42472 var layering = initOrder(g);
42473 assignOrder(g, layering);
42474
42475 var bestCC = Number.POSITIVE_INFINITY,
42476 best;
42477
42478 for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) {
42479 sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2);
42480
42481 layering = util.buildLayerMatrix(g);
42482 var cc = crossCount(g, layering);
42483 if (cc < bestCC) {
42484 lastBest = 0;
42485 best = _.cloneDeep(layering);
42486 bestCC = cc;
42487 }
42488 }
42489
42490 assignOrder(g, best);
42491}
42492
42493function buildLayerGraphs(g, ranks, relationship) {
42494 return _.map(ranks, function(rank) {
42495 return buildLayerGraph(g, rank, relationship);
42496 });
42497}
42498
42499function sweepLayerGraphs(layerGraphs, biasRight) {
42500 var cg = new Graph();
42501 _.forEach(layerGraphs, function(lg) {
42502 var root = lg.graph().root;
42503 var sorted = sortSubgraph(lg, root, cg, biasRight);
42504 _.forEach(sorted.vs, function(v, i) {
42505 lg.node(v).order = i;
42506 });
42507 addSubgraphConstraints(lg, cg, sorted.vs);
42508 });
42509}
42510
42511function assignOrder(g, layering) {
42512 _.forEach(layering, function(layer) {
42513 _.forEach(layer, function(v, i) {
42514 g.node(v).order = i;
42515 });
42516 });
42517}
42518
42519
42520/***/ }),
42521
42522/***/ "./node_modules/dagre/lib/order/init-order.js":
42523/*!****************************************************!*\
42524 !*** ./node_modules/dagre/lib/order/init-order.js ***!
42525 \****************************************************/
42526/*! no static exports found */
42527/***/ (function(module, exports, __webpack_require__) {
42528
42529"use strict";
42530
42531
42532var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42533
42534module.exports = initOrder;
42535
42536/*
42537 * Assigns an initial order value for each node by performing a DFS search
42538 * starting from nodes in the first rank. Nodes are assigned an order in their
42539 * rank as they are first visited.
42540 *
42541 * This approach comes from Gansner, et al., "A Technique for Drawing Directed
42542 * Graphs."
42543 *
42544 * Returns a layering matrix with an array per layer and each layer sorted by
42545 * the order of its nodes.
42546 */
42547function initOrder(g) {
42548 var visited = {};
42549 var simpleNodes = _.filter(g.nodes(), function(v) {
42550 return !g.children(v).length;
42551 });
42552 var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; }));
42553 var layers = _.map(_.range(maxRank + 1), function() { return []; });
42554
42555 function dfs(v) {
42556 if (_.has(visited, v)) return;
42557 visited[v] = true;
42558 var node = g.node(v);
42559 layers[node.rank].push(v);
42560 _.forEach(g.successors(v), dfs);
42561 }
42562
42563 var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; });
42564 _.forEach(orderedVs, dfs);
42565
42566 return layers;
42567}
42568
42569
42570/***/ }),
42571
42572/***/ "./node_modules/dagre/lib/order/resolve-conflicts.js":
42573/*!***********************************************************!*\
42574 !*** ./node_modules/dagre/lib/order/resolve-conflicts.js ***!
42575 \***********************************************************/
42576/*! no static exports found */
42577/***/ (function(module, exports, __webpack_require__) {
42578
42579"use strict";
42580
42581
42582var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42583
42584module.exports = resolveConflicts;
42585
42586/*
42587 * Given a list of entries of the form {v, barycenter, weight} and a
42588 * constraint graph this function will resolve any conflicts between the
42589 * constraint graph and the barycenters for the entries. If the barycenters for
42590 * an entry would violate a constraint in the constraint graph then we coalesce
42591 * the nodes in the conflict into a new node that respects the contraint and
42592 * aggregates barycenter and weight information.
42593 *
42594 * This implementation is based on the description in Forster, "A Fast and
42595 * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it
42596 * differs in some specific details.
42597 *
42598 * Pre-conditions:
42599 *
42600 * 1. Each entry has the form {v, barycenter, weight}, or if the node has
42601 * no barycenter, then {v}.
42602 *
42603 * Returns:
42604 *
42605 * A new list of entries of the form {vs, i, barycenter, weight}. The list
42606 * `vs` may either be a singleton or it may be an aggregation of nodes
42607 * ordered such that they do not violate constraints from the constraint
42608 * graph. The property `i` is the lowest original index of any of the
42609 * elements in `vs`.
42610 */
42611function resolveConflicts(entries, cg) {
42612 var mappedEntries = {};
42613 _.forEach(entries, function(entry, i) {
42614 var tmp = mappedEntries[entry.v] = {
42615 indegree: 0,
42616 "in": [],
42617 out: [],
42618 vs: [entry.v],
42619 i: i
42620 };
42621 if (!_.isUndefined(entry.barycenter)) {
42622 tmp.barycenter = entry.barycenter;
42623 tmp.weight = entry.weight;
42624 }
42625 });
42626
42627 _.forEach(cg.edges(), function(e) {
42628 var entryV = mappedEntries[e.v];
42629 var entryW = mappedEntries[e.w];
42630 if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) {
42631 entryW.indegree++;
42632 entryV.out.push(mappedEntries[e.w]);
42633 }
42634 });
42635
42636 var sourceSet = _.filter(mappedEntries, function(entry) {
42637 return !entry.indegree;
42638 });
42639
42640 return doResolveConflicts(sourceSet);
42641}
42642
42643function doResolveConflicts(sourceSet) {
42644 var entries = [];
42645
42646 function handleIn(vEntry) {
42647 return function(uEntry) {
42648 if (uEntry.merged) {
42649 return;
42650 }
42651 if (_.isUndefined(uEntry.barycenter) ||
42652 _.isUndefined(vEntry.barycenter) ||
42653 uEntry.barycenter >= vEntry.barycenter) {
42654 mergeEntries(vEntry, uEntry);
42655 }
42656 };
42657 }
42658
42659 function handleOut(vEntry) {
42660 return function(wEntry) {
42661 wEntry["in"].push(vEntry);
42662 if (--wEntry.indegree === 0) {
42663 sourceSet.push(wEntry);
42664 }
42665 };
42666 }
42667
42668 while (sourceSet.length) {
42669 var entry = sourceSet.pop();
42670 entries.push(entry);
42671 _.forEach(entry["in"].reverse(), handleIn(entry));
42672 _.forEach(entry.out, handleOut(entry));
42673 }
42674
42675 return _.map(_.filter(entries, function(entry) { return !entry.merged; }),
42676 function(entry) {
42677 return _.pick(entry, ["vs", "i", "barycenter", "weight"]);
42678 });
42679
42680}
42681
42682function mergeEntries(target, source) {
42683 var sum = 0;
42684 var weight = 0;
42685
42686 if (target.weight) {
42687 sum += target.barycenter * target.weight;
42688 weight += target.weight;
42689 }
42690
42691 if (source.weight) {
42692 sum += source.barycenter * source.weight;
42693 weight += source.weight;
42694 }
42695
42696 target.vs = source.vs.concat(target.vs);
42697 target.barycenter = sum / weight;
42698 target.weight = weight;
42699 target.i = Math.min(source.i, target.i);
42700 source.merged = true;
42701}
42702
42703
42704/***/ }),
42705
42706/***/ "./node_modules/dagre/lib/order/sort-subgraph.js":
42707/*!*******************************************************!*\
42708 !*** ./node_modules/dagre/lib/order/sort-subgraph.js ***!
42709 \*******************************************************/
42710/*! no static exports found */
42711/***/ (function(module, exports, __webpack_require__) {
42712
42713var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42714var barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre/lib/order/barycenter.js");
42715var resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre/lib/order/resolve-conflicts.js");
42716var sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre/lib/order/sort.js");
42717
42718module.exports = sortSubgraph;
42719
42720function sortSubgraph(g, v, cg, biasRight) {
42721 var movable = g.children(v);
42722 var node = g.node(v);
42723 var bl = node ? node.borderLeft : undefined;
42724 var br = node ? node.borderRight: undefined;
42725 var subgraphs = {};
42726
42727 if (bl) {
42728 movable = _.filter(movable, function(w) {
42729 return w !== bl && w !== br;
42730 });
42731 }
42732
42733 var barycenters = barycenter(g, movable);
42734 _.forEach(barycenters, function(entry) {
42735 if (g.children(entry.v).length) {
42736 var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);
42737 subgraphs[entry.v] = subgraphResult;
42738 if (_.has(subgraphResult, "barycenter")) {
42739 mergeBarycenters(entry, subgraphResult);
42740 }
42741 }
42742 });
42743
42744 var entries = resolveConflicts(barycenters, cg);
42745 expandSubgraphs(entries, subgraphs);
42746
42747 var result = sort(entries, biasRight);
42748
42749 if (bl) {
42750 result.vs = _.flatten([bl, result.vs, br], true);
42751 if (g.predecessors(bl).length) {
42752 var blPred = g.node(g.predecessors(bl)[0]),
42753 brPred = g.node(g.predecessors(br)[0]);
42754 if (!_.has(result, "barycenter")) {
42755 result.barycenter = 0;
42756 result.weight = 0;
42757 }
42758 result.barycenter = (result.barycenter * result.weight +
42759 blPred.order + brPred.order) / (result.weight + 2);
42760 result.weight += 2;
42761 }
42762 }
42763
42764 return result;
42765}
42766
42767function expandSubgraphs(entries, subgraphs) {
42768 _.forEach(entries, function(entry) {
42769 entry.vs = _.flatten(entry.vs.map(function(v) {
42770 if (subgraphs[v]) {
42771 return subgraphs[v].vs;
42772 }
42773 return v;
42774 }), true);
42775 });
42776}
42777
42778function mergeBarycenters(target, other) {
42779 if (!_.isUndefined(target.barycenter)) {
42780 target.barycenter = (target.barycenter * target.weight +
42781 other.barycenter * other.weight) /
42782 (target.weight + other.weight);
42783 target.weight += other.weight;
42784 } else {
42785 target.barycenter = other.barycenter;
42786 target.weight = other.weight;
42787 }
42788}
42789
42790
42791/***/ }),
42792
42793/***/ "./node_modules/dagre/lib/order/sort.js":
42794/*!**********************************************!*\
42795 !*** ./node_modules/dagre/lib/order/sort.js ***!
42796 \**********************************************/
42797/*! no static exports found */
42798/***/ (function(module, exports, __webpack_require__) {
42799
42800var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42801var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js");
42802
42803module.exports = sort;
42804
42805function sort(entries, biasRight) {
42806 var parts = util.partition(entries, function(entry) {
42807 return _.has(entry, "barycenter");
42808 });
42809 var sortable = parts.lhs,
42810 unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }),
42811 vs = [],
42812 sum = 0,
42813 weight = 0,
42814 vsIndex = 0;
42815
42816 sortable.sort(compareWithBias(!!biasRight));
42817
42818 vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
42819
42820 _.forEach(sortable, function (entry) {
42821 vsIndex += entry.vs.length;
42822 vs.push(entry.vs);
42823 sum += entry.barycenter * entry.weight;
42824 weight += entry.weight;
42825 vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
42826 });
42827
42828 var result = { vs: _.flatten(vs, true) };
42829 if (weight) {
42830 result.barycenter = sum / weight;
42831 result.weight = weight;
42832 }
42833 return result;
42834}
42835
42836function consumeUnsortable(vs, unsortable, index) {
42837 var last;
42838 while (unsortable.length && (last = _.last(unsortable)).i <= index) {
42839 unsortable.pop();
42840 vs.push(last.vs);
42841 index++;
42842 }
42843 return index;
42844}
42845
42846function compareWithBias(bias) {
42847 return function(entryV, entryW) {
42848 if (entryV.barycenter < entryW.barycenter) {
42849 return -1;
42850 } else if (entryV.barycenter > entryW.barycenter) {
42851 return 1;
42852 }
42853
42854 return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;
42855 };
42856}
42857
42858
42859/***/ }),
42860
42861/***/ "./node_modules/dagre/lib/parent-dummy-chains.js":
42862/*!*******************************************************!*\
42863 !*** ./node_modules/dagre/lib/parent-dummy-chains.js ***!
42864 \*******************************************************/
42865/*! no static exports found */
42866/***/ (function(module, exports, __webpack_require__) {
42867
42868var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
42869
42870module.exports = parentDummyChains;
42871
42872function parentDummyChains(g) {
42873 var postorderNums = postorder(g);
42874
42875 _.forEach(g.graph().dummyChains, function(v) {
42876 var node = g.node(v);
42877 var edgeObj = node.edgeObj;
42878 var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
42879 var path = pathData.path;
42880 var lca = pathData.lca;
42881 var pathIdx = 0;
42882 var pathV = path[pathIdx];
42883 var ascending = true;
42884
42885 while (v !== edgeObj.w) {
42886 node = g.node(v);
42887
42888 if (ascending) {
42889 while ((pathV = path[pathIdx]) !== lca &&
42890 g.node(pathV).maxRank < node.rank) {
42891 pathIdx++;
42892 }
42893
42894 if (pathV === lca) {
42895 ascending = false;
42896 }
42897 }
42898
42899 if (!ascending) {
42900 while (pathIdx < path.length - 1 &&
42901 g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) {
42902 pathIdx++;
42903 }
42904 pathV = path[pathIdx];
42905 }
42906
42907 g.setParent(v, pathV);
42908 v = g.successors(v)[0];
42909 }
42910 });
42911}
42912
42913// Find a path from v to w through the lowest common ancestor (LCA). Return the
42914// full path and the LCA.
42915function findPath(g, postorderNums, v, w) {
42916 var vPath = [];
42917 var wPath = [];
42918 var low = Math.min(postorderNums[v].low, postorderNums[w].low);
42919 var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);
42920 var parent;
42921 var lca;
42922
42923 // Traverse up from v to find the LCA
42924 parent = v;
42925 do {
42926 parent = g.parent(parent);
42927 vPath.push(parent);
42928 } while (parent &&
42929 (postorderNums[parent].low > low || lim > postorderNums[parent].lim));
42930 lca = parent;
42931
42932 // Traverse from w to LCA
42933 parent = w;
42934 while ((parent = g.parent(parent)) !== lca) {
42935 wPath.push(parent);
42936 }
42937
42938 return { path: vPath.concat(wPath.reverse()), lca: lca };
42939}
42940
42941function postorder(g) {
42942 var result = {};
42943 var lim = 0;
42944
42945 function dfs(v) {
42946 var low = lim;
42947 _.forEach(g.children(v), dfs);
42948 result[v] = { low: low, lim: lim++ };
42949 }
42950 _.forEach(g.children(), dfs);
42951
42952 return result;
42953}
42954
42955
42956/***/ }),
42957
42958/***/ "./node_modules/dagre/lib/position/bk.js":
42959/*!***********************************************!*\
42960 !*** ./node_modules/dagre/lib/position/bk.js ***!
42961 \***********************************************/
42962/*! no static exports found */
42963/***/ (function(module, exports, __webpack_require__) {
42964
42965"use strict";
42966
42967
42968var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
42969var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
42970var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js");
42971
42972/*
42973 * This module provides coordinate assignment based on Brandes and Köpf, "Fast
42974 * and Simple Horizontal Coordinate Assignment."
42975 */
42976
42977module.exports = {
42978 positionX: positionX,
42979 findType1Conflicts: findType1Conflicts,
42980 findType2Conflicts: findType2Conflicts,
42981 addConflict: addConflict,
42982 hasConflict: hasConflict,
42983 verticalAlignment: verticalAlignment,
42984 horizontalCompaction: horizontalCompaction,
42985 alignCoordinates: alignCoordinates,
42986 findSmallestWidthAlignment: findSmallestWidthAlignment,
42987 balance: balance
42988};
42989
42990/*
42991 * Marks all edges in the graph with a type-1 conflict with the "type1Conflict"
42992 * property. A type-1 conflict is one where a non-inner segment crosses an
42993 * inner segment. An inner segment is an edge with both incident nodes marked
42994 * with the "dummy" property.
42995 *
42996 * This algorithm scans layer by layer, starting with the second, for type-1
42997 * conflicts between the current layer and the previous layer. For each layer
42998 * it scans the nodes from left to right until it reaches one that is incident
42999 * on an inner segment. It then scans predecessors to determine if they have
43000 * edges that cross that inner segment. At the end a final scan is done for all
43001 * nodes on the current rank to see if they cross the last visited inner
43002 * segment.
43003 *
43004 * This algorithm (safely) assumes that a dummy node will only be incident on a
43005 * single node in the layers being scanned.
43006 */
43007function findType1Conflicts(g, layering) {
43008 var conflicts = {};
43009
43010 function visitLayer(prevLayer, layer) {
43011 var
43012 // last visited node in the previous layer that is incident on an inner
43013 // segment.
43014 k0 = 0,
43015 // Tracks the last node in this layer scanned for crossings with a type-1
43016 // segment.
43017 scanPos = 0,
43018 prevLayerLength = prevLayer.length,
43019 lastNode = _.last(layer);
43020
43021 _.forEach(layer, function(v, i) {
43022 var w = findOtherInnerSegmentNode(g, v),
43023 k1 = w ? g.node(w).order : prevLayerLength;
43024
43025 if (w || v === lastNode) {
43026 _.forEach(layer.slice(scanPos, i +1), function(scanNode) {
43027 _.forEach(g.predecessors(scanNode), function(u) {
43028 var uLabel = g.node(u),
43029 uPos = uLabel.order;
43030 if ((uPos < k0 || k1 < uPos) &&
43031 !(uLabel.dummy && g.node(scanNode).dummy)) {
43032 addConflict(conflicts, u, scanNode);
43033 }
43034 });
43035 });
43036 scanPos = i + 1;
43037 k0 = k1;
43038 }
43039 });
43040
43041 return layer;
43042 }
43043
43044 _.reduce(layering, visitLayer);
43045 return conflicts;
43046}
43047
43048function findType2Conflicts(g, layering) {
43049 var conflicts = {};
43050
43051 function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) {
43052 var v;
43053 _.forEach(_.range(southPos, southEnd), function(i) {
43054 v = south[i];
43055 if (g.node(v).dummy) {
43056 _.forEach(g.predecessors(v), function(u) {
43057 var uNode = g.node(u);
43058 if (uNode.dummy &&
43059 (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) {
43060 addConflict(conflicts, u, v);
43061 }
43062 });
43063 }
43064 });
43065 }
43066
43067
43068 function visitLayer(north, south) {
43069 var prevNorthPos = -1,
43070 nextNorthPos,
43071 southPos = 0;
43072
43073 _.forEach(south, function(v, southLookahead) {
43074 if (g.node(v).dummy === "border") {
43075 var predecessors = g.predecessors(v);
43076 if (predecessors.length) {
43077 nextNorthPos = g.node(predecessors[0]).order;
43078 scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos);
43079 southPos = southLookahead;
43080 prevNorthPos = nextNorthPos;
43081 }
43082 }
43083 scan(south, southPos, south.length, nextNorthPos, north.length);
43084 });
43085
43086 return south;
43087 }
43088
43089 _.reduce(layering, visitLayer);
43090 return conflicts;
43091}
43092
43093function findOtherInnerSegmentNode(g, v) {
43094 if (g.node(v).dummy) {
43095 return _.find(g.predecessors(v), function(u) {
43096 return g.node(u).dummy;
43097 });
43098 }
43099}
43100
43101function addConflict(conflicts, v, w) {
43102 if (v > w) {
43103 var tmp = v;
43104 v = w;
43105 w = tmp;
43106 }
43107
43108 var conflictsV = conflicts[v];
43109 if (!conflictsV) {
43110 conflicts[v] = conflictsV = {};
43111 }
43112 conflictsV[w] = true;
43113}
43114
43115function hasConflict(conflicts, v, w) {
43116 if (v > w) {
43117 var tmp = v;
43118 v = w;
43119 w = tmp;
43120 }
43121 return _.has(conflicts[v], w);
43122}
43123
43124/*
43125 * Try to align nodes into vertical "blocks" where possible. This algorithm
43126 * attempts to align a node with one of its median neighbors. If the edge
43127 * connecting a neighbor is a type-1 conflict then we ignore that possibility.
43128 * If a previous node has already formed a block with a node after the node
43129 * we're trying to form a block with, we also ignore that possibility - our
43130 * blocks would be split in that scenario.
43131 */
43132function verticalAlignment(g, layering, conflicts, neighborFn) {
43133 var root = {},
43134 align = {},
43135 pos = {};
43136
43137 // We cache the position here based on the layering because the graph and
43138 // layering may be out of sync. The layering matrix is manipulated to
43139 // generate different extreme alignments.
43140 _.forEach(layering, function(layer) {
43141 _.forEach(layer, function(v, order) {
43142 root[v] = v;
43143 align[v] = v;
43144 pos[v] = order;
43145 });
43146 });
43147
43148 _.forEach(layering, function(layer) {
43149 var prevIdx = -1;
43150 _.forEach(layer, function(v) {
43151 var ws = neighborFn(v);
43152 if (ws.length) {
43153 ws = _.sortBy(ws, function(w) { return pos[w]; });
43154 var mp = (ws.length - 1) / 2;
43155 for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) {
43156 var w = ws[i];
43157 if (align[v] === v &&
43158 prevIdx < pos[w] &&
43159 !hasConflict(conflicts, v, w)) {
43160 align[w] = v;
43161 align[v] = root[v] = root[w];
43162 prevIdx = pos[w];
43163 }
43164 }
43165 }
43166 });
43167 });
43168
43169 return { root: root, align: align };
43170}
43171
43172function horizontalCompaction(g, layering, root, align, reverseSep) {
43173 // This portion of the algorithm differs from BK due to a number of problems.
43174 // Instead of their algorithm we construct a new block graph and do two
43175 // sweeps. The first sweep places blocks with the smallest possible
43176 // coordinates. The second sweep removes unused space by moving blocks to the
43177 // greatest coordinates without violating separation.
43178 var xs = {},
43179 blockG = buildBlockGraph(g, layering, root, reverseSep),
43180 borderType = reverseSep ? "borderLeft" : "borderRight";
43181
43182 function iterate(setXsFunc, nextNodesFunc) {
43183 var stack = blockG.nodes();
43184 var elem = stack.pop();
43185 var visited = {};
43186 while (elem) {
43187 if (visited[elem]) {
43188 setXsFunc(elem);
43189 } else {
43190 visited[elem] = true;
43191 stack.push(elem);
43192 stack = stack.concat(nextNodesFunc(elem));
43193 }
43194
43195 elem = stack.pop();
43196 }
43197 }
43198
43199 // First pass, assign smallest coordinates
43200 function pass1(elem) {
43201 xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) {
43202 return Math.max(acc, xs[e.v] + blockG.edge(e));
43203 }, 0);
43204 }
43205
43206 // Second pass, assign greatest coordinates
43207 function pass2(elem) {
43208 var min = blockG.outEdges(elem).reduce(function(acc, e) {
43209 return Math.min(acc, xs[e.w] - blockG.edge(e));
43210 }, Number.POSITIVE_INFINITY);
43211
43212 var node = g.node(elem);
43213 if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) {
43214 xs[elem] = Math.max(xs[elem], min);
43215 }
43216 }
43217
43218 iterate(pass1, blockG.predecessors.bind(blockG));
43219 iterate(pass2, blockG.successors.bind(blockG));
43220
43221 // Assign x coordinates to all nodes
43222 _.forEach(align, function(v) {
43223 xs[v] = xs[root[v]];
43224 });
43225
43226 return xs;
43227}
43228
43229
43230function buildBlockGraph(g, layering, root, reverseSep) {
43231 var blockGraph = new Graph(),
43232 graphLabel = g.graph(),
43233 sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep);
43234
43235 _.forEach(layering, function(layer) {
43236 var u;
43237 _.forEach(layer, function(v) {
43238 var vRoot = root[v];
43239 blockGraph.setNode(vRoot);
43240 if (u) {
43241 var uRoot = root[u],
43242 prevMax = blockGraph.edge(uRoot, vRoot);
43243 blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0));
43244 }
43245 u = v;
43246 });
43247 });
43248
43249 return blockGraph;
43250}
43251
43252/*
43253 * Returns the alignment that has the smallest width of the given alignments.
43254 */
43255function findSmallestWidthAlignment(g, xss) {
43256 return _.minBy(_.values(xss), function (xs) {
43257 var max = Number.NEGATIVE_INFINITY;
43258 var min = Number.POSITIVE_INFINITY;
43259
43260 _.forIn(xs, function (x, v) {
43261 var halfWidth = width(g, v) / 2;
43262
43263 max = Math.max(x + halfWidth, max);
43264 min = Math.min(x - halfWidth, min);
43265 });
43266
43267 return max - min;
43268 });
43269}
43270
43271/*
43272 * Align the coordinates of each of the layout alignments such that
43273 * left-biased alignments have their minimum coordinate at the same point as
43274 * the minimum coordinate of the smallest width alignment and right-biased
43275 * alignments have their maximum coordinate at the same point as the maximum
43276 * coordinate of the smallest width alignment.
43277 */
43278function alignCoordinates(xss, alignTo) {
43279 var alignToVals = _.values(alignTo),
43280 alignToMin = _.min(alignToVals),
43281 alignToMax = _.max(alignToVals);
43282
43283 _.forEach(["u", "d"], function(vert) {
43284 _.forEach(["l", "r"], function(horiz) {
43285 var alignment = vert + horiz,
43286 xs = xss[alignment],
43287 delta;
43288 if (xs === alignTo) return;
43289
43290 var xsVals = _.values(xs);
43291 delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals);
43292
43293 if (delta) {
43294 xss[alignment] = _.mapValues(xs, function(x) { return x + delta; });
43295 }
43296 });
43297 });
43298}
43299
43300function balance(xss, align) {
43301 return _.mapValues(xss.ul, function(ignore, v) {
43302 if (align) {
43303 return xss[align.toLowerCase()][v];
43304 } else {
43305 var xs = _.sortBy(_.map(xss, v));
43306 return (xs[1] + xs[2]) / 2;
43307 }
43308 });
43309}
43310
43311function positionX(g) {
43312 var layering = util.buildLayerMatrix(g);
43313 var conflicts = _.merge(
43314 findType1Conflicts(g, layering),
43315 findType2Conflicts(g, layering));
43316
43317 var xss = {};
43318 var adjustedLayering;
43319 _.forEach(["u", "d"], function(vert) {
43320 adjustedLayering = vert === "u" ? layering : _.values(layering).reverse();
43321 _.forEach(["l", "r"], function(horiz) {
43322 if (horiz === "r") {
43323 adjustedLayering = _.map(adjustedLayering, function(inner) {
43324 return _.values(inner).reverse();
43325 });
43326 }
43327
43328 var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g);
43329 var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn);
43330 var xs = horizontalCompaction(g, adjustedLayering,
43331 align.root, align.align, horiz === "r");
43332 if (horiz === "r") {
43333 xs = _.mapValues(xs, function(x) { return -x; });
43334 }
43335 xss[vert + horiz] = xs;
43336 });
43337 });
43338
43339 var smallestWidth = findSmallestWidthAlignment(g, xss);
43340 alignCoordinates(xss, smallestWidth);
43341 return balance(xss, g.graph().align);
43342}
43343
43344function sep(nodeSep, edgeSep, reverseSep) {
43345 return function(g, v, w) {
43346 var vLabel = g.node(v);
43347 var wLabel = g.node(w);
43348 var sum = 0;
43349 var delta;
43350
43351 sum += vLabel.width / 2;
43352 if (_.has(vLabel, "labelpos")) {
43353 switch (vLabel.labelpos.toLowerCase()) {
43354 case "l": delta = -vLabel.width / 2; break;
43355 case "r": delta = vLabel.width / 2; break;
43356 }
43357 }
43358 if (delta) {
43359 sum += reverseSep ? delta : -delta;
43360 }
43361 delta = 0;
43362
43363 sum += (vLabel.dummy ? edgeSep : nodeSep) / 2;
43364 sum += (wLabel.dummy ? edgeSep : nodeSep) / 2;
43365
43366 sum += wLabel.width / 2;
43367 if (_.has(wLabel, "labelpos")) {
43368 switch (wLabel.labelpos.toLowerCase()) {
43369 case "l": delta = wLabel.width / 2; break;
43370 case "r": delta = -wLabel.width / 2; break;
43371 }
43372 }
43373 if (delta) {
43374 sum += reverseSep ? delta : -delta;
43375 }
43376 delta = 0;
43377
43378 return sum;
43379 };
43380}
43381
43382function width(g, v) {
43383 return g.node(v).width;
43384}
43385
43386
43387/***/ }),
43388
43389/***/ "./node_modules/dagre/lib/position/index.js":
43390/*!**************************************************!*\
43391 !*** ./node_modules/dagre/lib/position/index.js ***!
43392 \**************************************************/
43393/*! no static exports found */
43394/***/ (function(module, exports, __webpack_require__) {
43395
43396"use strict";
43397
43398
43399var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
43400var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js");
43401var positionX = __webpack_require__(/*! ./bk */ "./node_modules/dagre/lib/position/bk.js").positionX;
43402
43403module.exports = position;
43404
43405function position(g) {
43406 g = util.asNonCompoundGraph(g);
43407
43408 positionY(g);
43409 _.forEach(positionX(g), function(x, v) {
43410 g.node(v).x = x;
43411 });
43412}
43413
43414function positionY(g) {
43415 var layering = util.buildLayerMatrix(g);
43416 var rankSep = g.graph().ranksep;
43417 var prevY = 0;
43418 _.forEach(layering, function(layer) {
43419 var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; }));
43420 _.forEach(layer, function(v) {
43421 g.node(v).y = prevY + maxHeight / 2;
43422 });
43423 prevY += maxHeight + rankSep;
43424 });
43425}
43426
43427
43428
43429/***/ }),
43430
43431/***/ "./node_modules/dagre/lib/rank/feasible-tree.js":
43432/*!******************************************************!*\
43433 !*** ./node_modules/dagre/lib/rank/feasible-tree.js ***!
43434 \******************************************************/
43435/*! no static exports found */
43436/***/ (function(module, exports, __webpack_require__) {
43437
43438"use strict";
43439
43440
43441var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
43442var Graph = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
43443var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack;
43444
43445module.exports = feasibleTree;
43446
43447/*
43448 * Constructs a spanning tree with tight edges and adjusted the input node's
43449 * ranks to achieve this. A tight edge is one that is has a length that matches
43450 * its "minlen" attribute.
43451 *
43452 * The basic structure for this function is derived from Gansner, et al., "A
43453 * Technique for Drawing Directed Graphs."
43454 *
43455 * Pre-conditions:
43456 *
43457 * 1. Graph must be a DAG.
43458 * 2. Graph must be connected.
43459 * 3. Graph must have at least one node.
43460 * 5. Graph nodes must have been previously assigned a "rank" property that
43461 * respects the "minlen" property of incident edges.
43462 * 6. Graph edges must have a "minlen" property.
43463 *
43464 * Post-conditions:
43465 *
43466 * - Graph nodes will have their rank adjusted to ensure that all edges are
43467 * tight.
43468 *
43469 * Returns a tree (undirected graph) that is constructed using only "tight"
43470 * edges.
43471 */
43472function feasibleTree(g) {
43473 var t = new Graph({ directed: false });
43474
43475 // Choose arbitrary node from which to start our tree
43476 var start = g.nodes()[0];
43477 var size = g.nodeCount();
43478 t.setNode(start, {});
43479
43480 var edge, delta;
43481 while (tightTree(t, g) < size) {
43482 edge = findMinSlackEdge(t, g);
43483 delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge);
43484 shiftRanks(t, g, delta);
43485 }
43486
43487 return t;
43488}
43489
43490/*
43491 * Finds a maximal tree of tight edges and returns the number of nodes in the
43492 * tree.
43493 */
43494function tightTree(t, g) {
43495 function dfs(v) {
43496 _.forEach(g.nodeEdges(v), function(e) {
43497 var edgeV = e.v,
43498 w = (v === edgeV) ? e.w : edgeV;
43499 if (!t.hasNode(w) && !slack(g, e)) {
43500 t.setNode(w, {});
43501 t.setEdge(v, w, {});
43502 dfs(w);
43503 }
43504 });
43505 }
43506
43507 _.forEach(t.nodes(), dfs);
43508 return t.nodeCount();
43509}
43510
43511/*
43512 * Finds the edge with the smallest slack that is incident on tree and returns
43513 * it.
43514 */
43515function findMinSlackEdge(t, g) {
43516 return _.minBy(g.edges(), function(e) {
43517 if (t.hasNode(e.v) !== t.hasNode(e.w)) {
43518 return slack(g, e);
43519 }
43520 });
43521}
43522
43523function shiftRanks(t, g, delta) {
43524 _.forEach(t.nodes(), function(v) {
43525 g.node(v).rank += delta;
43526 });
43527}
43528
43529
43530/***/ }),
43531
43532/***/ "./node_modules/dagre/lib/rank/index.js":
43533/*!**********************************************!*\
43534 !*** ./node_modules/dagre/lib/rank/index.js ***!
43535 \**********************************************/
43536/*! no static exports found */
43537/***/ (function(module, exports, __webpack_require__) {
43538
43539"use strict";
43540
43541
43542var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js");
43543var longestPath = rankUtil.longestPath;
43544var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js");
43545var networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre/lib/rank/network-simplex.js");
43546
43547module.exports = rank;
43548
43549/*
43550 * Assigns a rank to each node in the input graph that respects the "minlen"
43551 * constraint specified on edges between nodes.
43552 *
43553 * This basic structure is derived from Gansner, et al., "A Technique for
43554 * Drawing Directed Graphs."
43555 *
43556 * Pre-conditions:
43557 *
43558 * 1. Graph must be a connected DAG
43559 * 2. Graph nodes must be objects
43560 * 3. Graph edges must have "weight" and "minlen" attributes
43561 *
43562 * Post-conditions:
43563 *
43564 * 1. Graph nodes will have a "rank" attribute based on the results of the
43565 * algorithm. Ranks can start at any index (including negative), we'll
43566 * fix them up later.
43567 */
43568function rank(g) {
43569 switch(g.graph().ranker) {
43570 case "network-simplex": networkSimplexRanker(g); break;
43571 case "tight-tree": tightTreeRanker(g); break;
43572 case "longest-path": longestPathRanker(g); break;
43573 default: networkSimplexRanker(g);
43574 }
43575}
43576
43577// A fast and simple ranker, but results are far from optimal.
43578var longestPathRanker = longestPath;
43579
43580function tightTreeRanker(g) {
43581 longestPath(g);
43582 feasibleTree(g);
43583}
43584
43585function networkSimplexRanker(g) {
43586 networkSimplex(g);
43587}
43588
43589
43590/***/ }),
43591
43592/***/ "./node_modules/dagre/lib/rank/network-simplex.js":
43593/*!********************************************************!*\
43594 !*** ./node_modules/dagre/lib/rank/network-simplex.js ***!
43595 \********************************************************/
43596/*! no static exports found */
43597/***/ (function(module, exports, __webpack_require__) {
43598
43599"use strict";
43600
43601
43602var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
43603var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js");
43604var slack = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack;
43605var initRank = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").longestPath;
43606var preorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.preorder;
43607var postorder = __webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.postorder;
43608var simplify = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js").simplify;
43609
43610module.exports = networkSimplex;
43611
43612// Expose some internals for testing purposes
43613networkSimplex.initLowLimValues = initLowLimValues;
43614networkSimplex.initCutValues = initCutValues;
43615networkSimplex.calcCutValue = calcCutValue;
43616networkSimplex.leaveEdge = leaveEdge;
43617networkSimplex.enterEdge = enterEdge;
43618networkSimplex.exchangeEdges = exchangeEdges;
43619
43620/*
43621 * The network simplex algorithm assigns ranks to each node in the input graph
43622 * and iteratively improves the ranking to reduce the length of edges.
43623 *
43624 * Preconditions:
43625 *
43626 * 1. The input graph must be a DAG.
43627 * 2. All nodes in the graph must have an object value.
43628 * 3. All edges in the graph must have "minlen" and "weight" attributes.
43629 *
43630 * Postconditions:
43631 *
43632 * 1. All nodes in the graph will have an assigned "rank" attribute that has
43633 * been optimized by the network simplex algorithm. Ranks start at 0.
43634 *
43635 *
43636 * A rough sketch of the algorithm is as follows:
43637 *
43638 * 1. Assign initial ranks to each node. We use the longest path algorithm,
43639 * which assigns ranks to the lowest position possible. In general this
43640 * leads to very wide bottom ranks and unnecessarily long edges.
43641 * 2. Construct a feasible tight tree. A tight tree is one such that all
43642 * edges in the tree have no slack (difference between length of edge
43643 * and minlen for the edge). This by itself greatly improves the assigned
43644 * rankings by shorting edges.
43645 * 3. Iteratively find edges that have negative cut values. Generally a
43646 * negative cut value indicates that the edge could be removed and a new
43647 * tree edge could be added to produce a more compact graph.
43648 *
43649 * Much of the algorithms here are derived from Gansner, et al., "A Technique
43650 * for Drawing Directed Graphs." The structure of the file roughly follows the
43651 * structure of the overall algorithm.
43652 */
43653function networkSimplex(g) {
43654 g = simplify(g);
43655 initRank(g);
43656 var t = feasibleTree(g);
43657 initLowLimValues(t);
43658 initCutValues(t, g);
43659
43660 var e, f;
43661 while ((e = leaveEdge(t))) {
43662 f = enterEdge(t, g, e);
43663 exchangeEdges(t, g, e, f);
43664 }
43665}
43666
43667/*
43668 * Initializes cut values for all edges in the tree.
43669 */
43670function initCutValues(t, g) {
43671 var vs = postorder(t, t.nodes());
43672 vs = vs.slice(0, vs.length - 1);
43673 _.forEach(vs, function(v) {
43674 assignCutValue(t, g, v);
43675 });
43676}
43677
43678function assignCutValue(t, g, child) {
43679 var childLab = t.node(child);
43680 var parent = childLab.parent;
43681 t.edge(child, parent).cutvalue = calcCutValue(t, g, child);
43682}
43683
43684/*
43685 * Given the tight tree, its graph, and a child in the graph calculate and
43686 * return the cut value for the edge between the child and its parent.
43687 */
43688function calcCutValue(t, g, child) {
43689 var childLab = t.node(child);
43690 var parent = childLab.parent;
43691 // True if the child is on the tail end of the edge in the directed graph
43692 var childIsTail = true;
43693 // The graph's view of the tree edge we're inspecting
43694 var graphEdge = g.edge(child, parent);
43695 // The accumulated cut value for the edge between this node and its parent
43696 var cutValue = 0;
43697
43698 if (!graphEdge) {
43699 childIsTail = false;
43700 graphEdge = g.edge(parent, child);
43701 }
43702
43703 cutValue = graphEdge.weight;
43704
43705 _.forEach(g.nodeEdges(child), function(e) {
43706 var isOutEdge = e.v === child,
43707 other = isOutEdge ? e.w : e.v;
43708
43709 if (other !== parent) {
43710 var pointsToHead = isOutEdge === childIsTail,
43711 otherWeight = g.edge(e).weight;
43712
43713 cutValue += pointsToHead ? otherWeight : -otherWeight;
43714 if (isTreeEdge(t, child, other)) {
43715 var otherCutValue = t.edge(child, other).cutvalue;
43716 cutValue += pointsToHead ? -otherCutValue : otherCutValue;
43717 }
43718 }
43719 });
43720
43721 return cutValue;
43722}
43723
43724function initLowLimValues(tree, root) {
43725 if (arguments.length < 2) {
43726 root = tree.nodes()[0];
43727 }
43728 dfsAssignLowLim(tree, {}, 1, root);
43729}
43730
43731function dfsAssignLowLim(tree, visited, nextLim, v, parent) {
43732 var low = nextLim;
43733 var label = tree.node(v);
43734
43735 visited[v] = true;
43736 _.forEach(tree.neighbors(v), function(w) {
43737 if (!_.has(visited, w)) {
43738 nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v);
43739 }
43740 });
43741
43742 label.low = low;
43743 label.lim = nextLim++;
43744 if (parent) {
43745 label.parent = parent;
43746 } else {
43747 // TODO should be able to remove this when we incrementally update low lim
43748 delete label.parent;
43749 }
43750
43751 return nextLim;
43752}
43753
43754function leaveEdge(tree) {
43755 return _.find(tree.edges(), function(e) {
43756 return tree.edge(e).cutvalue < 0;
43757 });
43758}
43759
43760function enterEdge(t, g, edge) {
43761 var v = edge.v;
43762 var w = edge.w;
43763
43764 // For the rest of this function we assume that v is the tail and w is the
43765 // head, so if we don't have this edge in the graph we should flip it to
43766 // match the correct orientation.
43767 if (!g.hasEdge(v, w)) {
43768 v = edge.w;
43769 w = edge.v;
43770 }
43771
43772 var vLabel = t.node(v);
43773 var wLabel = t.node(w);
43774 var tailLabel = vLabel;
43775 var flip = false;
43776
43777 // If the root is in the tail of the edge then we need to flip the logic that
43778 // checks for the head and tail nodes in the candidates function below.
43779 if (vLabel.lim > wLabel.lim) {
43780 tailLabel = wLabel;
43781 flip = true;
43782 }
43783
43784 var candidates = _.filter(g.edges(), function(edge) {
43785 return flip === isDescendant(t, t.node(edge.v), tailLabel) &&
43786 flip !== isDescendant(t, t.node(edge.w), tailLabel);
43787 });
43788
43789 return _.minBy(candidates, function(edge) { return slack(g, edge); });
43790}
43791
43792function exchangeEdges(t, g, e, f) {
43793 var v = e.v;
43794 var w = e.w;
43795 t.removeEdge(v, w);
43796 t.setEdge(f.v, f.w, {});
43797 initLowLimValues(t);
43798 initCutValues(t, g);
43799 updateRanks(t, g);
43800}
43801
43802function updateRanks(t, g) {
43803 var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; });
43804 var vs = preorder(t, root);
43805 vs = vs.slice(1);
43806 _.forEach(vs, function(v) {
43807 var parent = t.node(v).parent,
43808 edge = g.edge(v, parent),
43809 flipped = false;
43810
43811 if (!edge) {
43812 edge = g.edge(parent, v);
43813 flipped = true;
43814 }
43815
43816 g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen);
43817 });
43818}
43819
43820/*
43821 * Returns true if the edge is in the tree.
43822 */
43823function isTreeEdge(tree, u, v) {
43824 return tree.hasEdge(u, v);
43825}
43826
43827/*
43828 * Returns true if the specified node is descendant of the root node per the
43829 * assigned low and lim attributes in the tree.
43830 */
43831function isDescendant(tree, vLabel, rootLabel) {
43832 return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim;
43833}
43834
43835
43836/***/ }),
43837
43838/***/ "./node_modules/dagre/lib/rank/util.js":
43839/*!*********************************************!*\
43840 !*** ./node_modules/dagre/lib/rank/util.js ***!
43841 \*********************************************/
43842/*! no static exports found */
43843/***/ (function(module, exports, __webpack_require__) {
43844
43845"use strict";
43846
43847
43848var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js");
43849
43850module.exports = {
43851 longestPath: longestPath,
43852 slack: slack
43853};
43854
43855/*
43856 * Initializes ranks for the input graph using the longest path algorithm. This
43857 * algorithm scales well and is fast in practice, it yields rather poor
43858 * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom
43859 * ranks wide and leaving edges longer than necessary. However, due to its
43860 * speed, this algorithm is good for getting an initial ranking that can be fed
43861 * into other algorithms.
43862 *
43863 * This algorithm does not normalize layers because it will be used by other
43864 * algorithms in most cases. If using this algorithm directly, be sure to
43865 * run normalize at the end.
43866 *
43867 * Pre-conditions:
43868 *
43869 * 1. Input graph is a DAG.
43870 * 2. Input graph node labels can be assigned properties.
43871 *
43872 * Post-conditions:
43873 *
43874 * 1. Each node will be assign an (unnormalized) "rank" property.
43875 */
43876function longestPath(g) {
43877 var visited = {};
43878
43879 function dfs(v) {
43880 var label = g.node(v);
43881 if (_.has(visited, v)) {
43882 return label.rank;
43883 }
43884 visited[v] = true;
43885
43886 var rank = _.min(_.map(g.outEdges(v), function(e) {
43887 return dfs(e.w) - g.edge(e).minlen;
43888 }));
43889
43890 if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
43891 rank === undefined || // return value of _.map([]) for Lodash 4
43892 rank === null) { // return value of _.map([null])
43893 rank = 0;
43894 }
43895
43896 return (label.rank = rank);
43897 }
43898
43899 _.forEach(g.sources(), dfs);
43900}
43901
43902/*
43903 * Returns the amount of slack for the given edge. The slack is defined as the
43904 * difference between the length of the edge and its minimum length.
43905 */
43906function slack(g, e) {
43907 return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen;
43908}
43909
43910
43911/***/ }),
43912
43913/***/ "./node_modules/dagre/lib/util.js":
43914/*!****************************************!*\
43915 !*** ./node_modules/dagre/lib/util.js ***!
43916 \****************************************/
43917/*! no static exports found */
43918/***/ (function(module, exports, __webpack_require__) {
43919
43920"use strict";
43921/* eslint "no-console": off */
43922
43923
43924
43925var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js");
43926var Graph = __webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph;
43927
43928module.exports = {
43929 addDummyNode: addDummyNode,
43930 simplify: simplify,
43931 asNonCompoundGraph: asNonCompoundGraph,
43932 successorWeights: successorWeights,
43933 predecessorWeights: predecessorWeights,
43934 intersectRect: intersectRect,
43935 buildLayerMatrix: buildLayerMatrix,
43936 normalizeRanks: normalizeRanks,
43937 removeEmptyRanks: removeEmptyRanks,
43938 addBorderNode: addBorderNode,
43939 maxRank: maxRank,
43940 partition: partition,
43941 time: time,
43942 notime: notime
43943};
43944
43945/*
43946 * Adds a dummy node to the graph and return v.
43947 */
43948function addDummyNode(g, type, attrs, name) {
43949 var v;
43950 do {
43951 v = _.uniqueId(name);
43952 } while (g.hasNode(v));
43953
43954 attrs.dummy = type;
43955 g.setNode(v, attrs);
43956 return v;
43957}
43958
43959/*
43960 * Returns a new graph with only simple edges. Handles aggregation of data
43961 * associated with multi-edges.
43962 */
43963function simplify(g) {
43964 var simplified = new Graph().setGraph(g.graph());
43965 _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); });
43966 _.forEach(g.edges(), function(e) {
43967 var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 };
43968 var label = g.edge(e);
43969 simplified.setEdge(e.v, e.w, {
43970 weight: simpleLabel.weight + label.weight,
43971 minlen: Math.max(simpleLabel.minlen, label.minlen)
43972 });
43973 });
43974 return simplified;
43975}
43976
43977function asNonCompoundGraph(g) {
43978 var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph());
43979 _.forEach(g.nodes(), function(v) {
43980 if (!g.children(v).length) {
43981 simplified.setNode(v, g.node(v));
43982 }
43983 });
43984 _.forEach(g.edges(), function(e) {
43985 simplified.setEdge(e, g.edge(e));
43986 });
43987 return simplified;
43988}
43989
43990function successorWeights(g) {
43991 var weightMap = _.map(g.nodes(), function(v) {
43992 var sucs = {};
43993 _.forEach(g.outEdges(v), function(e) {
43994 sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight;
43995 });
43996 return sucs;
43997 });
43998 return _.zipObject(g.nodes(), weightMap);
43999}
44000
44001function predecessorWeights(g) {
44002 var weightMap = _.map(g.nodes(), function(v) {
44003 var preds = {};
44004 _.forEach(g.inEdges(v), function(e) {
44005 preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight;
44006 });
44007 return preds;
44008 });
44009 return _.zipObject(g.nodes(), weightMap);
44010}
44011
44012/*
44013 * Finds where a line starting at point ({x, y}) would intersect a rectangle
44014 * ({x, y, width, height}) if it were pointing at the rectangle's center.
44015 */
44016function intersectRect(rect, point) {
44017 var x = rect.x;
44018 var y = rect.y;
44019
44020 // Rectangle intersection algorithm from:
44021 // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes
44022 var dx = point.x - x;
44023 var dy = point.y - y;
44024 var w = rect.width / 2;
44025 var h = rect.height / 2;
44026
44027 if (!dx && !dy) {
44028 throw new Error("Not possible to find intersection inside of the rectangle");
44029 }
44030
44031 var sx, sy;
44032 if (Math.abs(dy) * w > Math.abs(dx) * h) {
44033 // Intersection is top or bottom of rect.
44034 if (dy < 0) {
44035 h = -h;
44036 }
44037 sx = h * dx / dy;
44038 sy = h;
44039 } else {
44040 // Intersection is left or right of rect.
44041 if (dx < 0) {
44042 w = -w;
44043 }
44044 sx = w;
44045 sy = w * dy / dx;
44046 }
44047
44048 return { x: x + sx, y: y + sy };
44049}
44050
44051/*
44052 * Given a DAG with each node assigned "rank" and "order" properties, this
44053 * function will produce a matrix with the ids of each node.
44054 */
44055function buildLayerMatrix(g) {
44056 var layering = _.map(_.range(maxRank(g) + 1), function() { return []; });
44057 _.forEach(g.nodes(), function(v) {
44058 var node = g.node(v);
44059 var rank = node.rank;
44060 if (!_.isUndefined(rank)) {
44061 layering[rank][node.order] = v;
44062 }
44063 });
44064 return layering;
44065}
44066
44067/*
44068 * Adjusts the ranks for all nodes in the graph such that all nodes v have
44069 * rank(v) >= 0 and at least one node w has rank(w) = 0.
44070 */
44071function normalizeRanks(g) {
44072 var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));
44073 _.forEach(g.nodes(), function(v) {
44074 var node = g.node(v);
44075 if (_.has(node, "rank")) {
44076 node.rank -= min;
44077 }
44078 });
44079}
44080
44081function removeEmptyRanks(g) {
44082 // Ranks may not start at 0, so we need to offset them
44083 var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; }));
44084
44085 var layers = [];
44086 _.forEach(g.nodes(), function(v) {
44087 var rank = g.node(v).rank - offset;
44088 if (!layers[rank]) {
44089 layers[rank] = [];
44090 }
44091 layers[rank].push(v);
44092 });
44093
44094 var delta = 0;
44095 var nodeRankFactor = g.graph().nodeRankFactor;
44096 _.forEach(layers, function(vs, i) {
44097 if (_.isUndefined(vs) && i % nodeRankFactor !== 0) {
44098 --delta;
44099 } else if (delta) {
44100 _.forEach(vs, function(v) { g.node(v).rank += delta; });
44101 }
44102 });
44103}
44104
44105function addBorderNode(g, prefix, rank, order) {
44106 var node = {
44107 width: 0,
44108 height: 0
44109 };
44110 if (arguments.length >= 4) {
44111 node.rank = rank;
44112 node.order = order;
44113 }
44114 return addDummyNode(g, "border", node, prefix);
44115}
44116
44117function maxRank(g) {
44118 return _.max(_.map(g.nodes(), function(v) {
44119 var rank = g.node(v).rank;
44120 if (!_.isUndefined(rank)) {
44121 return rank;
44122 }
44123 }));
44124}
44125
44126/*
44127 * Partition a collection into two groups: `lhs` and `rhs`. If the supplied
44128 * function returns true for an entry it goes into `lhs`. Otherwise it goes
44129 * into `rhs.
44130 */
44131function partition(collection, fn) {
44132 var result = { lhs: [], rhs: [] };
44133 _.forEach(collection, function(value) {
44134 if (fn(value)) {
44135 result.lhs.push(value);
44136 } else {
44137 result.rhs.push(value);
44138 }
44139 });
44140 return result;
44141}
44142
44143/*
44144 * Returns a new function that wraps `fn` with a timer. The wrapper logs the
44145 * time it takes to execute the function.
44146 */
44147function time(name, fn) {
44148 var start = _.now();
44149 try {
44150 return fn();
44151 } finally {
44152 console.log(name + " time: " + (_.now() - start) + "ms");
44153 }
44154}
44155
44156function notime(name, fn) {
44157 return fn();
44158}
44159
44160
44161/***/ }),
44162
44163/***/ "./node_modules/dagre/lib/version.js":
44164/*!*******************************************!*\
44165 !*** ./node_modules/dagre/lib/version.js ***!
44166 \*******************************************/
44167/*! no static exports found */
44168/***/ (function(module, exports) {
44169
44170module.exports = "0.8.5";
44171
44172
44173/***/ }),
44174
44175/***/ "./node_modules/des.js/lib/des.js":
44176/*!****************************************!*\
44177 !*** ./node_modules/des.js/lib/des.js ***!
44178 \****************************************/
44179/*! no static exports found */
44180/***/ (function(module, exports, __webpack_require__) {
44181
44182"use strict";
44183
44184
44185exports.utils = __webpack_require__(/*! ./des/utils */ "./node_modules/des.js/lib/des/utils.js");
44186exports.Cipher = __webpack_require__(/*! ./des/cipher */ "./node_modules/des.js/lib/des/cipher.js");
44187exports.DES = __webpack_require__(/*! ./des/des */ "./node_modules/des.js/lib/des/des.js");
44188exports.CBC = __webpack_require__(/*! ./des/cbc */ "./node_modules/des.js/lib/des/cbc.js");
44189exports.EDE = __webpack_require__(/*! ./des/ede */ "./node_modules/des.js/lib/des/ede.js");
44190
44191
44192/***/ }),
44193
44194/***/ "./node_modules/des.js/lib/des/cbc.js":
44195/*!********************************************!*\
44196 !*** ./node_modules/des.js/lib/des/cbc.js ***!
44197 \********************************************/
44198/*! no static exports found */
44199/***/ (function(module, exports, __webpack_require__) {
44200
44201"use strict";
44202
44203
44204var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
44205var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
44206
44207var proto = {};
44208
44209function CBCState(iv) {
44210 assert.equal(iv.length, 8, 'Invalid IV length');
44211
44212 this.iv = new Array(8);
44213 for (var i = 0; i < this.iv.length; i++)
44214 this.iv[i] = iv[i];
44215}
44216
44217function instantiate(Base) {
44218 function CBC(options) {
44219 Base.call(this, options);
44220 this._cbcInit();
44221 }
44222 inherits(CBC, Base);
44223
44224 var keys = Object.keys(proto);
44225 for (var i = 0; i < keys.length; i++) {
44226 var key = keys[i];
44227 CBC.prototype[key] = proto[key];
44228 }
44229
44230 CBC.create = function create(options) {
44231 return new CBC(options);
44232 };
44233
44234 return CBC;
44235}
44236
44237exports.instantiate = instantiate;
44238
44239proto._cbcInit = function _cbcInit() {
44240 var state = new CBCState(this.options.iv);
44241 this._cbcState = state;
44242};
44243
44244proto._update = function _update(inp, inOff, out, outOff) {
44245 var state = this._cbcState;
44246 var superProto = this.constructor.super_.prototype;
44247
44248 var iv = state.iv;
44249 if (this.type === 'encrypt') {
44250 for (var i = 0; i < this.blockSize; i++)
44251 iv[i] ^= inp[inOff + i];
44252
44253 superProto._update.call(this, iv, 0, out, outOff);
44254
44255 for (var i = 0; i < this.blockSize; i++)
44256 iv[i] = out[outOff + i];
44257 } else {
44258 superProto._update.call(this, inp, inOff, out, outOff);
44259
44260 for (var i = 0; i < this.blockSize; i++)
44261 out[outOff + i] ^= iv[i];
44262
44263 for (var i = 0; i < this.blockSize; i++)
44264 iv[i] = inp[inOff + i];
44265 }
44266};
44267
44268
44269/***/ }),
44270
44271/***/ "./node_modules/des.js/lib/des/cipher.js":
44272/*!***********************************************!*\
44273 !*** ./node_modules/des.js/lib/des/cipher.js ***!
44274 \***********************************************/
44275/*! no static exports found */
44276/***/ (function(module, exports, __webpack_require__) {
44277
44278"use strict";
44279
44280
44281var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
44282
44283function Cipher(options) {
44284 this.options = options;
44285
44286 this.type = this.options.type;
44287 this.blockSize = 8;
44288 this._init();
44289
44290 this.buffer = new Array(this.blockSize);
44291 this.bufferOff = 0;
44292}
44293module.exports = Cipher;
44294
44295Cipher.prototype._init = function _init() {
44296 // Might be overrided
44297};
44298
44299Cipher.prototype.update = function update(data) {
44300 if (data.length === 0)
44301 return [];
44302
44303 if (this.type === 'decrypt')
44304 return this._updateDecrypt(data);
44305 else
44306 return this._updateEncrypt(data);
44307};
44308
44309Cipher.prototype._buffer = function _buffer(data, off) {
44310 // Append data to buffer
44311 var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);
44312 for (var i = 0; i < min; i++)
44313 this.buffer[this.bufferOff + i] = data[off + i];
44314 this.bufferOff += min;
44315
44316 // Shift next
44317 return min;
44318};
44319
44320Cipher.prototype._flushBuffer = function _flushBuffer(out, off) {
44321 this._update(this.buffer, 0, out, off);
44322 this.bufferOff = 0;
44323 return this.blockSize;
44324};
44325
44326Cipher.prototype._updateEncrypt = function _updateEncrypt(data) {
44327 var inputOff = 0;
44328 var outputOff = 0;
44329
44330 var count = ((this.bufferOff + data.length) / this.blockSize) | 0;
44331 var out = new Array(count * this.blockSize);
44332
44333 if (this.bufferOff !== 0) {
44334 inputOff += this._buffer(data, inputOff);
44335
44336 if (this.bufferOff === this.buffer.length)
44337 outputOff += this._flushBuffer(out, outputOff);
44338 }
44339
44340 // Write blocks
44341 var max = data.length - ((data.length - inputOff) % this.blockSize);
44342 for (; inputOff < max; inputOff += this.blockSize) {
44343 this._update(data, inputOff, out, outputOff);
44344 outputOff += this.blockSize;
44345 }
44346
44347 // Queue rest
44348 for (; inputOff < data.length; inputOff++, this.bufferOff++)
44349 this.buffer[this.bufferOff] = data[inputOff];
44350
44351 return out;
44352};
44353
44354Cipher.prototype._updateDecrypt = function _updateDecrypt(data) {
44355 var inputOff = 0;
44356 var outputOff = 0;
44357
44358 var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;
44359 var out = new Array(count * this.blockSize);
44360
44361 // TODO(indutny): optimize it, this is far from optimal
44362 for (; count > 0; count--) {
44363 inputOff += this._buffer(data, inputOff);
44364 outputOff += this._flushBuffer(out, outputOff);
44365 }
44366
44367 // Buffer rest of the input
44368 inputOff += this._buffer(data, inputOff);
44369
44370 return out;
44371};
44372
44373Cipher.prototype.final = function final(buffer) {
44374 var first;
44375 if (buffer)
44376 first = this.update(buffer);
44377
44378 var last;
44379 if (this.type === 'encrypt')
44380 last = this._finalEncrypt();
44381 else
44382 last = this._finalDecrypt();
44383
44384 if (first)
44385 return first.concat(last);
44386 else
44387 return last;
44388};
44389
44390Cipher.prototype._pad = function _pad(buffer, off) {
44391 if (off === 0)
44392 return false;
44393
44394 while (off < buffer.length)
44395 buffer[off++] = 0;
44396
44397 return true;
44398};
44399
44400Cipher.prototype._finalEncrypt = function _finalEncrypt() {
44401 if (!this._pad(this.buffer, this.bufferOff))
44402 return [];
44403
44404 var out = new Array(this.blockSize);
44405 this._update(this.buffer, 0, out, 0);
44406 return out;
44407};
44408
44409Cipher.prototype._unpad = function _unpad(buffer) {
44410 return buffer;
44411};
44412
44413Cipher.prototype._finalDecrypt = function _finalDecrypt() {
44414 assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');
44415 var out = new Array(this.blockSize);
44416 this._flushBuffer(out, 0);
44417
44418 return this._unpad(out);
44419};
44420
44421
44422/***/ }),
44423
44424/***/ "./node_modules/des.js/lib/des/des.js":
44425/*!********************************************!*\
44426 !*** ./node_modules/des.js/lib/des/des.js ***!
44427 \********************************************/
44428/*! no static exports found */
44429/***/ (function(module, exports, __webpack_require__) {
44430
44431"use strict";
44432
44433
44434var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
44435var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
44436
44437var utils = __webpack_require__(/*! ./utils */ "./node_modules/des.js/lib/des/utils.js");
44438var Cipher = __webpack_require__(/*! ./cipher */ "./node_modules/des.js/lib/des/cipher.js");
44439
44440function DESState() {
44441 this.tmp = new Array(2);
44442 this.keys = null;
44443}
44444
44445function DES(options) {
44446 Cipher.call(this, options);
44447
44448 var state = new DESState();
44449 this._desState = state;
44450
44451 this.deriveKeys(state, options.key);
44452}
44453inherits(DES, Cipher);
44454module.exports = DES;
44455
44456DES.create = function create(options) {
44457 return new DES(options);
44458};
44459
44460var shiftTable = [
44461 1, 1, 2, 2, 2, 2, 2, 2,
44462 1, 2, 2, 2, 2, 2, 2, 1
44463];
44464
44465DES.prototype.deriveKeys = function deriveKeys(state, key) {
44466 state.keys = new Array(16 * 2);
44467
44468 assert.equal(key.length, this.blockSize, 'Invalid key length');
44469
44470 var kL = utils.readUInt32BE(key, 0);
44471 var kR = utils.readUInt32BE(key, 4);
44472
44473 utils.pc1(kL, kR, state.tmp, 0);
44474 kL = state.tmp[0];
44475 kR = state.tmp[1];
44476 for (var i = 0; i < state.keys.length; i += 2) {
44477 var shift = shiftTable[i >>> 1];
44478 kL = utils.r28shl(kL, shift);
44479 kR = utils.r28shl(kR, shift);
44480 utils.pc2(kL, kR, state.keys, i);
44481 }
44482};
44483
44484DES.prototype._update = function _update(inp, inOff, out, outOff) {
44485 var state = this._desState;
44486
44487 var l = utils.readUInt32BE(inp, inOff);
44488 var r = utils.readUInt32BE(inp, inOff + 4);
44489
44490 // Initial Permutation
44491 utils.ip(l, r, state.tmp, 0);
44492 l = state.tmp[0];
44493 r = state.tmp[1];
44494
44495 if (this.type === 'encrypt')
44496 this._encrypt(state, l, r, state.tmp, 0);
44497 else
44498 this._decrypt(state, l, r, state.tmp, 0);
44499
44500 l = state.tmp[0];
44501 r = state.tmp[1];
44502
44503 utils.writeUInt32BE(out, l, outOff);
44504 utils.writeUInt32BE(out, r, outOff + 4);
44505};
44506
44507DES.prototype._pad = function _pad(buffer, off) {
44508 var value = buffer.length - off;
44509 for (var i = off; i < buffer.length; i++)
44510 buffer[i] = value;
44511
44512 return true;
44513};
44514
44515DES.prototype._unpad = function _unpad(buffer) {
44516 var pad = buffer[buffer.length - 1];
44517 for (var i = buffer.length - pad; i < buffer.length; i++)
44518 assert.equal(buffer[i], pad);
44519
44520 return buffer.slice(0, buffer.length - pad);
44521};
44522
44523DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {
44524 var l = lStart;
44525 var r = rStart;
44526
44527 // Apply f() x16 times
44528 for (var i = 0; i < state.keys.length; i += 2) {
44529 var keyL = state.keys[i];
44530 var keyR = state.keys[i + 1];
44531
44532 // f(r, k)
44533 utils.expand(r, state.tmp, 0);
44534
44535 keyL ^= state.tmp[0];
44536 keyR ^= state.tmp[1];
44537 var s = utils.substitute(keyL, keyR);
44538 var f = utils.permute(s);
44539
44540 var t = r;
44541 r = (l ^ f) >>> 0;
44542 l = t;
44543 }
44544
44545 // Reverse Initial Permutation
44546 utils.rip(r, l, out, off);
44547};
44548
44549DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
44550 var l = rStart;
44551 var r = lStart;
44552
44553 // Apply f() x16 times
44554 for (var i = state.keys.length - 2; i >= 0; i -= 2) {
44555 var keyL = state.keys[i];
44556 var keyR = state.keys[i + 1];
44557
44558 // f(r, k)
44559 utils.expand(l, state.tmp, 0);
44560
44561 keyL ^= state.tmp[0];
44562 keyR ^= state.tmp[1];
44563 var s = utils.substitute(keyL, keyR);
44564 var f = utils.permute(s);
44565
44566 var t = l;
44567 l = (r ^ f) >>> 0;
44568 r = t;
44569 }
44570
44571 // Reverse Initial Permutation
44572 utils.rip(l, r, out, off);
44573};
44574
44575
44576/***/ }),
44577
44578/***/ "./node_modules/des.js/lib/des/ede.js":
44579/*!********************************************!*\
44580 !*** ./node_modules/des.js/lib/des/ede.js ***!
44581 \********************************************/
44582/*! no static exports found */
44583/***/ (function(module, exports, __webpack_require__) {
44584
44585"use strict";
44586
44587
44588var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
44589var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
44590
44591var Cipher = __webpack_require__(/*! ./cipher */ "./node_modules/des.js/lib/des/cipher.js");
44592var DES = __webpack_require__(/*! ./des */ "./node_modules/des.js/lib/des/des.js");
44593
44594function EDEState(type, key) {
44595 assert.equal(key.length, 24, 'Invalid key length');
44596
44597 var k1 = key.slice(0, 8);
44598 var k2 = key.slice(8, 16);
44599 var k3 = key.slice(16, 24);
44600
44601 if (type === 'encrypt') {
44602 this.ciphers = [
44603 DES.create({ type: 'encrypt', key: k1 }),
44604 DES.create({ type: 'decrypt', key: k2 }),
44605 DES.create({ type: 'encrypt', key: k3 })
44606 ];
44607 } else {
44608 this.ciphers = [
44609 DES.create({ type: 'decrypt', key: k3 }),
44610 DES.create({ type: 'encrypt', key: k2 }),
44611 DES.create({ type: 'decrypt', key: k1 })
44612 ];
44613 }
44614}
44615
44616function EDE(options) {
44617 Cipher.call(this, options);
44618
44619 var state = new EDEState(this.type, this.options.key);
44620 this._edeState = state;
44621}
44622inherits(EDE, Cipher);
44623
44624module.exports = EDE;
44625
44626EDE.create = function create(options) {
44627 return new EDE(options);
44628};
44629
44630EDE.prototype._update = function _update(inp, inOff, out, outOff) {
44631 var state = this._edeState;
44632
44633 state.ciphers[0]._update(inp, inOff, out, outOff);
44634 state.ciphers[1]._update(out, outOff, out, outOff);
44635 state.ciphers[2]._update(out, outOff, out, outOff);
44636};
44637
44638EDE.prototype._pad = DES.prototype._pad;
44639EDE.prototype._unpad = DES.prototype._unpad;
44640
44641
44642/***/ }),
44643
44644/***/ "./node_modules/des.js/lib/des/utils.js":
44645/*!**********************************************!*\
44646 !*** ./node_modules/des.js/lib/des/utils.js ***!
44647 \**********************************************/
44648/*! no static exports found */
44649/***/ (function(module, exports, __webpack_require__) {
44650
44651"use strict";
44652
44653
44654exports.readUInt32BE = function readUInt32BE(bytes, off) {
44655 var res = (bytes[0 + off] << 24) |
44656 (bytes[1 + off] << 16) |
44657 (bytes[2 + off] << 8) |
44658 bytes[3 + off];
44659 return res >>> 0;
44660};
44661
44662exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {
44663 bytes[0 + off] = value >>> 24;
44664 bytes[1 + off] = (value >>> 16) & 0xff;
44665 bytes[2 + off] = (value >>> 8) & 0xff;
44666 bytes[3 + off] = value & 0xff;
44667};
44668
44669exports.ip = function ip(inL, inR, out, off) {
44670 var outL = 0;
44671 var outR = 0;
44672
44673 for (var i = 6; i >= 0; i -= 2) {
44674 for (var j = 0; j <= 24; j += 8) {
44675 outL <<= 1;
44676 outL |= (inR >>> (j + i)) & 1;
44677 }
44678 for (var j = 0; j <= 24; j += 8) {
44679 outL <<= 1;
44680 outL |= (inL >>> (j + i)) & 1;
44681 }
44682 }
44683
44684 for (var i = 6; i >= 0; i -= 2) {
44685 for (var j = 1; j <= 25; j += 8) {
44686 outR <<= 1;
44687 outR |= (inR >>> (j + i)) & 1;
44688 }
44689 for (var j = 1; j <= 25; j += 8) {
44690 outR <<= 1;
44691 outR |= (inL >>> (j + i)) & 1;
44692 }
44693 }
44694
44695 out[off + 0] = outL >>> 0;
44696 out[off + 1] = outR >>> 0;
44697};
44698
44699exports.rip = function rip(inL, inR, out, off) {
44700 var outL = 0;
44701 var outR = 0;
44702
44703 for (var i = 0; i < 4; i++) {
44704 for (var j = 24; j >= 0; j -= 8) {
44705 outL <<= 1;
44706 outL |= (inR >>> (j + i)) & 1;
44707 outL <<= 1;
44708 outL |= (inL >>> (j + i)) & 1;
44709 }
44710 }
44711 for (var i = 4; i < 8; i++) {
44712 for (var j = 24; j >= 0; j -= 8) {
44713 outR <<= 1;
44714 outR |= (inR >>> (j + i)) & 1;
44715 outR <<= 1;
44716 outR |= (inL >>> (j + i)) & 1;
44717 }
44718 }
44719
44720 out[off + 0] = outL >>> 0;
44721 out[off + 1] = outR >>> 0;
44722};
44723
44724exports.pc1 = function pc1(inL, inR, out, off) {
44725 var outL = 0;
44726 var outR = 0;
44727
44728 // 7, 15, 23, 31, 39, 47, 55, 63
44729 // 6, 14, 22, 30, 39, 47, 55, 63
44730 // 5, 13, 21, 29, 39, 47, 55, 63
44731 // 4, 12, 20, 28
44732 for (var i = 7; i >= 5; i--) {
44733 for (var j = 0; j <= 24; j += 8) {
44734 outL <<= 1;
44735 outL |= (inR >> (j + i)) & 1;
44736 }
44737 for (var j = 0; j <= 24; j += 8) {
44738 outL <<= 1;
44739 outL |= (inL >> (j + i)) & 1;
44740 }
44741 }
44742 for (var j = 0; j <= 24; j += 8) {
44743 outL <<= 1;
44744 outL |= (inR >> (j + i)) & 1;
44745 }
44746
44747 // 1, 9, 17, 25, 33, 41, 49, 57
44748 // 2, 10, 18, 26, 34, 42, 50, 58
44749 // 3, 11, 19, 27, 35, 43, 51, 59
44750 // 36, 44, 52, 60
44751 for (var i = 1; i <= 3; i++) {
44752 for (var j = 0; j <= 24; j += 8) {
44753 outR <<= 1;
44754 outR |= (inR >> (j + i)) & 1;
44755 }
44756 for (var j = 0; j <= 24; j += 8) {
44757 outR <<= 1;
44758 outR |= (inL >> (j + i)) & 1;
44759 }
44760 }
44761 for (var j = 0; j <= 24; j += 8) {
44762 outR <<= 1;
44763 outR |= (inL >> (j + i)) & 1;
44764 }
44765
44766 out[off + 0] = outL >>> 0;
44767 out[off + 1] = outR >>> 0;
44768};
44769
44770exports.r28shl = function r28shl(num, shift) {
44771 return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));
44772};
44773
44774var pc2table = [
44775 // inL => outL
44776 14, 11, 17, 4, 27, 23, 25, 0,
44777 13, 22, 7, 18, 5, 9, 16, 24,
44778 2, 20, 12, 21, 1, 8, 15, 26,
44779
44780 // inR => outR
44781 15, 4, 25, 19, 9, 1, 26, 16,
44782 5, 11, 23, 8, 12, 7, 17, 0,
44783 22, 3, 10, 14, 6, 20, 27, 24
44784];
44785
44786exports.pc2 = function pc2(inL, inR, out, off) {
44787 var outL = 0;
44788 var outR = 0;
44789
44790 var len = pc2table.length >>> 1;
44791 for (var i = 0; i < len; i++) {
44792 outL <<= 1;
44793 outL |= (inL >>> pc2table[i]) & 0x1;
44794 }
44795 for (var i = len; i < pc2table.length; i++) {
44796 outR <<= 1;
44797 outR |= (inR >>> pc2table[i]) & 0x1;
44798 }
44799
44800 out[off + 0] = outL >>> 0;
44801 out[off + 1] = outR >>> 0;
44802};
44803
44804exports.expand = function expand(r, out, off) {
44805 var outL = 0;
44806 var outR = 0;
44807
44808 outL = ((r & 1) << 5) | (r >>> 27);
44809 for (var i = 23; i >= 15; i -= 4) {
44810 outL <<= 6;
44811 outL |= (r >>> i) & 0x3f;
44812 }
44813 for (var i = 11; i >= 3; i -= 4) {
44814 outR |= (r >>> i) & 0x3f;
44815 outR <<= 6;
44816 }
44817 outR |= ((r & 0x1f) << 1) | (r >>> 31);
44818
44819 out[off + 0] = outL >>> 0;
44820 out[off + 1] = outR >>> 0;
44821};
44822
44823var sTable = [
44824 14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,
44825 3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,
44826 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,
44827 15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,
44828
44829 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
44830 9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,
44831 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,
44832 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,
44833
44834 10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,
44835 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,
44836 13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,
44837 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,
44838
44839 7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,
44840 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,
44841 10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,
44842 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,
44843
44844 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,
44845 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,
44846 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,
44847 15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,
44848
44849 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,
44850 0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,
44851 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,
44852 7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,
44853
44854 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,
44855 3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,
44856 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,
44857 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,
44858
44859 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,
44860 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,
44861 7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,
44862 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11
44863];
44864
44865exports.substitute = function substitute(inL, inR) {
44866 var out = 0;
44867 for (var i = 0; i < 4; i++) {
44868 var b = (inL >>> (18 - i * 6)) & 0x3f;
44869 var sb = sTable[i * 0x40 + b];
44870
44871 out <<= 4;
44872 out |= sb;
44873 }
44874 for (var i = 0; i < 4; i++) {
44875 var b = (inR >>> (18 - i * 6)) & 0x3f;
44876 var sb = sTable[4 * 0x40 + i * 0x40 + b];
44877
44878 out <<= 4;
44879 out |= sb;
44880 }
44881 return out >>> 0;
44882};
44883
44884var permuteTable = [
44885 16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,
44886 30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7
44887];
44888
44889exports.permute = function permute(num) {
44890 var out = 0;
44891 for (var i = 0; i < permuteTable.length; i++) {
44892 out <<= 1;
44893 out |= (num >>> permuteTable[i]) & 0x1;
44894 }
44895 return out >>> 0;
44896};
44897
44898exports.padSplit = function padSplit(num, size, group) {
44899 var str = num.toString(2);
44900 while (str.length < size)
44901 str = '0' + str;
44902
44903 var out = [];
44904 for (var i = 0; i < size; i += group)
44905 out.push(str.slice(i, i + group));
44906 return out.join(' ');
44907};
44908
44909
44910/***/ }),
44911
44912/***/ "./node_modules/diffie-hellman/browser.js":
44913/*!************************************************!*\
44914 !*** ./node_modules/diffie-hellman/browser.js ***!
44915 \************************************************/
44916/*! no static exports found */
44917/***/ (function(module, exports, __webpack_require__) {
44918
44919/* WEBPACK VAR INJECTION */(function(Buffer) {var generatePrime = __webpack_require__(/*! ./lib/generatePrime */ "./node_modules/diffie-hellman/lib/generatePrime.js")
44920var primes = __webpack_require__(/*! ./lib/primes.json */ "./node_modules/diffie-hellman/lib/primes.json")
44921
44922var DH = __webpack_require__(/*! ./lib/dh */ "./node_modules/diffie-hellman/lib/dh.js")
44923
44924function getDiffieHellman (mod) {
44925 var prime = new Buffer(primes[mod].prime, 'hex')
44926 var gen = new Buffer(primes[mod].gen, 'hex')
44927
44928 return new DH(prime, gen)
44929}
44930
44931var ENCODINGS = {
44932 'binary': true, 'hex': true, 'base64': true
44933}
44934
44935function createDiffieHellman (prime, enc, generator, genc) {
44936 if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {
44937 return createDiffieHellman(prime, 'binary', enc, generator)
44938 }
44939
44940 enc = enc || 'binary'
44941 genc = genc || 'binary'
44942 generator = generator || new Buffer([2])
44943
44944 if (!Buffer.isBuffer(generator)) {
44945 generator = new Buffer(generator, genc)
44946 }
44947
44948 if (typeof prime === 'number') {
44949 return new DH(generatePrime(prime, generator), generator, true)
44950 }
44951
44952 if (!Buffer.isBuffer(prime)) {
44953 prime = new Buffer(prime, enc)
44954 }
44955
44956 return new DH(prime, generator, true)
44957}
44958
44959exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman
44960exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
44961
44962/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
44963
44964/***/ }),
44965
44966/***/ "./node_modules/diffie-hellman/lib/dh.js":
44967/*!***********************************************!*\
44968 !*** ./node_modules/diffie-hellman/lib/dh.js ***!
44969 \***********************************************/
44970/*! no static exports found */
44971/***/ (function(module, exports, __webpack_require__) {
44972
44973/* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
44974var MillerRabin = __webpack_require__(/*! miller-rabin */ "./node_modules/miller-rabin/lib/mr.js");
44975var millerRabin = new MillerRabin();
44976var TWENTYFOUR = new BN(24);
44977var ELEVEN = new BN(11);
44978var TEN = new BN(10);
44979var THREE = new BN(3);
44980var SEVEN = new BN(7);
44981var primes = __webpack_require__(/*! ./generatePrime */ "./node_modules/diffie-hellman/lib/generatePrime.js");
44982var randomBytes = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js");
44983module.exports = DH;
44984
44985function setPublicKey(pub, enc) {
44986 enc = enc || 'utf8';
44987 if (!Buffer.isBuffer(pub)) {
44988 pub = new Buffer(pub, enc);
44989 }
44990 this._pub = new BN(pub);
44991 return this;
44992}
44993
44994function setPrivateKey(priv, enc) {
44995 enc = enc || 'utf8';
44996 if (!Buffer.isBuffer(priv)) {
44997 priv = new Buffer(priv, enc);
44998 }
44999 this._priv = new BN(priv);
45000 return this;
45001}
45002
45003var primeCache = {};
45004function checkPrime(prime, generator) {
45005 var gen = generator.toString('hex');
45006 var hex = [gen, prime.toString(16)].join('_');
45007 if (hex in primeCache) {
45008 return primeCache[hex];
45009 }
45010 var error = 0;
45011
45012 if (prime.isEven() ||
45013 !primes.simpleSieve ||
45014 !primes.fermatTest(prime) ||
45015 !millerRabin.test(prime)) {
45016 //not a prime so +1
45017 error += 1;
45018
45019 if (gen === '02' || gen === '05') {
45020 // we'd be able to check the generator
45021 // it would fail so +8
45022 error += 8;
45023 } else {
45024 //we wouldn't be able to test the generator
45025 // so +4
45026 error += 4;
45027 }
45028 primeCache[hex] = error;
45029 return error;
45030 }
45031 if (!millerRabin.test(prime.shrn(1))) {
45032 //not a safe prime
45033 error += 2;
45034 }
45035 var rem;
45036 switch (gen) {
45037 case '02':
45038 if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {
45039 // unsuidable generator
45040 error += 8;
45041 }
45042 break;
45043 case '05':
45044 rem = prime.mod(TEN);
45045 if (rem.cmp(THREE) && rem.cmp(SEVEN)) {
45046 // prime mod 10 needs to equal 3 or 7
45047 error += 8;
45048 }
45049 break;
45050 default:
45051 error += 4;
45052 }
45053 primeCache[hex] = error;
45054 return error;
45055}
45056
45057function DH(prime, generator, malleable) {
45058 this.setGenerator(generator);
45059 this.__prime = new BN(prime);
45060 this._prime = BN.mont(this.__prime);
45061 this._primeLen = prime.length;
45062 this._pub = undefined;
45063 this._priv = undefined;
45064 this._primeCode = undefined;
45065 if (malleable) {
45066 this.setPublicKey = setPublicKey;
45067 this.setPrivateKey = setPrivateKey;
45068 } else {
45069 this._primeCode = 8;
45070 }
45071}
45072Object.defineProperty(DH.prototype, 'verifyError', {
45073 enumerable: true,
45074 get: function () {
45075 if (typeof this._primeCode !== 'number') {
45076 this._primeCode = checkPrime(this.__prime, this.__gen);
45077 }
45078 return this._primeCode;
45079 }
45080});
45081DH.prototype.generateKeys = function () {
45082 if (!this._priv) {
45083 this._priv = new BN(randomBytes(this._primeLen));
45084 }
45085 this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();
45086 return this.getPublicKey();
45087};
45088
45089DH.prototype.computeSecret = function (other) {
45090 other = new BN(other);
45091 other = other.toRed(this._prime);
45092 var secret = other.redPow(this._priv).fromRed();
45093 var out = new Buffer(secret.toArray());
45094 var prime = this.getPrime();
45095 if (out.length < prime.length) {
45096 var front = new Buffer(prime.length - out.length);
45097 front.fill(0);
45098 out = Buffer.concat([front, out]);
45099 }
45100 return out;
45101};
45102
45103DH.prototype.getPublicKey = function getPublicKey(enc) {
45104 return formatReturnValue(this._pub, enc);
45105};
45106
45107DH.prototype.getPrivateKey = function getPrivateKey(enc) {
45108 return formatReturnValue(this._priv, enc);
45109};
45110
45111DH.prototype.getPrime = function (enc) {
45112 return formatReturnValue(this.__prime, enc);
45113};
45114
45115DH.prototype.getGenerator = function (enc) {
45116 return formatReturnValue(this._gen, enc);
45117};
45118
45119DH.prototype.setGenerator = function (gen, enc) {
45120 enc = enc || 'utf8';
45121 if (!Buffer.isBuffer(gen)) {
45122 gen = new Buffer(gen, enc);
45123 }
45124 this.__gen = gen;
45125 this._gen = new BN(gen);
45126 return this;
45127};
45128
45129function formatReturnValue(bn, enc) {
45130 var buf = new Buffer(bn.toArray());
45131 if (!enc) {
45132 return buf;
45133 } else {
45134 return buf.toString(enc);
45135 }
45136}
45137
45138/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
45139
45140/***/ }),
45141
45142/***/ "./node_modules/diffie-hellman/lib/generatePrime.js":
45143/*!**********************************************************!*\
45144 !*** ./node_modules/diffie-hellman/lib/generatePrime.js ***!
45145 \**********************************************************/
45146/*! no static exports found */
45147/***/ (function(module, exports, __webpack_require__) {
45148
45149var randomBytes = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js");
45150module.exports = findPrime;
45151findPrime.simpleSieve = simpleSieve;
45152findPrime.fermatTest = fermatTest;
45153var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
45154var TWENTYFOUR = new BN(24);
45155var MillerRabin = __webpack_require__(/*! miller-rabin */ "./node_modules/miller-rabin/lib/mr.js");
45156var millerRabin = new MillerRabin();
45157var ONE = new BN(1);
45158var TWO = new BN(2);
45159var FIVE = new BN(5);
45160var SIXTEEN = new BN(16);
45161var EIGHT = new BN(8);
45162var TEN = new BN(10);
45163var THREE = new BN(3);
45164var SEVEN = new BN(7);
45165var ELEVEN = new BN(11);
45166var FOUR = new BN(4);
45167var TWELVE = new BN(12);
45168var primes = null;
45169
45170function _getPrimes() {
45171 if (primes !== null)
45172 return primes;
45173
45174 var limit = 0x100000;
45175 var res = [];
45176 res[0] = 2;
45177 for (var i = 1, k = 3; k < limit; k += 2) {
45178 var sqrt = Math.ceil(Math.sqrt(k));
45179 for (var j = 0; j < i && res[j] <= sqrt; j++)
45180 if (k % res[j] === 0)
45181 break;
45182
45183 if (i !== j && res[j] <= sqrt)
45184 continue;
45185
45186 res[i++] = k;
45187 }
45188 primes = res;
45189 return res;
45190}
45191
45192function simpleSieve(p) {
45193 var primes = _getPrimes();
45194
45195 for (var i = 0; i < primes.length; i++)
45196 if (p.modn(primes[i]) === 0) {
45197 if (p.cmpn(primes[i]) === 0) {
45198 return true;
45199 } else {
45200 return false;
45201 }
45202 }
45203
45204 return true;
45205}
45206
45207function fermatTest(p) {
45208 var red = BN.mont(p);
45209 return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;
45210}
45211
45212function findPrime(bits, gen) {
45213 if (bits < 16) {
45214 // this is what openssl does
45215 if (gen === 2 || gen === 5) {
45216 return new BN([0x8c, 0x7b]);
45217 } else {
45218 return new BN([0x8c, 0x27]);
45219 }
45220 }
45221 gen = new BN(gen);
45222
45223 var num, n2;
45224
45225 while (true) {
45226 num = new BN(randomBytes(Math.ceil(bits / 8)));
45227 while (num.bitLength() > bits) {
45228 num.ishrn(1);
45229 }
45230 if (num.isEven()) {
45231 num.iadd(ONE);
45232 }
45233 if (!num.testn(1)) {
45234 num.iadd(TWO);
45235 }
45236 if (!gen.cmp(TWO)) {
45237 while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {
45238 num.iadd(FOUR);
45239 }
45240 } else if (!gen.cmp(FIVE)) {
45241 while (num.mod(TEN).cmp(THREE)) {
45242 num.iadd(FOUR);
45243 }
45244 }
45245 n2 = num.shrn(1);
45246 if (simpleSieve(n2) && simpleSieve(num) &&
45247 fermatTest(n2) && fermatTest(num) &&
45248 millerRabin.test(n2) && millerRabin.test(num)) {
45249 return num;
45250 }
45251 }
45252
45253}
45254
45255
45256/***/ }),
45257
45258/***/ "./node_modules/diffie-hellman/lib/primes.json":
45259/*!*****************************************************!*\
45260 !*** ./node_modules/diffie-hellman/lib/primes.json ***!
45261 \*****************************************************/
45262/*! exports provided: modp1, modp2, modp5, modp14, modp15, modp16, modp17, modp18, default */
45263/***/ (function(module) {
45264
45265module.exports = JSON.parse("{\"modp1\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff\"},\"modp2\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff\"},\"modp5\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff\"},\"modp14\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff\"},\"modp15\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff\"},\"modp16\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff\"},\"modp17\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff\"},\"modp18\":{\"gen\":\"02\",\"prime\":\"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff\"}}");
45266
45267/***/ }),
45268
45269/***/ "./node_modules/elliptic/lib/elliptic.js":
45270/*!***********************************************!*\
45271 !*** ./node_modules/elliptic/lib/elliptic.js ***!
45272 \***********************************************/
45273/*! no static exports found */
45274/***/ (function(module, exports, __webpack_require__) {
45275
45276"use strict";
45277
45278
45279var elliptic = exports;
45280
45281elliptic.version = __webpack_require__(/*! ../package.json */ "./node_modules/elliptic/package.json").version;
45282elliptic.utils = __webpack_require__(/*! ./elliptic/utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
45283elliptic.rand = __webpack_require__(/*! brorand */ "./node_modules/brorand/index.js");
45284elliptic.curve = __webpack_require__(/*! ./elliptic/curve */ "./node_modules/elliptic/lib/elliptic/curve/index.js");
45285elliptic.curves = __webpack_require__(/*! ./elliptic/curves */ "./node_modules/elliptic/lib/elliptic/curves.js");
45286
45287// Protocols
45288elliptic.ec = __webpack_require__(/*! ./elliptic/ec */ "./node_modules/elliptic/lib/elliptic/ec/index.js");
45289elliptic.eddsa = __webpack_require__(/*! ./elliptic/eddsa */ "./node_modules/elliptic/lib/elliptic/eddsa/index.js");
45290
45291
45292/***/ }),
45293
45294/***/ "./node_modules/elliptic/lib/elliptic/curve/base.js":
45295/*!**********************************************************!*\
45296 !*** ./node_modules/elliptic/lib/elliptic/curve/base.js ***!
45297 \**********************************************************/
45298/*! no static exports found */
45299/***/ (function(module, exports, __webpack_require__) {
45300
45301"use strict";
45302
45303
45304var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
45305var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
45306var getNAF = utils.getNAF;
45307var getJSF = utils.getJSF;
45308var assert = utils.assert;
45309
45310function BaseCurve(type, conf) {
45311 this.type = type;
45312 this.p = new BN(conf.p, 16);
45313
45314 // Use Montgomery, when there is no fast reduction for the prime
45315 this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);
45316
45317 // Useful for many curves
45318 this.zero = new BN(0).toRed(this.red);
45319 this.one = new BN(1).toRed(this.red);
45320 this.two = new BN(2).toRed(this.red);
45321
45322 // Curve configuration, optional
45323 this.n = conf.n && new BN(conf.n, 16);
45324 this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
45325
45326 // Temporary arrays
45327 this._wnafT1 = new Array(4);
45328 this._wnafT2 = new Array(4);
45329 this._wnafT3 = new Array(4);
45330 this._wnafT4 = new Array(4);
45331
45332 this._bitLength = this.n ? this.n.bitLength() : 0;
45333
45334 // Generalized Greg Maxwell's trick
45335 var adjustCount = this.n && this.p.div(this.n);
45336 if (!adjustCount || adjustCount.cmpn(100) > 0) {
45337 this.redN = null;
45338 } else {
45339 this._maxwellTrick = true;
45340 this.redN = this.n.toRed(this.red);
45341 }
45342}
45343module.exports = BaseCurve;
45344
45345BaseCurve.prototype.point = function point() {
45346 throw new Error('Not implemented');
45347};
45348
45349BaseCurve.prototype.validate = function validate() {
45350 throw new Error('Not implemented');
45351};
45352
45353BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
45354 assert(p.precomputed);
45355 var doubles = p._getDoubles();
45356
45357 var naf = getNAF(k, 1, this._bitLength);
45358 var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
45359 I /= 3;
45360
45361 // Translate into more windowed form
45362 var repr = [];
45363 for (var j = 0; j < naf.length; j += doubles.step) {
45364 var nafW = 0;
45365 for (var k = j + doubles.step - 1; k >= j; k--)
45366 nafW = (nafW << 1) + naf[k];
45367 repr.push(nafW);
45368 }
45369
45370 var a = this.jpoint(null, null, null);
45371 var b = this.jpoint(null, null, null);
45372 for (var i = I; i > 0; i--) {
45373 for (var j = 0; j < repr.length; j++) {
45374 var nafW = repr[j];
45375 if (nafW === i)
45376 b = b.mixedAdd(doubles.points[j]);
45377 else if (nafW === -i)
45378 b = b.mixedAdd(doubles.points[j].neg());
45379 }
45380 a = a.add(b);
45381 }
45382 return a.toP();
45383};
45384
45385BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
45386 var w = 4;
45387
45388 // Precompute window
45389 var nafPoints = p._getNAFPoints(w);
45390 w = nafPoints.wnd;
45391 var wnd = nafPoints.points;
45392
45393 // Get NAF form
45394 var naf = getNAF(k, w, this._bitLength);
45395
45396 // Add `this`*(N+1) for every w-NAF index
45397 var acc = this.jpoint(null, null, null);
45398 for (var i = naf.length - 1; i >= 0; i--) {
45399 // Count zeroes
45400 for (var k = 0; i >= 0 && naf[i] === 0; i--)
45401 k++;
45402 if (i >= 0)
45403 k++;
45404 acc = acc.dblp(k);
45405
45406 if (i < 0)
45407 break;
45408 var z = naf[i];
45409 assert(z !== 0);
45410 if (p.type === 'affine') {
45411 // J +- P
45412 if (z > 0)
45413 acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
45414 else
45415 acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
45416 } else {
45417 // J +- J
45418 if (z > 0)
45419 acc = acc.add(wnd[(z - 1) >> 1]);
45420 else
45421 acc = acc.add(wnd[(-z - 1) >> 1].neg());
45422 }
45423 }
45424 return p.type === 'affine' ? acc.toP() : acc;
45425};
45426
45427BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
45428 points,
45429 coeffs,
45430 len,
45431 jacobianResult) {
45432 var wndWidth = this._wnafT1;
45433 var wnd = this._wnafT2;
45434 var naf = this._wnafT3;
45435
45436 // Fill all arrays
45437 var max = 0;
45438 for (var i = 0; i < len; i++) {
45439 var p = points[i];
45440 var nafPoints = p._getNAFPoints(defW);
45441 wndWidth[i] = nafPoints.wnd;
45442 wnd[i] = nafPoints.points;
45443 }
45444
45445 // Comb small window NAFs
45446 for (var i = len - 1; i >= 1; i -= 2) {
45447 var a = i - 1;
45448 var b = i;
45449 if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
45450 naf[a] = getNAF(coeffs[a], wndWidth[a], this._bitLength);
45451 naf[b] = getNAF(coeffs[b], wndWidth[b], this._bitLength);
45452 max = Math.max(naf[a].length, max);
45453 max = Math.max(naf[b].length, max);
45454 continue;
45455 }
45456
45457 var comb = [
45458 points[a], /* 1 */
45459 null, /* 3 */
45460 null, /* 5 */
45461 points[b] /* 7 */
45462 ];
45463
45464 // Try to avoid Projective points, if possible
45465 if (points[a].y.cmp(points[b].y) === 0) {
45466 comb[1] = points[a].add(points[b]);
45467 comb[2] = points[a].toJ().mixedAdd(points[b].neg());
45468 } else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
45469 comb[1] = points[a].toJ().mixedAdd(points[b]);
45470 comb[2] = points[a].add(points[b].neg());
45471 } else {
45472 comb[1] = points[a].toJ().mixedAdd(points[b]);
45473 comb[2] = points[a].toJ().mixedAdd(points[b].neg());
45474 }
45475
45476 var index = [
45477 -3, /* -1 -1 */
45478 -1, /* -1 0 */
45479 -5, /* -1 1 */
45480 -7, /* 0 -1 */
45481 0, /* 0 0 */
45482 7, /* 0 1 */
45483 5, /* 1 -1 */
45484 1, /* 1 0 */
45485 3 /* 1 1 */
45486 ];
45487
45488 var jsf = getJSF(coeffs[a], coeffs[b]);
45489 max = Math.max(jsf[0].length, max);
45490 naf[a] = new Array(max);
45491 naf[b] = new Array(max);
45492 for (var j = 0; j < max; j++) {
45493 var ja = jsf[0][j] | 0;
45494 var jb = jsf[1][j] | 0;
45495
45496 naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
45497 naf[b][j] = 0;
45498 wnd[a] = comb;
45499 }
45500 }
45501
45502 var acc = this.jpoint(null, null, null);
45503 var tmp = this._wnafT4;
45504 for (var i = max; i >= 0; i--) {
45505 var k = 0;
45506
45507 while (i >= 0) {
45508 var zero = true;
45509 for (var j = 0; j < len; j++) {
45510 tmp[j] = naf[j][i] | 0;
45511 if (tmp[j] !== 0)
45512 zero = false;
45513 }
45514 if (!zero)
45515 break;
45516 k++;
45517 i--;
45518 }
45519 if (i >= 0)
45520 k++;
45521 acc = acc.dblp(k);
45522 if (i < 0)
45523 break;
45524
45525 for (var j = 0; j < len; j++) {
45526 var z = tmp[j];
45527 var p;
45528 if (z === 0)
45529 continue;
45530 else if (z > 0)
45531 p = wnd[j][(z - 1) >> 1];
45532 else if (z < 0)
45533 p = wnd[j][(-z - 1) >> 1].neg();
45534
45535 if (p.type === 'affine')
45536 acc = acc.mixedAdd(p);
45537 else
45538 acc = acc.add(p);
45539 }
45540 }
45541 // Zeroify references
45542 for (var i = 0; i < len; i++)
45543 wnd[i] = null;
45544
45545 if (jacobianResult)
45546 return acc;
45547 else
45548 return acc.toP();
45549};
45550
45551function BasePoint(curve, type) {
45552 this.curve = curve;
45553 this.type = type;
45554 this.precomputed = null;
45555}
45556BaseCurve.BasePoint = BasePoint;
45557
45558BasePoint.prototype.eq = function eq(/*other*/) {
45559 throw new Error('Not implemented');
45560};
45561
45562BasePoint.prototype.validate = function validate() {
45563 return this.curve.validate(this);
45564};
45565
45566BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
45567 bytes = utils.toArray(bytes, enc);
45568
45569 var len = this.p.byteLength();
45570
45571 // uncompressed, hybrid-odd, hybrid-even
45572 if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
45573 bytes.length - 1 === 2 * len) {
45574 if (bytes[0] === 0x06)
45575 assert(bytes[bytes.length - 1] % 2 === 0);
45576 else if (bytes[0] === 0x07)
45577 assert(bytes[bytes.length - 1] % 2 === 1);
45578
45579 var res = this.point(bytes.slice(1, 1 + len),
45580 bytes.slice(1 + len, 1 + 2 * len));
45581
45582 return res;
45583 } else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
45584 bytes.length - 1 === len) {
45585 return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
45586 }
45587 throw new Error('Unknown point format');
45588};
45589
45590BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
45591 return this.encode(enc, true);
45592};
45593
45594BasePoint.prototype._encode = function _encode(compact) {
45595 var len = this.curve.p.byteLength();
45596 var x = this.getX().toArray('be', len);
45597
45598 if (compact)
45599 return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);
45600
45601 return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;
45602};
45603
45604BasePoint.prototype.encode = function encode(enc, compact) {
45605 return utils.encode(this._encode(compact), enc);
45606};
45607
45608BasePoint.prototype.precompute = function precompute(power) {
45609 if (this.precomputed)
45610 return this;
45611
45612 var precomputed = {
45613 doubles: null,
45614 naf: null,
45615 beta: null
45616 };
45617 precomputed.naf = this._getNAFPoints(8);
45618 precomputed.doubles = this._getDoubles(4, power);
45619 precomputed.beta = this._getBeta();
45620 this.precomputed = precomputed;
45621
45622 return this;
45623};
45624
45625BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
45626 if (!this.precomputed)
45627 return false;
45628
45629 var doubles = this.precomputed.doubles;
45630 if (!doubles)
45631 return false;
45632
45633 return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
45634};
45635
45636BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
45637 if (this.precomputed && this.precomputed.doubles)
45638 return this.precomputed.doubles;
45639
45640 var doubles = [ this ];
45641 var acc = this;
45642 for (var i = 0; i < power; i += step) {
45643 for (var j = 0; j < step; j++)
45644 acc = acc.dbl();
45645 doubles.push(acc);
45646 }
45647 return {
45648 step: step,
45649 points: doubles
45650 };
45651};
45652
45653BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
45654 if (this.precomputed && this.precomputed.naf)
45655 return this.precomputed.naf;
45656
45657 var res = [ this ];
45658 var max = (1 << wnd) - 1;
45659 var dbl = max === 1 ? null : this.dbl();
45660 for (var i = 1; i < max; i++)
45661 res[i] = res[i - 1].add(dbl);
45662 return {
45663 wnd: wnd,
45664 points: res
45665 };
45666};
45667
45668BasePoint.prototype._getBeta = function _getBeta() {
45669 return null;
45670};
45671
45672BasePoint.prototype.dblp = function dblp(k) {
45673 var r = this;
45674 for (var i = 0; i < k; i++)
45675 r = r.dbl();
45676 return r;
45677};
45678
45679
45680/***/ }),
45681
45682/***/ "./node_modules/elliptic/lib/elliptic/curve/edwards.js":
45683/*!*************************************************************!*\
45684 !*** ./node_modules/elliptic/lib/elliptic/curve/edwards.js ***!
45685 \*************************************************************/
45686/*! no static exports found */
45687/***/ (function(module, exports, __webpack_require__) {
45688
45689"use strict";
45690
45691
45692var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
45693var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
45694var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
45695var Base = __webpack_require__(/*! ./base */ "./node_modules/elliptic/lib/elliptic/curve/base.js");
45696
45697var assert = utils.assert;
45698
45699function EdwardsCurve(conf) {
45700 // NOTE: Important as we are creating point in Base.call()
45701 this.twisted = (conf.a | 0) !== 1;
45702 this.mOneA = this.twisted && (conf.a | 0) === -1;
45703 this.extended = this.mOneA;
45704
45705 Base.call(this, 'edwards', conf);
45706
45707 this.a = new BN(conf.a, 16).umod(this.red.m);
45708 this.a = this.a.toRed(this.red);
45709 this.c = new BN(conf.c, 16).toRed(this.red);
45710 this.c2 = this.c.redSqr();
45711 this.d = new BN(conf.d, 16).toRed(this.red);
45712 this.dd = this.d.redAdd(this.d);
45713
45714 assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
45715 this.oneC = (conf.c | 0) === 1;
45716}
45717inherits(EdwardsCurve, Base);
45718module.exports = EdwardsCurve;
45719
45720EdwardsCurve.prototype._mulA = function _mulA(num) {
45721 if (this.mOneA)
45722 return num.redNeg();
45723 else
45724 return this.a.redMul(num);
45725};
45726
45727EdwardsCurve.prototype._mulC = function _mulC(num) {
45728 if (this.oneC)
45729 return num;
45730 else
45731 return this.c.redMul(num);
45732};
45733
45734// Just for compatibility with Short curve
45735EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
45736 return this.point(x, y, z, t);
45737};
45738
45739EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
45740 x = new BN(x, 16);
45741 if (!x.red)
45742 x = x.toRed(this.red);
45743
45744 var x2 = x.redSqr();
45745 var rhs = this.c2.redSub(this.a.redMul(x2));
45746 var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));
45747
45748 var y2 = rhs.redMul(lhs.redInvm());
45749 var y = y2.redSqrt();
45750 if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
45751 throw new Error('invalid point');
45752
45753 var isOdd = y.fromRed().isOdd();
45754 if (odd && !isOdd || !odd && isOdd)
45755 y = y.redNeg();
45756
45757 return this.point(x, y);
45758};
45759
45760EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
45761 y = new BN(y, 16);
45762 if (!y.red)
45763 y = y.toRed(this.red);
45764
45765 // x^2 = (y^2 - c^2) / (c^2 d y^2 - a)
45766 var y2 = y.redSqr();
45767 var lhs = y2.redSub(this.c2);
45768 var rhs = y2.redMul(this.d).redMul(this.c2).redSub(this.a);
45769 var x2 = lhs.redMul(rhs.redInvm());
45770
45771 if (x2.cmp(this.zero) === 0) {
45772 if (odd)
45773 throw new Error('invalid point');
45774 else
45775 return this.point(this.zero, y);
45776 }
45777
45778 var x = x2.redSqrt();
45779 if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
45780 throw new Error('invalid point');
45781
45782 if (x.fromRed().isOdd() !== odd)
45783 x = x.redNeg();
45784
45785 return this.point(x, y);
45786};
45787
45788EdwardsCurve.prototype.validate = function validate(point) {
45789 if (point.isInfinity())
45790 return true;
45791
45792 // Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
45793 point.normalize();
45794
45795 var x2 = point.x.redSqr();
45796 var y2 = point.y.redSqr();
45797 var lhs = x2.redMul(this.a).redAdd(y2);
45798 var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));
45799
45800 return lhs.cmp(rhs) === 0;
45801};
45802
45803function Point(curve, x, y, z, t) {
45804 Base.BasePoint.call(this, curve, 'projective');
45805 if (x === null && y === null && z === null) {
45806 this.x = this.curve.zero;
45807 this.y = this.curve.one;
45808 this.z = this.curve.one;
45809 this.t = this.curve.zero;
45810 this.zOne = true;
45811 } else {
45812 this.x = new BN(x, 16);
45813 this.y = new BN(y, 16);
45814 this.z = z ? new BN(z, 16) : this.curve.one;
45815 this.t = t && new BN(t, 16);
45816 if (!this.x.red)
45817 this.x = this.x.toRed(this.curve.red);
45818 if (!this.y.red)
45819 this.y = this.y.toRed(this.curve.red);
45820 if (!this.z.red)
45821 this.z = this.z.toRed(this.curve.red);
45822 if (this.t && !this.t.red)
45823 this.t = this.t.toRed(this.curve.red);
45824 this.zOne = this.z === this.curve.one;
45825
45826 // Use extended coordinates
45827 if (this.curve.extended && !this.t) {
45828 this.t = this.x.redMul(this.y);
45829 if (!this.zOne)
45830 this.t = this.t.redMul(this.z.redInvm());
45831 }
45832 }
45833}
45834inherits(Point, Base.BasePoint);
45835
45836EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
45837 return Point.fromJSON(this, obj);
45838};
45839
45840EdwardsCurve.prototype.point = function point(x, y, z, t) {
45841 return new Point(this, x, y, z, t);
45842};
45843
45844Point.fromJSON = function fromJSON(curve, obj) {
45845 return new Point(curve, obj[0], obj[1], obj[2]);
45846};
45847
45848Point.prototype.inspect = function inspect() {
45849 if (this.isInfinity())
45850 return '<EC Point Infinity>';
45851 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
45852 ' y: ' + this.y.fromRed().toString(16, 2) +
45853 ' z: ' + this.z.fromRed().toString(16, 2) + '>';
45854};
45855
45856Point.prototype.isInfinity = function isInfinity() {
45857 // XXX This code assumes that zero is always zero in red
45858 return this.x.cmpn(0) === 0 &&
45859 (this.y.cmp(this.z) === 0 ||
45860 (this.zOne && this.y.cmp(this.curve.c) === 0));
45861};
45862
45863Point.prototype._extDbl = function _extDbl() {
45864 // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
45865 // #doubling-dbl-2008-hwcd
45866 // 4M + 4S
45867
45868 // A = X1^2
45869 var a = this.x.redSqr();
45870 // B = Y1^2
45871 var b = this.y.redSqr();
45872 // C = 2 * Z1^2
45873 var c = this.z.redSqr();
45874 c = c.redIAdd(c);
45875 // D = a * A
45876 var d = this.curve._mulA(a);
45877 // E = (X1 + Y1)^2 - A - B
45878 var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
45879 // G = D + B
45880 var g = d.redAdd(b);
45881 // F = G - C
45882 var f = g.redSub(c);
45883 // H = D - B
45884 var h = d.redSub(b);
45885 // X3 = E * F
45886 var nx = e.redMul(f);
45887 // Y3 = G * H
45888 var ny = g.redMul(h);
45889 // T3 = E * H
45890 var nt = e.redMul(h);
45891 // Z3 = F * G
45892 var nz = f.redMul(g);
45893 return this.curve.point(nx, ny, nz, nt);
45894};
45895
45896Point.prototype._projDbl = function _projDbl() {
45897 // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
45898 // #doubling-dbl-2008-bbjlp
45899 // #doubling-dbl-2007-bl
45900 // and others
45901 // Generally 3M + 4S or 2M + 4S
45902
45903 // B = (X1 + Y1)^2
45904 var b = this.x.redAdd(this.y).redSqr();
45905 // C = X1^2
45906 var c = this.x.redSqr();
45907 // D = Y1^2
45908 var d = this.y.redSqr();
45909
45910 var nx;
45911 var ny;
45912 var nz;
45913 if (this.curve.twisted) {
45914 // E = a * C
45915 var e = this.curve._mulA(c);
45916 // F = E + D
45917 var f = e.redAdd(d);
45918 if (this.zOne) {
45919 // X3 = (B - C - D) * (F - 2)
45920 nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
45921 // Y3 = F * (E - D)
45922 ny = f.redMul(e.redSub(d));
45923 // Z3 = F^2 - 2 * F
45924 nz = f.redSqr().redSub(f).redSub(f);
45925 } else {
45926 // H = Z1^2
45927 var h = this.z.redSqr();
45928 // J = F - 2 * H
45929 var j = f.redSub(h).redISub(h);
45930 // X3 = (B-C-D)*J
45931 nx = b.redSub(c).redISub(d).redMul(j);
45932 // Y3 = F * (E - D)
45933 ny = f.redMul(e.redSub(d));
45934 // Z3 = F * J
45935 nz = f.redMul(j);
45936 }
45937 } else {
45938 // E = C + D
45939 var e = c.redAdd(d);
45940 // H = (c * Z1)^2
45941 var h = this.curve._mulC(this.z).redSqr();
45942 // J = E - 2 * H
45943 var j = e.redSub(h).redSub(h);
45944 // X3 = c * (B - E) * J
45945 nx = this.curve._mulC(b.redISub(e)).redMul(j);
45946 // Y3 = c * E * (C - D)
45947 ny = this.curve._mulC(e).redMul(c.redISub(d));
45948 // Z3 = E * J
45949 nz = e.redMul(j);
45950 }
45951 return this.curve.point(nx, ny, nz);
45952};
45953
45954Point.prototype.dbl = function dbl() {
45955 if (this.isInfinity())
45956 return this;
45957
45958 // Double in extended coordinates
45959 if (this.curve.extended)
45960 return this._extDbl();
45961 else
45962 return this._projDbl();
45963};
45964
45965Point.prototype._extAdd = function _extAdd(p) {
45966 // hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
45967 // #addition-add-2008-hwcd-3
45968 // 8M
45969
45970 // A = (Y1 - X1) * (Y2 - X2)
45971 var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
45972 // B = (Y1 + X1) * (Y2 + X2)
45973 var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
45974 // C = T1 * k * T2
45975 var c = this.t.redMul(this.curve.dd).redMul(p.t);
45976 // D = Z1 * 2 * Z2
45977 var d = this.z.redMul(p.z.redAdd(p.z));
45978 // E = B - A
45979 var e = b.redSub(a);
45980 // F = D - C
45981 var f = d.redSub(c);
45982 // G = D + C
45983 var g = d.redAdd(c);
45984 // H = B + A
45985 var h = b.redAdd(a);
45986 // X3 = E * F
45987 var nx = e.redMul(f);
45988 // Y3 = G * H
45989 var ny = g.redMul(h);
45990 // T3 = E * H
45991 var nt = e.redMul(h);
45992 // Z3 = F * G
45993 var nz = f.redMul(g);
45994 return this.curve.point(nx, ny, nz, nt);
45995};
45996
45997Point.prototype._projAdd = function _projAdd(p) {
45998 // hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
45999 // #addition-add-2008-bbjlp
46000 // #addition-add-2007-bl
46001 // 10M + 1S
46002
46003 // A = Z1 * Z2
46004 var a = this.z.redMul(p.z);
46005 // B = A^2
46006 var b = a.redSqr();
46007 // C = X1 * X2
46008 var c = this.x.redMul(p.x);
46009 // D = Y1 * Y2
46010 var d = this.y.redMul(p.y);
46011 // E = d * C * D
46012 var e = this.curve.d.redMul(c).redMul(d);
46013 // F = B - E
46014 var f = b.redSub(e);
46015 // G = B + E
46016 var g = b.redAdd(e);
46017 // X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
46018 var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
46019 var nx = a.redMul(f).redMul(tmp);
46020 var ny;
46021 var nz;
46022 if (this.curve.twisted) {
46023 // Y3 = A * G * (D - a * C)
46024 ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
46025 // Z3 = F * G
46026 nz = f.redMul(g);
46027 } else {
46028 // Y3 = A * G * (D - C)
46029 ny = a.redMul(g).redMul(d.redSub(c));
46030 // Z3 = c * F * G
46031 nz = this.curve._mulC(f).redMul(g);
46032 }
46033 return this.curve.point(nx, ny, nz);
46034};
46035
46036Point.prototype.add = function add(p) {
46037 if (this.isInfinity())
46038 return p;
46039 if (p.isInfinity())
46040 return this;
46041
46042 if (this.curve.extended)
46043 return this._extAdd(p);
46044 else
46045 return this._projAdd(p);
46046};
46047
46048Point.prototype.mul = function mul(k) {
46049 if (this._hasDoubles(k))
46050 return this.curve._fixedNafMul(this, k);
46051 else
46052 return this.curve._wnafMul(this, k);
46053};
46054
46055Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
46056 return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
46057};
46058
46059Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
46060 return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
46061};
46062
46063Point.prototype.normalize = function normalize() {
46064 if (this.zOne)
46065 return this;
46066
46067 // Normalize coordinates
46068 var zi = this.z.redInvm();
46069 this.x = this.x.redMul(zi);
46070 this.y = this.y.redMul(zi);
46071 if (this.t)
46072 this.t = this.t.redMul(zi);
46073 this.z = this.curve.one;
46074 this.zOne = true;
46075 return this;
46076};
46077
46078Point.prototype.neg = function neg() {
46079 return this.curve.point(this.x.redNeg(),
46080 this.y,
46081 this.z,
46082 this.t && this.t.redNeg());
46083};
46084
46085Point.prototype.getX = function getX() {
46086 this.normalize();
46087 return this.x.fromRed();
46088};
46089
46090Point.prototype.getY = function getY() {
46091 this.normalize();
46092 return this.y.fromRed();
46093};
46094
46095Point.prototype.eq = function eq(other) {
46096 return this === other ||
46097 this.getX().cmp(other.getX()) === 0 &&
46098 this.getY().cmp(other.getY()) === 0;
46099};
46100
46101Point.prototype.eqXToP = function eqXToP(x) {
46102 var rx = x.toRed(this.curve.red).redMul(this.z);
46103 if (this.x.cmp(rx) === 0)
46104 return true;
46105
46106 var xc = x.clone();
46107 var t = this.curve.redN.redMul(this.z);
46108 for (;;) {
46109 xc.iadd(this.curve.n);
46110 if (xc.cmp(this.curve.p) >= 0)
46111 return false;
46112
46113 rx.redIAdd(t);
46114 if (this.x.cmp(rx) === 0)
46115 return true;
46116 }
46117};
46118
46119// Compatibility with BaseCurve
46120Point.prototype.toP = Point.prototype.normalize;
46121Point.prototype.mixedAdd = Point.prototype.add;
46122
46123
46124/***/ }),
46125
46126/***/ "./node_modules/elliptic/lib/elliptic/curve/index.js":
46127/*!***********************************************************!*\
46128 !*** ./node_modules/elliptic/lib/elliptic/curve/index.js ***!
46129 \***********************************************************/
46130/*! no static exports found */
46131/***/ (function(module, exports, __webpack_require__) {
46132
46133"use strict";
46134
46135
46136var curve = exports;
46137
46138curve.base = __webpack_require__(/*! ./base */ "./node_modules/elliptic/lib/elliptic/curve/base.js");
46139curve.short = __webpack_require__(/*! ./short */ "./node_modules/elliptic/lib/elliptic/curve/short.js");
46140curve.mont = __webpack_require__(/*! ./mont */ "./node_modules/elliptic/lib/elliptic/curve/mont.js");
46141curve.edwards = __webpack_require__(/*! ./edwards */ "./node_modules/elliptic/lib/elliptic/curve/edwards.js");
46142
46143
46144/***/ }),
46145
46146/***/ "./node_modules/elliptic/lib/elliptic/curve/mont.js":
46147/*!**********************************************************!*\
46148 !*** ./node_modules/elliptic/lib/elliptic/curve/mont.js ***!
46149 \**********************************************************/
46150/*! no static exports found */
46151/***/ (function(module, exports, __webpack_require__) {
46152
46153"use strict";
46154
46155
46156var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
46157var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
46158var Base = __webpack_require__(/*! ./base */ "./node_modules/elliptic/lib/elliptic/curve/base.js");
46159
46160var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
46161
46162function MontCurve(conf) {
46163 Base.call(this, 'mont', conf);
46164
46165 this.a = new BN(conf.a, 16).toRed(this.red);
46166 this.b = new BN(conf.b, 16).toRed(this.red);
46167 this.i4 = new BN(4).toRed(this.red).redInvm();
46168 this.two = new BN(2).toRed(this.red);
46169 this.a24 = this.i4.redMul(this.a.redAdd(this.two));
46170}
46171inherits(MontCurve, Base);
46172module.exports = MontCurve;
46173
46174MontCurve.prototype.validate = function validate(point) {
46175 var x = point.normalize().x;
46176 var x2 = x.redSqr();
46177 var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
46178 var y = rhs.redSqrt();
46179
46180 return y.redSqr().cmp(rhs) === 0;
46181};
46182
46183function Point(curve, x, z) {
46184 Base.BasePoint.call(this, curve, 'projective');
46185 if (x === null && z === null) {
46186 this.x = this.curve.one;
46187 this.z = this.curve.zero;
46188 } else {
46189 this.x = new BN(x, 16);
46190 this.z = new BN(z, 16);
46191 if (!this.x.red)
46192 this.x = this.x.toRed(this.curve.red);
46193 if (!this.z.red)
46194 this.z = this.z.toRed(this.curve.red);
46195 }
46196}
46197inherits(Point, Base.BasePoint);
46198
46199MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
46200 return this.point(utils.toArray(bytes, enc), 1);
46201};
46202
46203MontCurve.prototype.point = function point(x, z) {
46204 return new Point(this, x, z);
46205};
46206
46207MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
46208 return Point.fromJSON(this, obj);
46209};
46210
46211Point.prototype.precompute = function precompute() {
46212 // No-op
46213};
46214
46215Point.prototype._encode = function _encode() {
46216 return this.getX().toArray('be', this.curve.p.byteLength());
46217};
46218
46219Point.fromJSON = function fromJSON(curve, obj) {
46220 return new Point(curve, obj[0], obj[1] || curve.one);
46221};
46222
46223Point.prototype.inspect = function inspect() {
46224 if (this.isInfinity())
46225 return '<EC Point Infinity>';
46226 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
46227 ' z: ' + this.z.fromRed().toString(16, 2) + '>';
46228};
46229
46230Point.prototype.isInfinity = function isInfinity() {
46231 // XXX This code assumes that zero is always zero in red
46232 return this.z.cmpn(0) === 0;
46233};
46234
46235Point.prototype.dbl = function dbl() {
46236 // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
46237 // 2M + 2S + 4A
46238
46239 // A = X1 + Z1
46240 var a = this.x.redAdd(this.z);
46241 // AA = A^2
46242 var aa = a.redSqr();
46243 // B = X1 - Z1
46244 var b = this.x.redSub(this.z);
46245 // BB = B^2
46246 var bb = b.redSqr();
46247 // C = AA - BB
46248 var c = aa.redSub(bb);
46249 // X3 = AA * BB
46250 var nx = aa.redMul(bb);
46251 // Z3 = C * (BB + A24 * C)
46252 var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
46253 return this.curve.point(nx, nz);
46254};
46255
46256Point.prototype.add = function add() {
46257 throw new Error('Not supported on Montgomery curve');
46258};
46259
46260Point.prototype.diffAdd = function diffAdd(p, diff) {
46261 // http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
46262 // 4M + 2S + 6A
46263
46264 // A = X2 + Z2
46265 var a = this.x.redAdd(this.z);
46266 // B = X2 - Z2
46267 var b = this.x.redSub(this.z);
46268 // C = X3 + Z3
46269 var c = p.x.redAdd(p.z);
46270 // D = X3 - Z3
46271 var d = p.x.redSub(p.z);
46272 // DA = D * A
46273 var da = d.redMul(a);
46274 // CB = C * B
46275 var cb = c.redMul(b);
46276 // X5 = Z1 * (DA + CB)^2
46277 var nx = diff.z.redMul(da.redAdd(cb).redSqr());
46278 // Z5 = X1 * (DA - CB)^2
46279 var nz = diff.x.redMul(da.redISub(cb).redSqr());
46280 return this.curve.point(nx, nz);
46281};
46282
46283Point.prototype.mul = function mul(k) {
46284 var t = k.clone();
46285 var a = this; // (N / 2) * Q + Q
46286 var b = this.curve.point(null, null); // (N / 2) * Q
46287 var c = this; // Q
46288
46289 for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
46290 bits.push(t.andln(1));
46291
46292 for (var i = bits.length - 1; i >= 0; i--) {
46293 if (bits[i] === 0) {
46294 // N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
46295 a = a.diffAdd(b, c);
46296 // N * Q = 2 * ((N / 2) * Q + Q))
46297 b = b.dbl();
46298 } else {
46299 // N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
46300 b = a.diffAdd(b, c);
46301 // N * Q + Q = 2 * ((N / 2) * Q + Q)
46302 a = a.dbl();
46303 }
46304 }
46305 return b;
46306};
46307
46308Point.prototype.mulAdd = function mulAdd() {
46309 throw new Error('Not supported on Montgomery curve');
46310};
46311
46312Point.prototype.jumlAdd = function jumlAdd() {
46313 throw new Error('Not supported on Montgomery curve');
46314};
46315
46316Point.prototype.eq = function eq(other) {
46317 return this.getX().cmp(other.getX()) === 0;
46318};
46319
46320Point.prototype.normalize = function normalize() {
46321 this.x = this.x.redMul(this.z.redInvm());
46322 this.z = this.curve.one;
46323 return this;
46324};
46325
46326Point.prototype.getX = function getX() {
46327 // Normalize coordinates
46328 this.normalize();
46329
46330 return this.x.fromRed();
46331};
46332
46333
46334/***/ }),
46335
46336/***/ "./node_modules/elliptic/lib/elliptic/curve/short.js":
46337/*!***********************************************************!*\
46338 !*** ./node_modules/elliptic/lib/elliptic/curve/short.js ***!
46339 \***********************************************************/
46340/*! no static exports found */
46341/***/ (function(module, exports, __webpack_require__) {
46342
46343"use strict";
46344
46345
46346var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
46347var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
46348var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
46349var Base = __webpack_require__(/*! ./base */ "./node_modules/elliptic/lib/elliptic/curve/base.js");
46350
46351var assert = utils.assert;
46352
46353function ShortCurve(conf) {
46354 Base.call(this, 'short', conf);
46355
46356 this.a = new BN(conf.a, 16).toRed(this.red);
46357 this.b = new BN(conf.b, 16).toRed(this.red);
46358 this.tinv = this.two.redInvm();
46359
46360 this.zeroA = this.a.fromRed().cmpn(0) === 0;
46361 this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
46362
46363 // If the curve is endomorphic, precalculate beta and lambda
46364 this.endo = this._getEndomorphism(conf);
46365 this._endoWnafT1 = new Array(4);
46366 this._endoWnafT2 = new Array(4);
46367}
46368inherits(ShortCurve, Base);
46369module.exports = ShortCurve;
46370
46371ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
46372 // No efficient endomorphism
46373 if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
46374 return;
46375
46376 // Compute beta and lambda, that lambda * P = (beta * Px; Py)
46377 var beta;
46378 var lambda;
46379 if (conf.beta) {
46380 beta = new BN(conf.beta, 16).toRed(this.red);
46381 } else {
46382 var betas = this._getEndoRoots(this.p);
46383 // Choose the smallest beta
46384 beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
46385 beta = beta.toRed(this.red);
46386 }
46387 if (conf.lambda) {
46388 lambda = new BN(conf.lambda, 16);
46389 } else {
46390 // Choose the lambda that is matching selected beta
46391 var lambdas = this._getEndoRoots(this.n);
46392 if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
46393 lambda = lambdas[0];
46394 } else {
46395 lambda = lambdas[1];
46396 assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
46397 }
46398 }
46399
46400 // Get basis vectors, used for balanced length-two representation
46401 var basis;
46402 if (conf.basis) {
46403 basis = conf.basis.map(function(vec) {
46404 return {
46405 a: new BN(vec.a, 16),
46406 b: new BN(vec.b, 16)
46407 };
46408 });
46409 } else {
46410 basis = this._getEndoBasis(lambda);
46411 }
46412
46413 return {
46414 beta: beta,
46415 lambda: lambda,
46416 basis: basis
46417 };
46418};
46419
46420ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
46421 // Find roots of for x^2 + x + 1 in F
46422 // Root = (-1 +- Sqrt(-3)) / 2
46423 //
46424 var red = num === this.p ? this.red : BN.mont(num);
46425 var tinv = new BN(2).toRed(red).redInvm();
46426 var ntinv = tinv.redNeg();
46427
46428 var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);
46429
46430 var l1 = ntinv.redAdd(s).fromRed();
46431 var l2 = ntinv.redSub(s).fromRed();
46432 return [ l1, l2 ];
46433};
46434
46435ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
46436 // aprxSqrt >= sqrt(this.n)
46437 var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
46438
46439 // 3.74
46440 // Run EGCD, until r(L + 1) < aprxSqrt
46441 var u = lambda;
46442 var v = this.n.clone();
46443 var x1 = new BN(1);
46444 var y1 = new BN(0);
46445 var x2 = new BN(0);
46446 var y2 = new BN(1);
46447
46448 // NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
46449 var a0;
46450 var b0;
46451 // First vector
46452 var a1;
46453 var b1;
46454 // Second vector
46455 var a2;
46456 var b2;
46457
46458 var prevR;
46459 var i = 0;
46460 var r;
46461 var x;
46462 while (u.cmpn(0) !== 0) {
46463 var q = v.div(u);
46464 r = v.sub(q.mul(u));
46465 x = x2.sub(q.mul(x1));
46466 var y = y2.sub(q.mul(y1));
46467
46468 if (!a1 && r.cmp(aprxSqrt) < 0) {
46469 a0 = prevR.neg();
46470 b0 = x1;
46471 a1 = r.neg();
46472 b1 = x;
46473 } else if (a1 && ++i === 2) {
46474 break;
46475 }
46476 prevR = r;
46477
46478 v = u;
46479 u = r;
46480 x2 = x1;
46481 x1 = x;
46482 y2 = y1;
46483 y1 = y;
46484 }
46485 a2 = r.neg();
46486 b2 = x;
46487
46488 var len1 = a1.sqr().add(b1.sqr());
46489 var len2 = a2.sqr().add(b2.sqr());
46490 if (len2.cmp(len1) >= 0) {
46491 a2 = a0;
46492 b2 = b0;
46493 }
46494
46495 // Normalize signs
46496 if (a1.negative) {
46497 a1 = a1.neg();
46498 b1 = b1.neg();
46499 }
46500 if (a2.negative) {
46501 a2 = a2.neg();
46502 b2 = b2.neg();
46503 }
46504
46505 return [
46506 { a: a1, b: b1 },
46507 { a: a2, b: b2 }
46508 ];
46509};
46510
46511ShortCurve.prototype._endoSplit = function _endoSplit(k) {
46512 var basis = this.endo.basis;
46513 var v1 = basis[0];
46514 var v2 = basis[1];
46515
46516 var c1 = v2.b.mul(k).divRound(this.n);
46517 var c2 = v1.b.neg().mul(k).divRound(this.n);
46518
46519 var p1 = c1.mul(v1.a);
46520 var p2 = c2.mul(v2.a);
46521 var q1 = c1.mul(v1.b);
46522 var q2 = c2.mul(v2.b);
46523
46524 // Calculate answer
46525 var k1 = k.sub(p1).sub(p2);
46526 var k2 = q1.add(q2).neg();
46527 return { k1: k1, k2: k2 };
46528};
46529
46530ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
46531 x = new BN(x, 16);
46532 if (!x.red)
46533 x = x.toRed(this.red);
46534
46535 var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
46536 var y = y2.redSqrt();
46537 if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
46538 throw new Error('invalid point');
46539
46540 // XXX Is there any way to tell if the number is odd without converting it
46541 // to non-red form?
46542 var isOdd = y.fromRed().isOdd();
46543 if (odd && !isOdd || !odd && isOdd)
46544 y = y.redNeg();
46545
46546 return this.point(x, y);
46547};
46548
46549ShortCurve.prototype.validate = function validate(point) {
46550 if (point.inf)
46551 return true;
46552
46553 var x = point.x;
46554 var y = point.y;
46555
46556 var ax = this.a.redMul(x);
46557 var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
46558 return y.redSqr().redISub(rhs).cmpn(0) === 0;
46559};
46560
46561ShortCurve.prototype._endoWnafMulAdd =
46562 function _endoWnafMulAdd(points, coeffs, jacobianResult) {
46563 var npoints = this._endoWnafT1;
46564 var ncoeffs = this._endoWnafT2;
46565 for (var i = 0; i < points.length; i++) {
46566 var split = this._endoSplit(coeffs[i]);
46567 var p = points[i];
46568 var beta = p._getBeta();
46569
46570 if (split.k1.negative) {
46571 split.k1.ineg();
46572 p = p.neg(true);
46573 }
46574 if (split.k2.negative) {
46575 split.k2.ineg();
46576 beta = beta.neg(true);
46577 }
46578
46579 npoints[i * 2] = p;
46580 npoints[i * 2 + 1] = beta;
46581 ncoeffs[i * 2] = split.k1;
46582 ncoeffs[i * 2 + 1] = split.k2;
46583 }
46584 var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
46585
46586 // Clean-up references to points and coefficients
46587 for (var j = 0; j < i * 2; j++) {
46588 npoints[j] = null;
46589 ncoeffs[j] = null;
46590 }
46591 return res;
46592};
46593
46594function Point(curve, x, y, isRed) {
46595 Base.BasePoint.call(this, curve, 'affine');
46596 if (x === null && y === null) {
46597 this.x = null;
46598 this.y = null;
46599 this.inf = true;
46600 } else {
46601 this.x = new BN(x, 16);
46602 this.y = new BN(y, 16);
46603 // Force redgomery representation when loading from JSON
46604 if (isRed) {
46605 this.x.forceRed(this.curve.red);
46606 this.y.forceRed(this.curve.red);
46607 }
46608 if (!this.x.red)
46609 this.x = this.x.toRed(this.curve.red);
46610 if (!this.y.red)
46611 this.y = this.y.toRed(this.curve.red);
46612 this.inf = false;
46613 }
46614}
46615inherits(Point, Base.BasePoint);
46616
46617ShortCurve.prototype.point = function point(x, y, isRed) {
46618 return new Point(this, x, y, isRed);
46619};
46620
46621ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
46622 return Point.fromJSON(this, obj, red);
46623};
46624
46625Point.prototype._getBeta = function _getBeta() {
46626 if (!this.curve.endo)
46627 return;
46628
46629 var pre = this.precomputed;
46630 if (pre && pre.beta)
46631 return pre.beta;
46632
46633 var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
46634 if (pre) {
46635 var curve = this.curve;
46636 var endoMul = function(p) {
46637 return curve.point(p.x.redMul(curve.endo.beta), p.y);
46638 };
46639 pre.beta = beta;
46640 beta.precomputed = {
46641 beta: null,
46642 naf: pre.naf && {
46643 wnd: pre.naf.wnd,
46644 points: pre.naf.points.map(endoMul)
46645 },
46646 doubles: pre.doubles && {
46647 step: pre.doubles.step,
46648 points: pre.doubles.points.map(endoMul)
46649 }
46650 };
46651 }
46652 return beta;
46653};
46654
46655Point.prototype.toJSON = function toJSON() {
46656 if (!this.precomputed)
46657 return [ this.x, this.y ];
46658
46659 return [ this.x, this.y, this.precomputed && {
46660 doubles: this.precomputed.doubles && {
46661 step: this.precomputed.doubles.step,
46662 points: this.precomputed.doubles.points.slice(1)
46663 },
46664 naf: this.precomputed.naf && {
46665 wnd: this.precomputed.naf.wnd,
46666 points: this.precomputed.naf.points.slice(1)
46667 }
46668 } ];
46669};
46670
46671Point.fromJSON = function fromJSON(curve, obj, red) {
46672 if (typeof obj === 'string')
46673 obj = JSON.parse(obj);
46674 var res = curve.point(obj[0], obj[1], red);
46675 if (!obj[2])
46676 return res;
46677
46678 function obj2point(obj) {
46679 return curve.point(obj[0], obj[1], red);
46680 }
46681
46682 var pre = obj[2];
46683 res.precomputed = {
46684 beta: null,
46685 doubles: pre.doubles && {
46686 step: pre.doubles.step,
46687 points: [ res ].concat(pre.doubles.points.map(obj2point))
46688 },
46689 naf: pre.naf && {
46690 wnd: pre.naf.wnd,
46691 points: [ res ].concat(pre.naf.points.map(obj2point))
46692 }
46693 };
46694 return res;
46695};
46696
46697Point.prototype.inspect = function inspect() {
46698 if (this.isInfinity())
46699 return '<EC Point Infinity>';
46700 return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
46701 ' y: ' + this.y.fromRed().toString(16, 2) + '>';
46702};
46703
46704Point.prototype.isInfinity = function isInfinity() {
46705 return this.inf;
46706};
46707
46708Point.prototype.add = function add(p) {
46709 // O + P = P
46710 if (this.inf)
46711 return p;
46712
46713 // P + O = P
46714 if (p.inf)
46715 return this;
46716
46717 // P + P = 2P
46718 if (this.eq(p))
46719 return this.dbl();
46720
46721 // P + (-P) = O
46722 if (this.neg().eq(p))
46723 return this.curve.point(null, null);
46724
46725 // P + Q = O
46726 if (this.x.cmp(p.x) === 0)
46727 return this.curve.point(null, null);
46728
46729 var c = this.y.redSub(p.y);
46730 if (c.cmpn(0) !== 0)
46731 c = c.redMul(this.x.redSub(p.x).redInvm());
46732 var nx = c.redSqr().redISub(this.x).redISub(p.x);
46733 var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
46734 return this.curve.point(nx, ny);
46735};
46736
46737Point.prototype.dbl = function dbl() {
46738 if (this.inf)
46739 return this;
46740
46741 // 2P = O
46742 var ys1 = this.y.redAdd(this.y);
46743 if (ys1.cmpn(0) === 0)
46744 return this.curve.point(null, null);
46745
46746 var a = this.curve.a;
46747
46748 var x2 = this.x.redSqr();
46749 var dyinv = ys1.redInvm();
46750 var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);
46751
46752 var nx = c.redSqr().redISub(this.x.redAdd(this.x));
46753 var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
46754 return this.curve.point(nx, ny);
46755};
46756
46757Point.prototype.getX = function getX() {
46758 return this.x.fromRed();
46759};
46760
46761Point.prototype.getY = function getY() {
46762 return this.y.fromRed();
46763};
46764
46765Point.prototype.mul = function mul(k) {
46766 k = new BN(k, 16);
46767 if (this.isInfinity())
46768 return this;
46769 else if (this._hasDoubles(k))
46770 return this.curve._fixedNafMul(this, k);
46771 else if (this.curve.endo)
46772 return this.curve._endoWnafMulAdd([ this ], [ k ]);
46773 else
46774 return this.curve._wnafMul(this, k);
46775};
46776
46777Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
46778 var points = [ this, p2 ];
46779 var coeffs = [ k1, k2 ];
46780 if (this.curve.endo)
46781 return this.curve._endoWnafMulAdd(points, coeffs);
46782 else
46783 return this.curve._wnafMulAdd(1, points, coeffs, 2);
46784};
46785
46786Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
46787 var points = [ this, p2 ];
46788 var coeffs = [ k1, k2 ];
46789 if (this.curve.endo)
46790 return this.curve._endoWnafMulAdd(points, coeffs, true);
46791 else
46792 return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
46793};
46794
46795Point.prototype.eq = function eq(p) {
46796 return this === p ||
46797 this.inf === p.inf &&
46798 (this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
46799};
46800
46801Point.prototype.neg = function neg(_precompute) {
46802 if (this.inf)
46803 return this;
46804
46805 var res = this.curve.point(this.x, this.y.redNeg());
46806 if (_precompute && this.precomputed) {
46807 var pre = this.precomputed;
46808 var negate = function(p) {
46809 return p.neg();
46810 };
46811 res.precomputed = {
46812 naf: pre.naf && {
46813 wnd: pre.naf.wnd,
46814 points: pre.naf.points.map(negate)
46815 },
46816 doubles: pre.doubles && {
46817 step: pre.doubles.step,
46818 points: pre.doubles.points.map(negate)
46819 }
46820 };
46821 }
46822 return res;
46823};
46824
46825Point.prototype.toJ = function toJ() {
46826 if (this.inf)
46827 return this.curve.jpoint(null, null, null);
46828
46829 var res = this.curve.jpoint(this.x, this.y, this.curve.one);
46830 return res;
46831};
46832
46833function JPoint(curve, x, y, z) {
46834 Base.BasePoint.call(this, curve, 'jacobian');
46835 if (x === null && y === null && z === null) {
46836 this.x = this.curve.one;
46837 this.y = this.curve.one;
46838 this.z = new BN(0);
46839 } else {
46840 this.x = new BN(x, 16);
46841 this.y = new BN(y, 16);
46842 this.z = new BN(z, 16);
46843 }
46844 if (!this.x.red)
46845 this.x = this.x.toRed(this.curve.red);
46846 if (!this.y.red)
46847 this.y = this.y.toRed(this.curve.red);
46848 if (!this.z.red)
46849 this.z = this.z.toRed(this.curve.red);
46850
46851 this.zOne = this.z === this.curve.one;
46852}
46853inherits(JPoint, Base.BasePoint);
46854
46855ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
46856 return new JPoint(this, x, y, z);
46857};
46858
46859JPoint.prototype.toP = function toP() {
46860 if (this.isInfinity())
46861 return this.curve.point(null, null);
46862
46863 var zinv = this.z.redInvm();
46864 var zinv2 = zinv.redSqr();
46865 var ax = this.x.redMul(zinv2);
46866 var ay = this.y.redMul(zinv2).redMul(zinv);
46867
46868 return this.curve.point(ax, ay);
46869};
46870
46871JPoint.prototype.neg = function neg() {
46872 return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
46873};
46874
46875JPoint.prototype.add = function add(p) {
46876 // O + P = P
46877 if (this.isInfinity())
46878 return p;
46879
46880 // P + O = P
46881 if (p.isInfinity())
46882 return this;
46883
46884 // 12M + 4S + 7A
46885 var pz2 = p.z.redSqr();
46886 var z2 = this.z.redSqr();
46887 var u1 = this.x.redMul(pz2);
46888 var u2 = p.x.redMul(z2);
46889 var s1 = this.y.redMul(pz2.redMul(p.z));
46890 var s2 = p.y.redMul(z2.redMul(this.z));
46891
46892 var h = u1.redSub(u2);
46893 var r = s1.redSub(s2);
46894 if (h.cmpn(0) === 0) {
46895 if (r.cmpn(0) !== 0)
46896 return this.curve.jpoint(null, null, null);
46897 else
46898 return this.dbl();
46899 }
46900
46901 var h2 = h.redSqr();
46902 var h3 = h2.redMul(h);
46903 var v = u1.redMul(h2);
46904
46905 var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
46906 var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
46907 var nz = this.z.redMul(p.z).redMul(h);
46908
46909 return this.curve.jpoint(nx, ny, nz);
46910};
46911
46912JPoint.prototype.mixedAdd = function mixedAdd(p) {
46913 // O + P = P
46914 if (this.isInfinity())
46915 return p.toJ();
46916
46917 // P + O = P
46918 if (p.isInfinity())
46919 return this;
46920
46921 // 8M + 3S + 7A
46922 var z2 = this.z.redSqr();
46923 var u1 = this.x;
46924 var u2 = p.x.redMul(z2);
46925 var s1 = this.y;
46926 var s2 = p.y.redMul(z2).redMul(this.z);
46927
46928 var h = u1.redSub(u2);
46929 var r = s1.redSub(s2);
46930 if (h.cmpn(0) === 0) {
46931 if (r.cmpn(0) !== 0)
46932 return this.curve.jpoint(null, null, null);
46933 else
46934 return this.dbl();
46935 }
46936
46937 var h2 = h.redSqr();
46938 var h3 = h2.redMul(h);
46939 var v = u1.redMul(h2);
46940
46941 var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
46942 var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
46943 var nz = this.z.redMul(h);
46944
46945 return this.curve.jpoint(nx, ny, nz);
46946};
46947
46948JPoint.prototype.dblp = function dblp(pow) {
46949 if (pow === 0)
46950 return this;
46951 if (this.isInfinity())
46952 return this;
46953 if (!pow)
46954 return this.dbl();
46955
46956 if (this.curve.zeroA || this.curve.threeA) {
46957 var r = this;
46958 for (var i = 0; i < pow; i++)
46959 r = r.dbl();
46960 return r;
46961 }
46962
46963 // 1M + 2S + 1A + N * (4S + 5M + 8A)
46964 // N = 1 => 6M + 6S + 9A
46965 var a = this.curve.a;
46966 var tinv = this.curve.tinv;
46967
46968 var jx = this.x;
46969 var jy = this.y;
46970 var jz = this.z;
46971 var jz4 = jz.redSqr().redSqr();
46972
46973 // Reuse results
46974 var jyd = jy.redAdd(jy);
46975 for (var i = 0; i < pow; i++) {
46976 var jx2 = jx.redSqr();
46977 var jyd2 = jyd.redSqr();
46978 var jyd4 = jyd2.redSqr();
46979 var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
46980
46981 var t1 = jx.redMul(jyd2);
46982 var nx = c.redSqr().redISub(t1.redAdd(t1));
46983 var t2 = t1.redISub(nx);
46984 var dny = c.redMul(t2);
46985 dny = dny.redIAdd(dny).redISub(jyd4);
46986 var nz = jyd.redMul(jz);
46987 if (i + 1 < pow)
46988 jz4 = jz4.redMul(jyd4);
46989
46990 jx = nx;
46991 jz = nz;
46992 jyd = dny;
46993 }
46994
46995 return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
46996};
46997
46998JPoint.prototype.dbl = function dbl() {
46999 if (this.isInfinity())
47000 return this;
47001
47002 if (this.curve.zeroA)
47003 return this._zeroDbl();
47004 else if (this.curve.threeA)
47005 return this._threeDbl();
47006 else
47007 return this._dbl();
47008};
47009
47010JPoint.prototype._zeroDbl = function _zeroDbl() {
47011 var nx;
47012 var ny;
47013 var nz;
47014 // Z = 1
47015 if (this.zOne) {
47016 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
47017 // #doubling-mdbl-2007-bl
47018 // 1M + 5S + 14A
47019
47020 // XX = X1^2
47021 var xx = this.x.redSqr();
47022 // YY = Y1^2
47023 var yy = this.y.redSqr();
47024 // YYYY = YY^2
47025 var yyyy = yy.redSqr();
47026 // S = 2 * ((X1 + YY)^2 - XX - YYYY)
47027 var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
47028 s = s.redIAdd(s);
47029 // M = 3 * XX + a; a = 0
47030 var m = xx.redAdd(xx).redIAdd(xx);
47031 // T = M ^ 2 - 2*S
47032 var t = m.redSqr().redISub(s).redISub(s);
47033
47034 // 8 * YYYY
47035 var yyyy8 = yyyy.redIAdd(yyyy);
47036 yyyy8 = yyyy8.redIAdd(yyyy8);
47037 yyyy8 = yyyy8.redIAdd(yyyy8);
47038
47039 // X3 = T
47040 nx = t;
47041 // Y3 = M * (S - T) - 8 * YYYY
47042 ny = m.redMul(s.redISub(t)).redISub(yyyy8);
47043 // Z3 = 2*Y1
47044 nz = this.y.redAdd(this.y);
47045 } else {
47046 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
47047 // #doubling-dbl-2009-l
47048 // 2M + 5S + 13A
47049
47050 // A = X1^2
47051 var a = this.x.redSqr();
47052 // B = Y1^2
47053 var b = this.y.redSqr();
47054 // C = B^2
47055 var c = b.redSqr();
47056 // D = 2 * ((X1 + B)^2 - A - C)
47057 var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
47058 d = d.redIAdd(d);
47059 // E = 3 * A
47060 var e = a.redAdd(a).redIAdd(a);
47061 // F = E^2
47062 var f = e.redSqr();
47063
47064 // 8 * C
47065 var c8 = c.redIAdd(c);
47066 c8 = c8.redIAdd(c8);
47067 c8 = c8.redIAdd(c8);
47068
47069 // X3 = F - 2 * D
47070 nx = f.redISub(d).redISub(d);
47071 // Y3 = E * (D - X3) - 8 * C
47072 ny = e.redMul(d.redISub(nx)).redISub(c8);
47073 // Z3 = 2 * Y1 * Z1
47074 nz = this.y.redMul(this.z);
47075 nz = nz.redIAdd(nz);
47076 }
47077
47078 return this.curve.jpoint(nx, ny, nz);
47079};
47080
47081JPoint.prototype._threeDbl = function _threeDbl() {
47082 var nx;
47083 var ny;
47084 var nz;
47085 // Z = 1
47086 if (this.zOne) {
47087 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
47088 // #doubling-mdbl-2007-bl
47089 // 1M + 5S + 15A
47090
47091 // XX = X1^2
47092 var xx = this.x.redSqr();
47093 // YY = Y1^2
47094 var yy = this.y.redSqr();
47095 // YYYY = YY^2
47096 var yyyy = yy.redSqr();
47097 // S = 2 * ((X1 + YY)^2 - XX - YYYY)
47098 var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
47099 s = s.redIAdd(s);
47100 // M = 3 * XX + a
47101 var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
47102 // T = M^2 - 2 * S
47103 var t = m.redSqr().redISub(s).redISub(s);
47104 // X3 = T
47105 nx = t;
47106 // Y3 = M * (S - T) - 8 * YYYY
47107 var yyyy8 = yyyy.redIAdd(yyyy);
47108 yyyy8 = yyyy8.redIAdd(yyyy8);
47109 yyyy8 = yyyy8.redIAdd(yyyy8);
47110 ny = m.redMul(s.redISub(t)).redISub(yyyy8);
47111 // Z3 = 2 * Y1
47112 nz = this.y.redAdd(this.y);
47113 } else {
47114 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
47115 // 3M + 5S
47116
47117 // delta = Z1^2
47118 var delta = this.z.redSqr();
47119 // gamma = Y1^2
47120 var gamma = this.y.redSqr();
47121 // beta = X1 * gamma
47122 var beta = this.x.redMul(gamma);
47123 // alpha = 3 * (X1 - delta) * (X1 + delta)
47124 var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
47125 alpha = alpha.redAdd(alpha).redIAdd(alpha);
47126 // X3 = alpha^2 - 8 * beta
47127 var beta4 = beta.redIAdd(beta);
47128 beta4 = beta4.redIAdd(beta4);
47129 var beta8 = beta4.redAdd(beta4);
47130 nx = alpha.redSqr().redISub(beta8);
47131 // Z3 = (Y1 + Z1)^2 - gamma - delta
47132 nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
47133 // Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
47134 var ggamma8 = gamma.redSqr();
47135 ggamma8 = ggamma8.redIAdd(ggamma8);
47136 ggamma8 = ggamma8.redIAdd(ggamma8);
47137 ggamma8 = ggamma8.redIAdd(ggamma8);
47138 ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
47139 }
47140
47141 return this.curve.jpoint(nx, ny, nz);
47142};
47143
47144JPoint.prototype._dbl = function _dbl() {
47145 var a = this.curve.a;
47146
47147 // 4M + 6S + 10A
47148 var jx = this.x;
47149 var jy = this.y;
47150 var jz = this.z;
47151 var jz4 = jz.redSqr().redSqr();
47152
47153 var jx2 = jx.redSqr();
47154 var jy2 = jy.redSqr();
47155
47156 var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
47157
47158 var jxd4 = jx.redAdd(jx);
47159 jxd4 = jxd4.redIAdd(jxd4);
47160 var t1 = jxd4.redMul(jy2);
47161 var nx = c.redSqr().redISub(t1.redAdd(t1));
47162 var t2 = t1.redISub(nx);
47163
47164 var jyd8 = jy2.redSqr();
47165 jyd8 = jyd8.redIAdd(jyd8);
47166 jyd8 = jyd8.redIAdd(jyd8);
47167 jyd8 = jyd8.redIAdd(jyd8);
47168 var ny = c.redMul(t2).redISub(jyd8);
47169 var nz = jy.redAdd(jy).redMul(jz);
47170
47171 return this.curve.jpoint(nx, ny, nz);
47172};
47173
47174JPoint.prototype.trpl = function trpl() {
47175 if (!this.curve.zeroA)
47176 return this.dbl().add(this);
47177
47178 // hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
47179 // 5M + 10S + ...
47180
47181 // XX = X1^2
47182 var xx = this.x.redSqr();
47183 // YY = Y1^2
47184 var yy = this.y.redSqr();
47185 // ZZ = Z1^2
47186 var zz = this.z.redSqr();
47187 // YYYY = YY^2
47188 var yyyy = yy.redSqr();
47189 // M = 3 * XX + a * ZZ2; a = 0
47190 var m = xx.redAdd(xx).redIAdd(xx);
47191 // MM = M^2
47192 var mm = m.redSqr();
47193 // E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
47194 var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
47195 e = e.redIAdd(e);
47196 e = e.redAdd(e).redIAdd(e);
47197 e = e.redISub(mm);
47198 // EE = E^2
47199 var ee = e.redSqr();
47200 // T = 16*YYYY
47201 var t = yyyy.redIAdd(yyyy);
47202 t = t.redIAdd(t);
47203 t = t.redIAdd(t);
47204 t = t.redIAdd(t);
47205 // U = (M + E)^2 - MM - EE - T
47206 var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
47207 // X3 = 4 * (X1 * EE - 4 * YY * U)
47208 var yyu4 = yy.redMul(u);
47209 yyu4 = yyu4.redIAdd(yyu4);
47210 yyu4 = yyu4.redIAdd(yyu4);
47211 var nx = this.x.redMul(ee).redISub(yyu4);
47212 nx = nx.redIAdd(nx);
47213 nx = nx.redIAdd(nx);
47214 // Y3 = 8 * Y1 * (U * (T - U) - E * EE)
47215 var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
47216 ny = ny.redIAdd(ny);
47217 ny = ny.redIAdd(ny);
47218 ny = ny.redIAdd(ny);
47219 // Z3 = (Z1 + E)^2 - ZZ - EE
47220 var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);
47221
47222 return this.curve.jpoint(nx, ny, nz);
47223};
47224
47225JPoint.prototype.mul = function mul(k, kbase) {
47226 k = new BN(k, kbase);
47227
47228 return this.curve._wnafMul(this, k);
47229};
47230
47231JPoint.prototype.eq = function eq(p) {
47232 if (p.type === 'affine')
47233 return this.eq(p.toJ());
47234
47235 if (this === p)
47236 return true;
47237
47238 // x1 * z2^2 == x2 * z1^2
47239 var z2 = this.z.redSqr();
47240 var pz2 = p.z.redSqr();
47241 if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
47242 return false;
47243
47244 // y1 * z2^3 == y2 * z1^3
47245 var z3 = z2.redMul(this.z);
47246 var pz3 = pz2.redMul(p.z);
47247 return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
47248};
47249
47250JPoint.prototype.eqXToP = function eqXToP(x) {
47251 var zs = this.z.redSqr();
47252 var rx = x.toRed(this.curve.red).redMul(zs);
47253 if (this.x.cmp(rx) === 0)
47254 return true;
47255
47256 var xc = x.clone();
47257 var t = this.curve.redN.redMul(zs);
47258 for (;;) {
47259 xc.iadd(this.curve.n);
47260 if (xc.cmp(this.curve.p) >= 0)
47261 return false;
47262
47263 rx.redIAdd(t);
47264 if (this.x.cmp(rx) === 0)
47265 return true;
47266 }
47267};
47268
47269JPoint.prototype.inspect = function inspect() {
47270 if (this.isInfinity())
47271 return '<EC JPoint Infinity>';
47272 return '<EC JPoint x: ' + this.x.toString(16, 2) +
47273 ' y: ' + this.y.toString(16, 2) +
47274 ' z: ' + this.z.toString(16, 2) + '>';
47275};
47276
47277JPoint.prototype.isInfinity = function isInfinity() {
47278 // XXX This code assumes that zero is always zero in red
47279 return this.z.cmpn(0) === 0;
47280};
47281
47282
47283/***/ }),
47284
47285/***/ "./node_modules/elliptic/lib/elliptic/curves.js":
47286/*!******************************************************!*\
47287 !*** ./node_modules/elliptic/lib/elliptic/curves.js ***!
47288 \******************************************************/
47289/*! no static exports found */
47290/***/ (function(module, exports, __webpack_require__) {
47291
47292"use strict";
47293
47294
47295var curves = exports;
47296
47297var hash = __webpack_require__(/*! hash.js */ "./node_modules/hash.js/lib/hash.js");
47298var curve = __webpack_require__(/*! ./curve */ "./node_modules/elliptic/lib/elliptic/curve/index.js");
47299var utils = __webpack_require__(/*! ./utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
47300
47301var assert = utils.assert;
47302
47303function PresetCurve(options) {
47304 if (options.type === 'short')
47305 this.curve = new curve.short(options);
47306 else if (options.type === 'edwards')
47307 this.curve = new curve.edwards(options);
47308 else
47309 this.curve = new curve.mont(options);
47310 this.g = this.curve.g;
47311 this.n = this.curve.n;
47312 this.hash = options.hash;
47313
47314 assert(this.g.validate(), 'Invalid curve');
47315 assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
47316}
47317curves.PresetCurve = PresetCurve;
47318
47319function defineCurve(name, options) {
47320 Object.defineProperty(curves, name, {
47321 configurable: true,
47322 enumerable: true,
47323 get: function() {
47324 var curve = new PresetCurve(options);
47325 Object.defineProperty(curves, name, {
47326 configurable: true,
47327 enumerable: true,
47328 value: curve
47329 });
47330 return curve;
47331 }
47332 });
47333}
47334
47335defineCurve('p192', {
47336 type: 'short',
47337 prime: 'p192',
47338 p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
47339 a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
47340 b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
47341 n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
47342 hash: hash.sha256,
47343 gRed: false,
47344 g: [
47345 '188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
47346 '07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'
47347 ]
47348});
47349
47350defineCurve('p224', {
47351 type: 'short',
47352 prime: 'p224',
47353 p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
47354 a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
47355 b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
47356 n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
47357 hash: hash.sha256,
47358 gRed: false,
47359 g: [
47360 'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
47361 'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'
47362 ]
47363});
47364
47365defineCurve('p256', {
47366 type: 'short',
47367 prime: null,
47368 p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
47369 a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
47370 b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
47371 n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
47372 hash: hash.sha256,
47373 gRed: false,
47374 g: [
47375 '6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
47376 '4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'
47377 ]
47378});
47379
47380defineCurve('p384', {
47381 type: 'short',
47382 prime: null,
47383 p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47384 'fffffffe ffffffff 00000000 00000000 ffffffff',
47385 a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47386 'fffffffe ffffffff 00000000 00000000 fffffffc',
47387 b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
47388 '5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
47389 n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
47390 'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
47391 hash: hash.sha384,
47392 gRed: false,
47393 g: [
47394 'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
47395 '5502f25d bf55296c 3a545e38 72760ab7',
47396 '3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
47397 '0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'
47398 ]
47399});
47400
47401defineCurve('p521', {
47402 type: 'short',
47403 prime: null,
47404 p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47405 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47406 'ffffffff ffffffff ffffffff ffffffff ffffffff',
47407 a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47408 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47409 'ffffffff ffffffff ffffffff ffffffff fffffffc',
47410 b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
47411 '99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
47412 '3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
47413 n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
47414 'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
47415 'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
47416 hash: hash.sha512,
47417 gRed: false,
47418 g: [
47419 '000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
47420 '053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
47421 'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
47422 '00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
47423 '579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
47424 '3fad0761 353c7086 a272c240 88be9476 9fd16650'
47425 ]
47426});
47427
47428defineCurve('curve25519', {
47429 type: 'mont',
47430 prime: 'p25519',
47431 p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
47432 a: '76d06',
47433 b: '1',
47434 n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
47435 hash: hash.sha256,
47436 gRed: false,
47437 g: [
47438 '9'
47439 ]
47440});
47441
47442defineCurve('ed25519', {
47443 type: 'edwards',
47444 prime: 'p25519',
47445 p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
47446 a: '-1',
47447 c: '1',
47448 // -121665 * (121666^(-1)) (mod P)
47449 d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
47450 n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
47451 hash: hash.sha256,
47452 gRed: false,
47453 g: [
47454 '216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',
47455
47456 // 4/5
47457 '6666666666666666666666666666666666666666666666666666666666666658'
47458 ]
47459});
47460
47461var pre;
47462try {
47463 pre = __webpack_require__(/*! ./precomputed/secp256k1 */ "./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js");
47464} catch (e) {
47465 pre = undefined;
47466}
47467
47468defineCurve('secp256k1', {
47469 type: 'short',
47470 prime: 'k256',
47471 p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
47472 a: '0',
47473 b: '7',
47474 n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
47475 h: '1',
47476 hash: hash.sha256,
47477
47478 // Precomputed endomorphism
47479 beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
47480 lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
47481 basis: [
47482 {
47483 a: '3086d221a7d46bcde86c90e49284eb15',
47484 b: '-e4437ed6010e88286f547fa90abfe4c3'
47485 },
47486 {
47487 a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
47488 b: '3086d221a7d46bcde86c90e49284eb15'
47489 }
47490 ],
47491
47492 gRed: false,
47493 g: [
47494 '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
47495 '483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
47496 pre
47497 ]
47498});
47499
47500
47501/***/ }),
47502
47503/***/ "./node_modules/elliptic/lib/elliptic/ec/index.js":
47504/*!********************************************************!*\
47505 !*** ./node_modules/elliptic/lib/elliptic/ec/index.js ***!
47506 \********************************************************/
47507/*! no static exports found */
47508/***/ (function(module, exports, __webpack_require__) {
47509
47510"use strict";
47511
47512
47513var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
47514var HmacDRBG = __webpack_require__(/*! hmac-drbg */ "./node_modules/hmac-drbg/lib/hmac-drbg.js");
47515var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
47516var curves = __webpack_require__(/*! ../curves */ "./node_modules/elliptic/lib/elliptic/curves.js");
47517var rand = __webpack_require__(/*! brorand */ "./node_modules/brorand/index.js");
47518var assert = utils.assert;
47519
47520var KeyPair = __webpack_require__(/*! ./key */ "./node_modules/elliptic/lib/elliptic/ec/key.js");
47521var Signature = __webpack_require__(/*! ./signature */ "./node_modules/elliptic/lib/elliptic/ec/signature.js");
47522
47523function EC(options) {
47524 if (!(this instanceof EC))
47525 return new EC(options);
47526
47527 // Shortcut `elliptic.ec(curve-name)`
47528 if (typeof options === 'string') {
47529 assert(curves.hasOwnProperty(options), 'Unknown curve ' + options);
47530
47531 options = curves[options];
47532 }
47533
47534 // Shortcut for `elliptic.ec(elliptic.curves.curveName)`
47535 if (options instanceof curves.PresetCurve)
47536 options = { curve: options };
47537
47538 this.curve = options.curve.curve;
47539 this.n = this.curve.n;
47540 this.nh = this.n.ushrn(1);
47541 this.g = this.curve.g;
47542
47543 // Point on curve
47544 this.g = options.curve.g;
47545 this.g.precompute(options.curve.n.bitLength() + 1);
47546
47547 // Hash for function for DRBG
47548 this.hash = options.hash || options.curve.hash;
47549}
47550module.exports = EC;
47551
47552EC.prototype.keyPair = function keyPair(options) {
47553 return new KeyPair(this, options);
47554};
47555
47556EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
47557 return KeyPair.fromPrivate(this, priv, enc);
47558};
47559
47560EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
47561 return KeyPair.fromPublic(this, pub, enc);
47562};
47563
47564EC.prototype.genKeyPair = function genKeyPair(options) {
47565 if (!options)
47566 options = {};
47567
47568 // Instantiate Hmac_DRBG
47569 var drbg = new HmacDRBG({
47570 hash: this.hash,
47571 pers: options.pers,
47572 persEnc: options.persEnc || 'utf8',
47573 entropy: options.entropy || rand(this.hash.hmacStrength),
47574 entropyEnc: options.entropy && options.entropyEnc || 'utf8',
47575 nonce: this.n.toArray()
47576 });
47577
47578 var bytes = this.n.byteLength();
47579 var ns2 = this.n.sub(new BN(2));
47580 do {
47581 var priv = new BN(drbg.generate(bytes));
47582 if (priv.cmp(ns2) > 0)
47583 continue;
47584
47585 priv.iaddn(1);
47586 return this.keyFromPrivate(priv);
47587 } while (true);
47588};
47589
47590EC.prototype._truncateToN = function truncateToN(msg, truncOnly) {
47591 var delta = msg.byteLength() * 8 - this.n.bitLength();
47592 if (delta > 0)
47593 msg = msg.ushrn(delta);
47594 if (!truncOnly && msg.cmp(this.n) >= 0)
47595 return msg.sub(this.n);
47596 else
47597 return msg;
47598};
47599
47600EC.prototype.sign = function sign(msg, key, enc, options) {
47601 if (typeof enc === 'object') {
47602 options = enc;
47603 enc = null;
47604 }
47605 if (!options)
47606 options = {};
47607
47608 key = this.keyFromPrivate(key, enc);
47609 msg = this._truncateToN(new BN(msg, 16));
47610
47611 // Zero-extend key to provide enough entropy
47612 var bytes = this.n.byteLength();
47613 var bkey = key.getPrivate().toArray('be', bytes);
47614
47615 // Zero-extend nonce to have the same byte size as N
47616 var nonce = msg.toArray('be', bytes);
47617
47618 // Instantiate Hmac_DRBG
47619 var drbg = new HmacDRBG({
47620 hash: this.hash,
47621 entropy: bkey,
47622 nonce: nonce,
47623 pers: options.pers,
47624 persEnc: options.persEnc || 'utf8'
47625 });
47626
47627 // Number of bytes to generate
47628 var ns1 = this.n.sub(new BN(1));
47629
47630 for (var iter = 0; true; iter++) {
47631 var k = options.k ?
47632 options.k(iter) :
47633 new BN(drbg.generate(this.n.byteLength()));
47634 k = this._truncateToN(k, true);
47635 if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
47636 continue;
47637
47638 var kp = this.g.mul(k);
47639 if (kp.isInfinity())
47640 continue;
47641
47642 var kpX = kp.getX();
47643 var r = kpX.umod(this.n);
47644 if (r.cmpn(0) === 0)
47645 continue;
47646
47647 var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
47648 s = s.umod(this.n);
47649 if (s.cmpn(0) === 0)
47650 continue;
47651
47652 var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
47653 (kpX.cmp(r) !== 0 ? 2 : 0);
47654
47655 // Use complement of `s`, if it is > `n / 2`
47656 if (options.canonical && s.cmp(this.nh) > 0) {
47657 s = this.n.sub(s);
47658 recoveryParam ^= 1;
47659 }
47660
47661 return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
47662 }
47663};
47664
47665EC.prototype.verify = function verify(msg, signature, key, enc) {
47666 msg = this._truncateToN(new BN(msg, 16));
47667 key = this.keyFromPublic(key, enc);
47668 signature = new Signature(signature, 'hex');
47669
47670 // Perform primitive values validation
47671 var r = signature.r;
47672 var s = signature.s;
47673 if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
47674 return false;
47675 if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
47676 return false;
47677
47678 // Validate signature
47679 var sinv = s.invm(this.n);
47680 var u1 = sinv.mul(msg).umod(this.n);
47681 var u2 = sinv.mul(r).umod(this.n);
47682
47683 if (!this.curve._maxwellTrick) {
47684 var p = this.g.mulAdd(u1, key.getPublic(), u2);
47685 if (p.isInfinity())
47686 return false;
47687
47688 return p.getX().umod(this.n).cmp(r) === 0;
47689 }
47690
47691 // NOTE: Greg Maxwell's trick, inspired by:
47692 // https://git.io/vad3K
47693
47694 var p = this.g.jmulAdd(u1, key.getPublic(), u2);
47695 if (p.isInfinity())
47696 return false;
47697
47698 // Compare `p.x` of Jacobian point with `r`,
47699 // this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
47700 // inverse of `p.z^2`
47701 return p.eqXToP(r);
47702};
47703
47704EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
47705 assert((3 & j) === j, 'The recovery param is more than two bits');
47706 signature = new Signature(signature, enc);
47707
47708 var n = this.n;
47709 var e = new BN(msg);
47710 var r = signature.r;
47711 var s = signature.s;
47712
47713 // A set LSB signifies that the y-coordinate is odd
47714 var isYOdd = j & 1;
47715 var isSecondKey = j >> 1;
47716 if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
47717 throw new Error('Unable to find sencond key candinate');
47718
47719 // 1.1. Let x = r + jn.
47720 if (isSecondKey)
47721 r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
47722 else
47723 r = this.curve.pointFromX(r, isYOdd);
47724
47725 var rInv = signature.r.invm(n);
47726 var s1 = n.sub(e).mul(rInv).umod(n);
47727 var s2 = s.mul(rInv).umod(n);
47728
47729 // 1.6.1 Compute Q = r^-1 (sR - eG)
47730 // Q = r^-1 (sR + -eG)
47731 return this.g.mulAdd(s1, r, s2);
47732};
47733
47734EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
47735 signature = new Signature(signature, enc);
47736 if (signature.recoveryParam !== null)
47737 return signature.recoveryParam;
47738
47739 for (var i = 0; i < 4; i++) {
47740 var Qprime;
47741 try {
47742 Qprime = this.recoverPubKey(e, signature, i);
47743 } catch (e) {
47744 continue;
47745 }
47746
47747 if (Qprime.eq(Q))
47748 return i;
47749 }
47750 throw new Error('Unable to find valid recovery factor');
47751};
47752
47753
47754/***/ }),
47755
47756/***/ "./node_modules/elliptic/lib/elliptic/ec/key.js":
47757/*!******************************************************!*\
47758 !*** ./node_modules/elliptic/lib/elliptic/ec/key.js ***!
47759 \******************************************************/
47760/*! no static exports found */
47761/***/ (function(module, exports, __webpack_require__) {
47762
47763"use strict";
47764
47765
47766var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
47767var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
47768var assert = utils.assert;
47769
47770function KeyPair(ec, options) {
47771 this.ec = ec;
47772 this.priv = null;
47773 this.pub = null;
47774
47775 // KeyPair(ec, { priv: ..., pub: ... })
47776 if (options.priv)
47777 this._importPrivate(options.priv, options.privEnc);
47778 if (options.pub)
47779 this._importPublic(options.pub, options.pubEnc);
47780}
47781module.exports = KeyPair;
47782
47783KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
47784 if (pub instanceof KeyPair)
47785 return pub;
47786
47787 return new KeyPair(ec, {
47788 pub: pub,
47789 pubEnc: enc
47790 });
47791};
47792
47793KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
47794 if (priv instanceof KeyPair)
47795 return priv;
47796
47797 return new KeyPair(ec, {
47798 priv: priv,
47799 privEnc: enc
47800 });
47801};
47802
47803KeyPair.prototype.validate = function validate() {
47804 var pub = this.getPublic();
47805
47806 if (pub.isInfinity())
47807 return { result: false, reason: 'Invalid public key' };
47808 if (!pub.validate())
47809 return { result: false, reason: 'Public key is not a point' };
47810 if (!pub.mul(this.ec.curve.n).isInfinity())
47811 return { result: false, reason: 'Public key * N != O' };
47812
47813 return { result: true, reason: null };
47814};
47815
47816KeyPair.prototype.getPublic = function getPublic(compact, enc) {
47817 // compact is optional argument
47818 if (typeof compact === 'string') {
47819 enc = compact;
47820 compact = null;
47821 }
47822
47823 if (!this.pub)
47824 this.pub = this.ec.g.mul(this.priv);
47825
47826 if (!enc)
47827 return this.pub;
47828
47829 return this.pub.encode(enc, compact);
47830};
47831
47832KeyPair.prototype.getPrivate = function getPrivate(enc) {
47833 if (enc === 'hex')
47834 return this.priv.toString(16, 2);
47835 else
47836 return this.priv;
47837};
47838
47839KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
47840 this.priv = new BN(key, enc || 16);
47841
47842 // Ensure that the priv won't be bigger than n, otherwise we may fail
47843 // in fixed multiplication method
47844 this.priv = this.priv.umod(this.ec.curve.n);
47845};
47846
47847KeyPair.prototype._importPublic = function _importPublic(key, enc) {
47848 if (key.x || key.y) {
47849 // Montgomery points only have an `x` coordinate.
47850 // Weierstrass/Edwards points on the other hand have both `x` and
47851 // `y` coordinates.
47852 if (this.ec.curve.type === 'mont') {
47853 assert(key.x, 'Need x coordinate');
47854 } else if (this.ec.curve.type === 'short' ||
47855 this.ec.curve.type === 'edwards') {
47856 assert(key.x && key.y, 'Need both x and y coordinate');
47857 }
47858 this.pub = this.ec.curve.point(key.x, key.y);
47859 return;
47860 }
47861 this.pub = this.ec.curve.decodePoint(key, enc);
47862};
47863
47864// ECDH
47865KeyPair.prototype.derive = function derive(pub) {
47866 return pub.mul(this.priv).getX();
47867};
47868
47869// ECDSA
47870KeyPair.prototype.sign = function sign(msg, enc, options) {
47871 return this.ec.sign(msg, this, enc, options);
47872};
47873
47874KeyPair.prototype.verify = function verify(msg, signature) {
47875 return this.ec.verify(msg, signature, this);
47876};
47877
47878KeyPair.prototype.inspect = function inspect() {
47879 return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
47880 ' pub: ' + (this.pub && this.pub.inspect()) + ' >';
47881};
47882
47883
47884/***/ }),
47885
47886/***/ "./node_modules/elliptic/lib/elliptic/ec/signature.js":
47887/*!************************************************************!*\
47888 !*** ./node_modules/elliptic/lib/elliptic/ec/signature.js ***!
47889 \************************************************************/
47890/*! no static exports found */
47891/***/ (function(module, exports, __webpack_require__) {
47892
47893"use strict";
47894
47895
47896var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
47897
47898var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
47899var assert = utils.assert;
47900
47901function Signature(options, enc) {
47902 if (options instanceof Signature)
47903 return options;
47904
47905 if (this._importDER(options, enc))
47906 return;
47907
47908 assert(options.r && options.s, 'Signature without r or s');
47909 this.r = new BN(options.r, 16);
47910 this.s = new BN(options.s, 16);
47911 if (options.recoveryParam === undefined)
47912 this.recoveryParam = null;
47913 else
47914 this.recoveryParam = options.recoveryParam;
47915}
47916module.exports = Signature;
47917
47918function Position() {
47919 this.place = 0;
47920}
47921
47922function getLength(buf, p) {
47923 var initial = buf[p.place++];
47924 if (!(initial & 0x80)) {
47925 return initial;
47926 }
47927 var octetLen = initial & 0xf;
47928 var val = 0;
47929 for (var i = 0, off = p.place; i < octetLen; i++, off++) {
47930 val <<= 8;
47931 val |= buf[off];
47932 }
47933 p.place = off;
47934 return val;
47935}
47936
47937function rmPadding(buf) {
47938 var i = 0;
47939 var len = buf.length - 1;
47940 while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
47941 i++;
47942 }
47943 if (i === 0) {
47944 return buf;
47945 }
47946 return buf.slice(i);
47947}
47948
47949Signature.prototype._importDER = function _importDER(data, enc) {
47950 data = utils.toArray(data, enc);
47951 var p = new Position();
47952 if (data[p.place++] !== 0x30) {
47953 return false;
47954 }
47955 var len = getLength(data, p);
47956 if ((len + p.place) !== data.length) {
47957 return false;
47958 }
47959 if (data[p.place++] !== 0x02) {
47960 return false;
47961 }
47962 var rlen = getLength(data, p);
47963 var r = data.slice(p.place, rlen + p.place);
47964 p.place += rlen;
47965 if (data[p.place++] !== 0x02) {
47966 return false;
47967 }
47968 var slen = getLength(data, p);
47969 if (data.length !== slen + p.place) {
47970 return false;
47971 }
47972 var s = data.slice(p.place, slen + p.place);
47973 if (r[0] === 0 && (r[1] & 0x80)) {
47974 r = r.slice(1);
47975 }
47976 if (s[0] === 0 && (s[1] & 0x80)) {
47977 s = s.slice(1);
47978 }
47979
47980 this.r = new BN(r);
47981 this.s = new BN(s);
47982 this.recoveryParam = null;
47983
47984 return true;
47985};
47986
47987function constructLength(arr, len) {
47988 if (len < 0x80) {
47989 arr.push(len);
47990 return;
47991 }
47992 var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
47993 arr.push(octets | 0x80);
47994 while (--octets) {
47995 arr.push((len >>> (octets << 3)) & 0xff);
47996 }
47997 arr.push(len);
47998}
47999
48000Signature.prototype.toDER = function toDER(enc) {
48001 var r = this.r.toArray();
48002 var s = this.s.toArray();
48003
48004 // Pad values
48005 if (r[0] & 0x80)
48006 r = [ 0 ].concat(r);
48007 // Pad values
48008 if (s[0] & 0x80)
48009 s = [ 0 ].concat(s);
48010
48011 r = rmPadding(r);
48012 s = rmPadding(s);
48013
48014 while (!s[0] && !(s[1] & 0x80)) {
48015 s = s.slice(1);
48016 }
48017 var arr = [ 0x02 ];
48018 constructLength(arr, r.length);
48019 arr = arr.concat(r);
48020 arr.push(0x02);
48021 constructLength(arr, s.length);
48022 var backHalf = arr.concat(s);
48023 var res = [ 0x30 ];
48024 constructLength(res, backHalf.length);
48025 res = res.concat(backHalf);
48026 return utils.encode(res, enc);
48027};
48028
48029
48030/***/ }),
48031
48032/***/ "./node_modules/elliptic/lib/elliptic/eddsa/index.js":
48033/*!***********************************************************!*\
48034 !*** ./node_modules/elliptic/lib/elliptic/eddsa/index.js ***!
48035 \***********************************************************/
48036/*! no static exports found */
48037/***/ (function(module, exports, __webpack_require__) {
48038
48039"use strict";
48040
48041
48042var hash = __webpack_require__(/*! hash.js */ "./node_modules/hash.js/lib/hash.js");
48043var curves = __webpack_require__(/*! ../curves */ "./node_modules/elliptic/lib/elliptic/curves.js");
48044var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
48045var assert = utils.assert;
48046var parseBytes = utils.parseBytes;
48047var KeyPair = __webpack_require__(/*! ./key */ "./node_modules/elliptic/lib/elliptic/eddsa/key.js");
48048var Signature = __webpack_require__(/*! ./signature */ "./node_modules/elliptic/lib/elliptic/eddsa/signature.js");
48049
48050function EDDSA(curve) {
48051 assert(curve === 'ed25519', 'only tested with ed25519 so far');
48052
48053 if (!(this instanceof EDDSA))
48054 return new EDDSA(curve);
48055
48056 var curve = curves[curve].curve;
48057 this.curve = curve;
48058 this.g = curve.g;
48059 this.g.precompute(curve.n.bitLength() + 1);
48060
48061 this.pointClass = curve.point().constructor;
48062 this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
48063 this.hash = hash.sha512;
48064}
48065
48066module.exports = EDDSA;
48067
48068/**
48069* @param {Array|String} message - message bytes
48070* @param {Array|String|KeyPair} secret - secret bytes or a keypair
48071* @returns {Signature} - signature
48072*/
48073EDDSA.prototype.sign = function sign(message, secret) {
48074 message = parseBytes(message);
48075 var key = this.keyFromSecret(secret);
48076 var r = this.hashInt(key.messagePrefix(), message);
48077 var R = this.g.mul(r);
48078 var Rencoded = this.encodePoint(R);
48079 var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
48080 .mul(key.priv());
48081 var S = r.add(s_).umod(this.curve.n);
48082 return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
48083};
48084
48085/**
48086* @param {Array} message - message bytes
48087* @param {Array|String|Signature} sig - sig bytes
48088* @param {Array|String|Point|KeyPair} pub - public key
48089* @returns {Boolean} - true if public key matches sig of message
48090*/
48091EDDSA.prototype.verify = function verify(message, sig, pub) {
48092 message = parseBytes(message);
48093 sig = this.makeSignature(sig);
48094 var key = this.keyFromPublic(pub);
48095 var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
48096 var SG = this.g.mul(sig.S());
48097 var RplusAh = sig.R().add(key.pub().mul(h));
48098 return RplusAh.eq(SG);
48099};
48100
48101EDDSA.prototype.hashInt = function hashInt() {
48102 var hash = this.hash();
48103 for (var i = 0; i < arguments.length; i++)
48104 hash.update(arguments[i]);
48105 return utils.intFromLE(hash.digest()).umod(this.curve.n);
48106};
48107
48108EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
48109 return KeyPair.fromPublic(this, pub);
48110};
48111
48112EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
48113 return KeyPair.fromSecret(this, secret);
48114};
48115
48116EDDSA.prototype.makeSignature = function makeSignature(sig) {
48117 if (sig instanceof Signature)
48118 return sig;
48119 return new Signature(this, sig);
48120};
48121
48122/**
48123* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
48124*
48125* EDDSA defines methods for encoding and decoding points and integers. These are
48126* helper convenience methods, that pass along to utility functions implied
48127* parameters.
48128*
48129*/
48130EDDSA.prototype.encodePoint = function encodePoint(point) {
48131 var enc = point.getY().toArray('le', this.encodingLength);
48132 enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
48133 return enc;
48134};
48135
48136EDDSA.prototype.decodePoint = function decodePoint(bytes) {
48137 bytes = utils.parseBytes(bytes);
48138
48139 var lastIx = bytes.length - 1;
48140 var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
48141 var xIsOdd = (bytes[lastIx] & 0x80) !== 0;
48142
48143 var y = utils.intFromLE(normed);
48144 return this.curve.pointFromY(y, xIsOdd);
48145};
48146
48147EDDSA.prototype.encodeInt = function encodeInt(num) {
48148 return num.toArray('le', this.encodingLength);
48149};
48150
48151EDDSA.prototype.decodeInt = function decodeInt(bytes) {
48152 return utils.intFromLE(bytes);
48153};
48154
48155EDDSA.prototype.isPoint = function isPoint(val) {
48156 return val instanceof this.pointClass;
48157};
48158
48159
48160/***/ }),
48161
48162/***/ "./node_modules/elliptic/lib/elliptic/eddsa/key.js":
48163/*!*********************************************************!*\
48164 !*** ./node_modules/elliptic/lib/elliptic/eddsa/key.js ***!
48165 \*********************************************************/
48166/*! no static exports found */
48167/***/ (function(module, exports, __webpack_require__) {
48168
48169"use strict";
48170
48171
48172var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
48173var assert = utils.assert;
48174var parseBytes = utils.parseBytes;
48175var cachedProperty = utils.cachedProperty;
48176
48177/**
48178* @param {EDDSA} eddsa - instance
48179* @param {Object} params - public/private key parameters
48180*
48181* @param {Array<Byte>} [params.secret] - secret seed bytes
48182* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
48183* @param {Array<Byte>} [params.pub] - public key point encoded as bytes
48184*
48185*/
48186function KeyPair(eddsa, params) {
48187 this.eddsa = eddsa;
48188 this._secret = parseBytes(params.secret);
48189 if (eddsa.isPoint(params.pub))
48190 this._pub = params.pub;
48191 else
48192 this._pubBytes = parseBytes(params.pub);
48193}
48194
48195KeyPair.fromPublic = function fromPublic(eddsa, pub) {
48196 if (pub instanceof KeyPair)
48197 return pub;
48198 return new KeyPair(eddsa, { pub: pub });
48199};
48200
48201KeyPair.fromSecret = function fromSecret(eddsa, secret) {
48202 if (secret instanceof KeyPair)
48203 return secret;
48204 return new KeyPair(eddsa, { secret: secret });
48205};
48206
48207KeyPair.prototype.secret = function secret() {
48208 return this._secret;
48209};
48210
48211cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
48212 return this.eddsa.encodePoint(this.pub());
48213});
48214
48215cachedProperty(KeyPair, 'pub', function pub() {
48216 if (this._pubBytes)
48217 return this.eddsa.decodePoint(this._pubBytes);
48218 return this.eddsa.g.mul(this.priv());
48219});
48220
48221cachedProperty(KeyPair, 'privBytes', function privBytes() {
48222 var eddsa = this.eddsa;
48223 var hash = this.hash();
48224 var lastIx = eddsa.encodingLength - 1;
48225
48226 var a = hash.slice(0, eddsa.encodingLength);
48227 a[0] &= 248;
48228 a[lastIx] &= 127;
48229 a[lastIx] |= 64;
48230
48231 return a;
48232});
48233
48234cachedProperty(KeyPair, 'priv', function priv() {
48235 return this.eddsa.decodeInt(this.privBytes());
48236});
48237
48238cachedProperty(KeyPair, 'hash', function hash() {
48239 return this.eddsa.hash().update(this.secret()).digest();
48240});
48241
48242cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
48243 return this.hash().slice(this.eddsa.encodingLength);
48244});
48245
48246KeyPair.prototype.sign = function sign(message) {
48247 assert(this._secret, 'KeyPair can only verify');
48248 return this.eddsa.sign(message, this);
48249};
48250
48251KeyPair.prototype.verify = function verify(message, sig) {
48252 return this.eddsa.verify(message, sig, this);
48253};
48254
48255KeyPair.prototype.getSecret = function getSecret(enc) {
48256 assert(this._secret, 'KeyPair is public only');
48257 return utils.encode(this.secret(), enc);
48258};
48259
48260KeyPair.prototype.getPublic = function getPublic(enc) {
48261 return utils.encode(this.pubBytes(), enc);
48262};
48263
48264module.exports = KeyPair;
48265
48266
48267/***/ }),
48268
48269/***/ "./node_modules/elliptic/lib/elliptic/eddsa/signature.js":
48270/*!***************************************************************!*\
48271 !*** ./node_modules/elliptic/lib/elliptic/eddsa/signature.js ***!
48272 \***************************************************************/
48273/*! no static exports found */
48274/***/ (function(module, exports, __webpack_require__) {
48275
48276"use strict";
48277
48278
48279var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
48280var utils = __webpack_require__(/*! ../utils */ "./node_modules/elliptic/lib/elliptic/utils.js");
48281var assert = utils.assert;
48282var cachedProperty = utils.cachedProperty;
48283var parseBytes = utils.parseBytes;
48284
48285/**
48286* @param {EDDSA} eddsa - eddsa instance
48287* @param {Array<Bytes>|Object} sig -
48288* @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
48289* @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
48290* @param {Array<Bytes>} [sig.Rencoded] - R point encoded
48291* @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
48292*/
48293function Signature(eddsa, sig) {
48294 this.eddsa = eddsa;
48295
48296 if (typeof sig !== 'object')
48297 sig = parseBytes(sig);
48298
48299 if (Array.isArray(sig)) {
48300 sig = {
48301 R: sig.slice(0, eddsa.encodingLength),
48302 S: sig.slice(eddsa.encodingLength)
48303 };
48304 }
48305
48306 assert(sig.R && sig.S, 'Signature without R or S');
48307
48308 if (eddsa.isPoint(sig.R))
48309 this._R = sig.R;
48310 if (sig.S instanceof BN)
48311 this._S = sig.S;
48312
48313 this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
48314 this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
48315}
48316
48317cachedProperty(Signature, 'S', function S() {
48318 return this.eddsa.decodeInt(this.Sencoded());
48319});
48320
48321cachedProperty(Signature, 'R', function R() {
48322 return this.eddsa.decodePoint(this.Rencoded());
48323});
48324
48325cachedProperty(Signature, 'Rencoded', function Rencoded() {
48326 return this.eddsa.encodePoint(this.R());
48327});
48328
48329cachedProperty(Signature, 'Sencoded', function Sencoded() {
48330 return this.eddsa.encodeInt(this.S());
48331});
48332
48333Signature.prototype.toBytes = function toBytes() {
48334 return this.Rencoded().concat(this.Sencoded());
48335};
48336
48337Signature.prototype.toHex = function toHex() {
48338 return utils.encode(this.toBytes(), 'hex').toUpperCase();
48339};
48340
48341module.exports = Signature;
48342
48343
48344/***/ }),
48345
48346/***/ "./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js":
48347/*!*********************************************************************!*\
48348 !*** ./node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js ***!
48349 \*********************************************************************/
48350/*! no static exports found */
48351/***/ (function(module, exports) {
48352
48353module.exports = {
48354 doubles: {
48355 step: 4,
48356 points: [
48357 [
48358 'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
48359 'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'
48360 ],
48361 [
48362 '8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
48363 '11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'
48364 ],
48365 [
48366 '175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
48367 'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'
48368 ],
48369 [
48370 '363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
48371 '4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'
48372 ],
48373 [
48374 '8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
48375 '4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'
48376 ],
48377 [
48378 '723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
48379 '96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'
48380 ],
48381 [
48382 'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
48383 '5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'
48384 ],
48385 [
48386 '100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
48387 'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'
48388 ],
48389 [
48390 'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
48391 '9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'
48392 ],
48393 [
48394 'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
48395 'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'
48396 ],
48397 [
48398 'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
48399 '9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'
48400 ],
48401 [
48402 '53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
48403 '5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'
48404 ],
48405 [
48406 '8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
48407 '10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'
48408 ],
48409 [
48410 '385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
48411 '283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'
48412 ],
48413 [
48414 '6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
48415 '7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'
48416 ],
48417 [
48418 '3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
48419 '56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'
48420 ],
48421 [
48422 '85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
48423 '7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'
48424 ],
48425 [
48426 '948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
48427 '53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'
48428 ],
48429 [
48430 '6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
48431 'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'
48432 ],
48433 [
48434 'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
48435 '4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'
48436 ],
48437 [
48438 'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
48439 '7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'
48440 ],
48441 [
48442 '213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
48443 '4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'
48444 ],
48445 [
48446 '4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
48447 '17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'
48448 ],
48449 [
48450 'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
48451 '6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'
48452 ],
48453 [
48454 '76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
48455 'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'
48456 ],
48457 [
48458 'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
48459 '893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'
48460 ],
48461 [
48462 'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
48463 'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'
48464 ],
48465 [
48466 'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
48467 '2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'
48468 ],
48469 [
48470 'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
48471 'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'
48472 ],
48473 [
48474 'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
48475 '7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'
48476 ],
48477 [
48478 '90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
48479 'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'
48480 ],
48481 [
48482 '8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
48483 '662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'
48484 ],
48485 [
48486 'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
48487 '1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'
48488 ],
48489 [
48490 '8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
48491 'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'
48492 ],
48493 [
48494 'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
48495 '2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'
48496 ],
48497 [
48498 'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
48499 '67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'
48500 ],
48501 [
48502 'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
48503 'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'
48504 ],
48505 [
48506 '324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
48507 '648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'
48508 ],
48509 [
48510 '4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
48511 '35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'
48512 ],
48513 [
48514 '9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
48515 'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'
48516 ],
48517 [
48518 '6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
48519 '9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'
48520 ],
48521 [
48522 'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
48523 '40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'
48524 ],
48525 [
48526 '7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
48527 '34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'
48528 ],
48529 [
48530 '928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
48531 'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'
48532 ],
48533 [
48534 '85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
48535 '1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'
48536 ],
48537 [
48538 'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
48539 '493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'
48540 ],
48541 [
48542 '827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
48543 'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'
48544 ],
48545 [
48546 'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
48547 'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'
48548 ],
48549 [
48550 'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
48551 '4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'
48552 ],
48553 [
48554 '1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
48555 'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'
48556 ],
48557 [
48558 '146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
48559 'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'
48560 ],
48561 [
48562 'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
48563 '6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'
48564 ],
48565 [
48566 'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
48567 '8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'
48568 ],
48569 [
48570 'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
48571 '7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'
48572 ],
48573 [
48574 '174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
48575 'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'
48576 ],
48577 [
48578 '959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
48579 '2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'
48580 ],
48581 [
48582 'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
48583 'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'
48584 ],
48585 [
48586 '64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
48587 'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'
48588 ],
48589 [
48590 '8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
48591 '38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'
48592 ],
48593 [
48594 '13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
48595 '69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'
48596 ],
48597 [
48598 'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
48599 'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'
48600 ],
48601 [
48602 '8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
48603 '40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'
48604 ],
48605 [
48606 '8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
48607 '620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'
48608 ],
48609 [
48610 'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
48611 '7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'
48612 ],
48613 [
48614 'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
48615 'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82'
48616 ]
48617 ]
48618 },
48619 naf: {
48620 wnd: 7,
48621 points: [
48622 [
48623 'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
48624 '388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'
48625 ],
48626 [
48627 '2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
48628 'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'
48629 ],
48630 [
48631 '5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
48632 '6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'
48633 ],
48634 [
48635 'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
48636 'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'
48637 ],
48638 [
48639 '774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
48640 'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'
48641 ],
48642 [
48643 'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
48644 'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'
48645 ],
48646 [
48647 'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
48648 '581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'
48649 ],
48650 [
48651 'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
48652 '4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'
48653 ],
48654 [
48655 '2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
48656 '85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'
48657 ],
48658 [
48659 '352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
48660 '321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'
48661 ],
48662 [
48663 '2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
48664 '2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'
48665 ],
48666 [
48667 '9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
48668 '73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'
48669 ],
48670 [
48671 'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
48672 'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'
48673 ],
48674 [
48675 'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
48676 '2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'
48677 ],
48678 [
48679 '6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
48680 'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'
48681 ],
48682 [
48683 '1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
48684 'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'
48685 ],
48686 [
48687 '605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
48688 '2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'
48689 ],
48690 [
48691 '62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
48692 '80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'
48693 ],
48694 [
48695 '80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
48696 '1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'
48697 ],
48698 [
48699 '7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
48700 'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'
48701 ],
48702 [
48703 'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
48704 'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'
48705 ],
48706 [
48707 '49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
48708 '758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'
48709 ],
48710 [
48711 '77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
48712 '958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'
48713 ],
48714 [
48715 'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
48716 'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'
48717 ],
48718 [
48719 '463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
48720 '5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'
48721 ],
48722 [
48723 'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
48724 'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'
48725 ],
48726 [
48727 'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
48728 'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'
48729 ],
48730 [
48731 '2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
48732 '4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'
48733 ],
48734 [
48735 '7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
48736 '91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'
48737 ],
48738 [
48739 '754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
48740 '673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'
48741 ],
48742 [
48743 'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
48744 '59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'
48745 ],
48746 [
48747 '186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
48748 '3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'
48749 ],
48750 [
48751 'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
48752 '55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'
48753 ],
48754 [
48755 '5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
48756 'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'
48757 ],
48758 [
48759 '290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
48760 'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'
48761 ],
48762 [
48763 'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
48764 'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'
48765 ],
48766 [
48767 '766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
48768 '744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'
48769 ],
48770 [
48771 '59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
48772 'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'
48773 ],
48774 [
48775 'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
48776 'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'
48777 ],
48778 [
48779 '7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
48780 '30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'
48781 ],
48782 [
48783 '948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
48784 'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'
48785 ],
48786 [
48787 '7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
48788 '100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'
48789 ],
48790 [
48791 '3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
48792 'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'
48793 ],
48794 [
48795 'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
48796 '8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'
48797 ],
48798 [
48799 '1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
48800 '68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'
48801 ],
48802 [
48803 '733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
48804 'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'
48805 ],
48806 [
48807 '15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
48808 'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'
48809 ],
48810 [
48811 'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
48812 'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'
48813 ],
48814 [
48815 'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
48816 'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'
48817 ],
48818 [
48819 '311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
48820 '66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'
48821 ],
48822 [
48823 '34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
48824 '9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'
48825 ],
48826 [
48827 'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
48828 '4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'
48829 ],
48830 [
48831 'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
48832 'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'
48833 ],
48834 [
48835 '32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
48836 '5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'
48837 ],
48838 [
48839 '7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
48840 '8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'
48841 ],
48842 [
48843 'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
48844 '8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'
48845 ],
48846 [
48847 '16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
48848 '5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'
48849 ],
48850 [
48851 'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
48852 'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'
48853 ],
48854 [
48855 '78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
48856 'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'
48857 ],
48858 [
48859 '494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
48860 '42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'
48861 ],
48862 [
48863 'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
48864 '204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'
48865 ],
48866 [
48867 'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
48868 '4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'
48869 ],
48870 [
48871 '841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
48872 '73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'
48873 ],
48874 [
48875 '5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
48876 '39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'
48877 ],
48878 [
48879 '36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
48880 'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'
48881 ],
48882 [
48883 '336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
48884 'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'
48885 ],
48886 [
48887 '8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
48888 '6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'
48889 ],
48890 [
48891 '1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
48892 '60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'
48893 ],
48894 [
48895 '85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
48896 '3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'
48897 ],
48898 [
48899 '29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
48900 'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'
48901 ],
48902 [
48903 'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
48904 'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'
48905 ],
48906 [
48907 '4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
48908 'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'
48909 ],
48910 [
48911 'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
48912 '6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'
48913 ],
48914 [
48915 'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
48916 '322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'
48917 ],
48918 [
48919 'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
48920 '6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'
48921 ],
48922 [
48923 'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
48924 '2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'
48925 ],
48926 [
48927 '591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
48928 'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'
48929 ],
48930 [
48931 '11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
48932 '998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'
48933 ],
48934 [
48935 '3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
48936 'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'
48937 ],
48938 [
48939 'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
48940 'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'
48941 ],
48942 [
48943 'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
48944 '6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'
48945 ],
48946 [
48947 'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
48948 'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'
48949 ],
48950 [
48951 'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
48952 '21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'
48953 ],
48954 [
48955 '347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
48956 '60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'
48957 ],
48958 [
48959 'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
48960 '49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'
48961 ],
48962 [
48963 'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
48964 '5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'
48965 ],
48966 [
48967 '4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
48968 '7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'
48969 ],
48970 [
48971 '3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
48972 'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'
48973 ],
48974 [
48975 'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
48976 '8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'
48977 ],
48978 [
48979 'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
48980 '39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'
48981 ],
48982 [
48983 'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
48984 '62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'
48985 ],
48986 [
48987 '48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
48988 '25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'
48989 ],
48990 [
48991 'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
48992 'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'
48993 ],
48994 [
48995 '6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
48996 'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'
48997 ],
48998 [
48999 'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
49000 'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'
49001 ],
49002 [
49003 'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
49004 '6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'
49005 ],
49006 [
49007 '13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
49008 'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'
49009 ],
49010 [
49011 'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
49012 '1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'
49013 ],
49014 [
49015 'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
49016 '5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'
49017 ],
49018 [
49019 'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
49020 '438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'
49021 ],
49022 [
49023 '8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
49024 'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'
49025 ],
49026 [
49027 '52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
49028 'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'
49029 ],
49030 [
49031 'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
49032 '6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'
49033 ],
49034 [
49035 '7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
49036 'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'
49037 ],
49038 [
49039 '5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
49040 '9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'
49041 ],
49042 [
49043 '32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
49044 'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'
49045 ],
49046 [
49047 'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
49048 'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'
49049 ],
49050 [
49051 '8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
49052 'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'
49053 ],
49054 [
49055 '4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
49056 '67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'
49057 ],
49058 [
49059 '3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
49060 'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'
49061 ],
49062 [
49063 '674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
49064 '299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'
49065 ],
49066 [
49067 'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
49068 'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'
49069 ],
49070 [
49071 '30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
49072 '462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'
49073 ],
49074 [
49075 'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
49076 '62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'
49077 ],
49078 [
49079 '93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
49080 '7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'
49081 ],
49082 [
49083 'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
49084 'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'
49085 ],
49086 [
49087 'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
49088 '4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'
49089 ],
49090 [
49091 'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
49092 'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'
49093 ],
49094 [
49095 '463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
49096 'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'
49097 ],
49098 [
49099 '7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
49100 '603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'
49101 ],
49102 [
49103 '74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
49104 'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'
49105 ],
49106 [
49107 '30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
49108 '553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'
49109 ],
49110 [
49111 '9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
49112 '712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'
49113 ],
49114 [
49115 '176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
49116 'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'
49117 ],
49118 [
49119 '75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
49120 '9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'
49121 ],
49122 [
49123 '809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
49124 '9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'
49125 ],
49126 [
49127 '1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
49128 '4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9'
49129 ]
49130 ]
49131 }
49132};
49133
49134
49135/***/ }),
49136
49137/***/ "./node_modules/elliptic/lib/elliptic/utils.js":
49138/*!*****************************************************!*\
49139 !*** ./node_modules/elliptic/lib/elliptic/utils.js ***!
49140 \*****************************************************/
49141/*! no static exports found */
49142/***/ (function(module, exports, __webpack_require__) {
49143
49144"use strict";
49145
49146
49147var utils = exports;
49148var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
49149var minAssert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
49150var minUtils = __webpack_require__(/*! minimalistic-crypto-utils */ "./node_modules/minimalistic-crypto-utils/lib/utils.js");
49151
49152utils.assert = minAssert;
49153utils.toArray = minUtils.toArray;
49154utils.zero2 = minUtils.zero2;
49155utils.toHex = minUtils.toHex;
49156utils.encode = minUtils.encode;
49157
49158// Represent num in a w-NAF form
49159function getNAF(num, w, bits) {
49160 var naf = new Array(Math.max(num.bitLength(), bits) + 1);
49161 naf.fill(0);
49162
49163 var ws = 1 << (w + 1);
49164 var k = num.clone();
49165
49166 for (var i = 0; i < naf.length; i++) {
49167 var z;
49168 var mod = k.andln(ws - 1);
49169 if (k.isOdd()) {
49170 if (mod > (ws >> 1) - 1)
49171 z = (ws >> 1) - mod;
49172 else
49173 z = mod;
49174 k.isubn(z);
49175 } else {
49176 z = 0;
49177 }
49178
49179 naf[i] = z;
49180 k.iushrn(1);
49181 }
49182
49183 return naf;
49184}
49185utils.getNAF = getNAF;
49186
49187// Represent k1, k2 in a Joint Sparse Form
49188function getJSF(k1, k2) {
49189 var jsf = [
49190 [],
49191 []
49192 ];
49193
49194 k1 = k1.clone();
49195 k2 = k2.clone();
49196 var d1 = 0;
49197 var d2 = 0;
49198 while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {
49199
49200 // First phase
49201 var m14 = (k1.andln(3) + d1) & 3;
49202 var m24 = (k2.andln(3) + d2) & 3;
49203 if (m14 === 3)
49204 m14 = -1;
49205 if (m24 === 3)
49206 m24 = -1;
49207 var u1;
49208 if ((m14 & 1) === 0) {
49209 u1 = 0;
49210 } else {
49211 var m8 = (k1.andln(7) + d1) & 7;
49212 if ((m8 === 3 || m8 === 5) && m24 === 2)
49213 u1 = -m14;
49214 else
49215 u1 = m14;
49216 }
49217 jsf[0].push(u1);
49218
49219 var u2;
49220 if ((m24 & 1) === 0) {
49221 u2 = 0;
49222 } else {
49223 var m8 = (k2.andln(7) + d2) & 7;
49224 if ((m8 === 3 || m8 === 5) && m14 === 2)
49225 u2 = -m24;
49226 else
49227 u2 = m24;
49228 }
49229 jsf[1].push(u2);
49230
49231 // Second phase
49232 if (2 * d1 === u1 + 1)
49233 d1 = 1 - d1;
49234 if (2 * d2 === u2 + 1)
49235 d2 = 1 - d2;
49236 k1.iushrn(1);
49237 k2.iushrn(1);
49238 }
49239
49240 return jsf;
49241}
49242utils.getJSF = getJSF;
49243
49244function cachedProperty(obj, name, computer) {
49245 var key = '_' + name;
49246 obj.prototype[name] = function cachedProperty() {
49247 return this[key] !== undefined ? this[key] :
49248 this[key] = computer.call(this);
49249 };
49250}
49251utils.cachedProperty = cachedProperty;
49252
49253function parseBytes(bytes) {
49254 return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
49255 bytes;
49256}
49257utils.parseBytes = parseBytes;
49258
49259function intFromLE(bytes) {
49260 return new BN(bytes, 'hex', 'le');
49261}
49262utils.intFromLE = intFromLE;
49263
49264
49265
49266/***/ }),
49267
49268/***/ "./node_modules/elliptic/package.json":
49269/*!********************************************!*\
49270 !*** ./node_modules/elliptic/package.json ***!
49271 \********************************************/
49272/*! exports provided: name, version, description, main, files, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, dependencies, default */
49273/***/ (function(module) {
49274
49275module.exports = JSON.parse("{\"name\":\"elliptic\",\"version\":\"6.5.2\",\"description\":\"EC cryptography\",\"main\":\"lib/elliptic.js\",\"files\":[\"lib\"],\"scripts\":{\"jscs\":\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",\"jshint\":\"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js\",\"lint\":\"npm run jscs && npm run jshint\",\"unit\":\"istanbul test _mocha --reporter=spec test/index.js\",\"test\":\"npm run lint && npm run unit\",\"version\":\"grunt dist && git add dist/\"},\"repository\":{\"type\":\"git\",\"url\":\"git@github.com:indutny/elliptic\"},\"keywords\":[\"EC\",\"Elliptic\",\"curve\",\"Cryptography\"],\"author\":\"Fedor Indutny <fedor@indutny.com>\",\"license\":\"MIT\",\"bugs\":{\"url\":\"https://github.com/indutny/elliptic/issues\"},\"homepage\":\"https://github.com/indutny/elliptic\",\"devDependencies\":{\"brfs\":\"^1.4.3\",\"coveralls\":\"^3.0.8\",\"grunt\":\"^1.0.4\",\"grunt-browserify\":\"^5.0.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-connect\":\"^1.0.0\",\"grunt-contrib-copy\":\"^1.0.0\",\"grunt-contrib-uglify\":\"^1.0.1\",\"grunt-mocha-istanbul\":\"^3.0.1\",\"grunt-saucelabs\":\"^9.0.1\",\"istanbul\":\"^0.4.2\",\"jscs\":\"^3.0.7\",\"jshint\":\"^2.10.3\",\"mocha\":\"^6.2.2\"},\"dependencies\":{\"bn.js\":\"^4.4.0\",\"brorand\":\"^1.0.1\",\"hash.js\":\"^1.0.0\",\"hmac-drbg\":\"^1.0.0\",\"inherits\":\"^2.0.1\",\"minimalistic-assert\":\"^1.0.0\",\"minimalistic-crypto-utils\":\"^1.0.0\"}}");
49276
49277/***/ }),
49278
49279/***/ "./node_modules/escaper/dist/escaper.js":
49280/*!**********************************************!*\
49281 !*** ./node_modules/escaper/dist/escaper.js ***!
49282 \**********************************************/
49283/*! no static exports found */
49284/***/ (function(module, exports, __webpack_require__) {
49285
49286/*!
49287 * Escaper v2.5.3
49288 * https://github.com/kobezzza/Escaper
49289 *
49290 * Released under the MIT license
49291 * https://github.com/kobezzza/Escaper/blob/master/LICENSE
49292 *
49293 * Date: Tue, 23 Jan 2018 15:58:45 GMT
49294 */
49295
49296(function (global, factory) {
49297 true ? factory(exports) :
49298 undefined;
49299}(this, (function (exports) { 'use strict';
49300
49301var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
49302 return typeof obj;
49303} : function (obj) {
49304 return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
49305};
49306
49307var Escaper = void 0;
49308var escaper = Escaper = {
49309 VERSION: [2, 5, 3],
49310 content: [],
49311 cache: {},
49312 snakeskinRgxp: null,
49313 symbols: null,
49314 replace: replace,
49315 paste: paste
49316};
49317
49318var stringLiterals = {
49319 '"': true,
49320 '\'': true,
49321 '`': true
49322};
49323
49324var literals = {
49325 '/': true
49326};
49327
49328for (var key in stringLiterals) {
49329 if (!stringLiterals.hasOwnProperty(key)) {
49330 break;
49331 }
49332
49333 literals[key] = true;
49334}
49335
49336var singleComments = {
49337 '//': true,
49338 '//*': true,
49339 '//!': true,
49340 '//#': true,
49341 '//@': true,
49342 '//$': true
49343};
49344
49345var multComments = {
49346 '/*': true,
49347 '/**': true,
49348 '/*!': true,
49349 '/*#': true,
49350 '/*@': true,
49351 '/*$': true
49352};
49353
49354var keyArr = [];
49355var finalMap = {};
49356
49357for (var _key in literals) {
49358 if (!literals.hasOwnProperty(_key)) {
49359 break;
49360 }
49361
49362 keyArr.push(_key);
49363 finalMap[_key] = true;
49364}
49365
49366for (var _key2 in singleComments) {
49367 if (!singleComments.hasOwnProperty(_key2)) {
49368 break;
49369 }
49370
49371 keyArr.push(_key2);
49372 finalMap[_key2] = true;
49373}
49374
49375for (var _key3 in multComments) {
49376 if (!multComments.hasOwnProperty(_key3)) {
49377 break;
49378 }
49379
49380 keyArr.push(_key3);
49381 finalMap[_key3] = true;
49382}
49383
49384var rgxpFlags = [];
49385var rgxpFlagsMap = {
49386 'g': true,
49387 'm': true,
49388 'i': true,
49389 'y': true,
49390 'u': true
49391};
49392
49393for (var _key4 in rgxpFlagsMap) {
49394 if (!rgxpFlagsMap.hasOwnProperty(_key4)) {
49395 break;
49396 }
49397
49398 rgxpFlags.push(_key4);
49399}
49400
49401var escapeEndMap = {
49402 '-': true,
49403 '+': true,
49404 '*': true,
49405 '%': true,
49406 '~': true,
49407 '>': true,
49408 '<': true,
49409 '^': true,
49410 ',': true,
49411 ';': true,
49412 '=': true,
49413 '|': true,
49414 '&': true,
49415 '!': true,
49416 '?': true,
49417 ':': true,
49418 '(': true,
49419 '{': true,
49420 '[': true
49421};
49422
49423var escapeEndWordMap = {
49424 'return': true,
49425 'yield': true,
49426 'await': true,
49427 'typeof': true,
49428 'void': true,
49429 'instanceof': true,
49430 'delete': true,
49431 'in': true,
49432 'new': true,
49433 'of': true
49434};
49435
49436/**
49437 * @param {!Object} obj
49438 * @param {!Object} p
49439 * @param {(boolean|number)} val
49440 */
49441function mix(obj, p, val) {
49442 for (var _key5 in obj) {
49443 if (!obj.hasOwnProperty(_key5)) {
49444 break;
49445 }
49446
49447 if (_key5 in p === false) {
49448 p[_key5] = val;
49449 }
49450 }
49451}
49452
49453var symbols = void 0;
49454var snakeskinRgxp = void 0;
49455
49456var uSRgxp = /[^\s/]/;
49457var wRgxp = /[a-z]/;
49458var sRgxp = /\s/;
49459var nRgxp = /[\r\n]/;
49460var posRgxp = /\${pos}/g;
49461
49462var objMap = {
49463 'object': true,
49464 'function': true
49465};
49466
49467/**
49468 * Replaces all found blocks ' ... ', " ... ", ` ... `, / ... /, // ..., /* ... *\/ to
49469 * __ESCAPER_QUOT__number_ in a string and returns a new string
49470 *
49471 * @param {string} str - source string
49472 * @param {(Object<string, boolean>|boolean)=} [opt_withCommentsOrParams=false] - parameters:
49473 *
49474 * (if a parameter value is set to -1, then all found matches will be removed from the final string,
49475 * or if the value will be set to true/false they will be included/excluded)
49476 *
49477 * *) @label - template for replacement, e.g. __ESCAPER_QUOT__${pos}_
49478 * *) @all - replaces all found matches
49479 * *) @comments - replaces all kinds of comments
49480 * *) @strings - replaces all kinds of string literals
49481 * *) @literals - replaces all kinds of string literals and regular expressions
49482 * *) `
49483 * *) '
49484 * *) "
49485 * *) /
49486 * *) //
49487 * *) //*
49488 * *) //!
49489 * *) //#
49490 * *) //@
49491 * *) //$
49492 * *) /*
49493 * *) /**
49494 * *) /*!
49495 * *) /*#
49496 * *) /*@
49497 * *) /*$
49498 *
49499 * OR if the value is boolean, then will be replaced all found comments (true) / literals (false)
49500 *
49501 * @param {Array=} [opt_content=Escaper.content] - array for matches
49502 * @param {?boolean=} [opt_snakeskin] - private parameter for using with Snakeskin
49503 * @return {string}
49504 */
49505function replace(str, opt_withCommentsOrParams, opt_content, opt_snakeskin) {
49506 symbols = symbols || Escaper.symbols || 'a-z';
49507 snakeskinRgxp = snakeskinRgxp || Escaper.snakeskinRgxp || new RegExp('[!$' + symbols + '_]', 'i');
49508
49509 var _Escaper = Escaper,
49510 cache = _Escaper.cache,
49511 content = _Escaper.content;
49512
49513
49514 var isObj = Boolean(opt_withCommentsOrParams && objMap[typeof opt_withCommentsOrParams === 'undefined' ? 'undefined' : _typeof(opt_withCommentsOrParams)]);
49515
49516 var p = isObj ? Object(opt_withCommentsOrParams) : {};
49517
49518 function mark(pos) {
49519 if (p['@label']) {
49520 return p['@label'].replace(posRgxp, pos);
49521 }
49522
49523 return '__ESCAPER_QUOT__' + pos + '_';
49524 }
49525
49526 var withComments = false;
49527 if (typeof opt_withCommentsOrParams === 'boolean') {
49528 withComments = Boolean(opt_withCommentsOrParams);
49529 }
49530
49531 if ('@comments' in p) {
49532 mix(multComments, p, p['@comments']);
49533 mix(singleComments, p, p['@comments']);
49534 delete p['@comments'];
49535 }
49536
49537 if ('@strings' in p) {
49538 mix(stringLiterals, p, p['@strings']);
49539 delete p['@strings'];
49540 }
49541
49542 if ('@literals' in p) {
49543 mix(literals, p, p['@literals']);
49544 delete p['@literals'];
49545 }
49546
49547 if ('@all' in p) {
49548 mix(finalMap, p, p['@all']);
49549 delete p['@all'];
49550 }
49551
49552 var cacheKey = '';
49553 for (var i = -1; ++i < keyArr.length;) {
49554 var el = keyArr[i];
49555
49556 if (multComments[el] || singleComments[el]) {
49557 p[el] = withComments || p[el];
49558 } else {
49559 p[el] = p[el] || !isObj;
49560 }
49561
49562 cacheKey += p[el] + ',';
49563 }
49564
49565 var initStr = str,
49566 stack = opt_content || content;
49567
49568 if (stack === content && cache[cacheKey] && cache[cacheKey][initStr]) {
49569 return cache[cacheKey][initStr];
49570 }
49571
49572 var begin = false,
49573 end = true;
49574
49575 var escape = false,
49576 comment = false;
49577
49578 var selectionStart = 0,
49579 block = false;
49580
49581 var templateVar = 0,
49582 filterStart = false;
49583
49584 var cut = void 0,
49585 label = void 0;
49586
49587 var part = '',
49588 rPart = '';
49589
49590 for (var _i = -1; ++_i < str.length;) {
49591 var _el = str.charAt(_i);
49592
49593 var next = str.charAt(_i + 1),
49594 word = str.substr(_i, 2),
49595 extWord = str.substr(_i, 3);
49596
49597 if (!comment) {
49598 if (!begin) {
49599 if (_el === '/') {
49600 if (singleComments[word] || multComments[word]) {
49601 if (singleComments[extWord] || multComments[extWord]) {
49602 comment = extWord;
49603 } else {
49604 comment = word;
49605 }
49606 }
49607
49608 if (comment) {
49609 selectionStart = _i;
49610 continue;
49611 }
49612 }
49613
49614 if (escapeEndMap[_el] || escapeEndWordMap[rPart]) {
49615 end = true;
49616 rPart = '';
49617 } else if (uSRgxp.test(_el)) {
49618 end = false;
49619 }
49620
49621 if (wRgxp.test(_el)) {
49622 part += _el;
49623 } else {
49624 rPart = part;
49625 part = '';
49626 }
49627
49628 var skip = false;
49629 if (opt_snakeskin) {
49630 if (_el === '|' && snakeskinRgxp.test(next)) {
49631 filterStart = true;
49632 end = false;
49633 skip = true;
49634 } else if (filterStart && sRgxp.test(_el)) {
49635 filterStart = false;
49636 end = true;
49637 skip = true;
49638 }
49639 }
49640
49641 if (!skip) {
49642 if (escapeEndMap[_el]) {
49643 end = true;
49644 } else if (uSRgxp.test(_el)) {
49645 end = false;
49646 }
49647 }
49648 }
49649
49650 // [] inside RegExp
49651 if (begin === '/' && !escape) {
49652 if (_el === '[') {
49653 block = true;
49654 } else if (_el === ']') {
49655 block = false;
49656 }
49657 }
49658
49659 if (!begin && templateVar) {
49660 if (_el === '}') {
49661 templateVar--;
49662 } else if (_el === '{') {
49663 templateVar++;
49664 }
49665
49666 if (!templateVar) {
49667 _el = '`';
49668 }
49669 }
49670
49671 if (begin === '`' && !escape && word === '${') {
49672 _el = '`';
49673 _i++;
49674 templateVar++;
49675 }
49676
49677 if (finalMap[_el] && (_el !== '/' || end) && !begin) {
49678 begin = _el;
49679 selectionStart = _i;
49680 } else if (begin && (_el === '\\' || escape)) {
49681 escape = !escape;
49682 } else if (finalMap[_el] && begin === _el && !escape && (begin !== '/' || !block)) {
49683 if (_el === '/') {
49684 for (var j = -1; ++j < rgxpFlags.length;) {
49685 if (rgxpFlagsMap[str.charAt(_i + 1)]) {
49686 _i++;
49687 }
49688 }
49689 }
49690
49691 begin = false;
49692 end = false;
49693
49694 if (p[_el]) {
49695 cut = str.substring(selectionStart, _i + 1);
49696
49697 if (p[_el] === -1) {
49698 label = '';
49699 } else {
49700 label = mark(stack.length);
49701 stack.push(cut);
49702 }
49703
49704 str = str.substring(0, selectionStart) + label + str.substring(_i + 1);
49705 _i += label.length - cut.length;
49706 }
49707 }
49708 } else if (nRgxp.test(next) && singleComments[comment] || multComments[_el + str.charAt(_i - 1)] && _i - selectionStart > 2 && multComments[comment]) {
49709 if (p[comment]) {
49710 cut = str.substring(selectionStart, _i + 1);
49711
49712 if (p[comment] === -1) {
49713 label = '';
49714 } else {
49715 label = mark(stack.length);
49716 stack.push(cut);
49717 }
49718
49719 str = str.substring(0, selectionStart) + label + str.substring(_i + 1);
49720 _i += label.length - cut.length;
49721 }
49722
49723 comment = false;
49724 }
49725 }
49726
49727 if (stack === content) {
49728 cache[cacheKey] = cache[cacheKey] || {};
49729 cache[cacheKey][initStr] = str;
49730 }
49731
49732 return str;
49733}
49734
49735var pasteRgxp = /__ESCAPER_QUOT__(\d+)_/g;
49736
49737/**
49738 * Replaces all found blocks __ESCAPER_QUOT__number_ to real content in a string
49739 * and returns a new string
49740 *
49741 * @param {string} str - source string
49742 * @param {Array=} [opt_content=Escaper.content] - array of matches
49743 * @param {RegExp=} [opt_rgxp] - RegExp for searching, e.g. /__ESCAPER_QUOT__(\d+)_/g
49744 * @return {string}
49745 */
49746function paste(str, opt_content, opt_rgxp) {
49747 return str.replace(opt_rgxp || pasteRgxp, function (str, pos) {
49748 return (opt_content || Escaper.content)[pos];
49749 });
49750}
49751
49752exports['default'] = escaper;
49753exports.replace = replace;
49754exports.paste = paste;
49755
49756Object.defineProperty(exports, '__esModule', { value: true });
49757
49758})));
49759
49760
49761/***/ }),
49762
49763/***/ "./node_modules/events/events.js":
49764/*!***************************************!*\
49765 !*** ./node_modules/events/events.js ***!
49766 \***************************************/
49767/*! no static exports found */
49768/***/ (function(module, exports, __webpack_require__) {
49769
49770"use strict";
49771// Copyright Joyent, Inc. and other Node contributors.
49772//
49773// Permission is hereby granted, free of charge, to any person obtaining a
49774// copy of this software and associated documentation files (the
49775// "Software"), to deal in the Software without restriction, including
49776// without limitation the rights to use, copy, modify, merge, publish,
49777// distribute, sublicense, and/or sell copies of the Software, and to permit
49778// persons to whom the Software is furnished to do so, subject to the
49779// following conditions:
49780//
49781// The above copyright notice and this permission notice shall be included
49782// in all copies or substantial portions of the Software.
49783//
49784// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
49785// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
49786// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
49787// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
49788// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
49789// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
49790// USE OR OTHER DEALINGS IN THE SOFTWARE.
49791
49792
49793
49794var R = typeof Reflect === 'object' ? Reflect : null
49795var ReflectApply = R && typeof R.apply === 'function'
49796 ? R.apply
49797 : function ReflectApply(target, receiver, args) {
49798 return Function.prototype.apply.call(target, receiver, args);
49799 }
49800
49801var ReflectOwnKeys
49802if (R && typeof R.ownKeys === 'function') {
49803 ReflectOwnKeys = R.ownKeys
49804} else if (Object.getOwnPropertySymbols) {
49805 ReflectOwnKeys = function ReflectOwnKeys(target) {
49806 return Object.getOwnPropertyNames(target)
49807 .concat(Object.getOwnPropertySymbols(target));
49808 };
49809} else {
49810 ReflectOwnKeys = function ReflectOwnKeys(target) {
49811 return Object.getOwnPropertyNames(target);
49812 };
49813}
49814
49815function ProcessEmitWarning(warning) {
49816 if (console && console.warn) console.warn(warning);
49817}
49818
49819var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
49820 return value !== value;
49821}
49822
49823function EventEmitter() {
49824 EventEmitter.init.call(this);
49825}
49826module.exports = EventEmitter;
49827
49828// Backwards-compat with node 0.10.x
49829EventEmitter.EventEmitter = EventEmitter;
49830
49831EventEmitter.prototype._events = undefined;
49832EventEmitter.prototype._eventsCount = 0;
49833EventEmitter.prototype._maxListeners = undefined;
49834
49835// By default EventEmitters will print a warning if more than 10 listeners are
49836// added to it. This is a useful default which helps finding memory leaks.
49837var defaultMaxListeners = 10;
49838
49839Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
49840 enumerable: true,
49841 get: function() {
49842 return defaultMaxListeners;
49843 },
49844 set: function(arg) {
49845 if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
49846 throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
49847 }
49848 defaultMaxListeners = arg;
49849 }
49850});
49851
49852EventEmitter.init = function() {
49853
49854 if (this._events === undefined ||
49855 this._events === Object.getPrototypeOf(this)._events) {
49856 this._events = Object.create(null);
49857 this._eventsCount = 0;
49858 }
49859
49860 this._maxListeners = this._maxListeners || undefined;
49861};
49862
49863// Obviously not all Emitters should be limited to 10. This function allows
49864// that to be increased. Set to zero for unlimited.
49865EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
49866 if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
49867 throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
49868 }
49869 this._maxListeners = n;
49870 return this;
49871};
49872
49873function $getMaxListeners(that) {
49874 if (that._maxListeners === undefined)
49875 return EventEmitter.defaultMaxListeners;
49876 return that._maxListeners;
49877}
49878
49879EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
49880 return $getMaxListeners(this);
49881};
49882
49883EventEmitter.prototype.emit = function emit(type) {
49884 var args = [];
49885 for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
49886 var doError = (type === 'error');
49887
49888 var events = this._events;
49889 if (events !== undefined)
49890 doError = (doError && events.error === undefined);
49891 else if (!doError)
49892 return false;
49893
49894 // If there is no 'error' event listener then throw.
49895 if (doError) {
49896 var er;
49897 if (args.length > 0)
49898 er = args[0];
49899 if (er instanceof Error) {
49900 // Note: The comments on the `throw` lines are intentional, they show
49901 // up in Node's output if this results in an unhandled exception.
49902 throw er; // Unhandled 'error' event
49903 }
49904 // At least give some kind of context to the user
49905 var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
49906 err.context = er;
49907 throw err; // Unhandled 'error' event
49908 }
49909
49910 var handler = events[type];
49911
49912 if (handler === undefined)
49913 return false;
49914
49915 if (typeof handler === 'function') {
49916 ReflectApply(handler, this, args);
49917 } else {
49918 var len = handler.length;
49919 var listeners = arrayClone(handler, len);
49920 for (var i = 0; i < len; ++i)
49921 ReflectApply(listeners[i], this, args);
49922 }
49923
49924 return true;
49925};
49926
49927function _addListener(target, type, listener, prepend) {
49928 var m;
49929 var events;
49930 var existing;
49931
49932 if (typeof listener !== 'function') {
49933 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
49934 }
49935
49936 events = target._events;
49937 if (events === undefined) {
49938 events = target._events = Object.create(null);
49939 target._eventsCount = 0;
49940 } else {
49941 // To avoid recursion in the case that type === "newListener"! Before
49942 // adding it to the listeners, first emit "newListener".
49943 if (events.newListener !== undefined) {
49944 target.emit('newListener', type,
49945 listener.listener ? listener.listener : listener);
49946
49947 // Re-assign `events` because a newListener handler could have caused the
49948 // this._events to be assigned to a new object
49949 events = target._events;
49950 }
49951 existing = events[type];
49952 }
49953
49954 if (existing === undefined) {
49955 // Optimize the case of one listener. Don't need the extra array object.
49956 existing = events[type] = listener;
49957 ++target._eventsCount;
49958 } else {
49959 if (typeof existing === 'function') {
49960 // Adding the second element, need to change to array.
49961 existing = events[type] =
49962 prepend ? [listener, existing] : [existing, listener];
49963 // If we've already got an array, just append.
49964 } else if (prepend) {
49965 existing.unshift(listener);
49966 } else {
49967 existing.push(listener);
49968 }
49969
49970 // Check for listener leak
49971 m = $getMaxListeners(target);
49972 if (m > 0 && existing.length > m && !existing.warned) {
49973 existing.warned = true;
49974 // No error code for this since it is a Warning
49975 // eslint-disable-next-line no-restricted-syntax
49976 var w = new Error('Possible EventEmitter memory leak detected. ' +
49977 existing.length + ' ' + String(type) + ' listeners ' +
49978 'added. Use emitter.setMaxListeners() to ' +
49979 'increase limit');
49980 w.name = 'MaxListenersExceededWarning';
49981 w.emitter = target;
49982 w.type = type;
49983 w.count = existing.length;
49984 ProcessEmitWarning(w);
49985 }
49986 }
49987
49988 return target;
49989}
49990
49991EventEmitter.prototype.addListener = function addListener(type, listener) {
49992 return _addListener(this, type, listener, false);
49993};
49994
49995EventEmitter.prototype.on = EventEmitter.prototype.addListener;
49996
49997EventEmitter.prototype.prependListener =
49998 function prependListener(type, listener) {
49999 return _addListener(this, type, listener, true);
50000 };
50001
50002function onceWrapper() {
50003 var args = [];
50004 for (var i = 0; i < arguments.length; i++) args.push(arguments[i]);
50005 if (!this.fired) {
50006 this.target.removeListener(this.type, this.wrapFn);
50007 this.fired = true;
50008 ReflectApply(this.listener, this.target, args);
50009 }
50010}
50011
50012function _onceWrap(target, type, listener) {
50013 var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
50014 var wrapped = onceWrapper.bind(state);
50015 wrapped.listener = listener;
50016 state.wrapFn = wrapped;
50017 return wrapped;
50018}
50019
50020EventEmitter.prototype.once = function once(type, listener) {
50021 if (typeof listener !== 'function') {
50022 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
50023 }
50024 this.on(type, _onceWrap(this, type, listener));
50025 return this;
50026};
50027
50028EventEmitter.prototype.prependOnceListener =
50029 function prependOnceListener(type, listener) {
50030 if (typeof listener !== 'function') {
50031 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
50032 }
50033 this.prependListener(type, _onceWrap(this, type, listener));
50034 return this;
50035 };
50036
50037// Emits a 'removeListener' event if and only if the listener was removed.
50038EventEmitter.prototype.removeListener =
50039 function removeListener(type, listener) {
50040 var list, events, position, i, originalListener;
50041
50042 if (typeof listener !== 'function') {
50043 throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
50044 }
50045
50046 events = this._events;
50047 if (events === undefined)
50048 return this;
50049
50050 list = events[type];
50051 if (list === undefined)
50052 return this;
50053
50054 if (list === listener || list.listener === listener) {
50055 if (--this._eventsCount === 0)
50056 this._events = Object.create(null);
50057 else {
50058 delete events[type];
50059 if (events.removeListener)
50060 this.emit('removeListener', type, list.listener || listener);
50061 }
50062 } else if (typeof list !== 'function') {
50063 position = -1;
50064
50065 for (i = list.length - 1; i >= 0; i--) {
50066 if (list[i] === listener || list[i].listener === listener) {
50067 originalListener = list[i].listener;
50068 position = i;
50069 break;
50070 }
50071 }
50072
50073 if (position < 0)
50074 return this;
50075
50076 if (position === 0)
50077 list.shift();
50078 else {
50079 spliceOne(list, position);
50080 }
50081
50082 if (list.length === 1)
50083 events[type] = list[0];
50084
50085 if (events.removeListener !== undefined)
50086 this.emit('removeListener', type, originalListener || listener);
50087 }
50088
50089 return this;
50090 };
50091
50092EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
50093
50094EventEmitter.prototype.removeAllListeners =
50095 function removeAllListeners(type) {
50096 var listeners, events, i;
50097
50098 events = this._events;
50099 if (events === undefined)
50100 return this;
50101
50102 // not listening for removeListener, no need to emit
50103 if (events.removeListener === undefined) {
50104 if (arguments.length === 0) {
50105 this._events = Object.create(null);
50106 this._eventsCount = 0;
50107 } else if (events[type] !== undefined) {
50108 if (--this._eventsCount === 0)
50109 this._events = Object.create(null);
50110 else
50111 delete events[type];
50112 }
50113 return this;
50114 }
50115
50116 // emit removeListener for all listeners on all events
50117 if (arguments.length === 0) {
50118 var keys = Object.keys(events);
50119 var key;
50120 for (i = 0; i < keys.length; ++i) {
50121 key = keys[i];
50122 if (key === 'removeListener') continue;
50123 this.removeAllListeners(key);
50124 }
50125 this.removeAllListeners('removeListener');
50126 this._events = Object.create(null);
50127 this._eventsCount = 0;
50128 return this;
50129 }
50130
50131 listeners = events[type];
50132
50133 if (typeof listeners === 'function') {
50134 this.removeListener(type, listeners);
50135 } else if (listeners !== undefined) {
50136 // LIFO order
50137 for (i = listeners.length - 1; i >= 0; i--) {
50138 this.removeListener(type, listeners[i]);
50139 }
50140 }
50141
50142 return this;
50143 };
50144
50145function _listeners(target, type, unwrap) {
50146 var events = target._events;
50147
50148 if (events === undefined)
50149 return [];
50150
50151 var evlistener = events[type];
50152 if (evlistener === undefined)
50153 return [];
50154
50155 if (typeof evlistener === 'function')
50156 return unwrap ? [evlistener.listener || evlistener] : [evlistener];
50157
50158 return unwrap ?
50159 unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
50160}
50161
50162EventEmitter.prototype.listeners = function listeners(type) {
50163 return _listeners(this, type, true);
50164};
50165
50166EventEmitter.prototype.rawListeners = function rawListeners(type) {
50167 return _listeners(this, type, false);
50168};
50169
50170EventEmitter.listenerCount = function(emitter, type) {
50171 if (typeof emitter.listenerCount === 'function') {
50172 return emitter.listenerCount(type);
50173 } else {
50174 return listenerCount.call(emitter, type);
50175 }
50176};
50177
50178EventEmitter.prototype.listenerCount = listenerCount;
50179function listenerCount(type) {
50180 var events = this._events;
50181
50182 if (events !== undefined) {
50183 var evlistener = events[type];
50184
50185 if (typeof evlistener === 'function') {
50186 return 1;
50187 } else if (evlistener !== undefined) {
50188 return evlistener.length;
50189 }
50190 }
50191
50192 return 0;
50193}
50194
50195EventEmitter.prototype.eventNames = function eventNames() {
50196 return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
50197};
50198
50199function arrayClone(arr, n) {
50200 var copy = new Array(n);
50201 for (var i = 0; i < n; ++i)
50202 copy[i] = arr[i];
50203 return copy;
50204}
50205
50206function spliceOne(list, index) {
50207 for (; index + 1 < list.length; index++)
50208 list[index] = list[index + 1];
50209 list.pop();
50210}
50211
50212function unwrapListeners(arr) {
50213 var ret = new Array(arr.length);
50214 for (var i = 0; i < ret.length; ++i) {
50215 ret[i] = arr[i].listener || arr[i];
50216 }
50217 return ret;
50218}
50219
50220
50221/***/ }),
50222
50223/***/ "./node_modules/evp_bytestokey/index.js":
50224/*!**********************************************!*\
50225 !*** ./node_modules/evp_bytestokey/index.js ***!
50226 \**********************************************/
50227/*! no static exports found */
50228/***/ (function(module, exports, __webpack_require__) {
50229
50230var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
50231var MD5 = __webpack_require__(/*! md5.js */ "./node_modules/md5.js/index.js")
50232
50233/* eslint-disable camelcase */
50234function EVP_BytesToKey (password, salt, keyBits, ivLen) {
50235 if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')
50236 if (salt) {
50237 if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')
50238 if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')
50239 }
50240
50241 var keyLen = keyBits / 8
50242 var key = Buffer.alloc(keyLen)
50243 var iv = Buffer.alloc(ivLen || 0)
50244 var tmp = Buffer.alloc(0)
50245
50246 while (keyLen > 0 || ivLen > 0) {
50247 var hash = new MD5()
50248 hash.update(tmp)
50249 hash.update(password)
50250 if (salt) hash.update(salt)
50251 tmp = hash.digest()
50252
50253 var used = 0
50254
50255 if (keyLen > 0) {
50256 var keyStart = key.length - keyLen
50257 used = Math.min(keyLen, tmp.length)
50258 tmp.copy(key, keyStart, 0, used)
50259 keyLen -= used
50260 }
50261
50262 if (used < tmp.length && ivLen > 0) {
50263 var ivStart = iv.length - ivLen
50264 var length = Math.min(ivLen, tmp.length - used)
50265 tmp.copy(iv, ivStart, used, used + length)
50266 ivLen -= length
50267 }
50268 }
50269
50270 tmp.fill(0)
50271 return { key: key, iv: iv }
50272}
50273
50274module.exports = EVP_BytesToKey
50275
50276
50277/***/ }),
50278
50279/***/ "./node_modules/graphlib/index.js":
50280/*!****************************************!*\
50281 !*** ./node_modules/graphlib/index.js ***!
50282 \****************************************/
50283/*! no static exports found */
50284/***/ (function(module, exports, __webpack_require__) {
50285
50286/**
50287 * Copyright (c) 2014, Chris Pettitt
50288 * All rights reserved.
50289 *
50290 * Redistribution and use in source and binary forms, with or without
50291 * modification, are permitted provided that the following conditions are met:
50292 *
50293 * 1. Redistributions of source code must retain the above copyright notice, this
50294 * list of conditions and the following disclaimer.
50295 *
50296 * 2. Redistributions in binary form must reproduce the above copyright notice,
50297 * this list of conditions and the following disclaimer in the documentation
50298 * and/or other materials provided with the distribution.
50299 *
50300 * 3. Neither the name of the copyright holder nor the names of its contributors
50301 * may be used to endorse or promote products derived from this software without
50302 * specific prior written permission.
50303 *
50304 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
50305 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50306 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50307 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
50308 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50309 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
50310 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
50311 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
50312 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50313 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
50314 */
50315
50316var lib = __webpack_require__(/*! ./lib */ "./node_modules/graphlib/lib/index.js");
50317
50318module.exports = {
50319 Graph: lib.Graph,
50320 json: __webpack_require__(/*! ./lib/json */ "./node_modules/graphlib/lib/json.js"),
50321 alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/graphlib/lib/alg/index.js"),
50322 version: lib.version
50323};
50324
50325
50326/***/ }),
50327
50328/***/ "./node_modules/graphlib/lib/alg/components.js":
50329/*!*****************************************************!*\
50330 !*** ./node_modules/graphlib/lib/alg/components.js ***!
50331 \*****************************************************/
50332/*! no static exports found */
50333/***/ (function(module, exports, __webpack_require__) {
50334
50335var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50336
50337module.exports = components;
50338
50339function components(g) {
50340 var visited = {};
50341 var cmpts = [];
50342 var cmpt;
50343
50344 function dfs(v) {
50345 if (_.has(visited, v)) return;
50346 visited[v] = true;
50347 cmpt.push(v);
50348 _.each(g.successors(v), dfs);
50349 _.each(g.predecessors(v), dfs);
50350 }
50351
50352 _.each(g.nodes(), function(v) {
50353 cmpt = [];
50354 dfs(v);
50355 if (cmpt.length) {
50356 cmpts.push(cmpt);
50357 }
50358 });
50359
50360 return cmpts;
50361}
50362
50363
50364/***/ }),
50365
50366/***/ "./node_modules/graphlib/lib/alg/dfs.js":
50367/*!**********************************************!*\
50368 !*** ./node_modules/graphlib/lib/alg/dfs.js ***!
50369 \**********************************************/
50370/*! no static exports found */
50371/***/ (function(module, exports, __webpack_require__) {
50372
50373var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50374
50375module.exports = dfs;
50376
50377/*
50378 * A helper that preforms a pre- or post-order traversal on the input graph
50379 * and returns the nodes in the order they were visited. If the graph is
50380 * undirected then this algorithm will navigate using neighbors. If the graph
50381 * is directed then this algorithm will navigate using successors.
50382 *
50383 * Order must be one of "pre" or "post".
50384 */
50385function dfs(g, vs, order) {
50386 if (!_.isArray(vs)) {
50387 vs = [vs];
50388 }
50389
50390 var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g);
50391
50392 var acc = [];
50393 var visited = {};
50394 _.each(vs, function(v) {
50395 if (!g.hasNode(v)) {
50396 throw new Error("Graph does not have node: " + v);
50397 }
50398
50399 doDfs(g, v, order === "post", visited, navigation, acc);
50400 });
50401 return acc;
50402}
50403
50404function doDfs(g, v, postorder, visited, navigation, acc) {
50405 if (!_.has(visited, v)) {
50406 visited[v] = true;
50407
50408 if (!postorder) { acc.push(v); }
50409 _.each(navigation(v), function(w) {
50410 doDfs(g, w, postorder, visited, navigation, acc);
50411 });
50412 if (postorder) { acc.push(v); }
50413 }
50414}
50415
50416
50417/***/ }),
50418
50419/***/ "./node_modules/graphlib/lib/alg/dijkstra-all.js":
50420/*!*******************************************************!*\
50421 !*** ./node_modules/graphlib/lib/alg/dijkstra-all.js ***!
50422 \*******************************************************/
50423/*! no static exports found */
50424/***/ (function(module, exports, __webpack_require__) {
50425
50426var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js");
50427var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50428
50429module.exports = dijkstraAll;
50430
50431function dijkstraAll(g, weightFunc, edgeFunc) {
50432 return _.transform(g.nodes(), function(acc, v) {
50433 acc[v] = dijkstra(g, v, weightFunc, edgeFunc);
50434 }, {});
50435}
50436
50437
50438/***/ }),
50439
50440/***/ "./node_modules/graphlib/lib/alg/dijkstra.js":
50441/*!***************************************************!*\
50442 !*** ./node_modules/graphlib/lib/alg/dijkstra.js ***!
50443 \***************************************************/
50444/*! no static exports found */
50445/***/ (function(module, exports, __webpack_require__) {
50446
50447var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50448var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js");
50449
50450module.exports = dijkstra;
50451
50452var DEFAULT_WEIGHT_FUNC = _.constant(1);
50453
50454function dijkstra(g, source, weightFn, edgeFn) {
50455 return runDijkstra(g, String(source),
50456 weightFn || DEFAULT_WEIGHT_FUNC,
50457 edgeFn || function(v) { return g.outEdges(v); });
50458}
50459
50460function runDijkstra(g, source, weightFn, edgeFn) {
50461 var results = {};
50462 var pq = new PriorityQueue();
50463 var v, vEntry;
50464
50465 var updateNeighbors = function(edge) {
50466 var w = edge.v !== v ? edge.v : edge.w;
50467 var wEntry = results[w];
50468 var weight = weightFn(edge);
50469 var distance = vEntry.distance + weight;
50470
50471 if (weight < 0) {
50472 throw new Error("dijkstra does not allow negative edge weights. " +
50473 "Bad edge: " + edge + " Weight: " + weight);
50474 }
50475
50476 if (distance < wEntry.distance) {
50477 wEntry.distance = distance;
50478 wEntry.predecessor = v;
50479 pq.decrease(w, distance);
50480 }
50481 };
50482
50483 g.nodes().forEach(function(v) {
50484 var distance = v === source ? 0 : Number.POSITIVE_INFINITY;
50485 results[v] = { distance: distance };
50486 pq.add(v, distance);
50487 });
50488
50489 while (pq.size() > 0) {
50490 v = pq.removeMin();
50491 vEntry = results[v];
50492 if (vEntry.distance === Number.POSITIVE_INFINITY) {
50493 break;
50494 }
50495
50496 edgeFn(v).forEach(updateNeighbors);
50497 }
50498
50499 return results;
50500}
50501
50502
50503/***/ }),
50504
50505/***/ "./node_modules/graphlib/lib/alg/find-cycles.js":
50506/*!******************************************************!*\
50507 !*** ./node_modules/graphlib/lib/alg/find-cycles.js ***!
50508 \******************************************************/
50509/*! no static exports found */
50510/***/ (function(module, exports, __webpack_require__) {
50511
50512var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50513var tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js");
50514
50515module.exports = findCycles;
50516
50517function findCycles(g) {
50518 return _.filter(tarjan(g), function(cmpt) {
50519 return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0]));
50520 });
50521}
50522
50523
50524/***/ }),
50525
50526/***/ "./node_modules/graphlib/lib/alg/floyd-warshall.js":
50527/*!*********************************************************!*\
50528 !*** ./node_modules/graphlib/lib/alg/floyd-warshall.js ***!
50529 \*********************************************************/
50530/*! no static exports found */
50531/***/ (function(module, exports, __webpack_require__) {
50532
50533var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50534
50535module.exports = floydWarshall;
50536
50537var DEFAULT_WEIGHT_FUNC = _.constant(1);
50538
50539function floydWarshall(g, weightFn, edgeFn) {
50540 return runFloydWarshall(g,
50541 weightFn || DEFAULT_WEIGHT_FUNC,
50542 edgeFn || function(v) { return g.outEdges(v); });
50543}
50544
50545function runFloydWarshall(g, weightFn, edgeFn) {
50546 var results = {};
50547 var nodes = g.nodes();
50548
50549 nodes.forEach(function(v) {
50550 results[v] = {};
50551 results[v][v] = { distance: 0 };
50552 nodes.forEach(function(w) {
50553 if (v !== w) {
50554 results[v][w] = { distance: Number.POSITIVE_INFINITY };
50555 }
50556 });
50557 edgeFn(v).forEach(function(edge) {
50558 var w = edge.v === v ? edge.w : edge.v;
50559 var d = weightFn(edge);
50560 results[v][w] = { distance: d, predecessor: v };
50561 });
50562 });
50563
50564 nodes.forEach(function(k) {
50565 var rowK = results[k];
50566 nodes.forEach(function(i) {
50567 var rowI = results[i];
50568 nodes.forEach(function(j) {
50569 var ik = rowI[k];
50570 var kj = rowK[j];
50571 var ij = rowI[j];
50572 var altDistance = ik.distance + kj.distance;
50573 if (altDistance < ij.distance) {
50574 ij.distance = altDistance;
50575 ij.predecessor = kj.predecessor;
50576 }
50577 });
50578 });
50579 });
50580
50581 return results;
50582}
50583
50584
50585/***/ }),
50586
50587/***/ "./node_modules/graphlib/lib/alg/index.js":
50588/*!************************************************!*\
50589 !*** ./node_modules/graphlib/lib/alg/index.js ***!
50590 \************************************************/
50591/*! no static exports found */
50592/***/ (function(module, exports, __webpack_require__) {
50593
50594module.exports = {
50595 components: __webpack_require__(/*! ./components */ "./node_modules/graphlib/lib/alg/components.js"),
50596 dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"),
50597 dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/graphlib/lib/alg/dijkstra-all.js"),
50598 findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/graphlib/lib/alg/find-cycles.js"),
50599 floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/graphlib/lib/alg/floyd-warshall.js"),
50600 isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/graphlib/lib/alg/is-acyclic.js"),
50601 postorder: __webpack_require__(/*! ./postorder */ "./node_modules/graphlib/lib/alg/postorder.js"),
50602 preorder: __webpack_require__(/*! ./preorder */ "./node_modules/graphlib/lib/alg/preorder.js"),
50603 prim: __webpack_require__(/*! ./prim */ "./node_modules/graphlib/lib/alg/prim.js"),
50604 tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"),
50605 topsort: __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js")
50606};
50607
50608
50609/***/ }),
50610
50611/***/ "./node_modules/graphlib/lib/alg/is-acyclic.js":
50612/*!*****************************************************!*\
50613 !*** ./node_modules/graphlib/lib/alg/is-acyclic.js ***!
50614 \*****************************************************/
50615/*! no static exports found */
50616/***/ (function(module, exports, __webpack_require__) {
50617
50618var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js");
50619
50620module.exports = isAcyclic;
50621
50622function isAcyclic(g) {
50623 try {
50624 topsort(g);
50625 } catch (e) {
50626 if (e instanceof topsort.CycleException) {
50627 return false;
50628 }
50629 throw e;
50630 }
50631 return true;
50632}
50633
50634
50635/***/ }),
50636
50637/***/ "./node_modules/graphlib/lib/alg/postorder.js":
50638/*!****************************************************!*\
50639 !*** ./node_modules/graphlib/lib/alg/postorder.js ***!
50640 \****************************************************/
50641/*! no static exports found */
50642/***/ (function(module, exports, __webpack_require__) {
50643
50644var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js");
50645
50646module.exports = postorder;
50647
50648function postorder(g, vs) {
50649 return dfs(g, vs, "post");
50650}
50651
50652
50653/***/ }),
50654
50655/***/ "./node_modules/graphlib/lib/alg/preorder.js":
50656/*!***************************************************!*\
50657 !*** ./node_modules/graphlib/lib/alg/preorder.js ***!
50658 \***************************************************/
50659/*! no static exports found */
50660/***/ (function(module, exports, __webpack_require__) {
50661
50662var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js");
50663
50664module.exports = preorder;
50665
50666function preorder(g, vs) {
50667 return dfs(g, vs, "pre");
50668}
50669
50670
50671/***/ }),
50672
50673/***/ "./node_modules/graphlib/lib/alg/prim.js":
50674/*!***********************************************!*\
50675 !*** ./node_modules/graphlib/lib/alg/prim.js ***!
50676 \***********************************************/
50677/*! no static exports found */
50678/***/ (function(module, exports, __webpack_require__) {
50679
50680var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50681var Graph = __webpack_require__(/*! ../graph */ "./node_modules/graphlib/lib/graph.js");
50682var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js");
50683
50684module.exports = prim;
50685
50686function prim(g, weightFunc) {
50687 var result = new Graph();
50688 var parents = {};
50689 var pq = new PriorityQueue();
50690 var v;
50691
50692 function updateNeighbors(edge) {
50693 var w = edge.v === v ? edge.w : edge.v;
50694 var pri = pq.priority(w);
50695 if (pri !== undefined) {
50696 var edgeWeight = weightFunc(edge);
50697 if (edgeWeight < pri) {
50698 parents[w] = v;
50699 pq.decrease(w, edgeWeight);
50700 }
50701 }
50702 }
50703
50704 if (g.nodeCount() === 0) {
50705 return result;
50706 }
50707
50708 _.each(g.nodes(), function(v) {
50709 pq.add(v, Number.POSITIVE_INFINITY);
50710 result.setNode(v);
50711 });
50712
50713 // Start from an arbitrary node
50714 pq.decrease(g.nodes()[0], 0);
50715
50716 var init = false;
50717 while (pq.size() > 0) {
50718 v = pq.removeMin();
50719 if (_.has(parents, v)) {
50720 result.setEdge(v, parents[v]);
50721 } else if (init) {
50722 throw new Error("Input graph is not connected: " + g);
50723 } else {
50724 init = true;
50725 }
50726
50727 g.nodeEdges(v).forEach(updateNeighbors);
50728 }
50729
50730 return result;
50731}
50732
50733
50734/***/ }),
50735
50736/***/ "./node_modules/graphlib/lib/alg/tarjan.js":
50737/*!*************************************************!*\
50738 !*** ./node_modules/graphlib/lib/alg/tarjan.js ***!
50739 \*************************************************/
50740/*! no static exports found */
50741/***/ (function(module, exports, __webpack_require__) {
50742
50743var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50744
50745module.exports = tarjan;
50746
50747function tarjan(g) {
50748 var index = 0;
50749 var stack = [];
50750 var visited = {}; // node id -> { onStack, lowlink, index }
50751 var results = [];
50752
50753 function dfs(v) {
50754 var entry = visited[v] = {
50755 onStack: true,
50756 lowlink: index,
50757 index: index++
50758 };
50759 stack.push(v);
50760
50761 g.successors(v).forEach(function(w) {
50762 if (!_.has(visited, w)) {
50763 dfs(w);
50764 entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink);
50765 } else if (visited[w].onStack) {
50766 entry.lowlink = Math.min(entry.lowlink, visited[w].index);
50767 }
50768 });
50769
50770 if (entry.lowlink === entry.index) {
50771 var cmpt = [];
50772 var w;
50773 do {
50774 w = stack.pop();
50775 visited[w].onStack = false;
50776 cmpt.push(w);
50777 } while (v !== w);
50778 results.push(cmpt);
50779 }
50780 }
50781
50782 g.nodes().forEach(function(v) {
50783 if (!_.has(visited, v)) {
50784 dfs(v);
50785 }
50786 });
50787
50788 return results;
50789}
50790
50791
50792/***/ }),
50793
50794/***/ "./node_modules/graphlib/lib/alg/topsort.js":
50795/*!**************************************************!*\
50796 !*** ./node_modules/graphlib/lib/alg/topsort.js ***!
50797 \**************************************************/
50798/*! no static exports found */
50799/***/ (function(module, exports, __webpack_require__) {
50800
50801var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50802
50803module.exports = topsort;
50804topsort.CycleException = CycleException;
50805
50806function topsort(g) {
50807 var visited = {};
50808 var stack = {};
50809 var results = [];
50810
50811 function visit(node) {
50812 if (_.has(stack, node)) {
50813 throw new CycleException();
50814 }
50815
50816 if (!_.has(visited, node)) {
50817 stack[node] = true;
50818 visited[node] = true;
50819 _.each(g.predecessors(node), visit);
50820 delete stack[node];
50821 results.push(node);
50822 }
50823 }
50824
50825 _.each(g.sinks(), visit);
50826
50827 if (_.size(visited) !== g.nodeCount()) {
50828 throw new CycleException();
50829 }
50830
50831 return results;
50832}
50833
50834function CycleException() {}
50835CycleException.prototype = new Error(); // must be an instance of Error to pass testing
50836
50837/***/ }),
50838
50839/***/ "./node_modules/graphlib/lib/data/priority-queue.js":
50840/*!**********************************************************!*\
50841 !*** ./node_modules/graphlib/lib/data/priority-queue.js ***!
50842 \**********************************************************/
50843/*! no static exports found */
50844/***/ (function(module, exports, __webpack_require__) {
50845
50846var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js");
50847
50848module.exports = PriorityQueue;
50849
50850/**
50851 * A min-priority queue data structure. This algorithm is derived from Cormen,
50852 * et al., "Introduction to Algorithms". The basic idea of a min-priority
50853 * queue is that you can efficiently (in O(1) time) get the smallest key in
50854 * the queue. Adding and removing elements takes O(log n) time. A key can
50855 * have its priority decreased in O(log n) time.
50856 */
50857function PriorityQueue() {
50858 this._arr = [];
50859 this._keyIndices = {};
50860}
50861
50862/**
50863 * Returns the number of elements in the queue. Takes `O(1)` time.
50864 */
50865PriorityQueue.prototype.size = function() {
50866 return this._arr.length;
50867};
50868
50869/**
50870 * Returns the keys that are in the queue. Takes `O(n)` time.
50871 */
50872PriorityQueue.prototype.keys = function() {
50873 return this._arr.map(function(x) { return x.key; });
50874};
50875
50876/**
50877 * Returns `true` if **key** is in the queue and `false` if not.
50878 */
50879PriorityQueue.prototype.has = function(key) {
50880 return _.has(this._keyIndices, key);
50881};
50882
50883/**
50884 * Returns the priority for **key**. If **key** is not present in the queue
50885 * then this function returns `undefined`. Takes `O(1)` time.
50886 *
50887 * @param {Object} key
50888 */
50889PriorityQueue.prototype.priority = function(key) {
50890 var index = this._keyIndices[key];
50891 if (index !== undefined) {
50892 return this._arr[index].priority;
50893 }
50894};
50895
50896/**
50897 * Returns the key for the minimum element in this queue. If the queue is
50898 * empty this function throws an Error. Takes `O(1)` time.
50899 */
50900PriorityQueue.prototype.min = function() {
50901 if (this.size() === 0) {
50902 throw new Error("Queue underflow");
50903 }
50904 return this._arr[0].key;
50905};
50906
50907/**
50908 * Inserts a new key into the priority queue. If the key already exists in
50909 * the queue this function returns `false`; otherwise it will return `true`.
50910 * Takes `O(n)` time.
50911 *
50912 * @param {Object} key the key to add
50913 * @param {Number} priority the initial priority for the key
50914 */
50915PriorityQueue.prototype.add = function(key, priority) {
50916 var keyIndices = this._keyIndices;
50917 key = String(key);
50918 if (!_.has(keyIndices, key)) {
50919 var arr = this._arr;
50920 var index = arr.length;
50921 keyIndices[key] = index;
50922 arr.push({key: key, priority: priority});
50923 this._decrease(index);
50924 return true;
50925 }
50926 return false;
50927};
50928
50929/**
50930 * Removes and returns the smallest key in the queue. Takes `O(log n)` time.
50931 */
50932PriorityQueue.prototype.removeMin = function() {
50933 this._swap(0, this._arr.length - 1);
50934 var min = this._arr.pop();
50935 delete this._keyIndices[min.key];
50936 this._heapify(0);
50937 return min.key;
50938};
50939
50940/**
50941 * Decreases the priority for **key** to **priority**. If the new priority is
50942 * greater than the previous priority, this function will throw an Error.
50943 *
50944 * @param {Object} key the key for which to raise priority
50945 * @param {Number} priority the new priority for the key
50946 */
50947PriorityQueue.prototype.decrease = function(key, priority) {
50948 var index = this._keyIndices[key];
50949 if (priority > this._arr[index].priority) {
50950 throw new Error("New priority is greater than current priority. " +
50951 "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority);
50952 }
50953 this._arr[index].priority = priority;
50954 this._decrease(index);
50955};
50956
50957PriorityQueue.prototype._heapify = function(i) {
50958 var arr = this._arr;
50959 var l = 2 * i;
50960 var r = l + 1;
50961 var largest = i;
50962 if (l < arr.length) {
50963 largest = arr[l].priority < arr[largest].priority ? l : largest;
50964 if (r < arr.length) {
50965 largest = arr[r].priority < arr[largest].priority ? r : largest;
50966 }
50967 if (largest !== i) {
50968 this._swap(i, largest);
50969 this._heapify(largest);
50970 }
50971 }
50972};
50973
50974PriorityQueue.prototype._decrease = function(index) {
50975 var arr = this._arr;
50976 var priority = arr[index].priority;
50977 var parent;
50978 while (index !== 0) {
50979 parent = index >> 1;
50980 if (arr[parent].priority < priority) {
50981 break;
50982 }
50983 this._swap(index, parent);
50984 index = parent;
50985 }
50986};
50987
50988PriorityQueue.prototype._swap = function(i, j) {
50989 var arr = this._arr;
50990 var keyIndices = this._keyIndices;
50991 var origArrI = arr[i];
50992 var origArrJ = arr[j];
50993 arr[i] = origArrJ;
50994 arr[j] = origArrI;
50995 keyIndices[origArrJ.key] = i;
50996 keyIndices[origArrI.key] = j;
50997};
50998
50999
51000/***/ }),
51001
51002/***/ "./node_modules/graphlib/lib/graph.js":
51003/*!********************************************!*\
51004 !*** ./node_modules/graphlib/lib/graph.js ***!
51005 \********************************************/
51006/*! no static exports found */
51007/***/ (function(module, exports, __webpack_require__) {
51008
51009"use strict";
51010
51011
51012var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js");
51013
51014module.exports = Graph;
51015
51016var DEFAULT_EDGE_NAME = "\x00";
51017var GRAPH_NODE = "\x00";
51018var EDGE_KEY_DELIM = "\x01";
51019
51020// Implementation notes:
51021//
51022// * Node id query functions should return string ids for the nodes
51023// * Edge id query functions should return an "edgeObj", edge object, that is
51024// composed of enough information to uniquely identify an edge: {v, w, name}.
51025// * Internally we use an "edgeId", a stringified form of the edgeObj, to
51026// reference edges. This is because we need a performant way to look these
51027// edges up and, object properties, which have string keys, are the closest
51028// we're going to get to a performant hashtable in JavaScript.
51029
51030function Graph(opts) {
51031 this._isDirected = _.has(opts, "directed") ? opts.directed : true;
51032 this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false;
51033 this._isCompound = _.has(opts, "compound") ? opts.compound : false;
51034
51035 // Label for the graph itself
51036 this._label = undefined;
51037
51038 // Defaults to be set when creating a new node
51039 this._defaultNodeLabelFn = _.constant(undefined);
51040
51041 // Defaults to be set when creating a new edge
51042 this._defaultEdgeLabelFn = _.constant(undefined);
51043
51044 // v -> label
51045 this._nodes = {};
51046
51047 if (this._isCompound) {
51048 // v -> parent
51049 this._parent = {};
51050
51051 // v -> children
51052 this._children = {};
51053 this._children[GRAPH_NODE] = {};
51054 }
51055
51056 // v -> edgeObj
51057 this._in = {};
51058
51059 // u -> v -> Number
51060 this._preds = {};
51061
51062 // v -> edgeObj
51063 this._out = {};
51064
51065 // v -> w -> Number
51066 this._sucs = {};
51067
51068 // e -> edgeObj
51069 this._edgeObjs = {};
51070
51071 // e -> label
51072 this._edgeLabels = {};
51073}
51074
51075/* Number of nodes in the graph. Should only be changed by the implementation. */
51076Graph.prototype._nodeCount = 0;
51077
51078/* Number of edges in the graph. Should only be changed by the implementation. */
51079Graph.prototype._edgeCount = 0;
51080
51081
51082/* === Graph functions ========= */
51083
51084Graph.prototype.isDirected = function() {
51085 return this._isDirected;
51086};
51087
51088Graph.prototype.isMultigraph = function() {
51089 return this._isMultigraph;
51090};
51091
51092Graph.prototype.isCompound = function() {
51093 return this._isCompound;
51094};
51095
51096Graph.prototype.setGraph = function(label) {
51097 this._label = label;
51098 return this;
51099};
51100
51101Graph.prototype.graph = function() {
51102 return this._label;
51103};
51104
51105
51106/* === Node functions ========== */
51107
51108Graph.prototype.setDefaultNodeLabel = function(newDefault) {
51109 if (!_.isFunction(newDefault)) {
51110 newDefault = _.constant(newDefault);
51111 }
51112 this._defaultNodeLabelFn = newDefault;
51113 return this;
51114};
51115
51116Graph.prototype.nodeCount = function() {
51117 return this._nodeCount;
51118};
51119
51120Graph.prototype.nodes = function() {
51121 return _.keys(this._nodes);
51122};
51123
51124Graph.prototype.sources = function() {
51125 var self = this;
51126 return _.filter(this.nodes(), function(v) {
51127 return _.isEmpty(self._in[v]);
51128 });
51129};
51130
51131Graph.prototype.sinks = function() {
51132 var self = this;
51133 return _.filter(this.nodes(), function(v) {
51134 return _.isEmpty(self._out[v]);
51135 });
51136};
51137
51138Graph.prototype.setNodes = function(vs, value) {
51139 var args = arguments;
51140 var self = this;
51141 _.each(vs, function(v) {
51142 if (args.length > 1) {
51143 self.setNode(v, value);
51144 } else {
51145 self.setNode(v);
51146 }
51147 });
51148 return this;
51149};
51150
51151Graph.prototype.setNode = function(v, value) {
51152 if (_.has(this._nodes, v)) {
51153 if (arguments.length > 1) {
51154 this._nodes[v] = value;
51155 }
51156 return this;
51157 }
51158
51159 this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v);
51160 if (this._isCompound) {
51161 this._parent[v] = GRAPH_NODE;
51162 this._children[v] = {};
51163 this._children[GRAPH_NODE][v] = true;
51164 }
51165 this._in[v] = {};
51166 this._preds[v] = {};
51167 this._out[v] = {};
51168 this._sucs[v] = {};
51169 ++this._nodeCount;
51170 return this;
51171};
51172
51173Graph.prototype.node = function(v) {
51174 return this._nodes[v];
51175};
51176
51177Graph.prototype.hasNode = function(v) {
51178 return _.has(this._nodes, v);
51179};
51180
51181Graph.prototype.removeNode = function(v) {
51182 var self = this;
51183 if (_.has(this._nodes, v)) {
51184 var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); };
51185 delete this._nodes[v];
51186 if (this._isCompound) {
51187 this._removeFromParentsChildList(v);
51188 delete this._parent[v];
51189 _.each(this.children(v), function(child) {
51190 self.setParent(child);
51191 });
51192 delete this._children[v];
51193 }
51194 _.each(_.keys(this._in[v]), removeEdge);
51195 delete this._in[v];
51196 delete this._preds[v];
51197 _.each(_.keys(this._out[v]), removeEdge);
51198 delete this._out[v];
51199 delete this._sucs[v];
51200 --this._nodeCount;
51201 }
51202 return this;
51203};
51204
51205Graph.prototype.setParent = function(v, parent) {
51206 if (!this._isCompound) {
51207 throw new Error("Cannot set parent in a non-compound graph");
51208 }
51209
51210 if (_.isUndefined(parent)) {
51211 parent = GRAPH_NODE;
51212 } else {
51213 // Coerce parent to string
51214 parent += "";
51215 for (var ancestor = parent;
51216 !_.isUndefined(ancestor);
51217 ancestor = this.parent(ancestor)) {
51218 if (ancestor === v) {
51219 throw new Error("Setting " + parent+ " as parent of " + v +
51220 " would create a cycle");
51221 }
51222 }
51223
51224 this.setNode(parent);
51225 }
51226
51227 this.setNode(v);
51228 this._removeFromParentsChildList(v);
51229 this._parent[v] = parent;
51230 this._children[parent][v] = true;
51231 return this;
51232};
51233
51234Graph.prototype._removeFromParentsChildList = function(v) {
51235 delete this._children[this._parent[v]][v];
51236};
51237
51238Graph.prototype.parent = function(v) {
51239 if (this._isCompound) {
51240 var parent = this._parent[v];
51241 if (parent !== GRAPH_NODE) {
51242 return parent;
51243 }
51244 }
51245};
51246
51247Graph.prototype.children = function(v) {
51248 if (_.isUndefined(v)) {
51249 v = GRAPH_NODE;
51250 }
51251
51252 if (this._isCompound) {
51253 var children = this._children[v];
51254 if (children) {
51255 return _.keys(children);
51256 }
51257 } else if (v === GRAPH_NODE) {
51258 return this.nodes();
51259 } else if (this.hasNode(v)) {
51260 return [];
51261 }
51262};
51263
51264Graph.prototype.predecessors = function(v) {
51265 var predsV = this._preds[v];
51266 if (predsV) {
51267 return _.keys(predsV);
51268 }
51269};
51270
51271Graph.prototype.successors = function(v) {
51272 var sucsV = this._sucs[v];
51273 if (sucsV) {
51274 return _.keys(sucsV);
51275 }
51276};
51277
51278Graph.prototype.neighbors = function(v) {
51279 var preds = this.predecessors(v);
51280 if (preds) {
51281 return _.union(preds, this.successors(v));
51282 }
51283};
51284
51285Graph.prototype.isLeaf = function (v) {
51286 var neighbors;
51287 if (this.isDirected()) {
51288 neighbors = this.successors(v);
51289 } else {
51290 neighbors = this.neighbors(v);
51291 }
51292 return neighbors.length === 0;
51293};
51294
51295Graph.prototype.filterNodes = function(filter) {
51296 var copy = new this.constructor({
51297 directed: this._isDirected,
51298 multigraph: this._isMultigraph,
51299 compound: this._isCompound
51300 });
51301
51302 copy.setGraph(this.graph());
51303
51304 var self = this;
51305 _.each(this._nodes, function(value, v) {
51306 if (filter(v)) {
51307 copy.setNode(v, value);
51308 }
51309 });
51310
51311 _.each(this._edgeObjs, function(e) {
51312 if (copy.hasNode(e.v) && copy.hasNode(e.w)) {
51313 copy.setEdge(e, self.edge(e));
51314 }
51315 });
51316
51317 var parents = {};
51318 function findParent(v) {
51319 var parent = self.parent(v);
51320 if (parent === undefined || copy.hasNode(parent)) {
51321 parents[v] = parent;
51322 return parent;
51323 } else if (parent in parents) {
51324 return parents[parent];
51325 } else {
51326 return findParent(parent);
51327 }
51328 }
51329
51330 if (this._isCompound) {
51331 _.each(copy.nodes(), function(v) {
51332 copy.setParent(v, findParent(v));
51333 });
51334 }
51335
51336 return copy;
51337};
51338
51339/* === Edge functions ========== */
51340
51341Graph.prototype.setDefaultEdgeLabel = function(newDefault) {
51342 if (!_.isFunction(newDefault)) {
51343 newDefault = _.constant(newDefault);
51344 }
51345 this._defaultEdgeLabelFn = newDefault;
51346 return this;
51347};
51348
51349Graph.prototype.edgeCount = function() {
51350 return this._edgeCount;
51351};
51352
51353Graph.prototype.edges = function() {
51354 return _.values(this._edgeObjs);
51355};
51356
51357Graph.prototype.setPath = function(vs, value) {
51358 var self = this;
51359 var args = arguments;
51360 _.reduce(vs, function(v, w) {
51361 if (args.length > 1) {
51362 self.setEdge(v, w, value);
51363 } else {
51364 self.setEdge(v, w);
51365 }
51366 return w;
51367 });
51368 return this;
51369};
51370
51371/*
51372 * setEdge(v, w, [value, [name]])
51373 * setEdge({ v, w, [name] }, [value])
51374 */
51375Graph.prototype.setEdge = function() {
51376 var v, w, name, value;
51377 var valueSpecified = false;
51378 var arg0 = arguments[0];
51379
51380 if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) {
51381 v = arg0.v;
51382 w = arg0.w;
51383 name = arg0.name;
51384 if (arguments.length === 2) {
51385 value = arguments[1];
51386 valueSpecified = true;
51387 }
51388 } else {
51389 v = arg0;
51390 w = arguments[1];
51391 name = arguments[3];
51392 if (arguments.length > 2) {
51393 value = arguments[2];
51394 valueSpecified = true;
51395 }
51396 }
51397
51398 v = "" + v;
51399 w = "" + w;
51400 if (!_.isUndefined(name)) {
51401 name = "" + name;
51402 }
51403
51404 var e = edgeArgsToId(this._isDirected, v, w, name);
51405 if (_.has(this._edgeLabels, e)) {
51406 if (valueSpecified) {
51407 this._edgeLabels[e] = value;
51408 }
51409 return this;
51410 }
51411
51412 if (!_.isUndefined(name) && !this._isMultigraph) {
51413 throw new Error("Cannot set a named edge when isMultigraph = false");
51414 }
51415
51416 // It didn't exist, so we need to create it.
51417 // First ensure the nodes exist.
51418 this.setNode(v);
51419 this.setNode(w);
51420
51421 this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name);
51422
51423 var edgeObj = edgeArgsToObj(this._isDirected, v, w, name);
51424 // Ensure we add undirected edges in a consistent way.
51425 v = edgeObj.v;
51426 w = edgeObj.w;
51427
51428 Object.freeze(edgeObj);
51429 this._edgeObjs[e] = edgeObj;
51430 incrementOrInitEntry(this._preds[w], v);
51431 incrementOrInitEntry(this._sucs[v], w);
51432 this._in[w][e] = edgeObj;
51433 this._out[v][e] = edgeObj;
51434 this._edgeCount++;
51435 return this;
51436};
51437
51438Graph.prototype.edge = function(v, w, name) {
51439 var e = (arguments.length === 1
51440 ? edgeObjToId(this._isDirected, arguments[0])
51441 : edgeArgsToId(this._isDirected, v, w, name));
51442 return this._edgeLabels[e];
51443};
51444
51445Graph.prototype.hasEdge = function(v, w, name) {
51446 var e = (arguments.length === 1
51447 ? edgeObjToId(this._isDirected, arguments[0])
51448 : edgeArgsToId(this._isDirected, v, w, name));
51449 return _.has(this._edgeLabels, e);
51450};
51451
51452Graph.prototype.removeEdge = function(v, w, name) {
51453 var e = (arguments.length === 1
51454 ? edgeObjToId(this._isDirected, arguments[0])
51455 : edgeArgsToId(this._isDirected, v, w, name));
51456 var edge = this._edgeObjs[e];
51457 if (edge) {
51458 v = edge.v;
51459 w = edge.w;
51460 delete this._edgeLabels[e];
51461 delete this._edgeObjs[e];
51462 decrementOrRemoveEntry(this._preds[w], v);
51463 decrementOrRemoveEntry(this._sucs[v], w);
51464 delete this._in[w][e];
51465 delete this._out[v][e];
51466 this._edgeCount--;
51467 }
51468 return this;
51469};
51470
51471Graph.prototype.inEdges = function(v, u) {
51472 var inV = this._in[v];
51473 if (inV) {
51474 var edges = _.values(inV);
51475 if (!u) {
51476 return edges;
51477 }
51478 return _.filter(edges, function(edge) { return edge.v === u; });
51479 }
51480};
51481
51482Graph.prototype.outEdges = function(v, w) {
51483 var outV = this._out[v];
51484 if (outV) {
51485 var edges = _.values(outV);
51486 if (!w) {
51487 return edges;
51488 }
51489 return _.filter(edges, function(edge) { return edge.w === w; });
51490 }
51491};
51492
51493Graph.prototype.nodeEdges = function(v, w) {
51494 var inEdges = this.inEdges(v, w);
51495 if (inEdges) {
51496 return inEdges.concat(this.outEdges(v, w));
51497 }
51498};
51499
51500function incrementOrInitEntry(map, k) {
51501 if (map[k]) {
51502 map[k]++;
51503 } else {
51504 map[k] = 1;
51505 }
51506}
51507
51508function decrementOrRemoveEntry(map, k) {
51509 if (!--map[k]) { delete map[k]; }
51510}
51511
51512function edgeArgsToId(isDirected, v_, w_, name) {
51513 var v = "" + v_;
51514 var w = "" + w_;
51515 if (!isDirected && v > w) {
51516 var tmp = v;
51517 v = w;
51518 w = tmp;
51519 }
51520 return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM +
51521 (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name);
51522}
51523
51524function edgeArgsToObj(isDirected, v_, w_, name) {
51525 var v = "" + v_;
51526 var w = "" + w_;
51527 if (!isDirected && v > w) {
51528 var tmp = v;
51529 v = w;
51530 w = tmp;
51531 }
51532 var edgeObj = { v: v, w: w };
51533 if (name) {
51534 edgeObj.name = name;
51535 }
51536 return edgeObj;
51537}
51538
51539function edgeObjToId(isDirected, edgeObj) {
51540 return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name);
51541}
51542
51543
51544/***/ }),
51545
51546/***/ "./node_modules/graphlib/lib/index.js":
51547/*!********************************************!*\
51548 !*** ./node_modules/graphlib/lib/index.js ***!
51549 \********************************************/
51550/*! no static exports found */
51551/***/ (function(module, exports, __webpack_require__) {
51552
51553// Includes only the "core" of graphlib
51554module.exports = {
51555 Graph: __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"),
51556 version: __webpack_require__(/*! ./version */ "./node_modules/graphlib/lib/version.js")
51557};
51558
51559
51560/***/ }),
51561
51562/***/ "./node_modules/graphlib/lib/json.js":
51563/*!*******************************************!*\
51564 !*** ./node_modules/graphlib/lib/json.js ***!
51565 \*******************************************/
51566/*! no static exports found */
51567/***/ (function(module, exports, __webpack_require__) {
51568
51569var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js");
51570var Graph = __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js");
51571
51572module.exports = {
51573 write: write,
51574 read: read
51575};
51576
51577function write(g) {
51578 var json = {
51579 options: {
51580 directed: g.isDirected(),
51581 multigraph: g.isMultigraph(),
51582 compound: g.isCompound()
51583 },
51584 nodes: writeNodes(g),
51585 edges: writeEdges(g)
51586 };
51587 if (!_.isUndefined(g.graph())) {
51588 json.value = _.clone(g.graph());
51589 }
51590 return json;
51591}
51592
51593function writeNodes(g) {
51594 return _.map(g.nodes(), function(v) {
51595 var nodeValue = g.node(v);
51596 var parent = g.parent(v);
51597 var node = { v: v };
51598 if (!_.isUndefined(nodeValue)) {
51599 node.value = nodeValue;
51600 }
51601 if (!_.isUndefined(parent)) {
51602 node.parent = parent;
51603 }
51604 return node;
51605 });
51606}
51607
51608function writeEdges(g) {
51609 return _.map(g.edges(), function(e) {
51610 var edgeValue = g.edge(e);
51611 var edge = { v: e.v, w: e.w };
51612 if (!_.isUndefined(e.name)) {
51613 edge.name = e.name;
51614 }
51615 if (!_.isUndefined(edgeValue)) {
51616 edge.value = edgeValue;
51617 }
51618 return edge;
51619 });
51620}
51621
51622function read(json) {
51623 var g = new Graph(json.options).setGraph(json.value);
51624 _.each(json.nodes, function(entry) {
51625 g.setNode(entry.v, entry.value);
51626 if (entry.parent) {
51627 g.setParent(entry.v, entry.parent);
51628 }
51629 });
51630 _.each(json.edges, function(entry) {
51631 g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value);
51632 });
51633 return g;
51634}
51635
51636
51637/***/ }),
51638
51639/***/ "./node_modules/graphlib/lib/lodash.js":
51640/*!*********************************************!*\
51641 !*** ./node_modules/graphlib/lib/lodash.js ***!
51642 \*********************************************/
51643/*! no static exports found */
51644/***/ (function(module, exports, __webpack_require__) {
51645
51646/* global window */
51647
51648var lodash;
51649
51650if (true) {
51651 try {
51652 lodash = {
51653 clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"),
51654 constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"),
51655 each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"),
51656 filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"),
51657 has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"),
51658 isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"),
51659 isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"),
51660 isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"),
51661 isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"),
51662 keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"),
51663 map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"),
51664 reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"),
51665 size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"),
51666 transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"),
51667 union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"),
51668 values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js")
51669 };
51670 } catch (e) {
51671 // continue regardless of error
51672 }
51673}
51674
51675if (!lodash) {
51676 lodash = window._;
51677}
51678
51679module.exports = lodash;
51680
51681
51682/***/ }),
51683
51684/***/ "./node_modules/graphlib/lib/version.js":
51685/*!**********************************************!*\
51686 !*** ./node_modules/graphlib/lib/version.js ***!
51687 \**********************************************/
51688/*! no static exports found */
51689/***/ (function(module, exports) {
51690
51691module.exports = '2.1.8';
51692
51693
51694/***/ }),
51695
51696/***/ "./node_modules/hash-base/index.js":
51697/*!*****************************************!*\
51698 !*** ./node_modules/hash-base/index.js ***!
51699 \*****************************************/
51700/*! no static exports found */
51701/***/ (function(module, exports, __webpack_require__) {
51702
51703"use strict";
51704
51705var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
51706var Transform = __webpack_require__(/*! stream */ "./node_modules/stream-browserify/index.js").Transform
51707var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
51708
51709function throwIfNotStringOrBuffer (val, prefix) {
51710 if (!Buffer.isBuffer(val) && typeof val !== 'string') {
51711 throw new TypeError(prefix + ' must be a string or a buffer')
51712 }
51713}
51714
51715function HashBase (blockSize) {
51716 Transform.call(this)
51717
51718 this._block = Buffer.allocUnsafe(blockSize)
51719 this._blockSize = blockSize
51720 this._blockOffset = 0
51721 this._length = [0, 0, 0, 0]
51722
51723 this._finalized = false
51724}
51725
51726inherits(HashBase, Transform)
51727
51728HashBase.prototype._transform = function (chunk, encoding, callback) {
51729 var error = null
51730 try {
51731 this.update(chunk, encoding)
51732 } catch (err) {
51733 error = err
51734 }
51735
51736 callback(error)
51737}
51738
51739HashBase.prototype._flush = function (callback) {
51740 var error = null
51741 try {
51742 this.push(this.digest())
51743 } catch (err) {
51744 error = err
51745 }
51746
51747 callback(error)
51748}
51749
51750HashBase.prototype.update = function (data, encoding) {
51751 throwIfNotStringOrBuffer(data, 'Data')
51752 if (this._finalized) throw new Error('Digest already called')
51753 if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
51754
51755 // consume data
51756 var block = this._block
51757 var offset = 0
51758 while (this._blockOffset + data.length - offset >= this._blockSize) {
51759 for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
51760 this._update()
51761 this._blockOffset = 0
51762 }
51763 while (offset < data.length) block[this._blockOffset++] = data[offset++]
51764
51765 // update length
51766 for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
51767 this._length[j] += carry
51768 carry = (this._length[j] / 0x0100000000) | 0
51769 if (carry > 0) this._length[j] -= 0x0100000000 * carry
51770 }
51771
51772 return this
51773}
51774
51775HashBase.prototype._update = function () {
51776 throw new Error('_update is not implemented')
51777}
51778
51779HashBase.prototype.digest = function (encoding) {
51780 if (this._finalized) throw new Error('Digest already called')
51781 this._finalized = true
51782
51783 var digest = this._digest()
51784 if (encoding !== undefined) digest = digest.toString(encoding)
51785
51786 // reset state
51787 this._block.fill(0)
51788 this._blockOffset = 0
51789 for (var i = 0; i < 4; ++i) this._length[i] = 0
51790
51791 return digest
51792}
51793
51794HashBase.prototype._digest = function () {
51795 throw new Error('_digest is not implemented')
51796}
51797
51798module.exports = HashBase
51799
51800
51801/***/ }),
51802
51803/***/ "./node_modules/hash.js/lib/hash.js":
51804/*!******************************************!*\
51805 !*** ./node_modules/hash.js/lib/hash.js ***!
51806 \******************************************/
51807/*! no static exports found */
51808/***/ (function(module, exports, __webpack_require__) {
51809
51810var hash = exports;
51811
51812hash.utils = __webpack_require__(/*! ./hash/utils */ "./node_modules/hash.js/lib/hash/utils.js");
51813hash.common = __webpack_require__(/*! ./hash/common */ "./node_modules/hash.js/lib/hash/common.js");
51814hash.sha = __webpack_require__(/*! ./hash/sha */ "./node_modules/hash.js/lib/hash/sha.js");
51815hash.ripemd = __webpack_require__(/*! ./hash/ripemd */ "./node_modules/hash.js/lib/hash/ripemd.js");
51816hash.hmac = __webpack_require__(/*! ./hash/hmac */ "./node_modules/hash.js/lib/hash/hmac.js");
51817
51818// Proxy hash functions to the main object
51819hash.sha1 = hash.sha.sha1;
51820hash.sha256 = hash.sha.sha256;
51821hash.sha224 = hash.sha.sha224;
51822hash.sha384 = hash.sha.sha384;
51823hash.sha512 = hash.sha.sha512;
51824hash.ripemd160 = hash.ripemd.ripemd160;
51825
51826
51827/***/ }),
51828
51829/***/ "./node_modules/hash.js/lib/hash/common.js":
51830/*!*************************************************!*\
51831 !*** ./node_modules/hash.js/lib/hash/common.js ***!
51832 \*************************************************/
51833/*! no static exports found */
51834/***/ (function(module, exports, __webpack_require__) {
51835
51836"use strict";
51837
51838
51839var utils = __webpack_require__(/*! ./utils */ "./node_modules/hash.js/lib/hash/utils.js");
51840var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
51841
51842function BlockHash() {
51843 this.pending = null;
51844 this.pendingTotal = 0;
51845 this.blockSize = this.constructor.blockSize;
51846 this.outSize = this.constructor.outSize;
51847 this.hmacStrength = this.constructor.hmacStrength;
51848 this.padLength = this.constructor.padLength / 8;
51849 this.endian = 'big';
51850
51851 this._delta8 = this.blockSize / 8;
51852 this._delta32 = this.blockSize / 32;
51853}
51854exports.BlockHash = BlockHash;
51855
51856BlockHash.prototype.update = function update(msg, enc) {
51857 // Convert message to array, pad it, and join into 32bit blocks
51858 msg = utils.toArray(msg, enc);
51859 if (!this.pending)
51860 this.pending = msg;
51861 else
51862 this.pending = this.pending.concat(msg);
51863 this.pendingTotal += msg.length;
51864
51865 // Enough data, try updating
51866 if (this.pending.length >= this._delta8) {
51867 msg = this.pending;
51868
51869 // Process pending data in blocks
51870 var r = msg.length % this._delta8;
51871 this.pending = msg.slice(msg.length - r, msg.length);
51872 if (this.pending.length === 0)
51873 this.pending = null;
51874
51875 msg = utils.join32(msg, 0, msg.length - r, this.endian);
51876 for (var i = 0; i < msg.length; i += this._delta32)
51877 this._update(msg, i, i + this._delta32);
51878 }
51879
51880 return this;
51881};
51882
51883BlockHash.prototype.digest = function digest(enc) {
51884 this.update(this._pad());
51885 assert(this.pending === null);
51886
51887 return this._digest(enc);
51888};
51889
51890BlockHash.prototype._pad = function pad() {
51891 var len = this.pendingTotal;
51892 var bytes = this._delta8;
51893 var k = bytes - ((len + this.padLength) % bytes);
51894 var res = new Array(k + this.padLength);
51895 res[0] = 0x80;
51896 for (var i = 1; i < k; i++)
51897 res[i] = 0;
51898
51899 // Append length
51900 len <<= 3;
51901 if (this.endian === 'big') {
51902 for (var t = 8; t < this.padLength; t++)
51903 res[i++] = 0;
51904
51905 res[i++] = 0;
51906 res[i++] = 0;
51907 res[i++] = 0;
51908 res[i++] = 0;
51909 res[i++] = (len >>> 24) & 0xff;
51910 res[i++] = (len >>> 16) & 0xff;
51911 res[i++] = (len >>> 8) & 0xff;
51912 res[i++] = len & 0xff;
51913 } else {
51914 res[i++] = len & 0xff;
51915 res[i++] = (len >>> 8) & 0xff;
51916 res[i++] = (len >>> 16) & 0xff;
51917 res[i++] = (len >>> 24) & 0xff;
51918 res[i++] = 0;
51919 res[i++] = 0;
51920 res[i++] = 0;
51921 res[i++] = 0;
51922
51923 for (t = 8; t < this.padLength; t++)
51924 res[i++] = 0;
51925 }
51926
51927 return res;
51928};
51929
51930
51931/***/ }),
51932
51933/***/ "./node_modules/hash.js/lib/hash/hmac.js":
51934/*!***********************************************!*\
51935 !*** ./node_modules/hash.js/lib/hash/hmac.js ***!
51936 \***********************************************/
51937/*! no static exports found */
51938/***/ (function(module, exports, __webpack_require__) {
51939
51940"use strict";
51941
51942
51943var utils = __webpack_require__(/*! ./utils */ "./node_modules/hash.js/lib/hash/utils.js");
51944var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
51945
51946function Hmac(hash, key, enc) {
51947 if (!(this instanceof Hmac))
51948 return new Hmac(hash, key, enc);
51949 this.Hash = hash;
51950 this.blockSize = hash.blockSize / 8;
51951 this.outSize = hash.outSize / 8;
51952 this.inner = null;
51953 this.outer = null;
51954
51955 this._init(utils.toArray(key, enc));
51956}
51957module.exports = Hmac;
51958
51959Hmac.prototype._init = function init(key) {
51960 // Shorten key, if needed
51961 if (key.length > this.blockSize)
51962 key = new this.Hash().update(key).digest();
51963 assert(key.length <= this.blockSize);
51964
51965 // Add padding to key
51966 for (var i = key.length; i < this.blockSize; i++)
51967 key.push(0);
51968
51969 for (i = 0; i < key.length; i++)
51970 key[i] ^= 0x36;
51971 this.inner = new this.Hash().update(key);
51972
51973 // 0x36 ^ 0x5c = 0x6a
51974 for (i = 0; i < key.length; i++)
51975 key[i] ^= 0x6a;
51976 this.outer = new this.Hash().update(key);
51977};
51978
51979Hmac.prototype.update = function update(msg, enc) {
51980 this.inner.update(msg, enc);
51981 return this;
51982};
51983
51984Hmac.prototype.digest = function digest(enc) {
51985 this.outer.update(this.inner.digest());
51986 return this.outer.digest(enc);
51987};
51988
51989
51990/***/ }),
51991
51992/***/ "./node_modules/hash.js/lib/hash/ripemd.js":
51993/*!*************************************************!*\
51994 !*** ./node_modules/hash.js/lib/hash/ripemd.js ***!
51995 \*************************************************/
51996/*! no static exports found */
51997/***/ (function(module, exports, __webpack_require__) {
51998
51999"use strict";
52000
52001
52002var utils = __webpack_require__(/*! ./utils */ "./node_modules/hash.js/lib/hash/utils.js");
52003var common = __webpack_require__(/*! ./common */ "./node_modules/hash.js/lib/hash/common.js");
52004
52005var rotl32 = utils.rotl32;
52006var sum32 = utils.sum32;
52007var sum32_3 = utils.sum32_3;
52008var sum32_4 = utils.sum32_4;
52009var BlockHash = common.BlockHash;
52010
52011function RIPEMD160() {
52012 if (!(this instanceof RIPEMD160))
52013 return new RIPEMD160();
52014
52015 BlockHash.call(this);
52016
52017 this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
52018 this.endian = 'little';
52019}
52020utils.inherits(RIPEMD160, BlockHash);
52021exports.ripemd160 = RIPEMD160;
52022
52023RIPEMD160.blockSize = 512;
52024RIPEMD160.outSize = 160;
52025RIPEMD160.hmacStrength = 192;
52026RIPEMD160.padLength = 64;
52027
52028RIPEMD160.prototype._update = function update(msg, start) {
52029 var A = this.h[0];
52030 var B = this.h[1];
52031 var C = this.h[2];
52032 var D = this.h[3];
52033 var E = this.h[4];
52034 var Ah = A;
52035 var Bh = B;
52036 var Ch = C;
52037 var Dh = D;
52038 var Eh = E;
52039 for (var j = 0; j < 80; j++) {
52040 var T = sum32(
52041 rotl32(
52042 sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
52043 s[j]),
52044 E);
52045 A = E;
52046 E = D;
52047 D = rotl32(C, 10);
52048 C = B;
52049 B = T;
52050 T = sum32(
52051 rotl32(
52052 sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
52053 sh[j]),
52054 Eh);
52055 Ah = Eh;
52056 Eh = Dh;
52057 Dh = rotl32(Ch, 10);
52058 Ch = Bh;
52059 Bh = T;
52060 }
52061 T = sum32_3(this.h[1], C, Dh);
52062 this.h[1] = sum32_3(this.h[2], D, Eh);
52063 this.h[2] = sum32_3(this.h[3], E, Ah);
52064 this.h[3] = sum32_3(this.h[4], A, Bh);
52065 this.h[4] = sum32_3(this.h[0], B, Ch);
52066 this.h[0] = T;
52067};
52068
52069RIPEMD160.prototype._digest = function digest(enc) {
52070 if (enc === 'hex')
52071 return utils.toHex32(this.h, 'little');
52072 else
52073 return utils.split32(this.h, 'little');
52074};
52075
52076function f(j, x, y, z) {
52077 if (j <= 15)
52078 return x ^ y ^ z;
52079 else if (j <= 31)
52080 return (x & y) | ((~x) & z);
52081 else if (j <= 47)
52082 return (x | (~y)) ^ z;
52083 else if (j <= 63)
52084 return (x & z) | (y & (~z));
52085 else
52086 return x ^ (y | (~z));
52087}
52088
52089function K(j) {
52090 if (j <= 15)
52091 return 0x00000000;
52092 else if (j <= 31)
52093 return 0x5a827999;
52094 else if (j <= 47)
52095 return 0x6ed9eba1;
52096 else if (j <= 63)
52097 return 0x8f1bbcdc;
52098 else
52099 return 0xa953fd4e;
52100}
52101
52102function Kh(j) {
52103 if (j <= 15)
52104 return 0x50a28be6;
52105 else if (j <= 31)
52106 return 0x5c4dd124;
52107 else if (j <= 47)
52108 return 0x6d703ef3;
52109 else if (j <= 63)
52110 return 0x7a6d76e9;
52111 else
52112 return 0x00000000;
52113}
52114
52115var r = [
52116 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
52117 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
52118 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
52119 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
52120 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
52121];
52122
52123var rh = [
52124 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
52125 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
52126 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
52127 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
52128 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
52129];
52130
52131var s = [
52132 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
52133 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
52134 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
52135 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
52136 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
52137];
52138
52139var sh = [
52140 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
52141 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
52142 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
52143 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
52144 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
52145];
52146
52147
52148/***/ }),
52149
52150/***/ "./node_modules/hash.js/lib/hash/sha.js":
52151/*!**********************************************!*\
52152 !*** ./node_modules/hash.js/lib/hash/sha.js ***!
52153 \**********************************************/
52154/*! no static exports found */
52155/***/ (function(module, exports, __webpack_require__) {
52156
52157"use strict";
52158
52159
52160exports.sha1 = __webpack_require__(/*! ./sha/1 */ "./node_modules/hash.js/lib/hash/sha/1.js");
52161exports.sha224 = __webpack_require__(/*! ./sha/224 */ "./node_modules/hash.js/lib/hash/sha/224.js");
52162exports.sha256 = __webpack_require__(/*! ./sha/256 */ "./node_modules/hash.js/lib/hash/sha/256.js");
52163exports.sha384 = __webpack_require__(/*! ./sha/384 */ "./node_modules/hash.js/lib/hash/sha/384.js");
52164exports.sha512 = __webpack_require__(/*! ./sha/512 */ "./node_modules/hash.js/lib/hash/sha/512.js");
52165
52166
52167/***/ }),
52168
52169/***/ "./node_modules/hash.js/lib/hash/sha/1.js":
52170/*!************************************************!*\
52171 !*** ./node_modules/hash.js/lib/hash/sha/1.js ***!
52172 \************************************************/
52173/*! no static exports found */
52174/***/ (function(module, exports, __webpack_require__) {
52175
52176"use strict";
52177
52178
52179var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52180var common = __webpack_require__(/*! ../common */ "./node_modules/hash.js/lib/hash/common.js");
52181var shaCommon = __webpack_require__(/*! ./common */ "./node_modules/hash.js/lib/hash/sha/common.js");
52182
52183var rotl32 = utils.rotl32;
52184var sum32 = utils.sum32;
52185var sum32_5 = utils.sum32_5;
52186var ft_1 = shaCommon.ft_1;
52187var BlockHash = common.BlockHash;
52188
52189var sha1_K = [
52190 0x5A827999, 0x6ED9EBA1,
52191 0x8F1BBCDC, 0xCA62C1D6
52192];
52193
52194function SHA1() {
52195 if (!(this instanceof SHA1))
52196 return new SHA1();
52197
52198 BlockHash.call(this);
52199 this.h = [
52200 0x67452301, 0xefcdab89, 0x98badcfe,
52201 0x10325476, 0xc3d2e1f0 ];
52202 this.W = new Array(80);
52203}
52204
52205utils.inherits(SHA1, BlockHash);
52206module.exports = SHA1;
52207
52208SHA1.blockSize = 512;
52209SHA1.outSize = 160;
52210SHA1.hmacStrength = 80;
52211SHA1.padLength = 64;
52212
52213SHA1.prototype._update = function _update(msg, start) {
52214 var W = this.W;
52215
52216 for (var i = 0; i < 16; i++)
52217 W[i] = msg[start + i];
52218
52219 for(; i < W.length; i++)
52220 W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
52221
52222 var a = this.h[0];
52223 var b = this.h[1];
52224 var c = this.h[2];
52225 var d = this.h[3];
52226 var e = this.h[4];
52227
52228 for (i = 0; i < W.length; i++) {
52229 var s = ~~(i / 20);
52230 var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);
52231 e = d;
52232 d = c;
52233 c = rotl32(b, 30);
52234 b = a;
52235 a = t;
52236 }
52237
52238 this.h[0] = sum32(this.h[0], a);
52239 this.h[1] = sum32(this.h[1], b);
52240 this.h[2] = sum32(this.h[2], c);
52241 this.h[3] = sum32(this.h[3], d);
52242 this.h[4] = sum32(this.h[4], e);
52243};
52244
52245SHA1.prototype._digest = function digest(enc) {
52246 if (enc === 'hex')
52247 return utils.toHex32(this.h, 'big');
52248 else
52249 return utils.split32(this.h, 'big');
52250};
52251
52252
52253/***/ }),
52254
52255/***/ "./node_modules/hash.js/lib/hash/sha/224.js":
52256/*!**************************************************!*\
52257 !*** ./node_modules/hash.js/lib/hash/sha/224.js ***!
52258 \**************************************************/
52259/*! no static exports found */
52260/***/ (function(module, exports, __webpack_require__) {
52261
52262"use strict";
52263
52264
52265var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52266var SHA256 = __webpack_require__(/*! ./256 */ "./node_modules/hash.js/lib/hash/sha/256.js");
52267
52268function SHA224() {
52269 if (!(this instanceof SHA224))
52270 return new SHA224();
52271
52272 SHA256.call(this);
52273 this.h = [
52274 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
52275 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
52276}
52277utils.inherits(SHA224, SHA256);
52278module.exports = SHA224;
52279
52280SHA224.blockSize = 512;
52281SHA224.outSize = 224;
52282SHA224.hmacStrength = 192;
52283SHA224.padLength = 64;
52284
52285SHA224.prototype._digest = function digest(enc) {
52286 // Just truncate output
52287 if (enc === 'hex')
52288 return utils.toHex32(this.h.slice(0, 7), 'big');
52289 else
52290 return utils.split32(this.h.slice(0, 7), 'big');
52291};
52292
52293
52294
52295/***/ }),
52296
52297/***/ "./node_modules/hash.js/lib/hash/sha/256.js":
52298/*!**************************************************!*\
52299 !*** ./node_modules/hash.js/lib/hash/sha/256.js ***!
52300 \**************************************************/
52301/*! no static exports found */
52302/***/ (function(module, exports, __webpack_require__) {
52303
52304"use strict";
52305
52306
52307var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52308var common = __webpack_require__(/*! ../common */ "./node_modules/hash.js/lib/hash/common.js");
52309var shaCommon = __webpack_require__(/*! ./common */ "./node_modules/hash.js/lib/hash/sha/common.js");
52310var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
52311
52312var sum32 = utils.sum32;
52313var sum32_4 = utils.sum32_4;
52314var sum32_5 = utils.sum32_5;
52315var ch32 = shaCommon.ch32;
52316var maj32 = shaCommon.maj32;
52317var s0_256 = shaCommon.s0_256;
52318var s1_256 = shaCommon.s1_256;
52319var g0_256 = shaCommon.g0_256;
52320var g1_256 = shaCommon.g1_256;
52321
52322var BlockHash = common.BlockHash;
52323
52324var sha256_K = [
52325 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
52326 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
52327 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
52328 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
52329 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
52330 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
52331 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
52332 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
52333 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
52334 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
52335 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
52336 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
52337 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
52338 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
52339 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
52340 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
52341];
52342
52343function SHA256() {
52344 if (!(this instanceof SHA256))
52345 return new SHA256();
52346
52347 BlockHash.call(this);
52348 this.h = [
52349 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
52350 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
52351 ];
52352 this.k = sha256_K;
52353 this.W = new Array(64);
52354}
52355utils.inherits(SHA256, BlockHash);
52356module.exports = SHA256;
52357
52358SHA256.blockSize = 512;
52359SHA256.outSize = 256;
52360SHA256.hmacStrength = 192;
52361SHA256.padLength = 64;
52362
52363SHA256.prototype._update = function _update(msg, start) {
52364 var W = this.W;
52365
52366 for (var i = 0; i < 16; i++)
52367 W[i] = msg[start + i];
52368 for (; i < W.length; i++)
52369 W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
52370
52371 var a = this.h[0];
52372 var b = this.h[1];
52373 var c = this.h[2];
52374 var d = this.h[3];
52375 var e = this.h[4];
52376 var f = this.h[5];
52377 var g = this.h[6];
52378 var h = this.h[7];
52379
52380 assert(this.k.length === W.length);
52381 for (i = 0; i < W.length; i++) {
52382 var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
52383 var T2 = sum32(s0_256(a), maj32(a, b, c));
52384 h = g;
52385 g = f;
52386 f = e;
52387 e = sum32(d, T1);
52388 d = c;
52389 c = b;
52390 b = a;
52391 a = sum32(T1, T2);
52392 }
52393
52394 this.h[0] = sum32(this.h[0], a);
52395 this.h[1] = sum32(this.h[1], b);
52396 this.h[2] = sum32(this.h[2], c);
52397 this.h[3] = sum32(this.h[3], d);
52398 this.h[4] = sum32(this.h[4], e);
52399 this.h[5] = sum32(this.h[5], f);
52400 this.h[6] = sum32(this.h[6], g);
52401 this.h[7] = sum32(this.h[7], h);
52402};
52403
52404SHA256.prototype._digest = function digest(enc) {
52405 if (enc === 'hex')
52406 return utils.toHex32(this.h, 'big');
52407 else
52408 return utils.split32(this.h, 'big');
52409};
52410
52411
52412/***/ }),
52413
52414/***/ "./node_modules/hash.js/lib/hash/sha/384.js":
52415/*!**************************************************!*\
52416 !*** ./node_modules/hash.js/lib/hash/sha/384.js ***!
52417 \**************************************************/
52418/*! no static exports found */
52419/***/ (function(module, exports, __webpack_require__) {
52420
52421"use strict";
52422
52423
52424var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52425
52426var SHA512 = __webpack_require__(/*! ./512 */ "./node_modules/hash.js/lib/hash/sha/512.js");
52427
52428function SHA384() {
52429 if (!(this instanceof SHA384))
52430 return new SHA384();
52431
52432 SHA512.call(this);
52433 this.h = [
52434 0xcbbb9d5d, 0xc1059ed8,
52435 0x629a292a, 0x367cd507,
52436 0x9159015a, 0x3070dd17,
52437 0x152fecd8, 0xf70e5939,
52438 0x67332667, 0xffc00b31,
52439 0x8eb44a87, 0x68581511,
52440 0xdb0c2e0d, 0x64f98fa7,
52441 0x47b5481d, 0xbefa4fa4 ];
52442}
52443utils.inherits(SHA384, SHA512);
52444module.exports = SHA384;
52445
52446SHA384.blockSize = 1024;
52447SHA384.outSize = 384;
52448SHA384.hmacStrength = 192;
52449SHA384.padLength = 128;
52450
52451SHA384.prototype._digest = function digest(enc) {
52452 if (enc === 'hex')
52453 return utils.toHex32(this.h.slice(0, 12), 'big');
52454 else
52455 return utils.split32(this.h.slice(0, 12), 'big');
52456};
52457
52458
52459/***/ }),
52460
52461/***/ "./node_modules/hash.js/lib/hash/sha/512.js":
52462/*!**************************************************!*\
52463 !*** ./node_modules/hash.js/lib/hash/sha/512.js ***!
52464 \**************************************************/
52465/*! no static exports found */
52466/***/ (function(module, exports, __webpack_require__) {
52467
52468"use strict";
52469
52470
52471var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52472var common = __webpack_require__(/*! ../common */ "./node_modules/hash.js/lib/hash/common.js");
52473var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
52474
52475var rotr64_hi = utils.rotr64_hi;
52476var rotr64_lo = utils.rotr64_lo;
52477var shr64_hi = utils.shr64_hi;
52478var shr64_lo = utils.shr64_lo;
52479var sum64 = utils.sum64;
52480var sum64_hi = utils.sum64_hi;
52481var sum64_lo = utils.sum64_lo;
52482var sum64_4_hi = utils.sum64_4_hi;
52483var sum64_4_lo = utils.sum64_4_lo;
52484var sum64_5_hi = utils.sum64_5_hi;
52485var sum64_5_lo = utils.sum64_5_lo;
52486
52487var BlockHash = common.BlockHash;
52488
52489var sha512_K = [
52490 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
52491 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
52492 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
52493 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
52494 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
52495 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
52496 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
52497 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
52498 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
52499 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
52500 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
52501 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
52502 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
52503 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
52504 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
52505 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
52506 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
52507 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
52508 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
52509 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
52510 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
52511 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
52512 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
52513 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
52514 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
52515 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
52516 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
52517 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
52518 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
52519 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
52520 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
52521 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
52522 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
52523 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
52524 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
52525 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
52526 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
52527 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
52528 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
52529 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
52530];
52531
52532function SHA512() {
52533 if (!(this instanceof SHA512))
52534 return new SHA512();
52535
52536 BlockHash.call(this);
52537 this.h = [
52538 0x6a09e667, 0xf3bcc908,
52539 0xbb67ae85, 0x84caa73b,
52540 0x3c6ef372, 0xfe94f82b,
52541 0xa54ff53a, 0x5f1d36f1,
52542 0x510e527f, 0xade682d1,
52543 0x9b05688c, 0x2b3e6c1f,
52544 0x1f83d9ab, 0xfb41bd6b,
52545 0x5be0cd19, 0x137e2179 ];
52546 this.k = sha512_K;
52547 this.W = new Array(160);
52548}
52549utils.inherits(SHA512, BlockHash);
52550module.exports = SHA512;
52551
52552SHA512.blockSize = 1024;
52553SHA512.outSize = 512;
52554SHA512.hmacStrength = 192;
52555SHA512.padLength = 128;
52556
52557SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
52558 var W = this.W;
52559
52560 // 32 x 32bit words
52561 for (var i = 0; i < 32; i++)
52562 W[i] = msg[start + i];
52563 for (; i < W.length; i += 2) {
52564 var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
52565 var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
52566 var c1_hi = W[i - 14]; // i - 7
52567 var c1_lo = W[i - 13];
52568 var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
52569 var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
52570 var c3_hi = W[i - 32]; // i - 16
52571 var c3_lo = W[i - 31];
52572
52573 W[i] = sum64_4_hi(
52574 c0_hi, c0_lo,
52575 c1_hi, c1_lo,
52576 c2_hi, c2_lo,
52577 c3_hi, c3_lo);
52578 W[i + 1] = sum64_4_lo(
52579 c0_hi, c0_lo,
52580 c1_hi, c1_lo,
52581 c2_hi, c2_lo,
52582 c3_hi, c3_lo);
52583 }
52584};
52585
52586SHA512.prototype._update = function _update(msg, start) {
52587 this._prepareBlock(msg, start);
52588
52589 var W = this.W;
52590
52591 var ah = this.h[0];
52592 var al = this.h[1];
52593 var bh = this.h[2];
52594 var bl = this.h[3];
52595 var ch = this.h[4];
52596 var cl = this.h[5];
52597 var dh = this.h[6];
52598 var dl = this.h[7];
52599 var eh = this.h[8];
52600 var el = this.h[9];
52601 var fh = this.h[10];
52602 var fl = this.h[11];
52603 var gh = this.h[12];
52604 var gl = this.h[13];
52605 var hh = this.h[14];
52606 var hl = this.h[15];
52607
52608 assert(this.k.length === W.length);
52609 for (var i = 0; i < W.length; i += 2) {
52610 var c0_hi = hh;
52611 var c0_lo = hl;
52612 var c1_hi = s1_512_hi(eh, el);
52613 var c1_lo = s1_512_lo(eh, el);
52614 var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
52615 var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
52616 var c3_hi = this.k[i];
52617 var c3_lo = this.k[i + 1];
52618 var c4_hi = W[i];
52619 var c4_lo = W[i + 1];
52620
52621 var T1_hi = sum64_5_hi(
52622 c0_hi, c0_lo,
52623 c1_hi, c1_lo,
52624 c2_hi, c2_lo,
52625 c3_hi, c3_lo,
52626 c4_hi, c4_lo);
52627 var T1_lo = sum64_5_lo(
52628 c0_hi, c0_lo,
52629 c1_hi, c1_lo,
52630 c2_hi, c2_lo,
52631 c3_hi, c3_lo,
52632 c4_hi, c4_lo);
52633
52634 c0_hi = s0_512_hi(ah, al);
52635 c0_lo = s0_512_lo(ah, al);
52636 c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
52637 c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
52638
52639 var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
52640 var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
52641
52642 hh = gh;
52643 hl = gl;
52644
52645 gh = fh;
52646 gl = fl;
52647
52648 fh = eh;
52649 fl = el;
52650
52651 eh = sum64_hi(dh, dl, T1_hi, T1_lo);
52652 el = sum64_lo(dl, dl, T1_hi, T1_lo);
52653
52654 dh = ch;
52655 dl = cl;
52656
52657 ch = bh;
52658 cl = bl;
52659
52660 bh = ah;
52661 bl = al;
52662
52663 ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
52664 al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
52665 }
52666
52667 sum64(this.h, 0, ah, al);
52668 sum64(this.h, 2, bh, bl);
52669 sum64(this.h, 4, ch, cl);
52670 sum64(this.h, 6, dh, dl);
52671 sum64(this.h, 8, eh, el);
52672 sum64(this.h, 10, fh, fl);
52673 sum64(this.h, 12, gh, gl);
52674 sum64(this.h, 14, hh, hl);
52675};
52676
52677SHA512.prototype._digest = function digest(enc) {
52678 if (enc === 'hex')
52679 return utils.toHex32(this.h, 'big');
52680 else
52681 return utils.split32(this.h, 'big');
52682};
52683
52684function ch64_hi(xh, xl, yh, yl, zh) {
52685 var r = (xh & yh) ^ ((~xh) & zh);
52686 if (r < 0)
52687 r += 0x100000000;
52688 return r;
52689}
52690
52691function ch64_lo(xh, xl, yh, yl, zh, zl) {
52692 var r = (xl & yl) ^ ((~xl) & zl);
52693 if (r < 0)
52694 r += 0x100000000;
52695 return r;
52696}
52697
52698function maj64_hi(xh, xl, yh, yl, zh) {
52699 var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
52700 if (r < 0)
52701 r += 0x100000000;
52702 return r;
52703}
52704
52705function maj64_lo(xh, xl, yh, yl, zh, zl) {
52706 var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
52707 if (r < 0)
52708 r += 0x100000000;
52709 return r;
52710}
52711
52712function s0_512_hi(xh, xl) {
52713 var c0_hi = rotr64_hi(xh, xl, 28);
52714 var c1_hi = rotr64_hi(xl, xh, 2); // 34
52715 var c2_hi = rotr64_hi(xl, xh, 7); // 39
52716
52717 var r = c0_hi ^ c1_hi ^ c2_hi;
52718 if (r < 0)
52719 r += 0x100000000;
52720 return r;
52721}
52722
52723function s0_512_lo(xh, xl) {
52724 var c0_lo = rotr64_lo(xh, xl, 28);
52725 var c1_lo = rotr64_lo(xl, xh, 2); // 34
52726 var c2_lo = rotr64_lo(xl, xh, 7); // 39
52727
52728 var r = c0_lo ^ c1_lo ^ c2_lo;
52729 if (r < 0)
52730 r += 0x100000000;
52731 return r;
52732}
52733
52734function s1_512_hi(xh, xl) {
52735 var c0_hi = rotr64_hi(xh, xl, 14);
52736 var c1_hi = rotr64_hi(xh, xl, 18);
52737 var c2_hi = rotr64_hi(xl, xh, 9); // 41
52738
52739 var r = c0_hi ^ c1_hi ^ c2_hi;
52740 if (r < 0)
52741 r += 0x100000000;
52742 return r;
52743}
52744
52745function s1_512_lo(xh, xl) {
52746 var c0_lo = rotr64_lo(xh, xl, 14);
52747 var c1_lo = rotr64_lo(xh, xl, 18);
52748 var c2_lo = rotr64_lo(xl, xh, 9); // 41
52749
52750 var r = c0_lo ^ c1_lo ^ c2_lo;
52751 if (r < 0)
52752 r += 0x100000000;
52753 return r;
52754}
52755
52756function g0_512_hi(xh, xl) {
52757 var c0_hi = rotr64_hi(xh, xl, 1);
52758 var c1_hi = rotr64_hi(xh, xl, 8);
52759 var c2_hi = shr64_hi(xh, xl, 7);
52760
52761 var r = c0_hi ^ c1_hi ^ c2_hi;
52762 if (r < 0)
52763 r += 0x100000000;
52764 return r;
52765}
52766
52767function g0_512_lo(xh, xl) {
52768 var c0_lo = rotr64_lo(xh, xl, 1);
52769 var c1_lo = rotr64_lo(xh, xl, 8);
52770 var c2_lo = shr64_lo(xh, xl, 7);
52771
52772 var r = c0_lo ^ c1_lo ^ c2_lo;
52773 if (r < 0)
52774 r += 0x100000000;
52775 return r;
52776}
52777
52778function g1_512_hi(xh, xl) {
52779 var c0_hi = rotr64_hi(xh, xl, 19);
52780 var c1_hi = rotr64_hi(xl, xh, 29); // 61
52781 var c2_hi = shr64_hi(xh, xl, 6);
52782
52783 var r = c0_hi ^ c1_hi ^ c2_hi;
52784 if (r < 0)
52785 r += 0x100000000;
52786 return r;
52787}
52788
52789function g1_512_lo(xh, xl) {
52790 var c0_lo = rotr64_lo(xh, xl, 19);
52791 var c1_lo = rotr64_lo(xl, xh, 29); // 61
52792 var c2_lo = shr64_lo(xh, xl, 6);
52793
52794 var r = c0_lo ^ c1_lo ^ c2_lo;
52795 if (r < 0)
52796 r += 0x100000000;
52797 return r;
52798}
52799
52800
52801/***/ }),
52802
52803/***/ "./node_modules/hash.js/lib/hash/sha/common.js":
52804/*!*****************************************************!*\
52805 !*** ./node_modules/hash.js/lib/hash/sha/common.js ***!
52806 \*****************************************************/
52807/*! no static exports found */
52808/***/ (function(module, exports, __webpack_require__) {
52809
52810"use strict";
52811
52812
52813var utils = __webpack_require__(/*! ../utils */ "./node_modules/hash.js/lib/hash/utils.js");
52814var rotr32 = utils.rotr32;
52815
52816function ft_1(s, x, y, z) {
52817 if (s === 0)
52818 return ch32(x, y, z);
52819 if (s === 1 || s === 3)
52820 return p32(x, y, z);
52821 if (s === 2)
52822 return maj32(x, y, z);
52823}
52824exports.ft_1 = ft_1;
52825
52826function ch32(x, y, z) {
52827 return (x & y) ^ ((~x) & z);
52828}
52829exports.ch32 = ch32;
52830
52831function maj32(x, y, z) {
52832 return (x & y) ^ (x & z) ^ (y & z);
52833}
52834exports.maj32 = maj32;
52835
52836function p32(x, y, z) {
52837 return x ^ y ^ z;
52838}
52839exports.p32 = p32;
52840
52841function s0_256(x) {
52842 return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
52843}
52844exports.s0_256 = s0_256;
52845
52846function s1_256(x) {
52847 return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
52848}
52849exports.s1_256 = s1_256;
52850
52851function g0_256(x) {
52852 return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
52853}
52854exports.g0_256 = g0_256;
52855
52856function g1_256(x) {
52857 return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
52858}
52859exports.g1_256 = g1_256;
52860
52861
52862/***/ }),
52863
52864/***/ "./node_modules/hash.js/lib/hash/utils.js":
52865/*!************************************************!*\
52866 !*** ./node_modules/hash.js/lib/hash/utils.js ***!
52867 \************************************************/
52868/*! no static exports found */
52869/***/ (function(module, exports, __webpack_require__) {
52870
52871"use strict";
52872
52873
52874var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
52875var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
52876
52877exports.inherits = inherits;
52878
52879function isSurrogatePair(msg, i) {
52880 if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {
52881 return false;
52882 }
52883 if (i < 0 || i + 1 >= msg.length) {
52884 return false;
52885 }
52886 return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;
52887}
52888
52889function toArray(msg, enc) {
52890 if (Array.isArray(msg))
52891 return msg.slice();
52892 if (!msg)
52893 return [];
52894 var res = [];
52895 if (typeof msg === 'string') {
52896 if (!enc) {
52897 // Inspired by stringToUtf8ByteArray() in closure-library by Google
52898 // https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143
52899 // Apache License 2.0
52900 // https://github.com/google/closure-library/blob/master/LICENSE
52901 var p = 0;
52902 for (var i = 0; i < msg.length; i++) {
52903 var c = msg.charCodeAt(i);
52904 if (c < 128) {
52905 res[p++] = c;
52906 } else if (c < 2048) {
52907 res[p++] = (c >> 6) | 192;
52908 res[p++] = (c & 63) | 128;
52909 } else if (isSurrogatePair(msg, i)) {
52910 c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);
52911 res[p++] = (c >> 18) | 240;
52912 res[p++] = ((c >> 12) & 63) | 128;
52913 res[p++] = ((c >> 6) & 63) | 128;
52914 res[p++] = (c & 63) | 128;
52915 } else {
52916 res[p++] = (c >> 12) | 224;
52917 res[p++] = ((c >> 6) & 63) | 128;
52918 res[p++] = (c & 63) | 128;
52919 }
52920 }
52921 } else if (enc === 'hex') {
52922 msg = msg.replace(/[^a-z0-9]+/ig, '');
52923 if (msg.length % 2 !== 0)
52924 msg = '0' + msg;
52925 for (i = 0; i < msg.length; i += 2)
52926 res.push(parseInt(msg[i] + msg[i + 1], 16));
52927 }
52928 } else {
52929 for (i = 0; i < msg.length; i++)
52930 res[i] = msg[i] | 0;
52931 }
52932 return res;
52933}
52934exports.toArray = toArray;
52935
52936function toHex(msg) {
52937 var res = '';
52938 for (var i = 0; i < msg.length; i++)
52939 res += zero2(msg[i].toString(16));
52940 return res;
52941}
52942exports.toHex = toHex;
52943
52944function htonl(w) {
52945 var res = (w >>> 24) |
52946 ((w >>> 8) & 0xff00) |
52947 ((w << 8) & 0xff0000) |
52948 ((w & 0xff) << 24);
52949 return res >>> 0;
52950}
52951exports.htonl = htonl;
52952
52953function toHex32(msg, endian) {
52954 var res = '';
52955 for (var i = 0; i < msg.length; i++) {
52956 var w = msg[i];
52957 if (endian === 'little')
52958 w = htonl(w);
52959 res += zero8(w.toString(16));
52960 }
52961 return res;
52962}
52963exports.toHex32 = toHex32;
52964
52965function zero2(word) {
52966 if (word.length === 1)
52967 return '0' + word;
52968 else
52969 return word;
52970}
52971exports.zero2 = zero2;
52972
52973function zero8(word) {
52974 if (word.length === 7)
52975 return '0' + word;
52976 else if (word.length === 6)
52977 return '00' + word;
52978 else if (word.length === 5)
52979 return '000' + word;
52980 else if (word.length === 4)
52981 return '0000' + word;
52982 else if (word.length === 3)
52983 return '00000' + word;
52984 else if (word.length === 2)
52985 return '000000' + word;
52986 else if (word.length === 1)
52987 return '0000000' + word;
52988 else
52989 return word;
52990}
52991exports.zero8 = zero8;
52992
52993function join32(msg, start, end, endian) {
52994 var len = end - start;
52995 assert(len % 4 === 0);
52996 var res = new Array(len / 4);
52997 for (var i = 0, k = start; i < res.length; i++, k += 4) {
52998 var w;
52999 if (endian === 'big')
53000 w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
53001 else
53002 w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
53003 res[i] = w >>> 0;
53004 }
53005 return res;
53006}
53007exports.join32 = join32;
53008
53009function split32(msg, endian) {
53010 var res = new Array(msg.length * 4);
53011 for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
53012 var m = msg[i];
53013 if (endian === 'big') {
53014 res[k] = m >>> 24;
53015 res[k + 1] = (m >>> 16) & 0xff;
53016 res[k + 2] = (m >>> 8) & 0xff;
53017 res[k + 3] = m & 0xff;
53018 } else {
53019 res[k + 3] = m >>> 24;
53020 res[k + 2] = (m >>> 16) & 0xff;
53021 res[k + 1] = (m >>> 8) & 0xff;
53022 res[k] = m & 0xff;
53023 }
53024 }
53025 return res;
53026}
53027exports.split32 = split32;
53028
53029function rotr32(w, b) {
53030 return (w >>> b) | (w << (32 - b));
53031}
53032exports.rotr32 = rotr32;
53033
53034function rotl32(w, b) {
53035 return (w << b) | (w >>> (32 - b));
53036}
53037exports.rotl32 = rotl32;
53038
53039function sum32(a, b) {
53040 return (a + b) >>> 0;
53041}
53042exports.sum32 = sum32;
53043
53044function sum32_3(a, b, c) {
53045 return (a + b + c) >>> 0;
53046}
53047exports.sum32_3 = sum32_3;
53048
53049function sum32_4(a, b, c, d) {
53050 return (a + b + c + d) >>> 0;
53051}
53052exports.sum32_4 = sum32_4;
53053
53054function sum32_5(a, b, c, d, e) {
53055 return (a + b + c + d + e) >>> 0;
53056}
53057exports.sum32_5 = sum32_5;
53058
53059function sum64(buf, pos, ah, al) {
53060 var bh = buf[pos];
53061 var bl = buf[pos + 1];
53062
53063 var lo = (al + bl) >>> 0;
53064 var hi = (lo < al ? 1 : 0) + ah + bh;
53065 buf[pos] = hi >>> 0;
53066 buf[pos + 1] = lo;
53067}
53068exports.sum64 = sum64;
53069
53070function sum64_hi(ah, al, bh, bl) {
53071 var lo = (al + bl) >>> 0;
53072 var hi = (lo < al ? 1 : 0) + ah + bh;
53073 return hi >>> 0;
53074}
53075exports.sum64_hi = sum64_hi;
53076
53077function sum64_lo(ah, al, bh, bl) {
53078 var lo = al + bl;
53079 return lo >>> 0;
53080}
53081exports.sum64_lo = sum64_lo;
53082
53083function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
53084 var carry = 0;
53085 var lo = al;
53086 lo = (lo + bl) >>> 0;
53087 carry += lo < al ? 1 : 0;
53088 lo = (lo + cl) >>> 0;
53089 carry += lo < cl ? 1 : 0;
53090 lo = (lo + dl) >>> 0;
53091 carry += lo < dl ? 1 : 0;
53092
53093 var hi = ah + bh + ch + dh + carry;
53094 return hi >>> 0;
53095}
53096exports.sum64_4_hi = sum64_4_hi;
53097
53098function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
53099 var lo = al + bl + cl + dl;
53100 return lo >>> 0;
53101}
53102exports.sum64_4_lo = sum64_4_lo;
53103
53104function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
53105 var carry = 0;
53106 var lo = al;
53107 lo = (lo + bl) >>> 0;
53108 carry += lo < al ? 1 : 0;
53109 lo = (lo + cl) >>> 0;
53110 carry += lo < cl ? 1 : 0;
53111 lo = (lo + dl) >>> 0;
53112 carry += lo < dl ? 1 : 0;
53113 lo = (lo + el) >>> 0;
53114 carry += lo < el ? 1 : 0;
53115
53116 var hi = ah + bh + ch + dh + eh + carry;
53117 return hi >>> 0;
53118}
53119exports.sum64_5_hi = sum64_5_hi;
53120
53121function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
53122 var lo = al + bl + cl + dl + el;
53123
53124 return lo >>> 0;
53125}
53126exports.sum64_5_lo = sum64_5_lo;
53127
53128function rotr64_hi(ah, al, num) {
53129 var r = (al << (32 - num)) | (ah >>> num);
53130 return r >>> 0;
53131}
53132exports.rotr64_hi = rotr64_hi;
53133
53134function rotr64_lo(ah, al, num) {
53135 var r = (ah << (32 - num)) | (al >>> num);
53136 return r >>> 0;
53137}
53138exports.rotr64_lo = rotr64_lo;
53139
53140function shr64_hi(ah, al, num) {
53141 return ah >>> num;
53142}
53143exports.shr64_hi = shr64_hi;
53144
53145function shr64_lo(ah, al, num) {
53146 var r = (ah << (32 - num)) | (al >>> num);
53147 return r >>> 0;
53148}
53149exports.shr64_lo = shr64_lo;
53150
53151
53152/***/ }),
53153
53154/***/ "./node_modules/hmac-drbg/lib/hmac-drbg.js":
53155/*!*************************************************!*\
53156 !*** ./node_modules/hmac-drbg/lib/hmac-drbg.js ***!
53157 \*************************************************/
53158/*! no static exports found */
53159/***/ (function(module, exports, __webpack_require__) {
53160
53161"use strict";
53162
53163
53164var hash = __webpack_require__(/*! hash.js */ "./node_modules/hash.js/lib/hash.js");
53165var utils = __webpack_require__(/*! minimalistic-crypto-utils */ "./node_modules/minimalistic-crypto-utils/lib/utils.js");
53166var assert = __webpack_require__(/*! minimalistic-assert */ "./node_modules/minimalistic-assert/index.js");
53167
53168function HmacDRBG(options) {
53169 if (!(this instanceof HmacDRBG))
53170 return new HmacDRBG(options);
53171 this.hash = options.hash;
53172 this.predResist = !!options.predResist;
53173
53174 this.outLen = this.hash.outSize;
53175 this.minEntropy = options.minEntropy || this.hash.hmacStrength;
53176
53177 this._reseed = null;
53178 this.reseedInterval = null;
53179 this.K = null;
53180 this.V = null;
53181
53182 var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');
53183 var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');
53184 var pers = utils.toArray(options.pers, options.persEnc || 'hex');
53185 assert(entropy.length >= (this.minEntropy / 8),
53186 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
53187 this._init(entropy, nonce, pers);
53188}
53189module.exports = HmacDRBG;
53190
53191HmacDRBG.prototype._init = function init(entropy, nonce, pers) {
53192 var seed = entropy.concat(nonce).concat(pers);
53193
53194 this.K = new Array(this.outLen / 8);
53195 this.V = new Array(this.outLen / 8);
53196 for (var i = 0; i < this.V.length; i++) {
53197 this.K[i] = 0x00;
53198 this.V[i] = 0x01;
53199 }
53200
53201 this._update(seed);
53202 this._reseed = 1;
53203 this.reseedInterval = 0x1000000000000; // 2^48
53204};
53205
53206HmacDRBG.prototype._hmac = function hmac() {
53207 return new hash.hmac(this.hash, this.K);
53208};
53209
53210HmacDRBG.prototype._update = function update(seed) {
53211 var kmac = this._hmac()
53212 .update(this.V)
53213 .update([ 0x00 ]);
53214 if (seed)
53215 kmac = kmac.update(seed);
53216 this.K = kmac.digest();
53217 this.V = this._hmac().update(this.V).digest();
53218 if (!seed)
53219 return;
53220
53221 this.K = this._hmac()
53222 .update(this.V)
53223 .update([ 0x01 ])
53224 .update(seed)
53225 .digest();
53226 this.V = this._hmac().update(this.V).digest();
53227};
53228
53229HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {
53230 // Optional entropy enc
53231 if (typeof entropyEnc !== 'string') {
53232 addEnc = add;
53233 add = entropyEnc;
53234 entropyEnc = null;
53235 }
53236
53237 entropy = utils.toArray(entropy, entropyEnc);
53238 add = utils.toArray(add, addEnc);
53239
53240 assert(entropy.length >= (this.minEntropy / 8),
53241 'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
53242
53243 this._update(entropy.concat(add || []));
53244 this._reseed = 1;
53245};
53246
53247HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
53248 if (this._reseed > this.reseedInterval)
53249 throw new Error('Reseed is required');
53250
53251 // Optional encoding
53252 if (typeof enc !== 'string') {
53253 addEnc = add;
53254 add = enc;
53255 enc = null;
53256 }
53257
53258 // Optional additional data
53259 if (add) {
53260 add = utils.toArray(add, addEnc || 'hex');
53261 this._update(add);
53262 }
53263
53264 var temp = [];
53265 while (temp.length < len) {
53266 this.V = this._hmac().update(this.V).digest();
53267 temp = temp.concat(this.V);
53268 }
53269
53270 var res = temp.slice(0, len);
53271 this._update(add);
53272 this._reseed++;
53273 return utils.encode(res, enc);
53274};
53275
53276
53277/***/ }),
53278
53279/***/ "./node_modules/ieee754/index.js":
53280/*!***************************************!*\
53281 !*** ./node_modules/ieee754/index.js ***!
53282 \***************************************/
53283/*! no static exports found */
53284/***/ (function(module, exports) {
53285
53286exports.read = function (buffer, offset, isLE, mLen, nBytes) {
53287 var e, m
53288 var eLen = (nBytes * 8) - mLen - 1
53289 var eMax = (1 << eLen) - 1
53290 var eBias = eMax >> 1
53291 var nBits = -7
53292 var i = isLE ? (nBytes - 1) : 0
53293 var d = isLE ? -1 : 1
53294 var s = buffer[offset + i]
53295
53296 i += d
53297
53298 e = s & ((1 << (-nBits)) - 1)
53299 s >>= (-nBits)
53300 nBits += eLen
53301 for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
53302
53303 m = e & ((1 << (-nBits)) - 1)
53304 e >>= (-nBits)
53305 nBits += mLen
53306 for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
53307
53308 if (e === 0) {
53309 e = 1 - eBias
53310 } else if (e === eMax) {
53311 return m ? NaN : ((s ? -1 : 1) * Infinity)
53312 } else {
53313 m = m + Math.pow(2, mLen)
53314 e = e - eBias
53315 }
53316 return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
53317}
53318
53319exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
53320 var e, m, c
53321 var eLen = (nBytes * 8) - mLen - 1
53322 var eMax = (1 << eLen) - 1
53323 var eBias = eMax >> 1
53324 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
53325 var i = isLE ? 0 : (nBytes - 1)
53326 var d = isLE ? 1 : -1
53327 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
53328
53329 value = Math.abs(value)
53330
53331 if (isNaN(value) || value === Infinity) {
53332 m = isNaN(value) ? 1 : 0
53333 e = eMax
53334 } else {
53335 e = Math.floor(Math.log(value) / Math.LN2)
53336 if (value * (c = Math.pow(2, -e)) < 1) {
53337 e--
53338 c *= 2
53339 }
53340 if (e + eBias >= 1) {
53341 value += rt / c
53342 } else {
53343 value += rt * Math.pow(2, 1 - eBias)
53344 }
53345 if (value * c >= 2) {
53346 e++
53347 c /= 2
53348 }
53349
53350 if (e + eBias >= eMax) {
53351 m = 0
53352 e = eMax
53353 } else if (e + eBias >= 1) {
53354 m = ((value * c) - 1) * Math.pow(2, mLen)
53355 e = e + eBias
53356 } else {
53357 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
53358 e = 0
53359 }
53360 }
53361
53362 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
53363
53364 e = (e << mLen) | m
53365 eLen += mLen
53366 for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
53367
53368 buffer[offset + i - d] |= s * 128
53369}
53370
53371
53372/***/ }),
53373
53374/***/ "./node_modules/inherits/inherits_browser.js":
53375/*!***************************************************!*\
53376 !*** ./node_modules/inherits/inherits_browser.js ***!
53377 \***************************************************/
53378/*! no static exports found */
53379/***/ (function(module, exports) {
53380
53381if (typeof Object.create === 'function') {
53382 // implementation from standard node.js 'util' module
53383 module.exports = function inherits(ctor, superCtor) {
53384 if (superCtor) {
53385 ctor.super_ = superCtor
53386 ctor.prototype = Object.create(superCtor.prototype, {
53387 constructor: {
53388 value: ctor,
53389 enumerable: false,
53390 writable: true,
53391 configurable: true
53392 }
53393 })
53394 }
53395 };
53396} else {
53397 // old school shim for old browsers
53398 module.exports = function inherits(ctor, superCtor) {
53399 if (superCtor) {
53400 ctor.super_ = superCtor
53401 var TempCtor = function () {}
53402 TempCtor.prototype = superCtor.prototype
53403 ctor.prototype = new TempCtor()
53404 ctor.prototype.constructor = ctor
53405 }
53406 }
53407}
53408
53409
53410/***/ }),
53411
53412/***/ "./node_modules/is-regexp/index.js":
53413/*!*****************************************!*\
53414 !*** ./node_modules/is-regexp/index.js ***!
53415 \*****************************************/
53416/*! no static exports found */
53417/***/ (function(module, exports, __webpack_require__) {
53418
53419"use strict";
53420
53421module.exports = function (re) {
53422 return Object.prototype.toString.call(re) === '[object RegExp]';
53423};
53424
53425
53426/***/ }),
53427
53428/***/ "./node_modules/isarray/index.js":
53429/*!***************************************!*\
53430 !*** ./node_modules/isarray/index.js ***!
53431 \***************************************/
53432/*! no static exports found */
53433/***/ (function(module, exports) {
53434
53435var toString = {}.toString;
53436
53437module.exports = Array.isArray || function (arr) {
53438 return toString.call(arr) == '[object Array]';
53439};
53440
53441
53442/***/ }),
53443
53444/***/ "./node_modules/lodash/_DataView.js":
53445/*!******************************************!*\
53446 !*** ./node_modules/lodash/_DataView.js ***!
53447 \******************************************/
53448/*! no static exports found */
53449/***/ (function(module, exports, __webpack_require__) {
53450
53451var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
53452 root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53453
53454/* Built-in method references that are verified to be native. */
53455var DataView = getNative(root, 'DataView');
53456
53457module.exports = DataView;
53458
53459
53460/***/ }),
53461
53462/***/ "./node_modules/lodash/_Hash.js":
53463/*!**************************************!*\
53464 !*** ./node_modules/lodash/_Hash.js ***!
53465 \**************************************/
53466/*! no static exports found */
53467/***/ (function(module, exports, __webpack_require__) {
53468
53469var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/lodash/_hashClear.js"),
53470 hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/lodash/_hashDelete.js"),
53471 hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/lodash/_hashGet.js"),
53472 hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/lodash/_hashHas.js"),
53473 hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/lodash/_hashSet.js");
53474
53475/**
53476 * Creates a hash object.
53477 *
53478 * @private
53479 * @constructor
53480 * @param {Array} [entries] The key-value pairs to cache.
53481 */
53482function Hash(entries) {
53483 var index = -1,
53484 length = entries == null ? 0 : entries.length;
53485
53486 this.clear();
53487 while (++index < length) {
53488 var entry = entries[index];
53489 this.set(entry[0], entry[1]);
53490 }
53491}
53492
53493// Add methods to `Hash`.
53494Hash.prototype.clear = hashClear;
53495Hash.prototype['delete'] = hashDelete;
53496Hash.prototype.get = hashGet;
53497Hash.prototype.has = hashHas;
53498Hash.prototype.set = hashSet;
53499
53500module.exports = Hash;
53501
53502
53503/***/ }),
53504
53505/***/ "./node_modules/lodash/_ListCache.js":
53506/*!*******************************************!*\
53507 !*** ./node_modules/lodash/_ListCache.js ***!
53508 \*******************************************/
53509/*! no static exports found */
53510/***/ (function(module, exports, __webpack_require__) {
53511
53512var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"),
53513 listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"),
53514 listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"),
53515 listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"),
53516 listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js");
53517
53518/**
53519 * Creates an list cache object.
53520 *
53521 * @private
53522 * @constructor
53523 * @param {Array} [entries] The key-value pairs to cache.
53524 */
53525function ListCache(entries) {
53526 var index = -1,
53527 length = entries == null ? 0 : entries.length;
53528
53529 this.clear();
53530 while (++index < length) {
53531 var entry = entries[index];
53532 this.set(entry[0], entry[1]);
53533 }
53534}
53535
53536// Add methods to `ListCache`.
53537ListCache.prototype.clear = listCacheClear;
53538ListCache.prototype['delete'] = listCacheDelete;
53539ListCache.prototype.get = listCacheGet;
53540ListCache.prototype.has = listCacheHas;
53541ListCache.prototype.set = listCacheSet;
53542
53543module.exports = ListCache;
53544
53545
53546/***/ }),
53547
53548/***/ "./node_modules/lodash/_Map.js":
53549/*!*************************************!*\
53550 !*** ./node_modules/lodash/_Map.js ***!
53551 \*************************************/
53552/*! no static exports found */
53553/***/ (function(module, exports, __webpack_require__) {
53554
53555var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
53556 root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53557
53558/* Built-in method references that are verified to be native. */
53559var Map = getNative(root, 'Map');
53560
53561module.exports = Map;
53562
53563
53564/***/ }),
53565
53566/***/ "./node_modules/lodash/_MapCache.js":
53567/*!******************************************!*\
53568 !*** ./node_modules/lodash/_MapCache.js ***!
53569 \******************************************/
53570/*! no static exports found */
53571/***/ (function(module, exports, __webpack_require__) {
53572
53573var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/lodash/_mapCacheClear.js"),
53574 mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/lodash/_mapCacheDelete.js"),
53575 mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/lodash/_mapCacheGet.js"),
53576 mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/lodash/_mapCacheHas.js"),
53577 mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/lodash/_mapCacheSet.js");
53578
53579/**
53580 * Creates a map cache object to store key-value pairs.
53581 *
53582 * @private
53583 * @constructor
53584 * @param {Array} [entries] The key-value pairs to cache.
53585 */
53586function MapCache(entries) {
53587 var index = -1,
53588 length = entries == null ? 0 : entries.length;
53589
53590 this.clear();
53591 while (++index < length) {
53592 var entry = entries[index];
53593 this.set(entry[0], entry[1]);
53594 }
53595}
53596
53597// Add methods to `MapCache`.
53598MapCache.prototype.clear = mapCacheClear;
53599MapCache.prototype['delete'] = mapCacheDelete;
53600MapCache.prototype.get = mapCacheGet;
53601MapCache.prototype.has = mapCacheHas;
53602MapCache.prototype.set = mapCacheSet;
53603
53604module.exports = MapCache;
53605
53606
53607/***/ }),
53608
53609/***/ "./node_modules/lodash/_Promise.js":
53610/*!*****************************************!*\
53611 !*** ./node_modules/lodash/_Promise.js ***!
53612 \*****************************************/
53613/*! no static exports found */
53614/***/ (function(module, exports, __webpack_require__) {
53615
53616var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
53617 root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53618
53619/* Built-in method references that are verified to be native. */
53620var Promise = getNative(root, 'Promise');
53621
53622module.exports = Promise;
53623
53624
53625/***/ }),
53626
53627/***/ "./node_modules/lodash/_Set.js":
53628/*!*************************************!*\
53629 !*** ./node_modules/lodash/_Set.js ***!
53630 \*************************************/
53631/*! no static exports found */
53632/***/ (function(module, exports, __webpack_require__) {
53633
53634var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
53635 root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53636
53637/* Built-in method references that are verified to be native. */
53638var Set = getNative(root, 'Set');
53639
53640module.exports = Set;
53641
53642
53643/***/ }),
53644
53645/***/ "./node_modules/lodash/_SetCache.js":
53646/*!******************************************!*\
53647 !*** ./node_modules/lodash/_SetCache.js ***!
53648 \******************************************/
53649/*! no static exports found */
53650/***/ (function(module, exports, __webpack_require__) {
53651
53652var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"),
53653 setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/lodash/_setCacheAdd.js"),
53654 setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/lodash/_setCacheHas.js");
53655
53656/**
53657 *
53658 * Creates an array cache object to store unique values.
53659 *
53660 * @private
53661 * @constructor
53662 * @param {Array} [values] The values to cache.
53663 */
53664function SetCache(values) {
53665 var index = -1,
53666 length = values == null ? 0 : values.length;
53667
53668 this.__data__ = new MapCache;
53669 while (++index < length) {
53670 this.add(values[index]);
53671 }
53672}
53673
53674// Add methods to `SetCache`.
53675SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
53676SetCache.prototype.has = setCacheHas;
53677
53678module.exports = SetCache;
53679
53680
53681/***/ }),
53682
53683/***/ "./node_modules/lodash/_Stack.js":
53684/*!***************************************!*\
53685 !*** ./node_modules/lodash/_Stack.js ***!
53686 \***************************************/
53687/*! no static exports found */
53688/***/ (function(module, exports, __webpack_require__) {
53689
53690var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
53691 stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/lodash/_stackClear.js"),
53692 stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/lodash/_stackDelete.js"),
53693 stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/lodash/_stackGet.js"),
53694 stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/lodash/_stackHas.js"),
53695 stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/lodash/_stackSet.js");
53696
53697/**
53698 * Creates a stack cache object to store key-value pairs.
53699 *
53700 * @private
53701 * @constructor
53702 * @param {Array} [entries] The key-value pairs to cache.
53703 */
53704function Stack(entries) {
53705 var data = this.__data__ = new ListCache(entries);
53706 this.size = data.size;
53707}
53708
53709// Add methods to `Stack`.
53710Stack.prototype.clear = stackClear;
53711Stack.prototype['delete'] = stackDelete;
53712Stack.prototype.get = stackGet;
53713Stack.prototype.has = stackHas;
53714Stack.prototype.set = stackSet;
53715
53716module.exports = Stack;
53717
53718
53719/***/ }),
53720
53721/***/ "./node_modules/lodash/_Symbol.js":
53722/*!****************************************!*\
53723 !*** ./node_modules/lodash/_Symbol.js ***!
53724 \****************************************/
53725/*! no static exports found */
53726/***/ (function(module, exports, __webpack_require__) {
53727
53728var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53729
53730/** Built-in value references. */
53731var Symbol = root.Symbol;
53732
53733module.exports = Symbol;
53734
53735
53736/***/ }),
53737
53738/***/ "./node_modules/lodash/_Uint8Array.js":
53739/*!********************************************!*\
53740 !*** ./node_modules/lodash/_Uint8Array.js ***!
53741 \********************************************/
53742/*! no static exports found */
53743/***/ (function(module, exports, __webpack_require__) {
53744
53745var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53746
53747/** Built-in value references. */
53748var Uint8Array = root.Uint8Array;
53749
53750module.exports = Uint8Array;
53751
53752
53753/***/ }),
53754
53755/***/ "./node_modules/lodash/_WeakMap.js":
53756/*!*****************************************!*\
53757 !*** ./node_modules/lodash/_WeakMap.js ***!
53758 \*****************************************/
53759/*! no static exports found */
53760/***/ (function(module, exports, __webpack_require__) {
53761
53762var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"),
53763 root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
53764
53765/* Built-in method references that are verified to be native. */
53766var WeakMap = getNative(root, 'WeakMap');
53767
53768module.exports = WeakMap;
53769
53770
53771/***/ }),
53772
53773/***/ "./node_modules/lodash/_apply.js":
53774/*!***************************************!*\
53775 !*** ./node_modules/lodash/_apply.js ***!
53776 \***************************************/
53777/*! no static exports found */
53778/***/ (function(module, exports) {
53779
53780/**
53781 * A faster alternative to `Function#apply`, this function invokes `func`
53782 * with the `this` binding of `thisArg` and the arguments of `args`.
53783 *
53784 * @private
53785 * @param {Function} func The function to invoke.
53786 * @param {*} thisArg The `this` binding of `func`.
53787 * @param {Array} args The arguments to invoke `func` with.
53788 * @returns {*} Returns the result of `func`.
53789 */
53790function apply(func, thisArg, args) {
53791 switch (args.length) {
53792 case 0: return func.call(thisArg);
53793 case 1: return func.call(thisArg, args[0]);
53794 case 2: return func.call(thisArg, args[0], args[1]);
53795 case 3: return func.call(thisArg, args[0], args[1], args[2]);
53796 }
53797 return func.apply(thisArg, args);
53798}
53799
53800module.exports = apply;
53801
53802
53803/***/ }),
53804
53805/***/ "./node_modules/lodash/_arrayEach.js":
53806/*!*******************************************!*\
53807 !*** ./node_modules/lodash/_arrayEach.js ***!
53808 \*******************************************/
53809/*! no static exports found */
53810/***/ (function(module, exports) {
53811
53812/**
53813 * A specialized version of `_.forEach` for arrays without support for
53814 * iteratee shorthands.
53815 *
53816 * @private
53817 * @param {Array} [array] The array to iterate over.
53818 * @param {Function} iteratee The function invoked per iteration.
53819 * @returns {Array} Returns `array`.
53820 */
53821function arrayEach(array, iteratee) {
53822 var index = -1,
53823 length = array == null ? 0 : array.length;
53824
53825 while (++index < length) {
53826 if (iteratee(array[index], index, array) === false) {
53827 break;
53828 }
53829 }
53830 return array;
53831}
53832
53833module.exports = arrayEach;
53834
53835
53836/***/ }),
53837
53838/***/ "./node_modules/lodash/_arrayFilter.js":
53839/*!*********************************************!*\
53840 !*** ./node_modules/lodash/_arrayFilter.js ***!
53841 \*********************************************/
53842/*! no static exports found */
53843/***/ (function(module, exports) {
53844
53845/**
53846 * A specialized version of `_.filter` for arrays without support for
53847 * iteratee shorthands.
53848 *
53849 * @private
53850 * @param {Array} [array] The array to iterate over.
53851 * @param {Function} predicate The function invoked per iteration.
53852 * @returns {Array} Returns the new filtered array.
53853 */
53854function arrayFilter(array, predicate) {
53855 var index = -1,
53856 length = array == null ? 0 : array.length,
53857 resIndex = 0,
53858 result = [];
53859
53860 while (++index < length) {
53861 var value = array[index];
53862 if (predicate(value, index, array)) {
53863 result[resIndex++] = value;
53864 }
53865 }
53866 return result;
53867}
53868
53869module.exports = arrayFilter;
53870
53871
53872/***/ }),
53873
53874/***/ "./node_modules/lodash/_arrayIncludes.js":
53875/*!***********************************************!*\
53876 !*** ./node_modules/lodash/_arrayIncludes.js ***!
53877 \***********************************************/
53878/*! no static exports found */
53879/***/ (function(module, exports, __webpack_require__) {
53880
53881var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/lodash/_baseIndexOf.js");
53882
53883/**
53884 * A specialized version of `_.includes` for arrays without support for
53885 * specifying an index to search from.
53886 *
53887 * @private
53888 * @param {Array} [array] The array to inspect.
53889 * @param {*} target The value to search for.
53890 * @returns {boolean} Returns `true` if `target` is found, else `false`.
53891 */
53892function arrayIncludes(array, value) {
53893 var length = array == null ? 0 : array.length;
53894 return !!length && baseIndexOf(array, value, 0) > -1;
53895}
53896
53897module.exports = arrayIncludes;
53898
53899
53900/***/ }),
53901
53902/***/ "./node_modules/lodash/_arrayIncludesWith.js":
53903/*!***************************************************!*\
53904 !*** ./node_modules/lodash/_arrayIncludesWith.js ***!
53905 \***************************************************/
53906/*! no static exports found */
53907/***/ (function(module, exports) {
53908
53909/**
53910 * This function is like `arrayIncludes` except that it accepts a comparator.
53911 *
53912 * @private
53913 * @param {Array} [array] The array to inspect.
53914 * @param {*} target The value to search for.
53915 * @param {Function} comparator The comparator invoked per element.
53916 * @returns {boolean} Returns `true` if `target` is found, else `false`.
53917 */
53918function arrayIncludesWith(array, value, comparator) {
53919 var index = -1,
53920 length = array == null ? 0 : array.length;
53921
53922 while (++index < length) {
53923 if (comparator(value, array[index])) {
53924 return true;
53925 }
53926 }
53927 return false;
53928}
53929
53930module.exports = arrayIncludesWith;
53931
53932
53933/***/ }),
53934
53935/***/ "./node_modules/lodash/_arrayLikeKeys.js":
53936/*!***********************************************!*\
53937 !*** ./node_modules/lodash/_arrayLikeKeys.js ***!
53938 \***********************************************/
53939/*! no static exports found */
53940/***/ (function(module, exports, __webpack_require__) {
53941
53942var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"),
53943 isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
53944 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
53945 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
53946 isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
53947 isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
53948
53949/** Used for built-in method references. */
53950var objectProto = Object.prototype;
53951
53952/** Used to check objects for own properties. */
53953var hasOwnProperty = objectProto.hasOwnProperty;
53954
53955/**
53956 * Creates an array of the enumerable property names of the array-like `value`.
53957 *
53958 * @private
53959 * @param {*} value The value to query.
53960 * @param {boolean} inherited Specify returning inherited property names.
53961 * @returns {Array} Returns the array of property names.
53962 */
53963function arrayLikeKeys(value, inherited) {
53964 var isArr = isArray(value),
53965 isArg = !isArr && isArguments(value),
53966 isBuff = !isArr && !isArg && isBuffer(value),
53967 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
53968 skipIndexes = isArr || isArg || isBuff || isType,
53969 result = skipIndexes ? baseTimes(value.length, String) : [],
53970 length = result.length;
53971
53972 for (var key in value) {
53973 if ((inherited || hasOwnProperty.call(value, key)) &&
53974 !(skipIndexes && (
53975 // Safari 9 has enumerable `arguments.length` in strict mode.
53976 key == 'length' ||
53977 // Node.js 0.10 has enumerable non-index properties on buffers.
53978 (isBuff && (key == 'offset' || key == 'parent')) ||
53979 // PhantomJS 2 has enumerable non-index properties on typed arrays.
53980 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
53981 // Skip index properties.
53982 isIndex(key, length)
53983 ))) {
53984 result.push(key);
53985 }
53986 }
53987 return result;
53988}
53989
53990module.exports = arrayLikeKeys;
53991
53992
53993/***/ }),
53994
53995/***/ "./node_modules/lodash/_arrayMap.js":
53996/*!******************************************!*\
53997 !*** ./node_modules/lodash/_arrayMap.js ***!
53998 \******************************************/
53999/*! no static exports found */
54000/***/ (function(module, exports) {
54001
54002/**
54003 * A specialized version of `_.map` for arrays without support for iteratee
54004 * shorthands.
54005 *
54006 * @private
54007 * @param {Array} [array] The array to iterate over.
54008 * @param {Function} iteratee The function invoked per iteration.
54009 * @returns {Array} Returns the new mapped array.
54010 */
54011function arrayMap(array, iteratee) {
54012 var index = -1,
54013 length = array == null ? 0 : array.length,
54014 result = Array(length);
54015
54016 while (++index < length) {
54017 result[index] = iteratee(array[index], index, array);
54018 }
54019 return result;
54020}
54021
54022module.exports = arrayMap;
54023
54024
54025/***/ }),
54026
54027/***/ "./node_modules/lodash/_arrayPush.js":
54028/*!*******************************************!*\
54029 !*** ./node_modules/lodash/_arrayPush.js ***!
54030 \*******************************************/
54031/*! no static exports found */
54032/***/ (function(module, exports) {
54033
54034/**
54035 * Appends the elements of `values` to `array`.
54036 *
54037 * @private
54038 * @param {Array} array The array to modify.
54039 * @param {Array} values The values to append.
54040 * @returns {Array} Returns `array`.
54041 */
54042function arrayPush(array, values) {
54043 var index = -1,
54044 length = values.length,
54045 offset = array.length;
54046
54047 while (++index < length) {
54048 array[offset + index] = values[index];
54049 }
54050 return array;
54051}
54052
54053module.exports = arrayPush;
54054
54055
54056/***/ }),
54057
54058/***/ "./node_modules/lodash/_arrayReduce.js":
54059/*!*********************************************!*\
54060 !*** ./node_modules/lodash/_arrayReduce.js ***!
54061 \*********************************************/
54062/*! no static exports found */
54063/***/ (function(module, exports) {
54064
54065/**
54066 * A specialized version of `_.reduce` for arrays without support for
54067 * iteratee shorthands.
54068 *
54069 * @private
54070 * @param {Array} [array] The array to iterate over.
54071 * @param {Function} iteratee The function invoked per iteration.
54072 * @param {*} [accumulator] The initial value.
54073 * @param {boolean} [initAccum] Specify using the first element of `array` as
54074 * the initial value.
54075 * @returns {*} Returns the accumulated value.
54076 */
54077function arrayReduce(array, iteratee, accumulator, initAccum) {
54078 var index = -1,
54079 length = array == null ? 0 : array.length;
54080
54081 if (initAccum && length) {
54082 accumulator = array[++index];
54083 }
54084 while (++index < length) {
54085 accumulator = iteratee(accumulator, array[index], index, array);
54086 }
54087 return accumulator;
54088}
54089
54090module.exports = arrayReduce;
54091
54092
54093/***/ }),
54094
54095/***/ "./node_modules/lodash/_arraySome.js":
54096/*!*******************************************!*\
54097 !*** ./node_modules/lodash/_arraySome.js ***!
54098 \*******************************************/
54099/*! no static exports found */
54100/***/ (function(module, exports) {
54101
54102/**
54103 * A specialized version of `_.some` for arrays without support for iteratee
54104 * shorthands.
54105 *
54106 * @private
54107 * @param {Array} [array] The array to iterate over.
54108 * @param {Function} predicate The function invoked per iteration.
54109 * @returns {boolean} Returns `true` if any element passes the predicate check,
54110 * else `false`.
54111 */
54112function arraySome(array, predicate) {
54113 var index = -1,
54114 length = array == null ? 0 : array.length;
54115
54116 while (++index < length) {
54117 if (predicate(array[index], index, array)) {
54118 return true;
54119 }
54120 }
54121 return false;
54122}
54123
54124module.exports = arraySome;
54125
54126
54127/***/ }),
54128
54129/***/ "./node_modules/lodash/_asciiSize.js":
54130/*!*******************************************!*\
54131 !*** ./node_modules/lodash/_asciiSize.js ***!
54132 \*******************************************/
54133/*! no static exports found */
54134/***/ (function(module, exports, __webpack_require__) {
54135
54136var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js");
54137
54138/**
54139 * Gets the size of an ASCII `string`.
54140 *
54141 * @private
54142 * @param {string} string The string inspect.
54143 * @returns {number} Returns the string size.
54144 */
54145var asciiSize = baseProperty('length');
54146
54147module.exports = asciiSize;
54148
54149
54150/***/ }),
54151
54152/***/ "./node_modules/lodash/_assignMergeValue.js":
54153/*!**************************************************!*\
54154 !*** ./node_modules/lodash/_assignMergeValue.js ***!
54155 \**************************************************/
54156/*! no static exports found */
54157/***/ (function(module, exports, __webpack_require__) {
54158
54159var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
54160 eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
54161
54162/**
54163 * This function is like `assignValue` except that it doesn't assign
54164 * `undefined` values.
54165 *
54166 * @private
54167 * @param {Object} object The object to modify.
54168 * @param {string} key The key of the property to assign.
54169 * @param {*} value The value to assign.
54170 */
54171function assignMergeValue(object, key, value) {
54172 if ((value !== undefined && !eq(object[key], value)) ||
54173 (value === undefined && !(key in object))) {
54174 baseAssignValue(object, key, value);
54175 }
54176}
54177
54178module.exports = assignMergeValue;
54179
54180
54181/***/ }),
54182
54183/***/ "./node_modules/lodash/_assignValue.js":
54184/*!*********************************************!*\
54185 !*** ./node_modules/lodash/_assignValue.js ***!
54186 \*********************************************/
54187/*! no static exports found */
54188/***/ (function(module, exports, __webpack_require__) {
54189
54190var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
54191 eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
54192
54193/** Used for built-in method references. */
54194var objectProto = Object.prototype;
54195
54196/** Used to check objects for own properties. */
54197var hasOwnProperty = objectProto.hasOwnProperty;
54198
54199/**
54200 * Assigns `value` to `key` of `object` if the existing value is not equivalent
54201 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
54202 * for equality comparisons.
54203 *
54204 * @private
54205 * @param {Object} object The object to modify.
54206 * @param {string} key The key of the property to assign.
54207 * @param {*} value The value to assign.
54208 */
54209function assignValue(object, key, value) {
54210 var objValue = object[key];
54211 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
54212 (value === undefined && !(key in object))) {
54213 baseAssignValue(object, key, value);
54214 }
54215}
54216
54217module.exports = assignValue;
54218
54219
54220/***/ }),
54221
54222/***/ "./node_modules/lodash/_assocIndexOf.js":
54223/*!**********************************************!*\
54224 !*** ./node_modules/lodash/_assocIndexOf.js ***!
54225 \**********************************************/
54226/*! no static exports found */
54227/***/ (function(module, exports, __webpack_require__) {
54228
54229var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js");
54230
54231/**
54232 * Gets the index at which the `key` is found in `array` of key-value pairs.
54233 *
54234 * @private
54235 * @param {Array} array The array to inspect.
54236 * @param {*} key The key to search for.
54237 * @returns {number} Returns the index of the matched value, else `-1`.
54238 */
54239function assocIndexOf(array, key) {
54240 var length = array.length;
54241 while (length--) {
54242 if (eq(array[length][0], key)) {
54243 return length;
54244 }
54245 }
54246 return -1;
54247}
54248
54249module.exports = assocIndexOf;
54250
54251
54252/***/ }),
54253
54254/***/ "./node_modules/lodash/_baseAssign.js":
54255/*!********************************************!*\
54256 !*** ./node_modules/lodash/_baseAssign.js ***!
54257 \********************************************/
54258/*! no static exports found */
54259/***/ (function(module, exports, __webpack_require__) {
54260
54261var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
54262 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
54263
54264/**
54265 * The base implementation of `_.assign` without support for multiple sources
54266 * or `customizer` functions.
54267 *
54268 * @private
54269 * @param {Object} object The destination object.
54270 * @param {Object} source The source object.
54271 * @returns {Object} Returns `object`.
54272 */
54273function baseAssign(object, source) {
54274 return object && copyObject(source, keys(source), object);
54275}
54276
54277module.exports = baseAssign;
54278
54279
54280/***/ }),
54281
54282/***/ "./node_modules/lodash/_baseAssignIn.js":
54283/*!**********************************************!*\
54284 !*** ./node_modules/lodash/_baseAssignIn.js ***!
54285 \**********************************************/
54286/*! no static exports found */
54287/***/ (function(module, exports, __webpack_require__) {
54288
54289var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
54290 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
54291
54292/**
54293 * The base implementation of `_.assignIn` without support for multiple sources
54294 * or `customizer` functions.
54295 *
54296 * @private
54297 * @param {Object} object The destination object.
54298 * @param {Object} source The source object.
54299 * @returns {Object} Returns `object`.
54300 */
54301function baseAssignIn(object, source) {
54302 return object && copyObject(source, keysIn(source), object);
54303}
54304
54305module.exports = baseAssignIn;
54306
54307
54308/***/ }),
54309
54310/***/ "./node_modules/lodash/_baseAssignValue.js":
54311/*!*************************************************!*\
54312 !*** ./node_modules/lodash/_baseAssignValue.js ***!
54313 \*************************************************/
54314/*! no static exports found */
54315/***/ (function(module, exports, __webpack_require__) {
54316
54317var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js");
54318
54319/**
54320 * The base implementation of `assignValue` and `assignMergeValue` without
54321 * value checks.
54322 *
54323 * @private
54324 * @param {Object} object The object to modify.
54325 * @param {string} key The key of the property to assign.
54326 * @param {*} value The value to assign.
54327 */
54328function baseAssignValue(object, key, value) {
54329 if (key == '__proto__' && defineProperty) {
54330 defineProperty(object, key, {
54331 'configurable': true,
54332 'enumerable': true,
54333 'value': value,
54334 'writable': true
54335 });
54336 } else {
54337 object[key] = value;
54338 }
54339}
54340
54341module.exports = baseAssignValue;
54342
54343
54344/***/ }),
54345
54346/***/ "./node_modules/lodash/_baseClone.js":
54347/*!*******************************************!*\
54348 !*** ./node_modules/lodash/_baseClone.js ***!
54349 \*******************************************/
54350/*! no static exports found */
54351/***/ (function(module, exports, __webpack_require__) {
54352
54353var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
54354 arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"),
54355 assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
54356 baseAssign = __webpack_require__(/*! ./_baseAssign */ "./node_modules/lodash/_baseAssign.js"),
54357 baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "./node_modules/lodash/_baseAssignIn.js"),
54358 cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"),
54359 copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"),
54360 copySymbols = __webpack_require__(/*! ./_copySymbols */ "./node_modules/lodash/_copySymbols.js"),
54361 copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "./node_modules/lodash/_copySymbolsIn.js"),
54362 getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"),
54363 getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "./node_modules/lodash/_getAllKeysIn.js"),
54364 getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
54365 initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "./node_modules/lodash/_initCloneArray.js"),
54366 initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "./node_modules/lodash/_initCloneByTag.js"),
54367 initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"),
54368 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
54369 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
54370 isMap = __webpack_require__(/*! ./isMap */ "./node_modules/lodash/isMap.js"),
54371 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
54372 isSet = __webpack_require__(/*! ./isSet */ "./node_modules/lodash/isSet.js"),
54373 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
54374
54375/** Used to compose bitmasks for cloning. */
54376var CLONE_DEEP_FLAG = 1,
54377 CLONE_FLAT_FLAG = 2,
54378 CLONE_SYMBOLS_FLAG = 4;
54379
54380/** `Object#toString` result references. */
54381var argsTag = '[object Arguments]',
54382 arrayTag = '[object Array]',
54383 boolTag = '[object Boolean]',
54384 dateTag = '[object Date]',
54385 errorTag = '[object Error]',
54386 funcTag = '[object Function]',
54387 genTag = '[object GeneratorFunction]',
54388 mapTag = '[object Map]',
54389 numberTag = '[object Number]',
54390 objectTag = '[object Object]',
54391 regexpTag = '[object RegExp]',
54392 setTag = '[object Set]',
54393 stringTag = '[object String]',
54394 symbolTag = '[object Symbol]',
54395 weakMapTag = '[object WeakMap]';
54396
54397var arrayBufferTag = '[object ArrayBuffer]',
54398 dataViewTag = '[object DataView]',
54399 float32Tag = '[object Float32Array]',
54400 float64Tag = '[object Float64Array]',
54401 int8Tag = '[object Int8Array]',
54402 int16Tag = '[object Int16Array]',
54403 int32Tag = '[object Int32Array]',
54404 uint8Tag = '[object Uint8Array]',
54405 uint8ClampedTag = '[object Uint8ClampedArray]',
54406 uint16Tag = '[object Uint16Array]',
54407 uint32Tag = '[object Uint32Array]';
54408
54409/** Used to identify `toStringTag` values supported by `_.clone`. */
54410var cloneableTags = {};
54411cloneableTags[argsTag] = cloneableTags[arrayTag] =
54412cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
54413cloneableTags[boolTag] = cloneableTags[dateTag] =
54414cloneableTags[float32Tag] = cloneableTags[float64Tag] =
54415cloneableTags[int8Tag] = cloneableTags[int16Tag] =
54416cloneableTags[int32Tag] = cloneableTags[mapTag] =
54417cloneableTags[numberTag] = cloneableTags[objectTag] =
54418cloneableTags[regexpTag] = cloneableTags[setTag] =
54419cloneableTags[stringTag] = cloneableTags[symbolTag] =
54420cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
54421cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
54422cloneableTags[errorTag] = cloneableTags[funcTag] =
54423cloneableTags[weakMapTag] = false;
54424
54425/**
54426 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
54427 * traversed objects.
54428 *
54429 * @private
54430 * @param {*} value The value to clone.
54431 * @param {boolean} bitmask The bitmask flags.
54432 * 1 - Deep clone
54433 * 2 - Flatten inherited properties
54434 * 4 - Clone symbols
54435 * @param {Function} [customizer] The function to customize cloning.
54436 * @param {string} [key] The key of `value`.
54437 * @param {Object} [object] The parent object of `value`.
54438 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
54439 * @returns {*} Returns the cloned value.
54440 */
54441function baseClone(value, bitmask, customizer, key, object, stack) {
54442 var result,
54443 isDeep = bitmask & CLONE_DEEP_FLAG,
54444 isFlat = bitmask & CLONE_FLAT_FLAG,
54445 isFull = bitmask & CLONE_SYMBOLS_FLAG;
54446
54447 if (customizer) {
54448 result = object ? customizer(value, key, object, stack) : customizer(value);
54449 }
54450 if (result !== undefined) {
54451 return result;
54452 }
54453 if (!isObject(value)) {
54454 return value;
54455 }
54456 var isArr = isArray(value);
54457 if (isArr) {
54458 result = initCloneArray(value);
54459 if (!isDeep) {
54460 return copyArray(value, result);
54461 }
54462 } else {
54463 var tag = getTag(value),
54464 isFunc = tag == funcTag || tag == genTag;
54465
54466 if (isBuffer(value)) {
54467 return cloneBuffer(value, isDeep);
54468 }
54469 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
54470 result = (isFlat || isFunc) ? {} : initCloneObject(value);
54471 if (!isDeep) {
54472 return isFlat
54473 ? copySymbolsIn(value, baseAssignIn(result, value))
54474 : copySymbols(value, baseAssign(result, value));
54475 }
54476 } else {
54477 if (!cloneableTags[tag]) {
54478 return object ? value : {};
54479 }
54480 result = initCloneByTag(value, tag, isDeep);
54481 }
54482 }
54483 // Check for circular references and return its corresponding clone.
54484 stack || (stack = new Stack);
54485 var stacked = stack.get(value);
54486 if (stacked) {
54487 return stacked;
54488 }
54489 stack.set(value, result);
54490
54491 if (isSet(value)) {
54492 value.forEach(function(subValue) {
54493 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
54494 });
54495 } else if (isMap(value)) {
54496 value.forEach(function(subValue, key) {
54497 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
54498 });
54499 }
54500
54501 var keysFunc = isFull
54502 ? (isFlat ? getAllKeysIn : getAllKeys)
54503 : (isFlat ? keysIn : keys);
54504
54505 var props = isArr ? undefined : keysFunc(value);
54506 arrayEach(props || value, function(subValue, key) {
54507 if (props) {
54508 key = subValue;
54509 subValue = value[key];
54510 }
54511 // Recursively populate clone (susceptible to call stack limits).
54512 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
54513 });
54514 return result;
54515}
54516
54517module.exports = baseClone;
54518
54519
54520/***/ }),
54521
54522/***/ "./node_modules/lodash/_baseCreate.js":
54523/*!********************************************!*\
54524 !*** ./node_modules/lodash/_baseCreate.js ***!
54525 \********************************************/
54526/*! no static exports found */
54527/***/ (function(module, exports, __webpack_require__) {
54528
54529var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
54530
54531/** Built-in value references. */
54532var objectCreate = Object.create;
54533
54534/**
54535 * The base implementation of `_.create` without support for assigning
54536 * properties to the created object.
54537 *
54538 * @private
54539 * @param {Object} proto The object to inherit from.
54540 * @returns {Object} Returns the new object.
54541 */
54542var baseCreate = (function() {
54543 function object() {}
54544 return function(proto) {
54545 if (!isObject(proto)) {
54546 return {};
54547 }
54548 if (objectCreate) {
54549 return objectCreate(proto);
54550 }
54551 object.prototype = proto;
54552 var result = new object;
54553 object.prototype = undefined;
54554 return result;
54555 };
54556}());
54557
54558module.exports = baseCreate;
54559
54560
54561/***/ }),
54562
54563/***/ "./node_modules/lodash/_baseEach.js":
54564/*!******************************************!*\
54565 !*** ./node_modules/lodash/_baseEach.js ***!
54566 \******************************************/
54567/*! no static exports found */
54568/***/ (function(module, exports, __webpack_require__) {
54569
54570var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"),
54571 createBaseEach = __webpack_require__(/*! ./_createBaseEach */ "./node_modules/lodash/_createBaseEach.js");
54572
54573/**
54574 * The base implementation of `_.forEach` without support for iteratee shorthands.
54575 *
54576 * @private
54577 * @param {Array|Object} collection The collection to iterate over.
54578 * @param {Function} iteratee The function invoked per iteration.
54579 * @returns {Array|Object} Returns `collection`.
54580 */
54581var baseEach = createBaseEach(baseForOwn);
54582
54583module.exports = baseEach;
54584
54585
54586/***/ }),
54587
54588/***/ "./node_modules/lodash/_baseExtremum.js":
54589/*!**********************************************!*\
54590 !*** ./node_modules/lodash/_baseExtremum.js ***!
54591 \**********************************************/
54592/*! no static exports found */
54593/***/ (function(module, exports, __webpack_require__) {
54594
54595var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
54596
54597/**
54598 * The base implementation of methods like `_.max` and `_.min` which accepts a
54599 * `comparator` to determine the extremum value.
54600 *
54601 * @private
54602 * @param {Array} array The array to iterate over.
54603 * @param {Function} iteratee The iteratee invoked per iteration.
54604 * @param {Function} comparator The comparator used to compare values.
54605 * @returns {*} Returns the extremum value.
54606 */
54607function baseExtremum(array, iteratee, comparator) {
54608 var index = -1,
54609 length = array.length;
54610
54611 while (++index < length) {
54612 var value = array[index],
54613 current = iteratee(value);
54614
54615 if (current != null && (computed === undefined
54616 ? (current === current && !isSymbol(current))
54617 : comparator(current, computed)
54618 )) {
54619 var computed = current,
54620 result = value;
54621 }
54622 }
54623 return result;
54624}
54625
54626module.exports = baseExtremum;
54627
54628
54629/***/ }),
54630
54631/***/ "./node_modules/lodash/_baseFilter.js":
54632/*!********************************************!*\
54633 !*** ./node_modules/lodash/_baseFilter.js ***!
54634 \********************************************/
54635/*! no static exports found */
54636/***/ (function(module, exports, __webpack_require__) {
54637
54638var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js");
54639
54640/**
54641 * The base implementation of `_.filter` without support for iteratee shorthands.
54642 *
54643 * @private
54644 * @param {Array|Object} collection The collection to iterate over.
54645 * @param {Function} predicate The function invoked per iteration.
54646 * @returns {Array} Returns the new filtered array.
54647 */
54648function baseFilter(collection, predicate) {
54649 var result = [];
54650 baseEach(collection, function(value, index, collection) {
54651 if (predicate(value, index, collection)) {
54652 result.push(value);
54653 }
54654 });
54655 return result;
54656}
54657
54658module.exports = baseFilter;
54659
54660
54661/***/ }),
54662
54663/***/ "./node_modules/lodash/_baseFindIndex.js":
54664/*!***********************************************!*\
54665 !*** ./node_modules/lodash/_baseFindIndex.js ***!
54666 \***********************************************/
54667/*! no static exports found */
54668/***/ (function(module, exports) {
54669
54670/**
54671 * The base implementation of `_.findIndex` and `_.findLastIndex` without
54672 * support for iteratee shorthands.
54673 *
54674 * @private
54675 * @param {Array} array The array to inspect.
54676 * @param {Function} predicate The function invoked per iteration.
54677 * @param {number} fromIndex The index to search from.
54678 * @param {boolean} [fromRight] Specify iterating from right to left.
54679 * @returns {number} Returns the index of the matched value, else `-1`.
54680 */
54681function baseFindIndex(array, predicate, fromIndex, fromRight) {
54682 var length = array.length,
54683 index = fromIndex + (fromRight ? 1 : -1);
54684
54685 while ((fromRight ? index-- : ++index < length)) {
54686 if (predicate(array[index], index, array)) {
54687 return index;
54688 }
54689 }
54690 return -1;
54691}
54692
54693module.exports = baseFindIndex;
54694
54695
54696/***/ }),
54697
54698/***/ "./node_modules/lodash/_baseFlatten.js":
54699/*!*********************************************!*\
54700 !*** ./node_modules/lodash/_baseFlatten.js ***!
54701 \*********************************************/
54702/*! no static exports found */
54703/***/ (function(module, exports, __webpack_require__) {
54704
54705var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
54706 isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js");
54707
54708/**
54709 * The base implementation of `_.flatten` with support for restricting flattening.
54710 *
54711 * @private
54712 * @param {Array} array The array to flatten.
54713 * @param {number} depth The maximum recursion depth.
54714 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
54715 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
54716 * @param {Array} [result=[]] The initial result value.
54717 * @returns {Array} Returns the new flattened array.
54718 */
54719function baseFlatten(array, depth, predicate, isStrict, result) {
54720 var index = -1,
54721 length = array.length;
54722
54723 predicate || (predicate = isFlattenable);
54724 result || (result = []);
54725
54726 while (++index < length) {
54727 var value = array[index];
54728 if (depth > 0 && predicate(value)) {
54729 if (depth > 1) {
54730 // Recursively flatten arrays (susceptible to call stack limits).
54731 baseFlatten(value, depth - 1, predicate, isStrict, result);
54732 } else {
54733 arrayPush(result, value);
54734 }
54735 } else if (!isStrict) {
54736 result[result.length] = value;
54737 }
54738 }
54739 return result;
54740}
54741
54742module.exports = baseFlatten;
54743
54744
54745/***/ }),
54746
54747/***/ "./node_modules/lodash/_baseFor.js":
54748/*!*****************************************!*\
54749 !*** ./node_modules/lodash/_baseFor.js ***!
54750 \*****************************************/
54751/*! no static exports found */
54752/***/ (function(module, exports, __webpack_require__) {
54753
54754var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js");
54755
54756/**
54757 * The base implementation of `baseForOwn` which iterates over `object`
54758 * properties returned by `keysFunc` and invokes `iteratee` for each property.
54759 * Iteratee functions may exit iteration early by explicitly returning `false`.
54760 *
54761 * @private
54762 * @param {Object} object The object to iterate over.
54763 * @param {Function} iteratee The function invoked per iteration.
54764 * @param {Function} keysFunc The function to get the keys of `object`.
54765 * @returns {Object} Returns `object`.
54766 */
54767var baseFor = createBaseFor();
54768
54769module.exports = baseFor;
54770
54771
54772/***/ }),
54773
54774/***/ "./node_modules/lodash/_baseForOwn.js":
54775/*!********************************************!*\
54776 !*** ./node_modules/lodash/_baseForOwn.js ***!
54777 \********************************************/
54778/*! no static exports found */
54779/***/ (function(module, exports, __webpack_require__) {
54780
54781var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"),
54782 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
54783
54784/**
54785 * The base implementation of `_.forOwn` without support for iteratee shorthands.
54786 *
54787 * @private
54788 * @param {Object} object The object to iterate over.
54789 * @param {Function} iteratee The function invoked per iteration.
54790 * @returns {Object} Returns `object`.
54791 */
54792function baseForOwn(object, iteratee) {
54793 return object && baseFor(object, iteratee, keys);
54794}
54795
54796module.exports = baseForOwn;
54797
54798
54799/***/ }),
54800
54801/***/ "./node_modules/lodash/_baseGet.js":
54802/*!*****************************************!*\
54803 !*** ./node_modules/lodash/_baseGet.js ***!
54804 \*****************************************/
54805/*! no static exports found */
54806/***/ (function(module, exports, __webpack_require__) {
54807
54808var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"),
54809 toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
54810
54811/**
54812 * The base implementation of `_.get` without support for default values.
54813 *
54814 * @private
54815 * @param {Object} object The object to query.
54816 * @param {Array|string} path The path of the property to get.
54817 * @returns {*} Returns the resolved value.
54818 */
54819function baseGet(object, path) {
54820 path = castPath(path, object);
54821
54822 var index = 0,
54823 length = path.length;
54824
54825 while (object != null && index < length) {
54826 object = object[toKey(path[index++])];
54827 }
54828 return (index && index == length) ? object : undefined;
54829}
54830
54831module.exports = baseGet;
54832
54833
54834/***/ }),
54835
54836/***/ "./node_modules/lodash/_baseGetAllKeys.js":
54837/*!************************************************!*\
54838 !*** ./node_modules/lodash/_baseGetAllKeys.js ***!
54839 \************************************************/
54840/*! no static exports found */
54841/***/ (function(module, exports, __webpack_require__) {
54842
54843var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
54844 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
54845
54846/**
54847 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
54848 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
54849 * symbols of `object`.
54850 *
54851 * @private
54852 * @param {Object} object The object to query.
54853 * @param {Function} keysFunc The function to get the keys of `object`.
54854 * @param {Function} symbolsFunc The function to get the symbols of `object`.
54855 * @returns {Array} Returns the array of property names and symbols.
54856 */
54857function baseGetAllKeys(object, keysFunc, symbolsFunc) {
54858 var result = keysFunc(object);
54859 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
54860}
54861
54862module.exports = baseGetAllKeys;
54863
54864
54865/***/ }),
54866
54867/***/ "./node_modules/lodash/_baseGetTag.js":
54868/*!********************************************!*\
54869 !*** ./node_modules/lodash/_baseGetTag.js ***!
54870 \********************************************/
54871/*! no static exports found */
54872/***/ (function(module, exports, __webpack_require__) {
54873
54874var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
54875 getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
54876 objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
54877
54878/** `Object#toString` result references. */
54879var nullTag = '[object Null]',
54880 undefinedTag = '[object Undefined]';
54881
54882/** Built-in value references. */
54883var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
54884
54885/**
54886 * The base implementation of `getTag` without fallbacks for buggy environments.
54887 *
54888 * @private
54889 * @param {*} value The value to query.
54890 * @returns {string} Returns the `toStringTag`.
54891 */
54892function baseGetTag(value) {
54893 if (value == null) {
54894 return value === undefined ? undefinedTag : nullTag;
54895 }
54896 return (symToStringTag && symToStringTag in Object(value))
54897 ? getRawTag(value)
54898 : objectToString(value);
54899}
54900
54901module.exports = baseGetTag;
54902
54903
54904/***/ }),
54905
54906/***/ "./node_modules/lodash/_baseGt.js":
54907/*!****************************************!*\
54908 !*** ./node_modules/lodash/_baseGt.js ***!
54909 \****************************************/
54910/*! no static exports found */
54911/***/ (function(module, exports) {
54912
54913/**
54914 * The base implementation of `_.gt` which doesn't coerce arguments.
54915 *
54916 * @private
54917 * @param {*} value The value to compare.
54918 * @param {*} other The other value to compare.
54919 * @returns {boolean} Returns `true` if `value` is greater than `other`,
54920 * else `false`.
54921 */
54922function baseGt(value, other) {
54923 return value > other;
54924}
54925
54926module.exports = baseGt;
54927
54928
54929/***/ }),
54930
54931/***/ "./node_modules/lodash/_baseHas.js":
54932/*!*****************************************!*\
54933 !*** ./node_modules/lodash/_baseHas.js ***!
54934 \*****************************************/
54935/*! no static exports found */
54936/***/ (function(module, exports) {
54937
54938/** Used for built-in method references. */
54939var objectProto = Object.prototype;
54940
54941/** Used to check objects for own properties. */
54942var hasOwnProperty = objectProto.hasOwnProperty;
54943
54944/**
54945 * The base implementation of `_.has` without support for deep paths.
54946 *
54947 * @private
54948 * @param {Object} [object] The object to query.
54949 * @param {Array|string} key The key to check.
54950 * @returns {boolean} Returns `true` if `key` exists, else `false`.
54951 */
54952function baseHas(object, key) {
54953 return object != null && hasOwnProperty.call(object, key);
54954}
54955
54956module.exports = baseHas;
54957
54958
54959/***/ }),
54960
54961/***/ "./node_modules/lodash/_baseHasIn.js":
54962/*!*******************************************!*\
54963 !*** ./node_modules/lodash/_baseHasIn.js ***!
54964 \*******************************************/
54965/*! no static exports found */
54966/***/ (function(module, exports) {
54967
54968/**
54969 * The base implementation of `_.hasIn` without support for deep paths.
54970 *
54971 * @private
54972 * @param {Object} [object] The object to query.
54973 * @param {Array|string} key The key to check.
54974 * @returns {boolean} Returns `true` if `key` exists, else `false`.
54975 */
54976function baseHasIn(object, key) {
54977 return object != null && key in Object(object);
54978}
54979
54980module.exports = baseHasIn;
54981
54982
54983/***/ }),
54984
54985/***/ "./node_modules/lodash/_baseIndexOf.js":
54986/*!*********************************************!*\
54987 !*** ./node_modules/lodash/_baseIndexOf.js ***!
54988 \*********************************************/
54989/*! no static exports found */
54990/***/ (function(module, exports, __webpack_require__) {
54991
54992var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"),
54993 baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/lodash/_baseIsNaN.js"),
54994 strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/lodash/_strictIndexOf.js");
54995
54996/**
54997 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
54998 *
54999 * @private
55000 * @param {Array} array The array to inspect.
55001 * @param {*} value The value to search for.
55002 * @param {number} fromIndex The index to search from.
55003 * @returns {number} Returns the index of the matched value, else `-1`.
55004 */
55005function baseIndexOf(array, value, fromIndex) {
55006 return value === value
55007 ? strictIndexOf(array, value, fromIndex)
55008 : baseFindIndex(array, baseIsNaN, fromIndex);
55009}
55010
55011module.exports = baseIndexOf;
55012
55013
55014/***/ }),
55015
55016/***/ "./node_modules/lodash/_baseIsArguments.js":
55017/*!*************************************************!*\
55018 !*** ./node_modules/lodash/_baseIsArguments.js ***!
55019 \*************************************************/
55020/*! no static exports found */
55021/***/ (function(module, exports, __webpack_require__) {
55022
55023var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
55024 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
55025
55026/** `Object#toString` result references. */
55027var argsTag = '[object Arguments]';
55028
55029/**
55030 * The base implementation of `_.isArguments`.
55031 *
55032 * @private
55033 * @param {*} value The value to check.
55034 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
55035 */
55036function baseIsArguments(value) {
55037 return isObjectLike(value) && baseGetTag(value) == argsTag;
55038}
55039
55040module.exports = baseIsArguments;
55041
55042
55043/***/ }),
55044
55045/***/ "./node_modules/lodash/_baseIsEqual.js":
55046/*!*********************************************!*\
55047 !*** ./node_modules/lodash/_baseIsEqual.js ***!
55048 \*********************************************/
55049/*! no static exports found */
55050/***/ (function(module, exports, __webpack_require__) {
55051
55052var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/lodash/_baseIsEqualDeep.js"),
55053 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
55054
55055/**
55056 * The base implementation of `_.isEqual` which supports partial comparisons
55057 * and tracks traversed objects.
55058 *
55059 * @private
55060 * @param {*} value The value to compare.
55061 * @param {*} other The other value to compare.
55062 * @param {boolean} bitmask The bitmask flags.
55063 * 1 - Unordered comparison
55064 * 2 - Partial comparison
55065 * @param {Function} [customizer] The function to customize comparisons.
55066 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
55067 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
55068 */
55069function baseIsEqual(value, other, bitmask, customizer, stack) {
55070 if (value === other) {
55071 return true;
55072 }
55073 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
55074 return value !== value && other !== other;
55075 }
55076 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
55077}
55078
55079module.exports = baseIsEqual;
55080
55081
55082/***/ }),
55083
55084/***/ "./node_modules/lodash/_baseIsEqualDeep.js":
55085/*!*************************************************!*\
55086 !*** ./node_modules/lodash/_baseIsEqualDeep.js ***!
55087 \*************************************************/
55088/*! no static exports found */
55089/***/ (function(module, exports, __webpack_require__) {
55090
55091var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
55092 equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"),
55093 equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/lodash/_equalByTag.js"),
55094 equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/lodash/_equalObjects.js"),
55095 getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
55096 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
55097 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
55098 isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
55099
55100/** Used to compose bitmasks for value comparisons. */
55101var COMPARE_PARTIAL_FLAG = 1;
55102
55103/** `Object#toString` result references. */
55104var argsTag = '[object Arguments]',
55105 arrayTag = '[object Array]',
55106 objectTag = '[object Object]';
55107
55108/** Used for built-in method references. */
55109var objectProto = Object.prototype;
55110
55111/** Used to check objects for own properties. */
55112var hasOwnProperty = objectProto.hasOwnProperty;
55113
55114/**
55115 * A specialized version of `baseIsEqual` for arrays and objects which performs
55116 * deep comparisons and tracks traversed objects enabling objects with circular
55117 * references to be compared.
55118 *
55119 * @private
55120 * @param {Object} object The object to compare.
55121 * @param {Object} other The other object to compare.
55122 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
55123 * @param {Function} customizer The function to customize comparisons.
55124 * @param {Function} equalFunc The function to determine equivalents of values.
55125 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
55126 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
55127 */
55128function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
55129 var objIsArr = isArray(object),
55130 othIsArr = isArray(other),
55131 objTag = objIsArr ? arrayTag : getTag(object),
55132 othTag = othIsArr ? arrayTag : getTag(other);
55133
55134 objTag = objTag == argsTag ? objectTag : objTag;
55135 othTag = othTag == argsTag ? objectTag : othTag;
55136
55137 var objIsObj = objTag == objectTag,
55138 othIsObj = othTag == objectTag,
55139 isSameTag = objTag == othTag;
55140
55141 if (isSameTag && isBuffer(object)) {
55142 if (!isBuffer(other)) {
55143 return false;
55144 }
55145 objIsArr = true;
55146 objIsObj = false;
55147 }
55148 if (isSameTag && !objIsObj) {
55149 stack || (stack = new Stack);
55150 return (objIsArr || isTypedArray(object))
55151 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
55152 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
55153 }
55154 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
55155 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
55156 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
55157
55158 if (objIsWrapped || othIsWrapped) {
55159 var objUnwrapped = objIsWrapped ? object.value() : object,
55160 othUnwrapped = othIsWrapped ? other.value() : other;
55161
55162 stack || (stack = new Stack);
55163 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
55164 }
55165 }
55166 if (!isSameTag) {
55167 return false;
55168 }
55169 stack || (stack = new Stack);
55170 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
55171}
55172
55173module.exports = baseIsEqualDeep;
55174
55175
55176/***/ }),
55177
55178/***/ "./node_modules/lodash/_baseIsMap.js":
55179/*!*******************************************!*\
55180 !*** ./node_modules/lodash/_baseIsMap.js ***!
55181 \*******************************************/
55182/*! no static exports found */
55183/***/ (function(module, exports, __webpack_require__) {
55184
55185var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
55186 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
55187
55188/** `Object#toString` result references. */
55189var mapTag = '[object Map]';
55190
55191/**
55192 * The base implementation of `_.isMap` without Node.js optimizations.
55193 *
55194 * @private
55195 * @param {*} value The value to check.
55196 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
55197 */
55198function baseIsMap(value) {
55199 return isObjectLike(value) && getTag(value) == mapTag;
55200}
55201
55202module.exports = baseIsMap;
55203
55204
55205/***/ }),
55206
55207/***/ "./node_modules/lodash/_baseIsMatch.js":
55208/*!*********************************************!*\
55209 !*** ./node_modules/lodash/_baseIsMatch.js ***!
55210 \*********************************************/
55211/*! no static exports found */
55212/***/ (function(module, exports, __webpack_require__) {
55213
55214var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
55215 baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js");
55216
55217/** Used to compose bitmasks for value comparisons. */
55218var COMPARE_PARTIAL_FLAG = 1,
55219 COMPARE_UNORDERED_FLAG = 2;
55220
55221/**
55222 * The base implementation of `_.isMatch` without support for iteratee shorthands.
55223 *
55224 * @private
55225 * @param {Object} object The object to inspect.
55226 * @param {Object} source The object of property values to match.
55227 * @param {Array} matchData The property names, values, and compare flags to match.
55228 * @param {Function} [customizer] The function to customize comparisons.
55229 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
55230 */
55231function baseIsMatch(object, source, matchData, customizer) {
55232 var index = matchData.length,
55233 length = index,
55234 noCustomizer = !customizer;
55235
55236 if (object == null) {
55237 return !length;
55238 }
55239 object = Object(object);
55240 while (index--) {
55241 var data = matchData[index];
55242 if ((noCustomizer && data[2])
55243 ? data[1] !== object[data[0]]
55244 : !(data[0] in object)
55245 ) {
55246 return false;
55247 }
55248 }
55249 while (++index < length) {
55250 data = matchData[index];
55251 var key = data[0],
55252 objValue = object[key],
55253 srcValue = data[1];
55254
55255 if (noCustomizer && data[2]) {
55256 if (objValue === undefined && !(key in object)) {
55257 return false;
55258 }
55259 } else {
55260 var stack = new Stack;
55261 if (customizer) {
55262 var result = customizer(objValue, srcValue, key, object, source, stack);
55263 }
55264 if (!(result === undefined
55265 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
55266 : result
55267 )) {
55268 return false;
55269 }
55270 }
55271 }
55272 return true;
55273}
55274
55275module.exports = baseIsMatch;
55276
55277
55278/***/ }),
55279
55280/***/ "./node_modules/lodash/_baseIsNaN.js":
55281/*!*******************************************!*\
55282 !*** ./node_modules/lodash/_baseIsNaN.js ***!
55283 \*******************************************/
55284/*! no static exports found */
55285/***/ (function(module, exports) {
55286
55287/**
55288 * The base implementation of `_.isNaN` without support for number objects.
55289 *
55290 * @private
55291 * @param {*} value The value to check.
55292 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
55293 */
55294function baseIsNaN(value) {
55295 return value !== value;
55296}
55297
55298module.exports = baseIsNaN;
55299
55300
55301/***/ }),
55302
55303/***/ "./node_modules/lodash/_baseIsNative.js":
55304/*!**********************************************!*\
55305 !*** ./node_modules/lodash/_baseIsNative.js ***!
55306 \**********************************************/
55307/*! no static exports found */
55308/***/ (function(module, exports, __webpack_require__) {
55309
55310var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
55311 isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"),
55312 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
55313 toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js");
55314
55315/**
55316 * Used to match `RegExp`
55317 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
55318 */
55319var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
55320
55321/** Used to detect host constructors (Safari). */
55322var reIsHostCtor = /^\[object .+?Constructor\]$/;
55323
55324/** Used for built-in method references. */
55325var funcProto = Function.prototype,
55326 objectProto = Object.prototype;
55327
55328/** Used to resolve the decompiled source of functions. */
55329var funcToString = funcProto.toString;
55330
55331/** Used to check objects for own properties. */
55332var hasOwnProperty = objectProto.hasOwnProperty;
55333
55334/** Used to detect if a method is native. */
55335var reIsNative = RegExp('^' +
55336 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
55337 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
55338);
55339
55340/**
55341 * The base implementation of `_.isNative` without bad shim checks.
55342 *
55343 * @private
55344 * @param {*} value The value to check.
55345 * @returns {boolean} Returns `true` if `value` is a native function,
55346 * else `false`.
55347 */
55348function baseIsNative(value) {
55349 if (!isObject(value) || isMasked(value)) {
55350 return false;
55351 }
55352 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
55353 return pattern.test(toSource(value));
55354}
55355
55356module.exports = baseIsNative;
55357
55358
55359/***/ }),
55360
55361/***/ "./node_modules/lodash/_baseIsSet.js":
55362/*!*******************************************!*\
55363 !*** ./node_modules/lodash/_baseIsSet.js ***!
55364 \*******************************************/
55365/*! no static exports found */
55366/***/ (function(module, exports, __webpack_require__) {
55367
55368var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
55369 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
55370
55371/** `Object#toString` result references. */
55372var setTag = '[object Set]';
55373
55374/**
55375 * The base implementation of `_.isSet` without Node.js optimizations.
55376 *
55377 * @private
55378 * @param {*} value The value to check.
55379 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
55380 */
55381function baseIsSet(value) {
55382 return isObjectLike(value) && getTag(value) == setTag;
55383}
55384
55385module.exports = baseIsSet;
55386
55387
55388/***/ }),
55389
55390/***/ "./node_modules/lodash/_baseIsTypedArray.js":
55391/*!**************************************************!*\
55392 !*** ./node_modules/lodash/_baseIsTypedArray.js ***!
55393 \**************************************************/
55394/*! no static exports found */
55395/***/ (function(module, exports, __webpack_require__) {
55396
55397var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
55398 isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"),
55399 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
55400
55401/** `Object#toString` result references. */
55402var argsTag = '[object Arguments]',
55403 arrayTag = '[object Array]',
55404 boolTag = '[object Boolean]',
55405 dateTag = '[object Date]',
55406 errorTag = '[object Error]',
55407 funcTag = '[object Function]',
55408 mapTag = '[object Map]',
55409 numberTag = '[object Number]',
55410 objectTag = '[object Object]',
55411 regexpTag = '[object RegExp]',
55412 setTag = '[object Set]',
55413 stringTag = '[object String]',
55414 weakMapTag = '[object WeakMap]';
55415
55416var arrayBufferTag = '[object ArrayBuffer]',
55417 dataViewTag = '[object DataView]',
55418 float32Tag = '[object Float32Array]',
55419 float64Tag = '[object Float64Array]',
55420 int8Tag = '[object Int8Array]',
55421 int16Tag = '[object Int16Array]',
55422 int32Tag = '[object Int32Array]',
55423 uint8Tag = '[object Uint8Array]',
55424 uint8ClampedTag = '[object Uint8ClampedArray]',
55425 uint16Tag = '[object Uint16Array]',
55426 uint32Tag = '[object Uint32Array]';
55427
55428/** Used to identify `toStringTag` values of typed arrays. */
55429var typedArrayTags = {};
55430typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
55431typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
55432typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
55433typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
55434typedArrayTags[uint32Tag] = true;
55435typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
55436typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
55437typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
55438typedArrayTags[errorTag] = typedArrayTags[funcTag] =
55439typedArrayTags[mapTag] = typedArrayTags[numberTag] =
55440typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
55441typedArrayTags[setTag] = typedArrayTags[stringTag] =
55442typedArrayTags[weakMapTag] = false;
55443
55444/**
55445 * The base implementation of `_.isTypedArray` without Node.js optimizations.
55446 *
55447 * @private
55448 * @param {*} value The value to check.
55449 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
55450 */
55451function baseIsTypedArray(value) {
55452 return isObjectLike(value) &&
55453 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
55454}
55455
55456module.exports = baseIsTypedArray;
55457
55458
55459/***/ }),
55460
55461/***/ "./node_modules/lodash/_baseIteratee.js":
55462/*!**********************************************!*\
55463 !*** ./node_modules/lodash/_baseIteratee.js ***!
55464 \**********************************************/
55465/*! no static exports found */
55466/***/ (function(module, exports, __webpack_require__) {
55467
55468var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/lodash/_baseMatches.js"),
55469 baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/lodash/_baseMatchesProperty.js"),
55470 identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"),
55471 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
55472 property = __webpack_require__(/*! ./property */ "./node_modules/lodash/property.js");
55473
55474/**
55475 * The base implementation of `_.iteratee`.
55476 *
55477 * @private
55478 * @param {*} [value=_.identity] The value to convert to an iteratee.
55479 * @returns {Function} Returns the iteratee.
55480 */
55481function baseIteratee(value) {
55482 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
55483 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
55484 if (typeof value == 'function') {
55485 return value;
55486 }
55487 if (value == null) {
55488 return identity;
55489 }
55490 if (typeof value == 'object') {
55491 return isArray(value)
55492 ? baseMatchesProperty(value[0], value[1])
55493 : baseMatches(value);
55494 }
55495 return property(value);
55496}
55497
55498module.exports = baseIteratee;
55499
55500
55501/***/ }),
55502
55503/***/ "./node_modules/lodash/_baseKeys.js":
55504/*!******************************************!*\
55505 !*** ./node_modules/lodash/_baseKeys.js ***!
55506 \******************************************/
55507/*! no static exports found */
55508/***/ (function(module, exports, __webpack_require__) {
55509
55510var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
55511 nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/lodash/_nativeKeys.js");
55512
55513/** Used for built-in method references. */
55514var objectProto = Object.prototype;
55515
55516/** Used to check objects for own properties. */
55517var hasOwnProperty = objectProto.hasOwnProperty;
55518
55519/**
55520 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
55521 *
55522 * @private
55523 * @param {Object} object The object to query.
55524 * @returns {Array} Returns the array of property names.
55525 */
55526function baseKeys(object) {
55527 if (!isPrototype(object)) {
55528 return nativeKeys(object);
55529 }
55530 var result = [];
55531 for (var key in Object(object)) {
55532 if (hasOwnProperty.call(object, key) && key != 'constructor') {
55533 result.push(key);
55534 }
55535 }
55536 return result;
55537}
55538
55539module.exports = baseKeys;
55540
55541
55542/***/ }),
55543
55544/***/ "./node_modules/lodash/_baseKeysIn.js":
55545/*!********************************************!*\
55546 !*** ./node_modules/lodash/_baseKeysIn.js ***!
55547 \********************************************/
55548/*! no static exports found */
55549/***/ (function(module, exports, __webpack_require__) {
55550
55551var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
55552 isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
55553 nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js");
55554
55555/** Used for built-in method references. */
55556var objectProto = Object.prototype;
55557
55558/** Used to check objects for own properties. */
55559var hasOwnProperty = objectProto.hasOwnProperty;
55560
55561/**
55562 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
55563 *
55564 * @private
55565 * @param {Object} object The object to query.
55566 * @returns {Array} Returns the array of property names.
55567 */
55568function baseKeysIn(object) {
55569 if (!isObject(object)) {
55570 return nativeKeysIn(object);
55571 }
55572 var isProto = isPrototype(object),
55573 result = [];
55574
55575 for (var key in object) {
55576 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
55577 result.push(key);
55578 }
55579 }
55580 return result;
55581}
55582
55583module.exports = baseKeysIn;
55584
55585
55586/***/ }),
55587
55588/***/ "./node_modules/lodash/_baseLt.js":
55589/*!****************************************!*\
55590 !*** ./node_modules/lodash/_baseLt.js ***!
55591 \****************************************/
55592/*! no static exports found */
55593/***/ (function(module, exports) {
55594
55595/**
55596 * The base implementation of `_.lt` which doesn't coerce arguments.
55597 *
55598 * @private
55599 * @param {*} value The value to compare.
55600 * @param {*} other The other value to compare.
55601 * @returns {boolean} Returns `true` if `value` is less than `other`,
55602 * else `false`.
55603 */
55604function baseLt(value, other) {
55605 return value < other;
55606}
55607
55608module.exports = baseLt;
55609
55610
55611/***/ }),
55612
55613/***/ "./node_modules/lodash/_baseMap.js":
55614/*!*****************************************!*\
55615 !*** ./node_modules/lodash/_baseMap.js ***!
55616 \*****************************************/
55617/*! no static exports found */
55618/***/ (function(module, exports, __webpack_require__) {
55619
55620var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"),
55621 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
55622
55623/**
55624 * The base implementation of `_.map` without support for iteratee shorthands.
55625 *
55626 * @private
55627 * @param {Array|Object} collection The collection to iterate over.
55628 * @param {Function} iteratee The function invoked per iteration.
55629 * @returns {Array} Returns the new mapped array.
55630 */
55631function baseMap(collection, iteratee) {
55632 var index = -1,
55633 result = isArrayLike(collection) ? Array(collection.length) : [];
55634
55635 baseEach(collection, function(value, key, collection) {
55636 result[++index] = iteratee(value, key, collection);
55637 });
55638 return result;
55639}
55640
55641module.exports = baseMap;
55642
55643
55644/***/ }),
55645
55646/***/ "./node_modules/lodash/_baseMatches.js":
55647/*!*********************************************!*\
55648 !*** ./node_modules/lodash/_baseMatches.js ***!
55649 \*********************************************/
55650/*! no static exports found */
55651/***/ (function(module, exports, __webpack_require__) {
55652
55653var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/lodash/_baseIsMatch.js"),
55654 getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/lodash/_getMatchData.js"),
55655 matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js");
55656
55657/**
55658 * The base implementation of `_.matches` which doesn't clone `source`.
55659 *
55660 * @private
55661 * @param {Object} source The object of property values to match.
55662 * @returns {Function} Returns the new spec function.
55663 */
55664function baseMatches(source) {
55665 var matchData = getMatchData(source);
55666 if (matchData.length == 1 && matchData[0][2]) {
55667 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
55668 }
55669 return function(object) {
55670 return object === source || baseIsMatch(object, source, matchData);
55671 };
55672}
55673
55674module.exports = baseMatches;
55675
55676
55677/***/ }),
55678
55679/***/ "./node_modules/lodash/_baseMatchesProperty.js":
55680/*!*****************************************************!*\
55681 !*** ./node_modules/lodash/_baseMatchesProperty.js ***!
55682 \*****************************************************/
55683/*! no static exports found */
55684/***/ (function(module, exports, __webpack_require__) {
55685
55686var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"),
55687 get = __webpack_require__(/*! ./get */ "./node_modules/lodash/get.js"),
55688 hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"),
55689 isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
55690 isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"),
55691 matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"),
55692 toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
55693
55694/** Used to compose bitmasks for value comparisons. */
55695var COMPARE_PARTIAL_FLAG = 1,
55696 COMPARE_UNORDERED_FLAG = 2;
55697
55698/**
55699 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
55700 *
55701 * @private
55702 * @param {string} path The path of the property to get.
55703 * @param {*} srcValue The value to match.
55704 * @returns {Function} Returns the new spec function.
55705 */
55706function baseMatchesProperty(path, srcValue) {
55707 if (isKey(path) && isStrictComparable(srcValue)) {
55708 return matchesStrictComparable(toKey(path), srcValue);
55709 }
55710 return function(object) {
55711 var objValue = get(object, path);
55712 return (objValue === undefined && objValue === srcValue)
55713 ? hasIn(object, path)
55714 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
55715 };
55716}
55717
55718module.exports = baseMatchesProperty;
55719
55720
55721/***/ }),
55722
55723/***/ "./node_modules/lodash/_baseMerge.js":
55724/*!*******************************************!*\
55725 !*** ./node_modules/lodash/_baseMerge.js ***!
55726 \*******************************************/
55727/*! no static exports found */
55728/***/ (function(module, exports, __webpack_require__) {
55729
55730var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"),
55731 assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"),
55732 baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"),
55733 baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"),
55734 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
55735 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"),
55736 safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js");
55737
55738/**
55739 * The base implementation of `_.merge` without support for multiple sources.
55740 *
55741 * @private
55742 * @param {Object} object The destination object.
55743 * @param {Object} source The source object.
55744 * @param {number} srcIndex The index of `source`.
55745 * @param {Function} [customizer] The function to customize merged values.
55746 * @param {Object} [stack] Tracks traversed source values and their merged
55747 * counterparts.
55748 */
55749function baseMerge(object, source, srcIndex, customizer, stack) {
55750 if (object === source) {
55751 return;
55752 }
55753 baseFor(source, function(srcValue, key) {
55754 stack || (stack = new Stack);
55755 if (isObject(srcValue)) {
55756 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
55757 }
55758 else {
55759 var newValue = customizer
55760 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
55761 : undefined;
55762
55763 if (newValue === undefined) {
55764 newValue = srcValue;
55765 }
55766 assignMergeValue(object, key, newValue);
55767 }
55768 }, keysIn);
55769}
55770
55771module.exports = baseMerge;
55772
55773
55774/***/ }),
55775
55776/***/ "./node_modules/lodash/_baseMergeDeep.js":
55777/*!***********************************************!*\
55778 !*** ./node_modules/lodash/_baseMergeDeep.js ***!
55779 \***********************************************/
55780/*! no static exports found */
55781/***/ (function(module, exports, __webpack_require__) {
55782
55783var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"),
55784 cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"),
55785 cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"),
55786 copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"),
55787 initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"),
55788 isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
55789 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
55790 isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"),
55791 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
55792 isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
55793 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
55794 isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"),
55795 isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"),
55796 safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"),
55797 toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js");
55798
55799/**
55800 * A specialized version of `baseMerge` for arrays and objects which performs
55801 * deep merges and tracks traversed objects enabling objects with circular
55802 * references to be merged.
55803 *
55804 * @private
55805 * @param {Object} object The destination object.
55806 * @param {Object} source The source object.
55807 * @param {string} key The key of the value to merge.
55808 * @param {number} srcIndex The index of `source`.
55809 * @param {Function} mergeFunc The function to merge values.
55810 * @param {Function} [customizer] The function to customize assigned values.
55811 * @param {Object} [stack] Tracks traversed source values and their merged
55812 * counterparts.
55813 */
55814function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
55815 var objValue = safeGet(object, key),
55816 srcValue = safeGet(source, key),
55817 stacked = stack.get(srcValue);
55818
55819 if (stacked) {
55820 assignMergeValue(object, key, stacked);
55821 return;
55822 }
55823 var newValue = customizer
55824 ? customizer(objValue, srcValue, (key + ''), object, source, stack)
55825 : undefined;
55826
55827 var isCommon = newValue === undefined;
55828
55829 if (isCommon) {
55830 var isArr = isArray(srcValue),
55831 isBuff = !isArr && isBuffer(srcValue),
55832 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
55833
55834 newValue = srcValue;
55835 if (isArr || isBuff || isTyped) {
55836 if (isArray(objValue)) {
55837 newValue = objValue;
55838 }
55839 else if (isArrayLikeObject(objValue)) {
55840 newValue = copyArray(objValue);
55841 }
55842 else if (isBuff) {
55843 isCommon = false;
55844 newValue = cloneBuffer(srcValue, true);
55845 }
55846 else if (isTyped) {
55847 isCommon = false;
55848 newValue = cloneTypedArray(srcValue, true);
55849 }
55850 else {
55851 newValue = [];
55852 }
55853 }
55854 else if (isPlainObject(srcValue) || isArguments(srcValue)) {
55855 newValue = objValue;
55856 if (isArguments(objValue)) {
55857 newValue = toPlainObject(objValue);
55858 }
55859 else if (!isObject(objValue) || isFunction(objValue)) {
55860 newValue = initCloneObject(srcValue);
55861 }
55862 }
55863 else {
55864 isCommon = false;
55865 }
55866 }
55867 if (isCommon) {
55868 // Recursively merge objects and arrays (susceptible to call stack limits).
55869 stack.set(srcValue, newValue);
55870 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
55871 stack['delete'](srcValue);
55872 }
55873 assignMergeValue(object, key, newValue);
55874}
55875
55876module.exports = baseMergeDeep;
55877
55878
55879/***/ }),
55880
55881/***/ "./node_modules/lodash/_baseOrderBy.js":
55882/*!*********************************************!*\
55883 !*** ./node_modules/lodash/_baseOrderBy.js ***!
55884 \*********************************************/
55885/*! no static exports found */
55886/***/ (function(module, exports, __webpack_require__) {
55887
55888var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"),
55889 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
55890 baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"),
55891 baseSortBy = __webpack_require__(/*! ./_baseSortBy */ "./node_modules/lodash/_baseSortBy.js"),
55892 baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
55893 compareMultiple = __webpack_require__(/*! ./_compareMultiple */ "./node_modules/lodash/_compareMultiple.js"),
55894 identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
55895
55896/**
55897 * The base implementation of `_.orderBy` without param guards.
55898 *
55899 * @private
55900 * @param {Array|Object} collection The collection to iterate over.
55901 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
55902 * @param {string[]} orders The sort orders of `iteratees`.
55903 * @returns {Array} Returns the new sorted array.
55904 */
55905function baseOrderBy(collection, iteratees, orders) {
55906 var index = -1;
55907 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));
55908
55909 var result = baseMap(collection, function(value, key, collection) {
55910 var criteria = arrayMap(iteratees, function(iteratee) {
55911 return iteratee(value);
55912 });
55913 return { 'criteria': criteria, 'index': ++index, 'value': value };
55914 });
55915
55916 return baseSortBy(result, function(object, other) {
55917 return compareMultiple(object, other, orders);
55918 });
55919}
55920
55921module.exports = baseOrderBy;
55922
55923
55924/***/ }),
55925
55926/***/ "./node_modules/lodash/_basePick.js":
55927/*!******************************************!*\
55928 !*** ./node_modules/lodash/_basePick.js ***!
55929 \******************************************/
55930/*! no static exports found */
55931/***/ (function(module, exports, __webpack_require__) {
55932
55933var basePickBy = __webpack_require__(/*! ./_basePickBy */ "./node_modules/lodash/_basePickBy.js"),
55934 hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js");
55935
55936/**
55937 * The base implementation of `_.pick` without support for individual
55938 * property identifiers.
55939 *
55940 * @private
55941 * @param {Object} object The source object.
55942 * @param {string[]} paths The property paths to pick.
55943 * @returns {Object} Returns the new object.
55944 */
55945function basePick(object, paths) {
55946 return basePickBy(object, paths, function(value, path) {
55947 return hasIn(object, path);
55948 });
55949}
55950
55951module.exports = basePick;
55952
55953
55954/***/ }),
55955
55956/***/ "./node_modules/lodash/_basePickBy.js":
55957/*!********************************************!*\
55958 !*** ./node_modules/lodash/_basePickBy.js ***!
55959 \********************************************/
55960/*! no static exports found */
55961/***/ (function(module, exports, __webpack_require__) {
55962
55963var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"),
55964 baseSet = __webpack_require__(/*! ./_baseSet */ "./node_modules/lodash/_baseSet.js"),
55965 castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js");
55966
55967/**
55968 * The base implementation of `_.pickBy` without support for iteratee shorthands.
55969 *
55970 * @private
55971 * @param {Object} object The source object.
55972 * @param {string[]} paths The property paths to pick.
55973 * @param {Function} predicate The function invoked per property.
55974 * @returns {Object} Returns the new object.
55975 */
55976function basePickBy(object, paths, predicate) {
55977 var index = -1,
55978 length = paths.length,
55979 result = {};
55980
55981 while (++index < length) {
55982 var path = paths[index],
55983 value = baseGet(object, path);
55984
55985 if (predicate(value, path)) {
55986 baseSet(result, castPath(path, object), value);
55987 }
55988 }
55989 return result;
55990}
55991
55992module.exports = basePickBy;
55993
55994
55995/***/ }),
55996
55997/***/ "./node_modules/lodash/_baseProperty.js":
55998/*!**********************************************!*\
55999 !*** ./node_modules/lodash/_baseProperty.js ***!
56000 \**********************************************/
56001/*! no static exports found */
56002/***/ (function(module, exports) {
56003
56004/**
56005 * The base implementation of `_.property` without support for deep paths.
56006 *
56007 * @private
56008 * @param {string} key The key of the property to get.
56009 * @returns {Function} Returns the new accessor function.
56010 */
56011function baseProperty(key) {
56012 return function(object) {
56013 return object == null ? undefined : object[key];
56014 };
56015}
56016
56017module.exports = baseProperty;
56018
56019
56020/***/ }),
56021
56022/***/ "./node_modules/lodash/_basePropertyDeep.js":
56023/*!**************************************************!*\
56024 !*** ./node_modules/lodash/_basePropertyDeep.js ***!
56025 \**************************************************/
56026/*! no static exports found */
56027/***/ (function(module, exports, __webpack_require__) {
56028
56029var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js");
56030
56031/**
56032 * A specialized version of `baseProperty` which supports deep paths.
56033 *
56034 * @private
56035 * @param {Array|string} path The path of the property to get.
56036 * @returns {Function} Returns the new accessor function.
56037 */
56038function basePropertyDeep(path) {
56039 return function(object) {
56040 return baseGet(object, path);
56041 };
56042}
56043
56044module.exports = basePropertyDeep;
56045
56046
56047/***/ }),
56048
56049/***/ "./node_modules/lodash/_baseRange.js":
56050/*!*******************************************!*\
56051 !*** ./node_modules/lodash/_baseRange.js ***!
56052 \*******************************************/
56053/*! no static exports found */
56054/***/ (function(module, exports) {
56055
56056/* Built-in method references for those with the same name as other `lodash` methods. */
56057var nativeCeil = Math.ceil,
56058 nativeMax = Math.max;
56059
56060/**
56061 * The base implementation of `_.range` and `_.rangeRight` which doesn't
56062 * coerce arguments.
56063 *
56064 * @private
56065 * @param {number} start The start of the range.
56066 * @param {number} end The end of the range.
56067 * @param {number} step The value to increment or decrement by.
56068 * @param {boolean} [fromRight] Specify iterating from right to left.
56069 * @returns {Array} Returns the range of numbers.
56070 */
56071function baseRange(start, end, step, fromRight) {
56072 var index = -1,
56073 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
56074 result = Array(length);
56075
56076 while (length--) {
56077 result[fromRight ? length : ++index] = start;
56078 start += step;
56079 }
56080 return result;
56081}
56082
56083module.exports = baseRange;
56084
56085
56086/***/ }),
56087
56088/***/ "./node_modules/lodash/_baseReduce.js":
56089/*!********************************************!*\
56090 !*** ./node_modules/lodash/_baseReduce.js ***!
56091 \********************************************/
56092/*! no static exports found */
56093/***/ (function(module, exports) {
56094
56095/**
56096 * The base implementation of `_.reduce` and `_.reduceRight`, without support
56097 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
56098 *
56099 * @private
56100 * @param {Array|Object} collection The collection to iterate over.
56101 * @param {Function} iteratee The function invoked per iteration.
56102 * @param {*} accumulator The initial value.
56103 * @param {boolean} initAccum Specify using the first or last element of
56104 * `collection` as the initial value.
56105 * @param {Function} eachFunc The function to iterate over `collection`.
56106 * @returns {*} Returns the accumulated value.
56107 */
56108function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
56109 eachFunc(collection, function(value, index, collection) {
56110 accumulator = initAccum
56111 ? (initAccum = false, value)
56112 : iteratee(accumulator, value, index, collection);
56113 });
56114 return accumulator;
56115}
56116
56117module.exports = baseReduce;
56118
56119
56120/***/ }),
56121
56122/***/ "./node_modules/lodash/_baseRest.js":
56123/*!******************************************!*\
56124 !*** ./node_modules/lodash/_baseRest.js ***!
56125 \******************************************/
56126/*! no static exports found */
56127/***/ (function(module, exports, __webpack_require__) {
56128
56129var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"),
56130 overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"),
56131 setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js");
56132
56133/**
56134 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
56135 *
56136 * @private
56137 * @param {Function} func The function to apply a rest parameter to.
56138 * @param {number} [start=func.length-1] The start position of the rest parameter.
56139 * @returns {Function} Returns the new function.
56140 */
56141function baseRest(func, start) {
56142 return setToString(overRest(func, start, identity), func + '');
56143}
56144
56145module.exports = baseRest;
56146
56147
56148/***/ }),
56149
56150/***/ "./node_modules/lodash/_baseSet.js":
56151/*!*****************************************!*\
56152 !*** ./node_modules/lodash/_baseSet.js ***!
56153 \*****************************************/
56154/*! no static exports found */
56155/***/ (function(module, exports, __webpack_require__) {
56156
56157var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
56158 castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"),
56159 isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
56160 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
56161 toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
56162
56163/**
56164 * The base implementation of `_.set`.
56165 *
56166 * @private
56167 * @param {Object} object The object to modify.
56168 * @param {Array|string} path The path of the property to set.
56169 * @param {*} value The value to set.
56170 * @param {Function} [customizer] The function to customize path creation.
56171 * @returns {Object} Returns `object`.
56172 */
56173function baseSet(object, path, value, customizer) {
56174 if (!isObject(object)) {
56175 return object;
56176 }
56177 path = castPath(path, object);
56178
56179 var index = -1,
56180 length = path.length,
56181 lastIndex = length - 1,
56182 nested = object;
56183
56184 while (nested != null && ++index < length) {
56185 var key = toKey(path[index]),
56186 newValue = value;
56187
56188 if (index != lastIndex) {
56189 var objValue = nested[key];
56190 newValue = customizer ? customizer(objValue, key, nested) : undefined;
56191 if (newValue === undefined) {
56192 newValue = isObject(objValue)
56193 ? objValue
56194 : (isIndex(path[index + 1]) ? [] : {});
56195 }
56196 }
56197 assignValue(nested, key, newValue);
56198 nested = nested[key];
56199 }
56200 return object;
56201}
56202
56203module.exports = baseSet;
56204
56205
56206/***/ }),
56207
56208/***/ "./node_modules/lodash/_baseSetToString.js":
56209/*!*************************************************!*\
56210 !*** ./node_modules/lodash/_baseSetToString.js ***!
56211 \*************************************************/
56212/*! no static exports found */
56213/***/ (function(module, exports, __webpack_require__) {
56214
56215var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"),
56216 defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"),
56217 identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
56218
56219/**
56220 * The base implementation of `setToString` without support for hot loop shorting.
56221 *
56222 * @private
56223 * @param {Function} func The function to modify.
56224 * @param {Function} string The `toString` result.
56225 * @returns {Function} Returns `func`.
56226 */
56227var baseSetToString = !defineProperty ? identity : function(func, string) {
56228 return defineProperty(func, 'toString', {
56229 'configurable': true,
56230 'enumerable': false,
56231 'value': constant(string),
56232 'writable': true
56233 });
56234};
56235
56236module.exports = baseSetToString;
56237
56238
56239/***/ }),
56240
56241/***/ "./node_modules/lodash/_baseSortBy.js":
56242/*!********************************************!*\
56243 !*** ./node_modules/lodash/_baseSortBy.js ***!
56244 \********************************************/
56245/*! no static exports found */
56246/***/ (function(module, exports) {
56247
56248/**
56249 * The base implementation of `_.sortBy` which uses `comparer` to define the
56250 * sort order of `array` and replaces criteria objects with their corresponding
56251 * values.
56252 *
56253 * @private
56254 * @param {Array} array The array to sort.
56255 * @param {Function} comparer The function to define sort order.
56256 * @returns {Array} Returns `array`.
56257 */
56258function baseSortBy(array, comparer) {
56259 var length = array.length;
56260
56261 array.sort(comparer);
56262 while (length--) {
56263 array[length] = array[length].value;
56264 }
56265 return array;
56266}
56267
56268module.exports = baseSortBy;
56269
56270
56271/***/ }),
56272
56273/***/ "./node_modules/lodash/_baseTimes.js":
56274/*!*******************************************!*\
56275 !*** ./node_modules/lodash/_baseTimes.js ***!
56276 \*******************************************/
56277/*! no static exports found */
56278/***/ (function(module, exports) {
56279
56280/**
56281 * The base implementation of `_.times` without support for iteratee shorthands
56282 * or max array length checks.
56283 *
56284 * @private
56285 * @param {number} n The number of times to invoke `iteratee`.
56286 * @param {Function} iteratee The function invoked per iteration.
56287 * @returns {Array} Returns the array of results.
56288 */
56289function baseTimes(n, iteratee) {
56290 var index = -1,
56291 result = Array(n);
56292
56293 while (++index < n) {
56294 result[index] = iteratee(index);
56295 }
56296 return result;
56297}
56298
56299module.exports = baseTimes;
56300
56301
56302/***/ }),
56303
56304/***/ "./node_modules/lodash/_baseToString.js":
56305/*!**********************************************!*\
56306 !*** ./node_modules/lodash/_baseToString.js ***!
56307 \**********************************************/
56308/*! no static exports found */
56309/***/ (function(module, exports, __webpack_require__) {
56310
56311var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
56312 arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"),
56313 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
56314 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
56315
56316/** Used as references for various `Number` constants. */
56317var INFINITY = 1 / 0;
56318
56319/** Used to convert symbols to primitives and strings. */
56320var symbolProto = Symbol ? Symbol.prototype : undefined,
56321 symbolToString = symbolProto ? symbolProto.toString : undefined;
56322
56323/**
56324 * The base implementation of `_.toString` which doesn't convert nullish
56325 * values to empty strings.
56326 *
56327 * @private
56328 * @param {*} value The value to process.
56329 * @returns {string} Returns the string.
56330 */
56331function baseToString(value) {
56332 // Exit early for strings to avoid a performance hit in some environments.
56333 if (typeof value == 'string') {
56334 return value;
56335 }
56336 if (isArray(value)) {
56337 // Recursively convert values (susceptible to call stack limits).
56338 return arrayMap(value, baseToString) + '';
56339 }
56340 if (isSymbol(value)) {
56341 return symbolToString ? symbolToString.call(value) : '';
56342 }
56343 var result = (value + '');
56344 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
56345}
56346
56347module.exports = baseToString;
56348
56349
56350/***/ }),
56351
56352/***/ "./node_modules/lodash/_baseUnary.js":
56353/*!*******************************************!*\
56354 !*** ./node_modules/lodash/_baseUnary.js ***!
56355 \*******************************************/
56356/*! no static exports found */
56357/***/ (function(module, exports) {
56358
56359/**
56360 * The base implementation of `_.unary` without support for storing metadata.
56361 *
56362 * @private
56363 * @param {Function} func The function to cap arguments for.
56364 * @returns {Function} Returns the new capped function.
56365 */
56366function baseUnary(func) {
56367 return function(value) {
56368 return func(value);
56369 };
56370}
56371
56372module.exports = baseUnary;
56373
56374
56375/***/ }),
56376
56377/***/ "./node_modules/lodash/_baseUniq.js":
56378/*!******************************************!*\
56379 !*** ./node_modules/lodash/_baseUniq.js ***!
56380 \******************************************/
56381/*! no static exports found */
56382/***/ (function(module, exports, __webpack_require__) {
56383
56384var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"),
56385 arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/lodash/_arrayIncludes.js"),
56386 arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/lodash/_arrayIncludesWith.js"),
56387 cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"),
56388 createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/lodash/_createSet.js"),
56389 setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
56390
56391/** Used as the size to enable large array optimizations. */
56392var LARGE_ARRAY_SIZE = 200;
56393
56394/**
56395 * The base implementation of `_.uniqBy` without support for iteratee shorthands.
56396 *
56397 * @private
56398 * @param {Array} array The array to inspect.
56399 * @param {Function} [iteratee] The iteratee invoked per element.
56400 * @param {Function} [comparator] The comparator invoked per element.
56401 * @returns {Array} Returns the new duplicate free array.
56402 */
56403function baseUniq(array, iteratee, comparator) {
56404 var index = -1,
56405 includes = arrayIncludes,
56406 length = array.length,
56407 isCommon = true,
56408 result = [],
56409 seen = result;
56410
56411 if (comparator) {
56412 isCommon = false;
56413 includes = arrayIncludesWith;
56414 }
56415 else if (length >= LARGE_ARRAY_SIZE) {
56416 var set = iteratee ? null : createSet(array);
56417 if (set) {
56418 return setToArray(set);
56419 }
56420 isCommon = false;
56421 includes = cacheHas;
56422 seen = new SetCache;
56423 }
56424 else {
56425 seen = iteratee ? [] : result;
56426 }
56427 outer:
56428 while (++index < length) {
56429 var value = array[index],
56430 computed = iteratee ? iteratee(value) : value;
56431
56432 value = (comparator || value !== 0) ? value : 0;
56433 if (isCommon && computed === computed) {
56434 var seenIndex = seen.length;
56435 while (seenIndex--) {
56436 if (seen[seenIndex] === computed) {
56437 continue outer;
56438 }
56439 }
56440 if (iteratee) {
56441 seen.push(computed);
56442 }
56443 result.push(value);
56444 }
56445 else if (!includes(seen, computed, comparator)) {
56446 if (seen !== result) {
56447 seen.push(computed);
56448 }
56449 result.push(value);
56450 }
56451 }
56452 return result;
56453}
56454
56455module.exports = baseUniq;
56456
56457
56458/***/ }),
56459
56460/***/ "./node_modules/lodash/_baseValues.js":
56461/*!********************************************!*\
56462 !*** ./node_modules/lodash/_baseValues.js ***!
56463 \********************************************/
56464/*! no static exports found */
56465/***/ (function(module, exports, __webpack_require__) {
56466
56467var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js");
56468
56469/**
56470 * The base implementation of `_.values` and `_.valuesIn` which creates an
56471 * array of `object` property values corresponding to the property names
56472 * of `props`.
56473 *
56474 * @private
56475 * @param {Object} object The object to query.
56476 * @param {Array} props The property names to get values for.
56477 * @returns {Object} Returns the array of property values.
56478 */
56479function baseValues(object, props) {
56480 return arrayMap(props, function(key) {
56481 return object[key];
56482 });
56483}
56484
56485module.exports = baseValues;
56486
56487
56488/***/ }),
56489
56490/***/ "./node_modules/lodash/_baseZipObject.js":
56491/*!***********************************************!*\
56492 !*** ./node_modules/lodash/_baseZipObject.js ***!
56493 \***********************************************/
56494/*! no static exports found */
56495/***/ (function(module, exports) {
56496
56497/**
56498 * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
56499 *
56500 * @private
56501 * @param {Array} props The property identifiers.
56502 * @param {Array} values The property values.
56503 * @param {Function} assignFunc The function to assign values.
56504 * @returns {Object} Returns the new object.
56505 */
56506function baseZipObject(props, values, assignFunc) {
56507 var index = -1,
56508 length = props.length,
56509 valsLength = values.length,
56510 result = {};
56511
56512 while (++index < length) {
56513 var value = index < valsLength ? values[index] : undefined;
56514 assignFunc(result, props[index], value);
56515 }
56516 return result;
56517}
56518
56519module.exports = baseZipObject;
56520
56521
56522/***/ }),
56523
56524/***/ "./node_modules/lodash/_cacheHas.js":
56525/*!******************************************!*\
56526 !*** ./node_modules/lodash/_cacheHas.js ***!
56527 \******************************************/
56528/*! no static exports found */
56529/***/ (function(module, exports) {
56530
56531/**
56532 * Checks if a `cache` value for `key` exists.
56533 *
56534 * @private
56535 * @param {Object} cache The cache to query.
56536 * @param {string} key The key of the entry to check.
56537 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
56538 */
56539function cacheHas(cache, key) {
56540 return cache.has(key);
56541}
56542
56543module.exports = cacheHas;
56544
56545
56546/***/ }),
56547
56548/***/ "./node_modules/lodash/_castFunction.js":
56549/*!**********************************************!*\
56550 !*** ./node_modules/lodash/_castFunction.js ***!
56551 \**********************************************/
56552/*! no static exports found */
56553/***/ (function(module, exports, __webpack_require__) {
56554
56555var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
56556
56557/**
56558 * Casts `value` to `identity` if it's not a function.
56559 *
56560 * @private
56561 * @param {*} value The value to inspect.
56562 * @returns {Function} Returns cast function.
56563 */
56564function castFunction(value) {
56565 return typeof value == 'function' ? value : identity;
56566}
56567
56568module.exports = castFunction;
56569
56570
56571/***/ }),
56572
56573/***/ "./node_modules/lodash/_castPath.js":
56574/*!******************************************!*\
56575 !*** ./node_modules/lodash/_castPath.js ***!
56576 \******************************************/
56577/*! no static exports found */
56578/***/ (function(module, exports, __webpack_require__) {
56579
56580var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
56581 isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
56582 stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"),
56583 toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
56584
56585/**
56586 * Casts `value` to a path array if it's not one.
56587 *
56588 * @private
56589 * @param {*} value The value to inspect.
56590 * @param {Object} [object] The object to query keys on.
56591 * @returns {Array} Returns the cast property path array.
56592 */
56593function castPath(value, object) {
56594 if (isArray(value)) {
56595 return value;
56596 }
56597 return isKey(value, object) ? [value] : stringToPath(toString(value));
56598}
56599
56600module.exports = castPath;
56601
56602
56603/***/ }),
56604
56605/***/ "./node_modules/lodash/_cloneArrayBuffer.js":
56606/*!**************************************************!*\
56607 !*** ./node_modules/lodash/_cloneArrayBuffer.js ***!
56608 \**************************************************/
56609/*! no static exports found */
56610/***/ (function(module, exports, __webpack_require__) {
56611
56612var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js");
56613
56614/**
56615 * Creates a clone of `arrayBuffer`.
56616 *
56617 * @private
56618 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
56619 * @returns {ArrayBuffer} Returns the cloned array buffer.
56620 */
56621function cloneArrayBuffer(arrayBuffer) {
56622 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
56623 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
56624 return result;
56625}
56626
56627module.exports = cloneArrayBuffer;
56628
56629
56630/***/ }),
56631
56632/***/ "./node_modules/lodash/_cloneBuffer.js":
56633/*!*********************************************!*\
56634 !*** ./node_modules/lodash/_cloneBuffer.js ***!
56635 \*********************************************/
56636/*! no static exports found */
56637/***/ (function(module, exports, __webpack_require__) {
56638
56639/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
56640
56641/** Detect free variable `exports`. */
56642var freeExports = true && exports && !exports.nodeType && exports;
56643
56644/** Detect free variable `module`. */
56645var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
56646
56647/** Detect the popular CommonJS extension `module.exports`. */
56648var moduleExports = freeModule && freeModule.exports === freeExports;
56649
56650/** Built-in value references. */
56651var Buffer = moduleExports ? root.Buffer : undefined,
56652 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
56653
56654/**
56655 * Creates a clone of `buffer`.
56656 *
56657 * @private
56658 * @param {Buffer} buffer The buffer to clone.
56659 * @param {boolean} [isDeep] Specify a deep clone.
56660 * @returns {Buffer} Returns the cloned buffer.
56661 */
56662function cloneBuffer(buffer, isDeep) {
56663 if (isDeep) {
56664 return buffer.slice();
56665 }
56666 var length = buffer.length,
56667 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
56668
56669 buffer.copy(result);
56670 return result;
56671}
56672
56673module.exports = cloneBuffer;
56674
56675/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
56676
56677/***/ }),
56678
56679/***/ "./node_modules/lodash/_cloneDataView.js":
56680/*!***********************************************!*\
56681 !*** ./node_modules/lodash/_cloneDataView.js ***!
56682 \***********************************************/
56683/*! no static exports found */
56684/***/ (function(module, exports, __webpack_require__) {
56685
56686var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js");
56687
56688/**
56689 * Creates a clone of `dataView`.
56690 *
56691 * @private
56692 * @param {Object} dataView The data view to clone.
56693 * @param {boolean} [isDeep] Specify a deep clone.
56694 * @returns {Object} Returns the cloned data view.
56695 */
56696function cloneDataView(dataView, isDeep) {
56697 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
56698 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
56699}
56700
56701module.exports = cloneDataView;
56702
56703
56704/***/ }),
56705
56706/***/ "./node_modules/lodash/_cloneRegExp.js":
56707/*!*********************************************!*\
56708 !*** ./node_modules/lodash/_cloneRegExp.js ***!
56709 \*********************************************/
56710/*! no static exports found */
56711/***/ (function(module, exports) {
56712
56713/** Used to match `RegExp` flags from their coerced string values. */
56714var reFlags = /\w*$/;
56715
56716/**
56717 * Creates a clone of `regexp`.
56718 *
56719 * @private
56720 * @param {Object} regexp The regexp to clone.
56721 * @returns {Object} Returns the cloned regexp.
56722 */
56723function cloneRegExp(regexp) {
56724 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
56725 result.lastIndex = regexp.lastIndex;
56726 return result;
56727}
56728
56729module.exports = cloneRegExp;
56730
56731
56732/***/ }),
56733
56734/***/ "./node_modules/lodash/_cloneSymbol.js":
56735/*!*********************************************!*\
56736 !*** ./node_modules/lodash/_cloneSymbol.js ***!
56737 \*********************************************/
56738/*! no static exports found */
56739/***/ (function(module, exports, __webpack_require__) {
56740
56741var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
56742
56743/** Used to convert symbols to primitives and strings. */
56744var symbolProto = Symbol ? Symbol.prototype : undefined,
56745 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
56746
56747/**
56748 * Creates a clone of the `symbol` object.
56749 *
56750 * @private
56751 * @param {Object} symbol The symbol object to clone.
56752 * @returns {Object} Returns the cloned symbol object.
56753 */
56754function cloneSymbol(symbol) {
56755 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
56756}
56757
56758module.exports = cloneSymbol;
56759
56760
56761/***/ }),
56762
56763/***/ "./node_modules/lodash/_cloneTypedArray.js":
56764/*!*************************************************!*\
56765 !*** ./node_modules/lodash/_cloneTypedArray.js ***!
56766 \*************************************************/
56767/*! no static exports found */
56768/***/ (function(module, exports, __webpack_require__) {
56769
56770var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js");
56771
56772/**
56773 * Creates a clone of `typedArray`.
56774 *
56775 * @private
56776 * @param {Object} typedArray The typed array to clone.
56777 * @param {boolean} [isDeep] Specify a deep clone.
56778 * @returns {Object} Returns the cloned typed array.
56779 */
56780function cloneTypedArray(typedArray, isDeep) {
56781 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
56782 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
56783}
56784
56785module.exports = cloneTypedArray;
56786
56787
56788/***/ }),
56789
56790/***/ "./node_modules/lodash/_compareAscending.js":
56791/*!**************************************************!*\
56792 !*** ./node_modules/lodash/_compareAscending.js ***!
56793 \**************************************************/
56794/*! no static exports found */
56795/***/ (function(module, exports, __webpack_require__) {
56796
56797var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
56798
56799/**
56800 * Compares values to sort them in ascending order.
56801 *
56802 * @private
56803 * @param {*} value The value to compare.
56804 * @param {*} other The other value to compare.
56805 * @returns {number} Returns the sort order indicator for `value`.
56806 */
56807function compareAscending(value, other) {
56808 if (value !== other) {
56809 var valIsDefined = value !== undefined,
56810 valIsNull = value === null,
56811 valIsReflexive = value === value,
56812 valIsSymbol = isSymbol(value);
56813
56814 var othIsDefined = other !== undefined,
56815 othIsNull = other === null,
56816 othIsReflexive = other === other,
56817 othIsSymbol = isSymbol(other);
56818
56819 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
56820 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
56821 (valIsNull && othIsDefined && othIsReflexive) ||
56822 (!valIsDefined && othIsReflexive) ||
56823 !valIsReflexive) {
56824 return 1;
56825 }
56826 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
56827 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
56828 (othIsNull && valIsDefined && valIsReflexive) ||
56829 (!othIsDefined && valIsReflexive) ||
56830 !othIsReflexive) {
56831 return -1;
56832 }
56833 }
56834 return 0;
56835}
56836
56837module.exports = compareAscending;
56838
56839
56840/***/ }),
56841
56842/***/ "./node_modules/lodash/_compareMultiple.js":
56843/*!*************************************************!*\
56844 !*** ./node_modules/lodash/_compareMultiple.js ***!
56845 \*************************************************/
56846/*! no static exports found */
56847/***/ (function(module, exports, __webpack_require__) {
56848
56849var compareAscending = __webpack_require__(/*! ./_compareAscending */ "./node_modules/lodash/_compareAscending.js");
56850
56851/**
56852 * Used by `_.orderBy` to compare multiple properties of a value to another
56853 * and stable sort them.
56854 *
56855 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
56856 * specify an order of "desc" for descending or "asc" for ascending sort order
56857 * of corresponding values.
56858 *
56859 * @private
56860 * @param {Object} object The object to compare.
56861 * @param {Object} other The other object to compare.
56862 * @param {boolean[]|string[]} orders The order to sort by for each property.
56863 * @returns {number} Returns the sort order indicator for `object`.
56864 */
56865function compareMultiple(object, other, orders) {
56866 var index = -1,
56867 objCriteria = object.criteria,
56868 othCriteria = other.criteria,
56869 length = objCriteria.length,
56870 ordersLength = orders.length;
56871
56872 while (++index < length) {
56873 var result = compareAscending(objCriteria[index], othCriteria[index]);
56874 if (result) {
56875 if (index >= ordersLength) {
56876 return result;
56877 }
56878 var order = orders[index];
56879 return result * (order == 'desc' ? -1 : 1);
56880 }
56881 }
56882 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
56883 // that causes it, under certain circumstances, to provide the same value for
56884 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
56885 // for more details.
56886 //
56887 // This also ensures a stable sort in V8 and other engines.
56888 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
56889 return object.index - other.index;
56890}
56891
56892module.exports = compareMultiple;
56893
56894
56895/***/ }),
56896
56897/***/ "./node_modules/lodash/_copyArray.js":
56898/*!*******************************************!*\
56899 !*** ./node_modules/lodash/_copyArray.js ***!
56900 \*******************************************/
56901/*! no static exports found */
56902/***/ (function(module, exports) {
56903
56904/**
56905 * Copies the values of `source` to `array`.
56906 *
56907 * @private
56908 * @param {Array} source The array to copy values from.
56909 * @param {Array} [array=[]] The array to copy values to.
56910 * @returns {Array} Returns `array`.
56911 */
56912function copyArray(source, array) {
56913 var index = -1,
56914 length = source.length;
56915
56916 array || (array = Array(length));
56917 while (++index < length) {
56918 array[index] = source[index];
56919 }
56920 return array;
56921}
56922
56923module.exports = copyArray;
56924
56925
56926/***/ }),
56927
56928/***/ "./node_modules/lodash/_copyObject.js":
56929/*!********************************************!*\
56930 !*** ./node_modules/lodash/_copyObject.js ***!
56931 \********************************************/
56932/*! no static exports found */
56933/***/ (function(module, exports, __webpack_require__) {
56934
56935var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
56936 baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js");
56937
56938/**
56939 * Copies properties of `source` to `object`.
56940 *
56941 * @private
56942 * @param {Object} source The object to copy properties from.
56943 * @param {Array} props The property identifiers to copy.
56944 * @param {Object} [object={}] The object to copy properties to.
56945 * @param {Function} [customizer] The function to customize copied values.
56946 * @returns {Object} Returns `object`.
56947 */
56948function copyObject(source, props, object, customizer) {
56949 var isNew = !object;
56950 object || (object = {});
56951
56952 var index = -1,
56953 length = props.length;
56954
56955 while (++index < length) {
56956 var key = props[index];
56957
56958 var newValue = customizer
56959 ? customizer(object[key], source[key], key, object, source)
56960 : undefined;
56961
56962 if (newValue === undefined) {
56963 newValue = source[key];
56964 }
56965 if (isNew) {
56966 baseAssignValue(object, key, newValue);
56967 } else {
56968 assignValue(object, key, newValue);
56969 }
56970 }
56971 return object;
56972}
56973
56974module.exports = copyObject;
56975
56976
56977/***/ }),
56978
56979/***/ "./node_modules/lodash/_copySymbols.js":
56980/*!*********************************************!*\
56981 !*** ./node_modules/lodash/_copySymbols.js ***!
56982 \*********************************************/
56983/*! no static exports found */
56984/***/ (function(module, exports, __webpack_require__) {
56985
56986var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
56987 getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js");
56988
56989/**
56990 * Copies own symbols of `source` to `object`.
56991 *
56992 * @private
56993 * @param {Object} source The object to copy symbols from.
56994 * @param {Object} [object={}] The object to copy symbols to.
56995 * @returns {Object} Returns `object`.
56996 */
56997function copySymbols(source, object) {
56998 return copyObject(source, getSymbols(source), object);
56999}
57000
57001module.exports = copySymbols;
57002
57003
57004/***/ }),
57005
57006/***/ "./node_modules/lodash/_copySymbolsIn.js":
57007/*!***********************************************!*\
57008 !*** ./node_modules/lodash/_copySymbolsIn.js ***!
57009 \***********************************************/
57010/*! no static exports found */
57011/***/ (function(module, exports, __webpack_require__) {
57012
57013var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
57014 getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js");
57015
57016/**
57017 * Copies own and inherited symbols of `source` to `object`.
57018 *
57019 * @private
57020 * @param {Object} source The object to copy symbols from.
57021 * @param {Object} [object={}] The object to copy symbols to.
57022 * @returns {Object} Returns `object`.
57023 */
57024function copySymbolsIn(source, object) {
57025 return copyObject(source, getSymbolsIn(source), object);
57026}
57027
57028module.exports = copySymbolsIn;
57029
57030
57031/***/ }),
57032
57033/***/ "./node_modules/lodash/_coreJsData.js":
57034/*!********************************************!*\
57035 !*** ./node_modules/lodash/_coreJsData.js ***!
57036 \********************************************/
57037/*! no static exports found */
57038/***/ (function(module, exports, __webpack_require__) {
57039
57040var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
57041
57042/** Used to detect overreaching core-js shims. */
57043var coreJsData = root['__core-js_shared__'];
57044
57045module.exports = coreJsData;
57046
57047
57048/***/ }),
57049
57050/***/ "./node_modules/lodash/_createAssigner.js":
57051/*!************************************************!*\
57052 !*** ./node_modules/lodash/_createAssigner.js ***!
57053 \************************************************/
57054/*! no static exports found */
57055/***/ (function(module, exports, __webpack_require__) {
57056
57057var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
57058 isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js");
57059
57060/**
57061 * Creates a function like `_.assign`.
57062 *
57063 * @private
57064 * @param {Function} assigner The function to assign values.
57065 * @returns {Function} Returns the new assigner function.
57066 */
57067function createAssigner(assigner) {
57068 return baseRest(function(object, sources) {
57069 var index = -1,
57070 length = sources.length,
57071 customizer = length > 1 ? sources[length - 1] : undefined,
57072 guard = length > 2 ? sources[2] : undefined;
57073
57074 customizer = (assigner.length > 3 && typeof customizer == 'function')
57075 ? (length--, customizer)
57076 : undefined;
57077
57078 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
57079 customizer = length < 3 ? undefined : customizer;
57080 length = 1;
57081 }
57082 object = Object(object);
57083 while (++index < length) {
57084 var source = sources[index];
57085 if (source) {
57086 assigner(object, source, index, customizer);
57087 }
57088 }
57089 return object;
57090 });
57091}
57092
57093module.exports = createAssigner;
57094
57095
57096/***/ }),
57097
57098/***/ "./node_modules/lodash/_createBaseEach.js":
57099/*!************************************************!*\
57100 !*** ./node_modules/lodash/_createBaseEach.js ***!
57101 \************************************************/
57102/*! no static exports found */
57103/***/ (function(module, exports, __webpack_require__) {
57104
57105var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
57106
57107/**
57108 * Creates a `baseEach` or `baseEachRight` function.
57109 *
57110 * @private
57111 * @param {Function} eachFunc The function to iterate over a collection.
57112 * @param {boolean} [fromRight] Specify iterating from right to left.
57113 * @returns {Function} Returns the new base function.
57114 */
57115function createBaseEach(eachFunc, fromRight) {
57116 return function(collection, iteratee) {
57117 if (collection == null) {
57118 return collection;
57119 }
57120 if (!isArrayLike(collection)) {
57121 return eachFunc(collection, iteratee);
57122 }
57123 var length = collection.length,
57124 index = fromRight ? length : -1,
57125 iterable = Object(collection);
57126
57127 while ((fromRight ? index-- : ++index < length)) {
57128 if (iteratee(iterable[index], index, iterable) === false) {
57129 break;
57130 }
57131 }
57132 return collection;
57133 };
57134}
57135
57136module.exports = createBaseEach;
57137
57138
57139/***/ }),
57140
57141/***/ "./node_modules/lodash/_createBaseFor.js":
57142/*!***********************************************!*\
57143 !*** ./node_modules/lodash/_createBaseFor.js ***!
57144 \***********************************************/
57145/*! no static exports found */
57146/***/ (function(module, exports) {
57147
57148/**
57149 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
57150 *
57151 * @private
57152 * @param {boolean} [fromRight] Specify iterating from right to left.
57153 * @returns {Function} Returns the new base function.
57154 */
57155function createBaseFor(fromRight) {
57156 return function(object, iteratee, keysFunc) {
57157 var index = -1,
57158 iterable = Object(object),
57159 props = keysFunc(object),
57160 length = props.length;
57161
57162 while (length--) {
57163 var key = props[fromRight ? length : ++index];
57164 if (iteratee(iterable[key], key, iterable) === false) {
57165 break;
57166 }
57167 }
57168 return object;
57169 };
57170}
57171
57172module.exports = createBaseFor;
57173
57174
57175/***/ }),
57176
57177/***/ "./node_modules/lodash/_createFind.js":
57178/*!********************************************!*\
57179 !*** ./node_modules/lodash/_createFind.js ***!
57180 \********************************************/
57181/*! no static exports found */
57182/***/ (function(module, exports, __webpack_require__) {
57183
57184var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
57185 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
57186 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
57187
57188/**
57189 * Creates a `_.find` or `_.findLast` function.
57190 *
57191 * @private
57192 * @param {Function} findIndexFunc The function to find the collection index.
57193 * @returns {Function} Returns the new find function.
57194 */
57195function createFind(findIndexFunc) {
57196 return function(collection, predicate, fromIndex) {
57197 var iterable = Object(collection);
57198 if (!isArrayLike(collection)) {
57199 var iteratee = baseIteratee(predicate, 3);
57200 collection = keys(collection);
57201 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
57202 }
57203 var index = findIndexFunc(collection, predicate, fromIndex);
57204 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
57205 };
57206}
57207
57208module.exports = createFind;
57209
57210
57211/***/ }),
57212
57213/***/ "./node_modules/lodash/_createRange.js":
57214/*!*********************************************!*\
57215 !*** ./node_modules/lodash/_createRange.js ***!
57216 \*********************************************/
57217/*! no static exports found */
57218/***/ (function(module, exports, __webpack_require__) {
57219
57220var baseRange = __webpack_require__(/*! ./_baseRange */ "./node_modules/lodash/_baseRange.js"),
57221 isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"),
57222 toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js");
57223
57224/**
57225 * Creates a `_.range` or `_.rangeRight` function.
57226 *
57227 * @private
57228 * @param {boolean} [fromRight] Specify iterating from right to left.
57229 * @returns {Function} Returns the new range function.
57230 */
57231function createRange(fromRight) {
57232 return function(start, end, step) {
57233 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
57234 end = step = undefined;
57235 }
57236 // Ensure the sign of `-0` is preserved.
57237 start = toFinite(start);
57238 if (end === undefined) {
57239 end = start;
57240 start = 0;
57241 } else {
57242 end = toFinite(end);
57243 }
57244 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
57245 return baseRange(start, end, step, fromRight);
57246 };
57247}
57248
57249module.exports = createRange;
57250
57251
57252/***/ }),
57253
57254/***/ "./node_modules/lodash/_createSet.js":
57255/*!*******************************************!*\
57256 !*** ./node_modules/lodash/_createSet.js ***!
57257 \*******************************************/
57258/*! no static exports found */
57259/***/ (function(module, exports, __webpack_require__) {
57260
57261var Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"),
57262 noop = __webpack_require__(/*! ./noop */ "./node_modules/lodash/noop.js"),
57263 setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
57264
57265/** Used as references for various `Number` constants. */
57266var INFINITY = 1 / 0;
57267
57268/**
57269 * Creates a set object of `values`.
57270 *
57271 * @private
57272 * @param {Array} values The values to add to the set.
57273 * @returns {Object} Returns the new set.
57274 */
57275var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
57276 return new Set(values);
57277};
57278
57279module.exports = createSet;
57280
57281
57282/***/ }),
57283
57284/***/ "./node_modules/lodash/_defineProperty.js":
57285/*!************************************************!*\
57286 !*** ./node_modules/lodash/_defineProperty.js ***!
57287 \************************************************/
57288/*! no static exports found */
57289/***/ (function(module, exports, __webpack_require__) {
57290
57291var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js");
57292
57293var defineProperty = (function() {
57294 try {
57295 var func = getNative(Object, 'defineProperty');
57296 func({}, '', {});
57297 return func;
57298 } catch (e) {}
57299}());
57300
57301module.exports = defineProperty;
57302
57303
57304/***/ }),
57305
57306/***/ "./node_modules/lodash/_equalArrays.js":
57307/*!*********************************************!*\
57308 !*** ./node_modules/lodash/_equalArrays.js ***!
57309 \*********************************************/
57310/*! no static exports found */
57311/***/ (function(module, exports, __webpack_require__) {
57312
57313var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"),
57314 arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/lodash/_arraySome.js"),
57315 cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js");
57316
57317/** Used to compose bitmasks for value comparisons. */
57318var COMPARE_PARTIAL_FLAG = 1,
57319 COMPARE_UNORDERED_FLAG = 2;
57320
57321/**
57322 * A specialized version of `baseIsEqualDeep` for arrays with support for
57323 * partial deep comparisons.
57324 *
57325 * @private
57326 * @param {Array} array The array to compare.
57327 * @param {Array} other The other array to compare.
57328 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
57329 * @param {Function} customizer The function to customize comparisons.
57330 * @param {Function} equalFunc The function to determine equivalents of values.
57331 * @param {Object} stack Tracks traversed `array` and `other` objects.
57332 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
57333 */
57334function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
57335 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
57336 arrLength = array.length,
57337 othLength = other.length;
57338
57339 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
57340 return false;
57341 }
57342 // Assume cyclic values are equal.
57343 var stacked = stack.get(array);
57344 if (stacked && stack.get(other)) {
57345 return stacked == other;
57346 }
57347 var index = -1,
57348 result = true,
57349 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
57350
57351 stack.set(array, other);
57352 stack.set(other, array);
57353
57354 // Ignore non-index properties.
57355 while (++index < arrLength) {
57356 var arrValue = array[index],
57357 othValue = other[index];
57358
57359 if (customizer) {
57360 var compared = isPartial
57361 ? customizer(othValue, arrValue, index, other, array, stack)
57362 : customizer(arrValue, othValue, index, array, other, stack);
57363 }
57364 if (compared !== undefined) {
57365 if (compared) {
57366 continue;
57367 }
57368 result = false;
57369 break;
57370 }
57371 // Recursively compare arrays (susceptible to call stack limits).
57372 if (seen) {
57373 if (!arraySome(other, function(othValue, othIndex) {
57374 if (!cacheHas(seen, othIndex) &&
57375 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
57376 return seen.push(othIndex);
57377 }
57378 })) {
57379 result = false;
57380 break;
57381 }
57382 } else if (!(
57383 arrValue === othValue ||
57384 equalFunc(arrValue, othValue, bitmask, customizer, stack)
57385 )) {
57386 result = false;
57387 break;
57388 }
57389 }
57390 stack['delete'](array);
57391 stack['delete'](other);
57392 return result;
57393}
57394
57395module.exports = equalArrays;
57396
57397
57398/***/ }),
57399
57400/***/ "./node_modules/lodash/_equalByTag.js":
57401/*!********************************************!*\
57402 !*** ./node_modules/lodash/_equalByTag.js ***!
57403 \********************************************/
57404/*! no static exports found */
57405/***/ (function(module, exports, __webpack_require__) {
57406
57407var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
57408 Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"),
57409 eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
57410 equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"),
57411 mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"),
57412 setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js");
57413
57414/** Used to compose bitmasks for value comparisons. */
57415var COMPARE_PARTIAL_FLAG = 1,
57416 COMPARE_UNORDERED_FLAG = 2;
57417
57418/** `Object#toString` result references. */
57419var boolTag = '[object Boolean]',
57420 dateTag = '[object Date]',
57421 errorTag = '[object Error]',
57422 mapTag = '[object Map]',
57423 numberTag = '[object Number]',
57424 regexpTag = '[object RegExp]',
57425 setTag = '[object Set]',
57426 stringTag = '[object String]',
57427 symbolTag = '[object Symbol]';
57428
57429var arrayBufferTag = '[object ArrayBuffer]',
57430 dataViewTag = '[object DataView]';
57431
57432/** Used to convert symbols to primitives and strings. */
57433var symbolProto = Symbol ? Symbol.prototype : undefined,
57434 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
57435
57436/**
57437 * A specialized version of `baseIsEqualDeep` for comparing objects of
57438 * the same `toStringTag`.
57439 *
57440 * **Note:** This function only supports comparing values with tags of
57441 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
57442 *
57443 * @private
57444 * @param {Object} object The object to compare.
57445 * @param {Object} other The other object to compare.
57446 * @param {string} tag The `toStringTag` of the objects to compare.
57447 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
57448 * @param {Function} customizer The function to customize comparisons.
57449 * @param {Function} equalFunc The function to determine equivalents of values.
57450 * @param {Object} stack Tracks traversed `object` and `other` objects.
57451 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
57452 */
57453function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
57454 switch (tag) {
57455 case dataViewTag:
57456 if ((object.byteLength != other.byteLength) ||
57457 (object.byteOffset != other.byteOffset)) {
57458 return false;
57459 }
57460 object = object.buffer;
57461 other = other.buffer;
57462
57463 case arrayBufferTag:
57464 if ((object.byteLength != other.byteLength) ||
57465 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
57466 return false;
57467 }
57468 return true;
57469
57470 case boolTag:
57471 case dateTag:
57472 case numberTag:
57473 // Coerce booleans to `1` or `0` and dates to milliseconds.
57474 // Invalid dates are coerced to `NaN`.
57475 return eq(+object, +other);
57476
57477 case errorTag:
57478 return object.name == other.name && object.message == other.message;
57479
57480 case regexpTag:
57481 case stringTag:
57482 // Coerce regexes to strings and treat strings, primitives and objects,
57483 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
57484 // for more details.
57485 return object == (other + '');
57486
57487 case mapTag:
57488 var convert = mapToArray;
57489
57490 case setTag:
57491 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
57492 convert || (convert = setToArray);
57493
57494 if (object.size != other.size && !isPartial) {
57495 return false;
57496 }
57497 // Assume cyclic values are equal.
57498 var stacked = stack.get(object);
57499 if (stacked) {
57500 return stacked == other;
57501 }
57502 bitmask |= COMPARE_UNORDERED_FLAG;
57503
57504 // Recursively compare objects (susceptible to call stack limits).
57505 stack.set(object, other);
57506 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
57507 stack['delete'](object);
57508 return result;
57509
57510 case symbolTag:
57511 if (symbolValueOf) {
57512 return symbolValueOf.call(object) == symbolValueOf.call(other);
57513 }
57514 }
57515 return false;
57516}
57517
57518module.exports = equalByTag;
57519
57520
57521/***/ }),
57522
57523/***/ "./node_modules/lodash/_equalObjects.js":
57524/*!**********************************************!*\
57525 !*** ./node_modules/lodash/_equalObjects.js ***!
57526 \**********************************************/
57527/*! no static exports found */
57528/***/ (function(module, exports, __webpack_require__) {
57529
57530var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js");
57531
57532/** Used to compose bitmasks for value comparisons. */
57533var COMPARE_PARTIAL_FLAG = 1;
57534
57535/** Used for built-in method references. */
57536var objectProto = Object.prototype;
57537
57538/** Used to check objects for own properties. */
57539var hasOwnProperty = objectProto.hasOwnProperty;
57540
57541/**
57542 * A specialized version of `baseIsEqualDeep` for objects with support for
57543 * partial deep comparisons.
57544 *
57545 * @private
57546 * @param {Object} object The object to compare.
57547 * @param {Object} other The other object to compare.
57548 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
57549 * @param {Function} customizer The function to customize comparisons.
57550 * @param {Function} equalFunc The function to determine equivalents of values.
57551 * @param {Object} stack Tracks traversed `object` and `other` objects.
57552 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
57553 */
57554function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
57555 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
57556 objProps = getAllKeys(object),
57557 objLength = objProps.length,
57558 othProps = getAllKeys(other),
57559 othLength = othProps.length;
57560
57561 if (objLength != othLength && !isPartial) {
57562 return false;
57563 }
57564 var index = objLength;
57565 while (index--) {
57566 var key = objProps[index];
57567 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
57568 return false;
57569 }
57570 }
57571 // Assume cyclic values are equal.
57572 var stacked = stack.get(object);
57573 if (stacked && stack.get(other)) {
57574 return stacked == other;
57575 }
57576 var result = true;
57577 stack.set(object, other);
57578 stack.set(other, object);
57579
57580 var skipCtor = isPartial;
57581 while (++index < objLength) {
57582 key = objProps[index];
57583 var objValue = object[key],
57584 othValue = other[key];
57585
57586 if (customizer) {
57587 var compared = isPartial
57588 ? customizer(othValue, objValue, key, other, object, stack)
57589 : customizer(objValue, othValue, key, object, other, stack);
57590 }
57591 // Recursively compare objects (susceptible to call stack limits).
57592 if (!(compared === undefined
57593 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
57594 : compared
57595 )) {
57596 result = false;
57597 break;
57598 }
57599 skipCtor || (skipCtor = key == 'constructor');
57600 }
57601 if (result && !skipCtor) {
57602 var objCtor = object.constructor,
57603 othCtor = other.constructor;
57604
57605 // Non `Object` object instances with different constructors are not equal.
57606 if (objCtor != othCtor &&
57607 ('constructor' in object && 'constructor' in other) &&
57608 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
57609 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
57610 result = false;
57611 }
57612 }
57613 stack['delete'](object);
57614 stack['delete'](other);
57615 return result;
57616}
57617
57618module.exports = equalObjects;
57619
57620
57621/***/ }),
57622
57623/***/ "./node_modules/lodash/_flatRest.js":
57624/*!******************************************!*\
57625 !*** ./node_modules/lodash/_flatRest.js ***!
57626 \******************************************/
57627/*! no static exports found */
57628/***/ (function(module, exports, __webpack_require__) {
57629
57630var flatten = __webpack_require__(/*! ./flatten */ "./node_modules/lodash/flatten.js"),
57631 overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"),
57632 setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js");
57633
57634/**
57635 * A specialized version of `baseRest` which flattens the rest array.
57636 *
57637 * @private
57638 * @param {Function} func The function to apply a rest parameter to.
57639 * @returns {Function} Returns the new function.
57640 */
57641function flatRest(func) {
57642 return setToString(overRest(func, undefined, flatten), func + '');
57643}
57644
57645module.exports = flatRest;
57646
57647
57648/***/ }),
57649
57650/***/ "./node_modules/lodash/_freeGlobal.js":
57651/*!********************************************!*\
57652 !*** ./node_modules/lodash/_freeGlobal.js ***!
57653 \********************************************/
57654/*! no static exports found */
57655/***/ (function(module, exports, __webpack_require__) {
57656
57657/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
57658var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
57659
57660module.exports = freeGlobal;
57661
57662/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
57663
57664/***/ }),
57665
57666/***/ "./node_modules/lodash/_getAllKeys.js":
57667/*!********************************************!*\
57668 !*** ./node_modules/lodash/_getAllKeys.js ***!
57669 \********************************************/
57670/*! no static exports found */
57671/***/ (function(module, exports, __webpack_require__) {
57672
57673var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"),
57674 getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"),
57675 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
57676
57677/**
57678 * Creates an array of own enumerable property names and symbols of `object`.
57679 *
57680 * @private
57681 * @param {Object} object The object to query.
57682 * @returns {Array} Returns the array of property names and symbols.
57683 */
57684function getAllKeys(object) {
57685 return baseGetAllKeys(object, keys, getSymbols);
57686}
57687
57688module.exports = getAllKeys;
57689
57690
57691/***/ }),
57692
57693/***/ "./node_modules/lodash/_getAllKeysIn.js":
57694/*!**********************************************!*\
57695 !*** ./node_modules/lodash/_getAllKeysIn.js ***!
57696 \**********************************************/
57697/*! no static exports found */
57698/***/ (function(module, exports, __webpack_require__) {
57699
57700var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"),
57701 getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"),
57702 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
57703
57704/**
57705 * Creates an array of own and inherited enumerable property names and
57706 * symbols of `object`.
57707 *
57708 * @private
57709 * @param {Object} object The object to query.
57710 * @returns {Array} Returns the array of property names and symbols.
57711 */
57712function getAllKeysIn(object) {
57713 return baseGetAllKeys(object, keysIn, getSymbolsIn);
57714}
57715
57716module.exports = getAllKeysIn;
57717
57718
57719/***/ }),
57720
57721/***/ "./node_modules/lodash/_getMapData.js":
57722/*!********************************************!*\
57723 !*** ./node_modules/lodash/_getMapData.js ***!
57724 \********************************************/
57725/*! no static exports found */
57726/***/ (function(module, exports, __webpack_require__) {
57727
57728var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/lodash/_isKeyable.js");
57729
57730/**
57731 * Gets the data for `map`.
57732 *
57733 * @private
57734 * @param {Object} map The map to query.
57735 * @param {string} key The reference key.
57736 * @returns {*} Returns the map data.
57737 */
57738function getMapData(map, key) {
57739 var data = map.__data__;
57740 return isKeyable(key)
57741 ? data[typeof key == 'string' ? 'string' : 'hash']
57742 : data.map;
57743}
57744
57745module.exports = getMapData;
57746
57747
57748/***/ }),
57749
57750/***/ "./node_modules/lodash/_getMatchData.js":
57751/*!**********************************************!*\
57752 !*** ./node_modules/lodash/_getMatchData.js ***!
57753 \**********************************************/
57754/*! no static exports found */
57755/***/ (function(module, exports, __webpack_require__) {
57756
57757var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"),
57758 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
57759
57760/**
57761 * Gets the property names, values, and compare flags of `object`.
57762 *
57763 * @private
57764 * @param {Object} object The object to query.
57765 * @returns {Array} Returns the match data of `object`.
57766 */
57767function getMatchData(object) {
57768 var result = keys(object),
57769 length = result.length;
57770
57771 while (length--) {
57772 var key = result[length],
57773 value = object[key];
57774
57775 result[length] = [key, value, isStrictComparable(value)];
57776 }
57777 return result;
57778}
57779
57780module.exports = getMatchData;
57781
57782
57783/***/ }),
57784
57785/***/ "./node_modules/lodash/_getNative.js":
57786/*!*******************************************!*\
57787 !*** ./node_modules/lodash/_getNative.js ***!
57788 \*******************************************/
57789/*! no static exports found */
57790/***/ (function(module, exports, __webpack_require__) {
57791
57792var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"),
57793 getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js");
57794
57795/**
57796 * Gets the native function at `key` of `object`.
57797 *
57798 * @private
57799 * @param {Object} object The object to query.
57800 * @param {string} key The key of the method to get.
57801 * @returns {*} Returns the function if it's native, else `undefined`.
57802 */
57803function getNative(object, key) {
57804 var value = getValue(object, key);
57805 return baseIsNative(value) ? value : undefined;
57806}
57807
57808module.exports = getNative;
57809
57810
57811/***/ }),
57812
57813/***/ "./node_modules/lodash/_getPrototype.js":
57814/*!**********************************************!*\
57815 !*** ./node_modules/lodash/_getPrototype.js ***!
57816 \**********************************************/
57817/*! no static exports found */
57818/***/ (function(module, exports, __webpack_require__) {
57819
57820var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js");
57821
57822/** Built-in value references. */
57823var getPrototype = overArg(Object.getPrototypeOf, Object);
57824
57825module.exports = getPrototype;
57826
57827
57828/***/ }),
57829
57830/***/ "./node_modules/lodash/_getRawTag.js":
57831/*!*******************************************!*\
57832 !*** ./node_modules/lodash/_getRawTag.js ***!
57833 \*******************************************/
57834/*! no static exports found */
57835/***/ (function(module, exports, __webpack_require__) {
57836
57837var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
57838
57839/** Used for built-in method references. */
57840var objectProto = Object.prototype;
57841
57842/** Used to check objects for own properties. */
57843var hasOwnProperty = objectProto.hasOwnProperty;
57844
57845/**
57846 * Used to resolve the
57847 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
57848 * of values.
57849 */
57850var nativeObjectToString = objectProto.toString;
57851
57852/** Built-in value references. */
57853var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
57854
57855/**
57856 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
57857 *
57858 * @private
57859 * @param {*} value The value to query.
57860 * @returns {string} Returns the raw `toStringTag`.
57861 */
57862function getRawTag(value) {
57863 var isOwn = hasOwnProperty.call(value, symToStringTag),
57864 tag = value[symToStringTag];
57865
57866 try {
57867 value[symToStringTag] = undefined;
57868 var unmasked = true;
57869 } catch (e) {}
57870
57871 var result = nativeObjectToString.call(value);
57872 if (unmasked) {
57873 if (isOwn) {
57874 value[symToStringTag] = tag;
57875 } else {
57876 delete value[symToStringTag];
57877 }
57878 }
57879 return result;
57880}
57881
57882module.exports = getRawTag;
57883
57884
57885/***/ }),
57886
57887/***/ "./node_modules/lodash/_getSymbols.js":
57888/*!********************************************!*\
57889 !*** ./node_modules/lodash/_getSymbols.js ***!
57890 \********************************************/
57891/*! no static exports found */
57892/***/ (function(module, exports, __webpack_require__) {
57893
57894var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"),
57895 stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js");
57896
57897/** Used for built-in method references. */
57898var objectProto = Object.prototype;
57899
57900/** Built-in value references. */
57901var propertyIsEnumerable = objectProto.propertyIsEnumerable;
57902
57903/* Built-in method references for those with the same name as other `lodash` methods. */
57904var nativeGetSymbols = Object.getOwnPropertySymbols;
57905
57906/**
57907 * Creates an array of the own enumerable symbols of `object`.
57908 *
57909 * @private
57910 * @param {Object} object The object to query.
57911 * @returns {Array} Returns the array of symbols.
57912 */
57913var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
57914 if (object == null) {
57915 return [];
57916 }
57917 object = Object(object);
57918 return arrayFilter(nativeGetSymbols(object), function(symbol) {
57919 return propertyIsEnumerable.call(object, symbol);
57920 });
57921};
57922
57923module.exports = getSymbols;
57924
57925
57926/***/ }),
57927
57928/***/ "./node_modules/lodash/_getSymbolsIn.js":
57929/*!**********************************************!*\
57930 !*** ./node_modules/lodash/_getSymbolsIn.js ***!
57931 \**********************************************/
57932/*! no static exports found */
57933/***/ (function(module, exports, __webpack_require__) {
57934
57935var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"),
57936 getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
57937 getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"),
57938 stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js");
57939
57940/* Built-in method references for those with the same name as other `lodash` methods. */
57941var nativeGetSymbols = Object.getOwnPropertySymbols;
57942
57943/**
57944 * Creates an array of the own and inherited enumerable symbols of `object`.
57945 *
57946 * @private
57947 * @param {Object} object The object to query.
57948 * @returns {Array} Returns the array of symbols.
57949 */
57950var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
57951 var result = [];
57952 while (object) {
57953 arrayPush(result, getSymbols(object));
57954 object = getPrototype(object);
57955 }
57956 return result;
57957};
57958
57959module.exports = getSymbolsIn;
57960
57961
57962/***/ }),
57963
57964/***/ "./node_modules/lodash/_getTag.js":
57965/*!****************************************!*\
57966 !*** ./node_modules/lodash/_getTag.js ***!
57967 \****************************************/
57968/*! no static exports found */
57969/***/ (function(module, exports, __webpack_require__) {
57970
57971var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/lodash/_DataView.js"),
57972 Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"),
57973 Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/lodash/_Promise.js"),
57974 Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"),
57975 WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/lodash/_WeakMap.js"),
57976 baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
57977 toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js");
57978
57979/** `Object#toString` result references. */
57980var mapTag = '[object Map]',
57981 objectTag = '[object Object]',
57982 promiseTag = '[object Promise]',
57983 setTag = '[object Set]',
57984 weakMapTag = '[object WeakMap]';
57985
57986var dataViewTag = '[object DataView]';
57987
57988/** Used to detect maps, sets, and weakmaps. */
57989var dataViewCtorString = toSource(DataView),
57990 mapCtorString = toSource(Map),
57991 promiseCtorString = toSource(Promise),
57992 setCtorString = toSource(Set),
57993 weakMapCtorString = toSource(WeakMap);
57994
57995/**
57996 * Gets the `toStringTag` of `value`.
57997 *
57998 * @private
57999 * @param {*} value The value to query.
58000 * @returns {string} Returns the `toStringTag`.
58001 */
58002var getTag = baseGetTag;
58003
58004// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
58005if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
58006 (Map && getTag(new Map) != mapTag) ||
58007 (Promise && getTag(Promise.resolve()) != promiseTag) ||
58008 (Set && getTag(new Set) != setTag) ||
58009 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
58010 getTag = function(value) {
58011 var result = baseGetTag(value),
58012 Ctor = result == objectTag ? value.constructor : undefined,
58013 ctorString = Ctor ? toSource(Ctor) : '';
58014
58015 if (ctorString) {
58016 switch (ctorString) {
58017 case dataViewCtorString: return dataViewTag;
58018 case mapCtorString: return mapTag;
58019 case promiseCtorString: return promiseTag;
58020 case setCtorString: return setTag;
58021 case weakMapCtorString: return weakMapTag;
58022 }
58023 }
58024 return result;
58025 };
58026}
58027
58028module.exports = getTag;
58029
58030
58031/***/ }),
58032
58033/***/ "./node_modules/lodash/_getValue.js":
58034/*!******************************************!*\
58035 !*** ./node_modules/lodash/_getValue.js ***!
58036 \******************************************/
58037/*! no static exports found */
58038/***/ (function(module, exports) {
58039
58040/**
58041 * Gets the value at `key` of `object`.
58042 *
58043 * @private
58044 * @param {Object} [object] The object to query.
58045 * @param {string} key The key of the property to get.
58046 * @returns {*} Returns the property value.
58047 */
58048function getValue(object, key) {
58049 return object == null ? undefined : object[key];
58050}
58051
58052module.exports = getValue;
58053
58054
58055/***/ }),
58056
58057/***/ "./node_modules/lodash/_hasPath.js":
58058/*!*****************************************!*\
58059 !*** ./node_modules/lodash/_hasPath.js ***!
58060 \*****************************************/
58061/*! no static exports found */
58062/***/ (function(module, exports, __webpack_require__) {
58063
58064var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"),
58065 isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
58066 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
58067 isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
58068 isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"),
58069 toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
58070
58071/**
58072 * Checks if `path` exists on `object`.
58073 *
58074 * @private
58075 * @param {Object} object The object to query.
58076 * @param {Array|string} path The path to check.
58077 * @param {Function} hasFunc The function to check properties.
58078 * @returns {boolean} Returns `true` if `path` exists, else `false`.
58079 */
58080function hasPath(object, path, hasFunc) {
58081 path = castPath(path, object);
58082
58083 var index = -1,
58084 length = path.length,
58085 result = false;
58086
58087 while (++index < length) {
58088 var key = toKey(path[index]);
58089 if (!(result = object != null && hasFunc(object, key))) {
58090 break;
58091 }
58092 object = object[key];
58093 }
58094 if (result || ++index != length) {
58095 return result;
58096 }
58097 length = object == null ? 0 : object.length;
58098 return !!length && isLength(length) && isIndex(key, length) &&
58099 (isArray(object) || isArguments(object));
58100}
58101
58102module.exports = hasPath;
58103
58104
58105/***/ }),
58106
58107/***/ "./node_modules/lodash/_hasUnicode.js":
58108/*!********************************************!*\
58109 !*** ./node_modules/lodash/_hasUnicode.js ***!
58110 \********************************************/
58111/*! no static exports found */
58112/***/ (function(module, exports) {
58113
58114/** Used to compose unicode character classes. */
58115var rsAstralRange = '\\ud800-\\udfff',
58116 rsComboMarksRange = '\\u0300-\\u036f',
58117 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
58118 rsComboSymbolsRange = '\\u20d0-\\u20ff',
58119 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
58120 rsVarRange = '\\ufe0e\\ufe0f';
58121
58122/** Used to compose unicode capture groups. */
58123var rsZWJ = '\\u200d';
58124
58125/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
58126var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
58127
58128/**
58129 * Checks if `string` contains Unicode symbols.
58130 *
58131 * @private
58132 * @param {string} string The string to inspect.
58133 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
58134 */
58135function hasUnicode(string) {
58136 return reHasUnicode.test(string);
58137}
58138
58139module.exports = hasUnicode;
58140
58141
58142/***/ }),
58143
58144/***/ "./node_modules/lodash/_hashClear.js":
58145/*!*******************************************!*\
58146 !*** ./node_modules/lodash/_hashClear.js ***!
58147 \*******************************************/
58148/*! no static exports found */
58149/***/ (function(module, exports, __webpack_require__) {
58150
58151var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
58152
58153/**
58154 * Removes all key-value entries from the hash.
58155 *
58156 * @private
58157 * @name clear
58158 * @memberOf Hash
58159 */
58160function hashClear() {
58161 this.__data__ = nativeCreate ? nativeCreate(null) : {};
58162 this.size = 0;
58163}
58164
58165module.exports = hashClear;
58166
58167
58168/***/ }),
58169
58170/***/ "./node_modules/lodash/_hashDelete.js":
58171/*!********************************************!*\
58172 !*** ./node_modules/lodash/_hashDelete.js ***!
58173 \********************************************/
58174/*! no static exports found */
58175/***/ (function(module, exports) {
58176
58177/**
58178 * Removes `key` and its value from the hash.
58179 *
58180 * @private
58181 * @name delete
58182 * @memberOf Hash
58183 * @param {Object} hash The hash to modify.
58184 * @param {string} key The key of the value to remove.
58185 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
58186 */
58187function hashDelete(key) {
58188 var result = this.has(key) && delete this.__data__[key];
58189 this.size -= result ? 1 : 0;
58190 return result;
58191}
58192
58193module.exports = hashDelete;
58194
58195
58196/***/ }),
58197
58198/***/ "./node_modules/lodash/_hashGet.js":
58199/*!*****************************************!*\
58200 !*** ./node_modules/lodash/_hashGet.js ***!
58201 \*****************************************/
58202/*! no static exports found */
58203/***/ (function(module, exports, __webpack_require__) {
58204
58205var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
58206
58207/** Used to stand-in for `undefined` hash values. */
58208var HASH_UNDEFINED = '__lodash_hash_undefined__';
58209
58210/** Used for built-in method references. */
58211var objectProto = Object.prototype;
58212
58213/** Used to check objects for own properties. */
58214var hasOwnProperty = objectProto.hasOwnProperty;
58215
58216/**
58217 * Gets the hash value for `key`.
58218 *
58219 * @private
58220 * @name get
58221 * @memberOf Hash
58222 * @param {string} key The key of the value to get.
58223 * @returns {*} Returns the entry value.
58224 */
58225function hashGet(key) {
58226 var data = this.__data__;
58227 if (nativeCreate) {
58228 var result = data[key];
58229 return result === HASH_UNDEFINED ? undefined : result;
58230 }
58231 return hasOwnProperty.call(data, key) ? data[key] : undefined;
58232}
58233
58234module.exports = hashGet;
58235
58236
58237/***/ }),
58238
58239/***/ "./node_modules/lodash/_hashHas.js":
58240/*!*****************************************!*\
58241 !*** ./node_modules/lodash/_hashHas.js ***!
58242 \*****************************************/
58243/*! no static exports found */
58244/***/ (function(module, exports, __webpack_require__) {
58245
58246var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
58247
58248/** Used for built-in method references. */
58249var objectProto = Object.prototype;
58250
58251/** Used to check objects for own properties. */
58252var hasOwnProperty = objectProto.hasOwnProperty;
58253
58254/**
58255 * Checks if a hash value for `key` exists.
58256 *
58257 * @private
58258 * @name has
58259 * @memberOf Hash
58260 * @param {string} key The key of the entry to check.
58261 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
58262 */
58263function hashHas(key) {
58264 var data = this.__data__;
58265 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
58266}
58267
58268module.exports = hashHas;
58269
58270
58271/***/ }),
58272
58273/***/ "./node_modules/lodash/_hashSet.js":
58274/*!*****************************************!*\
58275 !*** ./node_modules/lodash/_hashSet.js ***!
58276 \*****************************************/
58277/*! no static exports found */
58278/***/ (function(module, exports, __webpack_require__) {
58279
58280var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js");
58281
58282/** Used to stand-in for `undefined` hash values. */
58283var HASH_UNDEFINED = '__lodash_hash_undefined__';
58284
58285/**
58286 * Sets the hash `key` to `value`.
58287 *
58288 * @private
58289 * @name set
58290 * @memberOf Hash
58291 * @param {string} key The key of the value to set.
58292 * @param {*} value The value to set.
58293 * @returns {Object} Returns the hash instance.
58294 */
58295function hashSet(key, value) {
58296 var data = this.__data__;
58297 this.size += this.has(key) ? 0 : 1;
58298 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
58299 return this;
58300}
58301
58302module.exports = hashSet;
58303
58304
58305/***/ }),
58306
58307/***/ "./node_modules/lodash/_initCloneArray.js":
58308/*!************************************************!*\
58309 !*** ./node_modules/lodash/_initCloneArray.js ***!
58310 \************************************************/
58311/*! no static exports found */
58312/***/ (function(module, exports) {
58313
58314/** Used for built-in method references. */
58315var objectProto = Object.prototype;
58316
58317/** Used to check objects for own properties. */
58318var hasOwnProperty = objectProto.hasOwnProperty;
58319
58320/**
58321 * Initializes an array clone.
58322 *
58323 * @private
58324 * @param {Array} array The array to clone.
58325 * @returns {Array} Returns the initialized clone.
58326 */
58327function initCloneArray(array) {
58328 var length = array.length,
58329 result = new array.constructor(length);
58330
58331 // Add properties assigned by `RegExp#exec`.
58332 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
58333 result.index = array.index;
58334 result.input = array.input;
58335 }
58336 return result;
58337}
58338
58339module.exports = initCloneArray;
58340
58341
58342/***/ }),
58343
58344/***/ "./node_modules/lodash/_initCloneByTag.js":
58345/*!************************************************!*\
58346 !*** ./node_modules/lodash/_initCloneByTag.js ***!
58347 \************************************************/
58348/*! no static exports found */
58349/***/ (function(module, exports, __webpack_require__) {
58350
58351var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"),
58352 cloneDataView = __webpack_require__(/*! ./_cloneDataView */ "./node_modules/lodash/_cloneDataView.js"),
58353 cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/lodash/_cloneRegExp.js"),
58354 cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ "./node_modules/lodash/_cloneSymbol.js"),
58355 cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js");
58356
58357/** `Object#toString` result references. */
58358var boolTag = '[object Boolean]',
58359 dateTag = '[object Date]',
58360 mapTag = '[object Map]',
58361 numberTag = '[object Number]',
58362 regexpTag = '[object RegExp]',
58363 setTag = '[object Set]',
58364 stringTag = '[object String]',
58365 symbolTag = '[object Symbol]';
58366
58367var arrayBufferTag = '[object ArrayBuffer]',
58368 dataViewTag = '[object DataView]',
58369 float32Tag = '[object Float32Array]',
58370 float64Tag = '[object Float64Array]',
58371 int8Tag = '[object Int8Array]',
58372 int16Tag = '[object Int16Array]',
58373 int32Tag = '[object Int32Array]',
58374 uint8Tag = '[object Uint8Array]',
58375 uint8ClampedTag = '[object Uint8ClampedArray]',
58376 uint16Tag = '[object Uint16Array]',
58377 uint32Tag = '[object Uint32Array]';
58378
58379/**
58380 * Initializes an object clone based on its `toStringTag`.
58381 *
58382 * **Note:** This function only supports cloning values with tags of
58383 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
58384 *
58385 * @private
58386 * @param {Object} object The object to clone.
58387 * @param {string} tag The `toStringTag` of the object to clone.
58388 * @param {boolean} [isDeep] Specify a deep clone.
58389 * @returns {Object} Returns the initialized clone.
58390 */
58391function initCloneByTag(object, tag, isDeep) {
58392 var Ctor = object.constructor;
58393 switch (tag) {
58394 case arrayBufferTag:
58395 return cloneArrayBuffer(object);
58396
58397 case boolTag:
58398 case dateTag:
58399 return new Ctor(+object);
58400
58401 case dataViewTag:
58402 return cloneDataView(object, isDeep);
58403
58404 case float32Tag: case float64Tag:
58405 case int8Tag: case int16Tag: case int32Tag:
58406 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
58407 return cloneTypedArray(object, isDeep);
58408
58409 case mapTag:
58410 return new Ctor;
58411
58412 case numberTag:
58413 case stringTag:
58414 return new Ctor(object);
58415
58416 case regexpTag:
58417 return cloneRegExp(object);
58418
58419 case setTag:
58420 return new Ctor;
58421
58422 case symbolTag:
58423 return cloneSymbol(object);
58424 }
58425}
58426
58427module.exports = initCloneByTag;
58428
58429
58430/***/ }),
58431
58432/***/ "./node_modules/lodash/_initCloneObject.js":
58433/*!*************************************************!*\
58434 !*** ./node_modules/lodash/_initCloneObject.js ***!
58435 \*************************************************/
58436/*! no static exports found */
58437/***/ (function(module, exports, __webpack_require__) {
58438
58439var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"),
58440 getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
58441 isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js");
58442
58443/**
58444 * Initializes an object clone.
58445 *
58446 * @private
58447 * @param {Object} object The object to clone.
58448 * @returns {Object} Returns the initialized clone.
58449 */
58450function initCloneObject(object) {
58451 return (typeof object.constructor == 'function' && !isPrototype(object))
58452 ? baseCreate(getPrototype(object))
58453 : {};
58454}
58455
58456module.exports = initCloneObject;
58457
58458
58459/***/ }),
58460
58461/***/ "./node_modules/lodash/_isFlattenable.js":
58462/*!***********************************************!*\
58463 !*** ./node_modules/lodash/_isFlattenable.js ***!
58464 \***********************************************/
58465/*! no static exports found */
58466/***/ (function(module, exports, __webpack_require__) {
58467
58468var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
58469 isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
58470 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
58471
58472/** Built-in value references. */
58473var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
58474
58475/**
58476 * Checks if `value` is a flattenable `arguments` object or array.
58477 *
58478 * @private
58479 * @param {*} value The value to check.
58480 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
58481 */
58482function isFlattenable(value) {
58483 return isArray(value) || isArguments(value) ||
58484 !!(spreadableSymbol && value && value[spreadableSymbol]);
58485}
58486
58487module.exports = isFlattenable;
58488
58489
58490/***/ }),
58491
58492/***/ "./node_modules/lodash/_isIndex.js":
58493/*!*****************************************!*\
58494 !*** ./node_modules/lodash/_isIndex.js ***!
58495 \*****************************************/
58496/*! no static exports found */
58497/***/ (function(module, exports) {
58498
58499/** Used as references for various `Number` constants. */
58500var MAX_SAFE_INTEGER = 9007199254740991;
58501
58502/** Used to detect unsigned integer values. */
58503var reIsUint = /^(?:0|[1-9]\d*)$/;
58504
58505/**
58506 * Checks if `value` is a valid array-like index.
58507 *
58508 * @private
58509 * @param {*} value The value to check.
58510 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
58511 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
58512 */
58513function isIndex(value, length) {
58514 var type = typeof value;
58515 length = length == null ? MAX_SAFE_INTEGER : length;
58516
58517 return !!length &&
58518 (type == 'number' ||
58519 (type != 'symbol' && reIsUint.test(value))) &&
58520 (value > -1 && value % 1 == 0 && value < length);
58521}
58522
58523module.exports = isIndex;
58524
58525
58526/***/ }),
58527
58528/***/ "./node_modules/lodash/_isIterateeCall.js":
58529/*!************************************************!*\
58530 !*** ./node_modules/lodash/_isIterateeCall.js ***!
58531 \************************************************/
58532/*! no static exports found */
58533/***/ (function(module, exports, __webpack_require__) {
58534
58535var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
58536 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
58537 isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"),
58538 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
58539
58540/**
58541 * Checks if the given arguments are from an iteratee call.
58542 *
58543 * @private
58544 * @param {*} value The potential iteratee value argument.
58545 * @param {*} index The potential iteratee index or key argument.
58546 * @param {*} object The potential iteratee object argument.
58547 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
58548 * else `false`.
58549 */
58550function isIterateeCall(value, index, object) {
58551 if (!isObject(object)) {
58552 return false;
58553 }
58554 var type = typeof index;
58555 if (type == 'number'
58556 ? (isArrayLike(object) && isIndex(index, object.length))
58557 : (type == 'string' && index in object)
58558 ) {
58559 return eq(object[index], value);
58560 }
58561 return false;
58562}
58563
58564module.exports = isIterateeCall;
58565
58566
58567/***/ }),
58568
58569/***/ "./node_modules/lodash/_isKey.js":
58570/*!***************************************!*\
58571 !*** ./node_modules/lodash/_isKey.js ***!
58572 \***************************************/
58573/*! no static exports found */
58574/***/ (function(module, exports, __webpack_require__) {
58575
58576var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
58577 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
58578
58579/** Used to match property names within property paths. */
58580var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
58581 reIsPlainProp = /^\w*$/;
58582
58583/**
58584 * Checks if `value` is a property name and not a property path.
58585 *
58586 * @private
58587 * @param {*} value The value to check.
58588 * @param {Object} [object] The object to query keys on.
58589 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
58590 */
58591function isKey(value, object) {
58592 if (isArray(value)) {
58593 return false;
58594 }
58595 var type = typeof value;
58596 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
58597 value == null || isSymbol(value)) {
58598 return true;
58599 }
58600 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
58601 (object != null && value in Object(object));
58602}
58603
58604module.exports = isKey;
58605
58606
58607/***/ }),
58608
58609/***/ "./node_modules/lodash/_isKeyable.js":
58610/*!*******************************************!*\
58611 !*** ./node_modules/lodash/_isKeyable.js ***!
58612 \*******************************************/
58613/*! no static exports found */
58614/***/ (function(module, exports) {
58615
58616/**
58617 * Checks if `value` is suitable for use as unique object key.
58618 *
58619 * @private
58620 * @param {*} value The value to check.
58621 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
58622 */
58623function isKeyable(value) {
58624 var type = typeof value;
58625 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
58626 ? (value !== '__proto__')
58627 : (value === null);
58628}
58629
58630module.exports = isKeyable;
58631
58632
58633/***/ }),
58634
58635/***/ "./node_modules/lodash/_isMasked.js":
58636/*!******************************************!*\
58637 !*** ./node_modules/lodash/_isMasked.js ***!
58638 \******************************************/
58639/*! no static exports found */
58640/***/ (function(module, exports, __webpack_require__) {
58641
58642var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js");
58643
58644/** Used to detect methods masquerading as native. */
58645var maskSrcKey = (function() {
58646 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
58647 return uid ? ('Symbol(src)_1.' + uid) : '';
58648}());
58649
58650/**
58651 * Checks if `func` has its source masked.
58652 *
58653 * @private
58654 * @param {Function} func The function to check.
58655 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
58656 */
58657function isMasked(func) {
58658 return !!maskSrcKey && (maskSrcKey in func);
58659}
58660
58661module.exports = isMasked;
58662
58663
58664/***/ }),
58665
58666/***/ "./node_modules/lodash/_isPrototype.js":
58667/*!*********************************************!*\
58668 !*** ./node_modules/lodash/_isPrototype.js ***!
58669 \*********************************************/
58670/*! no static exports found */
58671/***/ (function(module, exports) {
58672
58673/** Used for built-in method references. */
58674var objectProto = Object.prototype;
58675
58676/**
58677 * Checks if `value` is likely a prototype object.
58678 *
58679 * @private
58680 * @param {*} value The value to check.
58681 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
58682 */
58683function isPrototype(value) {
58684 var Ctor = value && value.constructor,
58685 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
58686
58687 return value === proto;
58688}
58689
58690module.exports = isPrototype;
58691
58692
58693/***/ }),
58694
58695/***/ "./node_modules/lodash/_isStrictComparable.js":
58696/*!****************************************************!*\
58697 !*** ./node_modules/lodash/_isStrictComparable.js ***!
58698 \****************************************************/
58699/*! no static exports found */
58700/***/ (function(module, exports, __webpack_require__) {
58701
58702var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
58703
58704/**
58705 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
58706 *
58707 * @private
58708 * @param {*} value The value to check.
58709 * @returns {boolean} Returns `true` if `value` if suitable for strict
58710 * equality comparisons, else `false`.
58711 */
58712function isStrictComparable(value) {
58713 return value === value && !isObject(value);
58714}
58715
58716module.exports = isStrictComparable;
58717
58718
58719/***/ }),
58720
58721/***/ "./node_modules/lodash/_listCacheClear.js":
58722/*!************************************************!*\
58723 !*** ./node_modules/lodash/_listCacheClear.js ***!
58724 \************************************************/
58725/*! no static exports found */
58726/***/ (function(module, exports) {
58727
58728/**
58729 * Removes all key-value entries from the list cache.
58730 *
58731 * @private
58732 * @name clear
58733 * @memberOf ListCache
58734 */
58735function listCacheClear() {
58736 this.__data__ = [];
58737 this.size = 0;
58738}
58739
58740module.exports = listCacheClear;
58741
58742
58743/***/ }),
58744
58745/***/ "./node_modules/lodash/_listCacheDelete.js":
58746/*!*************************************************!*\
58747 !*** ./node_modules/lodash/_listCacheDelete.js ***!
58748 \*************************************************/
58749/*! no static exports found */
58750/***/ (function(module, exports, __webpack_require__) {
58751
58752var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
58753
58754/** Used for built-in method references. */
58755var arrayProto = Array.prototype;
58756
58757/** Built-in value references. */
58758var splice = arrayProto.splice;
58759
58760/**
58761 * Removes `key` and its value from the list cache.
58762 *
58763 * @private
58764 * @name delete
58765 * @memberOf ListCache
58766 * @param {string} key The key of the value to remove.
58767 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
58768 */
58769function listCacheDelete(key) {
58770 var data = this.__data__,
58771 index = assocIndexOf(data, key);
58772
58773 if (index < 0) {
58774 return false;
58775 }
58776 var lastIndex = data.length - 1;
58777 if (index == lastIndex) {
58778 data.pop();
58779 } else {
58780 splice.call(data, index, 1);
58781 }
58782 --this.size;
58783 return true;
58784}
58785
58786module.exports = listCacheDelete;
58787
58788
58789/***/ }),
58790
58791/***/ "./node_modules/lodash/_listCacheGet.js":
58792/*!**********************************************!*\
58793 !*** ./node_modules/lodash/_listCacheGet.js ***!
58794 \**********************************************/
58795/*! no static exports found */
58796/***/ (function(module, exports, __webpack_require__) {
58797
58798var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
58799
58800/**
58801 * Gets the list cache value for `key`.
58802 *
58803 * @private
58804 * @name get
58805 * @memberOf ListCache
58806 * @param {string} key The key of the value to get.
58807 * @returns {*} Returns the entry value.
58808 */
58809function listCacheGet(key) {
58810 var data = this.__data__,
58811 index = assocIndexOf(data, key);
58812
58813 return index < 0 ? undefined : data[index][1];
58814}
58815
58816module.exports = listCacheGet;
58817
58818
58819/***/ }),
58820
58821/***/ "./node_modules/lodash/_listCacheHas.js":
58822/*!**********************************************!*\
58823 !*** ./node_modules/lodash/_listCacheHas.js ***!
58824 \**********************************************/
58825/*! no static exports found */
58826/***/ (function(module, exports, __webpack_require__) {
58827
58828var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
58829
58830/**
58831 * Checks if a list cache value for `key` exists.
58832 *
58833 * @private
58834 * @name has
58835 * @memberOf ListCache
58836 * @param {string} key The key of the entry to check.
58837 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
58838 */
58839function listCacheHas(key) {
58840 return assocIndexOf(this.__data__, key) > -1;
58841}
58842
58843module.exports = listCacheHas;
58844
58845
58846/***/ }),
58847
58848/***/ "./node_modules/lodash/_listCacheSet.js":
58849/*!**********************************************!*\
58850 !*** ./node_modules/lodash/_listCacheSet.js ***!
58851 \**********************************************/
58852/*! no static exports found */
58853/***/ (function(module, exports, __webpack_require__) {
58854
58855var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js");
58856
58857/**
58858 * Sets the list cache `key` to `value`.
58859 *
58860 * @private
58861 * @name set
58862 * @memberOf ListCache
58863 * @param {string} key The key of the value to set.
58864 * @param {*} value The value to set.
58865 * @returns {Object} Returns the list cache instance.
58866 */
58867function listCacheSet(key, value) {
58868 var data = this.__data__,
58869 index = assocIndexOf(data, key);
58870
58871 if (index < 0) {
58872 ++this.size;
58873 data.push([key, value]);
58874 } else {
58875 data[index][1] = value;
58876 }
58877 return this;
58878}
58879
58880module.exports = listCacheSet;
58881
58882
58883/***/ }),
58884
58885/***/ "./node_modules/lodash/_mapCacheClear.js":
58886/*!***********************************************!*\
58887 !*** ./node_modules/lodash/_mapCacheClear.js ***!
58888 \***********************************************/
58889/*! no static exports found */
58890/***/ (function(module, exports, __webpack_require__) {
58891
58892var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/lodash/_Hash.js"),
58893 ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
58894 Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js");
58895
58896/**
58897 * Removes all key-value entries from the map.
58898 *
58899 * @private
58900 * @name clear
58901 * @memberOf MapCache
58902 */
58903function mapCacheClear() {
58904 this.size = 0;
58905 this.__data__ = {
58906 'hash': new Hash,
58907 'map': new (Map || ListCache),
58908 'string': new Hash
58909 };
58910}
58911
58912module.exports = mapCacheClear;
58913
58914
58915/***/ }),
58916
58917/***/ "./node_modules/lodash/_mapCacheDelete.js":
58918/*!************************************************!*\
58919 !*** ./node_modules/lodash/_mapCacheDelete.js ***!
58920 \************************************************/
58921/*! no static exports found */
58922/***/ (function(module, exports, __webpack_require__) {
58923
58924var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
58925
58926/**
58927 * Removes `key` and its value from the map.
58928 *
58929 * @private
58930 * @name delete
58931 * @memberOf MapCache
58932 * @param {string} key The key of the value to remove.
58933 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
58934 */
58935function mapCacheDelete(key) {
58936 var result = getMapData(this, key)['delete'](key);
58937 this.size -= result ? 1 : 0;
58938 return result;
58939}
58940
58941module.exports = mapCacheDelete;
58942
58943
58944/***/ }),
58945
58946/***/ "./node_modules/lodash/_mapCacheGet.js":
58947/*!*********************************************!*\
58948 !*** ./node_modules/lodash/_mapCacheGet.js ***!
58949 \*********************************************/
58950/*! no static exports found */
58951/***/ (function(module, exports, __webpack_require__) {
58952
58953var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
58954
58955/**
58956 * Gets the map value for `key`.
58957 *
58958 * @private
58959 * @name get
58960 * @memberOf MapCache
58961 * @param {string} key The key of the value to get.
58962 * @returns {*} Returns the entry value.
58963 */
58964function mapCacheGet(key) {
58965 return getMapData(this, key).get(key);
58966}
58967
58968module.exports = mapCacheGet;
58969
58970
58971/***/ }),
58972
58973/***/ "./node_modules/lodash/_mapCacheHas.js":
58974/*!*********************************************!*\
58975 !*** ./node_modules/lodash/_mapCacheHas.js ***!
58976 \*********************************************/
58977/*! no static exports found */
58978/***/ (function(module, exports, __webpack_require__) {
58979
58980var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
58981
58982/**
58983 * Checks if a map value for `key` exists.
58984 *
58985 * @private
58986 * @name has
58987 * @memberOf MapCache
58988 * @param {string} key The key of the entry to check.
58989 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
58990 */
58991function mapCacheHas(key) {
58992 return getMapData(this, key).has(key);
58993}
58994
58995module.exports = mapCacheHas;
58996
58997
58998/***/ }),
58999
59000/***/ "./node_modules/lodash/_mapCacheSet.js":
59001/*!*********************************************!*\
59002 !*** ./node_modules/lodash/_mapCacheSet.js ***!
59003 \*********************************************/
59004/*! no static exports found */
59005/***/ (function(module, exports, __webpack_require__) {
59006
59007var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js");
59008
59009/**
59010 * Sets the map `key` to `value`.
59011 *
59012 * @private
59013 * @name set
59014 * @memberOf MapCache
59015 * @param {string} key The key of the value to set.
59016 * @param {*} value The value to set.
59017 * @returns {Object} Returns the map cache instance.
59018 */
59019function mapCacheSet(key, value) {
59020 var data = getMapData(this, key),
59021 size = data.size;
59022
59023 data.set(key, value);
59024 this.size += data.size == size ? 0 : 1;
59025 return this;
59026}
59027
59028module.exports = mapCacheSet;
59029
59030
59031/***/ }),
59032
59033/***/ "./node_modules/lodash/_mapToArray.js":
59034/*!********************************************!*\
59035 !*** ./node_modules/lodash/_mapToArray.js ***!
59036 \********************************************/
59037/*! no static exports found */
59038/***/ (function(module, exports) {
59039
59040/**
59041 * Converts `map` to its key-value pairs.
59042 *
59043 * @private
59044 * @param {Object} map The map to convert.
59045 * @returns {Array} Returns the key-value pairs.
59046 */
59047function mapToArray(map) {
59048 var index = -1,
59049 result = Array(map.size);
59050
59051 map.forEach(function(value, key) {
59052 result[++index] = [key, value];
59053 });
59054 return result;
59055}
59056
59057module.exports = mapToArray;
59058
59059
59060/***/ }),
59061
59062/***/ "./node_modules/lodash/_matchesStrictComparable.js":
59063/*!*********************************************************!*\
59064 !*** ./node_modules/lodash/_matchesStrictComparable.js ***!
59065 \*********************************************************/
59066/*! no static exports found */
59067/***/ (function(module, exports) {
59068
59069/**
59070 * A specialized version of `matchesProperty` for source values suitable
59071 * for strict equality comparisons, i.e. `===`.
59072 *
59073 * @private
59074 * @param {string} key The key of the property to get.
59075 * @param {*} srcValue The value to match.
59076 * @returns {Function} Returns the new spec function.
59077 */
59078function matchesStrictComparable(key, srcValue) {
59079 return function(object) {
59080 if (object == null) {
59081 return false;
59082 }
59083 return object[key] === srcValue &&
59084 (srcValue !== undefined || (key in Object(object)));
59085 };
59086}
59087
59088module.exports = matchesStrictComparable;
59089
59090
59091/***/ }),
59092
59093/***/ "./node_modules/lodash/_memoizeCapped.js":
59094/*!***********************************************!*\
59095 !*** ./node_modules/lodash/_memoizeCapped.js ***!
59096 \***********************************************/
59097/*! no static exports found */
59098/***/ (function(module, exports, __webpack_require__) {
59099
59100var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/lodash/memoize.js");
59101
59102/** Used as the maximum memoize cache size. */
59103var MAX_MEMOIZE_SIZE = 500;
59104
59105/**
59106 * A specialized version of `_.memoize` which clears the memoized function's
59107 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
59108 *
59109 * @private
59110 * @param {Function} func The function to have its output memoized.
59111 * @returns {Function} Returns the new memoized function.
59112 */
59113function memoizeCapped(func) {
59114 var result = memoize(func, function(key) {
59115 if (cache.size === MAX_MEMOIZE_SIZE) {
59116 cache.clear();
59117 }
59118 return key;
59119 });
59120
59121 var cache = result.cache;
59122 return result;
59123}
59124
59125module.exports = memoizeCapped;
59126
59127
59128/***/ }),
59129
59130/***/ "./node_modules/lodash/_nativeCreate.js":
59131/*!**********************************************!*\
59132 !*** ./node_modules/lodash/_nativeCreate.js ***!
59133 \**********************************************/
59134/*! no static exports found */
59135/***/ (function(module, exports, __webpack_require__) {
59136
59137var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js");
59138
59139/* Built-in method references that are verified to be native. */
59140var nativeCreate = getNative(Object, 'create');
59141
59142module.exports = nativeCreate;
59143
59144
59145/***/ }),
59146
59147/***/ "./node_modules/lodash/_nativeKeys.js":
59148/*!********************************************!*\
59149 !*** ./node_modules/lodash/_nativeKeys.js ***!
59150 \********************************************/
59151/*! no static exports found */
59152/***/ (function(module, exports, __webpack_require__) {
59153
59154var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js");
59155
59156/* Built-in method references for those with the same name as other `lodash` methods. */
59157var nativeKeys = overArg(Object.keys, Object);
59158
59159module.exports = nativeKeys;
59160
59161
59162/***/ }),
59163
59164/***/ "./node_modules/lodash/_nativeKeysIn.js":
59165/*!**********************************************!*\
59166 !*** ./node_modules/lodash/_nativeKeysIn.js ***!
59167 \**********************************************/
59168/*! no static exports found */
59169/***/ (function(module, exports) {
59170
59171/**
59172 * This function is like
59173 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
59174 * except that it includes inherited enumerable properties.
59175 *
59176 * @private
59177 * @param {Object} object The object to query.
59178 * @returns {Array} Returns the array of property names.
59179 */
59180function nativeKeysIn(object) {
59181 var result = [];
59182 if (object != null) {
59183 for (var key in Object(object)) {
59184 result.push(key);
59185 }
59186 }
59187 return result;
59188}
59189
59190module.exports = nativeKeysIn;
59191
59192
59193/***/ }),
59194
59195/***/ "./node_modules/lodash/_nodeUtil.js":
59196/*!******************************************!*\
59197 !*** ./node_modules/lodash/_nodeUtil.js ***!
59198 \******************************************/
59199/*! no static exports found */
59200/***/ (function(module, exports, __webpack_require__) {
59201
59202/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
59203
59204/** Detect free variable `exports`. */
59205var freeExports = true && exports && !exports.nodeType && exports;
59206
59207/** Detect free variable `module`. */
59208var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
59209
59210/** Detect the popular CommonJS extension `module.exports`. */
59211var moduleExports = freeModule && freeModule.exports === freeExports;
59212
59213/** Detect free variable `process` from Node.js. */
59214var freeProcess = moduleExports && freeGlobal.process;
59215
59216/** Used to access faster Node.js helpers. */
59217var nodeUtil = (function() {
59218 try {
59219 // Use `util.types` for Node.js 10+.
59220 var types = freeModule && freeModule.require && freeModule.require('util').types;
59221
59222 if (types) {
59223 return types;
59224 }
59225
59226 // Legacy `process.binding('util')` for Node.js < 10.
59227 return freeProcess && freeProcess.binding && freeProcess.binding('util');
59228 } catch (e) {}
59229}());
59230
59231module.exports = nodeUtil;
59232
59233/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
59234
59235/***/ }),
59236
59237/***/ "./node_modules/lodash/_objectToString.js":
59238/*!************************************************!*\
59239 !*** ./node_modules/lodash/_objectToString.js ***!
59240 \************************************************/
59241/*! no static exports found */
59242/***/ (function(module, exports) {
59243
59244/** Used for built-in method references. */
59245var objectProto = Object.prototype;
59246
59247/**
59248 * Used to resolve the
59249 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
59250 * of values.
59251 */
59252var nativeObjectToString = objectProto.toString;
59253
59254/**
59255 * Converts `value` to a string using `Object.prototype.toString`.
59256 *
59257 * @private
59258 * @param {*} value The value to convert.
59259 * @returns {string} Returns the converted string.
59260 */
59261function objectToString(value) {
59262 return nativeObjectToString.call(value);
59263}
59264
59265module.exports = objectToString;
59266
59267
59268/***/ }),
59269
59270/***/ "./node_modules/lodash/_overArg.js":
59271/*!*****************************************!*\
59272 !*** ./node_modules/lodash/_overArg.js ***!
59273 \*****************************************/
59274/*! no static exports found */
59275/***/ (function(module, exports) {
59276
59277/**
59278 * Creates a unary function that invokes `func` with its argument transformed.
59279 *
59280 * @private
59281 * @param {Function} func The function to wrap.
59282 * @param {Function} transform The argument transform.
59283 * @returns {Function} Returns the new function.
59284 */
59285function overArg(func, transform) {
59286 return function(arg) {
59287 return func(transform(arg));
59288 };
59289}
59290
59291module.exports = overArg;
59292
59293
59294/***/ }),
59295
59296/***/ "./node_modules/lodash/_overRest.js":
59297/*!******************************************!*\
59298 !*** ./node_modules/lodash/_overRest.js ***!
59299 \******************************************/
59300/*! no static exports found */
59301/***/ (function(module, exports, __webpack_require__) {
59302
59303var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js");
59304
59305/* Built-in method references for those with the same name as other `lodash` methods. */
59306var nativeMax = Math.max;
59307
59308/**
59309 * A specialized version of `baseRest` which transforms the rest array.
59310 *
59311 * @private
59312 * @param {Function} func The function to apply a rest parameter to.
59313 * @param {number} [start=func.length-1] The start position of the rest parameter.
59314 * @param {Function} transform The rest array transform.
59315 * @returns {Function} Returns the new function.
59316 */
59317function overRest(func, start, transform) {
59318 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
59319 return function() {
59320 var args = arguments,
59321 index = -1,
59322 length = nativeMax(args.length - start, 0),
59323 array = Array(length);
59324
59325 while (++index < length) {
59326 array[index] = args[start + index];
59327 }
59328 index = -1;
59329 var otherArgs = Array(start + 1);
59330 while (++index < start) {
59331 otherArgs[index] = args[index];
59332 }
59333 otherArgs[start] = transform(array);
59334 return apply(func, this, otherArgs);
59335 };
59336}
59337
59338module.exports = overRest;
59339
59340
59341/***/ }),
59342
59343/***/ "./node_modules/lodash/_root.js":
59344/*!**************************************!*\
59345 !*** ./node_modules/lodash/_root.js ***!
59346 \**************************************/
59347/*! no static exports found */
59348/***/ (function(module, exports, __webpack_require__) {
59349
59350var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
59351
59352/** Detect free variable `self`. */
59353var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
59354
59355/** Used as a reference to the global object. */
59356var root = freeGlobal || freeSelf || Function('return this')();
59357
59358module.exports = root;
59359
59360
59361/***/ }),
59362
59363/***/ "./node_modules/lodash/_safeGet.js":
59364/*!*****************************************!*\
59365 !*** ./node_modules/lodash/_safeGet.js ***!
59366 \*****************************************/
59367/*! no static exports found */
59368/***/ (function(module, exports) {
59369
59370/**
59371 * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
59372 *
59373 * @private
59374 * @param {Object} object The object to query.
59375 * @param {string} key The key of the property to get.
59376 * @returns {*} Returns the property value.
59377 */
59378function safeGet(object, key) {
59379 if (key === 'constructor' && typeof object[key] === 'function') {
59380 return;
59381 }
59382
59383 if (key == '__proto__') {
59384 return;
59385 }
59386
59387 return object[key];
59388}
59389
59390module.exports = safeGet;
59391
59392
59393/***/ }),
59394
59395/***/ "./node_modules/lodash/_setCacheAdd.js":
59396/*!*********************************************!*\
59397 !*** ./node_modules/lodash/_setCacheAdd.js ***!
59398 \*********************************************/
59399/*! no static exports found */
59400/***/ (function(module, exports) {
59401
59402/** Used to stand-in for `undefined` hash values. */
59403var HASH_UNDEFINED = '__lodash_hash_undefined__';
59404
59405/**
59406 * Adds `value` to the array cache.
59407 *
59408 * @private
59409 * @name add
59410 * @memberOf SetCache
59411 * @alias push
59412 * @param {*} value The value to cache.
59413 * @returns {Object} Returns the cache instance.
59414 */
59415function setCacheAdd(value) {
59416 this.__data__.set(value, HASH_UNDEFINED);
59417 return this;
59418}
59419
59420module.exports = setCacheAdd;
59421
59422
59423/***/ }),
59424
59425/***/ "./node_modules/lodash/_setCacheHas.js":
59426/*!*********************************************!*\
59427 !*** ./node_modules/lodash/_setCacheHas.js ***!
59428 \*********************************************/
59429/*! no static exports found */
59430/***/ (function(module, exports) {
59431
59432/**
59433 * Checks if `value` is in the array cache.
59434 *
59435 * @private
59436 * @name has
59437 * @memberOf SetCache
59438 * @param {*} value The value to search for.
59439 * @returns {number} Returns `true` if `value` is found, else `false`.
59440 */
59441function setCacheHas(value) {
59442 return this.__data__.has(value);
59443}
59444
59445module.exports = setCacheHas;
59446
59447
59448/***/ }),
59449
59450/***/ "./node_modules/lodash/_setToArray.js":
59451/*!********************************************!*\
59452 !*** ./node_modules/lodash/_setToArray.js ***!
59453 \********************************************/
59454/*! no static exports found */
59455/***/ (function(module, exports) {
59456
59457/**
59458 * Converts `set` to an array of its values.
59459 *
59460 * @private
59461 * @param {Object} set The set to convert.
59462 * @returns {Array} Returns the values.
59463 */
59464function setToArray(set) {
59465 var index = -1,
59466 result = Array(set.size);
59467
59468 set.forEach(function(value) {
59469 result[++index] = value;
59470 });
59471 return result;
59472}
59473
59474module.exports = setToArray;
59475
59476
59477/***/ }),
59478
59479/***/ "./node_modules/lodash/_setToString.js":
59480/*!*********************************************!*\
59481 !*** ./node_modules/lodash/_setToString.js ***!
59482 \*********************************************/
59483/*! no static exports found */
59484/***/ (function(module, exports, __webpack_require__) {
59485
59486var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"),
59487 shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js");
59488
59489/**
59490 * Sets the `toString` method of `func` to return `string`.
59491 *
59492 * @private
59493 * @param {Function} func The function to modify.
59494 * @param {Function} string The `toString` result.
59495 * @returns {Function} Returns `func`.
59496 */
59497var setToString = shortOut(baseSetToString);
59498
59499module.exports = setToString;
59500
59501
59502/***/ }),
59503
59504/***/ "./node_modules/lodash/_shortOut.js":
59505/*!******************************************!*\
59506 !*** ./node_modules/lodash/_shortOut.js ***!
59507 \******************************************/
59508/*! no static exports found */
59509/***/ (function(module, exports) {
59510
59511/** Used to detect hot functions by number of calls within a span of milliseconds. */
59512var HOT_COUNT = 800,
59513 HOT_SPAN = 16;
59514
59515/* Built-in method references for those with the same name as other `lodash` methods. */
59516var nativeNow = Date.now;
59517
59518/**
59519 * Creates a function that'll short out and invoke `identity` instead
59520 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
59521 * milliseconds.
59522 *
59523 * @private
59524 * @param {Function} func The function to restrict.
59525 * @returns {Function} Returns the new shortable function.
59526 */
59527function shortOut(func) {
59528 var count = 0,
59529 lastCalled = 0;
59530
59531 return function() {
59532 var stamp = nativeNow(),
59533 remaining = HOT_SPAN - (stamp - lastCalled);
59534
59535 lastCalled = stamp;
59536 if (remaining > 0) {
59537 if (++count >= HOT_COUNT) {
59538 return arguments[0];
59539 }
59540 } else {
59541 count = 0;
59542 }
59543 return func.apply(undefined, arguments);
59544 };
59545}
59546
59547module.exports = shortOut;
59548
59549
59550/***/ }),
59551
59552/***/ "./node_modules/lodash/_stackClear.js":
59553/*!********************************************!*\
59554 !*** ./node_modules/lodash/_stackClear.js ***!
59555 \********************************************/
59556/*! no static exports found */
59557/***/ (function(module, exports, __webpack_require__) {
59558
59559var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js");
59560
59561/**
59562 * Removes all key-value entries from the stack.
59563 *
59564 * @private
59565 * @name clear
59566 * @memberOf Stack
59567 */
59568function stackClear() {
59569 this.__data__ = new ListCache;
59570 this.size = 0;
59571}
59572
59573module.exports = stackClear;
59574
59575
59576/***/ }),
59577
59578/***/ "./node_modules/lodash/_stackDelete.js":
59579/*!*********************************************!*\
59580 !*** ./node_modules/lodash/_stackDelete.js ***!
59581 \*********************************************/
59582/*! no static exports found */
59583/***/ (function(module, exports) {
59584
59585/**
59586 * Removes `key` and its value from the stack.
59587 *
59588 * @private
59589 * @name delete
59590 * @memberOf Stack
59591 * @param {string} key The key of the value to remove.
59592 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
59593 */
59594function stackDelete(key) {
59595 var data = this.__data__,
59596 result = data['delete'](key);
59597
59598 this.size = data.size;
59599 return result;
59600}
59601
59602module.exports = stackDelete;
59603
59604
59605/***/ }),
59606
59607/***/ "./node_modules/lodash/_stackGet.js":
59608/*!******************************************!*\
59609 !*** ./node_modules/lodash/_stackGet.js ***!
59610 \******************************************/
59611/*! no static exports found */
59612/***/ (function(module, exports) {
59613
59614/**
59615 * Gets the stack value for `key`.
59616 *
59617 * @private
59618 * @name get
59619 * @memberOf Stack
59620 * @param {string} key The key of the value to get.
59621 * @returns {*} Returns the entry value.
59622 */
59623function stackGet(key) {
59624 return this.__data__.get(key);
59625}
59626
59627module.exports = stackGet;
59628
59629
59630/***/ }),
59631
59632/***/ "./node_modules/lodash/_stackHas.js":
59633/*!******************************************!*\
59634 !*** ./node_modules/lodash/_stackHas.js ***!
59635 \******************************************/
59636/*! no static exports found */
59637/***/ (function(module, exports) {
59638
59639/**
59640 * Checks if a stack value for `key` exists.
59641 *
59642 * @private
59643 * @name has
59644 * @memberOf Stack
59645 * @param {string} key The key of the entry to check.
59646 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
59647 */
59648function stackHas(key) {
59649 return this.__data__.has(key);
59650}
59651
59652module.exports = stackHas;
59653
59654
59655/***/ }),
59656
59657/***/ "./node_modules/lodash/_stackSet.js":
59658/*!******************************************!*\
59659 !*** ./node_modules/lodash/_stackSet.js ***!
59660 \******************************************/
59661/*! no static exports found */
59662/***/ (function(module, exports, __webpack_require__) {
59663
59664var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"),
59665 Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"),
59666 MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js");
59667
59668/** Used as the size to enable large array optimizations. */
59669var LARGE_ARRAY_SIZE = 200;
59670
59671/**
59672 * Sets the stack `key` to `value`.
59673 *
59674 * @private
59675 * @name set
59676 * @memberOf Stack
59677 * @param {string} key The key of the value to set.
59678 * @param {*} value The value to set.
59679 * @returns {Object} Returns the stack cache instance.
59680 */
59681function stackSet(key, value) {
59682 var data = this.__data__;
59683 if (data instanceof ListCache) {
59684 var pairs = data.__data__;
59685 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
59686 pairs.push([key, value]);
59687 this.size = ++data.size;
59688 return this;
59689 }
59690 data = this.__data__ = new MapCache(pairs);
59691 }
59692 data.set(key, value);
59693 this.size = data.size;
59694 return this;
59695}
59696
59697module.exports = stackSet;
59698
59699
59700/***/ }),
59701
59702/***/ "./node_modules/lodash/_strictIndexOf.js":
59703/*!***********************************************!*\
59704 !*** ./node_modules/lodash/_strictIndexOf.js ***!
59705 \***********************************************/
59706/*! no static exports found */
59707/***/ (function(module, exports) {
59708
59709/**
59710 * A specialized version of `_.indexOf` which performs strict equality
59711 * comparisons of values, i.e. `===`.
59712 *
59713 * @private
59714 * @param {Array} array The array to inspect.
59715 * @param {*} value The value to search for.
59716 * @param {number} fromIndex The index to search from.
59717 * @returns {number} Returns the index of the matched value, else `-1`.
59718 */
59719function strictIndexOf(array, value, fromIndex) {
59720 var index = fromIndex - 1,
59721 length = array.length;
59722
59723 while (++index < length) {
59724 if (array[index] === value) {
59725 return index;
59726 }
59727 }
59728 return -1;
59729}
59730
59731module.exports = strictIndexOf;
59732
59733
59734/***/ }),
59735
59736/***/ "./node_modules/lodash/_stringSize.js":
59737/*!********************************************!*\
59738 !*** ./node_modules/lodash/_stringSize.js ***!
59739 \********************************************/
59740/*! no static exports found */
59741/***/ (function(module, exports, __webpack_require__) {
59742
59743var asciiSize = __webpack_require__(/*! ./_asciiSize */ "./node_modules/lodash/_asciiSize.js"),
59744 hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "./node_modules/lodash/_hasUnicode.js"),
59745 unicodeSize = __webpack_require__(/*! ./_unicodeSize */ "./node_modules/lodash/_unicodeSize.js");
59746
59747/**
59748 * Gets the number of symbols in `string`.
59749 *
59750 * @private
59751 * @param {string} string The string to inspect.
59752 * @returns {number} Returns the string size.
59753 */
59754function stringSize(string) {
59755 return hasUnicode(string)
59756 ? unicodeSize(string)
59757 : asciiSize(string);
59758}
59759
59760module.exports = stringSize;
59761
59762
59763/***/ }),
59764
59765/***/ "./node_modules/lodash/_stringToPath.js":
59766/*!**********************************************!*\
59767 !*** ./node_modules/lodash/_stringToPath.js ***!
59768 \**********************************************/
59769/*! no static exports found */
59770/***/ (function(module, exports, __webpack_require__) {
59771
59772var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/lodash/_memoizeCapped.js");
59773
59774/** Used to match property names within property paths. */
59775var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
59776
59777/** Used to match backslashes in property paths. */
59778var reEscapeChar = /\\(\\)?/g;
59779
59780/**
59781 * Converts `string` to a property path array.
59782 *
59783 * @private
59784 * @param {string} string The string to convert.
59785 * @returns {Array} Returns the property path array.
59786 */
59787var stringToPath = memoizeCapped(function(string) {
59788 var result = [];
59789 if (string.charCodeAt(0) === 46 /* . */) {
59790 result.push('');
59791 }
59792 string.replace(rePropName, function(match, number, quote, subString) {
59793 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
59794 });
59795 return result;
59796});
59797
59798module.exports = stringToPath;
59799
59800
59801/***/ }),
59802
59803/***/ "./node_modules/lodash/_toKey.js":
59804/*!***************************************!*\
59805 !*** ./node_modules/lodash/_toKey.js ***!
59806 \***************************************/
59807/*! no static exports found */
59808/***/ (function(module, exports, __webpack_require__) {
59809
59810var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
59811
59812/** Used as references for various `Number` constants. */
59813var INFINITY = 1 / 0;
59814
59815/**
59816 * Converts `value` to a string key if it's not a string or symbol.
59817 *
59818 * @private
59819 * @param {*} value The value to inspect.
59820 * @returns {string|symbol} Returns the key.
59821 */
59822function toKey(value) {
59823 if (typeof value == 'string' || isSymbol(value)) {
59824 return value;
59825 }
59826 var result = (value + '');
59827 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
59828}
59829
59830module.exports = toKey;
59831
59832
59833/***/ }),
59834
59835/***/ "./node_modules/lodash/_toSource.js":
59836/*!******************************************!*\
59837 !*** ./node_modules/lodash/_toSource.js ***!
59838 \******************************************/
59839/*! no static exports found */
59840/***/ (function(module, exports) {
59841
59842/** Used for built-in method references. */
59843var funcProto = Function.prototype;
59844
59845/** Used to resolve the decompiled source of functions. */
59846var funcToString = funcProto.toString;
59847
59848/**
59849 * Converts `func` to its source code.
59850 *
59851 * @private
59852 * @param {Function} func The function to convert.
59853 * @returns {string} Returns the source code.
59854 */
59855function toSource(func) {
59856 if (func != null) {
59857 try {
59858 return funcToString.call(func);
59859 } catch (e) {}
59860 try {
59861 return (func + '');
59862 } catch (e) {}
59863 }
59864 return '';
59865}
59866
59867module.exports = toSource;
59868
59869
59870/***/ }),
59871
59872/***/ "./node_modules/lodash/_unicodeSize.js":
59873/*!*********************************************!*\
59874 !*** ./node_modules/lodash/_unicodeSize.js ***!
59875 \*********************************************/
59876/*! no static exports found */
59877/***/ (function(module, exports) {
59878
59879/** Used to compose unicode character classes. */
59880var rsAstralRange = '\\ud800-\\udfff',
59881 rsComboMarksRange = '\\u0300-\\u036f',
59882 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
59883 rsComboSymbolsRange = '\\u20d0-\\u20ff',
59884 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
59885 rsVarRange = '\\ufe0e\\ufe0f';
59886
59887/** Used to compose unicode capture groups. */
59888var rsAstral = '[' + rsAstralRange + ']',
59889 rsCombo = '[' + rsComboRange + ']',
59890 rsFitz = '\\ud83c[\\udffb-\\udfff]',
59891 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
59892 rsNonAstral = '[^' + rsAstralRange + ']',
59893 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
59894 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
59895 rsZWJ = '\\u200d';
59896
59897/** Used to compose unicode regexes. */
59898var reOptMod = rsModifier + '?',
59899 rsOptVar = '[' + rsVarRange + ']?',
59900 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
59901 rsSeq = rsOptVar + reOptMod + rsOptJoin,
59902 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
59903
59904/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
59905var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
59906
59907/**
59908 * Gets the size of a Unicode `string`.
59909 *
59910 * @private
59911 * @param {string} string The string inspect.
59912 * @returns {number} Returns the string size.
59913 */
59914function unicodeSize(string) {
59915 var result = reUnicode.lastIndex = 0;
59916 while (reUnicode.test(string)) {
59917 ++result;
59918 }
59919 return result;
59920}
59921
59922module.exports = unicodeSize;
59923
59924
59925/***/ }),
59926
59927/***/ "./node_modules/lodash/clone.js":
59928/*!**************************************!*\
59929 !*** ./node_modules/lodash/clone.js ***!
59930 \**************************************/
59931/*! no static exports found */
59932/***/ (function(module, exports, __webpack_require__) {
59933
59934var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js");
59935
59936/** Used to compose bitmasks for cloning. */
59937var CLONE_SYMBOLS_FLAG = 4;
59938
59939/**
59940 * Creates a shallow clone of `value`.
59941 *
59942 * **Note:** This method is loosely based on the
59943 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
59944 * and supports cloning arrays, array buffers, booleans, date objects, maps,
59945 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
59946 * arrays. The own enumerable properties of `arguments` objects are cloned
59947 * as plain objects. An empty object is returned for uncloneable values such
59948 * as error objects, functions, DOM nodes, and WeakMaps.
59949 *
59950 * @static
59951 * @memberOf _
59952 * @since 0.1.0
59953 * @category Lang
59954 * @param {*} value The value to clone.
59955 * @returns {*} Returns the cloned value.
59956 * @see _.cloneDeep
59957 * @example
59958 *
59959 * var objects = [{ 'a': 1 }, { 'b': 2 }];
59960 *
59961 * var shallow = _.clone(objects);
59962 * console.log(shallow[0] === objects[0]);
59963 * // => true
59964 */
59965function clone(value) {
59966 return baseClone(value, CLONE_SYMBOLS_FLAG);
59967}
59968
59969module.exports = clone;
59970
59971
59972/***/ }),
59973
59974/***/ "./node_modules/lodash/cloneDeep.js":
59975/*!******************************************!*\
59976 !*** ./node_modules/lodash/cloneDeep.js ***!
59977 \******************************************/
59978/*! no static exports found */
59979/***/ (function(module, exports, __webpack_require__) {
59980
59981var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js");
59982
59983/** Used to compose bitmasks for cloning. */
59984var CLONE_DEEP_FLAG = 1,
59985 CLONE_SYMBOLS_FLAG = 4;
59986
59987/**
59988 * This method is like `_.clone` except that it recursively clones `value`.
59989 *
59990 * @static
59991 * @memberOf _
59992 * @since 1.0.0
59993 * @category Lang
59994 * @param {*} value The value to recursively clone.
59995 * @returns {*} Returns the deep cloned value.
59996 * @see _.clone
59997 * @example
59998 *
59999 * var objects = [{ 'a': 1 }, { 'b': 2 }];
60000 *
60001 * var deep = _.cloneDeep(objects);
60002 * console.log(deep[0] === objects[0]);
60003 * // => false
60004 */
60005function cloneDeep(value) {
60006 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
60007}
60008
60009module.exports = cloneDeep;
60010
60011
60012/***/ }),
60013
60014/***/ "./node_modules/lodash/constant.js":
60015/*!*****************************************!*\
60016 !*** ./node_modules/lodash/constant.js ***!
60017 \*****************************************/
60018/*! no static exports found */
60019/***/ (function(module, exports) {
60020
60021/**
60022 * Creates a function that returns `value`.
60023 *
60024 * @static
60025 * @memberOf _
60026 * @since 2.4.0
60027 * @category Util
60028 * @param {*} value The value to return from the new function.
60029 * @returns {Function} Returns the new constant function.
60030 * @example
60031 *
60032 * var objects = _.times(2, _.constant({ 'a': 1 }));
60033 *
60034 * console.log(objects);
60035 * // => [{ 'a': 1 }, { 'a': 1 }]
60036 *
60037 * console.log(objects[0] === objects[1]);
60038 * // => true
60039 */
60040function constant(value) {
60041 return function() {
60042 return value;
60043 };
60044}
60045
60046module.exports = constant;
60047
60048
60049/***/ }),
60050
60051/***/ "./node_modules/lodash/defaults.js":
60052/*!*****************************************!*\
60053 !*** ./node_modules/lodash/defaults.js ***!
60054 \*****************************************/
60055/*! no static exports found */
60056/***/ (function(module, exports, __webpack_require__) {
60057
60058var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
60059 eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"),
60060 isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"),
60061 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
60062
60063/** Used for built-in method references. */
60064var objectProto = Object.prototype;
60065
60066/** Used to check objects for own properties. */
60067var hasOwnProperty = objectProto.hasOwnProperty;
60068
60069/**
60070 * Assigns own and inherited enumerable string keyed properties of source
60071 * objects to the destination object for all destination properties that
60072 * resolve to `undefined`. Source objects are applied from left to right.
60073 * Once a property is set, additional values of the same property are ignored.
60074 *
60075 * **Note:** This method mutates `object`.
60076 *
60077 * @static
60078 * @since 0.1.0
60079 * @memberOf _
60080 * @category Object
60081 * @param {Object} object The destination object.
60082 * @param {...Object} [sources] The source objects.
60083 * @returns {Object} Returns `object`.
60084 * @see _.defaultsDeep
60085 * @example
60086 *
60087 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
60088 * // => { 'a': 1, 'b': 2 }
60089 */
60090var defaults = baseRest(function(object, sources) {
60091 object = Object(object);
60092
60093 var index = -1;
60094 var length = sources.length;
60095 var guard = length > 2 ? sources[2] : undefined;
60096
60097 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
60098 length = 1;
60099 }
60100
60101 while (++index < length) {
60102 var source = sources[index];
60103 var props = keysIn(source);
60104 var propsIndex = -1;
60105 var propsLength = props.length;
60106
60107 while (++propsIndex < propsLength) {
60108 var key = props[propsIndex];
60109 var value = object[key];
60110
60111 if (value === undefined ||
60112 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
60113 object[key] = source[key];
60114 }
60115 }
60116 }
60117
60118 return object;
60119});
60120
60121module.exports = defaults;
60122
60123
60124/***/ }),
60125
60126/***/ "./node_modules/lodash/each.js":
60127/*!*************************************!*\
60128 !*** ./node_modules/lodash/each.js ***!
60129 \*************************************/
60130/*! no static exports found */
60131/***/ (function(module, exports, __webpack_require__) {
60132
60133module.exports = __webpack_require__(/*! ./forEach */ "./node_modules/lodash/forEach.js");
60134
60135
60136/***/ }),
60137
60138/***/ "./node_modules/lodash/eq.js":
60139/*!***********************************!*\
60140 !*** ./node_modules/lodash/eq.js ***!
60141 \***********************************/
60142/*! no static exports found */
60143/***/ (function(module, exports) {
60144
60145/**
60146 * Performs a
60147 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
60148 * comparison between two values to determine if they are equivalent.
60149 *
60150 * @static
60151 * @memberOf _
60152 * @since 4.0.0
60153 * @category Lang
60154 * @param {*} value The value to compare.
60155 * @param {*} other The other value to compare.
60156 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
60157 * @example
60158 *
60159 * var object = { 'a': 1 };
60160 * var other = { 'a': 1 };
60161 *
60162 * _.eq(object, object);
60163 * // => true
60164 *
60165 * _.eq(object, other);
60166 * // => false
60167 *
60168 * _.eq('a', 'a');
60169 * // => true
60170 *
60171 * _.eq('a', Object('a'));
60172 * // => false
60173 *
60174 * _.eq(NaN, NaN);
60175 * // => true
60176 */
60177function eq(value, other) {
60178 return value === other || (value !== value && other !== other);
60179}
60180
60181module.exports = eq;
60182
60183
60184/***/ }),
60185
60186/***/ "./node_modules/lodash/filter.js":
60187/*!***************************************!*\
60188 !*** ./node_modules/lodash/filter.js ***!
60189 \***************************************/
60190/*! no static exports found */
60191/***/ (function(module, exports, __webpack_require__) {
60192
60193var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"),
60194 baseFilter = __webpack_require__(/*! ./_baseFilter */ "./node_modules/lodash/_baseFilter.js"),
60195 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
60196 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
60197
60198/**
60199 * Iterates over elements of `collection`, returning an array of all elements
60200 * `predicate` returns truthy for. The predicate is invoked with three
60201 * arguments: (value, index|key, collection).
60202 *
60203 * **Note:** Unlike `_.remove`, this method returns a new array.
60204 *
60205 * @static
60206 * @memberOf _
60207 * @since 0.1.0
60208 * @category Collection
60209 * @param {Array|Object} collection The collection to iterate over.
60210 * @param {Function} [predicate=_.identity] The function invoked per iteration.
60211 * @returns {Array} Returns the new filtered array.
60212 * @see _.reject
60213 * @example
60214 *
60215 * var users = [
60216 * { 'user': 'barney', 'age': 36, 'active': true },
60217 * { 'user': 'fred', 'age': 40, 'active': false }
60218 * ];
60219 *
60220 * _.filter(users, function(o) { return !o.active; });
60221 * // => objects for ['fred']
60222 *
60223 * // The `_.matches` iteratee shorthand.
60224 * _.filter(users, { 'age': 36, 'active': true });
60225 * // => objects for ['barney']
60226 *
60227 * // The `_.matchesProperty` iteratee shorthand.
60228 * _.filter(users, ['active', false]);
60229 * // => objects for ['fred']
60230 *
60231 * // The `_.property` iteratee shorthand.
60232 * _.filter(users, 'active');
60233 * // => objects for ['barney']
60234 */
60235function filter(collection, predicate) {
60236 var func = isArray(collection) ? arrayFilter : baseFilter;
60237 return func(collection, baseIteratee(predicate, 3));
60238}
60239
60240module.exports = filter;
60241
60242
60243/***/ }),
60244
60245/***/ "./node_modules/lodash/find.js":
60246/*!*************************************!*\
60247 !*** ./node_modules/lodash/find.js ***!
60248 \*************************************/
60249/*! no static exports found */
60250/***/ (function(module, exports, __webpack_require__) {
60251
60252var createFind = __webpack_require__(/*! ./_createFind */ "./node_modules/lodash/_createFind.js"),
60253 findIndex = __webpack_require__(/*! ./findIndex */ "./node_modules/lodash/findIndex.js");
60254
60255/**
60256 * Iterates over elements of `collection`, returning the first element
60257 * `predicate` returns truthy for. The predicate is invoked with three
60258 * arguments: (value, index|key, collection).
60259 *
60260 * @static
60261 * @memberOf _
60262 * @since 0.1.0
60263 * @category Collection
60264 * @param {Array|Object} collection The collection to inspect.
60265 * @param {Function} [predicate=_.identity] The function invoked per iteration.
60266 * @param {number} [fromIndex=0] The index to search from.
60267 * @returns {*} Returns the matched element, else `undefined`.
60268 * @example
60269 *
60270 * var users = [
60271 * { 'user': 'barney', 'age': 36, 'active': true },
60272 * { 'user': 'fred', 'age': 40, 'active': false },
60273 * { 'user': 'pebbles', 'age': 1, 'active': true }
60274 * ];
60275 *
60276 * _.find(users, function(o) { return o.age < 40; });
60277 * // => object for 'barney'
60278 *
60279 * // The `_.matches` iteratee shorthand.
60280 * _.find(users, { 'age': 1, 'active': true });
60281 * // => object for 'pebbles'
60282 *
60283 * // The `_.matchesProperty` iteratee shorthand.
60284 * _.find(users, ['active', false]);
60285 * // => object for 'fred'
60286 *
60287 * // The `_.property` iteratee shorthand.
60288 * _.find(users, 'active');
60289 * // => object for 'barney'
60290 */
60291var find = createFind(findIndex);
60292
60293module.exports = find;
60294
60295
60296/***/ }),
60297
60298/***/ "./node_modules/lodash/findIndex.js":
60299/*!******************************************!*\
60300 !*** ./node_modules/lodash/findIndex.js ***!
60301 \******************************************/
60302/*! no static exports found */
60303/***/ (function(module, exports, __webpack_require__) {
60304
60305var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"),
60306 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
60307 toInteger = __webpack_require__(/*! ./toInteger */ "./node_modules/lodash/toInteger.js");
60308
60309/* Built-in method references for those with the same name as other `lodash` methods. */
60310var nativeMax = Math.max;
60311
60312/**
60313 * This method is like `_.find` except that it returns the index of the first
60314 * element `predicate` returns truthy for instead of the element itself.
60315 *
60316 * @static
60317 * @memberOf _
60318 * @since 1.1.0
60319 * @category Array
60320 * @param {Array} array The array to inspect.
60321 * @param {Function} [predicate=_.identity] The function invoked per iteration.
60322 * @param {number} [fromIndex=0] The index to search from.
60323 * @returns {number} Returns the index of the found element, else `-1`.
60324 * @example
60325 *
60326 * var users = [
60327 * { 'user': 'barney', 'active': false },
60328 * { 'user': 'fred', 'active': false },
60329 * { 'user': 'pebbles', 'active': true }
60330 * ];
60331 *
60332 * _.findIndex(users, function(o) { return o.user == 'barney'; });
60333 * // => 0
60334 *
60335 * // The `_.matches` iteratee shorthand.
60336 * _.findIndex(users, { 'user': 'fred', 'active': false });
60337 * // => 1
60338 *
60339 * // The `_.matchesProperty` iteratee shorthand.
60340 * _.findIndex(users, ['active', false]);
60341 * // => 0
60342 *
60343 * // The `_.property` iteratee shorthand.
60344 * _.findIndex(users, 'active');
60345 * // => 2
60346 */
60347function findIndex(array, predicate, fromIndex) {
60348 var length = array == null ? 0 : array.length;
60349 if (!length) {
60350 return -1;
60351 }
60352 var index = fromIndex == null ? 0 : toInteger(fromIndex);
60353 if (index < 0) {
60354 index = nativeMax(length + index, 0);
60355 }
60356 return baseFindIndex(array, baseIteratee(predicate, 3), index);
60357}
60358
60359module.exports = findIndex;
60360
60361
60362/***/ }),
60363
60364/***/ "./node_modules/lodash/flatten.js":
60365/*!****************************************!*\
60366 !*** ./node_modules/lodash/flatten.js ***!
60367 \****************************************/
60368/*! no static exports found */
60369/***/ (function(module, exports, __webpack_require__) {
60370
60371var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js");
60372
60373/**
60374 * Flattens `array` a single level deep.
60375 *
60376 * @static
60377 * @memberOf _
60378 * @since 0.1.0
60379 * @category Array
60380 * @param {Array} array The array to flatten.
60381 * @returns {Array} Returns the new flattened array.
60382 * @example
60383 *
60384 * _.flatten([1, [2, [3, [4]], 5]]);
60385 * // => [1, 2, [3, [4]], 5]
60386 */
60387function flatten(array) {
60388 var length = array == null ? 0 : array.length;
60389 return length ? baseFlatten(array, 1) : [];
60390}
60391
60392module.exports = flatten;
60393
60394
60395/***/ }),
60396
60397/***/ "./node_modules/lodash/forEach.js":
60398/*!****************************************!*\
60399 !*** ./node_modules/lodash/forEach.js ***!
60400 \****************************************/
60401/*! no static exports found */
60402/***/ (function(module, exports, __webpack_require__) {
60403
60404var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"),
60405 baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"),
60406 castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"),
60407 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
60408
60409/**
60410 * Iterates over elements of `collection` and invokes `iteratee` for each element.
60411 * The iteratee is invoked with three arguments: (value, index|key, collection).
60412 * Iteratee functions may exit iteration early by explicitly returning `false`.
60413 *
60414 * **Note:** As with other "Collections" methods, objects with a "length"
60415 * property are iterated like arrays. To avoid this behavior use `_.forIn`
60416 * or `_.forOwn` for object iteration.
60417 *
60418 * @static
60419 * @memberOf _
60420 * @since 0.1.0
60421 * @alias each
60422 * @category Collection
60423 * @param {Array|Object} collection The collection to iterate over.
60424 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
60425 * @returns {Array|Object} Returns `collection`.
60426 * @see _.forEachRight
60427 * @example
60428 *
60429 * _.forEach([1, 2], function(value) {
60430 * console.log(value);
60431 * });
60432 * // => Logs `1` then `2`.
60433 *
60434 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
60435 * console.log(key);
60436 * });
60437 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
60438 */
60439function forEach(collection, iteratee) {
60440 var func = isArray(collection) ? arrayEach : baseEach;
60441 return func(collection, castFunction(iteratee));
60442}
60443
60444module.exports = forEach;
60445
60446
60447/***/ }),
60448
60449/***/ "./node_modules/lodash/forIn.js":
60450/*!**************************************!*\
60451 !*** ./node_modules/lodash/forIn.js ***!
60452 \**************************************/
60453/*! no static exports found */
60454/***/ (function(module, exports, __webpack_require__) {
60455
60456var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"),
60457 castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"),
60458 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
60459
60460/**
60461 * Iterates over own and inherited enumerable string keyed properties of an
60462 * object and invokes `iteratee` for each property. The iteratee is invoked
60463 * with three arguments: (value, key, object). Iteratee functions may exit
60464 * iteration early by explicitly returning `false`.
60465 *
60466 * @static
60467 * @memberOf _
60468 * @since 0.3.0
60469 * @category Object
60470 * @param {Object} object The object to iterate over.
60471 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
60472 * @returns {Object} Returns `object`.
60473 * @see _.forInRight
60474 * @example
60475 *
60476 * function Foo() {
60477 * this.a = 1;
60478 * this.b = 2;
60479 * }
60480 *
60481 * Foo.prototype.c = 3;
60482 *
60483 * _.forIn(new Foo, function(value, key) {
60484 * console.log(key);
60485 * });
60486 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
60487 */
60488function forIn(object, iteratee) {
60489 return object == null
60490 ? object
60491 : baseFor(object, castFunction(iteratee), keysIn);
60492}
60493
60494module.exports = forIn;
60495
60496
60497/***/ }),
60498
60499/***/ "./node_modules/lodash/get.js":
60500/*!************************************!*\
60501 !*** ./node_modules/lodash/get.js ***!
60502 \************************************/
60503/*! no static exports found */
60504/***/ (function(module, exports, __webpack_require__) {
60505
60506var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js");
60507
60508/**
60509 * Gets the value at `path` of `object`. If the resolved value is
60510 * `undefined`, the `defaultValue` is returned in its place.
60511 *
60512 * @static
60513 * @memberOf _
60514 * @since 3.7.0
60515 * @category Object
60516 * @param {Object} object The object to query.
60517 * @param {Array|string} path The path of the property to get.
60518 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
60519 * @returns {*} Returns the resolved value.
60520 * @example
60521 *
60522 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
60523 *
60524 * _.get(object, 'a[0].b.c');
60525 * // => 3
60526 *
60527 * _.get(object, ['a', '0', 'b', 'c']);
60528 * // => 3
60529 *
60530 * _.get(object, 'a.b.c', 'default');
60531 * // => 'default'
60532 */
60533function get(object, path, defaultValue) {
60534 var result = object == null ? undefined : baseGet(object, path);
60535 return result === undefined ? defaultValue : result;
60536}
60537
60538module.exports = get;
60539
60540
60541/***/ }),
60542
60543/***/ "./node_modules/lodash/has.js":
60544/*!************************************!*\
60545 !*** ./node_modules/lodash/has.js ***!
60546 \************************************/
60547/*! no static exports found */
60548/***/ (function(module, exports, __webpack_require__) {
60549
60550var baseHas = __webpack_require__(/*! ./_baseHas */ "./node_modules/lodash/_baseHas.js"),
60551 hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js");
60552
60553/**
60554 * Checks if `path` is a direct property of `object`.
60555 *
60556 * @static
60557 * @since 0.1.0
60558 * @memberOf _
60559 * @category Object
60560 * @param {Object} object The object to query.
60561 * @param {Array|string} path The path to check.
60562 * @returns {boolean} Returns `true` if `path` exists, else `false`.
60563 * @example
60564 *
60565 * var object = { 'a': { 'b': 2 } };
60566 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
60567 *
60568 * _.has(object, 'a');
60569 * // => true
60570 *
60571 * _.has(object, 'a.b');
60572 * // => true
60573 *
60574 * _.has(object, ['a', 'b']);
60575 * // => true
60576 *
60577 * _.has(other, 'a');
60578 * // => false
60579 */
60580function has(object, path) {
60581 return object != null && hasPath(object, path, baseHas);
60582}
60583
60584module.exports = has;
60585
60586
60587/***/ }),
60588
60589/***/ "./node_modules/lodash/hasIn.js":
60590/*!**************************************!*\
60591 !*** ./node_modules/lodash/hasIn.js ***!
60592 \**************************************/
60593/*! no static exports found */
60594/***/ (function(module, exports, __webpack_require__) {
60595
60596var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/lodash/_baseHasIn.js"),
60597 hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js");
60598
60599/**
60600 * Checks if `path` is a direct or inherited property of `object`.
60601 *
60602 * @static
60603 * @memberOf _
60604 * @since 4.0.0
60605 * @category Object
60606 * @param {Object} object The object to query.
60607 * @param {Array|string} path The path to check.
60608 * @returns {boolean} Returns `true` if `path` exists, else `false`.
60609 * @example
60610 *
60611 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
60612 *
60613 * _.hasIn(object, 'a');
60614 * // => true
60615 *
60616 * _.hasIn(object, 'a.b');
60617 * // => true
60618 *
60619 * _.hasIn(object, ['a', 'b']);
60620 * // => true
60621 *
60622 * _.hasIn(object, 'b');
60623 * // => false
60624 */
60625function hasIn(object, path) {
60626 return object != null && hasPath(object, path, baseHasIn);
60627}
60628
60629module.exports = hasIn;
60630
60631
60632/***/ }),
60633
60634/***/ "./node_modules/lodash/identity.js":
60635/*!*****************************************!*\
60636 !*** ./node_modules/lodash/identity.js ***!
60637 \*****************************************/
60638/*! no static exports found */
60639/***/ (function(module, exports) {
60640
60641/**
60642 * This method returns the first argument it receives.
60643 *
60644 * @static
60645 * @since 0.1.0
60646 * @memberOf _
60647 * @category Util
60648 * @param {*} value Any value.
60649 * @returns {*} Returns `value`.
60650 * @example
60651 *
60652 * var object = { 'a': 1 };
60653 *
60654 * console.log(_.identity(object) === object);
60655 * // => true
60656 */
60657function identity(value) {
60658 return value;
60659}
60660
60661module.exports = identity;
60662
60663
60664/***/ }),
60665
60666/***/ "./node_modules/lodash/isArguments.js":
60667/*!********************************************!*\
60668 !*** ./node_modules/lodash/isArguments.js ***!
60669 \********************************************/
60670/*! no static exports found */
60671/***/ (function(module, exports, __webpack_require__) {
60672
60673var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"),
60674 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
60675
60676/** Used for built-in method references. */
60677var objectProto = Object.prototype;
60678
60679/** Used to check objects for own properties. */
60680var hasOwnProperty = objectProto.hasOwnProperty;
60681
60682/** Built-in value references. */
60683var propertyIsEnumerable = objectProto.propertyIsEnumerable;
60684
60685/**
60686 * Checks if `value` is likely an `arguments` object.
60687 *
60688 * @static
60689 * @memberOf _
60690 * @since 0.1.0
60691 * @category Lang
60692 * @param {*} value The value to check.
60693 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
60694 * else `false`.
60695 * @example
60696 *
60697 * _.isArguments(function() { return arguments; }());
60698 * // => true
60699 *
60700 * _.isArguments([1, 2, 3]);
60701 * // => false
60702 */
60703var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
60704 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
60705 !propertyIsEnumerable.call(value, 'callee');
60706};
60707
60708module.exports = isArguments;
60709
60710
60711/***/ }),
60712
60713/***/ "./node_modules/lodash/isArray.js":
60714/*!****************************************!*\
60715 !*** ./node_modules/lodash/isArray.js ***!
60716 \****************************************/
60717/*! no static exports found */
60718/***/ (function(module, exports) {
60719
60720/**
60721 * Checks if `value` is classified as an `Array` object.
60722 *
60723 * @static
60724 * @memberOf _
60725 * @since 0.1.0
60726 * @category Lang
60727 * @param {*} value The value to check.
60728 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
60729 * @example
60730 *
60731 * _.isArray([1, 2, 3]);
60732 * // => true
60733 *
60734 * _.isArray(document.body.children);
60735 * // => false
60736 *
60737 * _.isArray('abc');
60738 * // => false
60739 *
60740 * _.isArray(_.noop);
60741 * // => false
60742 */
60743var isArray = Array.isArray;
60744
60745module.exports = isArray;
60746
60747
60748/***/ }),
60749
60750/***/ "./node_modules/lodash/isArrayLike.js":
60751/*!********************************************!*\
60752 !*** ./node_modules/lodash/isArrayLike.js ***!
60753 \********************************************/
60754/*! no static exports found */
60755/***/ (function(module, exports, __webpack_require__) {
60756
60757var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
60758 isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js");
60759
60760/**
60761 * Checks if `value` is array-like. A value is considered array-like if it's
60762 * not a function and has a `value.length` that's an integer greater than or
60763 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
60764 *
60765 * @static
60766 * @memberOf _
60767 * @since 4.0.0
60768 * @category Lang
60769 * @param {*} value The value to check.
60770 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
60771 * @example
60772 *
60773 * _.isArrayLike([1, 2, 3]);
60774 * // => true
60775 *
60776 * _.isArrayLike(document.body.children);
60777 * // => true
60778 *
60779 * _.isArrayLike('abc');
60780 * // => true
60781 *
60782 * _.isArrayLike(_.noop);
60783 * // => false
60784 */
60785function isArrayLike(value) {
60786 return value != null && isLength(value.length) && !isFunction(value);
60787}
60788
60789module.exports = isArrayLike;
60790
60791
60792/***/ }),
60793
60794/***/ "./node_modules/lodash/isArrayLikeObject.js":
60795/*!**************************************************!*\
60796 !*** ./node_modules/lodash/isArrayLikeObject.js ***!
60797 \**************************************************/
60798/*! no static exports found */
60799/***/ (function(module, exports, __webpack_require__) {
60800
60801var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
60802 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
60803
60804/**
60805 * This method is like `_.isArrayLike` except that it also checks if `value`
60806 * is an object.
60807 *
60808 * @static
60809 * @memberOf _
60810 * @since 4.0.0
60811 * @category Lang
60812 * @param {*} value The value to check.
60813 * @returns {boolean} Returns `true` if `value` is an array-like object,
60814 * else `false`.
60815 * @example
60816 *
60817 * _.isArrayLikeObject([1, 2, 3]);
60818 * // => true
60819 *
60820 * _.isArrayLikeObject(document.body.children);
60821 * // => true
60822 *
60823 * _.isArrayLikeObject('abc');
60824 * // => false
60825 *
60826 * _.isArrayLikeObject(_.noop);
60827 * // => false
60828 */
60829function isArrayLikeObject(value) {
60830 return isObjectLike(value) && isArrayLike(value);
60831}
60832
60833module.exports = isArrayLikeObject;
60834
60835
60836/***/ }),
60837
60838/***/ "./node_modules/lodash/isBuffer.js":
60839/*!*****************************************!*\
60840 !*** ./node_modules/lodash/isBuffer.js ***!
60841 \*****************************************/
60842/*! no static exports found */
60843/***/ (function(module, exports, __webpack_require__) {
60844
60845/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"),
60846 stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js");
60847
60848/** Detect free variable `exports`. */
60849var freeExports = true && exports && !exports.nodeType && exports;
60850
60851/** Detect free variable `module`. */
60852var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
60853
60854/** Detect the popular CommonJS extension `module.exports`. */
60855var moduleExports = freeModule && freeModule.exports === freeExports;
60856
60857/** Built-in value references. */
60858var Buffer = moduleExports ? root.Buffer : undefined;
60859
60860/* Built-in method references for those with the same name as other `lodash` methods. */
60861var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
60862
60863/**
60864 * Checks if `value` is a buffer.
60865 *
60866 * @static
60867 * @memberOf _
60868 * @since 4.3.0
60869 * @category Lang
60870 * @param {*} value The value to check.
60871 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
60872 * @example
60873 *
60874 * _.isBuffer(new Buffer(2));
60875 * // => true
60876 *
60877 * _.isBuffer(new Uint8Array(2));
60878 * // => false
60879 */
60880var isBuffer = nativeIsBuffer || stubFalse;
60881
60882module.exports = isBuffer;
60883
60884/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
60885
60886/***/ }),
60887
60888/***/ "./node_modules/lodash/isEmpty.js":
60889/*!****************************************!*\
60890 !*** ./node_modules/lodash/isEmpty.js ***!
60891 \****************************************/
60892/*! no static exports found */
60893/***/ (function(module, exports, __webpack_require__) {
60894
60895var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"),
60896 getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
60897 isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"),
60898 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
60899 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
60900 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
60901 isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"),
60902 isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
60903
60904/** `Object#toString` result references. */
60905var mapTag = '[object Map]',
60906 setTag = '[object Set]';
60907
60908/** Used for built-in method references. */
60909var objectProto = Object.prototype;
60910
60911/** Used to check objects for own properties. */
60912var hasOwnProperty = objectProto.hasOwnProperty;
60913
60914/**
60915 * Checks if `value` is an empty object, collection, map, or set.
60916 *
60917 * Objects are considered empty if they have no own enumerable string keyed
60918 * properties.
60919 *
60920 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
60921 * jQuery-like collections are considered empty if they have a `length` of `0`.
60922 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
60923 *
60924 * @static
60925 * @memberOf _
60926 * @since 0.1.0
60927 * @category Lang
60928 * @param {*} value The value to check.
60929 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
60930 * @example
60931 *
60932 * _.isEmpty(null);
60933 * // => true
60934 *
60935 * _.isEmpty(true);
60936 * // => true
60937 *
60938 * _.isEmpty(1);
60939 * // => true
60940 *
60941 * _.isEmpty([1, 2, 3]);
60942 * // => false
60943 *
60944 * _.isEmpty({ 'a': 1 });
60945 * // => false
60946 */
60947function isEmpty(value) {
60948 if (value == null) {
60949 return true;
60950 }
60951 if (isArrayLike(value) &&
60952 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
60953 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
60954 return !value.length;
60955 }
60956 var tag = getTag(value);
60957 if (tag == mapTag || tag == setTag) {
60958 return !value.size;
60959 }
60960 if (isPrototype(value)) {
60961 return !baseKeys(value).length;
60962 }
60963 for (var key in value) {
60964 if (hasOwnProperty.call(value, key)) {
60965 return false;
60966 }
60967 }
60968 return true;
60969}
60970
60971module.exports = isEmpty;
60972
60973
60974/***/ }),
60975
60976/***/ "./node_modules/lodash/isFunction.js":
60977/*!*******************************************!*\
60978 !*** ./node_modules/lodash/isFunction.js ***!
60979 \*******************************************/
60980/*! no static exports found */
60981/***/ (function(module, exports, __webpack_require__) {
60982
60983var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
60984 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js");
60985
60986/** `Object#toString` result references. */
60987var asyncTag = '[object AsyncFunction]',
60988 funcTag = '[object Function]',
60989 genTag = '[object GeneratorFunction]',
60990 proxyTag = '[object Proxy]';
60991
60992/**
60993 * Checks if `value` is classified as a `Function` object.
60994 *
60995 * @static
60996 * @memberOf _
60997 * @since 0.1.0
60998 * @category Lang
60999 * @param {*} value The value to check.
61000 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
61001 * @example
61002 *
61003 * _.isFunction(_);
61004 * // => true
61005 *
61006 * _.isFunction(/abc/);
61007 * // => false
61008 */
61009function isFunction(value) {
61010 if (!isObject(value)) {
61011 return false;
61012 }
61013 // The use of `Object#toString` avoids issues with the `typeof` operator
61014 // in Safari 9 which returns 'object' for typed arrays and other constructors.
61015 var tag = baseGetTag(value);
61016 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
61017}
61018
61019module.exports = isFunction;
61020
61021
61022/***/ }),
61023
61024/***/ "./node_modules/lodash/isLength.js":
61025/*!*****************************************!*\
61026 !*** ./node_modules/lodash/isLength.js ***!
61027 \*****************************************/
61028/*! no static exports found */
61029/***/ (function(module, exports) {
61030
61031/** Used as references for various `Number` constants. */
61032var MAX_SAFE_INTEGER = 9007199254740991;
61033
61034/**
61035 * Checks if `value` is a valid array-like length.
61036 *
61037 * **Note:** This method is loosely based on
61038 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
61039 *
61040 * @static
61041 * @memberOf _
61042 * @since 4.0.0
61043 * @category Lang
61044 * @param {*} value The value to check.
61045 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
61046 * @example
61047 *
61048 * _.isLength(3);
61049 * // => true
61050 *
61051 * _.isLength(Number.MIN_VALUE);
61052 * // => false
61053 *
61054 * _.isLength(Infinity);
61055 * // => false
61056 *
61057 * _.isLength('3');
61058 * // => false
61059 */
61060function isLength(value) {
61061 return typeof value == 'number' &&
61062 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
61063}
61064
61065module.exports = isLength;
61066
61067
61068/***/ }),
61069
61070/***/ "./node_modules/lodash/isMap.js":
61071/*!**************************************!*\
61072 !*** ./node_modules/lodash/isMap.js ***!
61073 \**************************************/
61074/*! no static exports found */
61075/***/ (function(module, exports, __webpack_require__) {
61076
61077var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ "./node_modules/lodash/_baseIsMap.js"),
61078 baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
61079 nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js");
61080
61081/* Node.js helper references. */
61082var nodeIsMap = nodeUtil && nodeUtil.isMap;
61083
61084/**
61085 * Checks if `value` is classified as a `Map` object.
61086 *
61087 * @static
61088 * @memberOf _
61089 * @since 4.3.0
61090 * @category Lang
61091 * @param {*} value The value to check.
61092 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
61093 * @example
61094 *
61095 * _.isMap(new Map);
61096 * // => true
61097 *
61098 * _.isMap(new WeakMap);
61099 * // => false
61100 */
61101var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
61102
61103module.exports = isMap;
61104
61105
61106/***/ }),
61107
61108/***/ "./node_modules/lodash/isObject.js":
61109/*!*****************************************!*\
61110 !*** ./node_modules/lodash/isObject.js ***!
61111 \*****************************************/
61112/*! no static exports found */
61113/***/ (function(module, exports) {
61114
61115/**
61116 * Checks if `value` is the
61117 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
61118 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
61119 *
61120 * @static
61121 * @memberOf _
61122 * @since 0.1.0
61123 * @category Lang
61124 * @param {*} value The value to check.
61125 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
61126 * @example
61127 *
61128 * _.isObject({});
61129 * // => true
61130 *
61131 * _.isObject([1, 2, 3]);
61132 * // => true
61133 *
61134 * _.isObject(_.noop);
61135 * // => true
61136 *
61137 * _.isObject(null);
61138 * // => false
61139 */
61140function isObject(value) {
61141 var type = typeof value;
61142 return value != null && (type == 'object' || type == 'function');
61143}
61144
61145module.exports = isObject;
61146
61147
61148/***/ }),
61149
61150/***/ "./node_modules/lodash/isObjectLike.js":
61151/*!*********************************************!*\
61152 !*** ./node_modules/lodash/isObjectLike.js ***!
61153 \*********************************************/
61154/*! no static exports found */
61155/***/ (function(module, exports) {
61156
61157/**
61158 * Checks if `value` is object-like. A value is object-like if it's not `null`
61159 * and has a `typeof` result of "object".
61160 *
61161 * @static
61162 * @memberOf _
61163 * @since 4.0.0
61164 * @category Lang
61165 * @param {*} value The value to check.
61166 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
61167 * @example
61168 *
61169 * _.isObjectLike({});
61170 * // => true
61171 *
61172 * _.isObjectLike([1, 2, 3]);
61173 * // => true
61174 *
61175 * _.isObjectLike(_.noop);
61176 * // => false
61177 *
61178 * _.isObjectLike(null);
61179 * // => false
61180 */
61181function isObjectLike(value) {
61182 return value != null && typeof value == 'object';
61183}
61184
61185module.exports = isObjectLike;
61186
61187
61188/***/ }),
61189
61190/***/ "./node_modules/lodash/isPlainObject.js":
61191/*!**********************************************!*\
61192 !*** ./node_modules/lodash/isPlainObject.js ***!
61193 \**********************************************/
61194/*! no static exports found */
61195/***/ (function(module, exports, __webpack_require__) {
61196
61197var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
61198 getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
61199 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
61200
61201/** `Object#toString` result references. */
61202var objectTag = '[object Object]';
61203
61204/** Used for built-in method references. */
61205var funcProto = Function.prototype,
61206 objectProto = Object.prototype;
61207
61208/** Used to resolve the decompiled source of functions. */
61209var funcToString = funcProto.toString;
61210
61211/** Used to check objects for own properties. */
61212var hasOwnProperty = objectProto.hasOwnProperty;
61213
61214/** Used to infer the `Object` constructor. */
61215var objectCtorString = funcToString.call(Object);
61216
61217/**
61218 * Checks if `value` is a plain object, that is, an object created by the
61219 * `Object` constructor or one with a `[[Prototype]]` of `null`.
61220 *
61221 * @static
61222 * @memberOf _
61223 * @since 0.8.0
61224 * @category Lang
61225 * @param {*} value The value to check.
61226 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
61227 * @example
61228 *
61229 * function Foo() {
61230 * this.a = 1;
61231 * }
61232 *
61233 * _.isPlainObject(new Foo);
61234 * // => false
61235 *
61236 * _.isPlainObject([1, 2, 3]);
61237 * // => false
61238 *
61239 * _.isPlainObject({ 'x': 0, 'y': 0 });
61240 * // => true
61241 *
61242 * _.isPlainObject(Object.create(null));
61243 * // => true
61244 */
61245function isPlainObject(value) {
61246 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
61247 return false;
61248 }
61249 var proto = getPrototype(value);
61250 if (proto === null) {
61251 return true;
61252 }
61253 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
61254 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
61255 funcToString.call(Ctor) == objectCtorString;
61256}
61257
61258module.exports = isPlainObject;
61259
61260
61261/***/ }),
61262
61263/***/ "./node_modules/lodash/isSet.js":
61264/*!**************************************!*\
61265 !*** ./node_modules/lodash/isSet.js ***!
61266 \**************************************/
61267/*! no static exports found */
61268/***/ (function(module, exports, __webpack_require__) {
61269
61270var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ "./node_modules/lodash/_baseIsSet.js"),
61271 baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
61272 nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js");
61273
61274/* Node.js helper references. */
61275var nodeIsSet = nodeUtil && nodeUtil.isSet;
61276
61277/**
61278 * Checks if `value` is classified as a `Set` object.
61279 *
61280 * @static
61281 * @memberOf _
61282 * @since 4.3.0
61283 * @category Lang
61284 * @param {*} value The value to check.
61285 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
61286 * @example
61287 *
61288 * _.isSet(new Set);
61289 * // => true
61290 *
61291 * _.isSet(new WeakSet);
61292 * // => false
61293 */
61294var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
61295
61296module.exports = isSet;
61297
61298
61299/***/ }),
61300
61301/***/ "./node_modules/lodash/isString.js":
61302/*!*****************************************!*\
61303 !*** ./node_modules/lodash/isString.js ***!
61304 \*****************************************/
61305/*! no static exports found */
61306/***/ (function(module, exports, __webpack_require__) {
61307
61308var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
61309 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
61310 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
61311
61312/** `Object#toString` result references. */
61313var stringTag = '[object String]';
61314
61315/**
61316 * Checks if `value` is classified as a `String` primitive or object.
61317 *
61318 * @static
61319 * @since 0.1.0
61320 * @memberOf _
61321 * @category Lang
61322 * @param {*} value The value to check.
61323 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
61324 * @example
61325 *
61326 * _.isString('abc');
61327 * // => true
61328 *
61329 * _.isString(1);
61330 * // => false
61331 */
61332function isString(value) {
61333 return typeof value == 'string' ||
61334 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
61335}
61336
61337module.exports = isString;
61338
61339
61340/***/ }),
61341
61342/***/ "./node_modules/lodash/isSymbol.js":
61343/*!*****************************************!*\
61344 !*** ./node_modules/lodash/isSymbol.js ***!
61345 \*****************************************/
61346/*! no static exports found */
61347/***/ (function(module, exports, __webpack_require__) {
61348
61349var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
61350 isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
61351
61352/** `Object#toString` result references. */
61353var symbolTag = '[object Symbol]';
61354
61355/**
61356 * Checks if `value` is classified as a `Symbol` primitive or object.
61357 *
61358 * @static
61359 * @memberOf _
61360 * @since 4.0.0
61361 * @category Lang
61362 * @param {*} value The value to check.
61363 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
61364 * @example
61365 *
61366 * _.isSymbol(Symbol.iterator);
61367 * // => true
61368 *
61369 * _.isSymbol('abc');
61370 * // => false
61371 */
61372function isSymbol(value) {
61373 return typeof value == 'symbol' ||
61374 (isObjectLike(value) && baseGetTag(value) == symbolTag);
61375}
61376
61377module.exports = isSymbol;
61378
61379
61380/***/ }),
61381
61382/***/ "./node_modules/lodash/isTypedArray.js":
61383/*!*********************************************!*\
61384 !*** ./node_modules/lodash/isTypedArray.js ***!
61385 \*********************************************/
61386/*! no static exports found */
61387/***/ (function(module, exports, __webpack_require__) {
61388
61389var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"),
61390 baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"),
61391 nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js");
61392
61393/* Node.js helper references. */
61394var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
61395
61396/**
61397 * Checks if `value` is classified as a typed array.
61398 *
61399 * @static
61400 * @memberOf _
61401 * @since 3.0.0
61402 * @category Lang
61403 * @param {*} value The value to check.
61404 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
61405 * @example
61406 *
61407 * _.isTypedArray(new Uint8Array);
61408 * // => true
61409 *
61410 * _.isTypedArray([]);
61411 * // => false
61412 */
61413var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
61414
61415module.exports = isTypedArray;
61416
61417
61418/***/ }),
61419
61420/***/ "./node_modules/lodash/isUndefined.js":
61421/*!********************************************!*\
61422 !*** ./node_modules/lodash/isUndefined.js ***!
61423 \********************************************/
61424/*! no static exports found */
61425/***/ (function(module, exports) {
61426
61427/**
61428 * Checks if `value` is `undefined`.
61429 *
61430 * @static
61431 * @since 0.1.0
61432 * @memberOf _
61433 * @category Lang
61434 * @param {*} value The value to check.
61435 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
61436 * @example
61437 *
61438 * _.isUndefined(void 0);
61439 * // => true
61440 *
61441 * _.isUndefined(null);
61442 * // => false
61443 */
61444function isUndefined(value) {
61445 return value === undefined;
61446}
61447
61448module.exports = isUndefined;
61449
61450
61451/***/ }),
61452
61453/***/ "./node_modules/lodash/keys.js":
61454/*!*************************************!*\
61455 !*** ./node_modules/lodash/keys.js ***!
61456 \*************************************/
61457/*! no static exports found */
61458/***/ (function(module, exports, __webpack_require__) {
61459
61460var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"),
61461 baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"),
61462 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
61463
61464/**
61465 * Creates an array of the own enumerable property names of `object`.
61466 *
61467 * **Note:** Non-object values are coerced to objects. See the
61468 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
61469 * for more details.
61470 *
61471 * @static
61472 * @since 0.1.0
61473 * @memberOf _
61474 * @category Object
61475 * @param {Object} object The object to query.
61476 * @returns {Array} Returns the array of property names.
61477 * @example
61478 *
61479 * function Foo() {
61480 * this.a = 1;
61481 * this.b = 2;
61482 * }
61483 *
61484 * Foo.prototype.c = 3;
61485 *
61486 * _.keys(new Foo);
61487 * // => ['a', 'b'] (iteration order is not guaranteed)
61488 *
61489 * _.keys('hi');
61490 * // => ['0', '1']
61491 */
61492function keys(object) {
61493 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
61494}
61495
61496module.exports = keys;
61497
61498
61499/***/ }),
61500
61501/***/ "./node_modules/lodash/keysIn.js":
61502/*!***************************************!*\
61503 !*** ./node_modules/lodash/keysIn.js ***!
61504 \***************************************/
61505/*! no static exports found */
61506/***/ (function(module, exports, __webpack_require__) {
61507
61508var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"),
61509 baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"),
61510 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js");
61511
61512/**
61513 * Creates an array of the own and inherited enumerable property names of `object`.
61514 *
61515 * **Note:** Non-object values are coerced to objects.
61516 *
61517 * @static
61518 * @memberOf _
61519 * @since 3.0.0
61520 * @category Object
61521 * @param {Object} object The object to query.
61522 * @returns {Array} Returns the array of property names.
61523 * @example
61524 *
61525 * function Foo() {
61526 * this.a = 1;
61527 * this.b = 2;
61528 * }
61529 *
61530 * Foo.prototype.c = 3;
61531 *
61532 * _.keysIn(new Foo);
61533 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
61534 */
61535function keysIn(object) {
61536 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
61537}
61538
61539module.exports = keysIn;
61540
61541
61542/***/ }),
61543
61544/***/ "./node_modules/lodash/last.js":
61545/*!*************************************!*\
61546 !*** ./node_modules/lodash/last.js ***!
61547 \*************************************/
61548/*! no static exports found */
61549/***/ (function(module, exports) {
61550
61551/**
61552 * Gets the last element of `array`.
61553 *
61554 * @static
61555 * @memberOf _
61556 * @since 0.1.0
61557 * @category Array
61558 * @param {Array} array The array to query.
61559 * @returns {*} Returns the last element of `array`.
61560 * @example
61561 *
61562 * _.last([1, 2, 3]);
61563 * // => 3
61564 */
61565function last(array) {
61566 var length = array == null ? 0 : array.length;
61567 return length ? array[length - 1] : undefined;
61568}
61569
61570module.exports = last;
61571
61572
61573/***/ }),
61574
61575/***/ "./node_modules/lodash/lodash.js":
61576/*!***************************************!*\
61577 !*** ./node_modules/lodash/lodash.js ***!
61578 \***************************************/
61579/*! no static exports found */
61580/***/ (function(module, exports, __webpack_require__) {
61581
61582/* WEBPACK VAR INJECTION */(function(global, module) {/**
61583 * @license
61584 * Lodash <https://lodash.com/>
61585 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
61586 * Released under MIT license <https://lodash.com/license>
61587 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
61588 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
61589 */
61590;(function() {
61591
61592 /** Used as a safe reference for `undefined` in pre-ES5 environments. */
61593 var undefined;
61594
61595 /** Used as the semantic version number. */
61596 var VERSION = '4.17.15';
61597
61598 /** Used as the size to enable large array optimizations. */
61599 var LARGE_ARRAY_SIZE = 200;
61600
61601 /** Error message constants. */
61602 var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
61603 FUNC_ERROR_TEXT = 'Expected a function';
61604
61605 /** Used to stand-in for `undefined` hash values. */
61606 var HASH_UNDEFINED = '__lodash_hash_undefined__';
61607
61608 /** Used as the maximum memoize cache size. */
61609 var MAX_MEMOIZE_SIZE = 500;
61610
61611 /** Used as the internal argument placeholder. */
61612 var PLACEHOLDER = '__lodash_placeholder__';
61613
61614 /** Used to compose bitmasks for cloning. */
61615 var CLONE_DEEP_FLAG = 1,
61616 CLONE_FLAT_FLAG = 2,
61617 CLONE_SYMBOLS_FLAG = 4;
61618
61619 /** Used to compose bitmasks for value comparisons. */
61620 var COMPARE_PARTIAL_FLAG = 1,
61621 COMPARE_UNORDERED_FLAG = 2;
61622
61623 /** Used to compose bitmasks for function metadata. */
61624 var WRAP_BIND_FLAG = 1,
61625 WRAP_BIND_KEY_FLAG = 2,
61626 WRAP_CURRY_BOUND_FLAG = 4,
61627 WRAP_CURRY_FLAG = 8,
61628 WRAP_CURRY_RIGHT_FLAG = 16,
61629 WRAP_PARTIAL_FLAG = 32,
61630 WRAP_PARTIAL_RIGHT_FLAG = 64,
61631 WRAP_ARY_FLAG = 128,
61632 WRAP_REARG_FLAG = 256,
61633 WRAP_FLIP_FLAG = 512;
61634
61635 /** Used as default options for `_.truncate`. */
61636 var DEFAULT_TRUNC_LENGTH = 30,
61637 DEFAULT_TRUNC_OMISSION = '...';
61638
61639 /** Used to detect hot functions by number of calls within a span of milliseconds. */
61640 var HOT_COUNT = 800,
61641 HOT_SPAN = 16;
61642
61643 /** Used to indicate the type of lazy iteratees. */
61644 var LAZY_FILTER_FLAG = 1,
61645 LAZY_MAP_FLAG = 2,
61646 LAZY_WHILE_FLAG = 3;
61647
61648 /** Used as references for various `Number` constants. */
61649 var INFINITY = 1 / 0,
61650 MAX_SAFE_INTEGER = 9007199254740991,
61651 MAX_INTEGER = 1.7976931348623157e+308,
61652 NAN = 0 / 0;
61653
61654 /** Used as references for the maximum length and index of an array. */
61655 var MAX_ARRAY_LENGTH = 4294967295,
61656 MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
61657 HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
61658
61659 /** Used to associate wrap methods with their bit flags. */
61660 var wrapFlags = [
61661 ['ary', WRAP_ARY_FLAG],
61662 ['bind', WRAP_BIND_FLAG],
61663 ['bindKey', WRAP_BIND_KEY_FLAG],
61664 ['curry', WRAP_CURRY_FLAG],
61665 ['curryRight', WRAP_CURRY_RIGHT_FLAG],
61666 ['flip', WRAP_FLIP_FLAG],
61667 ['partial', WRAP_PARTIAL_FLAG],
61668 ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
61669 ['rearg', WRAP_REARG_FLAG]
61670 ];
61671
61672 /** `Object#toString` result references. */
61673 var argsTag = '[object Arguments]',
61674 arrayTag = '[object Array]',
61675 asyncTag = '[object AsyncFunction]',
61676 boolTag = '[object Boolean]',
61677 dateTag = '[object Date]',
61678 domExcTag = '[object DOMException]',
61679 errorTag = '[object Error]',
61680 funcTag = '[object Function]',
61681 genTag = '[object GeneratorFunction]',
61682 mapTag = '[object Map]',
61683 numberTag = '[object Number]',
61684 nullTag = '[object Null]',
61685 objectTag = '[object Object]',
61686 promiseTag = '[object Promise]',
61687 proxyTag = '[object Proxy]',
61688 regexpTag = '[object RegExp]',
61689 setTag = '[object Set]',
61690 stringTag = '[object String]',
61691 symbolTag = '[object Symbol]',
61692 undefinedTag = '[object Undefined]',
61693 weakMapTag = '[object WeakMap]',
61694 weakSetTag = '[object WeakSet]';
61695
61696 var arrayBufferTag = '[object ArrayBuffer]',
61697 dataViewTag = '[object DataView]',
61698 float32Tag = '[object Float32Array]',
61699 float64Tag = '[object Float64Array]',
61700 int8Tag = '[object Int8Array]',
61701 int16Tag = '[object Int16Array]',
61702 int32Tag = '[object Int32Array]',
61703 uint8Tag = '[object Uint8Array]',
61704 uint8ClampedTag = '[object Uint8ClampedArray]',
61705 uint16Tag = '[object Uint16Array]',
61706 uint32Tag = '[object Uint32Array]';
61707
61708 /** Used to match empty string literals in compiled template source. */
61709 var reEmptyStringLeading = /\b__p \+= '';/g,
61710 reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
61711 reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
61712
61713 /** Used to match HTML entities and HTML characters. */
61714 var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
61715 reUnescapedHtml = /[&<>"']/g,
61716 reHasEscapedHtml = RegExp(reEscapedHtml.source),
61717 reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
61718
61719 /** Used to match template delimiters. */
61720 var reEscape = /<%-([\s\S]+?)%>/g,
61721 reEvaluate = /<%([\s\S]+?)%>/g,
61722 reInterpolate = /<%=([\s\S]+?)%>/g;
61723
61724 /** Used to match property names within property paths. */
61725 var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
61726 reIsPlainProp = /^\w*$/,
61727 rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
61728
61729 /**
61730 * Used to match `RegExp`
61731 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
61732 */
61733 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
61734 reHasRegExpChar = RegExp(reRegExpChar.source);
61735
61736 /** Used to match leading and trailing whitespace. */
61737 var reTrim = /^\s+|\s+$/g,
61738 reTrimStart = /^\s+/,
61739 reTrimEnd = /\s+$/;
61740
61741 /** Used to match wrap detail comments. */
61742 var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
61743 reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
61744 reSplitDetails = /,? & /;
61745
61746 /** Used to match words composed of alphanumeric characters. */
61747 var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
61748
61749 /** Used to match backslashes in property paths. */
61750 var reEscapeChar = /\\(\\)?/g;
61751
61752 /**
61753 * Used to match
61754 * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
61755 */
61756 var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
61757
61758 /** Used to match `RegExp` flags from their coerced string values. */
61759 var reFlags = /\w*$/;
61760
61761 /** Used to detect bad signed hexadecimal string values. */
61762 var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
61763
61764 /** Used to detect binary string values. */
61765 var reIsBinary = /^0b[01]+$/i;
61766
61767 /** Used to detect host constructors (Safari). */
61768 var reIsHostCtor = /^\[object .+?Constructor\]$/;
61769
61770 /** Used to detect octal string values. */
61771 var reIsOctal = /^0o[0-7]+$/i;
61772
61773 /** Used to detect unsigned integer values. */
61774 var reIsUint = /^(?:0|[1-9]\d*)$/;
61775
61776 /** Used to match Latin Unicode letters (excluding mathematical operators). */
61777 var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
61778
61779 /** Used to ensure capturing order of template delimiters. */
61780 var reNoMatch = /($^)/;
61781
61782 /** Used to match unescaped characters in compiled string literals. */
61783 var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
61784
61785 /** Used to compose unicode character classes. */
61786 var rsAstralRange = '\\ud800-\\udfff',
61787 rsComboMarksRange = '\\u0300-\\u036f',
61788 reComboHalfMarksRange = '\\ufe20-\\ufe2f',
61789 rsComboSymbolsRange = '\\u20d0-\\u20ff',
61790 rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
61791 rsDingbatRange = '\\u2700-\\u27bf',
61792 rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
61793 rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
61794 rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
61795 rsPunctuationRange = '\\u2000-\\u206f',
61796 rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
61797 rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
61798 rsVarRange = '\\ufe0e\\ufe0f',
61799 rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
61800
61801 /** Used to compose unicode capture groups. */
61802 var rsApos = "['\u2019]",
61803 rsAstral = '[' + rsAstralRange + ']',
61804 rsBreak = '[' + rsBreakRange + ']',
61805 rsCombo = '[' + rsComboRange + ']',
61806 rsDigits = '\\d+',
61807 rsDingbat = '[' + rsDingbatRange + ']',
61808 rsLower = '[' + rsLowerRange + ']',
61809 rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
61810 rsFitz = '\\ud83c[\\udffb-\\udfff]',
61811 rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
61812 rsNonAstral = '[^' + rsAstralRange + ']',
61813 rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
61814 rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
61815 rsUpper = '[' + rsUpperRange + ']',
61816 rsZWJ = '\\u200d';
61817
61818 /** Used to compose unicode regexes. */
61819 var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
61820 rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
61821 rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
61822 rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
61823 reOptMod = rsModifier + '?',
61824 rsOptVar = '[' + rsVarRange + ']?',
61825 rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
61826 rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
61827 rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
61828 rsSeq = rsOptVar + reOptMod + rsOptJoin,
61829 rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
61830 rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
61831
61832 /** Used to match apostrophes. */
61833 var reApos = RegExp(rsApos, 'g');
61834
61835 /**
61836 * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
61837 * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
61838 */
61839 var reComboMark = RegExp(rsCombo, 'g');
61840
61841 /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
61842 var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
61843
61844 /** Used to match complex or compound words. */
61845 var reUnicodeWord = RegExp([
61846 rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
61847 rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
61848 rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
61849 rsUpper + '+' + rsOptContrUpper,
61850 rsOrdUpper,
61851 rsOrdLower,
61852 rsDigits,
61853 rsEmoji
61854 ].join('|'), 'g');
61855
61856 /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
61857 var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
61858
61859 /** Used to detect strings that need a more robust regexp to match words. */
61860 var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
61861
61862 /** Used to assign default `context` object properties. */
61863 var contextProps = [
61864 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
61865 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
61866 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
61867 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
61868 '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
61869 ];
61870
61871 /** Used to make template sourceURLs easier to identify. */
61872 var templateCounter = -1;
61873
61874 /** Used to identify `toStringTag` values of typed arrays. */
61875 var typedArrayTags = {};
61876 typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
61877 typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
61878 typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
61879 typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
61880 typedArrayTags[uint32Tag] = true;
61881 typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
61882 typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
61883 typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
61884 typedArrayTags[errorTag] = typedArrayTags[funcTag] =
61885 typedArrayTags[mapTag] = typedArrayTags[numberTag] =
61886 typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
61887 typedArrayTags[setTag] = typedArrayTags[stringTag] =
61888 typedArrayTags[weakMapTag] = false;
61889
61890 /** Used to identify `toStringTag` values supported by `_.clone`. */
61891 var cloneableTags = {};
61892 cloneableTags[argsTag] = cloneableTags[arrayTag] =
61893 cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
61894 cloneableTags[boolTag] = cloneableTags[dateTag] =
61895 cloneableTags[float32Tag] = cloneableTags[float64Tag] =
61896 cloneableTags[int8Tag] = cloneableTags[int16Tag] =
61897 cloneableTags[int32Tag] = cloneableTags[mapTag] =
61898 cloneableTags[numberTag] = cloneableTags[objectTag] =
61899 cloneableTags[regexpTag] = cloneableTags[setTag] =
61900 cloneableTags[stringTag] = cloneableTags[symbolTag] =
61901 cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
61902 cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
61903 cloneableTags[errorTag] = cloneableTags[funcTag] =
61904 cloneableTags[weakMapTag] = false;
61905
61906 /** Used to map Latin Unicode letters to basic Latin letters. */
61907 var deburredLetters = {
61908 // Latin-1 Supplement block.
61909 '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
61910 '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
61911 '\xc7': 'C', '\xe7': 'c',
61912 '\xd0': 'D', '\xf0': 'd',
61913 '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
61914 '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
61915 '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
61916 '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
61917 '\xd1': 'N', '\xf1': 'n',
61918 '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
61919 '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
61920 '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
61921 '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
61922 '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
61923 '\xc6': 'Ae', '\xe6': 'ae',
61924 '\xde': 'Th', '\xfe': 'th',
61925 '\xdf': 'ss',
61926 // Latin Extended-A block.
61927 '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
61928 '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
61929 '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
61930 '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
61931 '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
61932 '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
61933 '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
61934 '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
61935 '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
61936 '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
61937 '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
61938 '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
61939 '\u0134': 'J', '\u0135': 'j',
61940 '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
61941 '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
61942 '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
61943 '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
61944 '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
61945 '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
61946 '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
61947 '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
61948 '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
61949 '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
61950 '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
61951 '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
61952 '\u0163': 't', '\u0165': 't', '\u0167': 't',
61953 '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
61954 '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
61955 '\u0174': 'W', '\u0175': 'w',
61956 '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
61957 '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
61958 '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
61959 '\u0132': 'IJ', '\u0133': 'ij',
61960 '\u0152': 'Oe', '\u0153': 'oe',
61961 '\u0149': "'n", '\u017f': 's'
61962 };
61963
61964 /** Used to map characters to HTML entities. */
61965 var htmlEscapes = {
61966 '&': '&amp;',
61967 '<': '&lt;',
61968 '>': '&gt;',
61969 '"': '&quot;',
61970 "'": '&#39;'
61971 };
61972
61973 /** Used to map HTML entities to characters. */
61974 var htmlUnescapes = {
61975 '&amp;': '&',
61976 '&lt;': '<',
61977 '&gt;': '>',
61978 '&quot;': '"',
61979 '&#39;': "'"
61980 };
61981
61982 /** Used to escape characters for inclusion in compiled string literals. */
61983 var stringEscapes = {
61984 '\\': '\\',
61985 "'": "'",
61986 '\n': 'n',
61987 '\r': 'r',
61988 '\u2028': 'u2028',
61989 '\u2029': 'u2029'
61990 };
61991
61992 /** Built-in method references without a dependency on `root`. */
61993 var freeParseFloat = parseFloat,
61994 freeParseInt = parseInt;
61995
61996 /** Detect free variable `global` from Node.js. */
61997 var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
61998
61999 /** Detect free variable `self`. */
62000 var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
62001
62002 /** Used as a reference to the global object. */
62003 var root = freeGlobal || freeSelf || Function('return this')();
62004
62005 /** Detect free variable `exports`. */
62006 var freeExports = true && exports && !exports.nodeType && exports;
62007
62008 /** Detect free variable `module`. */
62009 var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
62010
62011 /** Detect the popular CommonJS extension `module.exports`. */
62012 var moduleExports = freeModule && freeModule.exports === freeExports;
62013
62014 /** Detect free variable `process` from Node.js. */
62015 var freeProcess = moduleExports && freeGlobal.process;
62016
62017 /** Used to access faster Node.js helpers. */
62018 var nodeUtil = (function() {
62019 try {
62020 // Use `util.types` for Node.js 10+.
62021 var types = freeModule && freeModule.require && freeModule.require('util').types;
62022
62023 if (types) {
62024 return types;
62025 }
62026
62027 // Legacy `process.binding('util')` for Node.js < 10.
62028 return freeProcess && freeProcess.binding && freeProcess.binding('util');
62029 } catch (e) {}
62030 }());
62031
62032 /* Node.js helper references. */
62033 var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
62034 nodeIsDate = nodeUtil && nodeUtil.isDate,
62035 nodeIsMap = nodeUtil && nodeUtil.isMap,
62036 nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
62037 nodeIsSet = nodeUtil && nodeUtil.isSet,
62038 nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
62039
62040 /*--------------------------------------------------------------------------*/
62041
62042 /**
62043 * A faster alternative to `Function#apply`, this function invokes `func`
62044 * with the `this` binding of `thisArg` and the arguments of `args`.
62045 *
62046 * @private
62047 * @param {Function} func The function to invoke.
62048 * @param {*} thisArg The `this` binding of `func`.
62049 * @param {Array} args The arguments to invoke `func` with.
62050 * @returns {*} Returns the result of `func`.
62051 */
62052 function apply(func, thisArg, args) {
62053 switch (args.length) {
62054 case 0: return func.call(thisArg);
62055 case 1: return func.call(thisArg, args[0]);
62056 case 2: return func.call(thisArg, args[0], args[1]);
62057 case 3: return func.call(thisArg, args[0], args[1], args[2]);
62058 }
62059 return func.apply(thisArg, args);
62060 }
62061
62062 /**
62063 * A specialized version of `baseAggregator` for arrays.
62064 *
62065 * @private
62066 * @param {Array} [array] The array to iterate over.
62067 * @param {Function} setter The function to set `accumulator` values.
62068 * @param {Function} iteratee The iteratee to transform keys.
62069 * @param {Object} accumulator The initial aggregated object.
62070 * @returns {Function} Returns `accumulator`.
62071 */
62072 function arrayAggregator(array, setter, iteratee, accumulator) {
62073 var index = -1,
62074 length = array == null ? 0 : array.length;
62075
62076 while (++index < length) {
62077 var value = array[index];
62078 setter(accumulator, value, iteratee(value), array);
62079 }
62080 return accumulator;
62081 }
62082
62083 /**
62084 * A specialized version of `_.forEach` for arrays without support for
62085 * iteratee shorthands.
62086 *
62087 * @private
62088 * @param {Array} [array] The array to iterate over.
62089 * @param {Function} iteratee The function invoked per iteration.
62090 * @returns {Array} Returns `array`.
62091 */
62092 function arrayEach(array, iteratee) {
62093 var index = -1,
62094 length = array == null ? 0 : array.length;
62095
62096 while (++index < length) {
62097 if (iteratee(array[index], index, array) === false) {
62098 break;
62099 }
62100 }
62101 return array;
62102 }
62103
62104 /**
62105 * A specialized version of `_.forEachRight` for arrays without support for
62106 * iteratee shorthands.
62107 *
62108 * @private
62109 * @param {Array} [array] The array to iterate over.
62110 * @param {Function} iteratee The function invoked per iteration.
62111 * @returns {Array} Returns `array`.
62112 */
62113 function arrayEachRight(array, iteratee) {
62114 var length = array == null ? 0 : array.length;
62115
62116 while (length--) {
62117 if (iteratee(array[length], length, array) === false) {
62118 break;
62119 }
62120 }
62121 return array;
62122 }
62123
62124 /**
62125 * A specialized version of `_.every` for arrays without support for
62126 * iteratee shorthands.
62127 *
62128 * @private
62129 * @param {Array} [array] The array to iterate over.
62130 * @param {Function} predicate The function invoked per iteration.
62131 * @returns {boolean} Returns `true` if all elements pass the predicate check,
62132 * else `false`.
62133 */
62134 function arrayEvery(array, predicate) {
62135 var index = -1,
62136 length = array == null ? 0 : array.length;
62137
62138 while (++index < length) {
62139 if (!predicate(array[index], index, array)) {
62140 return false;
62141 }
62142 }
62143 return true;
62144 }
62145
62146 /**
62147 * A specialized version of `_.filter` for arrays without support for
62148 * iteratee shorthands.
62149 *
62150 * @private
62151 * @param {Array} [array] The array to iterate over.
62152 * @param {Function} predicate The function invoked per iteration.
62153 * @returns {Array} Returns the new filtered array.
62154 */
62155 function arrayFilter(array, predicate) {
62156 var index = -1,
62157 length = array == null ? 0 : array.length,
62158 resIndex = 0,
62159 result = [];
62160
62161 while (++index < length) {
62162 var value = array[index];
62163 if (predicate(value, index, array)) {
62164 result[resIndex++] = value;
62165 }
62166 }
62167 return result;
62168 }
62169
62170 /**
62171 * A specialized version of `_.includes` for arrays without support for
62172 * specifying an index to search from.
62173 *
62174 * @private
62175 * @param {Array} [array] The array to inspect.
62176 * @param {*} target The value to search for.
62177 * @returns {boolean} Returns `true` if `target` is found, else `false`.
62178 */
62179 function arrayIncludes(array, value) {
62180 var length = array == null ? 0 : array.length;
62181 return !!length && baseIndexOf(array, value, 0) > -1;
62182 }
62183
62184 /**
62185 * This function is like `arrayIncludes` except that it accepts a comparator.
62186 *
62187 * @private
62188 * @param {Array} [array] The array to inspect.
62189 * @param {*} target The value to search for.
62190 * @param {Function} comparator The comparator invoked per element.
62191 * @returns {boolean} Returns `true` if `target` is found, else `false`.
62192 */
62193 function arrayIncludesWith(array, value, comparator) {
62194 var index = -1,
62195 length = array == null ? 0 : array.length;
62196
62197 while (++index < length) {
62198 if (comparator(value, array[index])) {
62199 return true;
62200 }
62201 }
62202 return false;
62203 }
62204
62205 /**
62206 * A specialized version of `_.map` for arrays without support for iteratee
62207 * shorthands.
62208 *
62209 * @private
62210 * @param {Array} [array] The array to iterate over.
62211 * @param {Function} iteratee The function invoked per iteration.
62212 * @returns {Array} Returns the new mapped array.
62213 */
62214 function arrayMap(array, iteratee) {
62215 var index = -1,
62216 length = array == null ? 0 : array.length,
62217 result = Array(length);
62218
62219 while (++index < length) {
62220 result[index] = iteratee(array[index], index, array);
62221 }
62222 return result;
62223 }
62224
62225 /**
62226 * Appends the elements of `values` to `array`.
62227 *
62228 * @private
62229 * @param {Array} array The array to modify.
62230 * @param {Array} values The values to append.
62231 * @returns {Array} Returns `array`.
62232 */
62233 function arrayPush(array, values) {
62234 var index = -1,
62235 length = values.length,
62236 offset = array.length;
62237
62238 while (++index < length) {
62239 array[offset + index] = values[index];
62240 }
62241 return array;
62242 }
62243
62244 /**
62245 * A specialized version of `_.reduce` for arrays without support for
62246 * iteratee shorthands.
62247 *
62248 * @private
62249 * @param {Array} [array] The array to iterate over.
62250 * @param {Function} iteratee The function invoked per iteration.
62251 * @param {*} [accumulator] The initial value.
62252 * @param {boolean} [initAccum] Specify using the first element of `array` as
62253 * the initial value.
62254 * @returns {*} Returns the accumulated value.
62255 */
62256 function arrayReduce(array, iteratee, accumulator, initAccum) {
62257 var index = -1,
62258 length = array == null ? 0 : array.length;
62259
62260 if (initAccum && length) {
62261 accumulator = array[++index];
62262 }
62263 while (++index < length) {
62264 accumulator = iteratee(accumulator, array[index], index, array);
62265 }
62266 return accumulator;
62267 }
62268
62269 /**
62270 * A specialized version of `_.reduceRight` for arrays without support for
62271 * iteratee shorthands.
62272 *
62273 * @private
62274 * @param {Array} [array] The array to iterate over.
62275 * @param {Function} iteratee The function invoked per iteration.
62276 * @param {*} [accumulator] The initial value.
62277 * @param {boolean} [initAccum] Specify using the last element of `array` as
62278 * the initial value.
62279 * @returns {*} Returns the accumulated value.
62280 */
62281 function arrayReduceRight(array, iteratee, accumulator, initAccum) {
62282 var length = array == null ? 0 : array.length;
62283 if (initAccum && length) {
62284 accumulator = array[--length];
62285 }
62286 while (length--) {
62287 accumulator = iteratee(accumulator, array[length], length, array);
62288 }
62289 return accumulator;
62290 }
62291
62292 /**
62293 * A specialized version of `_.some` for arrays without support for iteratee
62294 * shorthands.
62295 *
62296 * @private
62297 * @param {Array} [array] The array to iterate over.
62298 * @param {Function} predicate The function invoked per iteration.
62299 * @returns {boolean} Returns `true` if any element passes the predicate check,
62300 * else `false`.
62301 */
62302 function arraySome(array, predicate) {
62303 var index = -1,
62304 length = array == null ? 0 : array.length;
62305
62306 while (++index < length) {
62307 if (predicate(array[index], index, array)) {
62308 return true;
62309 }
62310 }
62311 return false;
62312 }
62313
62314 /**
62315 * Gets the size of an ASCII `string`.
62316 *
62317 * @private
62318 * @param {string} string The string inspect.
62319 * @returns {number} Returns the string size.
62320 */
62321 var asciiSize = baseProperty('length');
62322
62323 /**
62324 * Converts an ASCII `string` to an array.
62325 *
62326 * @private
62327 * @param {string} string The string to convert.
62328 * @returns {Array} Returns the converted array.
62329 */
62330 function asciiToArray(string) {
62331 return string.split('');
62332 }
62333
62334 /**
62335 * Splits an ASCII `string` into an array of its words.
62336 *
62337 * @private
62338 * @param {string} The string to inspect.
62339 * @returns {Array} Returns the words of `string`.
62340 */
62341 function asciiWords(string) {
62342 return string.match(reAsciiWord) || [];
62343 }
62344
62345 /**
62346 * The base implementation of methods like `_.findKey` and `_.findLastKey`,
62347 * without support for iteratee shorthands, which iterates over `collection`
62348 * using `eachFunc`.
62349 *
62350 * @private
62351 * @param {Array|Object} collection The collection to inspect.
62352 * @param {Function} predicate The function invoked per iteration.
62353 * @param {Function} eachFunc The function to iterate over `collection`.
62354 * @returns {*} Returns the found element or its key, else `undefined`.
62355 */
62356 function baseFindKey(collection, predicate, eachFunc) {
62357 var result;
62358 eachFunc(collection, function(value, key, collection) {
62359 if (predicate(value, key, collection)) {
62360 result = key;
62361 return false;
62362 }
62363 });
62364 return result;
62365 }
62366
62367 /**
62368 * The base implementation of `_.findIndex` and `_.findLastIndex` without
62369 * support for iteratee shorthands.
62370 *
62371 * @private
62372 * @param {Array} array The array to inspect.
62373 * @param {Function} predicate The function invoked per iteration.
62374 * @param {number} fromIndex The index to search from.
62375 * @param {boolean} [fromRight] Specify iterating from right to left.
62376 * @returns {number} Returns the index of the matched value, else `-1`.
62377 */
62378 function baseFindIndex(array, predicate, fromIndex, fromRight) {
62379 var length = array.length,
62380 index = fromIndex + (fromRight ? 1 : -1);
62381
62382 while ((fromRight ? index-- : ++index < length)) {
62383 if (predicate(array[index], index, array)) {
62384 return index;
62385 }
62386 }
62387 return -1;
62388 }
62389
62390 /**
62391 * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
62392 *
62393 * @private
62394 * @param {Array} array The array to inspect.
62395 * @param {*} value The value to search for.
62396 * @param {number} fromIndex The index to search from.
62397 * @returns {number} Returns the index of the matched value, else `-1`.
62398 */
62399 function baseIndexOf(array, value, fromIndex) {
62400 return value === value
62401 ? strictIndexOf(array, value, fromIndex)
62402 : baseFindIndex(array, baseIsNaN, fromIndex);
62403 }
62404
62405 /**
62406 * This function is like `baseIndexOf` except that it accepts a comparator.
62407 *
62408 * @private
62409 * @param {Array} array The array to inspect.
62410 * @param {*} value The value to search for.
62411 * @param {number} fromIndex The index to search from.
62412 * @param {Function} comparator The comparator invoked per element.
62413 * @returns {number} Returns the index of the matched value, else `-1`.
62414 */
62415 function baseIndexOfWith(array, value, fromIndex, comparator) {
62416 var index = fromIndex - 1,
62417 length = array.length;
62418
62419 while (++index < length) {
62420 if (comparator(array[index], value)) {
62421 return index;
62422 }
62423 }
62424 return -1;
62425 }
62426
62427 /**
62428 * The base implementation of `_.isNaN` without support for number objects.
62429 *
62430 * @private
62431 * @param {*} value The value to check.
62432 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
62433 */
62434 function baseIsNaN(value) {
62435 return value !== value;
62436 }
62437
62438 /**
62439 * The base implementation of `_.mean` and `_.meanBy` without support for
62440 * iteratee shorthands.
62441 *
62442 * @private
62443 * @param {Array} array The array to iterate over.
62444 * @param {Function} iteratee The function invoked per iteration.
62445 * @returns {number} Returns the mean.
62446 */
62447 function baseMean(array, iteratee) {
62448 var length = array == null ? 0 : array.length;
62449 return length ? (baseSum(array, iteratee) / length) : NAN;
62450 }
62451
62452 /**
62453 * The base implementation of `_.property` without support for deep paths.
62454 *
62455 * @private
62456 * @param {string} key The key of the property to get.
62457 * @returns {Function} Returns the new accessor function.
62458 */
62459 function baseProperty(key) {
62460 return function(object) {
62461 return object == null ? undefined : object[key];
62462 };
62463 }
62464
62465 /**
62466 * The base implementation of `_.propertyOf` without support for deep paths.
62467 *
62468 * @private
62469 * @param {Object} object The object to query.
62470 * @returns {Function} Returns the new accessor function.
62471 */
62472 function basePropertyOf(object) {
62473 return function(key) {
62474 return object == null ? undefined : object[key];
62475 };
62476 }
62477
62478 /**
62479 * The base implementation of `_.reduce` and `_.reduceRight`, without support
62480 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
62481 *
62482 * @private
62483 * @param {Array|Object} collection The collection to iterate over.
62484 * @param {Function} iteratee The function invoked per iteration.
62485 * @param {*} accumulator The initial value.
62486 * @param {boolean} initAccum Specify using the first or last element of
62487 * `collection` as the initial value.
62488 * @param {Function} eachFunc The function to iterate over `collection`.
62489 * @returns {*} Returns the accumulated value.
62490 */
62491 function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
62492 eachFunc(collection, function(value, index, collection) {
62493 accumulator = initAccum
62494 ? (initAccum = false, value)
62495 : iteratee(accumulator, value, index, collection);
62496 });
62497 return accumulator;
62498 }
62499
62500 /**
62501 * The base implementation of `_.sortBy` which uses `comparer` to define the
62502 * sort order of `array` and replaces criteria objects with their corresponding
62503 * values.
62504 *
62505 * @private
62506 * @param {Array} array The array to sort.
62507 * @param {Function} comparer The function to define sort order.
62508 * @returns {Array} Returns `array`.
62509 */
62510 function baseSortBy(array, comparer) {
62511 var length = array.length;
62512
62513 array.sort(comparer);
62514 while (length--) {
62515 array[length] = array[length].value;
62516 }
62517 return array;
62518 }
62519
62520 /**
62521 * The base implementation of `_.sum` and `_.sumBy` without support for
62522 * iteratee shorthands.
62523 *
62524 * @private
62525 * @param {Array} array The array to iterate over.
62526 * @param {Function} iteratee The function invoked per iteration.
62527 * @returns {number} Returns the sum.
62528 */
62529 function baseSum(array, iteratee) {
62530 var result,
62531 index = -1,
62532 length = array.length;
62533
62534 while (++index < length) {
62535 var current = iteratee(array[index]);
62536 if (current !== undefined) {
62537 result = result === undefined ? current : (result + current);
62538 }
62539 }
62540 return result;
62541 }
62542
62543 /**
62544 * The base implementation of `_.times` without support for iteratee shorthands
62545 * or max array length checks.
62546 *
62547 * @private
62548 * @param {number} n The number of times to invoke `iteratee`.
62549 * @param {Function} iteratee The function invoked per iteration.
62550 * @returns {Array} Returns the array of results.
62551 */
62552 function baseTimes(n, iteratee) {
62553 var index = -1,
62554 result = Array(n);
62555
62556 while (++index < n) {
62557 result[index] = iteratee(index);
62558 }
62559 return result;
62560 }
62561
62562 /**
62563 * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
62564 * of key-value pairs for `object` corresponding to the property names of `props`.
62565 *
62566 * @private
62567 * @param {Object} object The object to query.
62568 * @param {Array} props The property names to get values for.
62569 * @returns {Object} Returns the key-value pairs.
62570 */
62571 function baseToPairs(object, props) {
62572 return arrayMap(props, function(key) {
62573 return [key, object[key]];
62574 });
62575 }
62576
62577 /**
62578 * The base implementation of `_.unary` without support for storing metadata.
62579 *
62580 * @private
62581 * @param {Function} func The function to cap arguments for.
62582 * @returns {Function} Returns the new capped function.
62583 */
62584 function baseUnary(func) {
62585 return function(value) {
62586 return func(value);
62587 };
62588 }
62589
62590 /**
62591 * The base implementation of `_.values` and `_.valuesIn` which creates an
62592 * array of `object` property values corresponding to the property names
62593 * of `props`.
62594 *
62595 * @private
62596 * @param {Object} object The object to query.
62597 * @param {Array} props The property names to get values for.
62598 * @returns {Object} Returns the array of property values.
62599 */
62600 function baseValues(object, props) {
62601 return arrayMap(props, function(key) {
62602 return object[key];
62603 });
62604 }
62605
62606 /**
62607 * Checks if a `cache` value for `key` exists.
62608 *
62609 * @private
62610 * @param {Object} cache The cache to query.
62611 * @param {string} key The key of the entry to check.
62612 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
62613 */
62614 function cacheHas(cache, key) {
62615 return cache.has(key);
62616 }
62617
62618 /**
62619 * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
62620 * that is not found in the character symbols.
62621 *
62622 * @private
62623 * @param {Array} strSymbols The string symbols to inspect.
62624 * @param {Array} chrSymbols The character symbols to find.
62625 * @returns {number} Returns the index of the first unmatched string symbol.
62626 */
62627 function charsStartIndex(strSymbols, chrSymbols) {
62628 var index = -1,
62629 length = strSymbols.length;
62630
62631 while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
62632 return index;
62633 }
62634
62635 /**
62636 * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
62637 * that is not found in the character symbols.
62638 *
62639 * @private
62640 * @param {Array} strSymbols The string symbols to inspect.
62641 * @param {Array} chrSymbols The character symbols to find.
62642 * @returns {number} Returns the index of the last unmatched string symbol.
62643 */
62644 function charsEndIndex(strSymbols, chrSymbols) {
62645 var index = strSymbols.length;
62646
62647 while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
62648 return index;
62649 }
62650
62651 /**
62652 * Gets the number of `placeholder` occurrences in `array`.
62653 *
62654 * @private
62655 * @param {Array} array The array to inspect.
62656 * @param {*} placeholder The placeholder to search for.
62657 * @returns {number} Returns the placeholder count.
62658 */
62659 function countHolders(array, placeholder) {
62660 var length = array.length,
62661 result = 0;
62662
62663 while (length--) {
62664 if (array[length] === placeholder) {
62665 ++result;
62666 }
62667 }
62668 return result;
62669 }
62670
62671 /**
62672 * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
62673 * letters to basic Latin letters.
62674 *
62675 * @private
62676 * @param {string} letter The matched letter to deburr.
62677 * @returns {string} Returns the deburred letter.
62678 */
62679 var deburrLetter = basePropertyOf(deburredLetters);
62680
62681 /**
62682 * Used by `_.escape` to convert characters to HTML entities.
62683 *
62684 * @private
62685 * @param {string} chr The matched character to escape.
62686 * @returns {string} Returns the escaped character.
62687 */
62688 var escapeHtmlChar = basePropertyOf(htmlEscapes);
62689
62690 /**
62691 * Used by `_.template` to escape characters for inclusion in compiled string literals.
62692 *
62693 * @private
62694 * @param {string} chr The matched character to escape.
62695 * @returns {string} Returns the escaped character.
62696 */
62697 function escapeStringChar(chr) {
62698 return '\\' + stringEscapes[chr];
62699 }
62700
62701 /**
62702 * Gets the value at `key` of `object`.
62703 *
62704 * @private
62705 * @param {Object} [object] The object to query.
62706 * @param {string} key The key of the property to get.
62707 * @returns {*} Returns the property value.
62708 */
62709 function getValue(object, key) {
62710 return object == null ? undefined : object[key];
62711 }
62712
62713 /**
62714 * Checks if `string` contains Unicode symbols.
62715 *
62716 * @private
62717 * @param {string} string The string to inspect.
62718 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
62719 */
62720 function hasUnicode(string) {
62721 return reHasUnicode.test(string);
62722 }
62723
62724 /**
62725 * Checks if `string` contains a word composed of Unicode symbols.
62726 *
62727 * @private
62728 * @param {string} string The string to inspect.
62729 * @returns {boolean} Returns `true` if a word is found, else `false`.
62730 */
62731 function hasUnicodeWord(string) {
62732 return reHasUnicodeWord.test(string);
62733 }
62734
62735 /**
62736 * Converts `iterator` to an array.
62737 *
62738 * @private
62739 * @param {Object} iterator The iterator to convert.
62740 * @returns {Array} Returns the converted array.
62741 */
62742 function iteratorToArray(iterator) {
62743 var data,
62744 result = [];
62745
62746 while (!(data = iterator.next()).done) {
62747 result.push(data.value);
62748 }
62749 return result;
62750 }
62751
62752 /**
62753 * Converts `map` to its key-value pairs.
62754 *
62755 * @private
62756 * @param {Object} map The map to convert.
62757 * @returns {Array} Returns the key-value pairs.
62758 */
62759 function mapToArray(map) {
62760 var index = -1,
62761 result = Array(map.size);
62762
62763 map.forEach(function(value, key) {
62764 result[++index] = [key, value];
62765 });
62766 return result;
62767 }
62768
62769 /**
62770 * Creates a unary function that invokes `func` with its argument transformed.
62771 *
62772 * @private
62773 * @param {Function} func The function to wrap.
62774 * @param {Function} transform The argument transform.
62775 * @returns {Function} Returns the new function.
62776 */
62777 function overArg(func, transform) {
62778 return function(arg) {
62779 return func(transform(arg));
62780 };
62781 }
62782
62783 /**
62784 * Replaces all `placeholder` elements in `array` with an internal placeholder
62785 * and returns an array of their indexes.
62786 *
62787 * @private
62788 * @param {Array} array The array to modify.
62789 * @param {*} placeholder The placeholder to replace.
62790 * @returns {Array} Returns the new array of placeholder indexes.
62791 */
62792 function replaceHolders(array, placeholder) {
62793 var index = -1,
62794 length = array.length,
62795 resIndex = 0,
62796 result = [];
62797
62798 while (++index < length) {
62799 var value = array[index];
62800 if (value === placeholder || value === PLACEHOLDER) {
62801 array[index] = PLACEHOLDER;
62802 result[resIndex++] = index;
62803 }
62804 }
62805 return result;
62806 }
62807
62808 /**
62809 * Converts `set` to an array of its values.
62810 *
62811 * @private
62812 * @param {Object} set The set to convert.
62813 * @returns {Array} Returns the values.
62814 */
62815 function setToArray(set) {
62816 var index = -1,
62817 result = Array(set.size);
62818
62819 set.forEach(function(value) {
62820 result[++index] = value;
62821 });
62822 return result;
62823 }
62824
62825 /**
62826 * Converts `set` to its value-value pairs.
62827 *
62828 * @private
62829 * @param {Object} set The set to convert.
62830 * @returns {Array} Returns the value-value pairs.
62831 */
62832 function setToPairs(set) {
62833 var index = -1,
62834 result = Array(set.size);
62835
62836 set.forEach(function(value) {
62837 result[++index] = [value, value];
62838 });
62839 return result;
62840 }
62841
62842 /**
62843 * A specialized version of `_.indexOf` which performs strict equality
62844 * comparisons of values, i.e. `===`.
62845 *
62846 * @private
62847 * @param {Array} array The array to inspect.
62848 * @param {*} value The value to search for.
62849 * @param {number} fromIndex The index to search from.
62850 * @returns {number} Returns the index of the matched value, else `-1`.
62851 */
62852 function strictIndexOf(array, value, fromIndex) {
62853 var index = fromIndex - 1,
62854 length = array.length;
62855
62856 while (++index < length) {
62857 if (array[index] === value) {
62858 return index;
62859 }
62860 }
62861 return -1;
62862 }
62863
62864 /**
62865 * A specialized version of `_.lastIndexOf` which performs strict equality
62866 * comparisons of values, i.e. `===`.
62867 *
62868 * @private
62869 * @param {Array} array The array to inspect.
62870 * @param {*} value The value to search for.
62871 * @param {number} fromIndex The index to search from.
62872 * @returns {number} Returns the index of the matched value, else `-1`.
62873 */
62874 function strictLastIndexOf(array, value, fromIndex) {
62875 var index = fromIndex + 1;
62876 while (index--) {
62877 if (array[index] === value) {
62878 return index;
62879 }
62880 }
62881 return index;
62882 }
62883
62884 /**
62885 * Gets the number of symbols in `string`.
62886 *
62887 * @private
62888 * @param {string} string The string to inspect.
62889 * @returns {number} Returns the string size.
62890 */
62891 function stringSize(string) {
62892 return hasUnicode(string)
62893 ? unicodeSize(string)
62894 : asciiSize(string);
62895 }
62896
62897 /**
62898 * Converts `string` to an array.
62899 *
62900 * @private
62901 * @param {string} string The string to convert.
62902 * @returns {Array} Returns the converted array.
62903 */
62904 function stringToArray(string) {
62905 return hasUnicode(string)
62906 ? unicodeToArray(string)
62907 : asciiToArray(string);
62908 }
62909
62910 /**
62911 * Used by `_.unescape` to convert HTML entities to characters.
62912 *
62913 * @private
62914 * @param {string} chr The matched character to unescape.
62915 * @returns {string} Returns the unescaped character.
62916 */
62917 var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
62918
62919 /**
62920 * Gets the size of a Unicode `string`.
62921 *
62922 * @private
62923 * @param {string} string The string inspect.
62924 * @returns {number} Returns the string size.
62925 */
62926 function unicodeSize(string) {
62927 var result = reUnicode.lastIndex = 0;
62928 while (reUnicode.test(string)) {
62929 ++result;
62930 }
62931 return result;
62932 }
62933
62934 /**
62935 * Converts a Unicode `string` to an array.
62936 *
62937 * @private
62938 * @param {string} string The string to convert.
62939 * @returns {Array} Returns the converted array.
62940 */
62941 function unicodeToArray(string) {
62942 return string.match(reUnicode) || [];
62943 }
62944
62945 /**
62946 * Splits a Unicode `string` into an array of its words.
62947 *
62948 * @private
62949 * @param {string} The string to inspect.
62950 * @returns {Array} Returns the words of `string`.
62951 */
62952 function unicodeWords(string) {
62953 return string.match(reUnicodeWord) || [];
62954 }
62955
62956 /*--------------------------------------------------------------------------*/
62957
62958 /**
62959 * Create a new pristine `lodash` function using the `context` object.
62960 *
62961 * @static
62962 * @memberOf _
62963 * @since 1.1.0
62964 * @category Util
62965 * @param {Object} [context=root] The context object.
62966 * @returns {Function} Returns a new `lodash` function.
62967 * @example
62968 *
62969 * _.mixin({ 'foo': _.constant('foo') });
62970 *
62971 * var lodash = _.runInContext();
62972 * lodash.mixin({ 'bar': lodash.constant('bar') });
62973 *
62974 * _.isFunction(_.foo);
62975 * // => true
62976 * _.isFunction(_.bar);
62977 * // => false
62978 *
62979 * lodash.isFunction(lodash.foo);
62980 * // => false
62981 * lodash.isFunction(lodash.bar);
62982 * // => true
62983 *
62984 * // Create a suped-up `defer` in Node.js.
62985 * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
62986 */
62987 var runInContext = (function runInContext(context) {
62988 context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
62989
62990 /** Built-in constructor references. */
62991 var Array = context.Array,
62992 Date = context.Date,
62993 Error = context.Error,
62994 Function = context.Function,
62995 Math = context.Math,
62996 Object = context.Object,
62997 RegExp = context.RegExp,
62998 String = context.String,
62999 TypeError = context.TypeError;
63000
63001 /** Used for built-in method references. */
63002 var arrayProto = Array.prototype,
63003 funcProto = Function.prototype,
63004 objectProto = Object.prototype;
63005
63006 /** Used to detect overreaching core-js shims. */
63007 var coreJsData = context['__core-js_shared__'];
63008
63009 /** Used to resolve the decompiled source of functions. */
63010 var funcToString = funcProto.toString;
63011
63012 /** Used to check objects for own properties. */
63013 var hasOwnProperty = objectProto.hasOwnProperty;
63014
63015 /** Used to generate unique IDs. */
63016 var idCounter = 0;
63017
63018 /** Used to detect methods masquerading as native. */
63019 var maskSrcKey = (function() {
63020 var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
63021 return uid ? ('Symbol(src)_1.' + uid) : '';
63022 }());
63023
63024 /**
63025 * Used to resolve the
63026 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
63027 * of values.
63028 */
63029 var nativeObjectToString = objectProto.toString;
63030
63031 /** Used to infer the `Object` constructor. */
63032 var objectCtorString = funcToString.call(Object);
63033
63034 /** Used to restore the original `_` reference in `_.noConflict`. */
63035 var oldDash = root._;
63036
63037 /** Used to detect if a method is native. */
63038 var reIsNative = RegExp('^' +
63039 funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
63040 .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
63041 );
63042
63043 /** Built-in value references. */
63044 var Buffer = moduleExports ? context.Buffer : undefined,
63045 Symbol = context.Symbol,
63046 Uint8Array = context.Uint8Array,
63047 allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
63048 getPrototype = overArg(Object.getPrototypeOf, Object),
63049 objectCreate = Object.create,
63050 propertyIsEnumerable = objectProto.propertyIsEnumerable,
63051 splice = arrayProto.splice,
63052 spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
63053 symIterator = Symbol ? Symbol.iterator : undefined,
63054 symToStringTag = Symbol ? Symbol.toStringTag : undefined;
63055
63056 var defineProperty = (function() {
63057 try {
63058 var func = getNative(Object, 'defineProperty');
63059 func({}, '', {});
63060 return func;
63061 } catch (e) {}
63062 }());
63063
63064 /** Mocked built-ins. */
63065 var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
63066 ctxNow = Date && Date.now !== root.Date.now && Date.now,
63067 ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
63068
63069 /* Built-in method references for those with the same name as other `lodash` methods. */
63070 var nativeCeil = Math.ceil,
63071 nativeFloor = Math.floor,
63072 nativeGetSymbols = Object.getOwnPropertySymbols,
63073 nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
63074 nativeIsFinite = context.isFinite,
63075 nativeJoin = arrayProto.join,
63076 nativeKeys = overArg(Object.keys, Object),
63077 nativeMax = Math.max,
63078 nativeMin = Math.min,
63079 nativeNow = Date.now,
63080 nativeParseInt = context.parseInt,
63081 nativeRandom = Math.random,
63082 nativeReverse = arrayProto.reverse;
63083
63084 /* Built-in method references that are verified to be native. */
63085 var DataView = getNative(context, 'DataView'),
63086 Map = getNative(context, 'Map'),
63087 Promise = getNative(context, 'Promise'),
63088 Set = getNative(context, 'Set'),
63089 WeakMap = getNative(context, 'WeakMap'),
63090 nativeCreate = getNative(Object, 'create');
63091
63092 /** Used to store function metadata. */
63093 var metaMap = WeakMap && new WeakMap;
63094
63095 /** Used to lookup unminified function names. */
63096 var realNames = {};
63097
63098 /** Used to detect maps, sets, and weakmaps. */
63099 var dataViewCtorString = toSource(DataView),
63100 mapCtorString = toSource(Map),
63101 promiseCtorString = toSource(Promise),
63102 setCtorString = toSource(Set),
63103 weakMapCtorString = toSource(WeakMap);
63104
63105 /** Used to convert symbols to primitives and strings. */
63106 var symbolProto = Symbol ? Symbol.prototype : undefined,
63107 symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
63108 symbolToString = symbolProto ? symbolProto.toString : undefined;
63109
63110 /*------------------------------------------------------------------------*/
63111
63112 /**
63113 * Creates a `lodash` object which wraps `value` to enable implicit method
63114 * chain sequences. Methods that operate on and return arrays, collections,
63115 * and functions can be chained together. Methods that retrieve a single value
63116 * or may return a primitive value will automatically end the chain sequence
63117 * and return the unwrapped value. Otherwise, the value must be unwrapped
63118 * with `_#value`.
63119 *
63120 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
63121 * enabled using `_.chain`.
63122 *
63123 * The execution of chained methods is lazy, that is, it's deferred until
63124 * `_#value` is implicitly or explicitly called.
63125 *
63126 * Lazy evaluation allows several methods to support shortcut fusion.
63127 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
63128 * the creation of intermediate arrays and can greatly reduce the number of
63129 * iteratee executions. Sections of a chain sequence qualify for shortcut
63130 * fusion if the section is applied to an array and iteratees accept only
63131 * one argument. The heuristic for whether a section qualifies for shortcut
63132 * fusion is subject to change.
63133 *
63134 * Chaining is supported in custom builds as long as the `_#value` method is
63135 * directly or indirectly included in the build.
63136 *
63137 * In addition to lodash methods, wrappers have `Array` and `String` methods.
63138 *
63139 * The wrapper `Array` methods are:
63140 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
63141 *
63142 * The wrapper `String` methods are:
63143 * `replace` and `split`
63144 *
63145 * The wrapper methods that support shortcut fusion are:
63146 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
63147 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
63148 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
63149 *
63150 * The chainable wrapper methods are:
63151 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
63152 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
63153 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
63154 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
63155 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
63156 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
63157 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
63158 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
63159 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
63160 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
63161 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
63162 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
63163 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
63164 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
63165 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
63166 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
63167 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
63168 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
63169 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
63170 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
63171 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
63172 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
63173 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
63174 * `zipObject`, `zipObjectDeep`, and `zipWith`
63175 *
63176 * The wrapper methods that are **not** chainable by default are:
63177 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
63178 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
63179 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
63180 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
63181 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
63182 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
63183 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
63184 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
63185 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
63186 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
63187 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
63188 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
63189 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
63190 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
63191 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
63192 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
63193 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
63194 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
63195 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
63196 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
63197 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
63198 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
63199 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
63200 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
63201 * `upperFirst`, `value`, and `words`
63202 *
63203 * @name _
63204 * @constructor
63205 * @category Seq
63206 * @param {*} value The value to wrap in a `lodash` instance.
63207 * @returns {Object} Returns the new `lodash` wrapper instance.
63208 * @example
63209 *
63210 * function square(n) {
63211 * return n * n;
63212 * }
63213 *
63214 * var wrapped = _([1, 2, 3]);
63215 *
63216 * // Returns an unwrapped value.
63217 * wrapped.reduce(_.add);
63218 * // => 6
63219 *
63220 * // Returns a wrapped value.
63221 * var squares = wrapped.map(square);
63222 *
63223 * _.isArray(squares);
63224 * // => false
63225 *
63226 * _.isArray(squares.value());
63227 * // => true
63228 */
63229 function lodash(value) {
63230 if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
63231 if (value instanceof LodashWrapper) {
63232 return value;
63233 }
63234 if (hasOwnProperty.call(value, '__wrapped__')) {
63235 return wrapperClone(value);
63236 }
63237 }
63238 return new LodashWrapper(value);
63239 }
63240
63241 /**
63242 * The base implementation of `_.create` without support for assigning
63243 * properties to the created object.
63244 *
63245 * @private
63246 * @param {Object} proto The object to inherit from.
63247 * @returns {Object} Returns the new object.
63248 */
63249 var baseCreate = (function() {
63250 function object() {}
63251 return function(proto) {
63252 if (!isObject(proto)) {
63253 return {};
63254 }
63255 if (objectCreate) {
63256 return objectCreate(proto);
63257 }
63258 object.prototype = proto;
63259 var result = new object;
63260 object.prototype = undefined;
63261 return result;
63262 };
63263 }());
63264
63265 /**
63266 * The function whose prototype chain sequence wrappers inherit from.
63267 *
63268 * @private
63269 */
63270 function baseLodash() {
63271 // No operation performed.
63272 }
63273
63274 /**
63275 * The base constructor for creating `lodash` wrapper objects.
63276 *
63277 * @private
63278 * @param {*} value The value to wrap.
63279 * @param {boolean} [chainAll] Enable explicit method chain sequences.
63280 */
63281 function LodashWrapper(value, chainAll) {
63282 this.__wrapped__ = value;
63283 this.__actions__ = [];
63284 this.__chain__ = !!chainAll;
63285 this.__index__ = 0;
63286 this.__values__ = undefined;
63287 }
63288
63289 /**
63290 * By default, the template delimiters used by lodash are like those in
63291 * embedded Ruby (ERB) as well as ES2015 template strings. Change the
63292 * following template settings to use alternative delimiters.
63293 *
63294 * @static
63295 * @memberOf _
63296 * @type {Object}
63297 */
63298 lodash.templateSettings = {
63299
63300 /**
63301 * Used to detect `data` property values to be HTML-escaped.
63302 *
63303 * @memberOf _.templateSettings
63304 * @type {RegExp}
63305 */
63306 'escape': reEscape,
63307
63308 /**
63309 * Used to detect code to be evaluated.
63310 *
63311 * @memberOf _.templateSettings
63312 * @type {RegExp}
63313 */
63314 'evaluate': reEvaluate,
63315
63316 /**
63317 * Used to detect `data` property values to inject.
63318 *
63319 * @memberOf _.templateSettings
63320 * @type {RegExp}
63321 */
63322 'interpolate': reInterpolate,
63323
63324 /**
63325 * Used to reference the data object in the template text.
63326 *
63327 * @memberOf _.templateSettings
63328 * @type {string}
63329 */
63330 'variable': '',
63331
63332 /**
63333 * Used to import variables into the compiled template.
63334 *
63335 * @memberOf _.templateSettings
63336 * @type {Object}
63337 */
63338 'imports': {
63339
63340 /**
63341 * A reference to the `lodash` function.
63342 *
63343 * @memberOf _.templateSettings.imports
63344 * @type {Function}
63345 */
63346 '_': lodash
63347 }
63348 };
63349
63350 // Ensure wrappers are instances of `baseLodash`.
63351 lodash.prototype = baseLodash.prototype;
63352 lodash.prototype.constructor = lodash;
63353
63354 LodashWrapper.prototype = baseCreate(baseLodash.prototype);
63355 LodashWrapper.prototype.constructor = LodashWrapper;
63356
63357 /*------------------------------------------------------------------------*/
63358
63359 /**
63360 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
63361 *
63362 * @private
63363 * @constructor
63364 * @param {*} value The value to wrap.
63365 */
63366 function LazyWrapper(value) {
63367 this.__wrapped__ = value;
63368 this.__actions__ = [];
63369 this.__dir__ = 1;
63370 this.__filtered__ = false;
63371 this.__iteratees__ = [];
63372 this.__takeCount__ = MAX_ARRAY_LENGTH;
63373 this.__views__ = [];
63374 }
63375
63376 /**
63377 * Creates a clone of the lazy wrapper object.
63378 *
63379 * @private
63380 * @name clone
63381 * @memberOf LazyWrapper
63382 * @returns {Object} Returns the cloned `LazyWrapper` object.
63383 */
63384 function lazyClone() {
63385 var result = new LazyWrapper(this.__wrapped__);
63386 result.__actions__ = copyArray(this.__actions__);
63387 result.__dir__ = this.__dir__;
63388 result.__filtered__ = this.__filtered__;
63389 result.__iteratees__ = copyArray(this.__iteratees__);
63390 result.__takeCount__ = this.__takeCount__;
63391 result.__views__ = copyArray(this.__views__);
63392 return result;
63393 }
63394
63395 /**
63396 * Reverses the direction of lazy iteration.
63397 *
63398 * @private
63399 * @name reverse
63400 * @memberOf LazyWrapper
63401 * @returns {Object} Returns the new reversed `LazyWrapper` object.
63402 */
63403 function lazyReverse() {
63404 if (this.__filtered__) {
63405 var result = new LazyWrapper(this);
63406 result.__dir__ = -1;
63407 result.__filtered__ = true;
63408 } else {
63409 result = this.clone();
63410 result.__dir__ *= -1;
63411 }
63412 return result;
63413 }
63414
63415 /**
63416 * Extracts the unwrapped value from its lazy wrapper.
63417 *
63418 * @private
63419 * @name value
63420 * @memberOf LazyWrapper
63421 * @returns {*} Returns the unwrapped value.
63422 */
63423 function lazyValue() {
63424 var array = this.__wrapped__.value(),
63425 dir = this.__dir__,
63426 isArr = isArray(array),
63427 isRight = dir < 0,
63428 arrLength = isArr ? array.length : 0,
63429 view = getView(0, arrLength, this.__views__),
63430 start = view.start,
63431 end = view.end,
63432 length = end - start,
63433 index = isRight ? end : (start - 1),
63434 iteratees = this.__iteratees__,
63435 iterLength = iteratees.length,
63436 resIndex = 0,
63437 takeCount = nativeMin(length, this.__takeCount__);
63438
63439 if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
63440 return baseWrapperValue(array, this.__actions__);
63441 }
63442 var result = [];
63443
63444 outer:
63445 while (length-- && resIndex < takeCount) {
63446 index += dir;
63447
63448 var iterIndex = -1,
63449 value = array[index];
63450
63451 while (++iterIndex < iterLength) {
63452 var data = iteratees[iterIndex],
63453 iteratee = data.iteratee,
63454 type = data.type,
63455 computed = iteratee(value);
63456
63457 if (type == LAZY_MAP_FLAG) {
63458 value = computed;
63459 } else if (!computed) {
63460 if (type == LAZY_FILTER_FLAG) {
63461 continue outer;
63462 } else {
63463 break outer;
63464 }
63465 }
63466 }
63467 result[resIndex++] = value;
63468 }
63469 return result;
63470 }
63471
63472 // Ensure `LazyWrapper` is an instance of `baseLodash`.
63473 LazyWrapper.prototype = baseCreate(baseLodash.prototype);
63474 LazyWrapper.prototype.constructor = LazyWrapper;
63475
63476 /*------------------------------------------------------------------------*/
63477
63478 /**
63479 * Creates a hash object.
63480 *
63481 * @private
63482 * @constructor
63483 * @param {Array} [entries] The key-value pairs to cache.
63484 */
63485 function Hash(entries) {
63486 var index = -1,
63487 length = entries == null ? 0 : entries.length;
63488
63489 this.clear();
63490 while (++index < length) {
63491 var entry = entries[index];
63492 this.set(entry[0], entry[1]);
63493 }
63494 }
63495
63496 /**
63497 * Removes all key-value entries from the hash.
63498 *
63499 * @private
63500 * @name clear
63501 * @memberOf Hash
63502 */
63503 function hashClear() {
63504 this.__data__ = nativeCreate ? nativeCreate(null) : {};
63505 this.size = 0;
63506 }
63507
63508 /**
63509 * Removes `key` and its value from the hash.
63510 *
63511 * @private
63512 * @name delete
63513 * @memberOf Hash
63514 * @param {Object} hash The hash to modify.
63515 * @param {string} key The key of the value to remove.
63516 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63517 */
63518 function hashDelete(key) {
63519 var result = this.has(key) && delete this.__data__[key];
63520 this.size -= result ? 1 : 0;
63521 return result;
63522 }
63523
63524 /**
63525 * Gets the hash value for `key`.
63526 *
63527 * @private
63528 * @name get
63529 * @memberOf Hash
63530 * @param {string} key The key of the value to get.
63531 * @returns {*} Returns the entry value.
63532 */
63533 function hashGet(key) {
63534 var data = this.__data__;
63535 if (nativeCreate) {
63536 var result = data[key];
63537 return result === HASH_UNDEFINED ? undefined : result;
63538 }
63539 return hasOwnProperty.call(data, key) ? data[key] : undefined;
63540 }
63541
63542 /**
63543 * Checks if a hash value for `key` exists.
63544 *
63545 * @private
63546 * @name has
63547 * @memberOf Hash
63548 * @param {string} key The key of the entry to check.
63549 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63550 */
63551 function hashHas(key) {
63552 var data = this.__data__;
63553 return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
63554 }
63555
63556 /**
63557 * Sets the hash `key` to `value`.
63558 *
63559 * @private
63560 * @name set
63561 * @memberOf Hash
63562 * @param {string} key The key of the value to set.
63563 * @param {*} value The value to set.
63564 * @returns {Object} Returns the hash instance.
63565 */
63566 function hashSet(key, value) {
63567 var data = this.__data__;
63568 this.size += this.has(key) ? 0 : 1;
63569 data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
63570 return this;
63571 }
63572
63573 // Add methods to `Hash`.
63574 Hash.prototype.clear = hashClear;
63575 Hash.prototype['delete'] = hashDelete;
63576 Hash.prototype.get = hashGet;
63577 Hash.prototype.has = hashHas;
63578 Hash.prototype.set = hashSet;
63579
63580 /*------------------------------------------------------------------------*/
63581
63582 /**
63583 * Creates an list cache object.
63584 *
63585 * @private
63586 * @constructor
63587 * @param {Array} [entries] The key-value pairs to cache.
63588 */
63589 function ListCache(entries) {
63590 var index = -1,
63591 length = entries == null ? 0 : entries.length;
63592
63593 this.clear();
63594 while (++index < length) {
63595 var entry = entries[index];
63596 this.set(entry[0], entry[1]);
63597 }
63598 }
63599
63600 /**
63601 * Removes all key-value entries from the list cache.
63602 *
63603 * @private
63604 * @name clear
63605 * @memberOf ListCache
63606 */
63607 function listCacheClear() {
63608 this.__data__ = [];
63609 this.size = 0;
63610 }
63611
63612 /**
63613 * Removes `key` and its value from the list cache.
63614 *
63615 * @private
63616 * @name delete
63617 * @memberOf ListCache
63618 * @param {string} key The key of the value to remove.
63619 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63620 */
63621 function listCacheDelete(key) {
63622 var data = this.__data__,
63623 index = assocIndexOf(data, key);
63624
63625 if (index < 0) {
63626 return false;
63627 }
63628 var lastIndex = data.length - 1;
63629 if (index == lastIndex) {
63630 data.pop();
63631 } else {
63632 splice.call(data, index, 1);
63633 }
63634 --this.size;
63635 return true;
63636 }
63637
63638 /**
63639 * Gets the list cache value for `key`.
63640 *
63641 * @private
63642 * @name get
63643 * @memberOf ListCache
63644 * @param {string} key The key of the value to get.
63645 * @returns {*} Returns the entry value.
63646 */
63647 function listCacheGet(key) {
63648 var data = this.__data__,
63649 index = assocIndexOf(data, key);
63650
63651 return index < 0 ? undefined : data[index][1];
63652 }
63653
63654 /**
63655 * Checks if a list cache value for `key` exists.
63656 *
63657 * @private
63658 * @name has
63659 * @memberOf ListCache
63660 * @param {string} key The key of the entry to check.
63661 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63662 */
63663 function listCacheHas(key) {
63664 return assocIndexOf(this.__data__, key) > -1;
63665 }
63666
63667 /**
63668 * Sets the list cache `key` to `value`.
63669 *
63670 * @private
63671 * @name set
63672 * @memberOf ListCache
63673 * @param {string} key The key of the value to set.
63674 * @param {*} value The value to set.
63675 * @returns {Object} Returns the list cache instance.
63676 */
63677 function listCacheSet(key, value) {
63678 var data = this.__data__,
63679 index = assocIndexOf(data, key);
63680
63681 if (index < 0) {
63682 ++this.size;
63683 data.push([key, value]);
63684 } else {
63685 data[index][1] = value;
63686 }
63687 return this;
63688 }
63689
63690 // Add methods to `ListCache`.
63691 ListCache.prototype.clear = listCacheClear;
63692 ListCache.prototype['delete'] = listCacheDelete;
63693 ListCache.prototype.get = listCacheGet;
63694 ListCache.prototype.has = listCacheHas;
63695 ListCache.prototype.set = listCacheSet;
63696
63697 /*------------------------------------------------------------------------*/
63698
63699 /**
63700 * Creates a map cache object to store key-value pairs.
63701 *
63702 * @private
63703 * @constructor
63704 * @param {Array} [entries] The key-value pairs to cache.
63705 */
63706 function MapCache(entries) {
63707 var index = -1,
63708 length = entries == null ? 0 : entries.length;
63709
63710 this.clear();
63711 while (++index < length) {
63712 var entry = entries[index];
63713 this.set(entry[0], entry[1]);
63714 }
63715 }
63716
63717 /**
63718 * Removes all key-value entries from the map.
63719 *
63720 * @private
63721 * @name clear
63722 * @memberOf MapCache
63723 */
63724 function mapCacheClear() {
63725 this.size = 0;
63726 this.__data__ = {
63727 'hash': new Hash,
63728 'map': new (Map || ListCache),
63729 'string': new Hash
63730 };
63731 }
63732
63733 /**
63734 * Removes `key` and its value from the map.
63735 *
63736 * @private
63737 * @name delete
63738 * @memberOf MapCache
63739 * @param {string} key The key of the value to remove.
63740 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63741 */
63742 function mapCacheDelete(key) {
63743 var result = getMapData(this, key)['delete'](key);
63744 this.size -= result ? 1 : 0;
63745 return result;
63746 }
63747
63748 /**
63749 * Gets the map value for `key`.
63750 *
63751 * @private
63752 * @name get
63753 * @memberOf MapCache
63754 * @param {string} key The key of the value to get.
63755 * @returns {*} Returns the entry value.
63756 */
63757 function mapCacheGet(key) {
63758 return getMapData(this, key).get(key);
63759 }
63760
63761 /**
63762 * Checks if a map value for `key` exists.
63763 *
63764 * @private
63765 * @name has
63766 * @memberOf MapCache
63767 * @param {string} key The key of the entry to check.
63768 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63769 */
63770 function mapCacheHas(key) {
63771 return getMapData(this, key).has(key);
63772 }
63773
63774 /**
63775 * Sets the map `key` to `value`.
63776 *
63777 * @private
63778 * @name set
63779 * @memberOf MapCache
63780 * @param {string} key The key of the value to set.
63781 * @param {*} value The value to set.
63782 * @returns {Object} Returns the map cache instance.
63783 */
63784 function mapCacheSet(key, value) {
63785 var data = getMapData(this, key),
63786 size = data.size;
63787
63788 data.set(key, value);
63789 this.size += data.size == size ? 0 : 1;
63790 return this;
63791 }
63792
63793 // Add methods to `MapCache`.
63794 MapCache.prototype.clear = mapCacheClear;
63795 MapCache.prototype['delete'] = mapCacheDelete;
63796 MapCache.prototype.get = mapCacheGet;
63797 MapCache.prototype.has = mapCacheHas;
63798 MapCache.prototype.set = mapCacheSet;
63799
63800 /*------------------------------------------------------------------------*/
63801
63802 /**
63803 *
63804 * Creates an array cache object to store unique values.
63805 *
63806 * @private
63807 * @constructor
63808 * @param {Array} [values] The values to cache.
63809 */
63810 function SetCache(values) {
63811 var index = -1,
63812 length = values == null ? 0 : values.length;
63813
63814 this.__data__ = new MapCache;
63815 while (++index < length) {
63816 this.add(values[index]);
63817 }
63818 }
63819
63820 /**
63821 * Adds `value` to the array cache.
63822 *
63823 * @private
63824 * @name add
63825 * @memberOf SetCache
63826 * @alias push
63827 * @param {*} value The value to cache.
63828 * @returns {Object} Returns the cache instance.
63829 */
63830 function setCacheAdd(value) {
63831 this.__data__.set(value, HASH_UNDEFINED);
63832 return this;
63833 }
63834
63835 /**
63836 * Checks if `value` is in the array cache.
63837 *
63838 * @private
63839 * @name has
63840 * @memberOf SetCache
63841 * @param {*} value The value to search for.
63842 * @returns {number} Returns `true` if `value` is found, else `false`.
63843 */
63844 function setCacheHas(value) {
63845 return this.__data__.has(value);
63846 }
63847
63848 // Add methods to `SetCache`.
63849 SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
63850 SetCache.prototype.has = setCacheHas;
63851
63852 /*------------------------------------------------------------------------*/
63853
63854 /**
63855 * Creates a stack cache object to store key-value pairs.
63856 *
63857 * @private
63858 * @constructor
63859 * @param {Array} [entries] The key-value pairs to cache.
63860 */
63861 function Stack(entries) {
63862 var data = this.__data__ = new ListCache(entries);
63863 this.size = data.size;
63864 }
63865
63866 /**
63867 * Removes all key-value entries from the stack.
63868 *
63869 * @private
63870 * @name clear
63871 * @memberOf Stack
63872 */
63873 function stackClear() {
63874 this.__data__ = new ListCache;
63875 this.size = 0;
63876 }
63877
63878 /**
63879 * Removes `key` and its value from the stack.
63880 *
63881 * @private
63882 * @name delete
63883 * @memberOf Stack
63884 * @param {string} key The key of the value to remove.
63885 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
63886 */
63887 function stackDelete(key) {
63888 var data = this.__data__,
63889 result = data['delete'](key);
63890
63891 this.size = data.size;
63892 return result;
63893 }
63894
63895 /**
63896 * Gets the stack value for `key`.
63897 *
63898 * @private
63899 * @name get
63900 * @memberOf Stack
63901 * @param {string} key The key of the value to get.
63902 * @returns {*} Returns the entry value.
63903 */
63904 function stackGet(key) {
63905 return this.__data__.get(key);
63906 }
63907
63908 /**
63909 * Checks if a stack value for `key` exists.
63910 *
63911 * @private
63912 * @name has
63913 * @memberOf Stack
63914 * @param {string} key The key of the entry to check.
63915 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
63916 */
63917 function stackHas(key) {
63918 return this.__data__.has(key);
63919 }
63920
63921 /**
63922 * Sets the stack `key` to `value`.
63923 *
63924 * @private
63925 * @name set
63926 * @memberOf Stack
63927 * @param {string} key The key of the value to set.
63928 * @param {*} value The value to set.
63929 * @returns {Object} Returns the stack cache instance.
63930 */
63931 function stackSet(key, value) {
63932 var data = this.__data__;
63933 if (data instanceof ListCache) {
63934 var pairs = data.__data__;
63935 if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
63936 pairs.push([key, value]);
63937 this.size = ++data.size;
63938 return this;
63939 }
63940 data = this.__data__ = new MapCache(pairs);
63941 }
63942 data.set(key, value);
63943 this.size = data.size;
63944 return this;
63945 }
63946
63947 // Add methods to `Stack`.
63948 Stack.prototype.clear = stackClear;
63949 Stack.prototype['delete'] = stackDelete;
63950 Stack.prototype.get = stackGet;
63951 Stack.prototype.has = stackHas;
63952 Stack.prototype.set = stackSet;
63953
63954 /*------------------------------------------------------------------------*/
63955
63956 /**
63957 * Creates an array of the enumerable property names of the array-like `value`.
63958 *
63959 * @private
63960 * @param {*} value The value to query.
63961 * @param {boolean} inherited Specify returning inherited property names.
63962 * @returns {Array} Returns the array of property names.
63963 */
63964 function arrayLikeKeys(value, inherited) {
63965 var isArr = isArray(value),
63966 isArg = !isArr && isArguments(value),
63967 isBuff = !isArr && !isArg && isBuffer(value),
63968 isType = !isArr && !isArg && !isBuff && isTypedArray(value),
63969 skipIndexes = isArr || isArg || isBuff || isType,
63970 result = skipIndexes ? baseTimes(value.length, String) : [],
63971 length = result.length;
63972
63973 for (var key in value) {
63974 if ((inherited || hasOwnProperty.call(value, key)) &&
63975 !(skipIndexes && (
63976 // Safari 9 has enumerable `arguments.length` in strict mode.
63977 key == 'length' ||
63978 // Node.js 0.10 has enumerable non-index properties on buffers.
63979 (isBuff && (key == 'offset' || key == 'parent')) ||
63980 // PhantomJS 2 has enumerable non-index properties on typed arrays.
63981 (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
63982 // Skip index properties.
63983 isIndex(key, length)
63984 ))) {
63985 result.push(key);
63986 }
63987 }
63988 return result;
63989 }
63990
63991 /**
63992 * A specialized version of `_.sample` for arrays.
63993 *
63994 * @private
63995 * @param {Array} array The array to sample.
63996 * @returns {*} Returns the random element.
63997 */
63998 function arraySample(array) {
63999 var length = array.length;
64000 return length ? array[baseRandom(0, length - 1)] : undefined;
64001 }
64002
64003 /**
64004 * A specialized version of `_.sampleSize` for arrays.
64005 *
64006 * @private
64007 * @param {Array} array The array to sample.
64008 * @param {number} n The number of elements to sample.
64009 * @returns {Array} Returns the random elements.
64010 */
64011 function arraySampleSize(array, n) {
64012 return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
64013 }
64014
64015 /**
64016 * A specialized version of `_.shuffle` for arrays.
64017 *
64018 * @private
64019 * @param {Array} array The array to shuffle.
64020 * @returns {Array} Returns the new shuffled array.
64021 */
64022 function arrayShuffle(array) {
64023 return shuffleSelf(copyArray(array));
64024 }
64025
64026 /**
64027 * This function is like `assignValue` except that it doesn't assign
64028 * `undefined` values.
64029 *
64030 * @private
64031 * @param {Object} object The object to modify.
64032 * @param {string} key The key of the property to assign.
64033 * @param {*} value The value to assign.
64034 */
64035 function assignMergeValue(object, key, value) {
64036 if ((value !== undefined && !eq(object[key], value)) ||
64037 (value === undefined && !(key in object))) {
64038 baseAssignValue(object, key, value);
64039 }
64040 }
64041
64042 /**
64043 * Assigns `value` to `key` of `object` if the existing value is not equivalent
64044 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
64045 * for equality comparisons.
64046 *
64047 * @private
64048 * @param {Object} object The object to modify.
64049 * @param {string} key The key of the property to assign.
64050 * @param {*} value The value to assign.
64051 */
64052 function assignValue(object, key, value) {
64053 var objValue = object[key];
64054 if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
64055 (value === undefined && !(key in object))) {
64056 baseAssignValue(object, key, value);
64057 }
64058 }
64059
64060 /**
64061 * Gets the index at which the `key` is found in `array` of key-value pairs.
64062 *
64063 * @private
64064 * @param {Array} array The array to inspect.
64065 * @param {*} key The key to search for.
64066 * @returns {number} Returns the index of the matched value, else `-1`.
64067 */
64068 function assocIndexOf(array, key) {
64069 var length = array.length;
64070 while (length--) {
64071 if (eq(array[length][0], key)) {
64072 return length;
64073 }
64074 }
64075 return -1;
64076 }
64077
64078 /**
64079 * Aggregates elements of `collection` on `accumulator` with keys transformed
64080 * by `iteratee` and values set by `setter`.
64081 *
64082 * @private
64083 * @param {Array|Object} collection The collection to iterate over.
64084 * @param {Function} setter The function to set `accumulator` values.
64085 * @param {Function} iteratee The iteratee to transform keys.
64086 * @param {Object} accumulator The initial aggregated object.
64087 * @returns {Function} Returns `accumulator`.
64088 */
64089 function baseAggregator(collection, setter, iteratee, accumulator) {
64090 baseEach(collection, function(value, key, collection) {
64091 setter(accumulator, value, iteratee(value), collection);
64092 });
64093 return accumulator;
64094 }
64095
64096 /**
64097 * The base implementation of `_.assign` without support for multiple sources
64098 * or `customizer` functions.
64099 *
64100 * @private
64101 * @param {Object} object The destination object.
64102 * @param {Object} source The source object.
64103 * @returns {Object} Returns `object`.
64104 */
64105 function baseAssign(object, source) {
64106 return object && copyObject(source, keys(source), object);
64107 }
64108
64109 /**
64110 * The base implementation of `_.assignIn` without support for multiple sources
64111 * or `customizer` functions.
64112 *
64113 * @private
64114 * @param {Object} object The destination object.
64115 * @param {Object} source The source object.
64116 * @returns {Object} Returns `object`.
64117 */
64118 function baseAssignIn(object, source) {
64119 return object && copyObject(source, keysIn(source), object);
64120 }
64121
64122 /**
64123 * The base implementation of `assignValue` and `assignMergeValue` without
64124 * value checks.
64125 *
64126 * @private
64127 * @param {Object} object The object to modify.
64128 * @param {string} key The key of the property to assign.
64129 * @param {*} value The value to assign.
64130 */
64131 function baseAssignValue(object, key, value) {
64132 if (key == '__proto__' && defineProperty) {
64133 defineProperty(object, key, {
64134 'configurable': true,
64135 'enumerable': true,
64136 'value': value,
64137 'writable': true
64138 });
64139 } else {
64140 object[key] = value;
64141 }
64142 }
64143
64144 /**
64145 * The base implementation of `_.at` without support for individual paths.
64146 *
64147 * @private
64148 * @param {Object} object The object to iterate over.
64149 * @param {string[]} paths The property paths to pick.
64150 * @returns {Array} Returns the picked elements.
64151 */
64152 function baseAt(object, paths) {
64153 var index = -1,
64154 length = paths.length,
64155 result = Array(length),
64156 skip = object == null;
64157
64158 while (++index < length) {
64159 result[index] = skip ? undefined : get(object, paths[index]);
64160 }
64161 return result;
64162 }
64163
64164 /**
64165 * The base implementation of `_.clamp` which doesn't coerce arguments.
64166 *
64167 * @private
64168 * @param {number} number The number to clamp.
64169 * @param {number} [lower] The lower bound.
64170 * @param {number} upper The upper bound.
64171 * @returns {number} Returns the clamped number.
64172 */
64173 function baseClamp(number, lower, upper) {
64174 if (number === number) {
64175 if (upper !== undefined) {
64176 number = number <= upper ? number : upper;
64177 }
64178 if (lower !== undefined) {
64179 number = number >= lower ? number : lower;
64180 }
64181 }
64182 return number;
64183 }
64184
64185 /**
64186 * The base implementation of `_.clone` and `_.cloneDeep` which tracks
64187 * traversed objects.
64188 *
64189 * @private
64190 * @param {*} value The value to clone.
64191 * @param {boolean} bitmask The bitmask flags.
64192 * 1 - Deep clone
64193 * 2 - Flatten inherited properties
64194 * 4 - Clone symbols
64195 * @param {Function} [customizer] The function to customize cloning.
64196 * @param {string} [key] The key of `value`.
64197 * @param {Object} [object] The parent object of `value`.
64198 * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
64199 * @returns {*} Returns the cloned value.
64200 */
64201 function baseClone(value, bitmask, customizer, key, object, stack) {
64202 var result,
64203 isDeep = bitmask & CLONE_DEEP_FLAG,
64204 isFlat = bitmask & CLONE_FLAT_FLAG,
64205 isFull = bitmask & CLONE_SYMBOLS_FLAG;
64206
64207 if (customizer) {
64208 result = object ? customizer(value, key, object, stack) : customizer(value);
64209 }
64210 if (result !== undefined) {
64211 return result;
64212 }
64213 if (!isObject(value)) {
64214 return value;
64215 }
64216 var isArr = isArray(value);
64217 if (isArr) {
64218 result = initCloneArray(value);
64219 if (!isDeep) {
64220 return copyArray(value, result);
64221 }
64222 } else {
64223 var tag = getTag(value),
64224 isFunc = tag == funcTag || tag == genTag;
64225
64226 if (isBuffer(value)) {
64227 return cloneBuffer(value, isDeep);
64228 }
64229 if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
64230 result = (isFlat || isFunc) ? {} : initCloneObject(value);
64231 if (!isDeep) {
64232 return isFlat
64233 ? copySymbolsIn(value, baseAssignIn(result, value))
64234 : copySymbols(value, baseAssign(result, value));
64235 }
64236 } else {
64237 if (!cloneableTags[tag]) {
64238 return object ? value : {};
64239 }
64240 result = initCloneByTag(value, tag, isDeep);
64241 }
64242 }
64243 // Check for circular references and return its corresponding clone.
64244 stack || (stack = new Stack);
64245 var stacked = stack.get(value);
64246 if (stacked) {
64247 return stacked;
64248 }
64249 stack.set(value, result);
64250
64251 if (isSet(value)) {
64252 value.forEach(function(subValue) {
64253 result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
64254 });
64255 } else if (isMap(value)) {
64256 value.forEach(function(subValue, key) {
64257 result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
64258 });
64259 }
64260
64261 var keysFunc = isFull
64262 ? (isFlat ? getAllKeysIn : getAllKeys)
64263 : (isFlat ? keysIn : keys);
64264
64265 var props = isArr ? undefined : keysFunc(value);
64266 arrayEach(props || value, function(subValue, key) {
64267 if (props) {
64268 key = subValue;
64269 subValue = value[key];
64270 }
64271 // Recursively populate clone (susceptible to call stack limits).
64272 assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
64273 });
64274 return result;
64275 }
64276
64277 /**
64278 * The base implementation of `_.conforms` which doesn't clone `source`.
64279 *
64280 * @private
64281 * @param {Object} source The object of property predicates to conform to.
64282 * @returns {Function} Returns the new spec function.
64283 */
64284 function baseConforms(source) {
64285 var props = keys(source);
64286 return function(object) {
64287 return baseConformsTo(object, source, props);
64288 };
64289 }
64290
64291 /**
64292 * The base implementation of `_.conformsTo` which accepts `props` to check.
64293 *
64294 * @private
64295 * @param {Object} object The object to inspect.
64296 * @param {Object} source The object of property predicates to conform to.
64297 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
64298 */
64299 function baseConformsTo(object, source, props) {
64300 var length = props.length;
64301 if (object == null) {
64302 return !length;
64303 }
64304 object = Object(object);
64305 while (length--) {
64306 var key = props[length],
64307 predicate = source[key],
64308 value = object[key];
64309
64310 if ((value === undefined && !(key in object)) || !predicate(value)) {
64311 return false;
64312 }
64313 }
64314 return true;
64315 }
64316
64317 /**
64318 * The base implementation of `_.delay` and `_.defer` which accepts `args`
64319 * to provide to `func`.
64320 *
64321 * @private
64322 * @param {Function} func The function to delay.
64323 * @param {number} wait The number of milliseconds to delay invocation.
64324 * @param {Array} args The arguments to provide to `func`.
64325 * @returns {number|Object} Returns the timer id or timeout object.
64326 */
64327 function baseDelay(func, wait, args) {
64328 if (typeof func != 'function') {
64329 throw new TypeError(FUNC_ERROR_TEXT);
64330 }
64331 return setTimeout(function() { func.apply(undefined, args); }, wait);
64332 }
64333
64334 /**
64335 * The base implementation of methods like `_.difference` without support
64336 * for excluding multiple arrays or iteratee shorthands.
64337 *
64338 * @private
64339 * @param {Array} array The array to inspect.
64340 * @param {Array} values The values to exclude.
64341 * @param {Function} [iteratee] The iteratee invoked per element.
64342 * @param {Function} [comparator] The comparator invoked per element.
64343 * @returns {Array} Returns the new array of filtered values.
64344 */
64345 function baseDifference(array, values, iteratee, comparator) {
64346 var index = -1,
64347 includes = arrayIncludes,
64348 isCommon = true,
64349 length = array.length,
64350 result = [],
64351 valuesLength = values.length;
64352
64353 if (!length) {
64354 return result;
64355 }
64356 if (iteratee) {
64357 values = arrayMap(values, baseUnary(iteratee));
64358 }
64359 if (comparator) {
64360 includes = arrayIncludesWith;
64361 isCommon = false;
64362 }
64363 else if (values.length >= LARGE_ARRAY_SIZE) {
64364 includes = cacheHas;
64365 isCommon = false;
64366 values = new SetCache(values);
64367 }
64368 outer:
64369 while (++index < length) {
64370 var value = array[index],
64371 computed = iteratee == null ? value : iteratee(value);
64372
64373 value = (comparator || value !== 0) ? value : 0;
64374 if (isCommon && computed === computed) {
64375 var valuesIndex = valuesLength;
64376 while (valuesIndex--) {
64377 if (values[valuesIndex] === computed) {
64378 continue outer;
64379 }
64380 }
64381 result.push(value);
64382 }
64383 else if (!includes(values, computed, comparator)) {
64384 result.push(value);
64385 }
64386 }
64387 return result;
64388 }
64389
64390 /**
64391 * The base implementation of `_.forEach` without support for iteratee shorthands.
64392 *
64393 * @private
64394 * @param {Array|Object} collection The collection to iterate over.
64395 * @param {Function} iteratee The function invoked per iteration.
64396 * @returns {Array|Object} Returns `collection`.
64397 */
64398 var baseEach = createBaseEach(baseForOwn);
64399
64400 /**
64401 * The base implementation of `_.forEachRight` without support for iteratee shorthands.
64402 *
64403 * @private
64404 * @param {Array|Object} collection The collection to iterate over.
64405 * @param {Function} iteratee The function invoked per iteration.
64406 * @returns {Array|Object} Returns `collection`.
64407 */
64408 var baseEachRight = createBaseEach(baseForOwnRight, true);
64409
64410 /**
64411 * The base implementation of `_.every` without support for iteratee shorthands.
64412 *
64413 * @private
64414 * @param {Array|Object} collection The collection to iterate over.
64415 * @param {Function} predicate The function invoked per iteration.
64416 * @returns {boolean} Returns `true` if all elements pass the predicate check,
64417 * else `false`
64418 */
64419 function baseEvery(collection, predicate) {
64420 var result = true;
64421 baseEach(collection, function(value, index, collection) {
64422 result = !!predicate(value, index, collection);
64423 return result;
64424 });
64425 return result;
64426 }
64427
64428 /**
64429 * The base implementation of methods like `_.max` and `_.min` which accepts a
64430 * `comparator` to determine the extremum value.
64431 *
64432 * @private
64433 * @param {Array} array The array to iterate over.
64434 * @param {Function} iteratee The iteratee invoked per iteration.
64435 * @param {Function} comparator The comparator used to compare values.
64436 * @returns {*} Returns the extremum value.
64437 */
64438 function baseExtremum(array, iteratee, comparator) {
64439 var index = -1,
64440 length = array.length;
64441
64442 while (++index < length) {
64443 var value = array[index],
64444 current = iteratee(value);
64445
64446 if (current != null && (computed === undefined
64447 ? (current === current && !isSymbol(current))
64448 : comparator(current, computed)
64449 )) {
64450 var computed = current,
64451 result = value;
64452 }
64453 }
64454 return result;
64455 }
64456
64457 /**
64458 * The base implementation of `_.fill` without an iteratee call guard.
64459 *
64460 * @private
64461 * @param {Array} array The array to fill.
64462 * @param {*} value The value to fill `array` with.
64463 * @param {number} [start=0] The start position.
64464 * @param {number} [end=array.length] The end position.
64465 * @returns {Array} Returns `array`.
64466 */
64467 function baseFill(array, value, start, end) {
64468 var length = array.length;
64469
64470 start = toInteger(start);
64471 if (start < 0) {
64472 start = -start > length ? 0 : (length + start);
64473 }
64474 end = (end === undefined || end > length) ? length : toInteger(end);
64475 if (end < 0) {
64476 end += length;
64477 }
64478 end = start > end ? 0 : toLength(end);
64479 while (start < end) {
64480 array[start++] = value;
64481 }
64482 return array;
64483 }
64484
64485 /**
64486 * The base implementation of `_.filter` without support for iteratee shorthands.
64487 *
64488 * @private
64489 * @param {Array|Object} collection The collection to iterate over.
64490 * @param {Function} predicate The function invoked per iteration.
64491 * @returns {Array} Returns the new filtered array.
64492 */
64493 function baseFilter(collection, predicate) {
64494 var result = [];
64495 baseEach(collection, function(value, index, collection) {
64496 if (predicate(value, index, collection)) {
64497 result.push(value);
64498 }
64499 });
64500 return result;
64501 }
64502
64503 /**
64504 * The base implementation of `_.flatten` with support for restricting flattening.
64505 *
64506 * @private
64507 * @param {Array} array The array to flatten.
64508 * @param {number} depth The maximum recursion depth.
64509 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
64510 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
64511 * @param {Array} [result=[]] The initial result value.
64512 * @returns {Array} Returns the new flattened array.
64513 */
64514 function baseFlatten(array, depth, predicate, isStrict, result) {
64515 var index = -1,
64516 length = array.length;
64517
64518 predicate || (predicate = isFlattenable);
64519 result || (result = []);
64520
64521 while (++index < length) {
64522 var value = array[index];
64523 if (depth > 0 && predicate(value)) {
64524 if (depth > 1) {
64525 // Recursively flatten arrays (susceptible to call stack limits).
64526 baseFlatten(value, depth - 1, predicate, isStrict, result);
64527 } else {
64528 arrayPush(result, value);
64529 }
64530 } else if (!isStrict) {
64531 result[result.length] = value;
64532 }
64533 }
64534 return result;
64535 }
64536
64537 /**
64538 * The base implementation of `baseForOwn` which iterates over `object`
64539 * properties returned by `keysFunc` and invokes `iteratee` for each property.
64540 * Iteratee functions may exit iteration early by explicitly returning `false`.
64541 *
64542 * @private
64543 * @param {Object} object The object to iterate over.
64544 * @param {Function} iteratee The function invoked per iteration.
64545 * @param {Function} keysFunc The function to get the keys of `object`.
64546 * @returns {Object} Returns `object`.
64547 */
64548 var baseFor = createBaseFor();
64549
64550 /**
64551 * This function is like `baseFor` except that it iterates over properties
64552 * in the opposite order.
64553 *
64554 * @private
64555 * @param {Object} object The object to iterate over.
64556 * @param {Function} iteratee The function invoked per iteration.
64557 * @param {Function} keysFunc The function to get the keys of `object`.
64558 * @returns {Object} Returns `object`.
64559 */
64560 var baseForRight = createBaseFor(true);
64561
64562 /**
64563 * The base implementation of `_.forOwn` without support for iteratee shorthands.
64564 *
64565 * @private
64566 * @param {Object} object The object to iterate over.
64567 * @param {Function} iteratee The function invoked per iteration.
64568 * @returns {Object} Returns `object`.
64569 */
64570 function baseForOwn(object, iteratee) {
64571 return object && baseFor(object, iteratee, keys);
64572 }
64573
64574 /**
64575 * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
64576 *
64577 * @private
64578 * @param {Object} object The object to iterate over.
64579 * @param {Function} iteratee The function invoked per iteration.
64580 * @returns {Object} Returns `object`.
64581 */
64582 function baseForOwnRight(object, iteratee) {
64583 return object && baseForRight(object, iteratee, keys);
64584 }
64585
64586 /**
64587 * The base implementation of `_.functions` which creates an array of
64588 * `object` function property names filtered from `props`.
64589 *
64590 * @private
64591 * @param {Object} object The object to inspect.
64592 * @param {Array} props The property names to filter.
64593 * @returns {Array} Returns the function names.
64594 */
64595 function baseFunctions(object, props) {
64596 return arrayFilter(props, function(key) {
64597 return isFunction(object[key]);
64598 });
64599 }
64600
64601 /**
64602 * The base implementation of `_.get` without support for default values.
64603 *
64604 * @private
64605 * @param {Object} object The object to query.
64606 * @param {Array|string} path The path of the property to get.
64607 * @returns {*} Returns the resolved value.
64608 */
64609 function baseGet(object, path) {
64610 path = castPath(path, object);
64611
64612 var index = 0,
64613 length = path.length;
64614
64615 while (object != null && index < length) {
64616 object = object[toKey(path[index++])];
64617 }
64618 return (index && index == length) ? object : undefined;
64619 }
64620
64621 /**
64622 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
64623 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
64624 * symbols of `object`.
64625 *
64626 * @private
64627 * @param {Object} object The object to query.
64628 * @param {Function} keysFunc The function to get the keys of `object`.
64629 * @param {Function} symbolsFunc The function to get the symbols of `object`.
64630 * @returns {Array} Returns the array of property names and symbols.
64631 */
64632 function baseGetAllKeys(object, keysFunc, symbolsFunc) {
64633 var result = keysFunc(object);
64634 return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
64635 }
64636
64637 /**
64638 * The base implementation of `getTag` without fallbacks for buggy environments.
64639 *
64640 * @private
64641 * @param {*} value The value to query.
64642 * @returns {string} Returns the `toStringTag`.
64643 */
64644 function baseGetTag(value) {
64645 if (value == null) {
64646 return value === undefined ? undefinedTag : nullTag;
64647 }
64648 return (symToStringTag && symToStringTag in Object(value))
64649 ? getRawTag(value)
64650 : objectToString(value);
64651 }
64652
64653 /**
64654 * The base implementation of `_.gt` which doesn't coerce arguments.
64655 *
64656 * @private
64657 * @param {*} value The value to compare.
64658 * @param {*} other The other value to compare.
64659 * @returns {boolean} Returns `true` if `value` is greater than `other`,
64660 * else `false`.
64661 */
64662 function baseGt(value, other) {
64663 return value > other;
64664 }
64665
64666 /**
64667 * The base implementation of `_.has` without support for deep paths.
64668 *
64669 * @private
64670 * @param {Object} [object] The object to query.
64671 * @param {Array|string} key The key to check.
64672 * @returns {boolean} Returns `true` if `key` exists, else `false`.
64673 */
64674 function baseHas(object, key) {
64675 return object != null && hasOwnProperty.call(object, key);
64676 }
64677
64678 /**
64679 * The base implementation of `_.hasIn` without support for deep paths.
64680 *
64681 * @private
64682 * @param {Object} [object] The object to query.
64683 * @param {Array|string} key The key to check.
64684 * @returns {boolean} Returns `true` if `key` exists, else `false`.
64685 */
64686 function baseHasIn(object, key) {
64687 return object != null && key in Object(object);
64688 }
64689
64690 /**
64691 * The base implementation of `_.inRange` which doesn't coerce arguments.
64692 *
64693 * @private
64694 * @param {number} number The number to check.
64695 * @param {number} start The start of the range.
64696 * @param {number} end The end of the range.
64697 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
64698 */
64699 function baseInRange(number, start, end) {
64700 return number >= nativeMin(start, end) && number < nativeMax(start, end);
64701 }
64702
64703 /**
64704 * The base implementation of methods like `_.intersection`, without support
64705 * for iteratee shorthands, that accepts an array of arrays to inspect.
64706 *
64707 * @private
64708 * @param {Array} arrays The arrays to inspect.
64709 * @param {Function} [iteratee] The iteratee invoked per element.
64710 * @param {Function} [comparator] The comparator invoked per element.
64711 * @returns {Array} Returns the new array of shared values.
64712 */
64713 function baseIntersection(arrays, iteratee, comparator) {
64714 var includes = comparator ? arrayIncludesWith : arrayIncludes,
64715 length = arrays[0].length,
64716 othLength = arrays.length,
64717 othIndex = othLength,
64718 caches = Array(othLength),
64719 maxLength = Infinity,
64720 result = [];
64721
64722 while (othIndex--) {
64723 var array = arrays[othIndex];
64724 if (othIndex && iteratee) {
64725 array = arrayMap(array, baseUnary(iteratee));
64726 }
64727 maxLength = nativeMin(array.length, maxLength);
64728 caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
64729 ? new SetCache(othIndex && array)
64730 : undefined;
64731 }
64732 array = arrays[0];
64733
64734 var index = -1,
64735 seen = caches[0];
64736
64737 outer:
64738 while (++index < length && result.length < maxLength) {
64739 var value = array[index],
64740 computed = iteratee ? iteratee(value) : value;
64741
64742 value = (comparator || value !== 0) ? value : 0;
64743 if (!(seen
64744 ? cacheHas(seen, computed)
64745 : includes(result, computed, comparator)
64746 )) {
64747 othIndex = othLength;
64748 while (--othIndex) {
64749 var cache = caches[othIndex];
64750 if (!(cache
64751 ? cacheHas(cache, computed)
64752 : includes(arrays[othIndex], computed, comparator))
64753 ) {
64754 continue outer;
64755 }
64756 }
64757 if (seen) {
64758 seen.push(computed);
64759 }
64760 result.push(value);
64761 }
64762 }
64763 return result;
64764 }
64765
64766 /**
64767 * The base implementation of `_.invert` and `_.invertBy` which inverts
64768 * `object` with values transformed by `iteratee` and set by `setter`.
64769 *
64770 * @private
64771 * @param {Object} object The object to iterate over.
64772 * @param {Function} setter The function to set `accumulator` values.
64773 * @param {Function} iteratee The iteratee to transform values.
64774 * @param {Object} accumulator The initial inverted object.
64775 * @returns {Function} Returns `accumulator`.
64776 */
64777 function baseInverter(object, setter, iteratee, accumulator) {
64778 baseForOwn(object, function(value, key, object) {
64779 setter(accumulator, iteratee(value), key, object);
64780 });
64781 return accumulator;
64782 }
64783
64784 /**
64785 * The base implementation of `_.invoke` without support for individual
64786 * method arguments.
64787 *
64788 * @private
64789 * @param {Object} object The object to query.
64790 * @param {Array|string} path The path of the method to invoke.
64791 * @param {Array} args The arguments to invoke the method with.
64792 * @returns {*} Returns the result of the invoked method.
64793 */
64794 function baseInvoke(object, path, args) {
64795 path = castPath(path, object);
64796 object = parent(object, path);
64797 var func = object == null ? object : object[toKey(last(path))];
64798 return func == null ? undefined : apply(func, object, args);
64799 }
64800
64801 /**
64802 * The base implementation of `_.isArguments`.
64803 *
64804 * @private
64805 * @param {*} value The value to check.
64806 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
64807 */
64808 function baseIsArguments(value) {
64809 return isObjectLike(value) && baseGetTag(value) == argsTag;
64810 }
64811
64812 /**
64813 * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
64814 *
64815 * @private
64816 * @param {*} value The value to check.
64817 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
64818 */
64819 function baseIsArrayBuffer(value) {
64820 return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
64821 }
64822
64823 /**
64824 * The base implementation of `_.isDate` without Node.js optimizations.
64825 *
64826 * @private
64827 * @param {*} value The value to check.
64828 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
64829 */
64830 function baseIsDate(value) {
64831 return isObjectLike(value) && baseGetTag(value) == dateTag;
64832 }
64833
64834 /**
64835 * The base implementation of `_.isEqual` which supports partial comparisons
64836 * and tracks traversed objects.
64837 *
64838 * @private
64839 * @param {*} value The value to compare.
64840 * @param {*} other The other value to compare.
64841 * @param {boolean} bitmask The bitmask flags.
64842 * 1 - Unordered comparison
64843 * 2 - Partial comparison
64844 * @param {Function} [customizer] The function to customize comparisons.
64845 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
64846 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
64847 */
64848 function baseIsEqual(value, other, bitmask, customizer, stack) {
64849 if (value === other) {
64850 return true;
64851 }
64852 if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
64853 return value !== value && other !== other;
64854 }
64855 return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
64856 }
64857
64858 /**
64859 * A specialized version of `baseIsEqual` for arrays and objects which performs
64860 * deep comparisons and tracks traversed objects enabling objects with circular
64861 * references to be compared.
64862 *
64863 * @private
64864 * @param {Object} object The object to compare.
64865 * @param {Object} other The other object to compare.
64866 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
64867 * @param {Function} customizer The function to customize comparisons.
64868 * @param {Function} equalFunc The function to determine equivalents of values.
64869 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
64870 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
64871 */
64872 function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
64873 var objIsArr = isArray(object),
64874 othIsArr = isArray(other),
64875 objTag = objIsArr ? arrayTag : getTag(object),
64876 othTag = othIsArr ? arrayTag : getTag(other);
64877
64878 objTag = objTag == argsTag ? objectTag : objTag;
64879 othTag = othTag == argsTag ? objectTag : othTag;
64880
64881 var objIsObj = objTag == objectTag,
64882 othIsObj = othTag == objectTag,
64883 isSameTag = objTag == othTag;
64884
64885 if (isSameTag && isBuffer(object)) {
64886 if (!isBuffer(other)) {
64887 return false;
64888 }
64889 objIsArr = true;
64890 objIsObj = false;
64891 }
64892 if (isSameTag && !objIsObj) {
64893 stack || (stack = new Stack);
64894 return (objIsArr || isTypedArray(object))
64895 ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
64896 : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
64897 }
64898 if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
64899 var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
64900 othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
64901
64902 if (objIsWrapped || othIsWrapped) {
64903 var objUnwrapped = objIsWrapped ? object.value() : object,
64904 othUnwrapped = othIsWrapped ? other.value() : other;
64905
64906 stack || (stack = new Stack);
64907 return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
64908 }
64909 }
64910 if (!isSameTag) {
64911 return false;
64912 }
64913 stack || (stack = new Stack);
64914 return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
64915 }
64916
64917 /**
64918 * The base implementation of `_.isMap` without Node.js optimizations.
64919 *
64920 * @private
64921 * @param {*} value The value to check.
64922 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
64923 */
64924 function baseIsMap(value) {
64925 return isObjectLike(value) && getTag(value) == mapTag;
64926 }
64927
64928 /**
64929 * The base implementation of `_.isMatch` without support for iteratee shorthands.
64930 *
64931 * @private
64932 * @param {Object} object The object to inspect.
64933 * @param {Object} source The object of property values to match.
64934 * @param {Array} matchData The property names, values, and compare flags to match.
64935 * @param {Function} [customizer] The function to customize comparisons.
64936 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
64937 */
64938 function baseIsMatch(object, source, matchData, customizer) {
64939 var index = matchData.length,
64940 length = index,
64941 noCustomizer = !customizer;
64942
64943 if (object == null) {
64944 return !length;
64945 }
64946 object = Object(object);
64947 while (index--) {
64948 var data = matchData[index];
64949 if ((noCustomizer && data[2])
64950 ? data[1] !== object[data[0]]
64951 : !(data[0] in object)
64952 ) {
64953 return false;
64954 }
64955 }
64956 while (++index < length) {
64957 data = matchData[index];
64958 var key = data[0],
64959 objValue = object[key],
64960 srcValue = data[1];
64961
64962 if (noCustomizer && data[2]) {
64963 if (objValue === undefined && !(key in object)) {
64964 return false;
64965 }
64966 } else {
64967 var stack = new Stack;
64968 if (customizer) {
64969 var result = customizer(objValue, srcValue, key, object, source, stack);
64970 }
64971 if (!(result === undefined
64972 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
64973 : result
64974 )) {
64975 return false;
64976 }
64977 }
64978 }
64979 return true;
64980 }
64981
64982 /**
64983 * The base implementation of `_.isNative` without bad shim checks.
64984 *
64985 * @private
64986 * @param {*} value The value to check.
64987 * @returns {boolean} Returns `true` if `value` is a native function,
64988 * else `false`.
64989 */
64990 function baseIsNative(value) {
64991 if (!isObject(value) || isMasked(value)) {
64992 return false;
64993 }
64994 var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
64995 return pattern.test(toSource(value));
64996 }
64997
64998 /**
64999 * The base implementation of `_.isRegExp` without Node.js optimizations.
65000 *
65001 * @private
65002 * @param {*} value The value to check.
65003 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
65004 */
65005 function baseIsRegExp(value) {
65006 return isObjectLike(value) && baseGetTag(value) == regexpTag;
65007 }
65008
65009 /**
65010 * The base implementation of `_.isSet` without Node.js optimizations.
65011 *
65012 * @private
65013 * @param {*} value The value to check.
65014 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
65015 */
65016 function baseIsSet(value) {
65017 return isObjectLike(value) && getTag(value) == setTag;
65018 }
65019
65020 /**
65021 * The base implementation of `_.isTypedArray` without Node.js optimizations.
65022 *
65023 * @private
65024 * @param {*} value The value to check.
65025 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
65026 */
65027 function baseIsTypedArray(value) {
65028 return isObjectLike(value) &&
65029 isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
65030 }
65031
65032 /**
65033 * The base implementation of `_.iteratee`.
65034 *
65035 * @private
65036 * @param {*} [value=_.identity] The value to convert to an iteratee.
65037 * @returns {Function} Returns the iteratee.
65038 */
65039 function baseIteratee(value) {
65040 // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
65041 // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
65042 if (typeof value == 'function') {
65043 return value;
65044 }
65045 if (value == null) {
65046 return identity;
65047 }
65048 if (typeof value == 'object') {
65049 return isArray(value)
65050 ? baseMatchesProperty(value[0], value[1])
65051 : baseMatches(value);
65052 }
65053 return property(value);
65054 }
65055
65056 /**
65057 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
65058 *
65059 * @private
65060 * @param {Object} object The object to query.
65061 * @returns {Array} Returns the array of property names.
65062 */
65063 function baseKeys(object) {
65064 if (!isPrototype(object)) {
65065 return nativeKeys(object);
65066 }
65067 var result = [];
65068 for (var key in Object(object)) {
65069 if (hasOwnProperty.call(object, key) && key != 'constructor') {
65070 result.push(key);
65071 }
65072 }
65073 return result;
65074 }
65075
65076 /**
65077 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
65078 *
65079 * @private
65080 * @param {Object} object The object to query.
65081 * @returns {Array} Returns the array of property names.
65082 */
65083 function baseKeysIn(object) {
65084 if (!isObject(object)) {
65085 return nativeKeysIn(object);
65086 }
65087 var isProto = isPrototype(object),
65088 result = [];
65089
65090 for (var key in object) {
65091 if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
65092 result.push(key);
65093 }
65094 }
65095 return result;
65096 }
65097
65098 /**
65099 * The base implementation of `_.lt` which doesn't coerce arguments.
65100 *
65101 * @private
65102 * @param {*} value The value to compare.
65103 * @param {*} other The other value to compare.
65104 * @returns {boolean} Returns `true` if `value` is less than `other`,
65105 * else `false`.
65106 */
65107 function baseLt(value, other) {
65108 return value < other;
65109 }
65110
65111 /**
65112 * The base implementation of `_.map` without support for iteratee shorthands.
65113 *
65114 * @private
65115 * @param {Array|Object} collection The collection to iterate over.
65116 * @param {Function} iteratee The function invoked per iteration.
65117 * @returns {Array} Returns the new mapped array.
65118 */
65119 function baseMap(collection, iteratee) {
65120 var index = -1,
65121 result = isArrayLike(collection) ? Array(collection.length) : [];
65122
65123 baseEach(collection, function(value, key, collection) {
65124 result[++index] = iteratee(value, key, collection);
65125 });
65126 return result;
65127 }
65128
65129 /**
65130 * The base implementation of `_.matches` which doesn't clone `source`.
65131 *
65132 * @private
65133 * @param {Object} source The object of property values to match.
65134 * @returns {Function} Returns the new spec function.
65135 */
65136 function baseMatches(source) {
65137 var matchData = getMatchData(source);
65138 if (matchData.length == 1 && matchData[0][2]) {
65139 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
65140 }
65141 return function(object) {
65142 return object === source || baseIsMatch(object, source, matchData);
65143 };
65144 }
65145
65146 /**
65147 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
65148 *
65149 * @private
65150 * @param {string} path The path of the property to get.
65151 * @param {*} srcValue The value to match.
65152 * @returns {Function} Returns the new spec function.
65153 */
65154 function baseMatchesProperty(path, srcValue) {
65155 if (isKey(path) && isStrictComparable(srcValue)) {
65156 return matchesStrictComparable(toKey(path), srcValue);
65157 }
65158 return function(object) {
65159 var objValue = get(object, path);
65160 return (objValue === undefined && objValue === srcValue)
65161 ? hasIn(object, path)
65162 : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
65163 };
65164 }
65165
65166 /**
65167 * The base implementation of `_.merge` without support for multiple sources.
65168 *
65169 * @private
65170 * @param {Object} object The destination object.
65171 * @param {Object} source The source object.
65172 * @param {number} srcIndex The index of `source`.
65173 * @param {Function} [customizer] The function to customize merged values.
65174 * @param {Object} [stack] Tracks traversed source values and their merged
65175 * counterparts.
65176 */
65177 function baseMerge(object, source, srcIndex, customizer, stack) {
65178 if (object === source) {
65179 return;
65180 }
65181 baseFor(source, function(srcValue, key) {
65182 stack || (stack = new Stack);
65183 if (isObject(srcValue)) {
65184 baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
65185 }
65186 else {
65187 var newValue = customizer
65188 ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
65189 : undefined;
65190
65191 if (newValue === undefined) {
65192 newValue = srcValue;
65193 }
65194 assignMergeValue(object, key, newValue);
65195 }
65196 }, keysIn);
65197 }
65198
65199 /**
65200 * A specialized version of `baseMerge` for arrays and objects which performs
65201 * deep merges and tracks traversed objects enabling objects with circular
65202 * references to be merged.
65203 *
65204 * @private
65205 * @param {Object} object The destination object.
65206 * @param {Object} source The source object.
65207 * @param {string} key The key of the value to merge.
65208 * @param {number} srcIndex The index of `source`.
65209 * @param {Function} mergeFunc The function to merge values.
65210 * @param {Function} [customizer] The function to customize assigned values.
65211 * @param {Object} [stack] Tracks traversed source values and their merged
65212 * counterparts.
65213 */
65214 function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
65215 var objValue = safeGet(object, key),
65216 srcValue = safeGet(source, key),
65217 stacked = stack.get(srcValue);
65218
65219 if (stacked) {
65220 assignMergeValue(object, key, stacked);
65221 return;
65222 }
65223 var newValue = customizer
65224 ? customizer(objValue, srcValue, (key + ''), object, source, stack)
65225 : undefined;
65226
65227 var isCommon = newValue === undefined;
65228
65229 if (isCommon) {
65230 var isArr = isArray(srcValue),
65231 isBuff = !isArr && isBuffer(srcValue),
65232 isTyped = !isArr && !isBuff && isTypedArray(srcValue);
65233
65234 newValue = srcValue;
65235 if (isArr || isBuff || isTyped) {
65236 if (isArray(objValue)) {
65237 newValue = objValue;
65238 }
65239 else if (isArrayLikeObject(objValue)) {
65240 newValue = copyArray(objValue);
65241 }
65242 else if (isBuff) {
65243 isCommon = false;
65244 newValue = cloneBuffer(srcValue, true);
65245 }
65246 else if (isTyped) {
65247 isCommon = false;
65248 newValue = cloneTypedArray(srcValue, true);
65249 }
65250 else {
65251 newValue = [];
65252 }
65253 }
65254 else if (isPlainObject(srcValue) || isArguments(srcValue)) {
65255 newValue = objValue;
65256 if (isArguments(objValue)) {
65257 newValue = toPlainObject(objValue);
65258 }
65259 else if (!isObject(objValue) || isFunction(objValue)) {
65260 newValue = initCloneObject(srcValue);
65261 }
65262 }
65263 else {
65264 isCommon = false;
65265 }
65266 }
65267 if (isCommon) {
65268 // Recursively merge objects and arrays (susceptible to call stack limits).
65269 stack.set(srcValue, newValue);
65270 mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
65271 stack['delete'](srcValue);
65272 }
65273 assignMergeValue(object, key, newValue);
65274 }
65275
65276 /**
65277 * The base implementation of `_.nth` which doesn't coerce arguments.
65278 *
65279 * @private
65280 * @param {Array} array The array to query.
65281 * @param {number} n The index of the element to return.
65282 * @returns {*} Returns the nth element of `array`.
65283 */
65284 function baseNth(array, n) {
65285 var length = array.length;
65286 if (!length) {
65287 return;
65288 }
65289 n += n < 0 ? length : 0;
65290 return isIndex(n, length) ? array[n] : undefined;
65291 }
65292
65293 /**
65294 * The base implementation of `_.orderBy` without param guards.
65295 *
65296 * @private
65297 * @param {Array|Object} collection The collection to iterate over.
65298 * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
65299 * @param {string[]} orders The sort orders of `iteratees`.
65300 * @returns {Array} Returns the new sorted array.
65301 */
65302 function baseOrderBy(collection, iteratees, orders) {
65303 var index = -1;
65304 iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
65305
65306 var result = baseMap(collection, function(value, key, collection) {
65307 var criteria = arrayMap(iteratees, function(iteratee) {
65308 return iteratee(value);
65309 });
65310 return { 'criteria': criteria, 'index': ++index, 'value': value };
65311 });
65312
65313 return baseSortBy(result, function(object, other) {
65314 return compareMultiple(object, other, orders);
65315 });
65316 }
65317
65318 /**
65319 * The base implementation of `_.pick` without support for individual
65320 * property identifiers.
65321 *
65322 * @private
65323 * @param {Object} object The source object.
65324 * @param {string[]} paths The property paths to pick.
65325 * @returns {Object} Returns the new object.
65326 */
65327 function basePick(object, paths) {
65328 return basePickBy(object, paths, function(value, path) {
65329 return hasIn(object, path);
65330 });
65331 }
65332
65333 /**
65334 * The base implementation of `_.pickBy` without support for iteratee shorthands.
65335 *
65336 * @private
65337 * @param {Object} object The source object.
65338 * @param {string[]} paths The property paths to pick.
65339 * @param {Function} predicate The function invoked per property.
65340 * @returns {Object} Returns the new object.
65341 */
65342 function basePickBy(object, paths, predicate) {
65343 var index = -1,
65344 length = paths.length,
65345 result = {};
65346
65347 while (++index < length) {
65348 var path = paths[index],
65349 value = baseGet(object, path);
65350
65351 if (predicate(value, path)) {
65352 baseSet(result, castPath(path, object), value);
65353 }
65354 }
65355 return result;
65356 }
65357
65358 /**
65359 * A specialized version of `baseProperty` which supports deep paths.
65360 *
65361 * @private
65362 * @param {Array|string} path The path of the property to get.
65363 * @returns {Function} Returns the new accessor function.
65364 */
65365 function basePropertyDeep(path) {
65366 return function(object) {
65367 return baseGet(object, path);
65368 };
65369 }
65370
65371 /**
65372 * The base implementation of `_.pullAllBy` without support for iteratee
65373 * shorthands.
65374 *
65375 * @private
65376 * @param {Array} array The array to modify.
65377 * @param {Array} values The values to remove.
65378 * @param {Function} [iteratee] The iteratee invoked per element.
65379 * @param {Function} [comparator] The comparator invoked per element.
65380 * @returns {Array} Returns `array`.
65381 */
65382 function basePullAll(array, values, iteratee, comparator) {
65383 var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
65384 index = -1,
65385 length = values.length,
65386 seen = array;
65387
65388 if (array === values) {
65389 values = copyArray(values);
65390 }
65391 if (iteratee) {
65392 seen = arrayMap(array, baseUnary(iteratee));
65393 }
65394 while (++index < length) {
65395 var fromIndex = 0,
65396 value = values[index],
65397 computed = iteratee ? iteratee(value) : value;
65398
65399 while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
65400 if (seen !== array) {
65401 splice.call(seen, fromIndex, 1);
65402 }
65403 splice.call(array, fromIndex, 1);
65404 }
65405 }
65406 return array;
65407 }
65408
65409 /**
65410 * The base implementation of `_.pullAt` without support for individual
65411 * indexes or capturing the removed elements.
65412 *
65413 * @private
65414 * @param {Array} array The array to modify.
65415 * @param {number[]} indexes The indexes of elements to remove.
65416 * @returns {Array} Returns `array`.
65417 */
65418 function basePullAt(array, indexes) {
65419 var length = array ? indexes.length : 0,
65420 lastIndex = length - 1;
65421
65422 while (length--) {
65423 var index = indexes[length];
65424 if (length == lastIndex || index !== previous) {
65425 var previous = index;
65426 if (isIndex(index)) {
65427 splice.call(array, index, 1);
65428 } else {
65429 baseUnset(array, index);
65430 }
65431 }
65432 }
65433 return array;
65434 }
65435
65436 /**
65437 * The base implementation of `_.random` without support for returning
65438 * floating-point numbers.
65439 *
65440 * @private
65441 * @param {number} lower The lower bound.
65442 * @param {number} upper The upper bound.
65443 * @returns {number} Returns the random number.
65444 */
65445 function baseRandom(lower, upper) {
65446 return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
65447 }
65448
65449 /**
65450 * The base implementation of `_.range` and `_.rangeRight` which doesn't
65451 * coerce arguments.
65452 *
65453 * @private
65454 * @param {number} start The start of the range.
65455 * @param {number} end The end of the range.
65456 * @param {number} step The value to increment or decrement by.
65457 * @param {boolean} [fromRight] Specify iterating from right to left.
65458 * @returns {Array} Returns the range of numbers.
65459 */
65460 function baseRange(start, end, step, fromRight) {
65461 var index = -1,
65462 length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
65463 result = Array(length);
65464
65465 while (length--) {
65466 result[fromRight ? length : ++index] = start;
65467 start += step;
65468 }
65469 return result;
65470 }
65471
65472 /**
65473 * The base implementation of `_.repeat` which doesn't coerce arguments.
65474 *
65475 * @private
65476 * @param {string} string The string to repeat.
65477 * @param {number} n The number of times to repeat the string.
65478 * @returns {string} Returns the repeated string.
65479 */
65480 function baseRepeat(string, n) {
65481 var result = '';
65482 if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
65483 return result;
65484 }
65485 // Leverage the exponentiation by squaring algorithm for a faster repeat.
65486 // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
65487 do {
65488 if (n % 2) {
65489 result += string;
65490 }
65491 n = nativeFloor(n / 2);
65492 if (n) {
65493 string += string;
65494 }
65495 } while (n);
65496
65497 return result;
65498 }
65499
65500 /**
65501 * The base implementation of `_.rest` which doesn't validate or coerce arguments.
65502 *
65503 * @private
65504 * @param {Function} func The function to apply a rest parameter to.
65505 * @param {number} [start=func.length-1] The start position of the rest parameter.
65506 * @returns {Function} Returns the new function.
65507 */
65508 function baseRest(func, start) {
65509 return setToString(overRest(func, start, identity), func + '');
65510 }
65511
65512 /**
65513 * The base implementation of `_.sample`.
65514 *
65515 * @private
65516 * @param {Array|Object} collection The collection to sample.
65517 * @returns {*} Returns the random element.
65518 */
65519 function baseSample(collection) {
65520 return arraySample(values(collection));
65521 }
65522
65523 /**
65524 * The base implementation of `_.sampleSize` without param guards.
65525 *
65526 * @private
65527 * @param {Array|Object} collection The collection to sample.
65528 * @param {number} n The number of elements to sample.
65529 * @returns {Array} Returns the random elements.
65530 */
65531 function baseSampleSize(collection, n) {
65532 var array = values(collection);
65533 return shuffleSelf(array, baseClamp(n, 0, array.length));
65534 }
65535
65536 /**
65537 * The base implementation of `_.set`.
65538 *
65539 * @private
65540 * @param {Object} object The object to modify.
65541 * @param {Array|string} path The path of the property to set.
65542 * @param {*} value The value to set.
65543 * @param {Function} [customizer] The function to customize path creation.
65544 * @returns {Object} Returns `object`.
65545 */
65546 function baseSet(object, path, value, customizer) {
65547 if (!isObject(object)) {
65548 return object;
65549 }
65550 path = castPath(path, object);
65551
65552 var index = -1,
65553 length = path.length,
65554 lastIndex = length - 1,
65555 nested = object;
65556
65557 while (nested != null && ++index < length) {
65558 var key = toKey(path[index]),
65559 newValue = value;
65560
65561 if (index != lastIndex) {
65562 var objValue = nested[key];
65563 newValue = customizer ? customizer(objValue, key, nested) : undefined;
65564 if (newValue === undefined) {
65565 newValue = isObject(objValue)
65566 ? objValue
65567 : (isIndex(path[index + 1]) ? [] : {});
65568 }
65569 }
65570 assignValue(nested, key, newValue);
65571 nested = nested[key];
65572 }
65573 return object;
65574 }
65575
65576 /**
65577 * The base implementation of `setData` without support for hot loop shorting.
65578 *
65579 * @private
65580 * @param {Function} func The function to associate metadata with.
65581 * @param {*} data The metadata.
65582 * @returns {Function} Returns `func`.
65583 */
65584 var baseSetData = !metaMap ? identity : function(func, data) {
65585 metaMap.set(func, data);
65586 return func;
65587 };
65588
65589 /**
65590 * The base implementation of `setToString` without support for hot loop shorting.
65591 *
65592 * @private
65593 * @param {Function} func The function to modify.
65594 * @param {Function} string The `toString` result.
65595 * @returns {Function} Returns `func`.
65596 */
65597 var baseSetToString = !defineProperty ? identity : function(func, string) {
65598 return defineProperty(func, 'toString', {
65599 'configurable': true,
65600 'enumerable': false,
65601 'value': constant(string),
65602 'writable': true
65603 });
65604 };
65605
65606 /**
65607 * The base implementation of `_.shuffle`.
65608 *
65609 * @private
65610 * @param {Array|Object} collection The collection to shuffle.
65611 * @returns {Array} Returns the new shuffled array.
65612 */
65613 function baseShuffle(collection) {
65614 return shuffleSelf(values(collection));
65615 }
65616
65617 /**
65618 * The base implementation of `_.slice` without an iteratee call guard.
65619 *
65620 * @private
65621 * @param {Array} array The array to slice.
65622 * @param {number} [start=0] The start position.
65623 * @param {number} [end=array.length] The end position.
65624 * @returns {Array} Returns the slice of `array`.
65625 */
65626 function baseSlice(array, start, end) {
65627 var index = -1,
65628 length = array.length;
65629
65630 if (start < 0) {
65631 start = -start > length ? 0 : (length + start);
65632 }
65633 end = end > length ? length : end;
65634 if (end < 0) {
65635 end += length;
65636 }
65637 length = start > end ? 0 : ((end - start) >>> 0);
65638 start >>>= 0;
65639
65640 var result = Array(length);
65641 while (++index < length) {
65642 result[index] = array[index + start];
65643 }
65644 return result;
65645 }
65646
65647 /**
65648 * The base implementation of `_.some` without support for iteratee shorthands.
65649 *
65650 * @private
65651 * @param {Array|Object} collection The collection to iterate over.
65652 * @param {Function} predicate The function invoked per iteration.
65653 * @returns {boolean} Returns `true` if any element passes the predicate check,
65654 * else `false`.
65655 */
65656 function baseSome(collection, predicate) {
65657 var result;
65658
65659 baseEach(collection, function(value, index, collection) {
65660 result = predicate(value, index, collection);
65661 return !result;
65662 });
65663 return !!result;
65664 }
65665
65666 /**
65667 * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
65668 * performs a binary search of `array` to determine the index at which `value`
65669 * should be inserted into `array` in order to maintain its sort order.
65670 *
65671 * @private
65672 * @param {Array} array The sorted array to inspect.
65673 * @param {*} value The value to evaluate.
65674 * @param {boolean} [retHighest] Specify returning the highest qualified index.
65675 * @returns {number} Returns the index at which `value` should be inserted
65676 * into `array`.
65677 */
65678 function baseSortedIndex(array, value, retHighest) {
65679 var low = 0,
65680 high = array == null ? low : array.length;
65681
65682 if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
65683 while (low < high) {
65684 var mid = (low + high) >>> 1,
65685 computed = array[mid];
65686
65687 if (computed !== null && !isSymbol(computed) &&
65688 (retHighest ? (computed <= value) : (computed < value))) {
65689 low = mid + 1;
65690 } else {
65691 high = mid;
65692 }
65693 }
65694 return high;
65695 }
65696 return baseSortedIndexBy(array, value, identity, retHighest);
65697 }
65698
65699 /**
65700 * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
65701 * which invokes `iteratee` for `value` and each element of `array` to compute
65702 * their sort ranking. The iteratee is invoked with one argument; (value).
65703 *
65704 * @private
65705 * @param {Array} array The sorted array to inspect.
65706 * @param {*} value The value to evaluate.
65707 * @param {Function} iteratee The iteratee invoked per element.
65708 * @param {boolean} [retHighest] Specify returning the highest qualified index.
65709 * @returns {number} Returns the index at which `value` should be inserted
65710 * into `array`.
65711 */
65712 function baseSortedIndexBy(array, value, iteratee, retHighest) {
65713 value = iteratee(value);
65714
65715 var low = 0,
65716 high = array == null ? 0 : array.length,
65717 valIsNaN = value !== value,
65718 valIsNull = value === null,
65719 valIsSymbol = isSymbol(value),
65720 valIsUndefined = value === undefined;
65721
65722 while (low < high) {
65723 var mid = nativeFloor((low + high) / 2),
65724 computed = iteratee(array[mid]),
65725 othIsDefined = computed !== undefined,
65726 othIsNull = computed === null,
65727 othIsReflexive = computed === computed,
65728 othIsSymbol = isSymbol(computed);
65729
65730 if (valIsNaN) {
65731 var setLow = retHighest || othIsReflexive;
65732 } else if (valIsUndefined) {
65733 setLow = othIsReflexive && (retHighest || othIsDefined);
65734 } else if (valIsNull) {
65735 setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
65736 } else if (valIsSymbol) {
65737 setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
65738 } else if (othIsNull || othIsSymbol) {
65739 setLow = false;
65740 } else {
65741 setLow = retHighest ? (computed <= value) : (computed < value);
65742 }
65743 if (setLow) {
65744 low = mid + 1;
65745 } else {
65746 high = mid;
65747 }
65748 }
65749 return nativeMin(high, MAX_ARRAY_INDEX);
65750 }
65751
65752 /**
65753 * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
65754 * support for iteratee shorthands.
65755 *
65756 * @private
65757 * @param {Array} array The array to inspect.
65758 * @param {Function} [iteratee] The iteratee invoked per element.
65759 * @returns {Array} Returns the new duplicate free array.
65760 */
65761 function baseSortedUniq(array, iteratee) {
65762 var index = -1,
65763 length = array.length,
65764 resIndex = 0,
65765 result = [];
65766
65767 while (++index < length) {
65768 var value = array[index],
65769 computed = iteratee ? iteratee(value) : value;
65770
65771 if (!index || !eq(computed, seen)) {
65772 var seen = computed;
65773 result[resIndex++] = value === 0 ? 0 : value;
65774 }
65775 }
65776 return result;
65777 }
65778
65779 /**
65780 * The base implementation of `_.toNumber` which doesn't ensure correct
65781 * conversions of binary, hexadecimal, or octal string values.
65782 *
65783 * @private
65784 * @param {*} value The value to process.
65785 * @returns {number} Returns the number.
65786 */
65787 function baseToNumber(value) {
65788 if (typeof value == 'number') {
65789 return value;
65790 }
65791 if (isSymbol(value)) {
65792 return NAN;
65793 }
65794 return +value;
65795 }
65796
65797 /**
65798 * The base implementation of `_.toString` which doesn't convert nullish
65799 * values to empty strings.
65800 *
65801 * @private
65802 * @param {*} value The value to process.
65803 * @returns {string} Returns the string.
65804 */
65805 function baseToString(value) {
65806 // Exit early for strings to avoid a performance hit in some environments.
65807 if (typeof value == 'string') {
65808 return value;
65809 }
65810 if (isArray(value)) {
65811 // Recursively convert values (susceptible to call stack limits).
65812 return arrayMap(value, baseToString) + '';
65813 }
65814 if (isSymbol(value)) {
65815 return symbolToString ? symbolToString.call(value) : '';
65816 }
65817 var result = (value + '');
65818 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
65819 }
65820
65821 /**
65822 * The base implementation of `_.uniqBy` without support for iteratee shorthands.
65823 *
65824 * @private
65825 * @param {Array} array The array to inspect.
65826 * @param {Function} [iteratee] The iteratee invoked per element.
65827 * @param {Function} [comparator] The comparator invoked per element.
65828 * @returns {Array} Returns the new duplicate free array.
65829 */
65830 function baseUniq(array, iteratee, comparator) {
65831 var index = -1,
65832 includes = arrayIncludes,
65833 length = array.length,
65834 isCommon = true,
65835 result = [],
65836 seen = result;
65837
65838 if (comparator) {
65839 isCommon = false;
65840 includes = arrayIncludesWith;
65841 }
65842 else if (length >= LARGE_ARRAY_SIZE) {
65843 var set = iteratee ? null : createSet(array);
65844 if (set) {
65845 return setToArray(set);
65846 }
65847 isCommon = false;
65848 includes = cacheHas;
65849 seen = new SetCache;
65850 }
65851 else {
65852 seen = iteratee ? [] : result;
65853 }
65854 outer:
65855 while (++index < length) {
65856 var value = array[index],
65857 computed = iteratee ? iteratee(value) : value;
65858
65859 value = (comparator || value !== 0) ? value : 0;
65860 if (isCommon && computed === computed) {
65861 var seenIndex = seen.length;
65862 while (seenIndex--) {
65863 if (seen[seenIndex] === computed) {
65864 continue outer;
65865 }
65866 }
65867 if (iteratee) {
65868 seen.push(computed);
65869 }
65870 result.push(value);
65871 }
65872 else if (!includes(seen, computed, comparator)) {
65873 if (seen !== result) {
65874 seen.push(computed);
65875 }
65876 result.push(value);
65877 }
65878 }
65879 return result;
65880 }
65881
65882 /**
65883 * The base implementation of `_.unset`.
65884 *
65885 * @private
65886 * @param {Object} object The object to modify.
65887 * @param {Array|string} path The property path to unset.
65888 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
65889 */
65890 function baseUnset(object, path) {
65891 path = castPath(path, object);
65892 object = parent(object, path);
65893 return object == null || delete object[toKey(last(path))];
65894 }
65895
65896 /**
65897 * The base implementation of `_.update`.
65898 *
65899 * @private
65900 * @param {Object} object The object to modify.
65901 * @param {Array|string} path The path of the property to update.
65902 * @param {Function} updater The function to produce the updated value.
65903 * @param {Function} [customizer] The function to customize path creation.
65904 * @returns {Object} Returns `object`.
65905 */
65906 function baseUpdate(object, path, updater, customizer) {
65907 return baseSet(object, path, updater(baseGet(object, path)), customizer);
65908 }
65909
65910 /**
65911 * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
65912 * without support for iteratee shorthands.
65913 *
65914 * @private
65915 * @param {Array} array The array to query.
65916 * @param {Function} predicate The function invoked per iteration.
65917 * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
65918 * @param {boolean} [fromRight] Specify iterating from right to left.
65919 * @returns {Array} Returns the slice of `array`.
65920 */
65921 function baseWhile(array, predicate, isDrop, fromRight) {
65922 var length = array.length,
65923 index = fromRight ? length : -1;
65924
65925 while ((fromRight ? index-- : ++index < length) &&
65926 predicate(array[index], index, array)) {}
65927
65928 return isDrop
65929 ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
65930 : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
65931 }
65932
65933 /**
65934 * The base implementation of `wrapperValue` which returns the result of
65935 * performing a sequence of actions on the unwrapped `value`, where each
65936 * successive action is supplied the return value of the previous.
65937 *
65938 * @private
65939 * @param {*} value The unwrapped value.
65940 * @param {Array} actions Actions to perform to resolve the unwrapped value.
65941 * @returns {*} Returns the resolved value.
65942 */
65943 function baseWrapperValue(value, actions) {
65944 var result = value;
65945 if (result instanceof LazyWrapper) {
65946 result = result.value();
65947 }
65948 return arrayReduce(actions, function(result, action) {
65949 return action.func.apply(action.thisArg, arrayPush([result], action.args));
65950 }, result);
65951 }
65952
65953 /**
65954 * The base implementation of methods like `_.xor`, without support for
65955 * iteratee shorthands, that accepts an array of arrays to inspect.
65956 *
65957 * @private
65958 * @param {Array} arrays The arrays to inspect.
65959 * @param {Function} [iteratee] The iteratee invoked per element.
65960 * @param {Function} [comparator] The comparator invoked per element.
65961 * @returns {Array} Returns the new array of values.
65962 */
65963 function baseXor(arrays, iteratee, comparator) {
65964 var length = arrays.length;
65965 if (length < 2) {
65966 return length ? baseUniq(arrays[0]) : [];
65967 }
65968 var index = -1,
65969 result = Array(length);
65970
65971 while (++index < length) {
65972 var array = arrays[index],
65973 othIndex = -1;
65974
65975 while (++othIndex < length) {
65976 if (othIndex != index) {
65977 result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
65978 }
65979 }
65980 }
65981 return baseUniq(baseFlatten(result, 1), iteratee, comparator);
65982 }
65983
65984 /**
65985 * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
65986 *
65987 * @private
65988 * @param {Array} props The property identifiers.
65989 * @param {Array} values The property values.
65990 * @param {Function} assignFunc The function to assign values.
65991 * @returns {Object} Returns the new object.
65992 */
65993 function baseZipObject(props, values, assignFunc) {
65994 var index = -1,
65995 length = props.length,
65996 valsLength = values.length,
65997 result = {};
65998
65999 while (++index < length) {
66000 var value = index < valsLength ? values[index] : undefined;
66001 assignFunc(result, props[index], value);
66002 }
66003 return result;
66004 }
66005
66006 /**
66007 * Casts `value` to an empty array if it's not an array like object.
66008 *
66009 * @private
66010 * @param {*} value The value to inspect.
66011 * @returns {Array|Object} Returns the cast array-like object.
66012 */
66013 function castArrayLikeObject(value) {
66014 return isArrayLikeObject(value) ? value : [];
66015 }
66016
66017 /**
66018 * Casts `value` to `identity` if it's not a function.
66019 *
66020 * @private
66021 * @param {*} value The value to inspect.
66022 * @returns {Function} Returns cast function.
66023 */
66024 function castFunction(value) {
66025 return typeof value == 'function' ? value : identity;
66026 }
66027
66028 /**
66029 * Casts `value` to a path array if it's not one.
66030 *
66031 * @private
66032 * @param {*} value The value to inspect.
66033 * @param {Object} [object] The object to query keys on.
66034 * @returns {Array} Returns the cast property path array.
66035 */
66036 function castPath(value, object) {
66037 if (isArray(value)) {
66038 return value;
66039 }
66040 return isKey(value, object) ? [value] : stringToPath(toString(value));
66041 }
66042
66043 /**
66044 * A `baseRest` alias which can be replaced with `identity` by module
66045 * replacement plugins.
66046 *
66047 * @private
66048 * @type {Function}
66049 * @param {Function} func The function to apply a rest parameter to.
66050 * @returns {Function} Returns the new function.
66051 */
66052 var castRest = baseRest;
66053
66054 /**
66055 * Casts `array` to a slice if it's needed.
66056 *
66057 * @private
66058 * @param {Array} array The array to inspect.
66059 * @param {number} start The start position.
66060 * @param {number} [end=array.length] The end position.
66061 * @returns {Array} Returns the cast slice.
66062 */
66063 function castSlice(array, start, end) {
66064 var length = array.length;
66065 end = end === undefined ? length : end;
66066 return (!start && end >= length) ? array : baseSlice(array, start, end);
66067 }
66068
66069 /**
66070 * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
66071 *
66072 * @private
66073 * @param {number|Object} id The timer id or timeout object of the timer to clear.
66074 */
66075 var clearTimeout = ctxClearTimeout || function(id) {
66076 return root.clearTimeout(id);
66077 };
66078
66079 /**
66080 * Creates a clone of `buffer`.
66081 *
66082 * @private
66083 * @param {Buffer} buffer The buffer to clone.
66084 * @param {boolean} [isDeep] Specify a deep clone.
66085 * @returns {Buffer} Returns the cloned buffer.
66086 */
66087 function cloneBuffer(buffer, isDeep) {
66088 if (isDeep) {
66089 return buffer.slice();
66090 }
66091 var length = buffer.length,
66092 result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
66093
66094 buffer.copy(result);
66095 return result;
66096 }
66097
66098 /**
66099 * Creates a clone of `arrayBuffer`.
66100 *
66101 * @private
66102 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
66103 * @returns {ArrayBuffer} Returns the cloned array buffer.
66104 */
66105 function cloneArrayBuffer(arrayBuffer) {
66106 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
66107 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
66108 return result;
66109 }
66110
66111 /**
66112 * Creates a clone of `dataView`.
66113 *
66114 * @private
66115 * @param {Object} dataView The data view to clone.
66116 * @param {boolean} [isDeep] Specify a deep clone.
66117 * @returns {Object} Returns the cloned data view.
66118 */
66119 function cloneDataView(dataView, isDeep) {
66120 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
66121 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
66122 }
66123
66124 /**
66125 * Creates a clone of `regexp`.
66126 *
66127 * @private
66128 * @param {Object} regexp The regexp to clone.
66129 * @returns {Object} Returns the cloned regexp.
66130 */
66131 function cloneRegExp(regexp) {
66132 var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
66133 result.lastIndex = regexp.lastIndex;
66134 return result;
66135 }
66136
66137 /**
66138 * Creates a clone of the `symbol` object.
66139 *
66140 * @private
66141 * @param {Object} symbol The symbol object to clone.
66142 * @returns {Object} Returns the cloned symbol object.
66143 */
66144 function cloneSymbol(symbol) {
66145 return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
66146 }
66147
66148 /**
66149 * Creates a clone of `typedArray`.
66150 *
66151 * @private
66152 * @param {Object} typedArray The typed array to clone.
66153 * @param {boolean} [isDeep] Specify a deep clone.
66154 * @returns {Object} Returns the cloned typed array.
66155 */
66156 function cloneTypedArray(typedArray, isDeep) {
66157 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
66158 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
66159 }
66160
66161 /**
66162 * Compares values to sort them in ascending order.
66163 *
66164 * @private
66165 * @param {*} value The value to compare.
66166 * @param {*} other The other value to compare.
66167 * @returns {number} Returns the sort order indicator for `value`.
66168 */
66169 function compareAscending(value, other) {
66170 if (value !== other) {
66171 var valIsDefined = value !== undefined,
66172 valIsNull = value === null,
66173 valIsReflexive = value === value,
66174 valIsSymbol = isSymbol(value);
66175
66176 var othIsDefined = other !== undefined,
66177 othIsNull = other === null,
66178 othIsReflexive = other === other,
66179 othIsSymbol = isSymbol(other);
66180
66181 if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
66182 (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
66183 (valIsNull && othIsDefined && othIsReflexive) ||
66184 (!valIsDefined && othIsReflexive) ||
66185 !valIsReflexive) {
66186 return 1;
66187 }
66188 if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
66189 (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
66190 (othIsNull && valIsDefined && valIsReflexive) ||
66191 (!othIsDefined && valIsReflexive) ||
66192 !othIsReflexive) {
66193 return -1;
66194 }
66195 }
66196 return 0;
66197 }
66198
66199 /**
66200 * Used by `_.orderBy` to compare multiple properties of a value to another
66201 * and stable sort them.
66202 *
66203 * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
66204 * specify an order of "desc" for descending or "asc" for ascending sort order
66205 * of corresponding values.
66206 *
66207 * @private
66208 * @param {Object} object The object to compare.
66209 * @param {Object} other The other object to compare.
66210 * @param {boolean[]|string[]} orders The order to sort by for each property.
66211 * @returns {number} Returns the sort order indicator for `object`.
66212 */
66213 function compareMultiple(object, other, orders) {
66214 var index = -1,
66215 objCriteria = object.criteria,
66216 othCriteria = other.criteria,
66217 length = objCriteria.length,
66218 ordersLength = orders.length;
66219
66220 while (++index < length) {
66221 var result = compareAscending(objCriteria[index], othCriteria[index]);
66222 if (result) {
66223 if (index >= ordersLength) {
66224 return result;
66225 }
66226 var order = orders[index];
66227 return result * (order == 'desc' ? -1 : 1);
66228 }
66229 }
66230 // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
66231 // that causes it, under certain circumstances, to provide the same value for
66232 // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
66233 // for more details.
66234 //
66235 // This also ensures a stable sort in V8 and other engines.
66236 // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
66237 return object.index - other.index;
66238 }
66239
66240 /**
66241 * Creates an array that is the composition of partially applied arguments,
66242 * placeholders, and provided arguments into a single array of arguments.
66243 *
66244 * @private
66245 * @param {Array} args The provided arguments.
66246 * @param {Array} partials The arguments to prepend to those provided.
66247 * @param {Array} holders The `partials` placeholder indexes.
66248 * @params {boolean} [isCurried] Specify composing for a curried function.
66249 * @returns {Array} Returns the new array of composed arguments.
66250 */
66251 function composeArgs(args, partials, holders, isCurried) {
66252 var argsIndex = -1,
66253 argsLength = args.length,
66254 holdersLength = holders.length,
66255 leftIndex = -1,
66256 leftLength = partials.length,
66257 rangeLength = nativeMax(argsLength - holdersLength, 0),
66258 result = Array(leftLength + rangeLength),
66259 isUncurried = !isCurried;
66260
66261 while (++leftIndex < leftLength) {
66262 result[leftIndex] = partials[leftIndex];
66263 }
66264 while (++argsIndex < holdersLength) {
66265 if (isUncurried || argsIndex < argsLength) {
66266 result[holders[argsIndex]] = args[argsIndex];
66267 }
66268 }
66269 while (rangeLength--) {
66270 result[leftIndex++] = args[argsIndex++];
66271 }
66272 return result;
66273 }
66274
66275 /**
66276 * This function is like `composeArgs` except that the arguments composition
66277 * is tailored for `_.partialRight`.
66278 *
66279 * @private
66280 * @param {Array} args The provided arguments.
66281 * @param {Array} partials The arguments to append to those provided.
66282 * @param {Array} holders The `partials` placeholder indexes.
66283 * @params {boolean} [isCurried] Specify composing for a curried function.
66284 * @returns {Array} Returns the new array of composed arguments.
66285 */
66286 function composeArgsRight(args, partials, holders, isCurried) {
66287 var argsIndex = -1,
66288 argsLength = args.length,
66289 holdersIndex = -1,
66290 holdersLength = holders.length,
66291 rightIndex = -1,
66292 rightLength = partials.length,
66293 rangeLength = nativeMax(argsLength - holdersLength, 0),
66294 result = Array(rangeLength + rightLength),
66295 isUncurried = !isCurried;
66296
66297 while (++argsIndex < rangeLength) {
66298 result[argsIndex] = args[argsIndex];
66299 }
66300 var offset = argsIndex;
66301 while (++rightIndex < rightLength) {
66302 result[offset + rightIndex] = partials[rightIndex];
66303 }
66304 while (++holdersIndex < holdersLength) {
66305 if (isUncurried || argsIndex < argsLength) {
66306 result[offset + holders[holdersIndex]] = args[argsIndex++];
66307 }
66308 }
66309 return result;
66310 }
66311
66312 /**
66313 * Copies the values of `source` to `array`.
66314 *
66315 * @private
66316 * @param {Array} source The array to copy values from.
66317 * @param {Array} [array=[]] The array to copy values to.
66318 * @returns {Array} Returns `array`.
66319 */
66320 function copyArray(source, array) {
66321 var index = -1,
66322 length = source.length;
66323
66324 array || (array = Array(length));
66325 while (++index < length) {
66326 array[index] = source[index];
66327 }
66328 return array;
66329 }
66330
66331 /**
66332 * Copies properties of `source` to `object`.
66333 *
66334 * @private
66335 * @param {Object} source The object to copy properties from.
66336 * @param {Array} props The property identifiers to copy.
66337 * @param {Object} [object={}] The object to copy properties to.
66338 * @param {Function} [customizer] The function to customize copied values.
66339 * @returns {Object} Returns `object`.
66340 */
66341 function copyObject(source, props, object, customizer) {
66342 var isNew = !object;
66343 object || (object = {});
66344
66345 var index = -1,
66346 length = props.length;
66347
66348 while (++index < length) {
66349 var key = props[index];
66350
66351 var newValue = customizer
66352 ? customizer(object[key], source[key], key, object, source)
66353 : undefined;
66354
66355 if (newValue === undefined) {
66356 newValue = source[key];
66357 }
66358 if (isNew) {
66359 baseAssignValue(object, key, newValue);
66360 } else {
66361 assignValue(object, key, newValue);
66362 }
66363 }
66364 return object;
66365 }
66366
66367 /**
66368 * Copies own symbols of `source` to `object`.
66369 *
66370 * @private
66371 * @param {Object} source The object to copy symbols from.
66372 * @param {Object} [object={}] The object to copy symbols to.
66373 * @returns {Object} Returns `object`.
66374 */
66375 function copySymbols(source, object) {
66376 return copyObject(source, getSymbols(source), object);
66377 }
66378
66379 /**
66380 * Copies own and inherited symbols of `source` to `object`.
66381 *
66382 * @private
66383 * @param {Object} source The object to copy symbols from.
66384 * @param {Object} [object={}] The object to copy symbols to.
66385 * @returns {Object} Returns `object`.
66386 */
66387 function copySymbolsIn(source, object) {
66388 return copyObject(source, getSymbolsIn(source), object);
66389 }
66390
66391 /**
66392 * Creates a function like `_.groupBy`.
66393 *
66394 * @private
66395 * @param {Function} setter The function to set accumulator values.
66396 * @param {Function} [initializer] The accumulator object initializer.
66397 * @returns {Function} Returns the new aggregator function.
66398 */
66399 function createAggregator(setter, initializer) {
66400 return function(collection, iteratee) {
66401 var func = isArray(collection) ? arrayAggregator : baseAggregator,
66402 accumulator = initializer ? initializer() : {};
66403
66404 return func(collection, setter, getIteratee(iteratee, 2), accumulator);
66405 };
66406 }
66407
66408 /**
66409 * Creates a function like `_.assign`.
66410 *
66411 * @private
66412 * @param {Function} assigner The function to assign values.
66413 * @returns {Function} Returns the new assigner function.
66414 */
66415 function createAssigner(assigner) {
66416 return baseRest(function(object, sources) {
66417 var index = -1,
66418 length = sources.length,
66419 customizer = length > 1 ? sources[length - 1] : undefined,
66420 guard = length > 2 ? sources[2] : undefined;
66421
66422 customizer = (assigner.length > 3 && typeof customizer == 'function')
66423 ? (length--, customizer)
66424 : undefined;
66425
66426 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
66427 customizer = length < 3 ? undefined : customizer;
66428 length = 1;
66429 }
66430 object = Object(object);
66431 while (++index < length) {
66432 var source = sources[index];
66433 if (source) {
66434 assigner(object, source, index, customizer);
66435 }
66436 }
66437 return object;
66438 });
66439 }
66440
66441 /**
66442 * Creates a `baseEach` or `baseEachRight` function.
66443 *
66444 * @private
66445 * @param {Function} eachFunc The function to iterate over a collection.
66446 * @param {boolean} [fromRight] Specify iterating from right to left.
66447 * @returns {Function} Returns the new base function.
66448 */
66449 function createBaseEach(eachFunc, fromRight) {
66450 return function(collection, iteratee) {
66451 if (collection == null) {
66452 return collection;
66453 }
66454 if (!isArrayLike(collection)) {
66455 return eachFunc(collection, iteratee);
66456 }
66457 var length = collection.length,
66458 index = fromRight ? length : -1,
66459 iterable = Object(collection);
66460
66461 while ((fromRight ? index-- : ++index < length)) {
66462 if (iteratee(iterable[index], index, iterable) === false) {
66463 break;
66464 }
66465 }
66466 return collection;
66467 };
66468 }
66469
66470 /**
66471 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
66472 *
66473 * @private
66474 * @param {boolean} [fromRight] Specify iterating from right to left.
66475 * @returns {Function} Returns the new base function.
66476 */
66477 function createBaseFor(fromRight) {
66478 return function(object, iteratee, keysFunc) {
66479 var index = -1,
66480 iterable = Object(object),
66481 props = keysFunc(object),
66482 length = props.length;
66483
66484 while (length--) {
66485 var key = props[fromRight ? length : ++index];
66486 if (iteratee(iterable[key], key, iterable) === false) {
66487 break;
66488 }
66489 }
66490 return object;
66491 };
66492 }
66493
66494 /**
66495 * Creates a function that wraps `func` to invoke it with the optional `this`
66496 * binding of `thisArg`.
66497 *
66498 * @private
66499 * @param {Function} func The function to wrap.
66500 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
66501 * @param {*} [thisArg] The `this` binding of `func`.
66502 * @returns {Function} Returns the new wrapped function.
66503 */
66504 function createBind(func, bitmask, thisArg) {
66505 var isBind = bitmask & WRAP_BIND_FLAG,
66506 Ctor = createCtor(func);
66507
66508 function wrapper() {
66509 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
66510 return fn.apply(isBind ? thisArg : this, arguments);
66511 }
66512 return wrapper;
66513 }
66514
66515 /**
66516 * Creates a function like `_.lowerFirst`.
66517 *
66518 * @private
66519 * @param {string} methodName The name of the `String` case method to use.
66520 * @returns {Function} Returns the new case function.
66521 */
66522 function createCaseFirst(methodName) {
66523 return function(string) {
66524 string = toString(string);
66525
66526 var strSymbols = hasUnicode(string)
66527 ? stringToArray(string)
66528 : undefined;
66529
66530 var chr = strSymbols
66531 ? strSymbols[0]
66532 : string.charAt(0);
66533
66534 var trailing = strSymbols
66535 ? castSlice(strSymbols, 1).join('')
66536 : string.slice(1);
66537
66538 return chr[methodName]() + trailing;
66539 };
66540 }
66541
66542 /**
66543 * Creates a function like `_.camelCase`.
66544 *
66545 * @private
66546 * @param {Function} callback The function to combine each word.
66547 * @returns {Function} Returns the new compounder function.
66548 */
66549 function createCompounder(callback) {
66550 return function(string) {
66551 return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
66552 };
66553 }
66554
66555 /**
66556 * Creates a function that produces an instance of `Ctor` regardless of
66557 * whether it was invoked as part of a `new` expression or by `call` or `apply`.
66558 *
66559 * @private
66560 * @param {Function} Ctor The constructor to wrap.
66561 * @returns {Function} Returns the new wrapped function.
66562 */
66563 function createCtor(Ctor) {
66564 return function() {
66565 // Use a `switch` statement to work with class constructors. See
66566 // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
66567 // for more details.
66568 var args = arguments;
66569 switch (args.length) {
66570 case 0: return new Ctor;
66571 case 1: return new Ctor(args[0]);
66572 case 2: return new Ctor(args[0], args[1]);
66573 case 3: return new Ctor(args[0], args[1], args[2]);
66574 case 4: return new Ctor(args[0], args[1], args[2], args[3]);
66575 case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
66576 case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
66577 case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
66578 }
66579 var thisBinding = baseCreate(Ctor.prototype),
66580 result = Ctor.apply(thisBinding, args);
66581
66582 // Mimic the constructor's `return` behavior.
66583 // See https://es5.github.io/#x13.2.2 for more details.
66584 return isObject(result) ? result : thisBinding;
66585 };
66586 }
66587
66588 /**
66589 * Creates a function that wraps `func` to enable currying.
66590 *
66591 * @private
66592 * @param {Function} func The function to wrap.
66593 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
66594 * @param {number} arity The arity of `func`.
66595 * @returns {Function} Returns the new wrapped function.
66596 */
66597 function createCurry(func, bitmask, arity) {
66598 var Ctor = createCtor(func);
66599
66600 function wrapper() {
66601 var length = arguments.length,
66602 args = Array(length),
66603 index = length,
66604 placeholder = getHolder(wrapper);
66605
66606 while (index--) {
66607 args[index] = arguments[index];
66608 }
66609 var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
66610 ? []
66611 : replaceHolders(args, placeholder);
66612
66613 length -= holders.length;
66614 if (length < arity) {
66615 return createRecurry(
66616 func, bitmask, createHybrid, wrapper.placeholder, undefined,
66617 args, holders, undefined, undefined, arity - length);
66618 }
66619 var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
66620 return apply(fn, this, args);
66621 }
66622 return wrapper;
66623 }
66624
66625 /**
66626 * Creates a `_.find` or `_.findLast` function.
66627 *
66628 * @private
66629 * @param {Function} findIndexFunc The function to find the collection index.
66630 * @returns {Function} Returns the new find function.
66631 */
66632 function createFind(findIndexFunc) {
66633 return function(collection, predicate, fromIndex) {
66634 var iterable = Object(collection);
66635 if (!isArrayLike(collection)) {
66636 var iteratee = getIteratee(predicate, 3);
66637 collection = keys(collection);
66638 predicate = function(key) { return iteratee(iterable[key], key, iterable); };
66639 }
66640 var index = findIndexFunc(collection, predicate, fromIndex);
66641 return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
66642 };
66643 }
66644
66645 /**
66646 * Creates a `_.flow` or `_.flowRight` function.
66647 *
66648 * @private
66649 * @param {boolean} [fromRight] Specify iterating from right to left.
66650 * @returns {Function} Returns the new flow function.
66651 */
66652 function createFlow(fromRight) {
66653 return flatRest(function(funcs) {
66654 var length = funcs.length,
66655 index = length,
66656 prereq = LodashWrapper.prototype.thru;
66657
66658 if (fromRight) {
66659 funcs.reverse();
66660 }
66661 while (index--) {
66662 var func = funcs[index];
66663 if (typeof func != 'function') {
66664 throw new TypeError(FUNC_ERROR_TEXT);
66665 }
66666 if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
66667 var wrapper = new LodashWrapper([], true);
66668 }
66669 }
66670 index = wrapper ? index : length;
66671 while (++index < length) {
66672 func = funcs[index];
66673
66674 var funcName = getFuncName(func),
66675 data = funcName == 'wrapper' ? getData(func) : undefined;
66676
66677 if (data && isLaziable(data[0]) &&
66678 data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
66679 !data[4].length && data[9] == 1
66680 ) {
66681 wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
66682 } else {
66683 wrapper = (func.length == 1 && isLaziable(func))
66684 ? wrapper[funcName]()
66685 : wrapper.thru(func);
66686 }
66687 }
66688 return function() {
66689 var args = arguments,
66690 value = args[0];
66691
66692 if (wrapper && args.length == 1 && isArray(value)) {
66693 return wrapper.plant(value).value();
66694 }
66695 var index = 0,
66696 result = length ? funcs[index].apply(this, args) : value;
66697
66698 while (++index < length) {
66699 result = funcs[index].call(this, result);
66700 }
66701 return result;
66702 };
66703 });
66704 }
66705
66706 /**
66707 * Creates a function that wraps `func` to invoke it with optional `this`
66708 * binding of `thisArg`, partial application, and currying.
66709 *
66710 * @private
66711 * @param {Function|string} func The function or method name to wrap.
66712 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
66713 * @param {*} [thisArg] The `this` binding of `func`.
66714 * @param {Array} [partials] The arguments to prepend to those provided to
66715 * the new function.
66716 * @param {Array} [holders] The `partials` placeholder indexes.
66717 * @param {Array} [partialsRight] The arguments to append to those provided
66718 * to the new function.
66719 * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
66720 * @param {Array} [argPos] The argument positions of the new function.
66721 * @param {number} [ary] The arity cap of `func`.
66722 * @param {number} [arity] The arity of `func`.
66723 * @returns {Function} Returns the new wrapped function.
66724 */
66725 function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
66726 var isAry = bitmask & WRAP_ARY_FLAG,
66727 isBind = bitmask & WRAP_BIND_FLAG,
66728 isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
66729 isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
66730 isFlip = bitmask & WRAP_FLIP_FLAG,
66731 Ctor = isBindKey ? undefined : createCtor(func);
66732
66733 function wrapper() {
66734 var length = arguments.length,
66735 args = Array(length),
66736 index = length;
66737
66738 while (index--) {
66739 args[index] = arguments[index];
66740 }
66741 if (isCurried) {
66742 var placeholder = getHolder(wrapper),
66743 holdersCount = countHolders(args, placeholder);
66744 }
66745 if (partials) {
66746 args = composeArgs(args, partials, holders, isCurried);
66747 }
66748 if (partialsRight) {
66749 args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
66750 }
66751 length -= holdersCount;
66752 if (isCurried && length < arity) {
66753 var newHolders = replaceHolders(args, placeholder);
66754 return createRecurry(
66755 func, bitmask, createHybrid, wrapper.placeholder, thisArg,
66756 args, newHolders, argPos, ary, arity - length
66757 );
66758 }
66759 var thisBinding = isBind ? thisArg : this,
66760 fn = isBindKey ? thisBinding[func] : func;
66761
66762 length = args.length;
66763 if (argPos) {
66764 args = reorder(args, argPos);
66765 } else if (isFlip && length > 1) {
66766 args.reverse();
66767 }
66768 if (isAry && ary < length) {
66769 args.length = ary;
66770 }
66771 if (this && this !== root && this instanceof wrapper) {
66772 fn = Ctor || createCtor(fn);
66773 }
66774 return fn.apply(thisBinding, args);
66775 }
66776 return wrapper;
66777 }
66778
66779 /**
66780 * Creates a function like `_.invertBy`.
66781 *
66782 * @private
66783 * @param {Function} setter The function to set accumulator values.
66784 * @param {Function} toIteratee The function to resolve iteratees.
66785 * @returns {Function} Returns the new inverter function.
66786 */
66787 function createInverter(setter, toIteratee) {
66788 return function(object, iteratee) {
66789 return baseInverter(object, setter, toIteratee(iteratee), {});
66790 };
66791 }
66792
66793 /**
66794 * Creates a function that performs a mathematical operation on two values.
66795 *
66796 * @private
66797 * @param {Function} operator The function to perform the operation.
66798 * @param {number} [defaultValue] The value used for `undefined` arguments.
66799 * @returns {Function} Returns the new mathematical operation function.
66800 */
66801 function createMathOperation(operator, defaultValue) {
66802 return function(value, other) {
66803 var result;
66804 if (value === undefined && other === undefined) {
66805 return defaultValue;
66806 }
66807 if (value !== undefined) {
66808 result = value;
66809 }
66810 if (other !== undefined) {
66811 if (result === undefined) {
66812 return other;
66813 }
66814 if (typeof value == 'string' || typeof other == 'string') {
66815 value = baseToString(value);
66816 other = baseToString(other);
66817 } else {
66818 value = baseToNumber(value);
66819 other = baseToNumber(other);
66820 }
66821 result = operator(value, other);
66822 }
66823 return result;
66824 };
66825 }
66826
66827 /**
66828 * Creates a function like `_.over`.
66829 *
66830 * @private
66831 * @param {Function} arrayFunc The function to iterate over iteratees.
66832 * @returns {Function} Returns the new over function.
66833 */
66834 function createOver(arrayFunc) {
66835 return flatRest(function(iteratees) {
66836 iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
66837 return baseRest(function(args) {
66838 var thisArg = this;
66839 return arrayFunc(iteratees, function(iteratee) {
66840 return apply(iteratee, thisArg, args);
66841 });
66842 });
66843 });
66844 }
66845
66846 /**
66847 * Creates the padding for `string` based on `length`. The `chars` string
66848 * is truncated if the number of characters exceeds `length`.
66849 *
66850 * @private
66851 * @param {number} length The padding length.
66852 * @param {string} [chars=' '] The string used as padding.
66853 * @returns {string} Returns the padding for `string`.
66854 */
66855 function createPadding(length, chars) {
66856 chars = chars === undefined ? ' ' : baseToString(chars);
66857
66858 var charsLength = chars.length;
66859 if (charsLength < 2) {
66860 return charsLength ? baseRepeat(chars, length) : chars;
66861 }
66862 var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
66863 return hasUnicode(chars)
66864 ? castSlice(stringToArray(result), 0, length).join('')
66865 : result.slice(0, length);
66866 }
66867
66868 /**
66869 * Creates a function that wraps `func` to invoke it with the `this` binding
66870 * of `thisArg` and `partials` prepended to the arguments it receives.
66871 *
66872 * @private
66873 * @param {Function} func The function to wrap.
66874 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
66875 * @param {*} thisArg The `this` binding of `func`.
66876 * @param {Array} partials The arguments to prepend to those provided to
66877 * the new function.
66878 * @returns {Function} Returns the new wrapped function.
66879 */
66880 function createPartial(func, bitmask, thisArg, partials) {
66881 var isBind = bitmask & WRAP_BIND_FLAG,
66882 Ctor = createCtor(func);
66883
66884 function wrapper() {
66885 var argsIndex = -1,
66886 argsLength = arguments.length,
66887 leftIndex = -1,
66888 leftLength = partials.length,
66889 args = Array(leftLength + argsLength),
66890 fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
66891
66892 while (++leftIndex < leftLength) {
66893 args[leftIndex] = partials[leftIndex];
66894 }
66895 while (argsLength--) {
66896 args[leftIndex++] = arguments[++argsIndex];
66897 }
66898 return apply(fn, isBind ? thisArg : this, args);
66899 }
66900 return wrapper;
66901 }
66902
66903 /**
66904 * Creates a `_.range` or `_.rangeRight` function.
66905 *
66906 * @private
66907 * @param {boolean} [fromRight] Specify iterating from right to left.
66908 * @returns {Function} Returns the new range function.
66909 */
66910 function createRange(fromRight) {
66911 return function(start, end, step) {
66912 if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
66913 end = step = undefined;
66914 }
66915 // Ensure the sign of `-0` is preserved.
66916 start = toFinite(start);
66917 if (end === undefined) {
66918 end = start;
66919 start = 0;
66920 } else {
66921 end = toFinite(end);
66922 }
66923 step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
66924 return baseRange(start, end, step, fromRight);
66925 };
66926 }
66927
66928 /**
66929 * Creates a function that performs a relational operation on two values.
66930 *
66931 * @private
66932 * @param {Function} operator The function to perform the operation.
66933 * @returns {Function} Returns the new relational operation function.
66934 */
66935 function createRelationalOperation(operator) {
66936 return function(value, other) {
66937 if (!(typeof value == 'string' && typeof other == 'string')) {
66938 value = toNumber(value);
66939 other = toNumber(other);
66940 }
66941 return operator(value, other);
66942 };
66943 }
66944
66945 /**
66946 * Creates a function that wraps `func` to continue currying.
66947 *
66948 * @private
66949 * @param {Function} func The function to wrap.
66950 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
66951 * @param {Function} wrapFunc The function to create the `func` wrapper.
66952 * @param {*} placeholder The placeholder value.
66953 * @param {*} [thisArg] The `this` binding of `func`.
66954 * @param {Array} [partials] The arguments to prepend to those provided to
66955 * the new function.
66956 * @param {Array} [holders] The `partials` placeholder indexes.
66957 * @param {Array} [argPos] The argument positions of the new function.
66958 * @param {number} [ary] The arity cap of `func`.
66959 * @param {number} [arity] The arity of `func`.
66960 * @returns {Function} Returns the new wrapped function.
66961 */
66962 function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
66963 var isCurry = bitmask & WRAP_CURRY_FLAG,
66964 newHolders = isCurry ? holders : undefined,
66965 newHoldersRight = isCurry ? undefined : holders,
66966 newPartials = isCurry ? partials : undefined,
66967 newPartialsRight = isCurry ? undefined : partials;
66968
66969 bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
66970 bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
66971
66972 if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
66973 bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
66974 }
66975 var newData = [
66976 func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
66977 newHoldersRight, argPos, ary, arity
66978 ];
66979
66980 var result = wrapFunc.apply(undefined, newData);
66981 if (isLaziable(func)) {
66982 setData(result, newData);
66983 }
66984 result.placeholder = placeholder;
66985 return setWrapToString(result, func, bitmask);
66986 }
66987
66988 /**
66989 * Creates a function like `_.round`.
66990 *
66991 * @private
66992 * @param {string} methodName The name of the `Math` method to use when rounding.
66993 * @returns {Function} Returns the new round function.
66994 */
66995 function createRound(methodName) {
66996 var func = Math[methodName];
66997 return function(number, precision) {
66998 number = toNumber(number);
66999 precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
67000 if (precision && nativeIsFinite(number)) {
67001 // Shift with exponential notation to avoid floating-point issues.
67002 // See [MDN](https://mdn.io/round#Examples) for more details.
67003 var pair = (toString(number) + 'e').split('e'),
67004 value = func(pair[0] + 'e' + (+pair[1] + precision));
67005
67006 pair = (toString(value) + 'e').split('e');
67007 return +(pair[0] + 'e' + (+pair[1] - precision));
67008 }
67009 return func(number);
67010 };
67011 }
67012
67013 /**
67014 * Creates a set object of `values`.
67015 *
67016 * @private
67017 * @param {Array} values The values to add to the set.
67018 * @returns {Object} Returns the new set.
67019 */
67020 var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
67021 return new Set(values);
67022 };
67023
67024 /**
67025 * Creates a `_.toPairs` or `_.toPairsIn` function.
67026 *
67027 * @private
67028 * @param {Function} keysFunc The function to get the keys of a given object.
67029 * @returns {Function} Returns the new pairs function.
67030 */
67031 function createToPairs(keysFunc) {
67032 return function(object) {
67033 var tag = getTag(object);
67034 if (tag == mapTag) {
67035 return mapToArray(object);
67036 }
67037 if (tag == setTag) {
67038 return setToPairs(object);
67039 }
67040 return baseToPairs(object, keysFunc(object));
67041 };
67042 }
67043
67044 /**
67045 * Creates a function that either curries or invokes `func` with optional
67046 * `this` binding and partially applied arguments.
67047 *
67048 * @private
67049 * @param {Function|string} func The function or method name to wrap.
67050 * @param {number} bitmask The bitmask flags.
67051 * 1 - `_.bind`
67052 * 2 - `_.bindKey`
67053 * 4 - `_.curry` or `_.curryRight` of a bound function
67054 * 8 - `_.curry`
67055 * 16 - `_.curryRight`
67056 * 32 - `_.partial`
67057 * 64 - `_.partialRight`
67058 * 128 - `_.rearg`
67059 * 256 - `_.ary`
67060 * 512 - `_.flip`
67061 * @param {*} [thisArg] The `this` binding of `func`.
67062 * @param {Array} [partials] The arguments to be partially applied.
67063 * @param {Array} [holders] The `partials` placeholder indexes.
67064 * @param {Array} [argPos] The argument positions of the new function.
67065 * @param {number} [ary] The arity cap of `func`.
67066 * @param {number} [arity] The arity of `func`.
67067 * @returns {Function} Returns the new wrapped function.
67068 */
67069 function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
67070 var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
67071 if (!isBindKey && typeof func != 'function') {
67072 throw new TypeError(FUNC_ERROR_TEXT);
67073 }
67074 var length = partials ? partials.length : 0;
67075 if (!length) {
67076 bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
67077 partials = holders = undefined;
67078 }
67079 ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
67080 arity = arity === undefined ? arity : toInteger(arity);
67081 length -= holders ? holders.length : 0;
67082
67083 if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
67084 var partialsRight = partials,
67085 holdersRight = holders;
67086
67087 partials = holders = undefined;
67088 }
67089 var data = isBindKey ? undefined : getData(func);
67090
67091 var newData = [
67092 func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
67093 argPos, ary, arity
67094 ];
67095
67096 if (data) {
67097 mergeData(newData, data);
67098 }
67099 func = newData[0];
67100 bitmask = newData[1];
67101 thisArg = newData[2];
67102 partials = newData[3];
67103 holders = newData[4];
67104 arity = newData[9] = newData[9] === undefined
67105 ? (isBindKey ? 0 : func.length)
67106 : nativeMax(newData[9] - length, 0);
67107
67108 if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
67109 bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
67110 }
67111 if (!bitmask || bitmask == WRAP_BIND_FLAG) {
67112 var result = createBind(func, bitmask, thisArg);
67113 } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
67114 result = createCurry(func, bitmask, arity);
67115 } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
67116 result = createPartial(func, bitmask, thisArg, partials);
67117 } else {
67118 result = createHybrid.apply(undefined, newData);
67119 }
67120 var setter = data ? baseSetData : setData;
67121 return setWrapToString(setter(result, newData), func, bitmask);
67122 }
67123
67124 /**
67125 * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
67126 * of source objects to the destination object for all destination properties
67127 * that resolve to `undefined`.
67128 *
67129 * @private
67130 * @param {*} objValue The destination value.
67131 * @param {*} srcValue The source value.
67132 * @param {string} key The key of the property to assign.
67133 * @param {Object} object The parent object of `objValue`.
67134 * @returns {*} Returns the value to assign.
67135 */
67136 function customDefaultsAssignIn(objValue, srcValue, key, object) {
67137 if (objValue === undefined ||
67138 (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
67139 return srcValue;
67140 }
67141 return objValue;
67142 }
67143
67144 /**
67145 * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
67146 * objects into destination objects that are passed thru.
67147 *
67148 * @private
67149 * @param {*} objValue The destination value.
67150 * @param {*} srcValue The source value.
67151 * @param {string} key The key of the property to merge.
67152 * @param {Object} object The parent object of `objValue`.
67153 * @param {Object} source The parent object of `srcValue`.
67154 * @param {Object} [stack] Tracks traversed source values and their merged
67155 * counterparts.
67156 * @returns {*} Returns the value to assign.
67157 */
67158 function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
67159 if (isObject(objValue) && isObject(srcValue)) {
67160 // Recursively merge objects and arrays (susceptible to call stack limits).
67161 stack.set(srcValue, objValue);
67162 baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
67163 stack['delete'](srcValue);
67164 }
67165 return objValue;
67166 }
67167
67168 /**
67169 * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
67170 * objects.
67171 *
67172 * @private
67173 * @param {*} value The value to inspect.
67174 * @param {string} key The key of the property to inspect.
67175 * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
67176 */
67177 function customOmitClone(value) {
67178 return isPlainObject(value) ? undefined : value;
67179 }
67180
67181 /**
67182 * A specialized version of `baseIsEqualDeep` for arrays with support for
67183 * partial deep comparisons.
67184 *
67185 * @private
67186 * @param {Array} array The array to compare.
67187 * @param {Array} other The other array to compare.
67188 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
67189 * @param {Function} customizer The function to customize comparisons.
67190 * @param {Function} equalFunc The function to determine equivalents of values.
67191 * @param {Object} stack Tracks traversed `array` and `other` objects.
67192 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
67193 */
67194 function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
67195 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
67196 arrLength = array.length,
67197 othLength = other.length;
67198
67199 if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
67200 return false;
67201 }
67202 // Assume cyclic values are equal.
67203 var stacked = stack.get(array);
67204 if (stacked && stack.get(other)) {
67205 return stacked == other;
67206 }
67207 var index = -1,
67208 result = true,
67209 seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
67210
67211 stack.set(array, other);
67212 stack.set(other, array);
67213
67214 // Ignore non-index properties.
67215 while (++index < arrLength) {
67216 var arrValue = array[index],
67217 othValue = other[index];
67218
67219 if (customizer) {
67220 var compared = isPartial
67221 ? customizer(othValue, arrValue, index, other, array, stack)
67222 : customizer(arrValue, othValue, index, array, other, stack);
67223 }
67224 if (compared !== undefined) {
67225 if (compared) {
67226 continue;
67227 }
67228 result = false;
67229 break;
67230 }
67231 // Recursively compare arrays (susceptible to call stack limits).
67232 if (seen) {
67233 if (!arraySome(other, function(othValue, othIndex) {
67234 if (!cacheHas(seen, othIndex) &&
67235 (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
67236 return seen.push(othIndex);
67237 }
67238 })) {
67239 result = false;
67240 break;
67241 }
67242 } else if (!(
67243 arrValue === othValue ||
67244 equalFunc(arrValue, othValue, bitmask, customizer, stack)
67245 )) {
67246 result = false;
67247 break;
67248 }
67249 }
67250 stack['delete'](array);
67251 stack['delete'](other);
67252 return result;
67253 }
67254
67255 /**
67256 * A specialized version of `baseIsEqualDeep` for comparing objects of
67257 * the same `toStringTag`.
67258 *
67259 * **Note:** This function only supports comparing values with tags of
67260 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
67261 *
67262 * @private
67263 * @param {Object} object The object to compare.
67264 * @param {Object} other The other object to compare.
67265 * @param {string} tag The `toStringTag` of the objects to compare.
67266 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
67267 * @param {Function} customizer The function to customize comparisons.
67268 * @param {Function} equalFunc The function to determine equivalents of values.
67269 * @param {Object} stack Tracks traversed `object` and `other` objects.
67270 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
67271 */
67272 function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
67273 switch (tag) {
67274 case dataViewTag:
67275 if ((object.byteLength != other.byteLength) ||
67276 (object.byteOffset != other.byteOffset)) {
67277 return false;
67278 }
67279 object = object.buffer;
67280 other = other.buffer;
67281
67282 case arrayBufferTag:
67283 if ((object.byteLength != other.byteLength) ||
67284 !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
67285 return false;
67286 }
67287 return true;
67288
67289 case boolTag:
67290 case dateTag:
67291 case numberTag:
67292 // Coerce booleans to `1` or `0` and dates to milliseconds.
67293 // Invalid dates are coerced to `NaN`.
67294 return eq(+object, +other);
67295
67296 case errorTag:
67297 return object.name == other.name && object.message == other.message;
67298
67299 case regexpTag:
67300 case stringTag:
67301 // Coerce regexes to strings and treat strings, primitives and objects,
67302 // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
67303 // for more details.
67304 return object == (other + '');
67305
67306 case mapTag:
67307 var convert = mapToArray;
67308
67309 case setTag:
67310 var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
67311 convert || (convert = setToArray);
67312
67313 if (object.size != other.size && !isPartial) {
67314 return false;
67315 }
67316 // Assume cyclic values are equal.
67317 var stacked = stack.get(object);
67318 if (stacked) {
67319 return stacked == other;
67320 }
67321 bitmask |= COMPARE_UNORDERED_FLAG;
67322
67323 // Recursively compare objects (susceptible to call stack limits).
67324 stack.set(object, other);
67325 var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
67326 stack['delete'](object);
67327 return result;
67328
67329 case symbolTag:
67330 if (symbolValueOf) {
67331 return symbolValueOf.call(object) == symbolValueOf.call(other);
67332 }
67333 }
67334 return false;
67335 }
67336
67337 /**
67338 * A specialized version of `baseIsEqualDeep` for objects with support for
67339 * partial deep comparisons.
67340 *
67341 * @private
67342 * @param {Object} object The object to compare.
67343 * @param {Object} other The other object to compare.
67344 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
67345 * @param {Function} customizer The function to customize comparisons.
67346 * @param {Function} equalFunc The function to determine equivalents of values.
67347 * @param {Object} stack Tracks traversed `object` and `other` objects.
67348 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
67349 */
67350 function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
67351 var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
67352 objProps = getAllKeys(object),
67353 objLength = objProps.length,
67354 othProps = getAllKeys(other),
67355 othLength = othProps.length;
67356
67357 if (objLength != othLength && !isPartial) {
67358 return false;
67359 }
67360 var index = objLength;
67361 while (index--) {
67362 var key = objProps[index];
67363 if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
67364 return false;
67365 }
67366 }
67367 // Assume cyclic values are equal.
67368 var stacked = stack.get(object);
67369 if (stacked && stack.get(other)) {
67370 return stacked == other;
67371 }
67372 var result = true;
67373 stack.set(object, other);
67374 stack.set(other, object);
67375
67376 var skipCtor = isPartial;
67377 while (++index < objLength) {
67378 key = objProps[index];
67379 var objValue = object[key],
67380 othValue = other[key];
67381
67382 if (customizer) {
67383 var compared = isPartial
67384 ? customizer(othValue, objValue, key, other, object, stack)
67385 : customizer(objValue, othValue, key, object, other, stack);
67386 }
67387 // Recursively compare objects (susceptible to call stack limits).
67388 if (!(compared === undefined
67389 ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
67390 : compared
67391 )) {
67392 result = false;
67393 break;
67394 }
67395 skipCtor || (skipCtor = key == 'constructor');
67396 }
67397 if (result && !skipCtor) {
67398 var objCtor = object.constructor,
67399 othCtor = other.constructor;
67400
67401 // Non `Object` object instances with different constructors are not equal.
67402 if (objCtor != othCtor &&
67403 ('constructor' in object && 'constructor' in other) &&
67404 !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
67405 typeof othCtor == 'function' && othCtor instanceof othCtor)) {
67406 result = false;
67407 }
67408 }
67409 stack['delete'](object);
67410 stack['delete'](other);
67411 return result;
67412 }
67413
67414 /**
67415 * A specialized version of `baseRest` which flattens the rest array.
67416 *
67417 * @private
67418 * @param {Function} func The function to apply a rest parameter to.
67419 * @returns {Function} Returns the new function.
67420 */
67421 function flatRest(func) {
67422 return setToString(overRest(func, undefined, flatten), func + '');
67423 }
67424
67425 /**
67426 * Creates an array of own enumerable property names and symbols of `object`.
67427 *
67428 * @private
67429 * @param {Object} object The object to query.
67430 * @returns {Array} Returns the array of property names and symbols.
67431 */
67432 function getAllKeys(object) {
67433 return baseGetAllKeys(object, keys, getSymbols);
67434 }
67435
67436 /**
67437 * Creates an array of own and inherited enumerable property names and
67438 * symbols of `object`.
67439 *
67440 * @private
67441 * @param {Object} object The object to query.
67442 * @returns {Array} Returns the array of property names and symbols.
67443 */
67444 function getAllKeysIn(object) {
67445 return baseGetAllKeys(object, keysIn, getSymbolsIn);
67446 }
67447
67448 /**
67449 * Gets metadata for `func`.
67450 *
67451 * @private
67452 * @param {Function} func The function to query.
67453 * @returns {*} Returns the metadata for `func`.
67454 */
67455 var getData = !metaMap ? noop : function(func) {
67456 return metaMap.get(func);
67457 };
67458
67459 /**
67460 * Gets the name of `func`.
67461 *
67462 * @private
67463 * @param {Function} func The function to query.
67464 * @returns {string} Returns the function name.
67465 */
67466 function getFuncName(func) {
67467 var result = (func.name + ''),
67468 array = realNames[result],
67469 length = hasOwnProperty.call(realNames, result) ? array.length : 0;
67470
67471 while (length--) {
67472 var data = array[length],
67473 otherFunc = data.func;
67474 if (otherFunc == null || otherFunc == func) {
67475 return data.name;
67476 }
67477 }
67478 return result;
67479 }
67480
67481 /**
67482 * Gets the argument placeholder value for `func`.
67483 *
67484 * @private
67485 * @param {Function} func The function to inspect.
67486 * @returns {*} Returns the placeholder value.
67487 */
67488 function getHolder(func) {
67489 var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
67490 return object.placeholder;
67491 }
67492
67493 /**
67494 * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
67495 * this function returns the custom method, otherwise it returns `baseIteratee`.
67496 * If arguments are provided, the chosen function is invoked with them and
67497 * its result is returned.
67498 *
67499 * @private
67500 * @param {*} [value] The value to convert to an iteratee.
67501 * @param {number} [arity] The arity of the created iteratee.
67502 * @returns {Function} Returns the chosen function or its result.
67503 */
67504 function getIteratee() {
67505 var result = lodash.iteratee || iteratee;
67506 result = result === iteratee ? baseIteratee : result;
67507 return arguments.length ? result(arguments[0], arguments[1]) : result;
67508 }
67509
67510 /**
67511 * Gets the data for `map`.
67512 *
67513 * @private
67514 * @param {Object} map The map to query.
67515 * @param {string} key The reference key.
67516 * @returns {*} Returns the map data.
67517 */
67518 function getMapData(map, key) {
67519 var data = map.__data__;
67520 return isKeyable(key)
67521 ? data[typeof key == 'string' ? 'string' : 'hash']
67522 : data.map;
67523 }
67524
67525 /**
67526 * Gets the property names, values, and compare flags of `object`.
67527 *
67528 * @private
67529 * @param {Object} object The object to query.
67530 * @returns {Array} Returns the match data of `object`.
67531 */
67532 function getMatchData(object) {
67533 var result = keys(object),
67534 length = result.length;
67535
67536 while (length--) {
67537 var key = result[length],
67538 value = object[key];
67539
67540 result[length] = [key, value, isStrictComparable(value)];
67541 }
67542 return result;
67543 }
67544
67545 /**
67546 * Gets the native function at `key` of `object`.
67547 *
67548 * @private
67549 * @param {Object} object The object to query.
67550 * @param {string} key The key of the method to get.
67551 * @returns {*} Returns the function if it's native, else `undefined`.
67552 */
67553 function getNative(object, key) {
67554 var value = getValue(object, key);
67555 return baseIsNative(value) ? value : undefined;
67556 }
67557
67558 /**
67559 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
67560 *
67561 * @private
67562 * @param {*} value The value to query.
67563 * @returns {string} Returns the raw `toStringTag`.
67564 */
67565 function getRawTag(value) {
67566 var isOwn = hasOwnProperty.call(value, symToStringTag),
67567 tag = value[symToStringTag];
67568
67569 try {
67570 value[symToStringTag] = undefined;
67571 var unmasked = true;
67572 } catch (e) {}
67573
67574 var result = nativeObjectToString.call(value);
67575 if (unmasked) {
67576 if (isOwn) {
67577 value[symToStringTag] = tag;
67578 } else {
67579 delete value[symToStringTag];
67580 }
67581 }
67582 return result;
67583 }
67584
67585 /**
67586 * Creates an array of the own enumerable symbols of `object`.
67587 *
67588 * @private
67589 * @param {Object} object The object to query.
67590 * @returns {Array} Returns the array of symbols.
67591 */
67592 var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
67593 if (object == null) {
67594 return [];
67595 }
67596 object = Object(object);
67597 return arrayFilter(nativeGetSymbols(object), function(symbol) {
67598 return propertyIsEnumerable.call(object, symbol);
67599 });
67600 };
67601
67602 /**
67603 * Creates an array of the own and inherited enumerable symbols of `object`.
67604 *
67605 * @private
67606 * @param {Object} object The object to query.
67607 * @returns {Array} Returns the array of symbols.
67608 */
67609 var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
67610 var result = [];
67611 while (object) {
67612 arrayPush(result, getSymbols(object));
67613 object = getPrototype(object);
67614 }
67615 return result;
67616 };
67617
67618 /**
67619 * Gets the `toStringTag` of `value`.
67620 *
67621 * @private
67622 * @param {*} value The value to query.
67623 * @returns {string} Returns the `toStringTag`.
67624 */
67625 var getTag = baseGetTag;
67626
67627 // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
67628 if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
67629 (Map && getTag(new Map) != mapTag) ||
67630 (Promise && getTag(Promise.resolve()) != promiseTag) ||
67631 (Set && getTag(new Set) != setTag) ||
67632 (WeakMap && getTag(new WeakMap) != weakMapTag)) {
67633 getTag = function(value) {
67634 var result = baseGetTag(value),
67635 Ctor = result == objectTag ? value.constructor : undefined,
67636 ctorString = Ctor ? toSource(Ctor) : '';
67637
67638 if (ctorString) {
67639 switch (ctorString) {
67640 case dataViewCtorString: return dataViewTag;
67641 case mapCtorString: return mapTag;
67642 case promiseCtorString: return promiseTag;
67643 case setCtorString: return setTag;
67644 case weakMapCtorString: return weakMapTag;
67645 }
67646 }
67647 return result;
67648 };
67649 }
67650
67651 /**
67652 * Gets the view, applying any `transforms` to the `start` and `end` positions.
67653 *
67654 * @private
67655 * @param {number} start The start of the view.
67656 * @param {number} end The end of the view.
67657 * @param {Array} transforms The transformations to apply to the view.
67658 * @returns {Object} Returns an object containing the `start` and `end`
67659 * positions of the view.
67660 */
67661 function getView(start, end, transforms) {
67662 var index = -1,
67663 length = transforms.length;
67664
67665 while (++index < length) {
67666 var data = transforms[index],
67667 size = data.size;
67668
67669 switch (data.type) {
67670 case 'drop': start += size; break;
67671 case 'dropRight': end -= size; break;
67672 case 'take': end = nativeMin(end, start + size); break;
67673 case 'takeRight': start = nativeMax(start, end - size); break;
67674 }
67675 }
67676 return { 'start': start, 'end': end };
67677 }
67678
67679 /**
67680 * Extracts wrapper details from the `source` body comment.
67681 *
67682 * @private
67683 * @param {string} source The source to inspect.
67684 * @returns {Array} Returns the wrapper details.
67685 */
67686 function getWrapDetails(source) {
67687 var match = source.match(reWrapDetails);
67688 return match ? match[1].split(reSplitDetails) : [];
67689 }
67690
67691 /**
67692 * Checks if `path` exists on `object`.
67693 *
67694 * @private
67695 * @param {Object} object The object to query.
67696 * @param {Array|string} path The path to check.
67697 * @param {Function} hasFunc The function to check properties.
67698 * @returns {boolean} Returns `true` if `path` exists, else `false`.
67699 */
67700 function hasPath(object, path, hasFunc) {
67701 path = castPath(path, object);
67702
67703 var index = -1,
67704 length = path.length,
67705 result = false;
67706
67707 while (++index < length) {
67708 var key = toKey(path[index]);
67709 if (!(result = object != null && hasFunc(object, key))) {
67710 break;
67711 }
67712 object = object[key];
67713 }
67714 if (result || ++index != length) {
67715 return result;
67716 }
67717 length = object == null ? 0 : object.length;
67718 return !!length && isLength(length) && isIndex(key, length) &&
67719 (isArray(object) || isArguments(object));
67720 }
67721
67722 /**
67723 * Initializes an array clone.
67724 *
67725 * @private
67726 * @param {Array} array The array to clone.
67727 * @returns {Array} Returns the initialized clone.
67728 */
67729 function initCloneArray(array) {
67730 var length = array.length,
67731 result = new array.constructor(length);
67732
67733 // Add properties assigned by `RegExp#exec`.
67734 if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
67735 result.index = array.index;
67736 result.input = array.input;
67737 }
67738 return result;
67739 }
67740
67741 /**
67742 * Initializes an object clone.
67743 *
67744 * @private
67745 * @param {Object} object The object to clone.
67746 * @returns {Object} Returns the initialized clone.
67747 */
67748 function initCloneObject(object) {
67749 return (typeof object.constructor == 'function' && !isPrototype(object))
67750 ? baseCreate(getPrototype(object))
67751 : {};
67752 }
67753
67754 /**
67755 * Initializes an object clone based on its `toStringTag`.
67756 *
67757 * **Note:** This function only supports cloning values with tags of
67758 * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
67759 *
67760 * @private
67761 * @param {Object} object The object to clone.
67762 * @param {string} tag The `toStringTag` of the object to clone.
67763 * @param {boolean} [isDeep] Specify a deep clone.
67764 * @returns {Object} Returns the initialized clone.
67765 */
67766 function initCloneByTag(object, tag, isDeep) {
67767 var Ctor = object.constructor;
67768 switch (tag) {
67769 case arrayBufferTag:
67770 return cloneArrayBuffer(object);
67771
67772 case boolTag:
67773 case dateTag:
67774 return new Ctor(+object);
67775
67776 case dataViewTag:
67777 return cloneDataView(object, isDeep);
67778
67779 case float32Tag: case float64Tag:
67780 case int8Tag: case int16Tag: case int32Tag:
67781 case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
67782 return cloneTypedArray(object, isDeep);
67783
67784 case mapTag:
67785 return new Ctor;
67786
67787 case numberTag:
67788 case stringTag:
67789 return new Ctor(object);
67790
67791 case regexpTag:
67792 return cloneRegExp(object);
67793
67794 case setTag:
67795 return new Ctor;
67796
67797 case symbolTag:
67798 return cloneSymbol(object);
67799 }
67800 }
67801
67802 /**
67803 * Inserts wrapper `details` in a comment at the top of the `source` body.
67804 *
67805 * @private
67806 * @param {string} source The source to modify.
67807 * @returns {Array} details The details to insert.
67808 * @returns {string} Returns the modified source.
67809 */
67810 function insertWrapDetails(source, details) {
67811 var length = details.length;
67812 if (!length) {
67813 return source;
67814 }
67815 var lastIndex = length - 1;
67816 details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
67817 details = details.join(length > 2 ? ', ' : ' ');
67818 return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
67819 }
67820
67821 /**
67822 * Checks if `value` is a flattenable `arguments` object or array.
67823 *
67824 * @private
67825 * @param {*} value The value to check.
67826 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
67827 */
67828 function isFlattenable(value) {
67829 return isArray(value) || isArguments(value) ||
67830 !!(spreadableSymbol && value && value[spreadableSymbol]);
67831 }
67832
67833 /**
67834 * Checks if `value` is a valid array-like index.
67835 *
67836 * @private
67837 * @param {*} value The value to check.
67838 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
67839 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
67840 */
67841 function isIndex(value, length) {
67842 var type = typeof value;
67843 length = length == null ? MAX_SAFE_INTEGER : length;
67844
67845 return !!length &&
67846 (type == 'number' ||
67847 (type != 'symbol' && reIsUint.test(value))) &&
67848 (value > -1 && value % 1 == 0 && value < length);
67849 }
67850
67851 /**
67852 * Checks if the given arguments are from an iteratee call.
67853 *
67854 * @private
67855 * @param {*} value The potential iteratee value argument.
67856 * @param {*} index The potential iteratee index or key argument.
67857 * @param {*} object The potential iteratee object argument.
67858 * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
67859 * else `false`.
67860 */
67861 function isIterateeCall(value, index, object) {
67862 if (!isObject(object)) {
67863 return false;
67864 }
67865 var type = typeof index;
67866 if (type == 'number'
67867 ? (isArrayLike(object) && isIndex(index, object.length))
67868 : (type == 'string' && index in object)
67869 ) {
67870 return eq(object[index], value);
67871 }
67872 return false;
67873 }
67874
67875 /**
67876 * Checks if `value` is a property name and not a property path.
67877 *
67878 * @private
67879 * @param {*} value The value to check.
67880 * @param {Object} [object] The object to query keys on.
67881 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
67882 */
67883 function isKey(value, object) {
67884 if (isArray(value)) {
67885 return false;
67886 }
67887 var type = typeof value;
67888 if (type == 'number' || type == 'symbol' || type == 'boolean' ||
67889 value == null || isSymbol(value)) {
67890 return true;
67891 }
67892 return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
67893 (object != null && value in Object(object));
67894 }
67895
67896 /**
67897 * Checks if `value` is suitable for use as unique object key.
67898 *
67899 * @private
67900 * @param {*} value The value to check.
67901 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
67902 */
67903 function isKeyable(value) {
67904 var type = typeof value;
67905 return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
67906 ? (value !== '__proto__')
67907 : (value === null);
67908 }
67909
67910 /**
67911 * Checks if `func` has a lazy counterpart.
67912 *
67913 * @private
67914 * @param {Function} func The function to check.
67915 * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
67916 * else `false`.
67917 */
67918 function isLaziable(func) {
67919 var funcName = getFuncName(func),
67920 other = lodash[funcName];
67921
67922 if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
67923 return false;
67924 }
67925 if (func === other) {
67926 return true;
67927 }
67928 var data = getData(other);
67929 return !!data && func === data[0];
67930 }
67931
67932 /**
67933 * Checks if `func` has its source masked.
67934 *
67935 * @private
67936 * @param {Function} func The function to check.
67937 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
67938 */
67939 function isMasked(func) {
67940 return !!maskSrcKey && (maskSrcKey in func);
67941 }
67942
67943 /**
67944 * Checks if `func` is capable of being masked.
67945 *
67946 * @private
67947 * @param {*} value The value to check.
67948 * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
67949 */
67950 var isMaskable = coreJsData ? isFunction : stubFalse;
67951
67952 /**
67953 * Checks if `value` is likely a prototype object.
67954 *
67955 * @private
67956 * @param {*} value The value to check.
67957 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
67958 */
67959 function isPrototype(value) {
67960 var Ctor = value && value.constructor,
67961 proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
67962
67963 return value === proto;
67964 }
67965
67966 /**
67967 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
67968 *
67969 * @private
67970 * @param {*} value The value to check.
67971 * @returns {boolean} Returns `true` if `value` if suitable for strict
67972 * equality comparisons, else `false`.
67973 */
67974 function isStrictComparable(value) {
67975 return value === value && !isObject(value);
67976 }
67977
67978 /**
67979 * A specialized version of `matchesProperty` for source values suitable
67980 * for strict equality comparisons, i.e. `===`.
67981 *
67982 * @private
67983 * @param {string} key The key of the property to get.
67984 * @param {*} srcValue The value to match.
67985 * @returns {Function} Returns the new spec function.
67986 */
67987 function matchesStrictComparable(key, srcValue) {
67988 return function(object) {
67989 if (object == null) {
67990 return false;
67991 }
67992 return object[key] === srcValue &&
67993 (srcValue !== undefined || (key in Object(object)));
67994 };
67995 }
67996
67997 /**
67998 * A specialized version of `_.memoize` which clears the memoized function's
67999 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
68000 *
68001 * @private
68002 * @param {Function} func The function to have its output memoized.
68003 * @returns {Function} Returns the new memoized function.
68004 */
68005 function memoizeCapped(func) {
68006 var result = memoize(func, function(key) {
68007 if (cache.size === MAX_MEMOIZE_SIZE) {
68008 cache.clear();
68009 }
68010 return key;
68011 });
68012
68013 var cache = result.cache;
68014 return result;
68015 }
68016
68017 /**
68018 * Merges the function metadata of `source` into `data`.
68019 *
68020 * Merging metadata reduces the number of wrappers used to invoke a function.
68021 * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
68022 * may be applied regardless of execution order. Methods like `_.ary` and
68023 * `_.rearg` modify function arguments, making the order in which they are
68024 * executed important, preventing the merging of metadata. However, we make
68025 * an exception for a safe combined case where curried functions have `_.ary`
68026 * and or `_.rearg` applied.
68027 *
68028 * @private
68029 * @param {Array} data The destination metadata.
68030 * @param {Array} source The source metadata.
68031 * @returns {Array} Returns `data`.
68032 */
68033 function mergeData(data, source) {
68034 var bitmask = data[1],
68035 srcBitmask = source[1],
68036 newBitmask = bitmask | srcBitmask,
68037 isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
68038
68039 var isCombo =
68040 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
68041 ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
68042 ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
68043
68044 // Exit early if metadata can't be merged.
68045 if (!(isCommon || isCombo)) {
68046 return data;
68047 }
68048 // Use source `thisArg` if available.
68049 if (srcBitmask & WRAP_BIND_FLAG) {
68050 data[2] = source[2];
68051 // Set when currying a bound function.
68052 newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
68053 }
68054 // Compose partial arguments.
68055 var value = source[3];
68056 if (value) {
68057 var partials = data[3];
68058 data[3] = partials ? composeArgs(partials, value, source[4]) : value;
68059 data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
68060 }
68061 // Compose partial right arguments.
68062 value = source[5];
68063 if (value) {
68064 partials = data[5];
68065 data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
68066 data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
68067 }
68068 // Use source `argPos` if available.
68069 value = source[7];
68070 if (value) {
68071 data[7] = value;
68072 }
68073 // Use source `ary` if it's smaller.
68074 if (srcBitmask & WRAP_ARY_FLAG) {
68075 data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
68076 }
68077 // Use source `arity` if one is not provided.
68078 if (data[9] == null) {
68079 data[9] = source[9];
68080 }
68081 // Use source `func` and merge bitmasks.
68082 data[0] = source[0];
68083 data[1] = newBitmask;
68084
68085 return data;
68086 }
68087
68088 /**
68089 * This function is like
68090 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
68091 * except that it includes inherited enumerable properties.
68092 *
68093 * @private
68094 * @param {Object} object The object to query.
68095 * @returns {Array} Returns the array of property names.
68096 */
68097 function nativeKeysIn(object) {
68098 var result = [];
68099 if (object != null) {
68100 for (var key in Object(object)) {
68101 result.push(key);
68102 }
68103 }
68104 return result;
68105 }
68106
68107 /**
68108 * Converts `value` to a string using `Object.prototype.toString`.
68109 *
68110 * @private
68111 * @param {*} value The value to convert.
68112 * @returns {string} Returns the converted string.
68113 */
68114 function objectToString(value) {
68115 return nativeObjectToString.call(value);
68116 }
68117
68118 /**
68119 * A specialized version of `baseRest` which transforms the rest array.
68120 *
68121 * @private
68122 * @param {Function} func The function to apply a rest parameter to.
68123 * @param {number} [start=func.length-1] The start position of the rest parameter.
68124 * @param {Function} transform The rest array transform.
68125 * @returns {Function} Returns the new function.
68126 */
68127 function overRest(func, start, transform) {
68128 start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
68129 return function() {
68130 var args = arguments,
68131 index = -1,
68132 length = nativeMax(args.length - start, 0),
68133 array = Array(length);
68134
68135 while (++index < length) {
68136 array[index] = args[start + index];
68137 }
68138 index = -1;
68139 var otherArgs = Array(start + 1);
68140 while (++index < start) {
68141 otherArgs[index] = args[index];
68142 }
68143 otherArgs[start] = transform(array);
68144 return apply(func, this, otherArgs);
68145 };
68146 }
68147
68148 /**
68149 * Gets the parent value at `path` of `object`.
68150 *
68151 * @private
68152 * @param {Object} object The object to query.
68153 * @param {Array} path The path to get the parent value of.
68154 * @returns {*} Returns the parent value.
68155 */
68156 function parent(object, path) {
68157 return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
68158 }
68159
68160 /**
68161 * Reorder `array` according to the specified indexes where the element at
68162 * the first index is assigned as the first element, the element at
68163 * the second index is assigned as the second element, and so on.
68164 *
68165 * @private
68166 * @param {Array} array The array to reorder.
68167 * @param {Array} indexes The arranged array indexes.
68168 * @returns {Array} Returns `array`.
68169 */
68170 function reorder(array, indexes) {
68171 var arrLength = array.length,
68172 length = nativeMin(indexes.length, arrLength),
68173 oldArray = copyArray(array);
68174
68175 while (length--) {
68176 var index = indexes[length];
68177 array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
68178 }
68179 return array;
68180 }
68181
68182 /**
68183 * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
68184 *
68185 * @private
68186 * @param {Object} object The object to query.
68187 * @param {string} key The key of the property to get.
68188 * @returns {*} Returns the property value.
68189 */
68190 function safeGet(object, key) {
68191 if (key === 'constructor' && typeof object[key] === 'function') {
68192 return;
68193 }
68194
68195 if (key == '__proto__') {
68196 return;
68197 }
68198
68199 return object[key];
68200 }
68201
68202 /**
68203 * Sets metadata for `func`.
68204 *
68205 * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
68206 * period of time, it will trip its breaker and transition to an identity
68207 * function to avoid garbage collection pauses in V8. See
68208 * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
68209 * for more details.
68210 *
68211 * @private
68212 * @param {Function} func The function to associate metadata with.
68213 * @param {*} data The metadata.
68214 * @returns {Function} Returns `func`.
68215 */
68216 var setData = shortOut(baseSetData);
68217
68218 /**
68219 * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
68220 *
68221 * @private
68222 * @param {Function} func The function to delay.
68223 * @param {number} wait The number of milliseconds to delay invocation.
68224 * @returns {number|Object} Returns the timer id or timeout object.
68225 */
68226 var setTimeout = ctxSetTimeout || function(func, wait) {
68227 return root.setTimeout(func, wait);
68228 };
68229
68230 /**
68231 * Sets the `toString` method of `func` to return `string`.
68232 *
68233 * @private
68234 * @param {Function} func The function to modify.
68235 * @param {Function} string The `toString` result.
68236 * @returns {Function} Returns `func`.
68237 */
68238 var setToString = shortOut(baseSetToString);
68239
68240 /**
68241 * Sets the `toString` method of `wrapper` to mimic the source of `reference`
68242 * with wrapper details in a comment at the top of the source body.
68243 *
68244 * @private
68245 * @param {Function} wrapper The function to modify.
68246 * @param {Function} reference The reference function.
68247 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
68248 * @returns {Function} Returns `wrapper`.
68249 */
68250 function setWrapToString(wrapper, reference, bitmask) {
68251 var source = (reference + '');
68252 return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
68253 }
68254
68255 /**
68256 * Creates a function that'll short out and invoke `identity` instead
68257 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
68258 * milliseconds.
68259 *
68260 * @private
68261 * @param {Function} func The function to restrict.
68262 * @returns {Function} Returns the new shortable function.
68263 */
68264 function shortOut(func) {
68265 var count = 0,
68266 lastCalled = 0;
68267
68268 return function() {
68269 var stamp = nativeNow(),
68270 remaining = HOT_SPAN - (stamp - lastCalled);
68271
68272 lastCalled = stamp;
68273 if (remaining > 0) {
68274 if (++count >= HOT_COUNT) {
68275 return arguments[0];
68276 }
68277 } else {
68278 count = 0;
68279 }
68280 return func.apply(undefined, arguments);
68281 };
68282 }
68283
68284 /**
68285 * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
68286 *
68287 * @private
68288 * @param {Array} array The array to shuffle.
68289 * @param {number} [size=array.length] The size of `array`.
68290 * @returns {Array} Returns `array`.
68291 */
68292 function shuffleSelf(array, size) {
68293 var index = -1,
68294 length = array.length,
68295 lastIndex = length - 1;
68296
68297 size = size === undefined ? length : size;
68298 while (++index < size) {
68299 var rand = baseRandom(index, lastIndex),
68300 value = array[rand];
68301
68302 array[rand] = array[index];
68303 array[index] = value;
68304 }
68305 array.length = size;
68306 return array;
68307 }
68308
68309 /**
68310 * Converts `string` to a property path array.
68311 *
68312 * @private
68313 * @param {string} string The string to convert.
68314 * @returns {Array} Returns the property path array.
68315 */
68316 var stringToPath = memoizeCapped(function(string) {
68317 var result = [];
68318 if (string.charCodeAt(0) === 46 /* . */) {
68319 result.push('');
68320 }
68321 string.replace(rePropName, function(match, number, quote, subString) {
68322 result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
68323 });
68324 return result;
68325 });
68326
68327 /**
68328 * Converts `value` to a string key if it's not a string or symbol.
68329 *
68330 * @private
68331 * @param {*} value The value to inspect.
68332 * @returns {string|symbol} Returns the key.
68333 */
68334 function toKey(value) {
68335 if (typeof value == 'string' || isSymbol(value)) {
68336 return value;
68337 }
68338 var result = (value + '');
68339 return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
68340 }
68341
68342 /**
68343 * Converts `func` to its source code.
68344 *
68345 * @private
68346 * @param {Function} func The function to convert.
68347 * @returns {string} Returns the source code.
68348 */
68349 function toSource(func) {
68350 if (func != null) {
68351 try {
68352 return funcToString.call(func);
68353 } catch (e) {}
68354 try {
68355 return (func + '');
68356 } catch (e) {}
68357 }
68358 return '';
68359 }
68360
68361 /**
68362 * Updates wrapper `details` based on `bitmask` flags.
68363 *
68364 * @private
68365 * @returns {Array} details The details to modify.
68366 * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
68367 * @returns {Array} Returns `details`.
68368 */
68369 function updateWrapDetails(details, bitmask) {
68370 arrayEach(wrapFlags, function(pair) {
68371 var value = '_.' + pair[0];
68372 if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
68373 details.push(value);
68374 }
68375 });
68376 return details.sort();
68377 }
68378
68379 /**
68380 * Creates a clone of `wrapper`.
68381 *
68382 * @private
68383 * @param {Object} wrapper The wrapper to clone.
68384 * @returns {Object} Returns the cloned wrapper.
68385 */
68386 function wrapperClone(wrapper) {
68387 if (wrapper instanceof LazyWrapper) {
68388 return wrapper.clone();
68389 }
68390 var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
68391 result.__actions__ = copyArray(wrapper.__actions__);
68392 result.__index__ = wrapper.__index__;
68393 result.__values__ = wrapper.__values__;
68394 return result;
68395 }
68396
68397 /*------------------------------------------------------------------------*/
68398
68399 /**
68400 * Creates an array of elements split into groups the length of `size`.
68401 * If `array` can't be split evenly, the final chunk will be the remaining
68402 * elements.
68403 *
68404 * @static
68405 * @memberOf _
68406 * @since 3.0.0
68407 * @category Array
68408 * @param {Array} array The array to process.
68409 * @param {number} [size=1] The length of each chunk
68410 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
68411 * @returns {Array} Returns the new array of chunks.
68412 * @example
68413 *
68414 * _.chunk(['a', 'b', 'c', 'd'], 2);
68415 * // => [['a', 'b'], ['c', 'd']]
68416 *
68417 * _.chunk(['a', 'b', 'c', 'd'], 3);
68418 * // => [['a', 'b', 'c'], ['d']]
68419 */
68420 function chunk(array, size, guard) {
68421 if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
68422 size = 1;
68423 } else {
68424 size = nativeMax(toInteger(size), 0);
68425 }
68426 var length = array == null ? 0 : array.length;
68427 if (!length || size < 1) {
68428 return [];
68429 }
68430 var index = 0,
68431 resIndex = 0,
68432 result = Array(nativeCeil(length / size));
68433
68434 while (index < length) {
68435 result[resIndex++] = baseSlice(array, index, (index += size));
68436 }
68437 return result;
68438 }
68439
68440 /**
68441 * Creates an array with all falsey values removed. The values `false`, `null`,
68442 * `0`, `""`, `undefined`, and `NaN` are falsey.
68443 *
68444 * @static
68445 * @memberOf _
68446 * @since 0.1.0
68447 * @category Array
68448 * @param {Array} array The array to compact.
68449 * @returns {Array} Returns the new array of filtered values.
68450 * @example
68451 *
68452 * _.compact([0, 1, false, 2, '', 3]);
68453 * // => [1, 2, 3]
68454 */
68455 function compact(array) {
68456 var index = -1,
68457 length = array == null ? 0 : array.length,
68458 resIndex = 0,
68459 result = [];
68460
68461 while (++index < length) {
68462 var value = array[index];
68463 if (value) {
68464 result[resIndex++] = value;
68465 }
68466 }
68467 return result;
68468 }
68469
68470 /**
68471 * Creates a new array concatenating `array` with any additional arrays
68472 * and/or values.
68473 *
68474 * @static
68475 * @memberOf _
68476 * @since 4.0.0
68477 * @category Array
68478 * @param {Array} array The array to concatenate.
68479 * @param {...*} [values] The values to concatenate.
68480 * @returns {Array} Returns the new concatenated array.
68481 * @example
68482 *
68483 * var array = [1];
68484 * var other = _.concat(array, 2, [3], [[4]]);
68485 *
68486 * console.log(other);
68487 * // => [1, 2, 3, [4]]
68488 *
68489 * console.log(array);
68490 * // => [1]
68491 */
68492 function concat() {
68493 var length = arguments.length;
68494 if (!length) {
68495 return [];
68496 }
68497 var args = Array(length - 1),
68498 array = arguments[0],
68499 index = length;
68500
68501 while (index--) {
68502 args[index - 1] = arguments[index];
68503 }
68504 return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
68505 }
68506
68507 /**
68508 * Creates an array of `array` values not included in the other given arrays
68509 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
68510 * for equality comparisons. The order and references of result values are
68511 * determined by the first array.
68512 *
68513 * **Note:** Unlike `_.pullAll`, this method returns a new array.
68514 *
68515 * @static
68516 * @memberOf _
68517 * @since 0.1.0
68518 * @category Array
68519 * @param {Array} array The array to inspect.
68520 * @param {...Array} [values] The values to exclude.
68521 * @returns {Array} Returns the new array of filtered values.
68522 * @see _.without, _.xor
68523 * @example
68524 *
68525 * _.difference([2, 1], [2, 3]);
68526 * // => [1]
68527 */
68528 var difference = baseRest(function(array, values) {
68529 return isArrayLikeObject(array)
68530 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
68531 : [];
68532 });
68533
68534 /**
68535 * This method is like `_.difference` except that it accepts `iteratee` which
68536 * is invoked for each element of `array` and `values` to generate the criterion
68537 * by which they're compared. The order and references of result values are
68538 * determined by the first array. The iteratee is invoked with one argument:
68539 * (value).
68540 *
68541 * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
68542 *
68543 * @static
68544 * @memberOf _
68545 * @since 4.0.0
68546 * @category Array
68547 * @param {Array} array The array to inspect.
68548 * @param {...Array} [values] The values to exclude.
68549 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
68550 * @returns {Array} Returns the new array of filtered values.
68551 * @example
68552 *
68553 * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
68554 * // => [1.2]
68555 *
68556 * // The `_.property` iteratee shorthand.
68557 * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
68558 * // => [{ 'x': 2 }]
68559 */
68560 var differenceBy = baseRest(function(array, values) {
68561 var iteratee = last(values);
68562 if (isArrayLikeObject(iteratee)) {
68563 iteratee = undefined;
68564 }
68565 return isArrayLikeObject(array)
68566 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
68567 : [];
68568 });
68569
68570 /**
68571 * This method is like `_.difference` except that it accepts `comparator`
68572 * which is invoked to compare elements of `array` to `values`. The order and
68573 * references of result values are determined by the first array. The comparator
68574 * is invoked with two arguments: (arrVal, othVal).
68575 *
68576 * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
68577 *
68578 * @static
68579 * @memberOf _
68580 * @since 4.0.0
68581 * @category Array
68582 * @param {Array} array The array to inspect.
68583 * @param {...Array} [values] The values to exclude.
68584 * @param {Function} [comparator] The comparator invoked per element.
68585 * @returns {Array} Returns the new array of filtered values.
68586 * @example
68587 *
68588 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
68589 *
68590 * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
68591 * // => [{ 'x': 2, 'y': 1 }]
68592 */
68593 var differenceWith = baseRest(function(array, values) {
68594 var comparator = last(values);
68595 if (isArrayLikeObject(comparator)) {
68596 comparator = undefined;
68597 }
68598 return isArrayLikeObject(array)
68599 ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
68600 : [];
68601 });
68602
68603 /**
68604 * Creates a slice of `array` with `n` elements dropped from the beginning.
68605 *
68606 * @static
68607 * @memberOf _
68608 * @since 0.5.0
68609 * @category Array
68610 * @param {Array} array The array to query.
68611 * @param {number} [n=1] The number of elements to drop.
68612 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
68613 * @returns {Array} Returns the slice of `array`.
68614 * @example
68615 *
68616 * _.drop([1, 2, 3]);
68617 * // => [2, 3]
68618 *
68619 * _.drop([1, 2, 3], 2);
68620 * // => [3]
68621 *
68622 * _.drop([1, 2, 3], 5);
68623 * // => []
68624 *
68625 * _.drop([1, 2, 3], 0);
68626 * // => [1, 2, 3]
68627 */
68628 function drop(array, n, guard) {
68629 var length = array == null ? 0 : array.length;
68630 if (!length) {
68631 return [];
68632 }
68633 n = (guard || n === undefined) ? 1 : toInteger(n);
68634 return baseSlice(array, n < 0 ? 0 : n, length);
68635 }
68636
68637 /**
68638 * Creates a slice of `array` with `n` elements dropped from the end.
68639 *
68640 * @static
68641 * @memberOf _
68642 * @since 3.0.0
68643 * @category Array
68644 * @param {Array} array The array to query.
68645 * @param {number} [n=1] The number of elements to drop.
68646 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
68647 * @returns {Array} Returns the slice of `array`.
68648 * @example
68649 *
68650 * _.dropRight([1, 2, 3]);
68651 * // => [1, 2]
68652 *
68653 * _.dropRight([1, 2, 3], 2);
68654 * // => [1]
68655 *
68656 * _.dropRight([1, 2, 3], 5);
68657 * // => []
68658 *
68659 * _.dropRight([1, 2, 3], 0);
68660 * // => [1, 2, 3]
68661 */
68662 function dropRight(array, n, guard) {
68663 var length = array == null ? 0 : array.length;
68664 if (!length) {
68665 return [];
68666 }
68667 n = (guard || n === undefined) ? 1 : toInteger(n);
68668 n = length - n;
68669 return baseSlice(array, 0, n < 0 ? 0 : n);
68670 }
68671
68672 /**
68673 * Creates a slice of `array` excluding elements dropped from the end.
68674 * Elements are dropped until `predicate` returns falsey. The predicate is
68675 * invoked with three arguments: (value, index, array).
68676 *
68677 * @static
68678 * @memberOf _
68679 * @since 3.0.0
68680 * @category Array
68681 * @param {Array} array The array to query.
68682 * @param {Function} [predicate=_.identity] The function invoked per iteration.
68683 * @returns {Array} Returns the slice of `array`.
68684 * @example
68685 *
68686 * var users = [
68687 * { 'user': 'barney', 'active': true },
68688 * { 'user': 'fred', 'active': false },
68689 * { 'user': 'pebbles', 'active': false }
68690 * ];
68691 *
68692 * _.dropRightWhile(users, function(o) { return !o.active; });
68693 * // => objects for ['barney']
68694 *
68695 * // The `_.matches` iteratee shorthand.
68696 * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
68697 * // => objects for ['barney', 'fred']
68698 *
68699 * // The `_.matchesProperty` iteratee shorthand.
68700 * _.dropRightWhile(users, ['active', false]);
68701 * // => objects for ['barney']
68702 *
68703 * // The `_.property` iteratee shorthand.
68704 * _.dropRightWhile(users, 'active');
68705 * // => objects for ['barney', 'fred', 'pebbles']
68706 */
68707 function dropRightWhile(array, predicate) {
68708 return (array && array.length)
68709 ? baseWhile(array, getIteratee(predicate, 3), true, true)
68710 : [];
68711 }
68712
68713 /**
68714 * Creates a slice of `array` excluding elements dropped from the beginning.
68715 * Elements are dropped until `predicate` returns falsey. The predicate is
68716 * invoked with three arguments: (value, index, array).
68717 *
68718 * @static
68719 * @memberOf _
68720 * @since 3.0.0
68721 * @category Array
68722 * @param {Array} array The array to query.
68723 * @param {Function} [predicate=_.identity] The function invoked per iteration.
68724 * @returns {Array} Returns the slice of `array`.
68725 * @example
68726 *
68727 * var users = [
68728 * { 'user': 'barney', 'active': false },
68729 * { 'user': 'fred', 'active': false },
68730 * { 'user': 'pebbles', 'active': true }
68731 * ];
68732 *
68733 * _.dropWhile(users, function(o) { return !o.active; });
68734 * // => objects for ['pebbles']
68735 *
68736 * // The `_.matches` iteratee shorthand.
68737 * _.dropWhile(users, { 'user': 'barney', 'active': false });
68738 * // => objects for ['fred', 'pebbles']
68739 *
68740 * // The `_.matchesProperty` iteratee shorthand.
68741 * _.dropWhile(users, ['active', false]);
68742 * // => objects for ['pebbles']
68743 *
68744 * // The `_.property` iteratee shorthand.
68745 * _.dropWhile(users, 'active');
68746 * // => objects for ['barney', 'fred', 'pebbles']
68747 */
68748 function dropWhile(array, predicate) {
68749 return (array && array.length)
68750 ? baseWhile(array, getIteratee(predicate, 3), true)
68751 : [];
68752 }
68753
68754 /**
68755 * Fills elements of `array` with `value` from `start` up to, but not
68756 * including, `end`.
68757 *
68758 * **Note:** This method mutates `array`.
68759 *
68760 * @static
68761 * @memberOf _
68762 * @since 3.2.0
68763 * @category Array
68764 * @param {Array} array The array to fill.
68765 * @param {*} value The value to fill `array` with.
68766 * @param {number} [start=0] The start position.
68767 * @param {number} [end=array.length] The end position.
68768 * @returns {Array} Returns `array`.
68769 * @example
68770 *
68771 * var array = [1, 2, 3];
68772 *
68773 * _.fill(array, 'a');
68774 * console.log(array);
68775 * // => ['a', 'a', 'a']
68776 *
68777 * _.fill(Array(3), 2);
68778 * // => [2, 2, 2]
68779 *
68780 * _.fill([4, 6, 8, 10], '*', 1, 3);
68781 * // => [4, '*', '*', 10]
68782 */
68783 function fill(array, value, start, end) {
68784 var length = array == null ? 0 : array.length;
68785 if (!length) {
68786 return [];
68787 }
68788 if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
68789 start = 0;
68790 end = length;
68791 }
68792 return baseFill(array, value, start, end);
68793 }
68794
68795 /**
68796 * This method is like `_.find` except that it returns the index of the first
68797 * element `predicate` returns truthy for instead of the element itself.
68798 *
68799 * @static
68800 * @memberOf _
68801 * @since 1.1.0
68802 * @category Array
68803 * @param {Array} array The array to inspect.
68804 * @param {Function} [predicate=_.identity] The function invoked per iteration.
68805 * @param {number} [fromIndex=0] The index to search from.
68806 * @returns {number} Returns the index of the found element, else `-1`.
68807 * @example
68808 *
68809 * var users = [
68810 * { 'user': 'barney', 'active': false },
68811 * { 'user': 'fred', 'active': false },
68812 * { 'user': 'pebbles', 'active': true }
68813 * ];
68814 *
68815 * _.findIndex(users, function(o) { return o.user == 'barney'; });
68816 * // => 0
68817 *
68818 * // The `_.matches` iteratee shorthand.
68819 * _.findIndex(users, { 'user': 'fred', 'active': false });
68820 * // => 1
68821 *
68822 * // The `_.matchesProperty` iteratee shorthand.
68823 * _.findIndex(users, ['active', false]);
68824 * // => 0
68825 *
68826 * // The `_.property` iteratee shorthand.
68827 * _.findIndex(users, 'active');
68828 * // => 2
68829 */
68830 function findIndex(array, predicate, fromIndex) {
68831 var length = array == null ? 0 : array.length;
68832 if (!length) {
68833 return -1;
68834 }
68835 var index = fromIndex == null ? 0 : toInteger(fromIndex);
68836 if (index < 0) {
68837 index = nativeMax(length + index, 0);
68838 }
68839 return baseFindIndex(array, getIteratee(predicate, 3), index);
68840 }
68841
68842 /**
68843 * This method is like `_.findIndex` except that it iterates over elements
68844 * of `collection` from right to left.
68845 *
68846 * @static
68847 * @memberOf _
68848 * @since 2.0.0
68849 * @category Array
68850 * @param {Array} array The array to inspect.
68851 * @param {Function} [predicate=_.identity] The function invoked per iteration.
68852 * @param {number} [fromIndex=array.length-1] The index to search from.
68853 * @returns {number} Returns the index of the found element, else `-1`.
68854 * @example
68855 *
68856 * var users = [
68857 * { 'user': 'barney', 'active': true },
68858 * { 'user': 'fred', 'active': false },
68859 * { 'user': 'pebbles', 'active': false }
68860 * ];
68861 *
68862 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
68863 * // => 2
68864 *
68865 * // The `_.matches` iteratee shorthand.
68866 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
68867 * // => 0
68868 *
68869 * // The `_.matchesProperty` iteratee shorthand.
68870 * _.findLastIndex(users, ['active', false]);
68871 * // => 2
68872 *
68873 * // The `_.property` iteratee shorthand.
68874 * _.findLastIndex(users, 'active');
68875 * // => 0
68876 */
68877 function findLastIndex(array, predicate, fromIndex) {
68878 var length = array == null ? 0 : array.length;
68879 if (!length) {
68880 return -1;
68881 }
68882 var index = length - 1;
68883 if (fromIndex !== undefined) {
68884 index = toInteger(fromIndex);
68885 index = fromIndex < 0
68886 ? nativeMax(length + index, 0)
68887 : nativeMin(index, length - 1);
68888 }
68889 return baseFindIndex(array, getIteratee(predicate, 3), index, true);
68890 }
68891
68892 /**
68893 * Flattens `array` a single level deep.
68894 *
68895 * @static
68896 * @memberOf _
68897 * @since 0.1.0
68898 * @category Array
68899 * @param {Array} array The array to flatten.
68900 * @returns {Array} Returns the new flattened array.
68901 * @example
68902 *
68903 * _.flatten([1, [2, [3, [4]], 5]]);
68904 * // => [1, 2, [3, [4]], 5]
68905 */
68906 function flatten(array) {
68907 var length = array == null ? 0 : array.length;
68908 return length ? baseFlatten(array, 1) : [];
68909 }
68910
68911 /**
68912 * Recursively flattens `array`.
68913 *
68914 * @static
68915 * @memberOf _
68916 * @since 3.0.0
68917 * @category Array
68918 * @param {Array} array The array to flatten.
68919 * @returns {Array} Returns the new flattened array.
68920 * @example
68921 *
68922 * _.flattenDeep([1, [2, [3, [4]], 5]]);
68923 * // => [1, 2, 3, 4, 5]
68924 */
68925 function flattenDeep(array) {
68926 var length = array == null ? 0 : array.length;
68927 return length ? baseFlatten(array, INFINITY) : [];
68928 }
68929
68930 /**
68931 * Recursively flatten `array` up to `depth` times.
68932 *
68933 * @static
68934 * @memberOf _
68935 * @since 4.4.0
68936 * @category Array
68937 * @param {Array} array The array to flatten.
68938 * @param {number} [depth=1] The maximum recursion depth.
68939 * @returns {Array} Returns the new flattened array.
68940 * @example
68941 *
68942 * var array = [1, [2, [3, [4]], 5]];
68943 *
68944 * _.flattenDepth(array, 1);
68945 * // => [1, 2, [3, [4]], 5]
68946 *
68947 * _.flattenDepth(array, 2);
68948 * // => [1, 2, 3, [4], 5]
68949 */
68950 function flattenDepth(array, depth) {
68951 var length = array == null ? 0 : array.length;
68952 if (!length) {
68953 return [];
68954 }
68955 depth = depth === undefined ? 1 : toInteger(depth);
68956 return baseFlatten(array, depth);
68957 }
68958
68959 /**
68960 * The inverse of `_.toPairs`; this method returns an object composed
68961 * from key-value `pairs`.
68962 *
68963 * @static
68964 * @memberOf _
68965 * @since 4.0.0
68966 * @category Array
68967 * @param {Array} pairs The key-value pairs.
68968 * @returns {Object} Returns the new object.
68969 * @example
68970 *
68971 * _.fromPairs([['a', 1], ['b', 2]]);
68972 * // => { 'a': 1, 'b': 2 }
68973 */
68974 function fromPairs(pairs) {
68975 var index = -1,
68976 length = pairs == null ? 0 : pairs.length,
68977 result = {};
68978
68979 while (++index < length) {
68980 var pair = pairs[index];
68981 result[pair[0]] = pair[1];
68982 }
68983 return result;
68984 }
68985
68986 /**
68987 * Gets the first element of `array`.
68988 *
68989 * @static
68990 * @memberOf _
68991 * @since 0.1.0
68992 * @alias first
68993 * @category Array
68994 * @param {Array} array The array to query.
68995 * @returns {*} Returns the first element of `array`.
68996 * @example
68997 *
68998 * _.head([1, 2, 3]);
68999 * // => 1
69000 *
69001 * _.head([]);
69002 * // => undefined
69003 */
69004 function head(array) {
69005 return (array && array.length) ? array[0] : undefined;
69006 }
69007
69008 /**
69009 * Gets the index at which the first occurrence of `value` is found in `array`
69010 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
69011 * for equality comparisons. If `fromIndex` is negative, it's used as the
69012 * offset from the end of `array`.
69013 *
69014 * @static
69015 * @memberOf _
69016 * @since 0.1.0
69017 * @category Array
69018 * @param {Array} array The array to inspect.
69019 * @param {*} value The value to search for.
69020 * @param {number} [fromIndex=0] The index to search from.
69021 * @returns {number} Returns the index of the matched value, else `-1`.
69022 * @example
69023 *
69024 * _.indexOf([1, 2, 1, 2], 2);
69025 * // => 1
69026 *
69027 * // Search from the `fromIndex`.
69028 * _.indexOf([1, 2, 1, 2], 2, 2);
69029 * // => 3
69030 */
69031 function indexOf(array, value, fromIndex) {
69032 var length = array == null ? 0 : array.length;
69033 if (!length) {
69034 return -1;
69035 }
69036 var index = fromIndex == null ? 0 : toInteger(fromIndex);
69037 if (index < 0) {
69038 index = nativeMax(length + index, 0);
69039 }
69040 return baseIndexOf(array, value, index);
69041 }
69042
69043 /**
69044 * Gets all but the last element of `array`.
69045 *
69046 * @static
69047 * @memberOf _
69048 * @since 0.1.0
69049 * @category Array
69050 * @param {Array} array The array to query.
69051 * @returns {Array} Returns the slice of `array`.
69052 * @example
69053 *
69054 * _.initial([1, 2, 3]);
69055 * // => [1, 2]
69056 */
69057 function initial(array) {
69058 var length = array == null ? 0 : array.length;
69059 return length ? baseSlice(array, 0, -1) : [];
69060 }
69061
69062 /**
69063 * Creates an array of unique values that are included in all given arrays
69064 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
69065 * for equality comparisons. The order and references of result values are
69066 * determined by the first array.
69067 *
69068 * @static
69069 * @memberOf _
69070 * @since 0.1.0
69071 * @category Array
69072 * @param {...Array} [arrays] The arrays to inspect.
69073 * @returns {Array} Returns the new array of intersecting values.
69074 * @example
69075 *
69076 * _.intersection([2, 1], [2, 3]);
69077 * // => [2]
69078 */
69079 var intersection = baseRest(function(arrays) {
69080 var mapped = arrayMap(arrays, castArrayLikeObject);
69081 return (mapped.length && mapped[0] === arrays[0])
69082 ? baseIntersection(mapped)
69083 : [];
69084 });
69085
69086 /**
69087 * This method is like `_.intersection` except that it accepts `iteratee`
69088 * which is invoked for each element of each `arrays` to generate the criterion
69089 * by which they're compared. The order and references of result values are
69090 * determined by the first array. The iteratee is invoked with one argument:
69091 * (value).
69092 *
69093 * @static
69094 * @memberOf _
69095 * @since 4.0.0
69096 * @category Array
69097 * @param {...Array} [arrays] The arrays to inspect.
69098 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69099 * @returns {Array} Returns the new array of intersecting values.
69100 * @example
69101 *
69102 * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
69103 * // => [2.1]
69104 *
69105 * // The `_.property` iteratee shorthand.
69106 * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
69107 * // => [{ 'x': 1 }]
69108 */
69109 var intersectionBy = baseRest(function(arrays) {
69110 var iteratee = last(arrays),
69111 mapped = arrayMap(arrays, castArrayLikeObject);
69112
69113 if (iteratee === last(mapped)) {
69114 iteratee = undefined;
69115 } else {
69116 mapped.pop();
69117 }
69118 return (mapped.length && mapped[0] === arrays[0])
69119 ? baseIntersection(mapped, getIteratee(iteratee, 2))
69120 : [];
69121 });
69122
69123 /**
69124 * This method is like `_.intersection` except that it accepts `comparator`
69125 * which is invoked to compare elements of `arrays`. The order and references
69126 * of result values are determined by the first array. The comparator is
69127 * invoked with two arguments: (arrVal, othVal).
69128 *
69129 * @static
69130 * @memberOf _
69131 * @since 4.0.0
69132 * @category Array
69133 * @param {...Array} [arrays] The arrays to inspect.
69134 * @param {Function} [comparator] The comparator invoked per element.
69135 * @returns {Array} Returns the new array of intersecting values.
69136 * @example
69137 *
69138 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
69139 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
69140 *
69141 * _.intersectionWith(objects, others, _.isEqual);
69142 * // => [{ 'x': 1, 'y': 2 }]
69143 */
69144 var intersectionWith = baseRest(function(arrays) {
69145 var comparator = last(arrays),
69146 mapped = arrayMap(arrays, castArrayLikeObject);
69147
69148 comparator = typeof comparator == 'function' ? comparator : undefined;
69149 if (comparator) {
69150 mapped.pop();
69151 }
69152 return (mapped.length && mapped[0] === arrays[0])
69153 ? baseIntersection(mapped, undefined, comparator)
69154 : [];
69155 });
69156
69157 /**
69158 * Converts all elements in `array` into a string separated by `separator`.
69159 *
69160 * @static
69161 * @memberOf _
69162 * @since 4.0.0
69163 * @category Array
69164 * @param {Array} array The array to convert.
69165 * @param {string} [separator=','] The element separator.
69166 * @returns {string} Returns the joined string.
69167 * @example
69168 *
69169 * _.join(['a', 'b', 'c'], '~');
69170 * // => 'a~b~c'
69171 */
69172 function join(array, separator) {
69173 return array == null ? '' : nativeJoin.call(array, separator);
69174 }
69175
69176 /**
69177 * Gets the last element of `array`.
69178 *
69179 * @static
69180 * @memberOf _
69181 * @since 0.1.0
69182 * @category Array
69183 * @param {Array} array The array to query.
69184 * @returns {*} Returns the last element of `array`.
69185 * @example
69186 *
69187 * _.last([1, 2, 3]);
69188 * // => 3
69189 */
69190 function last(array) {
69191 var length = array == null ? 0 : array.length;
69192 return length ? array[length - 1] : undefined;
69193 }
69194
69195 /**
69196 * This method is like `_.indexOf` except that it iterates over elements of
69197 * `array` from right to left.
69198 *
69199 * @static
69200 * @memberOf _
69201 * @since 0.1.0
69202 * @category Array
69203 * @param {Array} array The array to inspect.
69204 * @param {*} value The value to search for.
69205 * @param {number} [fromIndex=array.length-1] The index to search from.
69206 * @returns {number} Returns the index of the matched value, else `-1`.
69207 * @example
69208 *
69209 * _.lastIndexOf([1, 2, 1, 2], 2);
69210 * // => 3
69211 *
69212 * // Search from the `fromIndex`.
69213 * _.lastIndexOf([1, 2, 1, 2], 2, 2);
69214 * // => 1
69215 */
69216 function lastIndexOf(array, value, fromIndex) {
69217 var length = array == null ? 0 : array.length;
69218 if (!length) {
69219 return -1;
69220 }
69221 var index = length;
69222 if (fromIndex !== undefined) {
69223 index = toInteger(fromIndex);
69224 index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
69225 }
69226 return value === value
69227 ? strictLastIndexOf(array, value, index)
69228 : baseFindIndex(array, baseIsNaN, index, true);
69229 }
69230
69231 /**
69232 * Gets the element at index `n` of `array`. If `n` is negative, the nth
69233 * element from the end is returned.
69234 *
69235 * @static
69236 * @memberOf _
69237 * @since 4.11.0
69238 * @category Array
69239 * @param {Array} array The array to query.
69240 * @param {number} [n=0] The index of the element to return.
69241 * @returns {*} Returns the nth element of `array`.
69242 * @example
69243 *
69244 * var array = ['a', 'b', 'c', 'd'];
69245 *
69246 * _.nth(array, 1);
69247 * // => 'b'
69248 *
69249 * _.nth(array, -2);
69250 * // => 'c';
69251 */
69252 function nth(array, n) {
69253 return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
69254 }
69255
69256 /**
69257 * Removes all given values from `array` using
69258 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
69259 * for equality comparisons.
69260 *
69261 * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
69262 * to remove elements from an array by predicate.
69263 *
69264 * @static
69265 * @memberOf _
69266 * @since 2.0.0
69267 * @category Array
69268 * @param {Array} array The array to modify.
69269 * @param {...*} [values] The values to remove.
69270 * @returns {Array} Returns `array`.
69271 * @example
69272 *
69273 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
69274 *
69275 * _.pull(array, 'a', 'c');
69276 * console.log(array);
69277 * // => ['b', 'b']
69278 */
69279 var pull = baseRest(pullAll);
69280
69281 /**
69282 * This method is like `_.pull` except that it accepts an array of values to remove.
69283 *
69284 * **Note:** Unlike `_.difference`, this method mutates `array`.
69285 *
69286 * @static
69287 * @memberOf _
69288 * @since 4.0.0
69289 * @category Array
69290 * @param {Array} array The array to modify.
69291 * @param {Array} values The values to remove.
69292 * @returns {Array} Returns `array`.
69293 * @example
69294 *
69295 * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
69296 *
69297 * _.pullAll(array, ['a', 'c']);
69298 * console.log(array);
69299 * // => ['b', 'b']
69300 */
69301 function pullAll(array, values) {
69302 return (array && array.length && values && values.length)
69303 ? basePullAll(array, values)
69304 : array;
69305 }
69306
69307 /**
69308 * This method is like `_.pullAll` except that it accepts `iteratee` which is
69309 * invoked for each element of `array` and `values` to generate the criterion
69310 * by which they're compared. The iteratee is invoked with one argument: (value).
69311 *
69312 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
69313 *
69314 * @static
69315 * @memberOf _
69316 * @since 4.0.0
69317 * @category Array
69318 * @param {Array} array The array to modify.
69319 * @param {Array} values The values to remove.
69320 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69321 * @returns {Array} Returns `array`.
69322 * @example
69323 *
69324 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
69325 *
69326 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
69327 * console.log(array);
69328 * // => [{ 'x': 2 }]
69329 */
69330 function pullAllBy(array, values, iteratee) {
69331 return (array && array.length && values && values.length)
69332 ? basePullAll(array, values, getIteratee(iteratee, 2))
69333 : array;
69334 }
69335
69336 /**
69337 * This method is like `_.pullAll` except that it accepts `comparator` which
69338 * is invoked to compare elements of `array` to `values`. The comparator is
69339 * invoked with two arguments: (arrVal, othVal).
69340 *
69341 * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
69342 *
69343 * @static
69344 * @memberOf _
69345 * @since 4.6.0
69346 * @category Array
69347 * @param {Array} array The array to modify.
69348 * @param {Array} values The values to remove.
69349 * @param {Function} [comparator] The comparator invoked per element.
69350 * @returns {Array} Returns `array`.
69351 * @example
69352 *
69353 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
69354 *
69355 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
69356 * console.log(array);
69357 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
69358 */
69359 function pullAllWith(array, values, comparator) {
69360 return (array && array.length && values && values.length)
69361 ? basePullAll(array, values, undefined, comparator)
69362 : array;
69363 }
69364
69365 /**
69366 * Removes elements from `array` corresponding to `indexes` and returns an
69367 * array of removed elements.
69368 *
69369 * **Note:** Unlike `_.at`, this method mutates `array`.
69370 *
69371 * @static
69372 * @memberOf _
69373 * @since 3.0.0
69374 * @category Array
69375 * @param {Array} array The array to modify.
69376 * @param {...(number|number[])} [indexes] The indexes of elements to remove.
69377 * @returns {Array} Returns the new array of removed elements.
69378 * @example
69379 *
69380 * var array = ['a', 'b', 'c', 'd'];
69381 * var pulled = _.pullAt(array, [1, 3]);
69382 *
69383 * console.log(array);
69384 * // => ['a', 'c']
69385 *
69386 * console.log(pulled);
69387 * // => ['b', 'd']
69388 */
69389 var pullAt = flatRest(function(array, indexes) {
69390 var length = array == null ? 0 : array.length,
69391 result = baseAt(array, indexes);
69392
69393 basePullAt(array, arrayMap(indexes, function(index) {
69394 return isIndex(index, length) ? +index : index;
69395 }).sort(compareAscending));
69396
69397 return result;
69398 });
69399
69400 /**
69401 * Removes all elements from `array` that `predicate` returns truthy for
69402 * and returns an array of the removed elements. The predicate is invoked
69403 * with three arguments: (value, index, array).
69404 *
69405 * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
69406 * to pull elements from an array by value.
69407 *
69408 * @static
69409 * @memberOf _
69410 * @since 2.0.0
69411 * @category Array
69412 * @param {Array} array The array to modify.
69413 * @param {Function} [predicate=_.identity] The function invoked per iteration.
69414 * @returns {Array} Returns the new array of removed elements.
69415 * @example
69416 *
69417 * var array = [1, 2, 3, 4];
69418 * var evens = _.remove(array, function(n) {
69419 * return n % 2 == 0;
69420 * });
69421 *
69422 * console.log(array);
69423 * // => [1, 3]
69424 *
69425 * console.log(evens);
69426 * // => [2, 4]
69427 */
69428 function remove(array, predicate) {
69429 var result = [];
69430 if (!(array && array.length)) {
69431 return result;
69432 }
69433 var index = -1,
69434 indexes = [],
69435 length = array.length;
69436
69437 predicate = getIteratee(predicate, 3);
69438 while (++index < length) {
69439 var value = array[index];
69440 if (predicate(value, index, array)) {
69441 result.push(value);
69442 indexes.push(index);
69443 }
69444 }
69445 basePullAt(array, indexes);
69446 return result;
69447 }
69448
69449 /**
69450 * Reverses `array` so that the first element becomes the last, the second
69451 * element becomes the second to last, and so on.
69452 *
69453 * **Note:** This method mutates `array` and is based on
69454 * [`Array#reverse`](https://mdn.io/Array/reverse).
69455 *
69456 * @static
69457 * @memberOf _
69458 * @since 4.0.0
69459 * @category Array
69460 * @param {Array} array The array to modify.
69461 * @returns {Array} Returns `array`.
69462 * @example
69463 *
69464 * var array = [1, 2, 3];
69465 *
69466 * _.reverse(array);
69467 * // => [3, 2, 1]
69468 *
69469 * console.log(array);
69470 * // => [3, 2, 1]
69471 */
69472 function reverse(array) {
69473 return array == null ? array : nativeReverse.call(array);
69474 }
69475
69476 /**
69477 * Creates a slice of `array` from `start` up to, but not including, `end`.
69478 *
69479 * **Note:** This method is used instead of
69480 * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
69481 * returned.
69482 *
69483 * @static
69484 * @memberOf _
69485 * @since 3.0.0
69486 * @category Array
69487 * @param {Array} array The array to slice.
69488 * @param {number} [start=0] The start position.
69489 * @param {number} [end=array.length] The end position.
69490 * @returns {Array} Returns the slice of `array`.
69491 */
69492 function slice(array, start, end) {
69493 var length = array == null ? 0 : array.length;
69494 if (!length) {
69495 return [];
69496 }
69497 if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
69498 start = 0;
69499 end = length;
69500 }
69501 else {
69502 start = start == null ? 0 : toInteger(start);
69503 end = end === undefined ? length : toInteger(end);
69504 }
69505 return baseSlice(array, start, end);
69506 }
69507
69508 /**
69509 * Uses a binary search to determine the lowest index at which `value`
69510 * should be inserted into `array` in order to maintain its sort order.
69511 *
69512 * @static
69513 * @memberOf _
69514 * @since 0.1.0
69515 * @category Array
69516 * @param {Array} array The sorted array to inspect.
69517 * @param {*} value The value to evaluate.
69518 * @returns {number} Returns the index at which `value` should be inserted
69519 * into `array`.
69520 * @example
69521 *
69522 * _.sortedIndex([30, 50], 40);
69523 * // => 1
69524 */
69525 function sortedIndex(array, value) {
69526 return baseSortedIndex(array, value);
69527 }
69528
69529 /**
69530 * This method is like `_.sortedIndex` except that it accepts `iteratee`
69531 * which is invoked for `value` and each element of `array` to compute their
69532 * sort ranking. The iteratee is invoked with one argument: (value).
69533 *
69534 * @static
69535 * @memberOf _
69536 * @since 4.0.0
69537 * @category Array
69538 * @param {Array} array The sorted array to inspect.
69539 * @param {*} value The value to evaluate.
69540 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69541 * @returns {number} Returns the index at which `value` should be inserted
69542 * into `array`.
69543 * @example
69544 *
69545 * var objects = [{ 'x': 4 }, { 'x': 5 }];
69546 *
69547 * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
69548 * // => 0
69549 *
69550 * // The `_.property` iteratee shorthand.
69551 * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
69552 * // => 0
69553 */
69554 function sortedIndexBy(array, value, iteratee) {
69555 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
69556 }
69557
69558 /**
69559 * This method is like `_.indexOf` except that it performs a binary
69560 * search on a sorted `array`.
69561 *
69562 * @static
69563 * @memberOf _
69564 * @since 4.0.0
69565 * @category Array
69566 * @param {Array} array The array to inspect.
69567 * @param {*} value The value to search for.
69568 * @returns {number} Returns the index of the matched value, else `-1`.
69569 * @example
69570 *
69571 * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
69572 * // => 1
69573 */
69574 function sortedIndexOf(array, value) {
69575 var length = array == null ? 0 : array.length;
69576 if (length) {
69577 var index = baseSortedIndex(array, value);
69578 if (index < length && eq(array[index], value)) {
69579 return index;
69580 }
69581 }
69582 return -1;
69583 }
69584
69585 /**
69586 * This method is like `_.sortedIndex` except that it returns the highest
69587 * index at which `value` should be inserted into `array` in order to
69588 * maintain its sort order.
69589 *
69590 * @static
69591 * @memberOf _
69592 * @since 3.0.0
69593 * @category Array
69594 * @param {Array} array The sorted array to inspect.
69595 * @param {*} value The value to evaluate.
69596 * @returns {number} Returns the index at which `value` should be inserted
69597 * into `array`.
69598 * @example
69599 *
69600 * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
69601 * // => 4
69602 */
69603 function sortedLastIndex(array, value) {
69604 return baseSortedIndex(array, value, true);
69605 }
69606
69607 /**
69608 * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
69609 * which is invoked for `value` and each element of `array` to compute their
69610 * sort ranking. The iteratee is invoked with one argument: (value).
69611 *
69612 * @static
69613 * @memberOf _
69614 * @since 4.0.0
69615 * @category Array
69616 * @param {Array} array The sorted array to inspect.
69617 * @param {*} value The value to evaluate.
69618 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69619 * @returns {number} Returns the index at which `value` should be inserted
69620 * into `array`.
69621 * @example
69622 *
69623 * var objects = [{ 'x': 4 }, { 'x': 5 }];
69624 *
69625 * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
69626 * // => 1
69627 *
69628 * // The `_.property` iteratee shorthand.
69629 * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
69630 * // => 1
69631 */
69632 function sortedLastIndexBy(array, value, iteratee) {
69633 return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
69634 }
69635
69636 /**
69637 * This method is like `_.lastIndexOf` except that it performs a binary
69638 * search on a sorted `array`.
69639 *
69640 * @static
69641 * @memberOf _
69642 * @since 4.0.0
69643 * @category Array
69644 * @param {Array} array The array to inspect.
69645 * @param {*} value The value to search for.
69646 * @returns {number} Returns the index of the matched value, else `-1`.
69647 * @example
69648 *
69649 * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
69650 * // => 3
69651 */
69652 function sortedLastIndexOf(array, value) {
69653 var length = array == null ? 0 : array.length;
69654 if (length) {
69655 var index = baseSortedIndex(array, value, true) - 1;
69656 if (eq(array[index], value)) {
69657 return index;
69658 }
69659 }
69660 return -1;
69661 }
69662
69663 /**
69664 * This method is like `_.uniq` except that it's designed and optimized
69665 * for sorted arrays.
69666 *
69667 * @static
69668 * @memberOf _
69669 * @since 4.0.0
69670 * @category Array
69671 * @param {Array} array The array to inspect.
69672 * @returns {Array} Returns the new duplicate free array.
69673 * @example
69674 *
69675 * _.sortedUniq([1, 1, 2]);
69676 * // => [1, 2]
69677 */
69678 function sortedUniq(array) {
69679 return (array && array.length)
69680 ? baseSortedUniq(array)
69681 : [];
69682 }
69683
69684 /**
69685 * This method is like `_.uniqBy` except that it's designed and optimized
69686 * for sorted arrays.
69687 *
69688 * @static
69689 * @memberOf _
69690 * @since 4.0.0
69691 * @category Array
69692 * @param {Array} array The array to inspect.
69693 * @param {Function} [iteratee] The iteratee invoked per element.
69694 * @returns {Array} Returns the new duplicate free array.
69695 * @example
69696 *
69697 * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
69698 * // => [1.1, 2.3]
69699 */
69700 function sortedUniqBy(array, iteratee) {
69701 return (array && array.length)
69702 ? baseSortedUniq(array, getIteratee(iteratee, 2))
69703 : [];
69704 }
69705
69706 /**
69707 * Gets all but the first element of `array`.
69708 *
69709 * @static
69710 * @memberOf _
69711 * @since 4.0.0
69712 * @category Array
69713 * @param {Array} array The array to query.
69714 * @returns {Array} Returns the slice of `array`.
69715 * @example
69716 *
69717 * _.tail([1, 2, 3]);
69718 * // => [2, 3]
69719 */
69720 function tail(array) {
69721 var length = array == null ? 0 : array.length;
69722 return length ? baseSlice(array, 1, length) : [];
69723 }
69724
69725 /**
69726 * Creates a slice of `array` with `n` elements taken from the beginning.
69727 *
69728 * @static
69729 * @memberOf _
69730 * @since 0.1.0
69731 * @category Array
69732 * @param {Array} array The array to query.
69733 * @param {number} [n=1] The number of elements to take.
69734 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
69735 * @returns {Array} Returns the slice of `array`.
69736 * @example
69737 *
69738 * _.take([1, 2, 3]);
69739 * // => [1]
69740 *
69741 * _.take([1, 2, 3], 2);
69742 * // => [1, 2]
69743 *
69744 * _.take([1, 2, 3], 5);
69745 * // => [1, 2, 3]
69746 *
69747 * _.take([1, 2, 3], 0);
69748 * // => []
69749 */
69750 function take(array, n, guard) {
69751 if (!(array && array.length)) {
69752 return [];
69753 }
69754 n = (guard || n === undefined) ? 1 : toInteger(n);
69755 return baseSlice(array, 0, n < 0 ? 0 : n);
69756 }
69757
69758 /**
69759 * Creates a slice of `array` with `n` elements taken from the end.
69760 *
69761 * @static
69762 * @memberOf _
69763 * @since 3.0.0
69764 * @category Array
69765 * @param {Array} array The array to query.
69766 * @param {number} [n=1] The number of elements to take.
69767 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
69768 * @returns {Array} Returns the slice of `array`.
69769 * @example
69770 *
69771 * _.takeRight([1, 2, 3]);
69772 * // => [3]
69773 *
69774 * _.takeRight([1, 2, 3], 2);
69775 * // => [2, 3]
69776 *
69777 * _.takeRight([1, 2, 3], 5);
69778 * // => [1, 2, 3]
69779 *
69780 * _.takeRight([1, 2, 3], 0);
69781 * // => []
69782 */
69783 function takeRight(array, n, guard) {
69784 var length = array == null ? 0 : array.length;
69785 if (!length) {
69786 return [];
69787 }
69788 n = (guard || n === undefined) ? 1 : toInteger(n);
69789 n = length - n;
69790 return baseSlice(array, n < 0 ? 0 : n, length);
69791 }
69792
69793 /**
69794 * Creates a slice of `array` with elements taken from the end. Elements are
69795 * taken until `predicate` returns falsey. The predicate is invoked with
69796 * three arguments: (value, index, array).
69797 *
69798 * @static
69799 * @memberOf _
69800 * @since 3.0.0
69801 * @category Array
69802 * @param {Array} array The array to query.
69803 * @param {Function} [predicate=_.identity] The function invoked per iteration.
69804 * @returns {Array} Returns the slice of `array`.
69805 * @example
69806 *
69807 * var users = [
69808 * { 'user': 'barney', 'active': true },
69809 * { 'user': 'fred', 'active': false },
69810 * { 'user': 'pebbles', 'active': false }
69811 * ];
69812 *
69813 * _.takeRightWhile(users, function(o) { return !o.active; });
69814 * // => objects for ['fred', 'pebbles']
69815 *
69816 * // The `_.matches` iteratee shorthand.
69817 * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
69818 * // => objects for ['pebbles']
69819 *
69820 * // The `_.matchesProperty` iteratee shorthand.
69821 * _.takeRightWhile(users, ['active', false]);
69822 * // => objects for ['fred', 'pebbles']
69823 *
69824 * // The `_.property` iteratee shorthand.
69825 * _.takeRightWhile(users, 'active');
69826 * // => []
69827 */
69828 function takeRightWhile(array, predicate) {
69829 return (array && array.length)
69830 ? baseWhile(array, getIteratee(predicate, 3), false, true)
69831 : [];
69832 }
69833
69834 /**
69835 * Creates a slice of `array` with elements taken from the beginning. Elements
69836 * are taken until `predicate` returns falsey. The predicate is invoked with
69837 * three arguments: (value, index, array).
69838 *
69839 * @static
69840 * @memberOf _
69841 * @since 3.0.0
69842 * @category Array
69843 * @param {Array} array The array to query.
69844 * @param {Function} [predicate=_.identity] The function invoked per iteration.
69845 * @returns {Array} Returns the slice of `array`.
69846 * @example
69847 *
69848 * var users = [
69849 * { 'user': 'barney', 'active': false },
69850 * { 'user': 'fred', 'active': false },
69851 * { 'user': 'pebbles', 'active': true }
69852 * ];
69853 *
69854 * _.takeWhile(users, function(o) { return !o.active; });
69855 * // => objects for ['barney', 'fred']
69856 *
69857 * // The `_.matches` iteratee shorthand.
69858 * _.takeWhile(users, { 'user': 'barney', 'active': false });
69859 * // => objects for ['barney']
69860 *
69861 * // The `_.matchesProperty` iteratee shorthand.
69862 * _.takeWhile(users, ['active', false]);
69863 * // => objects for ['barney', 'fred']
69864 *
69865 * // The `_.property` iteratee shorthand.
69866 * _.takeWhile(users, 'active');
69867 * // => []
69868 */
69869 function takeWhile(array, predicate) {
69870 return (array && array.length)
69871 ? baseWhile(array, getIteratee(predicate, 3))
69872 : [];
69873 }
69874
69875 /**
69876 * Creates an array of unique values, in order, from all given arrays using
69877 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
69878 * for equality comparisons.
69879 *
69880 * @static
69881 * @memberOf _
69882 * @since 0.1.0
69883 * @category Array
69884 * @param {...Array} [arrays] The arrays to inspect.
69885 * @returns {Array} Returns the new array of combined values.
69886 * @example
69887 *
69888 * _.union([2], [1, 2]);
69889 * // => [2, 1]
69890 */
69891 var union = baseRest(function(arrays) {
69892 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
69893 });
69894
69895 /**
69896 * This method is like `_.union` except that it accepts `iteratee` which is
69897 * invoked for each element of each `arrays` to generate the criterion by
69898 * which uniqueness is computed. Result values are chosen from the first
69899 * array in which the value occurs. The iteratee is invoked with one argument:
69900 * (value).
69901 *
69902 * @static
69903 * @memberOf _
69904 * @since 4.0.0
69905 * @category Array
69906 * @param {...Array} [arrays] The arrays to inspect.
69907 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69908 * @returns {Array} Returns the new array of combined values.
69909 * @example
69910 *
69911 * _.unionBy([2.1], [1.2, 2.3], Math.floor);
69912 * // => [2.1, 1.2]
69913 *
69914 * // The `_.property` iteratee shorthand.
69915 * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
69916 * // => [{ 'x': 1 }, { 'x': 2 }]
69917 */
69918 var unionBy = baseRest(function(arrays) {
69919 var iteratee = last(arrays);
69920 if (isArrayLikeObject(iteratee)) {
69921 iteratee = undefined;
69922 }
69923 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
69924 });
69925
69926 /**
69927 * This method is like `_.union` except that it accepts `comparator` which
69928 * is invoked to compare elements of `arrays`. Result values are chosen from
69929 * the first array in which the value occurs. The comparator is invoked
69930 * with two arguments: (arrVal, othVal).
69931 *
69932 * @static
69933 * @memberOf _
69934 * @since 4.0.0
69935 * @category Array
69936 * @param {...Array} [arrays] The arrays to inspect.
69937 * @param {Function} [comparator] The comparator invoked per element.
69938 * @returns {Array} Returns the new array of combined values.
69939 * @example
69940 *
69941 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
69942 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
69943 *
69944 * _.unionWith(objects, others, _.isEqual);
69945 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
69946 */
69947 var unionWith = baseRest(function(arrays) {
69948 var comparator = last(arrays);
69949 comparator = typeof comparator == 'function' ? comparator : undefined;
69950 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
69951 });
69952
69953 /**
69954 * Creates a duplicate-free version of an array, using
69955 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
69956 * for equality comparisons, in which only the first occurrence of each element
69957 * is kept. The order of result values is determined by the order they occur
69958 * in the array.
69959 *
69960 * @static
69961 * @memberOf _
69962 * @since 0.1.0
69963 * @category Array
69964 * @param {Array} array The array to inspect.
69965 * @returns {Array} Returns the new duplicate free array.
69966 * @example
69967 *
69968 * _.uniq([2, 1, 2]);
69969 * // => [2, 1]
69970 */
69971 function uniq(array) {
69972 return (array && array.length) ? baseUniq(array) : [];
69973 }
69974
69975 /**
69976 * This method is like `_.uniq` except that it accepts `iteratee` which is
69977 * invoked for each element in `array` to generate the criterion by which
69978 * uniqueness is computed. The order of result values is determined by the
69979 * order they occur in the array. The iteratee is invoked with one argument:
69980 * (value).
69981 *
69982 * @static
69983 * @memberOf _
69984 * @since 4.0.0
69985 * @category Array
69986 * @param {Array} array The array to inspect.
69987 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
69988 * @returns {Array} Returns the new duplicate free array.
69989 * @example
69990 *
69991 * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
69992 * // => [2.1, 1.2]
69993 *
69994 * // The `_.property` iteratee shorthand.
69995 * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
69996 * // => [{ 'x': 1 }, { 'x': 2 }]
69997 */
69998 function uniqBy(array, iteratee) {
69999 return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
70000 }
70001
70002 /**
70003 * This method is like `_.uniq` except that it accepts `comparator` which
70004 * is invoked to compare elements of `array`. The order of result values is
70005 * determined by the order they occur in the array.The comparator is invoked
70006 * with two arguments: (arrVal, othVal).
70007 *
70008 * @static
70009 * @memberOf _
70010 * @since 4.0.0
70011 * @category Array
70012 * @param {Array} array The array to inspect.
70013 * @param {Function} [comparator] The comparator invoked per element.
70014 * @returns {Array} Returns the new duplicate free array.
70015 * @example
70016 *
70017 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
70018 *
70019 * _.uniqWith(objects, _.isEqual);
70020 * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
70021 */
70022 function uniqWith(array, comparator) {
70023 comparator = typeof comparator == 'function' ? comparator : undefined;
70024 return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
70025 }
70026
70027 /**
70028 * This method is like `_.zip` except that it accepts an array of grouped
70029 * elements and creates an array regrouping the elements to their pre-zip
70030 * configuration.
70031 *
70032 * @static
70033 * @memberOf _
70034 * @since 1.2.0
70035 * @category Array
70036 * @param {Array} array The array of grouped elements to process.
70037 * @returns {Array} Returns the new array of regrouped elements.
70038 * @example
70039 *
70040 * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
70041 * // => [['a', 1, true], ['b', 2, false]]
70042 *
70043 * _.unzip(zipped);
70044 * // => [['a', 'b'], [1, 2], [true, false]]
70045 */
70046 function unzip(array) {
70047 if (!(array && array.length)) {
70048 return [];
70049 }
70050 var length = 0;
70051 array = arrayFilter(array, function(group) {
70052 if (isArrayLikeObject(group)) {
70053 length = nativeMax(group.length, length);
70054 return true;
70055 }
70056 });
70057 return baseTimes(length, function(index) {
70058 return arrayMap(array, baseProperty(index));
70059 });
70060 }
70061
70062 /**
70063 * This method is like `_.unzip` except that it accepts `iteratee` to specify
70064 * how regrouped values should be combined. The iteratee is invoked with the
70065 * elements of each group: (...group).
70066 *
70067 * @static
70068 * @memberOf _
70069 * @since 3.8.0
70070 * @category Array
70071 * @param {Array} array The array of grouped elements to process.
70072 * @param {Function} [iteratee=_.identity] The function to combine
70073 * regrouped values.
70074 * @returns {Array} Returns the new array of regrouped elements.
70075 * @example
70076 *
70077 * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
70078 * // => [[1, 10, 100], [2, 20, 200]]
70079 *
70080 * _.unzipWith(zipped, _.add);
70081 * // => [3, 30, 300]
70082 */
70083 function unzipWith(array, iteratee) {
70084 if (!(array && array.length)) {
70085 return [];
70086 }
70087 var result = unzip(array);
70088 if (iteratee == null) {
70089 return result;
70090 }
70091 return arrayMap(result, function(group) {
70092 return apply(iteratee, undefined, group);
70093 });
70094 }
70095
70096 /**
70097 * Creates an array excluding all given values using
70098 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
70099 * for equality comparisons.
70100 *
70101 * **Note:** Unlike `_.pull`, this method returns a new array.
70102 *
70103 * @static
70104 * @memberOf _
70105 * @since 0.1.0
70106 * @category Array
70107 * @param {Array} array The array to inspect.
70108 * @param {...*} [values] The values to exclude.
70109 * @returns {Array} Returns the new array of filtered values.
70110 * @see _.difference, _.xor
70111 * @example
70112 *
70113 * _.without([2, 1, 2, 3], 1, 2);
70114 * // => [3]
70115 */
70116 var without = baseRest(function(array, values) {
70117 return isArrayLikeObject(array)
70118 ? baseDifference(array, values)
70119 : [];
70120 });
70121
70122 /**
70123 * Creates an array of unique values that is the
70124 * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
70125 * of the given arrays. The order of result values is determined by the order
70126 * they occur in the arrays.
70127 *
70128 * @static
70129 * @memberOf _
70130 * @since 2.4.0
70131 * @category Array
70132 * @param {...Array} [arrays] The arrays to inspect.
70133 * @returns {Array} Returns the new array of filtered values.
70134 * @see _.difference, _.without
70135 * @example
70136 *
70137 * _.xor([2, 1], [2, 3]);
70138 * // => [1, 3]
70139 */
70140 var xor = baseRest(function(arrays) {
70141 return baseXor(arrayFilter(arrays, isArrayLikeObject));
70142 });
70143
70144 /**
70145 * This method is like `_.xor` except that it accepts `iteratee` which is
70146 * invoked for each element of each `arrays` to generate the criterion by
70147 * which by which they're compared. The order of result values is determined
70148 * by the order they occur in the arrays. The iteratee is invoked with one
70149 * argument: (value).
70150 *
70151 * @static
70152 * @memberOf _
70153 * @since 4.0.0
70154 * @category Array
70155 * @param {...Array} [arrays] The arrays to inspect.
70156 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
70157 * @returns {Array} Returns the new array of filtered values.
70158 * @example
70159 *
70160 * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
70161 * // => [1.2, 3.4]
70162 *
70163 * // The `_.property` iteratee shorthand.
70164 * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
70165 * // => [{ 'x': 2 }]
70166 */
70167 var xorBy = baseRest(function(arrays) {
70168 var iteratee = last(arrays);
70169 if (isArrayLikeObject(iteratee)) {
70170 iteratee = undefined;
70171 }
70172 return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
70173 });
70174
70175 /**
70176 * This method is like `_.xor` except that it accepts `comparator` which is
70177 * invoked to compare elements of `arrays`. The order of result values is
70178 * determined by the order they occur in the arrays. The comparator is invoked
70179 * with two arguments: (arrVal, othVal).
70180 *
70181 * @static
70182 * @memberOf _
70183 * @since 4.0.0
70184 * @category Array
70185 * @param {...Array} [arrays] The arrays to inspect.
70186 * @param {Function} [comparator] The comparator invoked per element.
70187 * @returns {Array} Returns the new array of filtered values.
70188 * @example
70189 *
70190 * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
70191 * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
70192 *
70193 * _.xorWith(objects, others, _.isEqual);
70194 * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
70195 */
70196 var xorWith = baseRest(function(arrays) {
70197 var comparator = last(arrays);
70198 comparator = typeof comparator == 'function' ? comparator : undefined;
70199 return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
70200 });
70201
70202 /**
70203 * Creates an array of grouped elements, the first of which contains the
70204 * first elements of the given arrays, the second of which contains the
70205 * second elements of the given arrays, and so on.
70206 *
70207 * @static
70208 * @memberOf _
70209 * @since 0.1.0
70210 * @category Array
70211 * @param {...Array} [arrays] The arrays to process.
70212 * @returns {Array} Returns the new array of grouped elements.
70213 * @example
70214 *
70215 * _.zip(['a', 'b'], [1, 2], [true, false]);
70216 * // => [['a', 1, true], ['b', 2, false]]
70217 */
70218 var zip = baseRest(unzip);
70219
70220 /**
70221 * This method is like `_.fromPairs` except that it accepts two arrays,
70222 * one of property identifiers and one of corresponding values.
70223 *
70224 * @static
70225 * @memberOf _
70226 * @since 0.4.0
70227 * @category Array
70228 * @param {Array} [props=[]] The property identifiers.
70229 * @param {Array} [values=[]] The property values.
70230 * @returns {Object} Returns the new object.
70231 * @example
70232 *
70233 * _.zipObject(['a', 'b'], [1, 2]);
70234 * // => { 'a': 1, 'b': 2 }
70235 */
70236 function zipObject(props, values) {
70237 return baseZipObject(props || [], values || [], assignValue);
70238 }
70239
70240 /**
70241 * This method is like `_.zipObject` except that it supports property paths.
70242 *
70243 * @static
70244 * @memberOf _
70245 * @since 4.1.0
70246 * @category Array
70247 * @param {Array} [props=[]] The property identifiers.
70248 * @param {Array} [values=[]] The property values.
70249 * @returns {Object} Returns the new object.
70250 * @example
70251 *
70252 * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
70253 * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
70254 */
70255 function zipObjectDeep(props, values) {
70256 return baseZipObject(props || [], values || [], baseSet);
70257 }
70258
70259 /**
70260 * This method is like `_.zip` except that it accepts `iteratee` to specify
70261 * how grouped values should be combined. The iteratee is invoked with the
70262 * elements of each group: (...group).
70263 *
70264 * @static
70265 * @memberOf _
70266 * @since 3.8.0
70267 * @category Array
70268 * @param {...Array} [arrays] The arrays to process.
70269 * @param {Function} [iteratee=_.identity] The function to combine
70270 * grouped values.
70271 * @returns {Array} Returns the new array of grouped elements.
70272 * @example
70273 *
70274 * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
70275 * return a + b + c;
70276 * });
70277 * // => [111, 222]
70278 */
70279 var zipWith = baseRest(function(arrays) {
70280 var length = arrays.length,
70281 iteratee = length > 1 ? arrays[length - 1] : undefined;
70282
70283 iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
70284 return unzipWith(arrays, iteratee);
70285 });
70286
70287 /*------------------------------------------------------------------------*/
70288
70289 /**
70290 * Creates a `lodash` wrapper instance that wraps `value` with explicit method
70291 * chain sequences enabled. The result of such sequences must be unwrapped
70292 * with `_#value`.
70293 *
70294 * @static
70295 * @memberOf _
70296 * @since 1.3.0
70297 * @category Seq
70298 * @param {*} value The value to wrap.
70299 * @returns {Object} Returns the new `lodash` wrapper instance.
70300 * @example
70301 *
70302 * var users = [
70303 * { 'user': 'barney', 'age': 36 },
70304 * { 'user': 'fred', 'age': 40 },
70305 * { 'user': 'pebbles', 'age': 1 }
70306 * ];
70307 *
70308 * var youngest = _
70309 * .chain(users)
70310 * .sortBy('age')
70311 * .map(function(o) {
70312 * return o.user + ' is ' + o.age;
70313 * })
70314 * .head()
70315 * .value();
70316 * // => 'pebbles is 1'
70317 */
70318 function chain(value) {
70319 var result = lodash(value);
70320 result.__chain__ = true;
70321 return result;
70322 }
70323
70324 /**
70325 * This method invokes `interceptor` and returns `value`. The interceptor
70326 * is invoked with one argument; (value). The purpose of this method is to
70327 * "tap into" a method chain sequence in order to modify intermediate results.
70328 *
70329 * @static
70330 * @memberOf _
70331 * @since 0.1.0
70332 * @category Seq
70333 * @param {*} value The value to provide to `interceptor`.
70334 * @param {Function} interceptor The function to invoke.
70335 * @returns {*} Returns `value`.
70336 * @example
70337 *
70338 * _([1, 2, 3])
70339 * .tap(function(array) {
70340 * // Mutate input array.
70341 * array.pop();
70342 * })
70343 * .reverse()
70344 * .value();
70345 * // => [2, 1]
70346 */
70347 function tap(value, interceptor) {
70348 interceptor(value);
70349 return value;
70350 }
70351
70352 /**
70353 * This method is like `_.tap` except that it returns the result of `interceptor`.
70354 * The purpose of this method is to "pass thru" values replacing intermediate
70355 * results in a method chain sequence.
70356 *
70357 * @static
70358 * @memberOf _
70359 * @since 3.0.0
70360 * @category Seq
70361 * @param {*} value The value to provide to `interceptor`.
70362 * @param {Function} interceptor The function to invoke.
70363 * @returns {*} Returns the result of `interceptor`.
70364 * @example
70365 *
70366 * _(' abc ')
70367 * .chain()
70368 * .trim()
70369 * .thru(function(value) {
70370 * return [value];
70371 * })
70372 * .value();
70373 * // => ['abc']
70374 */
70375 function thru(value, interceptor) {
70376 return interceptor(value);
70377 }
70378
70379 /**
70380 * This method is the wrapper version of `_.at`.
70381 *
70382 * @name at
70383 * @memberOf _
70384 * @since 1.0.0
70385 * @category Seq
70386 * @param {...(string|string[])} [paths] The property paths to pick.
70387 * @returns {Object} Returns the new `lodash` wrapper instance.
70388 * @example
70389 *
70390 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
70391 *
70392 * _(object).at(['a[0].b.c', 'a[1]']).value();
70393 * // => [3, 4]
70394 */
70395 var wrapperAt = flatRest(function(paths) {
70396 var length = paths.length,
70397 start = length ? paths[0] : 0,
70398 value = this.__wrapped__,
70399 interceptor = function(object) { return baseAt(object, paths); };
70400
70401 if (length > 1 || this.__actions__.length ||
70402 !(value instanceof LazyWrapper) || !isIndex(start)) {
70403 return this.thru(interceptor);
70404 }
70405 value = value.slice(start, +start + (length ? 1 : 0));
70406 value.__actions__.push({
70407 'func': thru,
70408 'args': [interceptor],
70409 'thisArg': undefined
70410 });
70411 return new LodashWrapper(value, this.__chain__).thru(function(array) {
70412 if (length && !array.length) {
70413 array.push(undefined);
70414 }
70415 return array;
70416 });
70417 });
70418
70419 /**
70420 * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
70421 *
70422 * @name chain
70423 * @memberOf _
70424 * @since 0.1.0
70425 * @category Seq
70426 * @returns {Object} Returns the new `lodash` wrapper instance.
70427 * @example
70428 *
70429 * var users = [
70430 * { 'user': 'barney', 'age': 36 },
70431 * { 'user': 'fred', 'age': 40 }
70432 * ];
70433 *
70434 * // A sequence without explicit chaining.
70435 * _(users).head();
70436 * // => { 'user': 'barney', 'age': 36 }
70437 *
70438 * // A sequence with explicit chaining.
70439 * _(users)
70440 * .chain()
70441 * .head()
70442 * .pick('user')
70443 * .value();
70444 * // => { 'user': 'barney' }
70445 */
70446 function wrapperChain() {
70447 return chain(this);
70448 }
70449
70450 /**
70451 * Executes the chain sequence and returns the wrapped result.
70452 *
70453 * @name commit
70454 * @memberOf _
70455 * @since 3.2.0
70456 * @category Seq
70457 * @returns {Object} Returns the new `lodash` wrapper instance.
70458 * @example
70459 *
70460 * var array = [1, 2];
70461 * var wrapped = _(array).push(3);
70462 *
70463 * console.log(array);
70464 * // => [1, 2]
70465 *
70466 * wrapped = wrapped.commit();
70467 * console.log(array);
70468 * // => [1, 2, 3]
70469 *
70470 * wrapped.last();
70471 * // => 3
70472 *
70473 * console.log(array);
70474 * // => [1, 2, 3]
70475 */
70476 function wrapperCommit() {
70477 return new LodashWrapper(this.value(), this.__chain__);
70478 }
70479
70480 /**
70481 * Gets the next value on a wrapped object following the
70482 * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
70483 *
70484 * @name next
70485 * @memberOf _
70486 * @since 4.0.0
70487 * @category Seq
70488 * @returns {Object} Returns the next iterator value.
70489 * @example
70490 *
70491 * var wrapped = _([1, 2]);
70492 *
70493 * wrapped.next();
70494 * // => { 'done': false, 'value': 1 }
70495 *
70496 * wrapped.next();
70497 * // => { 'done': false, 'value': 2 }
70498 *
70499 * wrapped.next();
70500 * // => { 'done': true, 'value': undefined }
70501 */
70502 function wrapperNext() {
70503 if (this.__values__ === undefined) {
70504 this.__values__ = toArray(this.value());
70505 }
70506 var done = this.__index__ >= this.__values__.length,
70507 value = done ? undefined : this.__values__[this.__index__++];
70508
70509 return { 'done': done, 'value': value };
70510 }
70511
70512 /**
70513 * Enables the wrapper to be iterable.
70514 *
70515 * @name Symbol.iterator
70516 * @memberOf _
70517 * @since 4.0.0
70518 * @category Seq
70519 * @returns {Object} Returns the wrapper object.
70520 * @example
70521 *
70522 * var wrapped = _([1, 2]);
70523 *
70524 * wrapped[Symbol.iterator]() === wrapped;
70525 * // => true
70526 *
70527 * Array.from(wrapped);
70528 * // => [1, 2]
70529 */
70530 function wrapperToIterator() {
70531 return this;
70532 }
70533
70534 /**
70535 * Creates a clone of the chain sequence planting `value` as the wrapped value.
70536 *
70537 * @name plant
70538 * @memberOf _
70539 * @since 3.2.0
70540 * @category Seq
70541 * @param {*} value The value to plant.
70542 * @returns {Object} Returns the new `lodash` wrapper instance.
70543 * @example
70544 *
70545 * function square(n) {
70546 * return n * n;
70547 * }
70548 *
70549 * var wrapped = _([1, 2]).map(square);
70550 * var other = wrapped.plant([3, 4]);
70551 *
70552 * other.value();
70553 * // => [9, 16]
70554 *
70555 * wrapped.value();
70556 * // => [1, 4]
70557 */
70558 function wrapperPlant(value) {
70559 var result,
70560 parent = this;
70561
70562 while (parent instanceof baseLodash) {
70563 var clone = wrapperClone(parent);
70564 clone.__index__ = 0;
70565 clone.__values__ = undefined;
70566 if (result) {
70567 previous.__wrapped__ = clone;
70568 } else {
70569 result = clone;
70570 }
70571 var previous = clone;
70572 parent = parent.__wrapped__;
70573 }
70574 previous.__wrapped__ = value;
70575 return result;
70576 }
70577
70578 /**
70579 * This method is the wrapper version of `_.reverse`.
70580 *
70581 * **Note:** This method mutates the wrapped array.
70582 *
70583 * @name reverse
70584 * @memberOf _
70585 * @since 0.1.0
70586 * @category Seq
70587 * @returns {Object} Returns the new `lodash` wrapper instance.
70588 * @example
70589 *
70590 * var array = [1, 2, 3];
70591 *
70592 * _(array).reverse().value()
70593 * // => [3, 2, 1]
70594 *
70595 * console.log(array);
70596 * // => [3, 2, 1]
70597 */
70598 function wrapperReverse() {
70599 var value = this.__wrapped__;
70600 if (value instanceof LazyWrapper) {
70601 var wrapped = value;
70602 if (this.__actions__.length) {
70603 wrapped = new LazyWrapper(this);
70604 }
70605 wrapped = wrapped.reverse();
70606 wrapped.__actions__.push({
70607 'func': thru,
70608 'args': [reverse],
70609 'thisArg': undefined
70610 });
70611 return new LodashWrapper(wrapped, this.__chain__);
70612 }
70613 return this.thru(reverse);
70614 }
70615
70616 /**
70617 * Executes the chain sequence to resolve the unwrapped value.
70618 *
70619 * @name value
70620 * @memberOf _
70621 * @since 0.1.0
70622 * @alias toJSON, valueOf
70623 * @category Seq
70624 * @returns {*} Returns the resolved unwrapped value.
70625 * @example
70626 *
70627 * _([1, 2, 3]).value();
70628 * // => [1, 2, 3]
70629 */
70630 function wrapperValue() {
70631 return baseWrapperValue(this.__wrapped__, this.__actions__);
70632 }
70633
70634 /*------------------------------------------------------------------------*/
70635
70636 /**
70637 * Creates an object composed of keys generated from the results of running
70638 * each element of `collection` thru `iteratee`. The corresponding value of
70639 * each key is the number of times the key was returned by `iteratee`. The
70640 * iteratee is invoked with one argument: (value).
70641 *
70642 * @static
70643 * @memberOf _
70644 * @since 0.5.0
70645 * @category Collection
70646 * @param {Array|Object} collection The collection to iterate over.
70647 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
70648 * @returns {Object} Returns the composed aggregate object.
70649 * @example
70650 *
70651 * _.countBy([6.1, 4.2, 6.3], Math.floor);
70652 * // => { '4': 1, '6': 2 }
70653 *
70654 * // The `_.property` iteratee shorthand.
70655 * _.countBy(['one', 'two', 'three'], 'length');
70656 * // => { '3': 2, '5': 1 }
70657 */
70658 var countBy = createAggregator(function(result, value, key) {
70659 if (hasOwnProperty.call(result, key)) {
70660 ++result[key];
70661 } else {
70662 baseAssignValue(result, key, 1);
70663 }
70664 });
70665
70666 /**
70667 * Checks if `predicate` returns truthy for **all** elements of `collection`.
70668 * Iteration is stopped once `predicate` returns falsey. The predicate is
70669 * invoked with three arguments: (value, index|key, collection).
70670 *
70671 * **Note:** This method returns `true` for
70672 * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
70673 * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
70674 * elements of empty collections.
70675 *
70676 * @static
70677 * @memberOf _
70678 * @since 0.1.0
70679 * @category Collection
70680 * @param {Array|Object} collection The collection to iterate over.
70681 * @param {Function} [predicate=_.identity] The function invoked per iteration.
70682 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
70683 * @returns {boolean} Returns `true` if all elements pass the predicate check,
70684 * else `false`.
70685 * @example
70686 *
70687 * _.every([true, 1, null, 'yes'], Boolean);
70688 * // => false
70689 *
70690 * var users = [
70691 * { 'user': 'barney', 'age': 36, 'active': false },
70692 * { 'user': 'fred', 'age': 40, 'active': false }
70693 * ];
70694 *
70695 * // The `_.matches` iteratee shorthand.
70696 * _.every(users, { 'user': 'barney', 'active': false });
70697 * // => false
70698 *
70699 * // The `_.matchesProperty` iteratee shorthand.
70700 * _.every(users, ['active', false]);
70701 * // => true
70702 *
70703 * // The `_.property` iteratee shorthand.
70704 * _.every(users, 'active');
70705 * // => false
70706 */
70707 function every(collection, predicate, guard) {
70708 var func = isArray(collection) ? arrayEvery : baseEvery;
70709 if (guard && isIterateeCall(collection, predicate, guard)) {
70710 predicate = undefined;
70711 }
70712 return func(collection, getIteratee(predicate, 3));
70713 }
70714
70715 /**
70716 * Iterates over elements of `collection`, returning an array of all elements
70717 * `predicate` returns truthy for. The predicate is invoked with three
70718 * arguments: (value, index|key, collection).
70719 *
70720 * **Note:** Unlike `_.remove`, this method returns a new array.
70721 *
70722 * @static
70723 * @memberOf _
70724 * @since 0.1.0
70725 * @category Collection
70726 * @param {Array|Object} collection The collection to iterate over.
70727 * @param {Function} [predicate=_.identity] The function invoked per iteration.
70728 * @returns {Array} Returns the new filtered array.
70729 * @see _.reject
70730 * @example
70731 *
70732 * var users = [
70733 * { 'user': 'barney', 'age': 36, 'active': true },
70734 * { 'user': 'fred', 'age': 40, 'active': false }
70735 * ];
70736 *
70737 * _.filter(users, function(o) { return !o.active; });
70738 * // => objects for ['fred']
70739 *
70740 * // The `_.matches` iteratee shorthand.
70741 * _.filter(users, { 'age': 36, 'active': true });
70742 * // => objects for ['barney']
70743 *
70744 * // The `_.matchesProperty` iteratee shorthand.
70745 * _.filter(users, ['active', false]);
70746 * // => objects for ['fred']
70747 *
70748 * // The `_.property` iteratee shorthand.
70749 * _.filter(users, 'active');
70750 * // => objects for ['barney']
70751 */
70752 function filter(collection, predicate) {
70753 var func = isArray(collection) ? arrayFilter : baseFilter;
70754 return func(collection, getIteratee(predicate, 3));
70755 }
70756
70757 /**
70758 * Iterates over elements of `collection`, returning the first element
70759 * `predicate` returns truthy for. The predicate is invoked with three
70760 * arguments: (value, index|key, collection).
70761 *
70762 * @static
70763 * @memberOf _
70764 * @since 0.1.0
70765 * @category Collection
70766 * @param {Array|Object} collection The collection to inspect.
70767 * @param {Function} [predicate=_.identity] The function invoked per iteration.
70768 * @param {number} [fromIndex=0] The index to search from.
70769 * @returns {*} Returns the matched element, else `undefined`.
70770 * @example
70771 *
70772 * var users = [
70773 * { 'user': 'barney', 'age': 36, 'active': true },
70774 * { 'user': 'fred', 'age': 40, 'active': false },
70775 * { 'user': 'pebbles', 'age': 1, 'active': true }
70776 * ];
70777 *
70778 * _.find(users, function(o) { return o.age < 40; });
70779 * // => object for 'barney'
70780 *
70781 * // The `_.matches` iteratee shorthand.
70782 * _.find(users, { 'age': 1, 'active': true });
70783 * // => object for 'pebbles'
70784 *
70785 * // The `_.matchesProperty` iteratee shorthand.
70786 * _.find(users, ['active', false]);
70787 * // => object for 'fred'
70788 *
70789 * // The `_.property` iteratee shorthand.
70790 * _.find(users, 'active');
70791 * // => object for 'barney'
70792 */
70793 var find = createFind(findIndex);
70794
70795 /**
70796 * This method is like `_.find` except that it iterates over elements of
70797 * `collection` from right to left.
70798 *
70799 * @static
70800 * @memberOf _
70801 * @since 2.0.0
70802 * @category Collection
70803 * @param {Array|Object} collection The collection to inspect.
70804 * @param {Function} [predicate=_.identity] The function invoked per iteration.
70805 * @param {number} [fromIndex=collection.length-1] The index to search from.
70806 * @returns {*} Returns the matched element, else `undefined`.
70807 * @example
70808 *
70809 * _.findLast([1, 2, 3, 4], function(n) {
70810 * return n % 2 == 1;
70811 * });
70812 * // => 3
70813 */
70814 var findLast = createFind(findLastIndex);
70815
70816 /**
70817 * Creates a flattened array of values by running each element in `collection`
70818 * thru `iteratee` and flattening the mapped results. The iteratee is invoked
70819 * with three arguments: (value, index|key, collection).
70820 *
70821 * @static
70822 * @memberOf _
70823 * @since 4.0.0
70824 * @category Collection
70825 * @param {Array|Object} collection The collection to iterate over.
70826 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
70827 * @returns {Array} Returns the new flattened array.
70828 * @example
70829 *
70830 * function duplicate(n) {
70831 * return [n, n];
70832 * }
70833 *
70834 * _.flatMap([1, 2], duplicate);
70835 * // => [1, 1, 2, 2]
70836 */
70837 function flatMap(collection, iteratee) {
70838 return baseFlatten(map(collection, iteratee), 1);
70839 }
70840
70841 /**
70842 * This method is like `_.flatMap` except that it recursively flattens the
70843 * mapped results.
70844 *
70845 * @static
70846 * @memberOf _
70847 * @since 4.7.0
70848 * @category Collection
70849 * @param {Array|Object} collection The collection to iterate over.
70850 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
70851 * @returns {Array} Returns the new flattened array.
70852 * @example
70853 *
70854 * function duplicate(n) {
70855 * return [[[n, n]]];
70856 * }
70857 *
70858 * _.flatMapDeep([1, 2], duplicate);
70859 * // => [1, 1, 2, 2]
70860 */
70861 function flatMapDeep(collection, iteratee) {
70862 return baseFlatten(map(collection, iteratee), INFINITY);
70863 }
70864
70865 /**
70866 * This method is like `_.flatMap` except that it recursively flattens the
70867 * mapped results up to `depth` times.
70868 *
70869 * @static
70870 * @memberOf _
70871 * @since 4.7.0
70872 * @category Collection
70873 * @param {Array|Object} collection The collection to iterate over.
70874 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
70875 * @param {number} [depth=1] The maximum recursion depth.
70876 * @returns {Array} Returns the new flattened array.
70877 * @example
70878 *
70879 * function duplicate(n) {
70880 * return [[[n, n]]];
70881 * }
70882 *
70883 * _.flatMapDepth([1, 2], duplicate, 2);
70884 * // => [[1, 1], [2, 2]]
70885 */
70886 function flatMapDepth(collection, iteratee, depth) {
70887 depth = depth === undefined ? 1 : toInteger(depth);
70888 return baseFlatten(map(collection, iteratee), depth);
70889 }
70890
70891 /**
70892 * Iterates over elements of `collection` and invokes `iteratee` for each element.
70893 * The iteratee is invoked with three arguments: (value, index|key, collection).
70894 * Iteratee functions may exit iteration early by explicitly returning `false`.
70895 *
70896 * **Note:** As with other "Collections" methods, objects with a "length"
70897 * property are iterated like arrays. To avoid this behavior use `_.forIn`
70898 * or `_.forOwn` for object iteration.
70899 *
70900 * @static
70901 * @memberOf _
70902 * @since 0.1.0
70903 * @alias each
70904 * @category Collection
70905 * @param {Array|Object} collection The collection to iterate over.
70906 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
70907 * @returns {Array|Object} Returns `collection`.
70908 * @see _.forEachRight
70909 * @example
70910 *
70911 * _.forEach([1, 2], function(value) {
70912 * console.log(value);
70913 * });
70914 * // => Logs `1` then `2`.
70915 *
70916 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
70917 * console.log(key);
70918 * });
70919 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
70920 */
70921 function forEach(collection, iteratee) {
70922 var func = isArray(collection) ? arrayEach : baseEach;
70923 return func(collection, getIteratee(iteratee, 3));
70924 }
70925
70926 /**
70927 * This method is like `_.forEach` except that it iterates over elements of
70928 * `collection` from right to left.
70929 *
70930 * @static
70931 * @memberOf _
70932 * @since 2.0.0
70933 * @alias eachRight
70934 * @category Collection
70935 * @param {Array|Object} collection The collection to iterate over.
70936 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
70937 * @returns {Array|Object} Returns `collection`.
70938 * @see _.forEach
70939 * @example
70940 *
70941 * _.forEachRight([1, 2], function(value) {
70942 * console.log(value);
70943 * });
70944 * // => Logs `2` then `1`.
70945 */
70946 function forEachRight(collection, iteratee) {
70947 var func = isArray(collection) ? arrayEachRight : baseEachRight;
70948 return func(collection, getIteratee(iteratee, 3));
70949 }
70950
70951 /**
70952 * Creates an object composed of keys generated from the results of running
70953 * each element of `collection` thru `iteratee`. The order of grouped values
70954 * is determined by the order they occur in `collection`. The corresponding
70955 * value of each key is an array of elements responsible for generating the
70956 * key. The iteratee is invoked with one argument: (value).
70957 *
70958 * @static
70959 * @memberOf _
70960 * @since 0.1.0
70961 * @category Collection
70962 * @param {Array|Object} collection The collection to iterate over.
70963 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
70964 * @returns {Object} Returns the composed aggregate object.
70965 * @example
70966 *
70967 * _.groupBy([6.1, 4.2, 6.3], Math.floor);
70968 * // => { '4': [4.2], '6': [6.1, 6.3] }
70969 *
70970 * // The `_.property` iteratee shorthand.
70971 * _.groupBy(['one', 'two', 'three'], 'length');
70972 * // => { '3': ['one', 'two'], '5': ['three'] }
70973 */
70974 var groupBy = createAggregator(function(result, value, key) {
70975 if (hasOwnProperty.call(result, key)) {
70976 result[key].push(value);
70977 } else {
70978 baseAssignValue(result, key, [value]);
70979 }
70980 });
70981
70982 /**
70983 * Checks if `value` is in `collection`. If `collection` is a string, it's
70984 * checked for a substring of `value`, otherwise
70985 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
70986 * is used for equality comparisons. If `fromIndex` is negative, it's used as
70987 * the offset from the end of `collection`.
70988 *
70989 * @static
70990 * @memberOf _
70991 * @since 0.1.0
70992 * @category Collection
70993 * @param {Array|Object|string} collection The collection to inspect.
70994 * @param {*} value The value to search for.
70995 * @param {number} [fromIndex=0] The index to search from.
70996 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
70997 * @returns {boolean} Returns `true` if `value` is found, else `false`.
70998 * @example
70999 *
71000 * _.includes([1, 2, 3], 1);
71001 * // => true
71002 *
71003 * _.includes([1, 2, 3], 1, 2);
71004 * // => false
71005 *
71006 * _.includes({ 'a': 1, 'b': 2 }, 1);
71007 * // => true
71008 *
71009 * _.includes('abcd', 'bc');
71010 * // => true
71011 */
71012 function includes(collection, value, fromIndex, guard) {
71013 collection = isArrayLike(collection) ? collection : values(collection);
71014 fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
71015
71016 var length = collection.length;
71017 if (fromIndex < 0) {
71018 fromIndex = nativeMax(length + fromIndex, 0);
71019 }
71020 return isString(collection)
71021 ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
71022 : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
71023 }
71024
71025 /**
71026 * Invokes the method at `path` of each element in `collection`, returning
71027 * an array of the results of each invoked method. Any additional arguments
71028 * are provided to each invoked method. If `path` is a function, it's invoked
71029 * for, and `this` bound to, each element in `collection`.
71030 *
71031 * @static
71032 * @memberOf _
71033 * @since 4.0.0
71034 * @category Collection
71035 * @param {Array|Object} collection The collection to iterate over.
71036 * @param {Array|Function|string} path The path of the method to invoke or
71037 * the function invoked per iteration.
71038 * @param {...*} [args] The arguments to invoke each method with.
71039 * @returns {Array} Returns the array of results.
71040 * @example
71041 *
71042 * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
71043 * // => [[1, 5, 7], [1, 2, 3]]
71044 *
71045 * _.invokeMap([123, 456], String.prototype.split, '');
71046 * // => [['1', '2', '3'], ['4', '5', '6']]
71047 */
71048 var invokeMap = baseRest(function(collection, path, args) {
71049 var index = -1,
71050 isFunc = typeof path == 'function',
71051 result = isArrayLike(collection) ? Array(collection.length) : [];
71052
71053 baseEach(collection, function(value) {
71054 result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
71055 });
71056 return result;
71057 });
71058
71059 /**
71060 * Creates an object composed of keys generated from the results of running
71061 * each element of `collection` thru `iteratee`. The corresponding value of
71062 * each key is the last element responsible for generating the key. The
71063 * iteratee is invoked with one argument: (value).
71064 *
71065 * @static
71066 * @memberOf _
71067 * @since 4.0.0
71068 * @category Collection
71069 * @param {Array|Object} collection The collection to iterate over.
71070 * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
71071 * @returns {Object} Returns the composed aggregate object.
71072 * @example
71073 *
71074 * var array = [
71075 * { 'dir': 'left', 'code': 97 },
71076 * { 'dir': 'right', 'code': 100 }
71077 * ];
71078 *
71079 * _.keyBy(array, function(o) {
71080 * return String.fromCharCode(o.code);
71081 * });
71082 * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
71083 *
71084 * _.keyBy(array, 'dir');
71085 * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
71086 */
71087 var keyBy = createAggregator(function(result, value, key) {
71088 baseAssignValue(result, key, value);
71089 });
71090
71091 /**
71092 * Creates an array of values by running each element in `collection` thru
71093 * `iteratee`. The iteratee is invoked with three arguments:
71094 * (value, index|key, collection).
71095 *
71096 * Many lodash methods are guarded to work as iteratees for methods like
71097 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
71098 *
71099 * The guarded methods are:
71100 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
71101 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
71102 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
71103 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
71104 *
71105 * @static
71106 * @memberOf _
71107 * @since 0.1.0
71108 * @category Collection
71109 * @param {Array|Object} collection The collection to iterate over.
71110 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
71111 * @returns {Array} Returns the new mapped array.
71112 * @example
71113 *
71114 * function square(n) {
71115 * return n * n;
71116 * }
71117 *
71118 * _.map([4, 8], square);
71119 * // => [16, 64]
71120 *
71121 * _.map({ 'a': 4, 'b': 8 }, square);
71122 * // => [16, 64] (iteration order is not guaranteed)
71123 *
71124 * var users = [
71125 * { 'user': 'barney' },
71126 * { 'user': 'fred' }
71127 * ];
71128 *
71129 * // The `_.property` iteratee shorthand.
71130 * _.map(users, 'user');
71131 * // => ['barney', 'fred']
71132 */
71133 function map(collection, iteratee) {
71134 var func = isArray(collection) ? arrayMap : baseMap;
71135 return func(collection, getIteratee(iteratee, 3));
71136 }
71137
71138 /**
71139 * This method is like `_.sortBy` except that it allows specifying the sort
71140 * orders of the iteratees to sort by. If `orders` is unspecified, all values
71141 * are sorted in ascending order. Otherwise, specify an order of "desc" for
71142 * descending or "asc" for ascending sort order of corresponding values.
71143 *
71144 * @static
71145 * @memberOf _
71146 * @since 4.0.0
71147 * @category Collection
71148 * @param {Array|Object} collection The collection to iterate over.
71149 * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
71150 * The iteratees to sort by.
71151 * @param {string[]} [orders] The sort orders of `iteratees`.
71152 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
71153 * @returns {Array} Returns the new sorted array.
71154 * @example
71155 *
71156 * var users = [
71157 * { 'user': 'fred', 'age': 48 },
71158 * { 'user': 'barney', 'age': 34 },
71159 * { 'user': 'fred', 'age': 40 },
71160 * { 'user': 'barney', 'age': 36 }
71161 * ];
71162 *
71163 * // Sort by `user` in ascending order and by `age` in descending order.
71164 * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
71165 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
71166 */
71167 function orderBy(collection, iteratees, orders, guard) {
71168 if (collection == null) {
71169 return [];
71170 }
71171 if (!isArray(iteratees)) {
71172 iteratees = iteratees == null ? [] : [iteratees];
71173 }
71174 orders = guard ? undefined : orders;
71175 if (!isArray(orders)) {
71176 orders = orders == null ? [] : [orders];
71177 }
71178 return baseOrderBy(collection, iteratees, orders);
71179 }
71180
71181 /**
71182 * Creates an array of elements split into two groups, the first of which
71183 * contains elements `predicate` returns truthy for, the second of which
71184 * contains elements `predicate` returns falsey for. The predicate is
71185 * invoked with one argument: (value).
71186 *
71187 * @static
71188 * @memberOf _
71189 * @since 3.0.0
71190 * @category Collection
71191 * @param {Array|Object} collection The collection to iterate over.
71192 * @param {Function} [predicate=_.identity] The function invoked per iteration.
71193 * @returns {Array} Returns the array of grouped elements.
71194 * @example
71195 *
71196 * var users = [
71197 * { 'user': 'barney', 'age': 36, 'active': false },
71198 * { 'user': 'fred', 'age': 40, 'active': true },
71199 * { 'user': 'pebbles', 'age': 1, 'active': false }
71200 * ];
71201 *
71202 * _.partition(users, function(o) { return o.active; });
71203 * // => objects for [['fred'], ['barney', 'pebbles']]
71204 *
71205 * // The `_.matches` iteratee shorthand.
71206 * _.partition(users, { 'age': 1, 'active': false });
71207 * // => objects for [['pebbles'], ['barney', 'fred']]
71208 *
71209 * // The `_.matchesProperty` iteratee shorthand.
71210 * _.partition(users, ['active', false]);
71211 * // => objects for [['barney', 'pebbles'], ['fred']]
71212 *
71213 * // The `_.property` iteratee shorthand.
71214 * _.partition(users, 'active');
71215 * // => objects for [['fred'], ['barney', 'pebbles']]
71216 */
71217 var partition = createAggregator(function(result, value, key) {
71218 result[key ? 0 : 1].push(value);
71219 }, function() { return [[], []]; });
71220
71221 /**
71222 * Reduces `collection` to a value which is the accumulated result of running
71223 * each element in `collection` thru `iteratee`, where each successive
71224 * invocation is supplied the return value of the previous. If `accumulator`
71225 * is not given, the first element of `collection` is used as the initial
71226 * value. The iteratee is invoked with four arguments:
71227 * (accumulator, value, index|key, collection).
71228 *
71229 * Many lodash methods are guarded to work as iteratees for methods like
71230 * `_.reduce`, `_.reduceRight`, and `_.transform`.
71231 *
71232 * The guarded methods are:
71233 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
71234 * and `sortBy`
71235 *
71236 * @static
71237 * @memberOf _
71238 * @since 0.1.0
71239 * @category Collection
71240 * @param {Array|Object} collection The collection to iterate over.
71241 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
71242 * @param {*} [accumulator] The initial value.
71243 * @returns {*} Returns the accumulated value.
71244 * @see _.reduceRight
71245 * @example
71246 *
71247 * _.reduce([1, 2], function(sum, n) {
71248 * return sum + n;
71249 * }, 0);
71250 * // => 3
71251 *
71252 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
71253 * (result[value] || (result[value] = [])).push(key);
71254 * return result;
71255 * }, {});
71256 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
71257 */
71258 function reduce(collection, iteratee, accumulator) {
71259 var func = isArray(collection) ? arrayReduce : baseReduce,
71260 initAccum = arguments.length < 3;
71261
71262 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
71263 }
71264
71265 /**
71266 * This method is like `_.reduce` except that it iterates over elements of
71267 * `collection` from right to left.
71268 *
71269 * @static
71270 * @memberOf _
71271 * @since 0.1.0
71272 * @category Collection
71273 * @param {Array|Object} collection The collection to iterate over.
71274 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
71275 * @param {*} [accumulator] The initial value.
71276 * @returns {*} Returns the accumulated value.
71277 * @see _.reduce
71278 * @example
71279 *
71280 * var array = [[0, 1], [2, 3], [4, 5]];
71281 *
71282 * _.reduceRight(array, function(flattened, other) {
71283 * return flattened.concat(other);
71284 * }, []);
71285 * // => [4, 5, 2, 3, 0, 1]
71286 */
71287 function reduceRight(collection, iteratee, accumulator) {
71288 var func = isArray(collection) ? arrayReduceRight : baseReduce,
71289 initAccum = arguments.length < 3;
71290
71291 return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
71292 }
71293
71294 /**
71295 * The opposite of `_.filter`; this method returns the elements of `collection`
71296 * that `predicate` does **not** return truthy for.
71297 *
71298 * @static
71299 * @memberOf _
71300 * @since 0.1.0
71301 * @category Collection
71302 * @param {Array|Object} collection The collection to iterate over.
71303 * @param {Function} [predicate=_.identity] The function invoked per iteration.
71304 * @returns {Array} Returns the new filtered array.
71305 * @see _.filter
71306 * @example
71307 *
71308 * var users = [
71309 * { 'user': 'barney', 'age': 36, 'active': false },
71310 * { 'user': 'fred', 'age': 40, 'active': true }
71311 * ];
71312 *
71313 * _.reject(users, function(o) { return !o.active; });
71314 * // => objects for ['fred']
71315 *
71316 * // The `_.matches` iteratee shorthand.
71317 * _.reject(users, { 'age': 40, 'active': true });
71318 * // => objects for ['barney']
71319 *
71320 * // The `_.matchesProperty` iteratee shorthand.
71321 * _.reject(users, ['active', false]);
71322 * // => objects for ['fred']
71323 *
71324 * // The `_.property` iteratee shorthand.
71325 * _.reject(users, 'active');
71326 * // => objects for ['barney']
71327 */
71328 function reject(collection, predicate) {
71329 var func = isArray(collection) ? arrayFilter : baseFilter;
71330 return func(collection, negate(getIteratee(predicate, 3)));
71331 }
71332
71333 /**
71334 * Gets a random element from `collection`.
71335 *
71336 * @static
71337 * @memberOf _
71338 * @since 2.0.0
71339 * @category Collection
71340 * @param {Array|Object} collection The collection to sample.
71341 * @returns {*} Returns the random element.
71342 * @example
71343 *
71344 * _.sample([1, 2, 3, 4]);
71345 * // => 2
71346 */
71347 function sample(collection) {
71348 var func = isArray(collection) ? arraySample : baseSample;
71349 return func(collection);
71350 }
71351
71352 /**
71353 * Gets `n` random elements at unique keys from `collection` up to the
71354 * size of `collection`.
71355 *
71356 * @static
71357 * @memberOf _
71358 * @since 4.0.0
71359 * @category Collection
71360 * @param {Array|Object} collection The collection to sample.
71361 * @param {number} [n=1] The number of elements to sample.
71362 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
71363 * @returns {Array} Returns the random elements.
71364 * @example
71365 *
71366 * _.sampleSize([1, 2, 3], 2);
71367 * // => [3, 1]
71368 *
71369 * _.sampleSize([1, 2, 3], 4);
71370 * // => [2, 3, 1]
71371 */
71372 function sampleSize(collection, n, guard) {
71373 if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
71374 n = 1;
71375 } else {
71376 n = toInteger(n);
71377 }
71378 var func = isArray(collection) ? arraySampleSize : baseSampleSize;
71379 return func(collection, n);
71380 }
71381
71382 /**
71383 * Creates an array of shuffled values, using a version of the
71384 * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
71385 *
71386 * @static
71387 * @memberOf _
71388 * @since 0.1.0
71389 * @category Collection
71390 * @param {Array|Object} collection The collection to shuffle.
71391 * @returns {Array} Returns the new shuffled array.
71392 * @example
71393 *
71394 * _.shuffle([1, 2, 3, 4]);
71395 * // => [4, 1, 3, 2]
71396 */
71397 function shuffle(collection) {
71398 var func = isArray(collection) ? arrayShuffle : baseShuffle;
71399 return func(collection);
71400 }
71401
71402 /**
71403 * Gets the size of `collection` by returning its length for array-like
71404 * values or the number of own enumerable string keyed properties for objects.
71405 *
71406 * @static
71407 * @memberOf _
71408 * @since 0.1.0
71409 * @category Collection
71410 * @param {Array|Object|string} collection The collection to inspect.
71411 * @returns {number} Returns the collection size.
71412 * @example
71413 *
71414 * _.size([1, 2, 3]);
71415 * // => 3
71416 *
71417 * _.size({ 'a': 1, 'b': 2 });
71418 * // => 2
71419 *
71420 * _.size('pebbles');
71421 * // => 7
71422 */
71423 function size(collection) {
71424 if (collection == null) {
71425 return 0;
71426 }
71427 if (isArrayLike(collection)) {
71428 return isString(collection) ? stringSize(collection) : collection.length;
71429 }
71430 var tag = getTag(collection);
71431 if (tag == mapTag || tag == setTag) {
71432 return collection.size;
71433 }
71434 return baseKeys(collection).length;
71435 }
71436
71437 /**
71438 * Checks if `predicate` returns truthy for **any** element of `collection`.
71439 * Iteration is stopped once `predicate` returns truthy. The predicate is
71440 * invoked with three arguments: (value, index|key, collection).
71441 *
71442 * @static
71443 * @memberOf _
71444 * @since 0.1.0
71445 * @category Collection
71446 * @param {Array|Object} collection The collection to iterate over.
71447 * @param {Function} [predicate=_.identity] The function invoked per iteration.
71448 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
71449 * @returns {boolean} Returns `true` if any element passes the predicate check,
71450 * else `false`.
71451 * @example
71452 *
71453 * _.some([null, 0, 'yes', false], Boolean);
71454 * // => true
71455 *
71456 * var users = [
71457 * { 'user': 'barney', 'active': true },
71458 * { 'user': 'fred', 'active': false }
71459 * ];
71460 *
71461 * // The `_.matches` iteratee shorthand.
71462 * _.some(users, { 'user': 'barney', 'active': false });
71463 * // => false
71464 *
71465 * // The `_.matchesProperty` iteratee shorthand.
71466 * _.some(users, ['active', false]);
71467 * // => true
71468 *
71469 * // The `_.property` iteratee shorthand.
71470 * _.some(users, 'active');
71471 * // => true
71472 */
71473 function some(collection, predicate, guard) {
71474 var func = isArray(collection) ? arraySome : baseSome;
71475 if (guard && isIterateeCall(collection, predicate, guard)) {
71476 predicate = undefined;
71477 }
71478 return func(collection, getIteratee(predicate, 3));
71479 }
71480
71481 /**
71482 * Creates an array of elements, sorted in ascending order by the results of
71483 * running each element in a collection thru each iteratee. This method
71484 * performs a stable sort, that is, it preserves the original sort order of
71485 * equal elements. The iteratees are invoked with one argument: (value).
71486 *
71487 * @static
71488 * @memberOf _
71489 * @since 0.1.0
71490 * @category Collection
71491 * @param {Array|Object} collection The collection to iterate over.
71492 * @param {...(Function|Function[])} [iteratees=[_.identity]]
71493 * The iteratees to sort by.
71494 * @returns {Array} Returns the new sorted array.
71495 * @example
71496 *
71497 * var users = [
71498 * { 'user': 'fred', 'age': 48 },
71499 * { 'user': 'barney', 'age': 36 },
71500 * { 'user': 'fred', 'age': 40 },
71501 * { 'user': 'barney', 'age': 34 }
71502 * ];
71503 *
71504 * _.sortBy(users, [function(o) { return o.user; }]);
71505 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
71506 *
71507 * _.sortBy(users, ['user', 'age']);
71508 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
71509 */
71510 var sortBy = baseRest(function(collection, iteratees) {
71511 if (collection == null) {
71512 return [];
71513 }
71514 var length = iteratees.length;
71515 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
71516 iteratees = [];
71517 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
71518 iteratees = [iteratees[0]];
71519 }
71520 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
71521 });
71522
71523 /*------------------------------------------------------------------------*/
71524
71525 /**
71526 * Gets the timestamp of the number of milliseconds that have elapsed since
71527 * the Unix epoch (1 January 1970 00:00:00 UTC).
71528 *
71529 * @static
71530 * @memberOf _
71531 * @since 2.4.0
71532 * @category Date
71533 * @returns {number} Returns the timestamp.
71534 * @example
71535 *
71536 * _.defer(function(stamp) {
71537 * console.log(_.now() - stamp);
71538 * }, _.now());
71539 * // => Logs the number of milliseconds it took for the deferred invocation.
71540 */
71541 var now = ctxNow || function() {
71542 return root.Date.now();
71543 };
71544
71545 /*------------------------------------------------------------------------*/
71546
71547 /**
71548 * The opposite of `_.before`; this method creates a function that invokes
71549 * `func` once it's called `n` or more times.
71550 *
71551 * @static
71552 * @memberOf _
71553 * @since 0.1.0
71554 * @category Function
71555 * @param {number} n The number of calls before `func` is invoked.
71556 * @param {Function} func The function to restrict.
71557 * @returns {Function} Returns the new restricted function.
71558 * @example
71559 *
71560 * var saves = ['profile', 'settings'];
71561 *
71562 * var done = _.after(saves.length, function() {
71563 * console.log('done saving!');
71564 * });
71565 *
71566 * _.forEach(saves, function(type) {
71567 * asyncSave({ 'type': type, 'complete': done });
71568 * });
71569 * // => Logs 'done saving!' after the two async saves have completed.
71570 */
71571 function after(n, func) {
71572 if (typeof func != 'function') {
71573 throw new TypeError(FUNC_ERROR_TEXT);
71574 }
71575 n = toInteger(n);
71576 return function() {
71577 if (--n < 1) {
71578 return func.apply(this, arguments);
71579 }
71580 };
71581 }
71582
71583 /**
71584 * Creates a function that invokes `func`, with up to `n` arguments,
71585 * ignoring any additional arguments.
71586 *
71587 * @static
71588 * @memberOf _
71589 * @since 3.0.0
71590 * @category Function
71591 * @param {Function} func The function to cap arguments for.
71592 * @param {number} [n=func.length] The arity cap.
71593 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
71594 * @returns {Function} Returns the new capped function.
71595 * @example
71596 *
71597 * _.map(['6', '8', '10'], _.ary(parseInt, 1));
71598 * // => [6, 8, 10]
71599 */
71600 function ary(func, n, guard) {
71601 n = guard ? undefined : n;
71602 n = (func && n == null) ? func.length : n;
71603 return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
71604 }
71605
71606 /**
71607 * Creates a function that invokes `func`, with the `this` binding and arguments
71608 * of the created function, while it's called less than `n` times. Subsequent
71609 * calls to the created function return the result of the last `func` invocation.
71610 *
71611 * @static
71612 * @memberOf _
71613 * @since 3.0.0
71614 * @category Function
71615 * @param {number} n The number of calls at which `func` is no longer invoked.
71616 * @param {Function} func The function to restrict.
71617 * @returns {Function} Returns the new restricted function.
71618 * @example
71619 *
71620 * jQuery(element).on('click', _.before(5, addContactToList));
71621 * // => Allows adding up to 4 contacts to the list.
71622 */
71623 function before(n, func) {
71624 var result;
71625 if (typeof func != 'function') {
71626 throw new TypeError(FUNC_ERROR_TEXT);
71627 }
71628 n = toInteger(n);
71629 return function() {
71630 if (--n > 0) {
71631 result = func.apply(this, arguments);
71632 }
71633 if (n <= 1) {
71634 func = undefined;
71635 }
71636 return result;
71637 };
71638 }
71639
71640 /**
71641 * Creates a function that invokes `func` with the `this` binding of `thisArg`
71642 * and `partials` prepended to the arguments it receives.
71643 *
71644 * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
71645 * may be used as a placeholder for partially applied arguments.
71646 *
71647 * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
71648 * property of bound functions.
71649 *
71650 * @static
71651 * @memberOf _
71652 * @since 0.1.0
71653 * @category Function
71654 * @param {Function} func The function to bind.
71655 * @param {*} thisArg The `this` binding of `func`.
71656 * @param {...*} [partials] The arguments to be partially applied.
71657 * @returns {Function} Returns the new bound function.
71658 * @example
71659 *
71660 * function greet(greeting, punctuation) {
71661 * return greeting + ' ' + this.user + punctuation;
71662 * }
71663 *
71664 * var object = { 'user': 'fred' };
71665 *
71666 * var bound = _.bind(greet, object, 'hi');
71667 * bound('!');
71668 * // => 'hi fred!'
71669 *
71670 * // Bound with placeholders.
71671 * var bound = _.bind(greet, object, _, '!');
71672 * bound('hi');
71673 * // => 'hi fred!'
71674 */
71675 var bind = baseRest(function(func, thisArg, partials) {
71676 var bitmask = WRAP_BIND_FLAG;
71677 if (partials.length) {
71678 var holders = replaceHolders(partials, getHolder(bind));
71679 bitmask |= WRAP_PARTIAL_FLAG;
71680 }
71681 return createWrap(func, bitmask, thisArg, partials, holders);
71682 });
71683
71684 /**
71685 * Creates a function that invokes the method at `object[key]` with `partials`
71686 * prepended to the arguments it receives.
71687 *
71688 * This method differs from `_.bind` by allowing bound functions to reference
71689 * methods that may be redefined or don't yet exist. See
71690 * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
71691 * for more details.
71692 *
71693 * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
71694 * builds, may be used as a placeholder for partially applied arguments.
71695 *
71696 * @static
71697 * @memberOf _
71698 * @since 0.10.0
71699 * @category Function
71700 * @param {Object} object The object to invoke the method on.
71701 * @param {string} key The key of the method.
71702 * @param {...*} [partials] The arguments to be partially applied.
71703 * @returns {Function} Returns the new bound function.
71704 * @example
71705 *
71706 * var object = {
71707 * 'user': 'fred',
71708 * 'greet': function(greeting, punctuation) {
71709 * return greeting + ' ' + this.user + punctuation;
71710 * }
71711 * };
71712 *
71713 * var bound = _.bindKey(object, 'greet', 'hi');
71714 * bound('!');
71715 * // => 'hi fred!'
71716 *
71717 * object.greet = function(greeting, punctuation) {
71718 * return greeting + 'ya ' + this.user + punctuation;
71719 * };
71720 *
71721 * bound('!');
71722 * // => 'hiya fred!'
71723 *
71724 * // Bound with placeholders.
71725 * var bound = _.bindKey(object, 'greet', _, '!');
71726 * bound('hi');
71727 * // => 'hiya fred!'
71728 */
71729 var bindKey = baseRest(function(object, key, partials) {
71730 var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
71731 if (partials.length) {
71732 var holders = replaceHolders(partials, getHolder(bindKey));
71733 bitmask |= WRAP_PARTIAL_FLAG;
71734 }
71735 return createWrap(key, bitmask, object, partials, holders);
71736 });
71737
71738 /**
71739 * Creates a function that accepts arguments of `func` and either invokes
71740 * `func` returning its result, if at least `arity` number of arguments have
71741 * been provided, or returns a function that accepts the remaining `func`
71742 * arguments, and so on. The arity of `func` may be specified if `func.length`
71743 * is not sufficient.
71744 *
71745 * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
71746 * may be used as a placeholder for provided arguments.
71747 *
71748 * **Note:** This method doesn't set the "length" property of curried functions.
71749 *
71750 * @static
71751 * @memberOf _
71752 * @since 2.0.0
71753 * @category Function
71754 * @param {Function} func The function to curry.
71755 * @param {number} [arity=func.length] The arity of `func`.
71756 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
71757 * @returns {Function} Returns the new curried function.
71758 * @example
71759 *
71760 * var abc = function(a, b, c) {
71761 * return [a, b, c];
71762 * };
71763 *
71764 * var curried = _.curry(abc);
71765 *
71766 * curried(1)(2)(3);
71767 * // => [1, 2, 3]
71768 *
71769 * curried(1, 2)(3);
71770 * // => [1, 2, 3]
71771 *
71772 * curried(1, 2, 3);
71773 * // => [1, 2, 3]
71774 *
71775 * // Curried with placeholders.
71776 * curried(1)(_, 3)(2);
71777 * // => [1, 2, 3]
71778 */
71779 function curry(func, arity, guard) {
71780 arity = guard ? undefined : arity;
71781 var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
71782 result.placeholder = curry.placeholder;
71783 return result;
71784 }
71785
71786 /**
71787 * This method is like `_.curry` except that arguments are applied to `func`
71788 * in the manner of `_.partialRight` instead of `_.partial`.
71789 *
71790 * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
71791 * builds, may be used as a placeholder for provided arguments.
71792 *
71793 * **Note:** This method doesn't set the "length" property of curried functions.
71794 *
71795 * @static
71796 * @memberOf _
71797 * @since 3.0.0
71798 * @category Function
71799 * @param {Function} func The function to curry.
71800 * @param {number} [arity=func.length] The arity of `func`.
71801 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
71802 * @returns {Function} Returns the new curried function.
71803 * @example
71804 *
71805 * var abc = function(a, b, c) {
71806 * return [a, b, c];
71807 * };
71808 *
71809 * var curried = _.curryRight(abc);
71810 *
71811 * curried(3)(2)(1);
71812 * // => [1, 2, 3]
71813 *
71814 * curried(2, 3)(1);
71815 * // => [1, 2, 3]
71816 *
71817 * curried(1, 2, 3);
71818 * // => [1, 2, 3]
71819 *
71820 * // Curried with placeholders.
71821 * curried(3)(1, _)(2);
71822 * // => [1, 2, 3]
71823 */
71824 function curryRight(func, arity, guard) {
71825 arity = guard ? undefined : arity;
71826 var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
71827 result.placeholder = curryRight.placeholder;
71828 return result;
71829 }
71830
71831 /**
71832 * Creates a debounced function that delays invoking `func` until after `wait`
71833 * milliseconds have elapsed since the last time the debounced function was
71834 * invoked. The debounced function comes with a `cancel` method to cancel
71835 * delayed `func` invocations and a `flush` method to immediately invoke them.
71836 * Provide `options` to indicate whether `func` should be invoked on the
71837 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
71838 * with the last arguments provided to the debounced function. Subsequent
71839 * calls to the debounced function return the result of the last `func`
71840 * invocation.
71841 *
71842 * **Note:** If `leading` and `trailing` options are `true`, `func` is
71843 * invoked on the trailing edge of the timeout only if the debounced function
71844 * is invoked more than once during the `wait` timeout.
71845 *
71846 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
71847 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
71848 *
71849 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
71850 * for details over the differences between `_.debounce` and `_.throttle`.
71851 *
71852 * @static
71853 * @memberOf _
71854 * @since 0.1.0
71855 * @category Function
71856 * @param {Function} func The function to debounce.
71857 * @param {number} [wait=0] The number of milliseconds to delay.
71858 * @param {Object} [options={}] The options object.
71859 * @param {boolean} [options.leading=false]
71860 * Specify invoking on the leading edge of the timeout.
71861 * @param {number} [options.maxWait]
71862 * The maximum time `func` is allowed to be delayed before it's invoked.
71863 * @param {boolean} [options.trailing=true]
71864 * Specify invoking on the trailing edge of the timeout.
71865 * @returns {Function} Returns the new debounced function.
71866 * @example
71867 *
71868 * // Avoid costly calculations while the window size is in flux.
71869 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
71870 *
71871 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
71872 * jQuery(element).on('click', _.debounce(sendMail, 300, {
71873 * 'leading': true,
71874 * 'trailing': false
71875 * }));
71876 *
71877 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
71878 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
71879 * var source = new EventSource('/stream');
71880 * jQuery(source).on('message', debounced);
71881 *
71882 * // Cancel the trailing debounced invocation.
71883 * jQuery(window).on('popstate', debounced.cancel);
71884 */
71885 function debounce(func, wait, options) {
71886 var lastArgs,
71887 lastThis,
71888 maxWait,
71889 result,
71890 timerId,
71891 lastCallTime,
71892 lastInvokeTime = 0,
71893 leading = false,
71894 maxing = false,
71895 trailing = true;
71896
71897 if (typeof func != 'function') {
71898 throw new TypeError(FUNC_ERROR_TEXT);
71899 }
71900 wait = toNumber(wait) || 0;
71901 if (isObject(options)) {
71902 leading = !!options.leading;
71903 maxing = 'maxWait' in options;
71904 maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
71905 trailing = 'trailing' in options ? !!options.trailing : trailing;
71906 }
71907
71908 function invokeFunc(time) {
71909 var args = lastArgs,
71910 thisArg = lastThis;
71911
71912 lastArgs = lastThis = undefined;
71913 lastInvokeTime = time;
71914 result = func.apply(thisArg, args);
71915 return result;
71916 }
71917
71918 function leadingEdge(time) {
71919 // Reset any `maxWait` timer.
71920 lastInvokeTime = time;
71921 // Start the timer for the trailing edge.
71922 timerId = setTimeout(timerExpired, wait);
71923 // Invoke the leading edge.
71924 return leading ? invokeFunc(time) : result;
71925 }
71926
71927 function remainingWait(time) {
71928 var timeSinceLastCall = time - lastCallTime,
71929 timeSinceLastInvoke = time - lastInvokeTime,
71930 timeWaiting = wait - timeSinceLastCall;
71931
71932 return maxing
71933 ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
71934 : timeWaiting;
71935 }
71936
71937 function shouldInvoke(time) {
71938 var timeSinceLastCall = time - lastCallTime,
71939 timeSinceLastInvoke = time - lastInvokeTime;
71940
71941 // Either this is the first call, activity has stopped and we're at the
71942 // trailing edge, the system time has gone backwards and we're treating
71943 // it as the trailing edge, or we've hit the `maxWait` limit.
71944 return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
71945 (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
71946 }
71947
71948 function timerExpired() {
71949 var time = now();
71950 if (shouldInvoke(time)) {
71951 return trailingEdge(time);
71952 }
71953 // Restart the timer.
71954 timerId = setTimeout(timerExpired, remainingWait(time));
71955 }
71956
71957 function trailingEdge(time) {
71958 timerId = undefined;
71959
71960 // Only invoke if we have `lastArgs` which means `func` has been
71961 // debounced at least once.
71962 if (trailing && lastArgs) {
71963 return invokeFunc(time);
71964 }
71965 lastArgs = lastThis = undefined;
71966 return result;
71967 }
71968
71969 function cancel() {
71970 if (timerId !== undefined) {
71971 clearTimeout(timerId);
71972 }
71973 lastInvokeTime = 0;
71974 lastArgs = lastCallTime = lastThis = timerId = undefined;
71975 }
71976
71977 function flush() {
71978 return timerId === undefined ? result : trailingEdge(now());
71979 }
71980
71981 function debounced() {
71982 var time = now(),
71983 isInvoking = shouldInvoke(time);
71984
71985 lastArgs = arguments;
71986 lastThis = this;
71987 lastCallTime = time;
71988
71989 if (isInvoking) {
71990 if (timerId === undefined) {
71991 return leadingEdge(lastCallTime);
71992 }
71993 if (maxing) {
71994 // Handle invocations in a tight loop.
71995 clearTimeout(timerId);
71996 timerId = setTimeout(timerExpired, wait);
71997 return invokeFunc(lastCallTime);
71998 }
71999 }
72000 if (timerId === undefined) {
72001 timerId = setTimeout(timerExpired, wait);
72002 }
72003 return result;
72004 }
72005 debounced.cancel = cancel;
72006 debounced.flush = flush;
72007 return debounced;
72008 }
72009
72010 /**
72011 * Defers invoking the `func` until the current call stack has cleared. Any
72012 * additional arguments are provided to `func` when it's invoked.
72013 *
72014 * @static
72015 * @memberOf _
72016 * @since 0.1.0
72017 * @category Function
72018 * @param {Function} func The function to defer.
72019 * @param {...*} [args] The arguments to invoke `func` with.
72020 * @returns {number} Returns the timer id.
72021 * @example
72022 *
72023 * _.defer(function(text) {
72024 * console.log(text);
72025 * }, 'deferred');
72026 * // => Logs 'deferred' after one millisecond.
72027 */
72028 var defer = baseRest(function(func, args) {
72029 return baseDelay(func, 1, args);
72030 });
72031
72032 /**
72033 * Invokes `func` after `wait` milliseconds. Any additional arguments are
72034 * provided to `func` when it's invoked.
72035 *
72036 * @static
72037 * @memberOf _
72038 * @since 0.1.0
72039 * @category Function
72040 * @param {Function} func The function to delay.
72041 * @param {number} wait The number of milliseconds to delay invocation.
72042 * @param {...*} [args] The arguments to invoke `func` with.
72043 * @returns {number} Returns the timer id.
72044 * @example
72045 *
72046 * _.delay(function(text) {
72047 * console.log(text);
72048 * }, 1000, 'later');
72049 * // => Logs 'later' after one second.
72050 */
72051 var delay = baseRest(function(func, wait, args) {
72052 return baseDelay(func, toNumber(wait) || 0, args);
72053 });
72054
72055 /**
72056 * Creates a function that invokes `func` with arguments reversed.
72057 *
72058 * @static
72059 * @memberOf _
72060 * @since 4.0.0
72061 * @category Function
72062 * @param {Function} func The function to flip arguments for.
72063 * @returns {Function} Returns the new flipped function.
72064 * @example
72065 *
72066 * var flipped = _.flip(function() {
72067 * return _.toArray(arguments);
72068 * });
72069 *
72070 * flipped('a', 'b', 'c', 'd');
72071 * // => ['d', 'c', 'b', 'a']
72072 */
72073 function flip(func) {
72074 return createWrap(func, WRAP_FLIP_FLAG);
72075 }
72076
72077 /**
72078 * Creates a function that memoizes the result of `func`. If `resolver` is
72079 * provided, it determines the cache key for storing the result based on the
72080 * arguments provided to the memoized function. By default, the first argument
72081 * provided to the memoized function is used as the map cache key. The `func`
72082 * is invoked with the `this` binding of the memoized function.
72083 *
72084 * **Note:** The cache is exposed as the `cache` property on the memoized
72085 * function. Its creation may be customized by replacing the `_.memoize.Cache`
72086 * constructor with one whose instances implement the
72087 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
72088 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
72089 *
72090 * @static
72091 * @memberOf _
72092 * @since 0.1.0
72093 * @category Function
72094 * @param {Function} func The function to have its output memoized.
72095 * @param {Function} [resolver] The function to resolve the cache key.
72096 * @returns {Function} Returns the new memoized function.
72097 * @example
72098 *
72099 * var object = { 'a': 1, 'b': 2 };
72100 * var other = { 'c': 3, 'd': 4 };
72101 *
72102 * var values = _.memoize(_.values);
72103 * values(object);
72104 * // => [1, 2]
72105 *
72106 * values(other);
72107 * // => [3, 4]
72108 *
72109 * object.a = 2;
72110 * values(object);
72111 * // => [1, 2]
72112 *
72113 * // Modify the result cache.
72114 * values.cache.set(object, ['a', 'b']);
72115 * values(object);
72116 * // => ['a', 'b']
72117 *
72118 * // Replace `_.memoize.Cache`.
72119 * _.memoize.Cache = WeakMap;
72120 */
72121 function memoize(func, resolver) {
72122 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
72123 throw new TypeError(FUNC_ERROR_TEXT);
72124 }
72125 var memoized = function() {
72126 var args = arguments,
72127 key = resolver ? resolver.apply(this, args) : args[0],
72128 cache = memoized.cache;
72129
72130 if (cache.has(key)) {
72131 return cache.get(key);
72132 }
72133 var result = func.apply(this, args);
72134 memoized.cache = cache.set(key, result) || cache;
72135 return result;
72136 };
72137 memoized.cache = new (memoize.Cache || MapCache);
72138 return memoized;
72139 }
72140
72141 // Expose `MapCache`.
72142 memoize.Cache = MapCache;
72143
72144 /**
72145 * Creates a function that negates the result of the predicate `func`. The
72146 * `func` predicate is invoked with the `this` binding and arguments of the
72147 * created function.
72148 *
72149 * @static
72150 * @memberOf _
72151 * @since 3.0.0
72152 * @category Function
72153 * @param {Function} predicate The predicate to negate.
72154 * @returns {Function} Returns the new negated function.
72155 * @example
72156 *
72157 * function isEven(n) {
72158 * return n % 2 == 0;
72159 * }
72160 *
72161 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
72162 * // => [1, 3, 5]
72163 */
72164 function negate(predicate) {
72165 if (typeof predicate != 'function') {
72166 throw new TypeError(FUNC_ERROR_TEXT);
72167 }
72168 return function() {
72169 var args = arguments;
72170 switch (args.length) {
72171 case 0: return !predicate.call(this);
72172 case 1: return !predicate.call(this, args[0]);
72173 case 2: return !predicate.call(this, args[0], args[1]);
72174 case 3: return !predicate.call(this, args[0], args[1], args[2]);
72175 }
72176 return !predicate.apply(this, args);
72177 };
72178 }
72179
72180 /**
72181 * Creates a function that is restricted to invoking `func` once. Repeat calls
72182 * to the function return the value of the first invocation. The `func` is
72183 * invoked with the `this` binding and arguments of the created function.
72184 *
72185 * @static
72186 * @memberOf _
72187 * @since 0.1.0
72188 * @category Function
72189 * @param {Function} func The function to restrict.
72190 * @returns {Function} Returns the new restricted function.
72191 * @example
72192 *
72193 * var initialize = _.once(createApplication);
72194 * initialize();
72195 * initialize();
72196 * // => `createApplication` is invoked once
72197 */
72198 function once(func) {
72199 return before(2, func);
72200 }
72201
72202 /**
72203 * Creates a function that invokes `func` with its arguments transformed.
72204 *
72205 * @static
72206 * @since 4.0.0
72207 * @memberOf _
72208 * @category Function
72209 * @param {Function} func The function to wrap.
72210 * @param {...(Function|Function[])} [transforms=[_.identity]]
72211 * The argument transforms.
72212 * @returns {Function} Returns the new function.
72213 * @example
72214 *
72215 * function doubled(n) {
72216 * return n * 2;
72217 * }
72218 *
72219 * function square(n) {
72220 * return n * n;
72221 * }
72222 *
72223 * var func = _.overArgs(function(x, y) {
72224 * return [x, y];
72225 * }, [square, doubled]);
72226 *
72227 * func(9, 3);
72228 * // => [81, 6]
72229 *
72230 * func(10, 5);
72231 * // => [100, 10]
72232 */
72233 var overArgs = castRest(function(func, transforms) {
72234 transforms = (transforms.length == 1 && isArray(transforms[0]))
72235 ? arrayMap(transforms[0], baseUnary(getIteratee()))
72236 : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
72237
72238 var funcsLength = transforms.length;
72239 return baseRest(function(args) {
72240 var index = -1,
72241 length = nativeMin(args.length, funcsLength);
72242
72243 while (++index < length) {
72244 args[index] = transforms[index].call(this, args[index]);
72245 }
72246 return apply(func, this, args);
72247 });
72248 });
72249
72250 /**
72251 * Creates a function that invokes `func` with `partials` prepended to the
72252 * arguments it receives. This method is like `_.bind` except it does **not**
72253 * alter the `this` binding.
72254 *
72255 * The `_.partial.placeholder` value, which defaults to `_` in monolithic
72256 * builds, may be used as a placeholder for partially applied arguments.
72257 *
72258 * **Note:** This method doesn't set the "length" property of partially
72259 * applied functions.
72260 *
72261 * @static
72262 * @memberOf _
72263 * @since 0.2.0
72264 * @category Function
72265 * @param {Function} func The function to partially apply arguments to.
72266 * @param {...*} [partials] The arguments to be partially applied.
72267 * @returns {Function} Returns the new partially applied function.
72268 * @example
72269 *
72270 * function greet(greeting, name) {
72271 * return greeting + ' ' + name;
72272 * }
72273 *
72274 * var sayHelloTo = _.partial(greet, 'hello');
72275 * sayHelloTo('fred');
72276 * // => 'hello fred'
72277 *
72278 * // Partially applied with placeholders.
72279 * var greetFred = _.partial(greet, _, 'fred');
72280 * greetFred('hi');
72281 * // => 'hi fred'
72282 */
72283 var partial = baseRest(function(func, partials) {
72284 var holders = replaceHolders(partials, getHolder(partial));
72285 return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
72286 });
72287
72288 /**
72289 * This method is like `_.partial` except that partially applied arguments
72290 * are appended to the arguments it receives.
72291 *
72292 * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
72293 * builds, may be used as a placeholder for partially applied arguments.
72294 *
72295 * **Note:** This method doesn't set the "length" property of partially
72296 * applied functions.
72297 *
72298 * @static
72299 * @memberOf _
72300 * @since 1.0.0
72301 * @category Function
72302 * @param {Function} func The function to partially apply arguments to.
72303 * @param {...*} [partials] The arguments to be partially applied.
72304 * @returns {Function} Returns the new partially applied function.
72305 * @example
72306 *
72307 * function greet(greeting, name) {
72308 * return greeting + ' ' + name;
72309 * }
72310 *
72311 * var greetFred = _.partialRight(greet, 'fred');
72312 * greetFred('hi');
72313 * // => 'hi fred'
72314 *
72315 * // Partially applied with placeholders.
72316 * var sayHelloTo = _.partialRight(greet, 'hello', _);
72317 * sayHelloTo('fred');
72318 * // => 'hello fred'
72319 */
72320 var partialRight = baseRest(function(func, partials) {
72321 var holders = replaceHolders(partials, getHolder(partialRight));
72322 return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
72323 });
72324
72325 /**
72326 * Creates a function that invokes `func` with arguments arranged according
72327 * to the specified `indexes` where the argument value at the first index is
72328 * provided as the first argument, the argument value at the second index is
72329 * provided as the second argument, and so on.
72330 *
72331 * @static
72332 * @memberOf _
72333 * @since 3.0.0
72334 * @category Function
72335 * @param {Function} func The function to rearrange arguments for.
72336 * @param {...(number|number[])} indexes The arranged argument indexes.
72337 * @returns {Function} Returns the new function.
72338 * @example
72339 *
72340 * var rearged = _.rearg(function(a, b, c) {
72341 * return [a, b, c];
72342 * }, [2, 0, 1]);
72343 *
72344 * rearged('b', 'c', 'a')
72345 * // => ['a', 'b', 'c']
72346 */
72347 var rearg = flatRest(function(func, indexes) {
72348 return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
72349 });
72350
72351 /**
72352 * Creates a function that invokes `func` with the `this` binding of the
72353 * created function and arguments from `start` and beyond provided as
72354 * an array.
72355 *
72356 * **Note:** This method is based on the
72357 * [rest parameter](https://mdn.io/rest_parameters).
72358 *
72359 * @static
72360 * @memberOf _
72361 * @since 4.0.0
72362 * @category Function
72363 * @param {Function} func The function to apply a rest parameter to.
72364 * @param {number} [start=func.length-1] The start position of the rest parameter.
72365 * @returns {Function} Returns the new function.
72366 * @example
72367 *
72368 * var say = _.rest(function(what, names) {
72369 * return what + ' ' + _.initial(names).join(', ') +
72370 * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
72371 * });
72372 *
72373 * say('hello', 'fred', 'barney', 'pebbles');
72374 * // => 'hello fred, barney, & pebbles'
72375 */
72376 function rest(func, start) {
72377 if (typeof func != 'function') {
72378 throw new TypeError(FUNC_ERROR_TEXT);
72379 }
72380 start = start === undefined ? start : toInteger(start);
72381 return baseRest(func, start);
72382 }
72383
72384 /**
72385 * Creates a function that invokes `func` with the `this` binding of the
72386 * create function and an array of arguments much like
72387 * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
72388 *
72389 * **Note:** This method is based on the
72390 * [spread operator](https://mdn.io/spread_operator).
72391 *
72392 * @static
72393 * @memberOf _
72394 * @since 3.2.0
72395 * @category Function
72396 * @param {Function} func The function to spread arguments over.
72397 * @param {number} [start=0] The start position of the spread.
72398 * @returns {Function} Returns the new function.
72399 * @example
72400 *
72401 * var say = _.spread(function(who, what) {
72402 * return who + ' says ' + what;
72403 * });
72404 *
72405 * say(['fred', 'hello']);
72406 * // => 'fred says hello'
72407 *
72408 * var numbers = Promise.all([
72409 * Promise.resolve(40),
72410 * Promise.resolve(36)
72411 * ]);
72412 *
72413 * numbers.then(_.spread(function(x, y) {
72414 * return x + y;
72415 * }));
72416 * // => a Promise of 76
72417 */
72418 function spread(func, start) {
72419 if (typeof func != 'function') {
72420 throw new TypeError(FUNC_ERROR_TEXT);
72421 }
72422 start = start == null ? 0 : nativeMax(toInteger(start), 0);
72423 return baseRest(function(args) {
72424 var array = args[start],
72425 otherArgs = castSlice(args, 0, start);
72426
72427 if (array) {
72428 arrayPush(otherArgs, array);
72429 }
72430 return apply(func, this, otherArgs);
72431 });
72432 }
72433
72434 /**
72435 * Creates a throttled function that only invokes `func` at most once per
72436 * every `wait` milliseconds. The throttled function comes with a `cancel`
72437 * method to cancel delayed `func` invocations and a `flush` method to
72438 * immediately invoke them. Provide `options` to indicate whether `func`
72439 * should be invoked on the leading and/or trailing edge of the `wait`
72440 * timeout. The `func` is invoked with the last arguments provided to the
72441 * throttled function. Subsequent calls to the throttled function return the
72442 * result of the last `func` invocation.
72443 *
72444 * **Note:** If `leading` and `trailing` options are `true`, `func` is
72445 * invoked on the trailing edge of the timeout only if the throttled function
72446 * is invoked more than once during the `wait` timeout.
72447 *
72448 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
72449 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
72450 *
72451 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
72452 * for details over the differences between `_.throttle` and `_.debounce`.
72453 *
72454 * @static
72455 * @memberOf _
72456 * @since 0.1.0
72457 * @category Function
72458 * @param {Function} func The function to throttle.
72459 * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
72460 * @param {Object} [options={}] The options object.
72461 * @param {boolean} [options.leading=true]
72462 * Specify invoking on the leading edge of the timeout.
72463 * @param {boolean} [options.trailing=true]
72464 * Specify invoking on the trailing edge of the timeout.
72465 * @returns {Function} Returns the new throttled function.
72466 * @example
72467 *
72468 * // Avoid excessively updating the position while scrolling.
72469 * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
72470 *
72471 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
72472 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
72473 * jQuery(element).on('click', throttled);
72474 *
72475 * // Cancel the trailing throttled invocation.
72476 * jQuery(window).on('popstate', throttled.cancel);
72477 */
72478 function throttle(func, wait, options) {
72479 var leading = true,
72480 trailing = true;
72481
72482 if (typeof func != 'function') {
72483 throw new TypeError(FUNC_ERROR_TEXT);
72484 }
72485 if (isObject(options)) {
72486 leading = 'leading' in options ? !!options.leading : leading;
72487 trailing = 'trailing' in options ? !!options.trailing : trailing;
72488 }
72489 return debounce(func, wait, {
72490 'leading': leading,
72491 'maxWait': wait,
72492 'trailing': trailing
72493 });
72494 }
72495
72496 /**
72497 * Creates a function that accepts up to one argument, ignoring any
72498 * additional arguments.
72499 *
72500 * @static
72501 * @memberOf _
72502 * @since 4.0.0
72503 * @category Function
72504 * @param {Function} func The function to cap arguments for.
72505 * @returns {Function} Returns the new capped function.
72506 * @example
72507 *
72508 * _.map(['6', '8', '10'], _.unary(parseInt));
72509 * // => [6, 8, 10]
72510 */
72511 function unary(func) {
72512 return ary(func, 1);
72513 }
72514
72515 /**
72516 * Creates a function that provides `value` to `wrapper` as its first
72517 * argument. Any additional arguments provided to the function are appended
72518 * to those provided to the `wrapper`. The wrapper is invoked with the `this`
72519 * binding of the created function.
72520 *
72521 * @static
72522 * @memberOf _
72523 * @since 0.1.0
72524 * @category Function
72525 * @param {*} value The value to wrap.
72526 * @param {Function} [wrapper=identity] The wrapper function.
72527 * @returns {Function} Returns the new function.
72528 * @example
72529 *
72530 * var p = _.wrap(_.escape, function(func, text) {
72531 * return '<p>' + func(text) + '</p>';
72532 * });
72533 *
72534 * p('fred, barney, & pebbles');
72535 * // => '<p>fred, barney, &amp; pebbles</p>'
72536 */
72537 function wrap(value, wrapper) {
72538 return partial(castFunction(wrapper), value);
72539 }
72540
72541 /*------------------------------------------------------------------------*/
72542
72543 /**
72544 * Casts `value` as an array if it's not one.
72545 *
72546 * @static
72547 * @memberOf _
72548 * @since 4.4.0
72549 * @category Lang
72550 * @param {*} value The value to inspect.
72551 * @returns {Array} Returns the cast array.
72552 * @example
72553 *
72554 * _.castArray(1);
72555 * // => [1]
72556 *
72557 * _.castArray({ 'a': 1 });
72558 * // => [{ 'a': 1 }]
72559 *
72560 * _.castArray('abc');
72561 * // => ['abc']
72562 *
72563 * _.castArray(null);
72564 * // => [null]
72565 *
72566 * _.castArray(undefined);
72567 * // => [undefined]
72568 *
72569 * _.castArray();
72570 * // => []
72571 *
72572 * var array = [1, 2, 3];
72573 * console.log(_.castArray(array) === array);
72574 * // => true
72575 */
72576 function castArray() {
72577 if (!arguments.length) {
72578 return [];
72579 }
72580 var value = arguments[0];
72581 return isArray(value) ? value : [value];
72582 }
72583
72584 /**
72585 * Creates a shallow clone of `value`.
72586 *
72587 * **Note:** This method is loosely based on the
72588 * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
72589 * and supports cloning arrays, array buffers, booleans, date objects, maps,
72590 * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
72591 * arrays. The own enumerable properties of `arguments` objects are cloned
72592 * as plain objects. An empty object is returned for uncloneable values such
72593 * as error objects, functions, DOM nodes, and WeakMaps.
72594 *
72595 * @static
72596 * @memberOf _
72597 * @since 0.1.0
72598 * @category Lang
72599 * @param {*} value The value to clone.
72600 * @returns {*} Returns the cloned value.
72601 * @see _.cloneDeep
72602 * @example
72603 *
72604 * var objects = [{ 'a': 1 }, { 'b': 2 }];
72605 *
72606 * var shallow = _.clone(objects);
72607 * console.log(shallow[0] === objects[0]);
72608 * // => true
72609 */
72610 function clone(value) {
72611 return baseClone(value, CLONE_SYMBOLS_FLAG);
72612 }
72613
72614 /**
72615 * This method is like `_.clone` except that it accepts `customizer` which
72616 * is invoked to produce the cloned value. If `customizer` returns `undefined`,
72617 * cloning is handled by the method instead. The `customizer` is invoked with
72618 * up to four arguments; (value [, index|key, object, stack]).
72619 *
72620 * @static
72621 * @memberOf _
72622 * @since 4.0.0
72623 * @category Lang
72624 * @param {*} value The value to clone.
72625 * @param {Function} [customizer] The function to customize cloning.
72626 * @returns {*} Returns the cloned value.
72627 * @see _.cloneDeepWith
72628 * @example
72629 *
72630 * function customizer(value) {
72631 * if (_.isElement(value)) {
72632 * return value.cloneNode(false);
72633 * }
72634 * }
72635 *
72636 * var el = _.cloneWith(document.body, customizer);
72637 *
72638 * console.log(el === document.body);
72639 * // => false
72640 * console.log(el.nodeName);
72641 * // => 'BODY'
72642 * console.log(el.childNodes.length);
72643 * // => 0
72644 */
72645 function cloneWith(value, customizer) {
72646 customizer = typeof customizer == 'function' ? customizer : undefined;
72647 return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
72648 }
72649
72650 /**
72651 * This method is like `_.clone` except that it recursively clones `value`.
72652 *
72653 * @static
72654 * @memberOf _
72655 * @since 1.0.0
72656 * @category Lang
72657 * @param {*} value The value to recursively clone.
72658 * @returns {*} Returns the deep cloned value.
72659 * @see _.clone
72660 * @example
72661 *
72662 * var objects = [{ 'a': 1 }, { 'b': 2 }];
72663 *
72664 * var deep = _.cloneDeep(objects);
72665 * console.log(deep[0] === objects[0]);
72666 * // => false
72667 */
72668 function cloneDeep(value) {
72669 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
72670 }
72671
72672 /**
72673 * This method is like `_.cloneWith` except that it recursively clones `value`.
72674 *
72675 * @static
72676 * @memberOf _
72677 * @since 4.0.0
72678 * @category Lang
72679 * @param {*} value The value to recursively clone.
72680 * @param {Function} [customizer] The function to customize cloning.
72681 * @returns {*} Returns the deep cloned value.
72682 * @see _.cloneWith
72683 * @example
72684 *
72685 * function customizer(value) {
72686 * if (_.isElement(value)) {
72687 * return value.cloneNode(true);
72688 * }
72689 * }
72690 *
72691 * var el = _.cloneDeepWith(document.body, customizer);
72692 *
72693 * console.log(el === document.body);
72694 * // => false
72695 * console.log(el.nodeName);
72696 * // => 'BODY'
72697 * console.log(el.childNodes.length);
72698 * // => 20
72699 */
72700 function cloneDeepWith(value, customizer) {
72701 customizer = typeof customizer == 'function' ? customizer : undefined;
72702 return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
72703 }
72704
72705 /**
72706 * Checks if `object` conforms to `source` by invoking the predicate
72707 * properties of `source` with the corresponding property values of `object`.
72708 *
72709 * **Note:** This method is equivalent to `_.conforms` when `source` is
72710 * partially applied.
72711 *
72712 * @static
72713 * @memberOf _
72714 * @since 4.14.0
72715 * @category Lang
72716 * @param {Object} object The object to inspect.
72717 * @param {Object} source The object of property predicates to conform to.
72718 * @returns {boolean} Returns `true` if `object` conforms, else `false`.
72719 * @example
72720 *
72721 * var object = { 'a': 1, 'b': 2 };
72722 *
72723 * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
72724 * // => true
72725 *
72726 * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
72727 * // => false
72728 */
72729 function conformsTo(object, source) {
72730 return source == null || baseConformsTo(object, source, keys(source));
72731 }
72732
72733 /**
72734 * Performs a
72735 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
72736 * comparison between two values to determine if they are equivalent.
72737 *
72738 * @static
72739 * @memberOf _
72740 * @since 4.0.0
72741 * @category Lang
72742 * @param {*} value The value to compare.
72743 * @param {*} other The other value to compare.
72744 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
72745 * @example
72746 *
72747 * var object = { 'a': 1 };
72748 * var other = { 'a': 1 };
72749 *
72750 * _.eq(object, object);
72751 * // => true
72752 *
72753 * _.eq(object, other);
72754 * // => false
72755 *
72756 * _.eq('a', 'a');
72757 * // => true
72758 *
72759 * _.eq('a', Object('a'));
72760 * // => false
72761 *
72762 * _.eq(NaN, NaN);
72763 * // => true
72764 */
72765 function eq(value, other) {
72766 return value === other || (value !== value && other !== other);
72767 }
72768
72769 /**
72770 * Checks if `value` is greater than `other`.
72771 *
72772 * @static
72773 * @memberOf _
72774 * @since 3.9.0
72775 * @category Lang
72776 * @param {*} value The value to compare.
72777 * @param {*} other The other value to compare.
72778 * @returns {boolean} Returns `true` if `value` is greater than `other`,
72779 * else `false`.
72780 * @see _.lt
72781 * @example
72782 *
72783 * _.gt(3, 1);
72784 * // => true
72785 *
72786 * _.gt(3, 3);
72787 * // => false
72788 *
72789 * _.gt(1, 3);
72790 * // => false
72791 */
72792 var gt = createRelationalOperation(baseGt);
72793
72794 /**
72795 * Checks if `value` is greater than or equal to `other`.
72796 *
72797 * @static
72798 * @memberOf _
72799 * @since 3.9.0
72800 * @category Lang
72801 * @param {*} value The value to compare.
72802 * @param {*} other The other value to compare.
72803 * @returns {boolean} Returns `true` if `value` is greater than or equal to
72804 * `other`, else `false`.
72805 * @see _.lte
72806 * @example
72807 *
72808 * _.gte(3, 1);
72809 * // => true
72810 *
72811 * _.gte(3, 3);
72812 * // => true
72813 *
72814 * _.gte(1, 3);
72815 * // => false
72816 */
72817 var gte = createRelationalOperation(function(value, other) {
72818 return value >= other;
72819 });
72820
72821 /**
72822 * Checks if `value` is likely an `arguments` object.
72823 *
72824 * @static
72825 * @memberOf _
72826 * @since 0.1.0
72827 * @category Lang
72828 * @param {*} value The value to check.
72829 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
72830 * else `false`.
72831 * @example
72832 *
72833 * _.isArguments(function() { return arguments; }());
72834 * // => true
72835 *
72836 * _.isArguments([1, 2, 3]);
72837 * // => false
72838 */
72839 var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
72840 return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
72841 !propertyIsEnumerable.call(value, 'callee');
72842 };
72843
72844 /**
72845 * Checks if `value` is classified as an `Array` object.
72846 *
72847 * @static
72848 * @memberOf _
72849 * @since 0.1.0
72850 * @category Lang
72851 * @param {*} value The value to check.
72852 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
72853 * @example
72854 *
72855 * _.isArray([1, 2, 3]);
72856 * // => true
72857 *
72858 * _.isArray(document.body.children);
72859 * // => false
72860 *
72861 * _.isArray('abc');
72862 * // => false
72863 *
72864 * _.isArray(_.noop);
72865 * // => false
72866 */
72867 var isArray = Array.isArray;
72868
72869 /**
72870 * Checks if `value` is classified as an `ArrayBuffer` object.
72871 *
72872 * @static
72873 * @memberOf _
72874 * @since 4.3.0
72875 * @category Lang
72876 * @param {*} value The value to check.
72877 * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
72878 * @example
72879 *
72880 * _.isArrayBuffer(new ArrayBuffer(2));
72881 * // => true
72882 *
72883 * _.isArrayBuffer(new Array(2));
72884 * // => false
72885 */
72886 var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
72887
72888 /**
72889 * Checks if `value` is array-like. A value is considered array-like if it's
72890 * not a function and has a `value.length` that's an integer greater than or
72891 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
72892 *
72893 * @static
72894 * @memberOf _
72895 * @since 4.0.0
72896 * @category Lang
72897 * @param {*} value The value to check.
72898 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
72899 * @example
72900 *
72901 * _.isArrayLike([1, 2, 3]);
72902 * // => true
72903 *
72904 * _.isArrayLike(document.body.children);
72905 * // => true
72906 *
72907 * _.isArrayLike('abc');
72908 * // => true
72909 *
72910 * _.isArrayLike(_.noop);
72911 * // => false
72912 */
72913 function isArrayLike(value) {
72914 return value != null && isLength(value.length) && !isFunction(value);
72915 }
72916
72917 /**
72918 * This method is like `_.isArrayLike` except that it also checks if `value`
72919 * is an object.
72920 *
72921 * @static
72922 * @memberOf _
72923 * @since 4.0.0
72924 * @category Lang
72925 * @param {*} value The value to check.
72926 * @returns {boolean} Returns `true` if `value` is an array-like object,
72927 * else `false`.
72928 * @example
72929 *
72930 * _.isArrayLikeObject([1, 2, 3]);
72931 * // => true
72932 *
72933 * _.isArrayLikeObject(document.body.children);
72934 * // => true
72935 *
72936 * _.isArrayLikeObject('abc');
72937 * // => false
72938 *
72939 * _.isArrayLikeObject(_.noop);
72940 * // => false
72941 */
72942 function isArrayLikeObject(value) {
72943 return isObjectLike(value) && isArrayLike(value);
72944 }
72945
72946 /**
72947 * Checks if `value` is classified as a boolean primitive or object.
72948 *
72949 * @static
72950 * @memberOf _
72951 * @since 0.1.0
72952 * @category Lang
72953 * @param {*} value The value to check.
72954 * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
72955 * @example
72956 *
72957 * _.isBoolean(false);
72958 * // => true
72959 *
72960 * _.isBoolean(null);
72961 * // => false
72962 */
72963 function isBoolean(value) {
72964 return value === true || value === false ||
72965 (isObjectLike(value) && baseGetTag(value) == boolTag);
72966 }
72967
72968 /**
72969 * Checks if `value` is a buffer.
72970 *
72971 * @static
72972 * @memberOf _
72973 * @since 4.3.0
72974 * @category Lang
72975 * @param {*} value The value to check.
72976 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
72977 * @example
72978 *
72979 * _.isBuffer(new Buffer(2));
72980 * // => true
72981 *
72982 * _.isBuffer(new Uint8Array(2));
72983 * // => false
72984 */
72985 var isBuffer = nativeIsBuffer || stubFalse;
72986
72987 /**
72988 * Checks if `value` is classified as a `Date` object.
72989 *
72990 * @static
72991 * @memberOf _
72992 * @since 0.1.0
72993 * @category Lang
72994 * @param {*} value The value to check.
72995 * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
72996 * @example
72997 *
72998 * _.isDate(new Date);
72999 * // => true
73000 *
73001 * _.isDate('Mon April 23 2012');
73002 * // => false
73003 */
73004 var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
73005
73006 /**
73007 * Checks if `value` is likely a DOM element.
73008 *
73009 * @static
73010 * @memberOf _
73011 * @since 0.1.0
73012 * @category Lang
73013 * @param {*} value The value to check.
73014 * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
73015 * @example
73016 *
73017 * _.isElement(document.body);
73018 * // => true
73019 *
73020 * _.isElement('<body>');
73021 * // => false
73022 */
73023 function isElement(value) {
73024 return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
73025 }
73026
73027 /**
73028 * Checks if `value` is an empty object, collection, map, or set.
73029 *
73030 * Objects are considered empty if they have no own enumerable string keyed
73031 * properties.
73032 *
73033 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
73034 * jQuery-like collections are considered empty if they have a `length` of `0`.
73035 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
73036 *
73037 * @static
73038 * @memberOf _
73039 * @since 0.1.0
73040 * @category Lang
73041 * @param {*} value The value to check.
73042 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
73043 * @example
73044 *
73045 * _.isEmpty(null);
73046 * // => true
73047 *
73048 * _.isEmpty(true);
73049 * // => true
73050 *
73051 * _.isEmpty(1);
73052 * // => true
73053 *
73054 * _.isEmpty([1, 2, 3]);
73055 * // => false
73056 *
73057 * _.isEmpty({ 'a': 1 });
73058 * // => false
73059 */
73060 function isEmpty(value) {
73061 if (value == null) {
73062 return true;
73063 }
73064 if (isArrayLike(value) &&
73065 (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
73066 isBuffer(value) || isTypedArray(value) || isArguments(value))) {
73067 return !value.length;
73068 }
73069 var tag = getTag(value);
73070 if (tag == mapTag || tag == setTag) {
73071 return !value.size;
73072 }
73073 if (isPrototype(value)) {
73074 return !baseKeys(value).length;
73075 }
73076 for (var key in value) {
73077 if (hasOwnProperty.call(value, key)) {
73078 return false;
73079 }
73080 }
73081 return true;
73082 }
73083
73084 /**
73085 * Performs a deep comparison between two values to determine if they are
73086 * equivalent.
73087 *
73088 * **Note:** This method supports comparing arrays, array buffers, booleans,
73089 * date objects, error objects, maps, numbers, `Object` objects, regexes,
73090 * sets, strings, symbols, and typed arrays. `Object` objects are compared
73091 * by their own, not inherited, enumerable properties. Functions and DOM
73092 * nodes are compared by strict equality, i.e. `===`.
73093 *
73094 * @static
73095 * @memberOf _
73096 * @since 0.1.0
73097 * @category Lang
73098 * @param {*} value The value to compare.
73099 * @param {*} other The other value to compare.
73100 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
73101 * @example
73102 *
73103 * var object = { 'a': 1 };
73104 * var other = { 'a': 1 };
73105 *
73106 * _.isEqual(object, other);
73107 * // => true
73108 *
73109 * object === other;
73110 * // => false
73111 */
73112 function isEqual(value, other) {
73113 return baseIsEqual(value, other);
73114 }
73115
73116 /**
73117 * This method is like `_.isEqual` except that it accepts `customizer` which
73118 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
73119 * are handled by the method instead. The `customizer` is invoked with up to
73120 * six arguments: (objValue, othValue [, index|key, object, other, stack]).
73121 *
73122 * @static
73123 * @memberOf _
73124 * @since 4.0.0
73125 * @category Lang
73126 * @param {*} value The value to compare.
73127 * @param {*} other The other value to compare.
73128 * @param {Function} [customizer] The function to customize comparisons.
73129 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
73130 * @example
73131 *
73132 * function isGreeting(value) {
73133 * return /^h(?:i|ello)$/.test(value);
73134 * }
73135 *
73136 * function customizer(objValue, othValue) {
73137 * if (isGreeting(objValue) && isGreeting(othValue)) {
73138 * return true;
73139 * }
73140 * }
73141 *
73142 * var array = ['hello', 'goodbye'];
73143 * var other = ['hi', 'goodbye'];
73144 *
73145 * _.isEqualWith(array, other, customizer);
73146 * // => true
73147 */
73148 function isEqualWith(value, other, customizer) {
73149 customizer = typeof customizer == 'function' ? customizer : undefined;
73150 var result = customizer ? customizer(value, other) : undefined;
73151 return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
73152 }
73153
73154 /**
73155 * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
73156 * `SyntaxError`, `TypeError`, or `URIError` object.
73157 *
73158 * @static
73159 * @memberOf _
73160 * @since 3.0.0
73161 * @category Lang
73162 * @param {*} value The value to check.
73163 * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
73164 * @example
73165 *
73166 * _.isError(new Error);
73167 * // => true
73168 *
73169 * _.isError(Error);
73170 * // => false
73171 */
73172 function isError(value) {
73173 if (!isObjectLike(value)) {
73174 return false;
73175 }
73176 var tag = baseGetTag(value);
73177 return tag == errorTag || tag == domExcTag ||
73178 (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
73179 }
73180
73181 /**
73182 * Checks if `value` is a finite primitive number.
73183 *
73184 * **Note:** This method is based on
73185 * [`Number.isFinite`](https://mdn.io/Number/isFinite).
73186 *
73187 * @static
73188 * @memberOf _
73189 * @since 0.1.0
73190 * @category Lang
73191 * @param {*} value The value to check.
73192 * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
73193 * @example
73194 *
73195 * _.isFinite(3);
73196 * // => true
73197 *
73198 * _.isFinite(Number.MIN_VALUE);
73199 * // => true
73200 *
73201 * _.isFinite(Infinity);
73202 * // => false
73203 *
73204 * _.isFinite('3');
73205 * // => false
73206 */
73207 function isFinite(value) {
73208 return typeof value == 'number' && nativeIsFinite(value);
73209 }
73210
73211 /**
73212 * Checks if `value` is classified as a `Function` object.
73213 *
73214 * @static
73215 * @memberOf _
73216 * @since 0.1.0
73217 * @category Lang
73218 * @param {*} value The value to check.
73219 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
73220 * @example
73221 *
73222 * _.isFunction(_);
73223 * // => true
73224 *
73225 * _.isFunction(/abc/);
73226 * // => false
73227 */
73228 function isFunction(value) {
73229 if (!isObject(value)) {
73230 return false;
73231 }
73232 // The use of `Object#toString` avoids issues with the `typeof` operator
73233 // in Safari 9 which returns 'object' for typed arrays and other constructors.
73234 var tag = baseGetTag(value);
73235 return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
73236 }
73237
73238 /**
73239 * Checks if `value` is an integer.
73240 *
73241 * **Note:** This method is based on
73242 * [`Number.isInteger`](https://mdn.io/Number/isInteger).
73243 *
73244 * @static
73245 * @memberOf _
73246 * @since 4.0.0
73247 * @category Lang
73248 * @param {*} value The value to check.
73249 * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
73250 * @example
73251 *
73252 * _.isInteger(3);
73253 * // => true
73254 *
73255 * _.isInteger(Number.MIN_VALUE);
73256 * // => false
73257 *
73258 * _.isInteger(Infinity);
73259 * // => false
73260 *
73261 * _.isInteger('3');
73262 * // => false
73263 */
73264 function isInteger(value) {
73265 return typeof value == 'number' && value == toInteger(value);
73266 }
73267
73268 /**
73269 * Checks if `value` is a valid array-like length.
73270 *
73271 * **Note:** This method is loosely based on
73272 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
73273 *
73274 * @static
73275 * @memberOf _
73276 * @since 4.0.0
73277 * @category Lang
73278 * @param {*} value The value to check.
73279 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
73280 * @example
73281 *
73282 * _.isLength(3);
73283 * // => true
73284 *
73285 * _.isLength(Number.MIN_VALUE);
73286 * // => false
73287 *
73288 * _.isLength(Infinity);
73289 * // => false
73290 *
73291 * _.isLength('3');
73292 * // => false
73293 */
73294 function isLength(value) {
73295 return typeof value == 'number' &&
73296 value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
73297 }
73298
73299 /**
73300 * Checks if `value` is the
73301 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
73302 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
73303 *
73304 * @static
73305 * @memberOf _
73306 * @since 0.1.0
73307 * @category Lang
73308 * @param {*} value The value to check.
73309 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
73310 * @example
73311 *
73312 * _.isObject({});
73313 * // => true
73314 *
73315 * _.isObject([1, 2, 3]);
73316 * // => true
73317 *
73318 * _.isObject(_.noop);
73319 * // => true
73320 *
73321 * _.isObject(null);
73322 * // => false
73323 */
73324 function isObject(value) {
73325 var type = typeof value;
73326 return value != null && (type == 'object' || type == 'function');
73327 }
73328
73329 /**
73330 * Checks if `value` is object-like. A value is object-like if it's not `null`
73331 * and has a `typeof` result of "object".
73332 *
73333 * @static
73334 * @memberOf _
73335 * @since 4.0.0
73336 * @category Lang
73337 * @param {*} value The value to check.
73338 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
73339 * @example
73340 *
73341 * _.isObjectLike({});
73342 * // => true
73343 *
73344 * _.isObjectLike([1, 2, 3]);
73345 * // => true
73346 *
73347 * _.isObjectLike(_.noop);
73348 * // => false
73349 *
73350 * _.isObjectLike(null);
73351 * // => false
73352 */
73353 function isObjectLike(value) {
73354 return value != null && typeof value == 'object';
73355 }
73356
73357 /**
73358 * Checks if `value` is classified as a `Map` object.
73359 *
73360 * @static
73361 * @memberOf _
73362 * @since 4.3.0
73363 * @category Lang
73364 * @param {*} value The value to check.
73365 * @returns {boolean} Returns `true` if `value` is a map, else `false`.
73366 * @example
73367 *
73368 * _.isMap(new Map);
73369 * // => true
73370 *
73371 * _.isMap(new WeakMap);
73372 * // => false
73373 */
73374 var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
73375
73376 /**
73377 * Performs a partial deep comparison between `object` and `source` to
73378 * determine if `object` contains equivalent property values.
73379 *
73380 * **Note:** This method is equivalent to `_.matches` when `source` is
73381 * partially applied.
73382 *
73383 * Partial comparisons will match empty array and empty object `source`
73384 * values against any array or object value, respectively. See `_.isEqual`
73385 * for a list of supported value comparisons.
73386 *
73387 * @static
73388 * @memberOf _
73389 * @since 3.0.0
73390 * @category Lang
73391 * @param {Object} object The object to inspect.
73392 * @param {Object} source The object of property values to match.
73393 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
73394 * @example
73395 *
73396 * var object = { 'a': 1, 'b': 2 };
73397 *
73398 * _.isMatch(object, { 'b': 2 });
73399 * // => true
73400 *
73401 * _.isMatch(object, { 'b': 1 });
73402 * // => false
73403 */
73404 function isMatch(object, source) {
73405 return object === source || baseIsMatch(object, source, getMatchData(source));
73406 }
73407
73408 /**
73409 * This method is like `_.isMatch` except that it accepts `customizer` which
73410 * is invoked to compare values. If `customizer` returns `undefined`, comparisons
73411 * are handled by the method instead. The `customizer` is invoked with five
73412 * arguments: (objValue, srcValue, index|key, object, source).
73413 *
73414 * @static
73415 * @memberOf _
73416 * @since 4.0.0
73417 * @category Lang
73418 * @param {Object} object The object to inspect.
73419 * @param {Object} source The object of property values to match.
73420 * @param {Function} [customizer] The function to customize comparisons.
73421 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
73422 * @example
73423 *
73424 * function isGreeting(value) {
73425 * return /^h(?:i|ello)$/.test(value);
73426 * }
73427 *
73428 * function customizer(objValue, srcValue) {
73429 * if (isGreeting(objValue) && isGreeting(srcValue)) {
73430 * return true;
73431 * }
73432 * }
73433 *
73434 * var object = { 'greeting': 'hello' };
73435 * var source = { 'greeting': 'hi' };
73436 *
73437 * _.isMatchWith(object, source, customizer);
73438 * // => true
73439 */
73440 function isMatchWith(object, source, customizer) {
73441 customizer = typeof customizer == 'function' ? customizer : undefined;
73442 return baseIsMatch(object, source, getMatchData(source), customizer);
73443 }
73444
73445 /**
73446 * Checks if `value` is `NaN`.
73447 *
73448 * **Note:** This method is based on
73449 * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
73450 * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
73451 * `undefined` and other non-number values.
73452 *
73453 * @static
73454 * @memberOf _
73455 * @since 0.1.0
73456 * @category Lang
73457 * @param {*} value The value to check.
73458 * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
73459 * @example
73460 *
73461 * _.isNaN(NaN);
73462 * // => true
73463 *
73464 * _.isNaN(new Number(NaN));
73465 * // => true
73466 *
73467 * isNaN(undefined);
73468 * // => true
73469 *
73470 * _.isNaN(undefined);
73471 * // => false
73472 */
73473 function isNaN(value) {
73474 // An `NaN` primitive is the only value that is not equal to itself.
73475 // Perform the `toStringTag` check first to avoid errors with some
73476 // ActiveX objects in IE.
73477 return isNumber(value) && value != +value;
73478 }
73479
73480 /**
73481 * Checks if `value` is a pristine native function.
73482 *
73483 * **Note:** This method can't reliably detect native functions in the presence
73484 * of the core-js package because core-js circumvents this kind of detection.
73485 * Despite multiple requests, the core-js maintainer has made it clear: any
73486 * attempt to fix the detection will be obstructed. As a result, we're left
73487 * with little choice but to throw an error. Unfortunately, this also affects
73488 * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
73489 * which rely on core-js.
73490 *
73491 * @static
73492 * @memberOf _
73493 * @since 3.0.0
73494 * @category Lang
73495 * @param {*} value The value to check.
73496 * @returns {boolean} Returns `true` if `value` is a native function,
73497 * else `false`.
73498 * @example
73499 *
73500 * _.isNative(Array.prototype.push);
73501 * // => true
73502 *
73503 * _.isNative(_);
73504 * // => false
73505 */
73506 function isNative(value) {
73507 if (isMaskable(value)) {
73508 throw new Error(CORE_ERROR_TEXT);
73509 }
73510 return baseIsNative(value);
73511 }
73512
73513 /**
73514 * Checks if `value` is `null`.
73515 *
73516 * @static
73517 * @memberOf _
73518 * @since 0.1.0
73519 * @category Lang
73520 * @param {*} value The value to check.
73521 * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
73522 * @example
73523 *
73524 * _.isNull(null);
73525 * // => true
73526 *
73527 * _.isNull(void 0);
73528 * // => false
73529 */
73530 function isNull(value) {
73531 return value === null;
73532 }
73533
73534 /**
73535 * Checks if `value` is `null` or `undefined`.
73536 *
73537 * @static
73538 * @memberOf _
73539 * @since 4.0.0
73540 * @category Lang
73541 * @param {*} value The value to check.
73542 * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
73543 * @example
73544 *
73545 * _.isNil(null);
73546 * // => true
73547 *
73548 * _.isNil(void 0);
73549 * // => true
73550 *
73551 * _.isNil(NaN);
73552 * // => false
73553 */
73554 function isNil(value) {
73555 return value == null;
73556 }
73557
73558 /**
73559 * Checks if `value` is classified as a `Number` primitive or object.
73560 *
73561 * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
73562 * classified as numbers, use the `_.isFinite` method.
73563 *
73564 * @static
73565 * @memberOf _
73566 * @since 0.1.0
73567 * @category Lang
73568 * @param {*} value The value to check.
73569 * @returns {boolean} Returns `true` if `value` is a number, else `false`.
73570 * @example
73571 *
73572 * _.isNumber(3);
73573 * // => true
73574 *
73575 * _.isNumber(Number.MIN_VALUE);
73576 * // => true
73577 *
73578 * _.isNumber(Infinity);
73579 * // => true
73580 *
73581 * _.isNumber('3');
73582 * // => false
73583 */
73584 function isNumber(value) {
73585 return typeof value == 'number' ||
73586 (isObjectLike(value) && baseGetTag(value) == numberTag);
73587 }
73588
73589 /**
73590 * Checks if `value` is a plain object, that is, an object created by the
73591 * `Object` constructor or one with a `[[Prototype]]` of `null`.
73592 *
73593 * @static
73594 * @memberOf _
73595 * @since 0.8.0
73596 * @category Lang
73597 * @param {*} value The value to check.
73598 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
73599 * @example
73600 *
73601 * function Foo() {
73602 * this.a = 1;
73603 * }
73604 *
73605 * _.isPlainObject(new Foo);
73606 * // => false
73607 *
73608 * _.isPlainObject([1, 2, 3]);
73609 * // => false
73610 *
73611 * _.isPlainObject({ 'x': 0, 'y': 0 });
73612 * // => true
73613 *
73614 * _.isPlainObject(Object.create(null));
73615 * // => true
73616 */
73617 function isPlainObject(value) {
73618 if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
73619 return false;
73620 }
73621 var proto = getPrototype(value);
73622 if (proto === null) {
73623 return true;
73624 }
73625 var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
73626 return typeof Ctor == 'function' && Ctor instanceof Ctor &&
73627 funcToString.call(Ctor) == objectCtorString;
73628 }
73629
73630 /**
73631 * Checks if `value` is classified as a `RegExp` object.
73632 *
73633 * @static
73634 * @memberOf _
73635 * @since 0.1.0
73636 * @category Lang
73637 * @param {*} value The value to check.
73638 * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
73639 * @example
73640 *
73641 * _.isRegExp(/abc/);
73642 * // => true
73643 *
73644 * _.isRegExp('/abc/');
73645 * // => false
73646 */
73647 var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
73648
73649 /**
73650 * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
73651 * double precision number which isn't the result of a rounded unsafe integer.
73652 *
73653 * **Note:** This method is based on
73654 * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
73655 *
73656 * @static
73657 * @memberOf _
73658 * @since 4.0.0
73659 * @category Lang
73660 * @param {*} value The value to check.
73661 * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
73662 * @example
73663 *
73664 * _.isSafeInteger(3);
73665 * // => true
73666 *
73667 * _.isSafeInteger(Number.MIN_VALUE);
73668 * // => false
73669 *
73670 * _.isSafeInteger(Infinity);
73671 * // => false
73672 *
73673 * _.isSafeInteger('3');
73674 * // => false
73675 */
73676 function isSafeInteger(value) {
73677 return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
73678 }
73679
73680 /**
73681 * Checks if `value` is classified as a `Set` object.
73682 *
73683 * @static
73684 * @memberOf _
73685 * @since 4.3.0
73686 * @category Lang
73687 * @param {*} value The value to check.
73688 * @returns {boolean} Returns `true` if `value` is a set, else `false`.
73689 * @example
73690 *
73691 * _.isSet(new Set);
73692 * // => true
73693 *
73694 * _.isSet(new WeakSet);
73695 * // => false
73696 */
73697 var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
73698
73699 /**
73700 * Checks if `value` is classified as a `String` primitive or object.
73701 *
73702 * @static
73703 * @since 0.1.0
73704 * @memberOf _
73705 * @category Lang
73706 * @param {*} value The value to check.
73707 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
73708 * @example
73709 *
73710 * _.isString('abc');
73711 * // => true
73712 *
73713 * _.isString(1);
73714 * // => false
73715 */
73716 function isString(value) {
73717 return typeof value == 'string' ||
73718 (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
73719 }
73720
73721 /**
73722 * Checks if `value` is classified as a `Symbol` primitive or object.
73723 *
73724 * @static
73725 * @memberOf _
73726 * @since 4.0.0
73727 * @category Lang
73728 * @param {*} value The value to check.
73729 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
73730 * @example
73731 *
73732 * _.isSymbol(Symbol.iterator);
73733 * // => true
73734 *
73735 * _.isSymbol('abc');
73736 * // => false
73737 */
73738 function isSymbol(value) {
73739 return typeof value == 'symbol' ||
73740 (isObjectLike(value) && baseGetTag(value) == symbolTag);
73741 }
73742
73743 /**
73744 * Checks if `value` is classified as a typed array.
73745 *
73746 * @static
73747 * @memberOf _
73748 * @since 3.0.0
73749 * @category Lang
73750 * @param {*} value The value to check.
73751 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
73752 * @example
73753 *
73754 * _.isTypedArray(new Uint8Array);
73755 * // => true
73756 *
73757 * _.isTypedArray([]);
73758 * // => false
73759 */
73760 var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
73761
73762 /**
73763 * Checks if `value` is `undefined`.
73764 *
73765 * @static
73766 * @since 0.1.0
73767 * @memberOf _
73768 * @category Lang
73769 * @param {*} value The value to check.
73770 * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
73771 * @example
73772 *
73773 * _.isUndefined(void 0);
73774 * // => true
73775 *
73776 * _.isUndefined(null);
73777 * // => false
73778 */
73779 function isUndefined(value) {
73780 return value === undefined;
73781 }
73782
73783 /**
73784 * Checks if `value` is classified as a `WeakMap` object.
73785 *
73786 * @static
73787 * @memberOf _
73788 * @since 4.3.0
73789 * @category Lang
73790 * @param {*} value The value to check.
73791 * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
73792 * @example
73793 *
73794 * _.isWeakMap(new WeakMap);
73795 * // => true
73796 *
73797 * _.isWeakMap(new Map);
73798 * // => false
73799 */
73800 function isWeakMap(value) {
73801 return isObjectLike(value) && getTag(value) == weakMapTag;
73802 }
73803
73804 /**
73805 * Checks if `value` is classified as a `WeakSet` object.
73806 *
73807 * @static
73808 * @memberOf _
73809 * @since 4.3.0
73810 * @category Lang
73811 * @param {*} value The value to check.
73812 * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
73813 * @example
73814 *
73815 * _.isWeakSet(new WeakSet);
73816 * // => true
73817 *
73818 * _.isWeakSet(new Set);
73819 * // => false
73820 */
73821 function isWeakSet(value) {
73822 return isObjectLike(value) && baseGetTag(value) == weakSetTag;
73823 }
73824
73825 /**
73826 * Checks if `value` is less than `other`.
73827 *
73828 * @static
73829 * @memberOf _
73830 * @since 3.9.0
73831 * @category Lang
73832 * @param {*} value The value to compare.
73833 * @param {*} other The other value to compare.
73834 * @returns {boolean} Returns `true` if `value` is less than `other`,
73835 * else `false`.
73836 * @see _.gt
73837 * @example
73838 *
73839 * _.lt(1, 3);
73840 * // => true
73841 *
73842 * _.lt(3, 3);
73843 * // => false
73844 *
73845 * _.lt(3, 1);
73846 * // => false
73847 */
73848 var lt = createRelationalOperation(baseLt);
73849
73850 /**
73851 * Checks if `value` is less than or equal to `other`.
73852 *
73853 * @static
73854 * @memberOf _
73855 * @since 3.9.0
73856 * @category Lang
73857 * @param {*} value The value to compare.
73858 * @param {*} other The other value to compare.
73859 * @returns {boolean} Returns `true` if `value` is less than or equal to
73860 * `other`, else `false`.
73861 * @see _.gte
73862 * @example
73863 *
73864 * _.lte(1, 3);
73865 * // => true
73866 *
73867 * _.lte(3, 3);
73868 * // => true
73869 *
73870 * _.lte(3, 1);
73871 * // => false
73872 */
73873 var lte = createRelationalOperation(function(value, other) {
73874 return value <= other;
73875 });
73876
73877 /**
73878 * Converts `value` to an array.
73879 *
73880 * @static
73881 * @since 0.1.0
73882 * @memberOf _
73883 * @category Lang
73884 * @param {*} value The value to convert.
73885 * @returns {Array} Returns the converted array.
73886 * @example
73887 *
73888 * _.toArray({ 'a': 1, 'b': 2 });
73889 * // => [1, 2]
73890 *
73891 * _.toArray('abc');
73892 * // => ['a', 'b', 'c']
73893 *
73894 * _.toArray(1);
73895 * // => []
73896 *
73897 * _.toArray(null);
73898 * // => []
73899 */
73900 function toArray(value) {
73901 if (!value) {
73902 return [];
73903 }
73904 if (isArrayLike(value)) {
73905 return isString(value) ? stringToArray(value) : copyArray(value);
73906 }
73907 if (symIterator && value[symIterator]) {
73908 return iteratorToArray(value[symIterator]());
73909 }
73910 var tag = getTag(value),
73911 func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
73912
73913 return func(value);
73914 }
73915
73916 /**
73917 * Converts `value` to a finite number.
73918 *
73919 * @static
73920 * @memberOf _
73921 * @since 4.12.0
73922 * @category Lang
73923 * @param {*} value The value to convert.
73924 * @returns {number} Returns the converted number.
73925 * @example
73926 *
73927 * _.toFinite(3.2);
73928 * // => 3.2
73929 *
73930 * _.toFinite(Number.MIN_VALUE);
73931 * // => 5e-324
73932 *
73933 * _.toFinite(Infinity);
73934 * // => 1.7976931348623157e+308
73935 *
73936 * _.toFinite('3.2');
73937 * // => 3.2
73938 */
73939 function toFinite(value) {
73940 if (!value) {
73941 return value === 0 ? value : 0;
73942 }
73943 value = toNumber(value);
73944 if (value === INFINITY || value === -INFINITY) {
73945 var sign = (value < 0 ? -1 : 1);
73946 return sign * MAX_INTEGER;
73947 }
73948 return value === value ? value : 0;
73949 }
73950
73951 /**
73952 * Converts `value` to an integer.
73953 *
73954 * **Note:** This method is loosely based on
73955 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
73956 *
73957 * @static
73958 * @memberOf _
73959 * @since 4.0.0
73960 * @category Lang
73961 * @param {*} value The value to convert.
73962 * @returns {number} Returns the converted integer.
73963 * @example
73964 *
73965 * _.toInteger(3.2);
73966 * // => 3
73967 *
73968 * _.toInteger(Number.MIN_VALUE);
73969 * // => 0
73970 *
73971 * _.toInteger(Infinity);
73972 * // => 1.7976931348623157e+308
73973 *
73974 * _.toInteger('3.2');
73975 * // => 3
73976 */
73977 function toInteger(value) {
73978 var result = toFinite(value),
73979 remainder = result % 1;
73980
73981 return result === result ? (remainder ? result - remainder : result) : 0;
73982 }
73983
73984 /**
73985 * Converts `value` to an integer suitable for use as the length of an
73986 * array-like object.
73987 *
73988 * **Note:** This method is based on
73989 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
73990 *
73991 * @static
73992 * @memberOf _
73993 * @since 4.0.0
73994 * @category Lang
73995 * @param {*} value The value to convert.
73996 * @returns {number} Returns the converted integer.
73997 * @example
73998 *
73999 * _.toLength(3.2);
74000 * // => 3
74001 *
74002 * _.toLength(Number.MIN_VALUE);
74003 * // => 0
74004 *
74005 * _.toLength(Infinity);
74006 * // => 4294967295
74007 *
74008 * _.toLength('3.2');
74009 * // => 3
74010 */
74011 function toLength(value) {
74012 return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
74013 }
74014
74015 /**
74016 * Converts `value` to a number.
74017 *
74018 * @static
74019 * @memberOf _
74020 * @since 4.0.0
74021 * @category Lang
74022 * @param {*} value The value to process.
74023 * @returns {number} Returns the number.
74024 * @example
74025 *
74026 * _.toNumber(3.2);
74027 * // => 3.2
74028 *
74029 * _.toNumber(Number.MIN_VALUE);
74030 * // => 5e-324
74031 *
74032 * _.toNumber(Infinity);
74033 * // => Infinity
74034 *
74035 * _.toNumber('3.2');
74036 * // => 3.2
74037 */
74038 function toNumber(value) {
74039 if (typeof value == 'number') {
74040 return value;
74041 }
74042 if (isSymbol(value)) {
74043 return NAN;
74044 }
74045 if (isObject(value)) {
74046 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
74047 value = isObject(other) ? (other + '') : other;
74048 }
74049 if (typeof value != 'string') {
74050 return value === 0 ? value : +value;
74051 }
74052 value = value.replace(reTrim, '');
74053 var isBinary = reIsBinary.test(value);
74054 return (isBinary || reIsOctal.test(value))
74055 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
74056 : (reIsBadHex.test(value) ? NAN : +value);
74057 }
74058
74059 /**
74060 * Converts `value` to a plain object flattening inherited enumerable string
74061 * keyed properties of `value` to own properties of the plain object.
74062 *
74063 * @static
74064 * @memberOf _
74065 * @since 3.0.0
74066 * @category Lang
74067 * @param {*} value The value to convert.
74068 * @returns {Object} Returns the converted plain object.
74069 * @example
74070 *
74071 * function Foo() {
74072 * this.b = 2;
74073 * }
74074 *
74075 * Foo.prototype.c = 3;
74076 *
74077 * _.assign({ 'a': 1 }, new Foo);
74078 * // => { 'a': 1, 'b': 2 }
74079 *
74080 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
74081 * // => { 'a': 1, 'b': 2, 'c': 3 }
74082 */
74083 function toPlainObject(value) {
74084 return copyObject(value, keysIn(value));
74085 }
74086
74087 /**
74088 * Converts `value` to a safe integer. A safe integer can be compared and
74089 * represented correctly.
74090 *
74091 * @static
74092 * @memberOf _
74093 * @since 4.0.0
74094 * @category Lang
74095 * @param {*} value The value to convert.
74096 * @returns {number} Returns the converted integer.
74097 * @example
74098 *
74099 * _.toSafeInteger(3.2);
74100 * // => 3
74101 *
74102 * _.toSafeInteger(Number.MIN_VALUE);
74103 * // => 0
74104 *
74105 * _.toSafeInteger(Infinity);
74106 * // => 9007199254740991
74107 *
74108 * _.toSafeInteger('3.2');
74109 * // => 3
74110 */
74111 function toSafeInteger(value) {
74112 return value
74113 ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
74114 : (value === 0 ? value : 0);
74115 }
74116
74117 /**
74118 * Converts `value` to a string. An empty string is returned for `null`
74119 * and `undefined` values. The sign of `-0` is preserved.
74120 *
74121 * @static
74122 * @memberOf _
74123 * @since 4.0.0
74124 * @category Lang
74125 * @param {*} value The value to convert.
74126 * @returns {string} Returns the converted string.
74127 * @example
74128 *
74129 * _.toString(null);
74130 * // => ''
74131 *
74132 * _.toString(-0);
74133 * // => '-0'
74134 *
74135 * _.toString([1, 2, 3]);
74136 * // => '1,2,3'
74137 */
74138 function toString(value) {
74139 return value == null ? '' : baseToString(value);
74140 }
74141
74142 /*------------------------------------------------------------------------*/
74143
74144 /**
74145 * Assigns own enumerable string keyed properties of source objects to the
74146 * destination object. Source objects are applied from left to right.
74147 * Subsequent sources overwrite property assignments of previous sources.
74148 *
74149 * **Note:** This method mutates `object` and is loosely based on
74150 * [`Object.assign`](https://mdn.io/Object/assign).
74151 *
74152 * @static
74153 * @memberOf _
74154 * @since 0.10.0
74155 * @category Object
74156 * @param {Object} object The destination object.
74157 * @param {...Object} [sources] The source objects.
74158 * @returns {Object} Returns `object`.
74159 * @see _.assignIn
74160 * @example
74161 *
74162 * function Foo() {
74163 * this.a = 1;
74164 * }
74165 *
74166 * function Bar() {
74167 * this.c = 3;
74168 * }
74169 *
74170 * Foo.prototype.b = 2;
74171 * Bar.prototype.d = 4;
74172 *
74173 * _.assign({ 'a': 0 }, new Foo, new Bar);
74174 * // => { 'a': 1, 'c': 3 }
74175 */
74176 var assign = createAssigner(function(object, source) {
74177 if (isPrototype(source) || isArrayLike(source)) {
74178 copyObject(source, keys(source), object);
74179 return;
74180 }
74181 for (var key in source) {
74182 if (hasOwnProperty.call(source, key)) {
74183 assignValue(object, key, source[key]);
74184 }
74185 }
74186 });
74187
74188 /**
74189 * This method is like `_.assign` except that it iterates over own and
74190 * inherited source properties.
74191 *
74192 * **Note:** This method mutates `object`.
74193 *
74194 * @static
74195 * @memberOf _
74196 * @since 4.0.0
74197 * @alias extend
74198 * @category Object
74199 * @param {Object} object The destination object.
74200 * @param {...Object} [sources] The source objects.
74201 * @returns {Object} Returns `object`.
74202 * @see _.assign
74203 * @example
74204 *
74205 * function Foo() {
74206 * this.a = 1;
74207 * }
74208 *
74209 * function Bar() {
74210 * this.c = 3;
74211 * }
74212 *
74213 * Foo.prototype.b = 2;
74214 * Bar.prototype.d = 4;
74215 *
74216 * _.assignIn({ 'a': 0 }, new Foo, new Bar);
74217 * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
74218 */
74219 var assignIn = createAssigner(function(object, source) {
74220 copyObject(source, keysIn(source), object);
74221 });
74222
74223 /**
74224 * This method is like `_.assignIn` except that it accepts `customizer`
74225 * which is invoked to produce the assigned values. If `customizer` returns
74226 * `undefined`, assignment is handled by the method instead. The `customizer`
74227 * is invoked with five arguments: (objValue, srcValue, key, object, source).
74228 *
74229 * **Note:** This method mutates `object`.
74230 *
74231 * @static
74232 * @memberOf _
74233 * @since 4.0.0
74234 * @alias extendWith
74235 * @category Object
74236 * @param {Object} object The destination object.
74237 * @param {...Object} sources The source objects.
74238 * @param {Function} [customizer] The function to customize assigned values.
74239 * @returns {Object} Returns `object`.
74240 * @see _.assignWith
74241 * @example
74242 *
74243 * function customizer(objValue, srcValue) {
74244 * return _.isUndefined(objValue) ? srcValue : objValue;
74245 * }
74246 *
74247 * var defaults = _.partialRight(_.assignInWith, customizer);
74248 *
74249 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
74250 * // => { 'a': 1, 'b': 2 }
74251 */
74252 var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
74253 copyObject(source, keysIn(source), object, customizer);
74254 });
74255
74256 /**
74257 * This method is like `_.assign` except that it accepts `customizer`
74258 * which is invoked to produce the assigned values. If `customizer` returns
74259 * `undefined`, assignment is handled by the method instead. The `customizer`
74260 * is invoked with five arguments: (objValue, srcValue, key, object, source).
74261 *
74262 * **Note:** This method mutates `object`.
74263 *
74264 * @static
74265 * @memberOf _
74266 * @since 4.0.0
74267 * @category Object
74268 * @param {Object} object The destination object.
74269 * @param {...Object} sources The source objects.
74270 * @param {Function} [customizer] The function to customize assigned values.
74271 * @returns {Object} Returns `object`.
74272 * @see _.assignInWith
74273 * @example
74274 *
74275 * function customizer(objValue, srcValue) {
74276 * return _.isUndefined(objValue) ? srcValue : objValue;
74277 * }
74278 *
74279 * var defaults = _.partialRight(_.assignWith, customizer);
74280 *
74281 * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
74282 * // => { 'a': 1, 'b': 2 }
74283 */
74284 var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
74285 copyObject(source, keys(source), object, customizer);
74286 });
74287
74288 /**
74289 * Creates an array of values corresponding to `paths` of `object`.
74290 *
74291 * @static
74292 * @memberOf _
74293 * @since 1.0.0
74294 * @category Object
74295 * @param {Object} object The object to iterate over.
74296 * @param {...(string|string[])} [paths] The property paths to pick.
74297 * @returns {Array} Returns the picked values.
74298 * @example
74299 *
74300 * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
74301 *
74302 * _.at(object, ['a[0].b.c', 'a[1]']);
74303 * // => [3, 4]
74304 */
74305 var at = flatRest(baseAt);
74306
74307 /**
74308 * Creates an object that inherits from the `prototype` object. If a
74309 * `properties` object is given, its own enumerable string keyed properties
74310 * are assigned to the created object.
74311 *
74312 * @static
74313 * @memberOf _
74314 * @since 2.3.0
74315 * @category Object
74316 * @param {Object} prototype The object to inherit from.
74317 * @param {Object} [properties] The properties to assign to the object.
74318 * @returns {Object} Returns the new object.
74319 * @example
74320 *
74321 * function Shape() {
74322 * this.x = 0;
74323 * this.y = 0;
74324 * }
74325 *
74326 * function Circle() {
74327 * Shape.call(this);
74328 * }
74329 *
74330 * Circle.prototype = _.create(Shape.prototype, {
74331 * 'constructor': Circle
74332 * });
74333 *
74334 * var circle = new Circle;
74335 * circle instanceof Circle;
74336 * // => true
74337 *
74338 * circle instanceof Shape;
74339 * // => true
74340 */
74341 function create(prototype, properties) {
74342 var result = baseCreate(prototype);
74343 return properties == null ? result : baseAssign(result, properties);
74344 }
74345
74346 /**
74347 * Assigns own and inherited enumerable string keyed properties of source
74348 * objects to the destination object for all destination properties that
74349 * resolve to `undefined`. Source objects are applied from left to right.
74350 * Once a property is set, additional values of the same property are ignored.
74351 *
74352 * **Note:** This method mutates `object`.
74353 *
74354 * @static
74355 * @since 0.1.0
74356 * @memberOf _
74357 * @category Object
74358 * @param {Object} object The destination object.
74359 * @param {...Object} [sources] The source objects.
74360 * @returns {Object} Returns `object`.
74361 * @see _.defaultsDeep
74362 * @example
74363 *
74364 * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
74365 * // => { 'a': 1, 'b': 2 }
74366 */
74367 var defaults = baseRest(function(object, sources) {
74368 object = Object(object);
74369
74370 var index = -1;
74371 var length = sources.length;
74372 var guard = length > 2 ? sources[2] : undefined;
74373
74374 if (guard && isIterateeCall(sources[0], sources[1], guard)) {
74375 length = 1;
74376 }
74377
74378 while (++index < length) {
74379 var source = sources[index];
74380 var props = keysIn(source);
74381 var propsIndex = -1;
74382 var propsLength = props.length;
74383
74384 while (++propsIndex < propsLength) {
74385 var key = props[propsIndex];
74386 var value = object[key];
74387
74388 if (value === undefined ||
74389 (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
74390 object[key] = source[key];
74391 }
74392 }
74393 }
74394
74395 return object;
74396 });
74397
74398 /**
74399 * This method is like `_.defaults` except that it recursively assigns
74400 * default properties.
74401 *
74402 * **Note:** This method mutates `object`.
74403 *
74404 * @static
74405 * @memberOf _
74406 * @since 3.10.0
74407 * @category Object
74408 * @param {Object} object The destination object.
74409 * @param {...Object} [sources] The source objects.
74410 * @returns {Object} Returns `object`.
74411 * @see _.defaults
74412 * @example
74413 *
74414 * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
74415 * // => { 'a': { 'b': 2, 'c': 3 } }
74416 */
74417 var defaultsDeep = baseRest(function(args) {
74418 args.push(undefined, customDefaultsMerge);
74419 return apply(mergeWith, undefined, args);
74420 });
74421
74422 /**
74423 * This method is like `_.find` except that it returns the key of the first
74424 * element `predicate` returns truthy for instead of the element itself.
74425 *
74426 * @static
74427 * @memberOf _
74428 * @since 1.1.0
74429 * @category Object
74430 * @param {Object} object The object to inspect.
74431 * @param {Function} [predicate=_.identity] The function invoked per iteration.
74432 * @returns {string|undefined} Returns the key of the matched element,
74433 * else `undefined`.
74434 * @example
74435 *
74436 * var users = {
74437 * 'barney': { 'age': 36, 'active': true },
74438 * 'fred': { 'age': 40, 'active': false },
74439 * 'pebbles': { 'age': 1, 'active': true }
74440 * };
74441 *
74442 * _.findKey(users, function(o) { return o.age < 40; });
74443 * // => 'barney' (iteration order is not guaranteed)
74444 *
74445 * // The `_.matches` iteratee shorthand.
74446 * _.findKey(users, { 'age': 1, 'active': true });
74447 * // => 'pebbles'
74448 *
74449 * // The `_.matchesProperty` iteratee shorthand.
74450 * _.findKey(users, ['active', false]);
74451 * // => 'fred'
74452 *
74453 * // The `_.property` iteratee shorthand.
74454 * _.findKey(users, 'active');
74455 * // => 'barney'
74456 */
74457 function findKey(object, predicate) {
74458 return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
74459 }
74460
74461 /**
74462 * This method is like `_.findKey` except that it iterates over elements of
74463 * a collection in the opposite order.
74464 *
74465 * @static
74466 * @memberOf _
74467 * @since 2.0.0
74468 * @category Object
74469 * @param {Object} object The object to inspect.
74470 * @param {Function} [predicate=_.identity] The function invoked per iteration.
74471 * @returns {string|undefined} Returns the key of the matched element,
74472 * else `undefined`.
74473 * @example
74474 *
74475 * var users = {
74476 * 'barney': { 'age': 36, 'active': true },
74477 * 'fred': { 'age': 40, 'active': false },
74478 * 'pebbles': { 'age': 1, 'active': true }
74479 * };
74480 *
74481 * _.findLastKey(users, function(o) { return o.age < 40; });
74482 * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
74483 *
74484 * // The `_.matches` iteratee shorthand.
74485 * _.findLastKey(users, { 'age': 36, 'active': true });
74486 * // => 'barney'
74487 *
74488 * // The `_.matchesProperty` iteratee shorthand.
74489 * _.findLastKey(users, ['active', false]);
74490 * // => 'fred'
74491 *
74492 * // The `_.property` iteratee shorthand.
74493 * _.findLastKey(users, 'active');
74494 * // => 'pebbles'
74495 */
74496 function findLastKey(object, predicate) {
74497 return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
74498 }
74499
74500 /**
74501 * Iterates over own and inherited enumerable string keyed properties of an
74502 * object and invokes `iteratee` for each property. The iteratee is invoked
74503 * with three arguments: (value, key, object). Iteratee functions may exit
74504 * iteration early by explicitly returning `false`.
74505 *
74506 * @static
74507 * @memberOf _
74508 * @since 0.3.0
74509 * @category Object
74510 * @param {Object} object The object to iterate over.
74511 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74512 * @returns {Object} Returns `object`.
74513 * @see _.forInRight
74514 * @example
74515 *
74516 * function Foo() {
74517 * this.a = 1;
74518 * this.b = 2;
74519 * }
74520 *
74521 * Foo.prototype.c = 3;
74522 *
74523 * _.forIn(new Foo, function(value, key) {
74524 * console.log(key);
74525 * });
74526 * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
74527 */
74528 function forIn(object, iteratee) {
74529 return object == null
74530 ? object
74531 : baseFor(object, getIteratee(iteratee, 3), keysIn);
74532 }
74533
74534 /**
74535 * This method is like `_.forIn` except that it iterates over properties of
74536 * `object` in the opposite order.
74537 *
74538 * @static
74539 * @memberOf _
74540 * @since 2.0.0
74541 * @category Object
74542 * @param {Object} object The object to iterate over.
74543 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74544 * @returns {Object} Returns `object`.
74545 * @see _.forIn
74546 * @example
74547 *
74548 * function Foo() {
74549 * this.a = 1;
74550 * this.b = 2;
74551 * }
74552 *
74553 * Foo.prototype.c = 3;
74554 *
74555 * _.forInRight(new Foo, function(value, key) {
74556 * console.log(key);
74557 * });
74558 * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
74559 */
74560 function forInRight(object, iteratee) {
74561 return object == null
74562 ? object
74563 : baseForRight(object, getIteratee(iteratee, 3), keysIn);
74564 }
74565
74566 /**
74567 * Iterates over own enumerable string keyed properties of an object and
74568 * invokes `iteratee` for each property. The iteratee is invoked with three
74569 * arguments: (value, key, object). Iteratee functions may exit iteration
74570 * early by explicitly returning `false`.
74571 *
74572 * @static
74573 * @memberOf _
74574 * @since 0.3.0
74575 * @category Object
74576 * @param {Object} object The object to iterate over.
74577 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74578 * @returns {Object} Returns `object`.
74579 * @see _.forOwnRight
74580 * @example
74581 *
74582 * function Foo() {
74583 * this.a = 1;
74584 * this.b = 2;
74585 * }
74586 *
74587 * Foo.prototype.c = 3;
74588 *
74589 * _.forOwn(new Foo, function(value, key) {
74590 * console.log(key);
74591 * });
74592 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
74593 */
74594 function forOwn(object, iteratee) {
74595 return object && baseForOwn(object, getIteratee(iteratee, 3));
74596 }
74597
74598 /**
74599 * This method is like `_.forOwn` except that it iterates over properties of
74600 * `object` in the opposite order.
74601 *
74602 * @static
74603 * @memberOf _
74604 * @since 2.0.0
74605 * @category Object
74606 * @param {Object} object The object to iterate over.
74607 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74608 * @returns {Object} Returns `object`.
74609 * @see _.forOwn
74610 * @example
74611 *
74612 * function Foo() {
74613 * this.a = 1;
74614 * this.b = 2;
74615 * }
74616 *
74617 * Foo.prototype.c = 3;
74618 *
74619 * _.forOwnRight(new Foo, function(value, key) {
74620 * console.log(key);
74621 * });
74622 * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
74623 */
74624 function forOwnRight(object, iteratee) {
74625 return object && baseForOwnRight(object, getIteratee(iteratee, 3));
74626 }
74627
74628 /**
74629 * Creates an array of function property names from own enumerable properties
74630 * of `object`.
74631 *
74632 * @static
74633 * @since 0.1.0
74634 * @memberOf _
74635 * @category Object
74636 * @param {Object} object The object to inspect.
74637 * @returns {Array} Returns the function names.
74638 * @see _.functionsIn
74639 * @example
74640 *
74641 * function Foo() {
74642 * this.a = _.constant('a');
74643 * this.b = _.constant('b');
74644 * }
74645 *
74646 * Foo.prototype.c = _.constant('c');
74647 *
74648 * _.functions(new Foo);
74649 * // => ['a', 'b']
74650 */
74651 function functions(object) {
74652 return object == null ? [] : baseFunctions(object, keys(object));
74653 }
74654
74655 /**
74656 * Creates an array of function property names from own and inherited
74657 * enumerable properties of `object`.
74658 *
74659 * @static
74660 * @memberOf _
74661 * @since 4.0.0
74662 * @category Object
74663 * @param {Object} object The object to inspect.
74664 * @returns {Array} Returns the function names.
74665 * @see _.functions
74666 * @example
74667 *
74668 * function Foo() {
74669 * this.a = _.constant('a');
74670 * this.b = _.constant('b');
74671 * }
74672 *
74673 * Foo.prototype.c = _.constant('c');
74674 *
74675 * _.functionsIn(new Foo);
74676 * // => ['a', 'b', 'c']
74677 */
74678 function functionsIn(object) {
74679 return object == null ? [] : baseFunctions(object, keysIn(object));
74680 }
74681
74682 /**
74683 * Gets the value at `path` of `object`. If the resolved value is
74684 * `undefined`, the `defaultValue` is returned in its place.
74685 *
74686 * @static
74687 * @memberOf _
74688 * @since 3.7.0
74689 * @category Object
74690 * @param {Object} object The object to query.
74691 * @param {Array|string} path The path of the property to get.
74692 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
74693 * @returns {*} Returns the resolved value.
74694 * @example
74695 *
74696 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
74697 *
74698 * _.get(object, 'a[0].b.c');
74699 * // => 3
74700 *
74701 * _.get(object, ['a', '0', 'b', 'c']);
74702 * // => 3
74703 *
74704 * _.get(object, 'a.b.c', 'default');
74705 * // => 'default'
74706 */
74707 function get(object, path, defaultValue) {
74708 var result = object == null ? undefined : baseGet(object, path);
74709 return result === undefined ? defaultValue : result;
74710 }
74711
74712 /**
74713 * Checks if `path` is a direct property of `object`.
74714 *
74715 * @static
74716 * @since 0.1.0
74717 * @memberOf _
74718 * @category Object
74719 * @param {Object} object The object to query.
74720 * @param {Array|string} path The path to check.
74721 * @returns {boolean} Returns `true` if `path` exists, else `false`.
74722 * @example
74723 *
74724 * var object = { 'a': { 'b': 2 } };
74725 * var other = _.create({ 'a': _.create({ 'b': 2 }) });
74726 *
74727 * _.has(object, 'a');
74728 * // => true
74729 *
74730 * _.has(object, 'a.b');
74731 * // => true
74732 *
74733 * _.has(object, ['a', 'b']);
74734 * // => true
74735 *
74736 * _.has(other, 'a');
74737 * // => false
74738 */
74739 function has(object, path) {
74740 return object != null && hasPath(object, path, baseHas);
74741 }
74742
74743 /**
74744 * Checks if `path` is a direct or inherited property of `object`.
74745 *
74746 * @static
74747 * @memberOf _
74748 * @since 4.0.0
74749 * @category Object
74750 * @param {Object} object The object to query.
74751 * @param {Array|string} path The path to check.
74752 * @returns {boolean} Returns `true` if `path` exists, else `false`.
74753 * @example
74754 *
74755 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
74756 *
74757 * _.hasIn(object, 'a');
74758 * // => true
74759 *
74760 * _.hasIn(object, 'a.b');
74761 * // => true
74762 *
74763 * _.hasIn(object, ['a', 'b']);
74764 * // => true
74765 *
74766 * _.hasIn(object, 'b');
74767 * // => false
74768 */
74769 function hasIn(object, path) {
74770 return object != null && hasPath(object, path, baseHasIn);
74771 }
74772
74773 /**
74774 * Creates an object composed of the inverted keys and values of `object`.
74775 * If `object` contains duplicate values, subsequent values overwrite
74776 * property assignments of previous values.
74777 *
74778 * @static
74779 * @memberOf _
74780 * @since 0.7.0
74781 * @category Object
74782 * @param {Object} object The object to invert.
74783 * @returns {Object} Returns the new inverted object.
74784 * @example
74785 *
74786 * var object = { 'a': 1, 'b': 2, 'c': 1 };
74787 *
74788 * _.invert(object);
74789 * // => { '1': 'c', '2': 'b' }
74790 */
74791 var invert = createInverter(function(result, value, key) {
74792 if (value != null &&
74793 typeof value.toString != 'function') {
74794 value = nativeObjectToString.call(value);
74795 }
74796
74797 result[value] = key;
74798 }, constant(identity));
74799
74800 /**
74801 * This method is like `_.invert` except that the inverted object is generated
74802 * from the results of running each element of `object` thru `iteratee`. The
74803 * corresponding inverted value of each inverted key is an array of keys
74804 * responsible for generating the inverted value. The iteratee is invoked
74805 * with one argument: (value).
74806 *
74807 * @static
74808 * @memberOf _
74809 * @since 4.1.0
74810 * @category Object
74811 * @param {Object} object The object to invert.
74812 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
74813 * @returns {Object} Returns the new inverted object.
74814 * @example
74815 *
74816 * var object = { 'a': 1, 'b': 2, 'c': 1 };
74817 *
74818 * _.invertBy(object);
74819 * // => { '1': ['a', 'c'], '2': ['b'] }
74820 *
74821 * _.invertBy(object, function(value) {
74822 * return 'group' + value;
74823 * });
74824 * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
74825 */
74826 var invertBy = createInverter(function(result, value, key) {
74827 if (value != null &&
74828 typeof value.toString != 'function') {
74829 value = nativeObjectToString.call(value);
74830 }
74831
74832 if (hasOwnProperty.call(result, value)) {
74833 result[value].push(key);
74834 } else {
74835 result[value] = [key];
74836 }
74837 }, getIteratee);
74838
74839 /**
74840 * Invokes the method at `path` of `object`.
74841 *
74842 * @static
74843 * @memberOf _
74844 * @since 4.0.0
74845 * @category Object
74846 * @param {Object} object The object to query.
74847 * @param {Array|string} path The path of the method to invoke.
74848 * @param {...*} [args] The arguments to invoke the method with.
74849 * @returns {*} Returns the result of the invoked method.
74850 * @example
74851 *
74852 * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
74853 *
74854 * _.invoke(object, 'a[0].b.c.slice', 1, 3);
74855 * // => [2, 3]
74856 */
74857 var invoke = baseRest(baseInvoke);
74858
74859 /**
74860 * Creates an array of the own enumerable property names of `object`.
74861 *
74862 * **Note:** Non-object values are coerced to objects. See the
74863 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
74864 * for more details.
74865 *
74866 * @static
74867 * @since 0.1.0
74868 * @memberOf _
74869 * @category Object
74870 * @param {Object} object The object to query.
74871 * @returns {Array} Returns the array of property names.
74872 * @example
74873 *
74874 * function Foo() {
74875 * this.a = 1;
74876 * this.b = 2;
74877 * }
74878 *
74879 * Foo.prototype.c = 3;
74880 *
74881 * _.keys(new Foo);
74882 * // => ['a', 'b'] (iteration order is not guaranteed)
74883 *
74884 * _.keys('hi');
74885 * // => ['0', '1']
74886 */
74887 function keys(object) {
74888 return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
74889 }
74890
74891 /**
74892 * Creates an array of the own and inherited enumerable property names of `object`.
74893 *
74894 * **Note:** Non-object values are coerced to objects.
74895 *
74896 * @static
74897 * @memberOf _
74898 * @since 3.0.0
74899 * @category Object
74900 * @param {Object} object The object to query.
74901 * @returns {Array} Returns the array of property names.
74902 * @example
74903 *
74904 * function Foo() {
74905 * this.a = 1;
74906 * this.b = 2;
74907 * }
74908 *
74909 * Foo.prototype.c = 3;
74910 *
74911 * _.keysIn(new Foo);
74912 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
74913 */
74914 function keysIn(object) {
74915 return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
74916 }
74917
74918 /**
74919 * The opposite of `_.mapValues`; this method creates an object with the
74920 * same values as `object` and keys generated by running each own enumerable
74921 * string keyed property of `object` thru `iteratee`. The iteratee is invoked
74922 * with three arguments: (value, key, object).
74923 *
74924 * @static
74925 * @memberOf _
74926 * @since 3.8.0
74927 * @category Object
74928 * @param {Object} object The object to iterate over.
74929 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74930 * @returns {Object} Returns the new mapped object.
74931 * @see _.mapValues
74932 * @example
74933 *
74934 * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
74935 * return key + value;
74936 * });
74937 * // => { 'a1': 1, 'b2': 2 }
74938 */
74939 function mapKeys(object, iteratee) {
74940 var result = {};
74941 iteratee = getIteratee(iteratee, 3);
74942
74943 baseForOwn(object, function(value, key, object) {
74944 baseAssignValue(result, iteratee(value, key, object), value);
74945 });
74946 return result;
74947 }
74948
74949 /**
74950 * Creates an object with the same keys as `object` and values generated
74951 * by running each own enumerable string keyed property of `object` thru
74952 * `iteratee`. The iteratee is invoked with three arguments:
74953 * (value, key, object).
74954 *
74955 * @static
74956 * @memberOf _
74957 * @since 2.4.0
74958 * @category Object
74959 * @param {Object} object The object to iterate over.
74960 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
74961 * @returns {Object} Returns the new mapped object.
74962 * @see _.mapKeys
74963 * @example
74964 *
74965 * var users = {
74966 * 'fred': { 'user': 'fred', 'age': 40 },
74967 * 'pebbles': { 'user': 'pebbles', 'age': 1 }
74968 * };
74969 *
74970 * _.mapValues(users, function(o) { return o.age; });
74971 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
74972 *
74973 * // The `_.property` iteratee shorthand.
74974 * _.mapValues(users, 'age');
74975 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
74976 */
74977 function mapValues(object, iteratee) {
74978 var result = {};
74979 iteratee = getIteratee(iteratee, 3);
74980
74981 baseForOwn(object, function(value, key, object) {
74982 baseAssignValue(result, key, iteratee(value, key, object));
74983 });
74984 return result;
74985 }
74986
74987 /**
74988 * This method is like `_.assign` except that it recursively merges own and
74989 * inherited enumerable string keyed properties of source objects into the
74990 * destination object. Source properties that resolve to `undefined` are
74991 * skipped if a destination value exists. Array and plain object properties
74992 * are merged recursively. Other objects and value types are overridden by
74993 * assignment. Source objects are applied from left to right. Subsequent
74994 * sources overwrite property assignments of previous sources.
74995 *
74996 * **Note:** This method mutates `object`.
74997 *
74998 * @static
74999 * @memberOf _
75000 * @since 0.5.0
75001 * @category Object
75002 * @param {Object} object The destination object.
75003 * @param {...Object} [sources] The source objects.
75004 * @returns {Object} Returns `object`.
75005 * @example
75006 *
75007 * var object = {
75008 * 'a': [{ 'b': 2 }, { 'd': 4 }]
75009 * };
75010 *
75011 * var other = {
75012 * 'a': [{ 'c': 3 }, { 'e': 5 }]
75013 * };
75014 *
75015 * _.merge(object, other);
75016 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
75017 */
75018 var merge = createAssigner(function(object, source, srcIndex) {
75019 baseMerge(object, source, srcIndex);
75020 });
75021
75022 /**
75023 * This method is like `_.merge` except that it accepts `customizer` which
75024 * is invoked to produce the merged values of the destination and source
75025 * properties. If `customizer` returns `undefined`, merging is handled by the
75026 * method instead. The `customizer` is invoked with six arguments:
75027 * (objValue, srcValue, key, object, source, stack).
75028 *
75029 * **Note:** This method mutates `object`.
75030 *
75031 * @static
75032 * @memberOf _
75033 * @since 4.0.0
75034 * @category Object
75035 * @param {Object} object The destination object.
75036 * @param {...Object} sources The source objects.
75037 * @param {Function} customizer The function to customize assigned values.
75038 * @returns {Object} Returns `object`.
75039 * @example
75040 *
75041 * function customizer(objValue, srcValue) {
75042 * if (_.isArray(objValue)) {
75043 * return objValue.concat(srcValue);
75044 * }
75045 * }
75046 *
75047 * var object = { 'a': [1], 'b': [2] };
75048 * var other = { 'a': [3], 'b': [4] };
75049 *
75050 * _.mergeWith(object, other, customizer);
75051 * // => { 'a': [1, 3], 'b': [2, 4] }
75052 */
75053 var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
75054 baseMerge(object, source, srcIndex, customizer);
75055 });
75056
75057 /**
75058 * The opposite of `_.pick`; this method creates an object composed of the
75059 * own and inherited enumerable property paths of `object` that are not omitted.
75060 *
75061 * **Note:** This method is considerably slower than `_.pick`.
75062 *
75063 * @static
75064 * @since 0.1.0
75065 * @memberOf _
75066 * @category Object
75067 * @param {Object} object The source object.
75068 * @param {...(string|string[])} [paths] The property paths to omit.
75069 * @returns {Object} Returns the new object.
75070 * @example
75071 *
75072 * var object = { 'a': 1, 'b': '2', 'c': 3 };
75073 *
75074 * _.omit(object, ['a', 'c']);
75075 * // => { 'b': '2' }
75076 */
75077 var omit = flatRest(function(object, paths) {
75078 var result = {};
75079 if (object == null) {
75080 return result;
75081 }
75082 var isDeep = false;
75083 paths = arrayMap(paths, function(path) {
75084 path = castPath(path, object);
75085 isDeep || (isDeep = path.length > 1);
75086 return path;
75087 });
75088 copyObject(object, getAllKeysIn(object), result);
75089 if (isDeep) {
75090 result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
75091 }
75092 var length = paths.length;
75093 while (length--) {
75094 baseUnset(result, paths[length]);
75095 }
75096 return result;
75097 });
75098
75099 /**
75100 * The opposite of `_.pickBy`; this method creates an object composed of
75101 * the own and inherited enumerable string keyed properties of `object` that
75102 * `predicate` doesn't return truthy for. The predicate is invoked with two
75103 * arguments: (value, key).
75104 *
75105 * @static
75106 * @memberOf _
75107 * @since 4.0.0
75108 * @category Object
75109 * @param {Object} object The source object.
75110 * @param {Function} [predicate=_.identity] The function invoked per property.
75111 * @returns {Object} Returns the new object.
75112 * @example
75113 *
75114 * var object = { 'a': 1, 'b': '2', 'c': 3 };
75115 *
75116 * _.omitBy(object, _.isNumber);
75117 * // => { 'b': '2' }
75118 */
75119 function omitBy(object, predicate) {
75120 return pickBy(object, negate(getIteratee(predicate)));
75121 }
75122
75123 /**
75124 * Creates an object composed of the picked `object` properties.
75125 *
75126 * @static
75127 * @since 0.1.0
75128 * @memberOf _
75129 * @category Object
75130 * @param {Object} object The source object.
75131 * @param {...(string|string[])} [paths] The property paths to pick.
75132 * @returns {Object} Returns the new object.
75133 * @example
75134 *
75135 * var object = { 'a': 1, 'b': '2', 'c': 3 };
75136 *
75137 * _.pick(object, ['a', 'c']);
75138 * // => { 'a': 1, 'c': 3 }
75139 */
75140 var pick = flatRest(function(object, paths) {
75141 return object == null ? {} : basePick(object, paths);
75142 });
75143
75144 /**
75145 * Creates an object composed of the `object` properties `predicate` returns
75146 * truthy for. The predicate is invoked with two arguments: (value, key).
75147 *
75148 * @static
75149 * @memberOf _
75150 * @since 4.0.0
75151 * @category Object
75152 * @param {Object} object The source object.
75153 * @param {Function} [predicate=_.identity] The function invoked per property.
75154 * @returns {Object} Returns the new object.
75155 * @example
75156 *
75157 * var object = { 'a': 1, 'b': '2', 'c': 3 };
75158 *
75159 * _.pickBy(object, _.isNumber);
75160 * // => { 'a': 1, 'c': 3 }
75161 */
75162 function pickBy(object, predicate) {
75163 if (object == null) {
75164 return {};
75165 }
75166 var props = arrayMap(getAllKeysIn(object), function(prop) {
75167 return [prop];
75168 });
75169 predicate = getIteratee(predicate);
75170 return basePickBy(object, props, function(value, path) {
75171 return predicate(value, path[0]);
75172 });
75173 }
75174
75175 /**
75176 * This method is like `_.get` except that if the resolved value is a
75177 * function it's invoked with the `this` binding of its parent object and
75178 * its result is returned.
75179 *
75180 * @static
75181 * @since 0.1.0
75182 * @memberOf _
75183 * @category Object
75184 * @param {Object} object The object to query.
75185 * @param {Array|string} path The path of the property to resolve.
75186 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
75187 * @returns {*} Returns the resolved value.
75188 * @example
75189 *
75190 * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
75191 *
75192 * _.result(object, 'a[0].b.c1');
75193 * // => 3
75194 *
75195 * _.result(object, 'a[0].b.c2');
75196 * // => 4
75197 *
75198 * _.result(object, 'a[0].b.c3', 'default');
75199 * // => 'default'
75200 *
75201 * _.result(object, 'a[0].b.c3', _.constant('default'));
75202 * // => 'default'
75203 */
75204 function result(object, path, defaultValue) {
75205 path = castPath(path, object);
75206
75207 var index = -1,
75208 length = path.length;
75209
75210 // Ensure the loop is entered when path is empty.
75211 if (!length) {
75212 length = 1;
75213 object = undefined;
75214 }
75215 while (++index < length) {
75216 var value = object == null ? undefined : object[toKey(path[index])];
75217 if (value === undefined) {
75218 index = length;
75219 value = defaultValue;
75220 }
75221 object = isFunction(value) ? value.call(object) : value;
75222 }
75223 return object;
75224 }
75225
75226 /**
75227 * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
75228 * it's created. Arrays are created for missing index properties while objects
75229 * are created for all other missing properties. Use `_.setWith` to customize
75230 * `path` creation.
75231 *
75232 * **Note:** This method mutates `object`.
75233 *
75234 * @static
75235 * @memberOf _
75236 * @since 3.7.0
75237 * @category Object
75238 * @param {Object} object The object to modify.
75239 * @param {Array|string} path The path of the property to set.
75240 * @param {*} value The value to set.
75241 * @returns {Object} Returns `object`.
75242 * @example
75243 *
75244 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
75245 *
75246 * _.set(object, 'a[0].b.c', 4);
75247 * console.log(object.a[0].b.c);
75248 * // => 4
75249 *
75250 * _.set(object, ['x', '0', 'y', 'z'], 5);
75251 * console.log(object.x[0].y.z);
75252 * // => 5
75253 */
75254 function set(object, path, value) {
75255 return object == null ? object : baseSet(object, path, value);
75256 }
75257
75258 /**
75259 * This method is like `_.set` except that it accepts `customizer` which is
75260 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
75261 * path creation is handled by the method instead. The `customizer` is invoked
75262 * with three arguments: (nsValue, key, nsObject).
75263 *
75264 * **Note:** This method mutates `object`.
75265 *
75266 * @static
75267 * @memberOf _
75268 * @since 4.0.0
75269 * @category Object
75270 * @param {Object} object The object to modify.
75271 * @param {Array|string} path The path of the property to set.
75272 * @param {*} value The value to set.
75273 * @param {Function} [customizer] The function to customize assigned values.
75274 * @returns {Object} Returns `object`.
75275 * @example
75276 *
75277 * var object = {};
75278 *
75279 * _.setWith(object, '[0][1]', 'a', Object);
75280 * // => { '0': { '1': 'a' } }
75281 */
75282 function setWith(object, path, value, customizer) {
75283 customizer = typeof customizer == 'function' ? customizer : undefined;
75284 return object == null ? object : baseSet(object, path, value, customizer);
75285 }
75286
75287 /**
75288 * Creates an array of own enumerable string keyed-value pairs for `object`
75289 * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
75290 * entries are returned.
75291 *
75292 * @static
75293 * @memberOf _
75294 * @since 4.0.0
75295 * @alias entries
75296 * @category Object
75297 * @param {Object} object The object to query.
75298 * @returns {Array} Returns the key-value pairs.
75299 * @example
75300 *
75301 * function Foo() {
75302 * this.a = 1;
75303 * this.b = 2;
75304 * }
75305 *
75306 * Foo.prototype.c = 3;
75307 *
75308 * _.toPairs(new Foo);
75309 * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
75310 */
75311 var toPairs = createToPairs(keys);
75312
75313 /**
75314 * Creates an array of own and inherited enumerable string keyed-value pairs
75315 * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
75316 * or set, its entries are returned.
75317 *
75318 * @static
75319 * @memberOf _
75320 * @since 4.0.0
75321 * @alias entriesIn
75322 * @category Object
75323 * @param {Object} object The object to query.
75324 * @returns {Array} Returns the key-value pairs.
75325 * @example
75326 *
75327 * function Foo() {
75328 * this.a = 1;
75329 * this.b = 2;
75330 * }
75331 *
75332 * Foo.prototype.c = 3;
75333 *
75334 * _.toPairsIn(new Foo);
75335 * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
75336 */
75337 var toPairsIn = createToPairs(keysIn);
75338
75339 /**
75340 * An alternative to `_.reduce`; this method transforms `object` to a new
75341 * `accumulator` object which is the result of running each of its own
75342 * enumerable string keyed properties thru `iteratee`, with each invocation
75343 * potentially mutating the `accumulator` object. If `accumulator` is not
75344 * provided, a new object with the same `[[Prototype]]` will be used. The
75345 * iteratee is invoked with four arguments: (accumulator, value, key, object).
75346 * Iteratee functions may exit iteration early by explicitly returning `false`.
75347 *
75348 * @static
75349 * @memberOf _
75350 * @since 1.3.0
75351 * @category Object
75352 * @param {Object} object The object to iterate over.
75353 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
75354 * @param {*} [accumulator] The custom accumulator value.
75355 * @returns {*} Returns the accumulated value.
75356 * @example
75357 *
75358 * _.transform([2, 3, 4], function(result, n) {
75359 * result.push(n *= n);
75360 * return n % 2 == 0;
75361 * }, []);
75362 * // => [4, 9]
75363 *
75364 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
75365 * (result[value] || (result[value] = [])).push(key);
75366 * }, {});
75367 * // => { '1': ['a', 'c'], '2': ['b'] }
75368 */
75369 function transform(object, iteratee, accumulator) {
75370 var isArr = isArray(object),
75371 isArrLike = isArr || isBuffer(object) || isTypedArray(object);
75372
75373 iteratee = getIteratee(iteratee, 4);
75374 if (accumulator == null) {
75375 var Ctor = object && object.constructor;
75376 if (isArrLike) {
75377 accumulator = isArr ? new Ctor : [];
75378 }
75379 else if (isObject(object)) {
75380 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
75381 }
75382 else {
75383 accumulator = {};
75384 }
75385 }
75386 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
75387 return iteratee(accumulator, value, index, object);
75388 });
75389 return accumulator;
75390 }
75391
75392 /**
75393 * Removes the property at `path` of `object`.
75394 *
75395 * **Note:** This method mutates `object`.
75396 *
75397 * @static
75398 * @memberOf _
75399 * @since 4.0.0
75400 * @category Object
75401 * @param {Object} object The object to modify.
75402 * @param {Array|string} path The path of the property to unset.
75403 * @returns {boolean} Returns `true` if the property is deleted, else `false`.
75404 * @example
75405 *
75406 * var object = { 'a': [{ 'b': { 'c': 7 } }] };
75407 * _.unset(object, 'a[0].b.c');
75408 * // => true
75409 *
75410 * console.log(object);
75411 * // => { 'a': [{ 'b': {} }] };
75412 *
75413 * _.unset(object, ['a', '0', 'b', 'c']);
75414 * // => true
75415 *
75416 * console.log(object);
75417 * // => { 'a': [{ 'b': {} }] };
75418 */
75419 function unset(object, path) {
75420 return object == null ? true : baseUnset(object, path);
75421 }
75422
75423 /**
75424 * This method is like `_.set` except that accepts `updater` to produce the
75425 * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
75426 * is invoked with one argument: (value).
75427 *
75428 * **Note:** This method mutates `object`.
75429 *
75430 * @static
75431 * @memberOf _
75432 * @since 4.6.0
75433 * @category Object
75434 * @param {Object} object The object to modify.
75435 * @param {Array|string} path The path of the property to set.
75436 * @param {Function} updater The function to produce the updated value.
75437 * @returns {Object} Returns `object`.
75438 * @example
75439 *
75440 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
75441 *
75442 * _.update(object, 'a[0].b.c', function(n) { return n * n; });
75443 * console.log(object.a[0].b.c);
75444 * // => 9
75445 *
75446 * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
75447 * console.log(object.x[0].y.z);
75448 * // => 0
75449 */
75450 function update(object, path, updater) {
75451 return object == null ? object : baseUpdate(object, path, castFunction(updater));
75452 }
75453
75454 /**
75455 * This method is like `_.update` except that it accepts `customizer` which is
75456 * invoked to produce the objects of `path`. If `customizer` returns `undefined`
75457 * path creation is handled by the method instead. The `customizer` is invoked
75458 * with three arguments: (nsValue, key, nsObject).
75459 *
75460 * **Note:** This method mutates `object`.
75461 *
75462 * @static
75463 * @memberOf _
75464 * @since 4.6.0
75465 * @category Object
75466 * @param {Object} object The object to modify.
75467 * @param {Array|string} path The path of the property to set.
75468 * @param {Function} updater The function to produce the updated value.
75469 * @param {Function} [customizer] The function to customize assigned values.
75470 * @returns {Object} Returns `object`.
75471 * @example
75472 *
75473 * var object = {};
75474 *
75475 * _.updateWith(object, '[0][1]', _.constant('a'), Object);
75476 * // => { '0': { '1': 'a' } }
75477 */
75478 function updateWith(object, path, updater, customizer) {
75479 customizer = typeof customizer == 'function' ? customizer : undefined;
75480 return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
75481 }
75482
75483 /**
75484 * Creates an array of the own enumerable string keyed property values of `object`.
75485 *
75486 * **Note:** Non-object values are coerced to objects.
75487 *
75488 * @static
75489 * @since 0.1.0
75490 * @memberOf _
75491 * @category Object
75492 * @param {Object} object The object to query.
75493 * @returns {Array} Returns the array of property values.
75494 * @example
75495 *
75496 * function Foo() {
75497 * this.a = 1;
75498 * this.b = 2;
75499 * }
75500 *
75501 * Foo.prototype.c = 3;
75502 *
75503 * _.values(new Foo);
75504 * // => [1, 2] (iteration order is not guaranteed)
75505 *
75506 * _.values('hi');
75507 * // => ['h', 'i']
75508 */
75509 function values(object) {
75510 return object == null ? [] : baseValues(object, keys(object));
75511 }
75512
75513 /**
75514 * Creates an array of the own and inherited enumerable string keyed property
75515 * values of `object`.
75516 *
75517 * **Note:** Non-object values are coerced to objects.
75518 *
75519 * @static
75520 * @memberOf _
75521 * @since 3.0.0
75522 * @category Object
75523 * @param {Object} object The object to query.
75524 * @returns {Array} Returns the array of property values.
75525 * @example
75526 *
75527 * function Foo() {
75528 * this.a = 1;
75529 * this.b = 2;
75530 * }
75531 *
75532 * Foo.prototype.c = 3;
75533 *
75534 * _.valuesIn(new Foo);
75535 * // => [1, 2, 3] (iteration order is not guaranteed)
75536 */
75537 function valuesIn(object) {
75538 return object == null ? [] : baseValues(object, keysIn(object));
75539 }
75540
75541 /*------------------------------------------------------------------------*/
75542
75543 /**
75544 * Clamps `number` within the inclusive `lower` and `upper` bounds.
75545 *
75546 * @static
75547 * @memberOf _
75548 * @since 4.0.0
75549 * @category Number
75550 * @param {number} number The number to clamp.
75551 * @param {number} [lower] The lower bound.
75552 * @param {number} upper The upper bound.
75553 * @returns {number} Returns the clamped number.
75554 * @example
75555 *
75556 * _.clamp(-10, -5, 5);
75557 * // => -5
75558 *
75559 * _.clamp(10, -5, 5);
75560 * // => 5
75561 */
75562 function clamp(number, lower, upper) {
75563 if (upper === undefined) {
75564 upper = lower;
75565 lower = undefined;
75566 }
75567 if (upper !== undefined) {
75568 upper = toNumber(upper);
75569 upper = upper === upper ? upper : 0;
75570 }
75571 if (lower !== undefined) {
75572 lower = toNumber(lower);
75573 lower = lower === lower ? lower : 0;
75574 }
75575 return baseClamp(toNumber(number), lower, upper);
75576 }
75577
75578 /**
75579 * Checks if `n` is between `start` and up to, but not including, `end`. If
75580 * `end` is not specified, it's set to `start` with `start` then set to `0`.
75581 * If `start` is greater than `end` the params are swapped to support
75582 * negative ranges.
75583 *
75584 * @static
75585 * @memberOf _
75586 * @since 3.3.0
75587 * @category Number
75588 * @param {number} number The number to check.
75589 * @param {number} [start=0] The start of the range.
75590 * @param {number} end The end of the range.
75591 * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
75592 * @see _.range, _.rangeRight
75593 * @example
75594 *
75595 * _.inRange(3, 2, 4);
75596 * // => true
75597 *
75598 * _.inRange(4, 8);
75599 * // => true
75600 *
75601 * _.inRange(4, 2);
75602 * // => false
75603 *
75604 * _.inRange(2, 2);
75605 * // => false
75606 *
75607 * _.inRange(1.2, 2);
75608 * // => true
75609 *
75610 * _.inRange(5.2, 4);
75611 * // => false
75612 *
75613 * _.inRange(-3, -2, -6);
75614 * // => true
75615 */
75616 function inRange(number, start, end) {
75617 start = toFinite(start);
75618 if (end === undefined) {
75619 end = start;
75620 start = 0;
75621 } else {
75622 end = toFinite(end);
75623 }
75624 number = toNumber(number);
75625 return baseInRange(number, start, end);
75626 }
75627
75628 /**
75629 * Produces a random number between the inclusive `lower` and `upper` bounds.
75630 * If only one argument is provided a number between `0` and the given number
75631 * is returned. If `floating` is `true`, or either `lower` or `upper` are
75632 * floats, a floating-point number is returned instead of an integer.
75633 *
75634 * **Note:** JavaScript follows the IEEE-754 standard for resolving
75635 * floating-point values which can produce unexpected results.
75636 *
75637 * @static
75638 * @memberOf _
75639 * @since 0.7.0
75640 * @category Number
75641 * @param {number} [lower=0] The lower bound.
75642 * @param {number} [upper=1] The upper bound.
75643 * @param {boolean} [floating] Specify returning a floating-point number.
75644 * @returns {number} Returns the random number.
75645 * @example
75646 *
75647 * _.random(0, 5);
75648 * // => an integer between 0 and 5
75649 *
75650 * _.random(5);
75651 * // => also an integer between 0 and 5
75652 *
75653 * _.random(5, true);
75654 * // => a floating-point number between 0 and 5
75655 *
75656 * _.random(1.2, 5.2);
75657 * // => a floating-point number between 1.2 and 5.2
75658 */
75659 function random(lower, upper, floating) {
75660 if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
75661 upper = floating = undefined;
75662 }
75663 if (floating === undefined) {
75664 if (typeof upper == 'boolean') {
75665 floating = upper;
75666 upper = undefined;
75667 }
75668 else if (typeof lower == 'boolean') {
75669 floating = lower;
75670 lower = undefined;
75671 }
75672 }
75673 if (lower === undefined && upper === undefined) {
75674 lower = 0;
75675 upper = 1;
75676 }
75677 else {
75678 lower = toFinite(lower);
75679 if (upper === undefined) {
75680 upper = lower;
75681 lower = 0;
75682 } else {
75683 upper = toFinite(upper);
75684 }
75685 }
75686 if (lower > upper) {
75687 var temp = lower;
75688 lower = upper;
75689 upper = temp;
75690 }
75691 if (floating || lower % 1 || upper % 1) {
75692 var rand = nativeRandom();
75693 return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
75694 }
75695 return baseRandom(lower, upper);
75696 }
75697
75698 /*------------------------------------------------------------------------*/
75699
75700 /**
75701 * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
75702 *
75703 * @static
75704 * @memberOf _
75705 * @since 3.0.0
75706 * @category String
75707 * @param {string} [string=''] The string to convert.
75708 * @returns {string} Returns the camel cased string.
75709 * @example
75710 *
75711 * _.camelCase('Foo Bar');
75712 * // => 'fooBar'
75713 *
75714 * _.camelCase('--foo-bar--');
75715 * // => 'fooBar'
75716 *
75717 * _.camelCase('__FOO_BAR__');
75718 * // => 'fooBar'
75719 */
75720 var camelCase = createCompounder(function(result, word, index) {
75721 word = word.toLowerCase();
75722 return result + (index ? capitalize(word) : word);
75723 });
75724
75725 /**
75726 * Converts the first character of `string` to upper case and the remaining
75727 * to lower case.
75728 *
75729 * @static
75730 * @memberOf _
75731 * @since 3.0.0
75732 * @category String
75733 * @param {string} [string=''] The string to capitalize.
75734 * @returns {string} Returns the capitalized string.
75735 * @example
75736 *
75737 * _.capitalize('FRED');
75738 * // => 'Fred'
75739 */
75740 function capitalize(string) {
75741 return upperFirst(toString(string).toLowerCase());
75742 }
75743
75744 /**
75745 * Deburrs `string` by converting
75746 * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
75747 * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
75748 * letters to basic Latin letters and removing
75749 * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
75750 *
75751 * @static
75752 * @memberOf _
75753 * @since 3.0.0
75754 * @category String
75755 * @param {string} [string=''] The string to deburr.
75756 * @returns {string} Returns the deburred string.
75757 * @example
75758 *
75759 * _.deburr('déjà vu');
75760 * // => 'deja vu'
75761 */
75762 function deburr(string) {
75763 string = toString(string);
75764 return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
75765 }
75766
75767 /**
75768 * Checks if `string` ends with the given target string.
75769 *
75770 * @static
75771 * @memberOf _
75772 * @since 3.0.0
75773 * @category String
75774 * @param {string} [string=''] The string to inspect.
75775 * @param {string} [target] The string to search for.
75776 * @param {number} [position=string.length] The position to search up to.
75777 * @returns {boolean} Returns `true` if `string` ends with `target`,
75778 * else `false`.
75779 * @example
75780 *
75781 * _.endsWith('abc', 'c');
75782 * // => true
75783 *
75784 * _.endsWith('abc', 'b');
75785 * // => false
75786 *
75787 * _.endsWith('abc', 'b', 2);
75788 * // => true
75789 */
75790 function endsWith(string, target, position) {
75791 string = toString(string);
75792 target = baseToString(target);
75793
75794 var length = string.length;
75795 position = position === undefined
75796 ? length
75797 : baseClamp(toInteger(position), 0, length);
75798
75799 var end = position;
75800 position -= target.length;
75801 return position >= 0 && string.slice(position, end) == target;
75802 }
75803
75804 /**
75805 * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
75806 * corresponding HTML entities.
75807 *
75808 * **Note:** No other characters are escaped. To escape additional
75809 * characters use a third-party library like [_he_](https://mths.be/he).
75810 *
75811 * Though the ">" character is escaped for symmetry, characters like
75812 * ">" and "/" don't need escaping in HTML and have no special meaning
75813 * unless they're part of a tag or unquoted attribute value. See
75814 * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
75815 * (under "semi-related fun fact") for more details.
75816 *
75817 * When working with HTML you should always
75818 * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
75819 * XSS vectors.
75820 *
75821 * @static
75822 * @since 0.1.0
75823 * @memberOf _
75824 * @category String
75825 * @param {string} [string=''] The string to escape.
75826 * @returns {string} Returns the escaped string.
75827 * @example
75828 *
75829 * _.escape('fred, barney, & pebbles');
75830 * // => 'fred, barney, &amp; pebbles'
75831 */
75832 function escape(string) {
75833 string = toString(string);
75834 return (string && reHasUnescapedHtml.test(string))
75835 ? string.replace(reUnescapedHtml, escapeHtmlChar)
75836 : string;
75837 }
75838
75839 /**
75840 * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
75841 * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
75842 *
75843 * @static
75844 * @memberOf _
75845 * @since 3.0.0
75846 * @category String
75847 * @param {string} [string=''] The string to escape.
75848 * @returns {string} Returns the escaped string.
75849 * @example
75850 *
75851 * _.escapeRegExp('[lodash](https://lodash.com/)');
75852 * // => '\[lodash\]\(https://lodash\.com/\)'
75853 */
75854 function escapeRegExp(string) {
75855 string = toString(string);
75856 return (string && reHasRegExpChar.test(string))
75857 ? string.replace(reRegExpChar, '\\$&')
75858 : string;
75859 }
75860
75861 /**
75862 * Converts `string` to
75863 * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
75864 *
75865 * @static
75866 * @memberOf _
75867 * @since 3.0.0
75868 * @category String
75869 * @param {string} [string=''] The string to convert.
75870 * @returns {string} Returns the kebab cased string.
75871 * @example
75872 *
75873 * _.kebabCase('Foo Bar');
75874 * // => 'foo-bar'
75875 *
75876 * _.kebabCase('fooBar');
75877 * // => 'foo-bar'
75878 *
75879 * _.kebabCase('__FOO_BAR__');
75880 * // => 'foo-bar'
75881 */
75882 var kebabCase = createCompounder(function(result, word, index) {
75883 return result + (index ? '-' : '') + word.toLowerCase();
75884 });
75885
75886 /**
75887 * Converts `string`, as space separated words, to lower case.
75888 *
75889 * @static
75890 * @memberOf _
75891 * @since 4.0.0
75892 * @category String
75893 * @param {string} [string=''] The string to convert.
75894 * @returns {string} Returns the lower cased string.
75895 * @example
75896 *
75897 * _.lowerCase('--Foo-Bar--');
75898 * // => 'foo bar'
75899 *
75900 * _.lowerCase('fooBar');
75901 * // => 'foo bar'
75902 *
75903 * _.lowerCase('__FOO_BAR__');
75904 * // => 'foo bar'
75905 */
75906 var lowerCase = createCompounder(function(result, word, index) {
75907 return result + (index ? ' ' : '') + word.toLowerCase();
75908 });
75909
75910 /**
75911 * Converts the first character of `string` to lower case.
75912 *
75913 * @static
75914 * @memberOf _
75915 * @since 4.0.0
75916 * @category String
75917 * @param {string} [string=''] The string to convert.
75918 * @returns {string} Returns the converted string.
75919 * @example
75920 *
75921 * _.lowerFirst('Fred');
75922 * // => 'fred'
75923 *
75924 * _.lowerFirst('FRED');
75925 * // => 'fRED'
75926 */
75927 var lowerFirst = createCaseFirst('toLowerCase');
75928
75929 /**
75930 * Pads `string` on the left and right sides if it's shorter than `length`.
75931 * Padding characters are truncated if they can't be evenly divided by `length`.
75932 *
75933 * @static
75934 * @memberOf _
75935 * @since 3.0.0
75936 * @category String
75937 * @param {string} [string=''] The string to pad.
75938 * @param {number} [length=0] The padding length.
75939 * @param {string} [chars=' '] The string used as padding.
75940 * @returns {string} Returns the padded string.
75941 * @example
75942 *
75943 * _.pad('abc', 8);
75944 * // => ' abc '
75945 *
75946 * _.pad('abc', 8, '_-');
75947 * // => '_-abc_-_'
75948 *
75949 * _.pad('abc', 3);
75950 * // => 'abc'
75951 */
75952 function pad(string, length, chars) {
75953 string = toString(string);
75954 length = toInteger(length);
75955
75956 var strLength = length ? stringSize(string) : 0;
75957 if (!length || strLength >= length) {
75958 return string;
75959 }
75960 var mid = (length - strLength) / 2;
75961 return (
75962 createPadding(nativeFloor(mid), chars) +
75963 string +
75964 createPadding(nativeCeil(mid), chars)
75965 );
75966 }
75967
75968 /**
75969 * Pads `string` on the right side if it's shorter than `length`. Padding
75970 * characters are truncated if they exceed `length`.
75971 *
75972 * @static
75973 * @memberOf _
75974 * @since 4.0.0
75975 * @category String
75976 * @param {string} [string=''] The string to pad.
75977 * @param {number} [length=0] The padding length.
75978 * @param {string} [chars=' '] The string used as padding.
75979 * @returns {string} Returns the padded string.
75980 * @example
75981 *
75982 * _.padEnd('abc', 6);
75983 * // => 'abc '
75984 *
75985 * _.padEnd('abc', 6, '_-');
75986 * // => 'abc_-_'
75987 *
75988 * _.padEnd('abc', 3);
75989 * // => 'abc'
75990 */
75991 function padEnd(string, length, chars) {
75992 string = toString(string);
75993 length = toInteger(length);
75994
75995 var strLength = length ? stringSize(string) : 0;
75996 return (length && strLength < length)
75997 ? (string + createPadding(length - strLength, chars))
75998 : string;
75999 }
76000
76001 /**
76002 * Pads `string` on the left side if it's shorter than `length`. Padding
76003 * characters are truncated if they exceed `length`.
76004 *
76005 * @static
76006 * @memberOf _
76007 * @since 4.0.0
76008 * @category String
76009 * @param {string} [string=''] The string to pad.
76010 * @param {number} [length=0] The padding length.
76011 * @param {string} [chars=' '] The string used as padding.
76012 * @returns {string} Returns the padded string.
76013 * @example
76014 *
76015 * _.padStart('abc', 6);
76016 * // => ' abc'
76017 *
76018 * _.padStart('abc', 6, '_-');
76019 * // => '_-_abc'
76020 *
76021 * _.padStart('abc', 3);
76022 * // => 'abc'
76023 */
76024 function padStart(string, length, chars) {
76025 string = toString(string);
76026 length = toInteger(length);
76027
76028 var strLength = length ? stringSize(string) : 0;
76029 return (length && strLength < length)
76030 ? (createPadding(length - strLength, chars) + string)
76031 : string;
76032 }
76033
76034 /**
76035 * Converts `string` to an integer of the specified radix. If `radix` is
76036 * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
76037 * hexadecimal, in which case a `radix` of `16` is used.
76038 *
76039 * **Note:** This method aligns with the
76040 * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
76041 *
76042 * @static
76043 * @memberOf _
76044 * @since 1.1.0
76045 * @category String
76046 * @param {string} string The string to convert.
76047 * @param {number} [radix=10] The radix to interpret `value` by.
76048 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76049 * @returns {number} Returns the converted integer.
76050 * @example
76051 *
76052 * _.parseInt('08');
76053 * // => 8
76054 *
76055 * _.map(['6', '08', '10'], _.parseInt);
76056 * // => [6, 8, 10]
76057 */
76058 function parseInt(string, radix, guard) {
76059 if (guard || radix == null) {
76060 radix = 0;
76061 } else if (radix) {
76062 radix = +radix;
76063 }
76064 return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
76065 }
76066
76067 /**
76068 * Repeats the given string `n` times.
76069 *
76070 * @static
76071 * @memberOf _
76072 * @since 3.0.0
76073 * @category String
76074 * @param {string} [string=''] The string to repeat.
76075 * @param {number} [n=1] The number of times to repeat the string.
76076 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76077 * @returns {string} Returns the repeated string.
76078 * @example
76079 *
76080 * _.repeat('*', 3);
76081 * // => '***'
76082 *
76083 * _.repeat('abc', 2);
76084 * // => 'abcabc'
76085 *
76086 * _.repeat('abc', 0);
76087 * // => ''
76088 */
76089 function repeat(string, n, guard) {
76090 if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
76091 n = 1;
76092 } else {
76093 n = toInteger(n);
76094 }
76095 return baseRepeat(toString(string), n);
76096 }
76097
76098 /**
76099 * Replaces matches for `pattern` in `string` with `replacement`.
76100 *
76101 * **Note:** This method is based on
76102 * [`String#replace`](https://mdn.io/String/replace).
76103 *
76104 * @static
76105 * @memberOf _
76106 * @since 4.0.0
76107 * @category String
76108 * @param {string} [string=''] The string to modify.
76109 * @param {RegExp|string} pattern The pattern to replace.
76110 * @param {Function|string} replacement The match replacement.
76111 * @returns {string} Returns the modified string.
76112 * @example
76113 *
76114 * _.replace('Hi Fred', 'Fred', 'Barney');
76115 * // => 'Hi Barney'
76116 */
76117 function replace() {
76118 var args = arguments,
76119 string = toString(args[0]);
76120
76121 return args.length < 3 ? string : string.replace(args[1], args[2]);
76122 }
76123
76124 /**
76125 * Converts `string` to
76126 * [snake case](https://en.wikipedia.org/wiki/Snake_case).
76127 *
76128 * @static
76129 * @memberOf _
76130 * @since 3.0.0
76131 * @category String
76132 * @param {string} [string=''] The string to convert.
76133 * @returns {string} Returns the snake cased string.
76134 * @example
76135 *
76136 * _.snakeCase('Foo Bar');
76137 * // => 'foo_bar'
76138 *
76139 * _.snakeCase('fooBar');
76140 * // => 'foo_bar'
76141 *
76142 * _.snakeCase('--FOO-BAR--');
76143 * // => 'foo_bar'
76144 */
76145 var snakeCase = createCompounder(function(result, word, index) {
76146 return result + (index ? '_' : '') + word.toLowerCase();
76147 });
76148
76149 /**
76150 * Splits `string` by `separator`.
76151 *
76152 * **Note:** This method is based on
76153 * [`String#split`](https://mdn.io/String/split).
76154 *
76155 * @static
76156 * @memberOf _
76157 * @since 4.0.0
76158 * @category String
76159 * @param {string} [string=''] The string to split.
76160 * @param {RegExp|string} separator The separator pattern to split by.
76161 * @param {number} [limit] The length to truncate results to.
76162 * @returns {Array} Returns the string segments.
76163 * @example
76164 *
76165 * _.split('a-b-c', '-', 2);
76166 * // => ['a', 'b']
76167 */
76168 function split(string, separator, limit) {
76169 if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
76170 separator = limit = undefined;
76171 }
76172 limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
76173 if (!limit) {
76174 return [];
76175 }
76176 string = toString(string);
76177 if (string && (
76178 typeof separator == 'string' ||
76179 (separator != null && !isRegExp(separator))
76180 )) {
76181 separator = baseToString(separator);
76182 if (!separator && hasUnicode(string)) {
76183 return castSlice(stringToArray(string), 0, limit);
76184 }
76185 }
76186 return string.split(separator, limit);
76187 }
76188
76189 /**
76190 * Converts `string` to
76191 * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
76192 *
76193 * @static
76194 * @memberOf _
76195 * @since 3.1.0
76196 * @category String
76197 * @param {string} [string=''] The string to convert.
76198 * @returns {string} Returns the start cased string.
76199 * @example
76200 *
76201 * _.startCase('--foo-bar--');
76202 * // => 'Foo Bar'
76203 *
76204 * _.startCase('fooBar');
76205 * // => 'Foo Bar'
76206 *
76207 * _.startCase('__FOO_BAR__');
76208 * // => 'FOO BAR'
76209 */
76210 var startCase = createCompounder(function(result, word, index) {
76211 return result + (index ? ' ' : '') + upperFirst(word);
76212 });
76213
76214 /**
76215 * Checks if `string` starts with the given target string.
76216 *
76217 * @static
76218 * @memberOf _
76219 * @since 3.0.0
76220 * @category String
76221 * @param {string} [string=''] The string to inspect.
76222 * @param {string} [target] The string to search for.
76223 * @param {number} [position=0] The position to search from.
76224 * @returns {boolean} Returns `true` if `string` starts with `target`,
76225 * else `false`.
76226 * @example
76227 *
76228 * _.startsWith('abc', 'a');
76229 * // => true
76230 *
76231 * _.startsWith('abc', 'b');
76232 * // => false
76233 *
76234 * _.startsWith('abc', 'b', 1);
76235 * // => true
76236 */
76237 function startsWith(string, target, position) {
76238 string = toString(string);
76239 position = position == null
76240 ? 0
76241 : baseClamp(toInteger(position), 0, string.length);
76242
76243 target = baseToString(target);
76244 return string.slice(position, position + target.length) == target;
76245 }
76246
76247 /**
76248 * Creates a compiled template function that can interpolate data properties
76249 * in "interpolate" delimiters, HTML-escape interpolated data properties in
76250 * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
76251 * properties may be accessed as free variables in the template. If a setting
76252 * object is given, it takes precedence over `_.templateSettings` values.
76253 *
76254 * **Note:** In the development build `_.template` utilizes
76255 * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
76256 * for easier debugging.
76257 *
76258 * For more information on precompiling templates see
76259 * [lodash's custom builds documentation](https://lodash.com/custom-builds).
76260 *
76261 * For more information on Chrome extension sandboxes see
76262 * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
76263 *
76264 * @static
76265 * @since 0.1.0
76266 * @memberOf _
76267 * @category String
76268 * @param {string} [string=''] The template string.
76269 * @param {Object} [options={}] The options object.
76270 * @param {RegExp} [options.escape=_.templateSettings.escape]
76271 * The HTML "escape" delimiter.
76272 * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
76273 * The "evaluate" delimiter.
76274 * @param {Object} [options.imports=_.templateSettings.imports]
76275 * An object to import into the template as free variables.
76276 * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
76277 * The "interpolate" delimiter.
76278 * @param {string} [options.sourceURL='lodash.templateSources[n]']
76279 * The sourceURL of the compiled template.
76280 * @param {string} [options.variable='obj']
76281 * The data object variable name.
76282 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76283 * @returns {Function} Returns the compiled template function.
76284 * @example
76285 *
76286 * // Use the "interpolate" delimiter to create a compiled template.
76287 * var compiled = _.template('hello <%= user %>!');
76288 * compiled({ 'user': 'fred' });
76289 * // => 'hello fred!'
76290 *
76291 * // Use the HTML "escape" delimiter to escape data property values.
76292 * var compiled = _.template('<b><%- value %></b>');
76293 * compiled({ 'value': '<script>' });
76294 * // => '<b>&lt;script&gt;</b>'
76295 *
76296 * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
76297 * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
76298 * compiled({ 'users': ['fred', 'barney'] });
76299 * // => '<li>fred</li><li>barney</li>'
76300 *
76301 * // Use the internal `print` function in "evaluate" delimiters.
76302 * var compiled = _.template('<% print("hello " + user); %>!');
76303 * compiled({ 'user': 'barney' });
76304 * // => 'hello barney!'
76305 *
76306 * // Use the ES template literal delimiter as an "interpolate" delimiter.
76307 * // Disable support by replacing the "interpolate" delimiter.
76308 * var compiled = _.template('hello ${ user }!');
76309 * compiled({ 'user': 'pebbles' });
76310 * // => 'hello pebbles!'
76311 *
76312 * // Use backslashes to treat delimiters as plain text.
76313 * var compiled = _.template('<%= "\\<%- value %\\>" %>');
76314 * compiled({ 'value': 'ignored' });
76315 * // => '<%- value %>'
76316 *
76317 * // Use the `imports` option to import `jQuery` as `jq`.
76318 * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
76319 * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
76320 * compiled({ 'users': ['fred', 'barney'] });
76321 * // => '<li>fred</li><li>barney</li>'
76322 *
76323 * // Use the `sourceURL` option to specify a custom sourceURL for the template.
76324 * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
76325 * compiled(data);
76326 * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
76327 *
76328 * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
76329 * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
76330 * compiled.source;
76331 * // => function(data) {
76332 * // var __t, __p = '';
76333 * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
76334 * // return __p;
76335 * // }
76336 *
76337 * // Use custom template delimiters.
76338 * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
76339 * var compiled = _.template('hello {{ user }}!');
76340 * compiled({ 'user': 'mustache' });
76341 * // => 'hello mustache!'
76342 *
76343 * // Use the `source` property to inline compiled templates for meaningful
76344 * // line numbers in error messages and stack traces.
76345 * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
76346 * var JST = {\
76347 * "main": ' + _.template(mainText).source + '\
76348 * };\
76349 * ');
76350 */
76351 function template(string, options, guard) {
76352 // Based on John Resig's `tmpl` implementation
76353 // (http://ejohn.org/blog/javascript-micro-templating/)
76354 // and Laura Doktorova's doT.js (https://github.com/olado/doT).
76355 var settings = lodash.templateSettings;
76356
76357 if (guard && isIterateeCall(string, options, guard)) {
76358 options = undefined;
76359 }
76360 string = toString(string);
76361 options = assignInWith({}, options, settings, customDefaultsAssignIn);
76362
76363 var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
76364 importsKeys = keys(imports),
76365 importsValues = baseValues(imports, importsKeys);
76366
76367 var isEscaping,
76368 isEvaluating,
76369 index = 0,
76370 interpolate = options.interpolate || reNoMatch,
76371 source = "__p += '";
76372
76373 // Compile the regexp to match each delimiter.
76374 var reDelimiters = RegExp(
76375 (options.escape || reNoMatch).source + '|' +
76376 interpolate.source + '|' +
76377 (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
76378 (options.evaluate || reNoMatch).source + '|$'
76379 , 'g');
76380
76381 // Use a sourceURL for easier debugging.
76382 // The sourceURL gets injected into the source that's eval-ed, so be careful
76383 // with lookup (in case of e.g. prototype pollution), and strip newlines if any.
76384 // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.
76385 var sourceURL = '//# sourceURL=' +
76386 (hasOwnProperty.call(options, 'sourceURL')
76387 ? (options.sourceURL + '').replace(/[\r\n]/g, ' ')
76388 : ('lodash.templateSources[' + (++templateCounter) + ']')
76389 ) + '\n';
76390
76391 string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
76392 interpolateValue || (interpolateValue = esTemplateValue);
76393
76394 // Escape characters that can't be included in string literals.
76395 source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
76396
76397 // Replace delimiters with snippets.
76398 if (escapeValue) {
76399 isEscaping = true;
76400 source += "' +\n__e(" + escapeValue + ") +\n'";
76401 }
76402 if (evaluateValue) {
76403 isEvaluating = true;
76404 source += "';\n" + evaluateValue + ";\n__p += '";
76405 }
76406 if (interpolateValue) {
76407 source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
76408 }
76409 index = offset + match.length;
76410
76411 // The JS engine embedded in Adobe products needs `match` returned in
76412 // order to produce the correct `offset` value.
76413 return match;
76414 });
76415
76416 source += "';\n";
76417
76418 // If `variable` is not specified wrap a with-statement around the generated
76419 // code to add the data object to the top of the scope chain.
76420 // Like with sourceURL, we take care to not check the option's prototype,
76421 // as this configuration is a code injection vector.
76422 var variable = hasOwnProperty.call(options, 'variable') && options.variable;
76423 if (!variable) {
76424 source = 'with (obj) {\n' + source + '\n}\n';
76425 }
76426 // Cleanup code by stripping empty strings.
76427 source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
76428 .replace(reEmptyStringMiddle, '$1')
76429 .replace(reEmptyStringTrailing, '$1;');
76430
76431 // Frame code as the function body.
76432 source = 'function(' + (variable || 'obj') + ') {\n' +
76433 (variable
76434 ? ''
76435 : 'obj || (obj = {});\n'
76436 ) +
76437 "var __t, __p = ''" +
76438 (isEscaping
76439 ? ', __e = _.escape'
76440 : ''
76441 ) +
76442 (isEvaluating
76443 ? ', __j = Array.prototype.join;\n' +
76444 "function print() { __p += __j.call(arguments, '') }\n"
76445 : ';\n'
76446 ) +
76447 source +
76448 'return __p\n}';
76449
76450 var result = attempt(function() {
76451 return Function(importsKeys, sourceURL + 'return ' + source)
76452 .apply(undefined, importsValues);
76453 });
76454
76455 // Provide the compiled function's source by its `toString` method or
76456 // the `source` property as a convenience for inlining compiled templates.
76457 result.source = source;
76458 if (isError(result)) {
76459 throw result;
76460 }
76461 return result;
76462 }
76463
76464 /**
76465 * Converts `string`, as a whole, to lower case just like
76466 * [String#toLowerCase](https://mdn.io/toLowerCase).
76467 *
76468 * @static
76469 * @memberOf _
76470 * @since 4.0.0
76471 * @category String
76472 * @param {string} [string=''] The string to convert.
76473 * @returns {string} Returns the lower cased string.
76474 * @example
76475 *
76476 * _.toLower('--Foo-Bar--');
76477 * // => '--foo-bar--'
76478 *
76479 * _.toLower('fooBar');
76480 * // => 'foobar'
76481 *
76482 * _.toLower('__FOO_BAR__');
76483 * // => '__foo_bar__'
76484 */
76485 function toLower(value) {
76486 return toString(value).toLowerCase();
76487 }
76488
76489 /**
76490 * Converts `string`, as a whole, to upper case just like
76491 * [String#toUpperCase](https://mdn.io/toUpperCase).
76492 *
76493 * @static
76494 * @memberOf _
76495 * @since 4.0.0
76496 * @category String
76497 * @param {string} [string=''] The string to convert.
76498 * @returns {string} Returns the upper cased string.
76499 * @example
76500 *
76501 * _.toUpper('--foo-bar--');
76502 * // => '--FOO-BAR--'
76503 *
76504 * _.toUpper('fooBar');
76505 * // => 'FOOBAR'
76506 *
76507 * _.toUpper('__foo_bar__');
76508 * // => '__FOO_BAR__'
76509 */
76510 function toUpper(value) {
76511 return toString(value).toUpperCase();
76512 }
76513
76514 /**
76515 * Removes leading and trailing whitespace or specified characters from `string`.
76516 *
76517 * @static
76518 * @memberOf _
76519 * @since 3.0.0
76520 * @category String
76521 * @param {string} [string=''] The string to trim.
76522 * @param {string} [chars=whitespace] The characters to trim.
76523 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76524 * @returns {string} Returns the trimmed string.
76525 * @example
76526 *
76527 * _.trim(' abc ');
76528 * // => 'abc'
76529 *
76530 * _.trim('-_-abc-_-', '_-');
76531 * // => 'abc'
76532 *
76533 * _.map([' foo ', ' bar '], _.trim);
76534 * // => ['foo', 'bar']
76535 */
76536 function trim(string, chars, guard) {
76537 string = toString(string);
76538 if (string && (guard || chars === undefined)) {
76539 return string.replace(reTrim, '');
76540 }
76541 if (!string || !(chars = baseToString(chars))) {
76542 return string;
76543 }
76544 var strSymbols = stringToArray(string),
76545 chrSymbols = stringToArray(chars),
76546 start = charsStartIndex(strSymbols, chrSymbols),
76547 end = charsEndIndex(strSymbols, chrSymbols) + 1;
76548
76549 return castSlice(strSymbols, start, end).join('');
76550 }
76551
76552 /**
76553 * Removes trailing whitespace or specified characters from `string`.
76554 *
76555 * @static
76556 * @memberOf _
76557 * @since 4.0.0
76558 * @category String
76559 * @param {string} [string=''] The string to trim.
76560 * @param {string} [chars=whitespace] The characters to trim.
76561 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76562 * @returns {string} Returns the trimmed string.
76563 * @example
76564 *
76565 * _.trimEnd(' abc ');
76566 * // => ' abc'
76567 *
76568 * _.trimEnd('-_-abc-_-', '_-');
76569 * // => '-_-abc'
76570 */
76571 function trimEnd(string, chars, guard) {
76572 string = toString(string);
76573 if (string && (guard || chars === undefined)) {
76574 return string.replace(reTrimEnd, '');
76575 }
76576 if (!string || !(chars = baseToString(chars))) {
76577 return string;
76578 }
76579 var strSymbols = stringToArray(string),
76580 end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
76581
76582 return castSlice(strSymbols, 0, end).join('');
76583 }
76584
76585 /**
76586 * Removes leading whitespace or specified characters from `string`.
76587 *
76588 * @static
76589 * @memberOf _
76590 * @since 4.0.0
76591 * @category String
76592 * @param {string} [string=''] The string to trim.
76593 * @param {string} [chars=whitespace] The characters to trim.
76594 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76595 * @returns {string} Returns the trimmed string.
76596 * @example
76597 *
76598 * _.trimStart(' abc ');
76599 * // => 'abc '
76600 *
76601 * _.trimStart('-_-abc-_-', '_-');
76602 * // => 'abc-_-'
76603 */
76604 function trimStart(string, chars, guard) {
76605 string = toString(string);
76606 if (string && (guard || chars === undefined)) {
76607 return string.replace(reTrimStart, '');
76608 }
76609 if (!string || !(chars = baseToString(chars))) {
76610 return string;
76611 }
76612 var strSymbols = stringToArray(string),
76613 start = charsStartIndex(strSymbols, stringToArray(chars));
76614
76615 return castSlice(strSymbols, start).join('');
76616 }
76617
76618 /**
76619 * Truncates `string` if it's longer than the given maximum string length.
76620 * The last characters of the truncated string are replaced with the omission
76621 * string which defaults to "...".
76622 *
76623 * @static
76624 * @memberOf _
76625 * @since 4.0.0
76626 * @category String
76627 * @param {string} [string=''] The string to truncate.
76628 * @param {Object} [options={}] The options object.
76629 * @param {number} [options.length=30] The maximum string length.
76630 * @param {string} [options.omission='...'] The string to indicate text is omitted.
76631 * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
76632 * @returns {string} Returns the truncated string.
76633 * @example
76634 *
76635 * _.truncate('hi-diddly-ho there, neighborino');
76636 * // => 'hi-diddly-ho there, neighbo...'
76637 *
76638 * _.truncate('hi-diddly-ho there, neighborino', {
76639 * 'length': 24,
76640 * 'separator': ' '
76641 * });
76642 * // => 'hi-diddly-ho there,...'
76643 *
76644 * _.truncate('hi-diddly-ho there, neighborino', {
76645 * 'length': 24,
76646 * 'separator': /,? +/
76647 * });
76648 * // => 'hi-diddly-ho there...'
76649 *
76650 * _.truncate('hi-diddly-ho there, neighborino', {
76651 * 'omission': ' [...]'
76652 * });
76653 * // => 'hi-diddly-ho there, neig [...]'
76654 */
76655 function truncate(string, options) {
76656 var length = DEFAULT_TRUNC_LENGTH,
76657 omission = DEFAULT_TRUNC_OMISSION;
76658
76659 if (isObject(options)) {
76660 var separator = 'separator' in options ? options.separator : separator;
76661 length = 'length' in options ? toInteger(options.length) : length;
76662 omission = 'omission' in options ? baseToString(options.omission) : omission;
76663 }
76664 string = toString(string);
76665
76666 var strLength = string.length;
76667 if (hasUnicode(string)) {
76668 var strSymbols = stringToArray(string);
76669 strLength = strSymbols.length;
76670 }
76671 if (length >= strLength) {
76672 return string;
76673 }
76674 var end = length - stringSize(omission);
76675 if (end < 1) {
76676 return omission;
76677 }
76678 var result = strSymbols
76679 ? castSlice(strSymbols, 0, end).join('')
76680 : string.slice(0, end);
76681
76682 if (separator === undefined) {
76683 return result + omission;
76684 }
76685 if (strSymbols) {
76686 end += (result.length - end);
76687 }
76688 if (isRegExp(separator)) {
76689 if (string.slice(end).search(separator)) {
76690 var match,
76691 substring = result;
76692
76693 if (!separator.global) {
76694 separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
76695 }
76696 separator.lastIndex = 0;
76697 while ((match = separator.exec(substring))) {
76698 var newEnd = match.index;
76699 }
76700 result = result.slice(0, newEnd === undefined ? end : newEnd);
76701 }
76702 } else if (string.indexOf(baseToString(separator), end) != end) {
76703 var index = result.lastIndexOf(separator);
76704 if (index > -1) {
76705 result = result.slice(0, index);
76706 }
76707 }
76708 return result + omission;
76709 }
76710
76711 /**
76712 * The inverse of `_.escape`; this method converts the HTML entities
76713 * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
76714 * their corresponding characters.
76715 *
76716 * **Note:** No other HTML entities are unescaped. To unescape additional
76717 * HTML entities use a third-party library like [_he_](https://mths.be/he).
76718 *
76719 * @static
76720 * @memberOf _
76721 * @since 0.6.0
76722 * @category String
76723 * @param {string} [string=''] The string to unescape.
76724 * @returns {string} Returns the unescaped string.
76725 * @example
76726 *
76727 * _.unescape('fred, barney, &amp; pebbles');
76728 * // => 'fred, barney, & pebbles'
76729 */
76730 function unescape(string) {
76731 string = toString(string);
76732 return (string && reHasEscapedHtml.test(string))
76733 ? string.replace(reEscapedHtml, unescapeHtmlChar)
76734 : string;
76735 }
76736
76737 /**
76738 * Converts `string`, as space separated words, to upper case.
76739 *
76740 * @static
76741 * @memberOf _
76742 * @since 4.0.0
76743 * @category String
76744 * @param {string} [string=''] The string to convert.
76745 * @returns {string} Returns the upper cased string.
76746 * @example
76747 *
76748 * _.upperCase('--foo-bar');
76749 * // => 'FOO BAR'
76750 *
76751 * _.upperCase('fooBar');
76752 * // => 'FOO BAR'
76753 *
76754 * _.upperCase('__foo_bar__');
76755 * // => 'FOO BAR'
76756 */
76757 var upperCase = createCompounder(function(result, word, index) {
76758 return result + (index ? ' ' : '') + word.toUpperCase();
76759 });
76760
76761 /**
76762 * Converts the first character of `string` to upper case.
76763 *
76764 * @static
76765 * @memberOf _
76766 * @since 4.0.0
76767 * @category String
76768 * @param {string} [string=''] The string to convert.
76769 * @returns {string} Returns the converted string.
76770 * @example
76771 *
76772 * _.upperFirst('fred');
76773 * // => 'Fred'
76774 *
76775 * _.upperFirst('FRED');
76776 * // => 'FRED'
76777 */
76778 var upperFirst = createCaseFirst('toUpperCase');
76779
76780 /**
76781 * Splits `string` into an array of its words.
76782 *
76783 * @static
76784 * @memberOf _
76785 * @since 3.0.0
76786 * @category String
76787 * @param {string} [string=''] The string to inspect.
76788 * @param {RegExp|string} [pattern] The pattern to match words.
76789 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
76790 * @returns {Array} Returns the words of `string`.
76791 * @example
76792 *
76793 * _.words('fred, barney, & pebbles');
76794 * // => ['fred', 'barney', 'pebbles']
76795 *
76796 * _.words('fred, barney, & pebbles', /[^, ]+/g);
76797 * // => ['fred', 'barney', '&', 'pebbles']
76798 */
76799 function words(string, pattern, guard) {
76800 string = toString(string);
76801 pattern = guard ? undefined : pattern;
76802
76803 if (pattern === undefined) {
76804 return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
76805 }
76806 return string.match(pattern) || [];
76807 }
76808
76809 /*------------------------------------------------------------------------*/
76810
76811 /**
76812 * Attempts to invoke `func`, returning either the result or the caught error
76813 * object. Any additional arguments are provided to `func` when it's invoked.
76814 *
76815 * @static
76816 * @memberOf _
76817 * @since 3.0.0
76818 * @category Util
76819 * @param {Function} func The function to attempt.
76820 * @param {...*} [args] The arguments to invoke `func` with.
76821 * @returns {*} Returns the `func` result or error object.
76822 * @example
76823 *
76824 * // Avoid throwing errors for invalid selectors.
76825 * var elements = _.attempt(function(selector) {
76826 * return document.querySelectorAll(selector);
76827 * }, '>_>');
76828 *
76829 * if (_.isError(elements)) {
76830 * elements = [];
76831 * }
76832 */
76833 var attempt = baseRest(function(func, args) {
76834 try {
76835 return apply(func, undefined, args);
76836 } catch (e) {
76837 return isError(e) ? e : new Error(e);
76838 }
76839 });
76840
76841 /**
76842 * Binds methods of an object to the object itself, overwriting the existing
76843 * method.
76844 *
76845 * **Note:** This method doesn't set the "length" property of bound functions.
76846 *
76847 * @static
76848 * @since 0.1.0
76849 * @memberOf _
76850 * @category Util
76851 * @param {Object} object The object to bind and assign the bound methods to.
76852 * @param {...(string|string[])} methodNames The object method names to bind.
76853 * @returns {Object} Returns `object`.
76854 * @example
76855 *
76856 * var view = {
76857 * 'label': 'docs',
76858 * 'click': function() {
76859 * console.log('clicked ' + this.label);
76860 * }
76861 * };
76862 *
76863 * _.bindAll(view, ['click']);
76864 * jQuery(element).on('click', view.click);
76865 * // => Logs 'clicked docs' when clicked.
76866 */
76867 var bindAll = flatRest(function(object, methodNames) {
76868 arrayEach(methodNames, function(key) {
76869 key = toKey(key);
76870 baseAssignValue(object, key, bind(object[key], object));
76871 });
76872 return object;
76873 });
76874
76875 /**
76876 * Creates a function that iterates over `pairs` and invokes the corresponding
76877 * function of the first predicate to return truthy. The predicate-function
76878 * pairs are invoked with the `this` binding and arguments of the created
76879 * function.
76880 *
76881 * @static
76882 * @memberOf _
76883 * @since 4.0.0
76884 * @category Util
76885 * @param {Array} pairs The predicate-function pairs.
76886 * @returns {Function} Returns the new composite function.
76887 * @example
76888 *
76889 * var func = _.cond([
76890 * [_.matches({ 'a': 1 }), _.constant('matches A')],
76891 * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
76892 * [_.stubTrue, _.constant('no match')]
76893 * ]);
76894 *
76895 * func({ 'a': 1, 'b': 2 });
76896 * // => 'matches A'
76897 *
76898 * func({ 'a': 0, 'b': 1 });
76899 * // => 'matches B'
76900 *
76901 * func({ 'a': '1', 'b': '2' });
76902 * // => 'no match'
76903 */
76904 function cond(pairs) {
76905 var length = pairs == null ? 0 : pairs.length,
76906 toIteratee = getIteratee();
76907
76908 pairs = !length ? [] : arrayMap(pairs, function(pair) {
76909 if (typeof pair[1] != 'function') {
76910 throw new TypeError(FUNC_ERROR_TEXT);
76911 }
76912 return [toIteratee(pair[0]), pair[1]];
76913 });
76914
76915 return baseRest(function(args) {
76916 var index = -1;
76917 while (++index < length) {
76918 var pair = pairs[index];
76919 if (apply(pair[0], this, args)) {
76920 return apply(pair[1], this, args);
76921 }
76922 }
76923 });
76924 }
76925
76926 /**
76927 * Creates a function that invokes the predicate properties of `source` with
76928 * the corresponding property values of a given object, returning `true` if
76929 * all predicates return truthy, else `false`.
76930 *
76931 * **Note:** The created function is equivalent to `_.conformsTo` with
76932 * `source` partially applied.
76933 *
76934 * @static
76935 * @memberOf _
76936 * @since 4.0.0
76937 * @category Util
76938 * @param {Object} source The object of property predicates to conform to.
76939 * @returns {Function} Returns the new spec function.
76940 * @example
76941 *
76942 * var objects = [
76943 * { 'a': 2, 'b': 1 },
76944 * { 'a': 1, 'b': 2 }
76945 * ];
76946 *
76947 * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
76948 * // => [{ 'a': 1, 'b': 2 }]
76949 */
76950 function conforms(source) {
76951 return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
76952 }
76953
76954 /**
76955 * Creates a function that returns `value`.
76956 *
76957 * @static
76958 * @memberOf _
76959 * @since 2.4.0
76960 * @category Util
76961 * @param {*} value The value to return from the new function.
76962 * @returns {Function} Returns the new constant function.
76963 * @example
76964 *
76965 * var objects = _.times(2, _.constant({ 'a': 1 }));
76966 *
76967 * console.log(objects);
76968 * // => [{ 'a': 1 }, { 'a': 1 }]
76969 *
76970 * console.log(objects[0] === objects[1]);
76971 * // => true
76972 */
76973 function constant(value) {
76974 return function() {
76975 return value;
76976 };
76977 }
76978
76979 /**
76980 * Checks `value` to determine whether a default value should be returned in
76981 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
76982 * or `undefined`.
76983 *
76984 * @static
76985 * @memberOf _
76986 * @since 4.14.0
76987 * @category Util
76988 * @param {*} value The value to check.
76989 * @param {*} defaultValue The default value.
76990 * @returns {*} Returns the resolved value.
76991 * @example
76992 *
76993 * _.defaultTo(1, 10);
76994 * // => 1
76995 *
76996 * _.defaultTo(undefined, 10);
76997 * // => 10
76998 */
76999 function defaultTo(value, defaultValue) {
77000 return (value == null || value !== value) ? defaultValue : value;
77001 }
77002
77003 /**
77004 * Creates a function that returns the result of invoking the given functions
77005 * with the `this` binding of the created function, where each successive
77006 * invocation is supplied the return value of the previous.
77007 *
77008 * @static
77009 * @memberOf _
77010 * @since 3.0.0
77011 * @category Util
77012 * @param {...(Function|Function[])} [funcs] The functions to invoke.
77013 * @returns {Function} Returns the new composite function.
77014 * @see _.flowRight
77015 * @example
77016 *
77017 * function square(n) {
77018 * return n * n;
77019 * }
77020 *
77021 * var addSquare = _.flow([_.add, square]);
77022 * addSquare(1, 2);
77023 * // => 9
77024 */
77025 var flow = createFlow();
77026
77027 /**
77028 * This method is like `_.flow` except that it creates a function that
77029 * invokes the given functions from right to left.
77030 *
77031 * @static
77032 * @since 3.0.0
77033 * @memberOf _
77034 * @category Util
77035 * @param {...(Function|Function[])} [funcs] The functions to invoke.
77036 * @returns {Function} Returns the new composite function.
77037 * @see _.flow
77038 * @example
77039 *
77040 * function square(n) {
77041 * return n * n;
77042 * }
77043 *
77044 * var addSquare = _.flowRight([square, _.add]);
77045 * addSquare(1, 2);
77046 * // => 9
77047 */
77048 var flowRight = createFlow(true);
77049
77050 /**
77051 * This method returns the first argument it receives.
77052 *
77053 * @static
77054 * @since 0.1.0
77055 * @memberOf _
77056 * @category Util
77057 * @param {*} value Any value.
77058 * @returns {*} Returns `value`.
77059 * @example
77060 *
77061 * var object = { 'a': 1 };
77062 *
77063 * console.log(_.identity(object) === object);
77064 * // => true
77065 */
77066 function identity(value) {
77067 return value;
77068 }
77069
77070 /**
77071 * Creates a function that invokes `func` with the arguments of the created
77072 * function. If `func` is a property name, the created function returns the
77073 * property value for a given element. If `func` is an array or object, the
77074 * created function returns `true` for elements that contain the equivalent
77075 * source properties, otherwise it returns `false`.
77076 *
77077 * @static
77078 * @since 4.0.0
77079 * @memberOf _
77080 * @category Util
77081 * @param {*} [func=_.identity] The value to convert to a callback.
77082 * @returns {Function} Returns the callback.
77083 * @example
77084 *
77085 * var users = [
77086 * { 'user': 'barney', 'age': 36, 'active': true },
77087 * { 'user': 'fred', 'age': 40, 'active': false }
77088 * ];
77089 *
77090 * // The `_.matches` iteratee shorthand.
77091 * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
77092 * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
77093 *
77094 * // The `_.matchesProperty` iteratee shorthand.
77095 * _.filter(users, _.iteratee(['user', 'fred']));
77096 * // => [{ 'user': 'fred', 'age': 40 }]
77097 *
77098 * // The `_.property` iteratee shorthand.
77099 * _.map(users, _.iteratee('user'));
77100 * // => ['barney', 'fred']
77101 *
77102 * // Create custom iteratee shorthands.
77103 * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
77104 * return !_.isRegExp(func) ? iteratee(func) : function(string) {
77105 * return func.test(string);
77106 * };
77107 * });
77108 *
77109 * _.filter(['abc', 'def'], /ef/);
77110 * // => ['def']
77111 */
77112 function iteratee(func) {
77113 return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
77114 }
77115
77116 /**
77117 * Creates a function that performs a partial deep comparison between a given
77118 * object and `source`, returning `true` if the given object has equivalent
77119 * property values, else `false`.
77120 *
77121 * **Note:** The created function is equivalent to `_.isMatch` with `source`
77122 * partially applied.
77123 *
77124 * Partial comparisons will match empty array and empty object `source`
77125 * values against any array or object value, respectively. See `_.isEqual`
77126 * for a list of supported value comparisons.
77127 *
77128 * @static
77129 * @memberOf _
77130 * @since 3.0.0
77131 * @category Util
77132 * @param {Object} source The object of property values to match.
77133 * @returns {Function} Returns the new spec function.
77134 * @example
77135 *
77136 * var objects = [
77137 * { 'a': 1, 'b': 2, 'c': 3 },
77138 * { 'a': 4, 'b': 5, 'c': 6 }
77139 * ];
77140 *
77141 * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
77142 * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
77143 */
77144 function matches(source) {
77145 return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
77146 }
77147
77148 /**
77149 * Creates a function that performs a partial deep comparison between the
77150 * value at `path` of a given object to `srcValue`, returning `true` if the
77151 * object value is equivalent, else `false`.
77152 *
77153 * **Note:** Partial comparisons will match empty array and empty object
77154 * `srcValue` values against any array or object value, respectively. See
77155 * `_.isEqual` for a list of supported value comparisons.
77156 *
77157 * @static
77158 * @memberOf _
77159 * @since 3.2.0
77160 * @category Util
77161 * @param {Array|string} path The path of the property to get.
77162 * @param {*} srcValue The value to match.
77163 * @returns {Function} Returns the new spec function.
77164 * @example
77165 *
77166 * var objects = [
77167 * { 'a': 1, 'b': 2, 'c': 3 },
77168 * { 'a': 4, 'b': 5, 'c': 6 }
77169 * ];
77170 *
77171 * _.find(objects, _.matchesProperty('a', 4));
77172 * // => { 'a': 4, 'b': 5, 'c': 6 }
77173 */
77174 function matchesProperty(path, srcValue) {
77175 return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
77176 }
77177
77178 /**
77179 * Creates a function that invokes the method at `path` of a given object.
77180 * Any additional arguments are provided to the invoked method.
77181 *
77182 * @static
77183 * @memberOf _
77184 * @since 3.7.0
77185 * @category Util
77186 * @param {Array|string} path The path of the method to invoke.
77187 * @param {...*} [args] The arguments to invoke the method with.
77188 * @returns {Function} Returns the new invoker function.
77189 * @example
77190 *
77191 * var objects = [
77192 * { 'a': { 'b': _.constant(2) } },
77193 * { 'a': { 'b': _.constant(1) } }
77194 * ];
77195 *
77196 * _.map(objects, _.method('a.b'));
77197 * // => [2, 1]
77198 *
77199 * _.map(objects, _.method(['a', 'b']));
77200 * // => [2, 1]
77201 */
77202 var method = baseRest(function(path, args) {
77203 return function(object) {
77204 return baseInvoke(object, path, args);
77205 };
77206 });
77207
77208 /**
77209 * The opposite of `_.method`; this method creates a function that invokes
77210 * the method at a given path of `object`. Any additional arguments are
77211 * provided to the invoked method.
77212 *
77213 * @static
77214 * @memberOf _
77215 * @since 3.7.0
77216 * @category Util
77217 * @param {Object} object The object to query.
77218 * @param {...*} [args] The arguments to invoke the method with.
77219 * @returns {Function} Returns the new invoker function.
77220 * @example
77221 *
77222 * var array = _.times(3, _.constant),
77223 * object = { 'a': array, 'b': array, 'c': array };
77224 *
77225 * _.map(['a[2]', 'c[0]'], _.methodOf(object));
77226 * // => [2, 0]
77227 *
77228 * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
77229 * // => [2, 0]
77230 */
77231 var methodOf = baseRest(function(object, args) {
77232 return function(path) {
77233 return baseInvoke(object, path, args);
77234 };
77235 });
77236
77237 /**
77238 * Adds all own enumerable string keyed function properties of a source
77239 * object to the destination object. If `object` is a function, then methods
77240 * are added to its prototype as well.
77241 *
77242 * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
77243 * avoid conflicts caused by modifying the original.
77244 *
77245 * @static
77246 * @since 0.1.0
77247 * @memberOf _
77248 * @category Util
77249 * @param {Function|Object} [object=lodash] The destination object.
77250 * @param {Object} source The object of functions to add.
77251 * @param {Object} [options={}] The options object.
77252 * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
77253 * @returns {Function|Object} Returns `object`.
77254 * @example
77255 *
77256 * function vowels(string) {
77257 * return _.filter(string, function(v) {
77258 * return /[aeiou]/i.test(v);
77259 * });
77260 * }
77261 *
77262 * _.mixin({ 'vowels': vowels });
77263 * _.vowels('fred');
77264 * // => ['e']
77265 *
77266 * _('fred').vowels().value();
77267 * // => ['e']
77268 *
77269 * _.mixin({ 'vowels': vowels }, { 'chain': false });
77270 * _('fred').vowels();
77271 * // => ['e']
77272 */
77273 function mixin(object, source, options) {
77274 var props = keys(source),
77275 methodNames = baseFunctions(source, props);
77276
77277 if (options == null &&
77278 !(isObject(source) && (methodNames.length || !props.length))) {
77279 options = source;
77280 source = object;
77281 object = this;
77282 methodNames = baseFunctions(source, keys(source));
77283 }
77284 var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
77285 isFunc = isFunction(object);
77286
77287 arrayEach(methodNames, function(methodName) {
77288 var func = source[methodName];
77289 object[methodName] = func;
77290 if (isFunc) {
77291 object.prototype[methodName] = function() {
77292 var chainAll = this.__chain__;
77293 if (chain || chainAll) {
77294 var result = object(this.__wrapped__),
77295 actions = result.__actions__ = copyArray(this.__actions__);
77296
77297 actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
77298 result.__chain__ = chainAll;
77299 return result;
77300 }
77301 return func.apply(object, arrayPush([this.value()], arguments));
77302 };
77303 }
77304 });
77305
77306 return object;
77307 }
77308
77309 /**
77310 * Reverts the `_` variable to its previous value and returns a reference to
77311 * the `lodash` function.
77312 *
77313 * @static
77314 * @since 0.1.0
77315 * @memberOf _
77316 * @category Util
77317 * @returns {Function} Returns the `lodash` function.
77318 * @example
77319 *
77320 * var lodash = _.noConflict();
77321 */
77322 function noConflict() {
77323 if (root._ === this) {
77324 root._ = oldDash;
77325 }
77326 return this;
77327 }
77328
77329 /**
77330 * This method returns `undefined`.
77331 *
77332 * @static
77333 * @memberOf _
77334 * @since 2.3.0
77335 * @category Util
77336 * @example
77337 *
77338 * _.times(2, _.noop);
77339 * // => [undefined, undefined]
77340 */
77341 function noop() {
77342 // No operation performed.
77343 }
77344
77345 /**
77346 * Creates a function that gets the argument at index `n`. If `n` is negative,
77347 * the nth argument from the end is returned.
77348 *
77349 * @static
77350 * @memberOf _
77351 * @since 4.0.0
77352 * @category Util
77353 * @param {number} [n=0] The index of the argument to return.
77354 * @returns {Function} Returns the new pass-thru function.
77355 * @example
77356 *
77357 * var func = _.nthArg(1);
77358 * func('a', 'b', 'c', 'd');
77359 * // => 'b'
77360 *
77361 * var func = _.nthArg(-2);
77362 * func('a', 'b', 'c', 'd');
77363 * // => 'c'
77364 */
77365 function nthArg(n) {
77366 n = toInteger(n);
77367 return baseRest(function(args) {
77368 return baseNth(args, n);
77369 });
77370 }
77371
77372 /**
77373 * Creates a function that invokes `iteratees` with the arguments it receives
77374 * and returns their results.
77375 *
77376 * @static
77377 * @memberOf _
77378 * @since 4.0.0
77379 * @category Util
77380 * @param {...(Function|Function[])} [iteratees=[_.identity]]
77381 * The iteratees to invoke.
77382 * @returns {Function} Returns the new function.
77383 * @example
77384 *
77385 * var func = _.over([Math.max, Math.min]);
77386 *
77387 * func(1, 2, 3, 4);
77388 * // => [4, 1]
77389 */
77390 var over = createOver(arrayMap);
77391
77392 /**
77393 * Creates a function that checks if **all** of the `predicates` return
77394 * truthy when invoked with the arguments it receives.
77395 *
77396 * @static
77397 * @memberOf _
77398 * @since 4.0.0
77399 * @category Util
77400 * @param {...(Function|Function[])} [predicates=[_.identity]]
77401 * The predicates to check.
77402 * @returns {Function} Returns the new function.
77403 * @example
77404 *
77405 * var func = _.overEvery([Boolean, isFinite]);
77406 *
77407 * func('1');
77408 * // => true
77409 *
77410 * func(null);
77411 * // => false
77412 *
77413 * func(NaN);
77414 * // => false
77415 */
77416 var overEvery = createOver(arrayEvery);
77417
77418 /**
77419 * Creates a function that checks if **any** of the `predicates` return
77420 * truthy when invoked with the arguments it receives.
77421 *
77422 * @static
77423 * @memberOf _
77424 * @since 4.0.0
77425 * @category Util
77426 * @param {...(Function|Function[])} [predicates=[_.identity]]
77427 * The predicates to check.
77428 * @returns {Function} Returns the new function.
77429 * @example
77430 *
77431 * var func = _.overSome([Boolean, isFinite]);
77432 *
77433 * func('1');
77434 * // => true
77435 *
77436 * func(null);
77437 * // => true
77438 *
77439 * func(NaN);
77440 * // => false
77441 */
77442 var overSome = createOver(arraySome);
77443
77444 /**
77445 * Creates a function that returns the value at `path` of a given object.
77446 *
77447 * @static
77448 * @memberOf _
77449 * @since 2.4.0
77450 * @category Util
77451 * @param {Array|string} path The path of the property to get.
77452 * @returns {Function} Returns the new accessor function.
77453 * @example
77454 *
77455 * var objects = [
77456 * { 'a': { 'b': 2 } },
77457 * { 'a': { 'b': 1 } }
77458 * ];
77459 *
77460 * _.map(objects, _.property('a.b'));
77461 * // => [2, 1]
77462 *
77463 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
77464 * // => [1, 2]
77465 */
77466 function property(path) {
77467 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
77468 }
77469
77470 /**
77471 * The opposite of `_.property`; this method creates a function that returns
77472 * the value at a given path of `object`.
77473 *
77474 * @static
77475 * @memberOf _
77476 * @since 3.0.0
77477 * @category Util
77478 * @param {Object} object The object to query.
77479 * @returns {Function} Returns the new accessor function.
77480 * @example
77481 *
77482 * var array = [0, 1, 2],
77483 * object = { 'a': array, 'b': array, 'c': array };
77484 *
77485 * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
77486 * // => [2, 0]
77487 *
77488 * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
77489 * // => [2, 0]
77490 */
77491 function propertyOf(object) {
77492 return function(path) {
77493 return object == null ? undefined : baseGet(object, path);
77494 };
77495 }
77496
77497 /**
77498 * Creates an array of numbers (positive and/or negative) progressing from
77499 * `start` up to, but not including, `end`. A step of `-1` is used if a negative
77500 * `start` is specified without an `end` or `step`. If `end` is not specified,
77501 * it's set to `start` with `start` then set to `0`.
77502 *
77503 * **Note:** JavaScript follows the IEEE-754 standard for resolving
77504 * floating-point values which can produce unexpected results.
77505 *
77506 * @static
77507 * @since 0.1.0
77508 * @memberOf _
77509 * @category Util
77510 * @param {number} [start=0] The start of the range.
77511 * @param {number} end The end of the range.
77512 * @param {number} [step=1] The value to increment or decrement by.
77513 * @returns {Array} Returns the range of numbers.
77514 * @see _.inRange, _.rangeRight
77515 * @example
77516 *
77517 * _.range(4);
77518 * // => [0, 1, 2, 3]
77519 *
77520 * _.range(-4);
77521 * // => [0, -1, -2, -3]
77522 *
77523 * _.range(1, 5);
77524 * // => [1, 2, 3, 4]
77525 *
77526 * _.range(0, 20, 5);
77527 * // => [0, 5, 10, 15]
77528 *
77529 * _.range(0, -4, -1);
77530 * // => [0, -1, -2, -3]
77531 *
77532 * _.range(1, 4, 0);
77533 * // => [1, 1, 1]
77534 *
77535 * _.range(0);
77536 * // => []
77537 */
77538 var range = createRange();
77539
77540 /**
77541 * This method is like `_.range` except that it populates values in
77542 * descending order.
77543 *
77544 * @static
77545 * @memberOf _
77546 * @since 4.0.0
77547 * @category Util
77548 * @param {number} [start=0] The start of the range.
77549 * @param {number} end The end of the range.
77550 * @param {number} [step=1] The value to increment or decrement by.
77551 * @returns {Array} Returns the range of numbers.
77552 * @see _.inRange, _.range
77553 * @example
77554 *
77555 * _.rangeRight(4);
77556 * // => [3, 2, 1, 0]
77557 *
77558 * _.rangeRight(-4);
77559 * // => [-3, -2, -1, 0]
77560 *
77561 * _.rangeRight(1, 5);
77562 * // => [4, 3, 2, 1]
77563 *
77564 * _.rangeRight(0, 20, 5);
77565 * // => [15, 10, 5, 0]
77566 *
77567 * _.rangeRight(0, -4, -1);
77568 * // => [-3, -2, -1, 0]
77569 *
77570 * _.rangeRight(1, 4, 0);
77571 * // => [1, 1, 1]
77572 *
77573 * _.rangeRight(0);
77574 * // => []
77575 */
77576 var rangeRight = createRange(true);
77577
77578 /**
77579 * This method returns a new empty array.
77580 *
77581 * @static
77582 * @memberOf _
77583 * @since 4.13.0
77584 * @category Util
77585 * @returns {Array} Returns the new empty array.
77586 * @example
77587 *
77588 * var arrays = _.times(2, _.stubArray);
77589 *
77590 * console.log(arrays);
77591 * // => [[], []]
77592 *
77593 * console.log(arrays[0] === arrays[1]);
77594 * // => false
77595 */
77596 function stubArray() {
77597 return [];
77598 }
77599
77600 /**
77601 * This method returns `false`.
77602 *
77603 * @static
77604 * @memberOf _
77605 * @since 4.13.0
77606 * @category Util
77607 * @returns {boolean} Returns `false`.
77608 * @example
77609 *
77610 * _.times(2, _.stubFalse);
77611 * // => [false, false]
77612 */
77613 function stubFalse() {
77614 return false;
77615 }
77616
77617 /**
77618 * This method returns a new empty object.
77619 *
77620 * @static
77621 * @memberOf _
77622 * @since 4.13.0
77623 * @category Util
77624 * @returns {Object} Returns the new empty object.
77625 * @example
77626 *
77627 * var objects = _.times(2, _.stubObject);
77628 *
77629 * console.log(objects);
77630 * // => [{}, {}]
77631 *
77632 * console.log(objects[0] === objects[1]);
77633 * // => false
77634 */
77635 function stubObject() {
77636 return {};
77637 }
77638
77639 /**
77640 * This method returns an empty string.
77641 *
77642 * @static
77643 * @memberOf _
77644 * @since 4.13.0
77645 * @category Util
77646 * @returns {string} Returns the empty string.
77647 * @example
77648 *
77649 * _.times(2, _.stubString);
77650 * // => ['', '']
77651 */
77652 function stubString() {
77653 return '';
77654 }
77655
77656 /**
77657 * This method returns `true`.
77658 *
77659 * @static
77660 * @memberOf _
77661 * @since 4.13.0
77662 * @category Util
77663 * @returns {boolean} Returns `true`.
77664 * @example
77665 *
77666 * _.times(2, _.stubTrue);
77667 * // => [true, true]
77668 */
77669 function stubTrue() {
77670 return true;
77671 }
77672
77673 /**
77674 * Invokes the iteratee `n` times, returning an array of the results of
77675 * each invocation. The iteratee is invoked with one argument; (index).
77676 *
77677 * @static
77678 * @since 0.1.0
77679 * @memberOf _
77680 * @category Util
77681 * @param {number} n The number of times to invoke `iteratee`.
77682 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
77683 * @returns {Array} Returns the array of results.
77684 * @example
77685 *
77686 * _.times(3, String);
77687 * // => ['0', '1', '2']
77688 *
77689 * _.times(4, _.constant(0));
77690 * // => [0, 0, 0, 0]
77691 */
77692 function times(n, iteratee) {
77693 n = toInteger(n);
77694 if (n < 1 || n > MAX_SAFE_INTEGER) {
77695 return [];
77696 }
77697 var index = MAX_ARRAY_LENGTH,
77698 length = nativeMin(n, MAX_ARRAY_LENGTH);
77699
77700 iteratee = getIteratee(iteratee);
77701 n -= MAX_ARRAY_LENGTH;
77702
77703 var result = baseTimes(length, iteratee);
77704 while (++index < n) {
77705 iteratee(index);
77706 }
77707 return result;
77708 }
77709
77710 /**
77711 * Converts `value` to a property path array.
77712 *
77713 * @static
77714 * @memberOf _
77715 * @since 4.0.0
77716 * @category Util
77717 * @param {*} value The value to convert.
77718 * @returns {Array} Returns the new property path array.
77719 * @example
77720 *
77721 * _.toPath('a.b.c');
77722 * // => ['a', 'b', 'c']
77723 *
77724 * _.toPath('a[0].b.c');
77725 * // => ['a', '0', 'b', 'c']
77726 */
77727 function toPath(value) {
77728 if (isArray(value)) {
77729 return arrayMap(value, toKey);
77730 }
77731 return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
77732 }
77733
77734 /**
77735 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
77736 *
77737 * @static
77738 * @since 0.1.0
77739 * @memberOf _
77740 * @category Util
77741 * @param {string} [prefix=''] The value to prefix the ID with.
77742 * @returns {string} Returns the unique ID.
77743 * @example
77744 *
77745 * _.uniqueId('contact_');
77746 * // => 'contact_104'
77747 *
77748 * _.uniqueId();
77749 * // => '105'
77750 */
77751 function uniqueId(prefix) {
77752 var id = ++idCounter;
77753 return toString(prefix) + id;
77754 }
77755
77756 /*------------------------------------------------------------------------*/
77757
77758 /**
77759 * Adds two numbers.
77760 *
77761 * @static
77762 * @memberOf _
77763 * @since 3.4.0
77764 * @category Math
77765 * @param {number} augend The first number in an addition.
77766 * @param {number} addend The second number in an addition.
77767 * @returns {number} Returns the total.
77768 * @example
77769 *
77770 * _.add(6, 4);
77771 * // => 10
77772 */
77773 var add = createMathOperation(function(augend, addend) {
77774 return augend + addend;
77775 }, 0);
77776
77777 /**
77778 * Computes `number` rounded up to `precision`.
77779 *
77780 * @static
77781 * @memberOf _
77782 * @since 3.10.0
77783 * @category Math
77784 * @param {number} number The number to round up.
77785 * @param {number} [precision=0] The precision to round up to.
77786 * @returns {number} Returns the rounded up number.
77787 * @example
77788 *
77789 * _.ceil(4.006);
77790 * // => 5
77791 *
77792 * _.ceil(6.004, 2);
77793 * // => 6.01
77794 *
77795 * _.ceil(6040, -2);
77796 * // => 6100
77797 */
77798 var ceil = createRound('ceil');
77799
77800 /**
77801 * Divide two numbers.
77802 *
77803 * @static
77804 * @memberOf _
77805 * @since 4.7.0
77806 * @category Math
77807 * @param {number} dividend The first number in a division.
77808 * @param {number} divisor The second number in a division.
77809 * @returns {number} Returns the quotient.
77810 * @example
77811 *
77812 * _.divide(6, 4);
77813 * // => 1.5
77814 */
77815 var divide = createMathOperation(function(dividend, divisor) {
77816 return dividend / divisor;
77817 }, 1);
77818
77819 /**
77820 * Computes `number` rounded down to `precision`.
77821 *
77822 * @static
77823 * @memberOf _
77824 * @since 3.10.0
77825 * @category Math
77826 * @param {number} number The number to round down.
77827 * @param {number} [precision=0] The precision to round down to.
77828 * @returns {number} Returns the rounded down number.
77829 * @example
77830 *
77831 * _.floor(4.006);
77832 * // => 4
77833 *
77834 * _.floor(0.046, 2);
77835 * // => 0.04
77836 *
77837 * _.floor(4060, -2);
77838 * // => 4000
77839 */
77840 var floor = createRound('floor');
77841
77842 /**
77843 * Computes the maximum value of `array`. If `array` is empty or falsey,
77844 * `undefined` is returned.
77845 *
77846 * @static
77847 * @since 0.1.0
77848 * @memberOf _
77849 * @category Math
77850 * @param {Array} array The array to iterate over.
77851 * @returns {*} Returns the maximum value.
77852 * @example
77853 *
77854 * _.max([4, 2, 8, 6]);
77855 * // => 8
77856 *
77857 * _.max([]);
77858 * // => undefined
77859 */
77860 function max(array) {
77861 return (array && array.length)
77862 ? baseExtremum(array, identity, baseGt)
77863 : undefined;
77864 }
77865
77866 /**
77867 * This method is like `_.max` except that it accepts `iteratee` which is
77868 * invoked for each element in `array` to generate the criterion by which
77869 * the value is ranked. The iteratee is invoked with one argument: (value).
77870 *
77871 * @static
77872 * @memberOf _
77873 * @since 4.0.0
77874 * @category Math
77875 * @param {Array} array The array to iterate over.
77876 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
77877 * @returns {*} Returns the maximum value.
77878 * @example
77879 *
77880 * var objects = [{ 'n': 1 }, { 'n': 2 }];
77881 *
77882 * _.maxBy(objects, function(o) { return o.n; });
77883 * // => { 'n': 2 }
77884 *
77885 * // The `_.property` iteratee shorthand.
77886 * _.maxBy(objects, 'n');
77887 * // => { 'n': 2 }
77888 */
77889 function maxBy(array, iteratee) {
77890 return (array && array.length)
77891 ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
77892 : undefined;
77893 }
77894
77895 /**
77896 * Computes the mean of the values in `array`.
77897 *
77898 * @static
77899 * @memberOf _
77900 * @since 4.0.0
77901 * @category Math
77902 * @param {Array} array The array to iterate over.
77903 * @returns {number} Returns the mean.
77904 * @example
77905 *
77906 * _.mean([4, 2, 8, 6]);
77907 * // => 5
77908 */
77909 function mean(array) {
77910 return baseMean(array, identity);
77911 }
77912
77913 /**
77914 * This method is like `_.mean` except that it accepts `iteratee` which is
77915 * invoked for each element in `array` to generate the value to be averaged.
77916 * The iteratee is invoked with one argument: (value).
77917 *
77918 * @static
77919 * @memberOf _
77920 * @since 4.7.0
77921 * @category Math
77922 * @param {Array} array The array to iterate over.
77923 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
77924 * @returns {number} Returns the mean.
77925 * @example
77926 *
77927 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
77928 *
77929 * _.meanBy(objects, function(o) { return o.n; });
77930 * // => 5
77931 *
77932 * // The `_.property` iteratee shorthand.
77933 * _.meanBy(objects, 'n');
77934 * // => 5
77935 */
77936 function meanBy(array, iteratee) {
77937 return baseMean(array, getIteratee(iteratee, 2));
77938 }
77939
77940 /**
77941 * Computes the minimum value of `array`. If `array` is empty or falsey,
77942 * `undefined` is returned.
77943 *
77944 * @static
77945 * @since 0.1.0
77946 * @memberOf _
77947 * @category Math
77948 * @param {Array} array The array to iterate over.
77949 * @returns {*} Returns the minimum value.
77950 * @example
77951 *
77952 * _.min([4, 2, 8, 6]);
77953 * // => 2
77954 *
77955 * _.min([]);
77956 * // => undefined
77957 */
77958 function min(array) {
77959 return (array && array.length)
77960 ? baseExtremum(array, identity, baseLt)
77961 : undefined;
77962 }
77963
77964 /**
77965 * This method is like `_.min` except that it accepts `iteratee` which is
77966 * invoked for each element in `array` to generate the criterion by which
77967 * the value is ranked. The iteratee is invoked with one argument: (value).
77968 *
77969 * @static
77970 * @memberOf _
77971 * @since 4.0.0
77972 * @category Math
77973 * @param {Array} array The array to iterate over.
77974 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
77975 * @returns {*} Returns the minimum value.
77976 * @example
77977 *
77978 * var objects = [{ 'n': 1 }, { 'n': 2 }];
77979 *
77980 * _.minBy(objects, function(o) { return o.n; });
77981 * // => { 'n': 1 }
77982 *
77983 * // The `_.property` iteratee shorthand.
77984 * _.minBy(objects, 'n');
77985 * // => { 'n': 1 }
77986 */
77987 function minBy(array, iteratee) {
77988 return (array && array.length)
77989 ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
77990 : undefined;
77991 }
77992
77993 /**
77994 * Multiply two numbers.
77995 *
77996 * @static
77997 * @memberOf _
77998 * @since 4.7.0
77999 * @category Math
78000 * @param {number} multiplier The first number in a multiplication.
78001 * @param {number} multiplicand The second number in a multiplication.
78002 * @returns {number} Returns the product.
78003 * @example
78004 *
78005 * _.multiply(6, 4);
78006 * // => 24
78007 */
78008 var multiply = createMathOperation(function(multiplier, multiplicand) {
78009 return multiplier * multiplicand;
78010 }, 1);
78011
78012 /**
78013 * Computes `number` rounded to `precision`.
78014 *
78015 * @static
78016 * @memberOf _
78017 * @since 3.10.0
78018 * @category Math
78019 * @param {number} number The number to round.
78020 * @param {number} [precision=0] The precision to round to.
78021 * @returns {number} Returns the rounded number.
78022 * @example
78023 *
78024 * _.round(4.006);
78025 * // => 4
78026 *
78027 * _.round(4.006, 2);
78028 * // => 4.01
78029 *
78030 * _.round(4060, -2);
78031 * // => 4100
78032 */
78033 var round = createRound('round');
78034
78035 /**
78036 * Subtract two numbers.
78037 *
78038 * @static
78039 * @memberOf _
78040 * @since 4.0.0
78041 * @category Math
78042 * @param {number} minuend The first number in a subtraction.
78043 * @param {number} subtrahend The second number in a subtraction.
78044 * @returns {number} Returns the difference.
78045 * @example
78046 *
78047 * _.subtract(6, 4);
78048 * // => 2
78049 */
78050 var subtract = createMathOperation(function(minuend, subtrahend) {
78051 return minuend - subtrahend;
78052 }, 0);
78053
78054 /**
78055 * Computes the sum of the values in `array`.
78056 *
78057 * @static
78058 * @memberOf _
78059 * @since 3.4.0
78060 * @category Math
78061 * @param {Array} array The array to iterate over.
78062 * @returns {number} Returns the sum.
78063 * @example
78064 *
78065 * _.sum([4, 2, 8, 6]);
78066 * // => 20
78067 */
78068 function sum(array) {
78069 return (array && array.length)
78070 ? baseSum(array, identity)
78071 : 0;
78072 }
78073
78074 /**
78075 * This method is like `_.sum` except that it accepts `iteratee` which is
78076 * invoked for each element in `array` to generate the value to be summed.
78077 * The iteratee is invoked with one argument: (value).
78078 *
78079 * @static
78080 * @memberOf _
78081 * @since 4.0.0
78082 * @category Math
78083 * @param {Array} array The array to iterate over.
78084 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
78085 * @returns {number} Returns the sum.
78086 * @example
78087 *
78088 * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
78089 *
78090 * _.sumBy(objects, function(o) { return o.n; });
78091 * // => 20
78092 *
78093 * // The `_.property` iteratee shorthand.
78094 * _.sumBy(objects, 'n');
78095 * // => 20
78096 */
78097 function sumBy(array, iteratee) {
78098 return (array && array.length)
78099 ? baseSum(array, getIteratee(iteratee, 2))
78100 : 0;
78101 }
78102
78103 /*------------------------------------------------------------------------*/
78104
78105 // Add methods that return wrapped values in chain sequences.
78106 lodash.after = after;
78107 lodash.ary = ary;
78108 lodash.assign = assign;
78109 lodash.assignIn = assignIn;
78110 lodash.assignInWith = assignInWith;
78111 lodash.assignWith = assignWith;
78112 lodash.at = at;
78113 lodash.before = before;
78114 lodash.bind = bind;
78115 lodash.bindAll = bindAll;
78116 lodash.bindKey = bindKey;
78117 lodash.castArray = castArray;
78118 lodash.chain = chain;
78119 lodash.chunk = chunk;
78120 lodash.compact = compact;
78121 lodash.concat = concat;
78122 lodash.cond = cond;
78123 lodash.conforms = conforms;
78124 lodash.constant = constant;
78125 lodash.countBy = countBy;
78126 lodash.create = create;
78127 lodash.curry = curry;
78128 lodash.curryRight = curryRight;
78129 lodash.debounce = debounce;
78130 lodash.defaults = defaults;
78131 lodash.defaultsDeep = defaultsDeep;
78132 lodash.defer = defer;
78133 lodash.delay = delay;
78134 lodash.difference = difference;
78135 lodash.differenceBy = differenceBy;
78136 lodash.differenceWith = differenceWith;
78137 lodash.drop = drop;
78138 lodash.dropRight = dropRight;
78139 lodash.dropRightWhile = dropRightWhile;
78140 lodash.dropWhile = dropWhile;
78141 lodash.fill = fill;
78142 lodash.filter = filter;
78143 lodash.flatMap = flatMap;
78144 lodash.flatMapDeep = flatMapDeep;
78145 lodash.flatMapDepth = flatMapDepth;
78146 lodash.flatten = flatten;
78147 lodash.flattenDeep = flattenDeep;
78148 lodash.flattenDepth = flattenDepth;
78149 lodash.flip = flip;
78150 lodash.flow = flow;
78151 lodash.flowRight = flowRight;
78152 lodash.fromPairs = fromPairs;
78153 lodash.functions = functions;
78154 lodash.functionsIn = functionsIn;
78155 lodash.groupBy = groupBy;
78156 lodash.initial = initial;
78157 lodash.intersection = intersection;
78158 lodash.intersectionBy = intersectionBy;
78159 lodash.intersectionWith = intersectionWith;
78160 lodash.invert = invert;
78161 lodash.invertBy = invertBy;
78162 lodash.invokeMap = invokeMap;
78163 lodash.iteratee = iteratee;
78164 lodash.keyBy = keyBy;
78165 lodash.keys = keys;
78166 lodash.keysIn = keysIn;
78167 lodash.map = map;
78168 lodash.mapKeys = mapKeys;
78169 lodash.mapValues = mapValues;
78170 lodash.matches = matches;
78171 lodash.matchesProperty = matchesProperty;
78172 lodash.memoize = memoize;
78173 lodash.merge = merge;
78174 lodash.mergeWith = mergeWith;
78175 lodash.method = method;
78176 lodash.methodOf = methodOf;
78177 lodash.mixin = mixin;
78178 lodash.negate = negate;
78179 lodash.nthArg = nthArg;
78180 lodash.omit = omit;
78181 lodash.omitBy = omitBy;
78182 lodash.once = once;
78183 lodash.orderBy = orderBy;
78184 lodash.over = over;
78185 lodash.overArgs = overArgs;
78186 lodash.overEvery = overEvery;
78187 lodash.overSome = overSome;
78188 lodash.partial = partial;
78189 lodash.partialRight = partialRight;
78190 lodash.partition = partition;
78191 lodash.pick = pick;
78192 lodash.pickBy = pickBy;
78193 lodash.property = property;
78194 lodash.propertyOf = propertyOf;
78195 lodash.pull = pull;
78196 lodash.pullAll = pullAll;
78197 lodash.pullAllBy = pullAllBy;
78198 lodash.pullAllWith = pullAllWith;
78199 lodash.pullAt = pullAt;
78200 lodash.range = range;
78201 lodash.rangeRight = rangeRight;
78202 lodash.rearg = rearg;
78203 lodash.reject = reject;
78204 lodash.remove = remove;
78205 lodash.rest = rest;
78206 lodash.reverse = reverse;
78207 lodash.sampleSize = sampleSize;
78208 lodash.set = set;
78209 lodash.setWith = setWith;
78210 lodash.shuffle = shuffle;
78211 lodash.slice = slice;
78212 lodash.sortBy = sortBy;
78213 lodash.sortedUniq = sortedUniq;
78214 lodash.sortedUniqBy = sortedUniqBy;
78215 lodash.split = split;
78216 lodash.spread = spread;
78217 lodash.tail = tail;
78218 lodash.take = take;
78219 lodash.takeRight = takeRight;
78220 lodash.takeRightWhile = takeRightWhile;
78221 lodash.takeWhile = takeWhile;
78222 lodash.tap = tap;
78223 lodash.throttle = throttle;
78224 lodash.thru = thru;
78225 lodash.toArray = toArray;
78226 lodash.toPairs = toPairs;
78227 lodash.toPairsIn = toPairsIn;
78228 lodash.toPath = toPath;
78229 lodash.toPlainObject = toPlainObject;
78230 lodash.transform = transform;
78231 lodash.unary = unary;
78232 lodash.union = union;
78233 lodash.unionBy = unionBy;
78234 lodash.unionWith = unionWith;
78235 lodash.uniq = uniq;
78236 lodash.uniqBy = uniqBy;
78237 lodash.uniqWith = uniqWith;
78238 lodash.unset = unset;
78239 lodash.unzip = unzip;
78240 lodash.unzipWith = unzipWith;
78241 lodash.update = update;
78242 lodash.updateWith = updateWith;
78243 lodash.values = values;
78244 lodash.valuesIn = valuesIn;
78245 lodash.without = without;
78246 lodash.words = words;
78247 lodash.wrap = wrap;
78248 lodash.xor = xor;
78249 lodash.xorBy = xorBy;
78250 lodash.xorWith = xorWith;
78251 lodash.zip = zip;
78252 lodash.zipObject = zipObject;
78253 lodash.zipObjectDeep = zipObjectDeep;
78254 lodash.zipWith = zipWith;
78255
78256 // Add aliases.
78257 lodash.entries = toPairs;
78258 lodash.entriesIn = toPairsIn;
78259 lodash.extend = assignIn;
78260 lodash.extendWith = assignInWith;
78261
78262 // Add methods to `lodash.prototype`.
78263 mixin(lodash, lodash);
78264
78265 /*------------------------------------------------------------------------*/
78266
78267 // Add methods that return unwrapped values in chain sequences.
78268 lodash.add = add;
78269 lodash.attempt = attempt;
78270 lodash.camelCase = camelCase;
78271 lodash.capitalize = capitalize;
78272 lodash.ceil = ceil;
78273 lodash.clamp = clamp;
78274 lodash.clone = clone;
78275 lodash.cloneDeep = cloneDeep;
78276 lodash.cloneDeepWith = cloneDeepWith;
78277 lodash.cloneWith = cloneWith;
78278 lodash.conformsTo = conformsTo;
78279 lodash.deburr = deburr;
78280 lodash.defaultTo = defaultTo;
78281 lodash.divide = divide;
78282 lodash.endsWith = endsWith;
78283 lodash.eq = eq;
78284 lodash.escape = escape;
78285 lodash.escapeRegExp = escapeRegExp;
78286 lodash.every = every;
78287 lodash.find = find;
78288 lodash.findIndex = findIndex;
78289 lodash.findKey = findKey;
78290 lodash.findLast = findLast;
78291 lodash.findLastIndex = findLastIndex;
78292 lodash.findLastKey = findLastKey;
78293 lodash.floor = floor;
78294 lodash.forEach = forEach;
78295 lodash.forEachRight = forEachRight;
78296 lodash.forIn = forIn;
78297 lodash.forInRight = forInRight;
78298 lodash.forOwn = forOwn;
78299 lodash.forOwnRight = forOwnRight;
78300 lodash.get = get;
78301 lodash.gt = gt;
78302 lodash.gte = gte;
78303 lodash.has = has;
78304 lodash.hasIn = hasIn;
78305 lodash.head = head;
78306 lodash.identity = identity;
78307 lodash.includes = includes;
78308 lodash.indexOf = indexOf;
78309 lodash.inRange = inRange;
78310 lodash.invoke = invoke;
78311 lodash.isArguments = isArguments;
78312 lodash.isArray = isArray;
78313 lodash.isArrayBuffer = isArrayBuffer;
78314 lodash.isArrayLike = isArrayLike;
78315 lodash.isArrayLikeObject = isArrayLikeObject;
78316 lodash.isBoolean = isBoolean;
78317 lodash.isBuffer = isBuffer;
78318 lodash.isDate = isDate;
78319 lodash.isElement = isElement;
78320 lodash.isEmpty = isEmpty;
78321 lodash.isEqual = isEqual;
78322 lodash.isEqualWith = isEqualWith;
78323 lodash.isError = isError;
78324 lodash.isFinite = isFinite;
78325 lodash.isFunction = isFunction;
78326 lodash.isInteger = isInteger;
78327 lodash.isLength = isLength;
78328 lodash.isMap = isMap;
78329 lodash.isMatch = isMatch;
78330 lodash.isMatchWith = isMatchWith;
78331 lodash.isNaN = isNaN;
78332 lodash.isNative = isNative;
78333 lodash.isNil = isNil;
78334 lodash.isNull = isNull;
78335 lodash.isNumber = isNumber;
78336 lodash.isObject = isObject;
78337 lodash.isObjectLike = isObjectLike;
78338 lodash.isPlainObject = isPlainObject;
78339 lodash.isRegExp = isRegExp;
78340 lodash.isSafeInteger = isSafeInteger;
78341 lodash.isSet = isSet;
78342 lodash.isString = isString;
78343 lodash.isSymbol = isSymbol;
78344 lodash.isTypedArray = isTypedArray;
78345 lodash.isUndefined = isUndefined;
78346 lodash.isWeakMap = isWeakMap;
78347 lodash.isWeakSet = isWeakSet;
78348 lodash.join = join;
78349 lodash.kebabCase = kebabCase;
78350 lodash.last = last;
78351 lodash.lastIndexOf = lastIndexOf;
78352 lodash.lowerCase = lowerCase;
78353 lodash.lowerFirst = lowerFirst;
78354 lodash.lt = lt;
78355 lodash.lte = lte;
78356 lodash.max = max;
78357 lodash.maxBy = maxBy;
78358 lodash.mean = mean;
78359 lodash.meanBy = meanBy;
78360 lodash.min = min;
78361 lodash.minBy = minBy;
78362 lodash.stubArray = stubArray;
78363 lodash.stubFalse = stubFalse;
78364 lodash.stubObject = stubObject;
78365 lodash.stubString = stubString;
78366 lodash.stubTrue = stubTrue;
78367 lodash.multiply = multiply;
78368 lodash.nth = nth;
78369 lodash.noConflict = noConflict;
78370 lodash.noop = noop;
78371 lodash.now = now;
78372 lodash.pad = pad;
78373 lodash.padEnd = padEnd;
78374 lodash.padStart = padStart;
78375 lodash.parseInt = parseInt;
78376 lodash.random = random;
78377 lodash.reduce = reduce;
78378 lodash.reduceRight = reduceRight;
78379 lodash.repeat = repeat;
78380 lodash.replace = replace;
78381 lodash.result = result;
78382 lodash.round = round;
78383 lodash.runInContext = runInContext;
78384 lodash.sample = sample;
78385 lodash.size = size;
78386 lodash.snakeCase = snakeCase;
78387 lodash.some = some;
78388 lodash.sortedIndex = sortedIndex;
78389 lodash.sortedIndexBy = sortedIndexBy;
78390 lodash.sortedIndexOf = sortedIndexOf;
78391 lodash.sortedLastIndex = sortedLastIndex;
78392 lodash.sortedLastIndexBy = sortedLastIndexBy;
78393 lodash.sortedLastIndexOf = sortedLastIndexOf;
78394 lodash.startCase = startCase;
78395 lodash.startsWith = startsWith;
78396 lodash.subtract = subtract;
78397 lodash.sum = sum;
78398 lodash.sumBy = sumBy;
78399 lodash.template = template;
78400 lodash.times = times;
78401 lodash.toFinite = toFinite;
78402 lodash.toInteger = toInteger;
78403 lodash.toLength = toLength;
78404 lodash.toLower = toLower;
78405 lodash.toNumber = toNumber;
78406 lodash.toSafeInteger = toSafeInteger;
78407 lodash.toString = toString;
78408 lodash.toUpper = toUpper;
78409 lodash.trim = trim;
78410 lodash.trimEnd = trimEnd;
78411 lodash.trimStart = trimStart;
78412 lodash.truncate = truncate;
78413 lodash.unescape = unescape;
78414 lodash.uniqueId = uniqueId;
78415 lodash.upperCase = upperCase;
78416 lodash.upperFirst = upperFirst;
78417
78418 // Add aliases.
78419 lodash.each = forEach;
78420 lodash.eachRight = forEachRight;
78421 lodash.first = head;
78422
78423 mixin(lodash, (function() {
78424 var source = {};
78425 baseForOwn(lodash, function(func, methodName) {
78426 if (!hasOwnProperty.call(lodash.prototype, methodName)) {
78427 source[methodName] = func;
78428 }
78429 });
78430 return source;
78431 }()), { 'chain': false });
78432
78433 /*------------------------------------------------------------------------*/
78434
78435 /**
78436 * The semantic version number.
78437 *
78438 * @static
78439 * @memberOf _
78440 * @type {string}
78441 */
78442 lodash.VERSION = VERSION;
78443
78444 // Assign default placeholders.
78445 arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
78446 lodash[methodName].placeholder = lodash;
78447 });
78448
78449 // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
78450 arrayEach(['drop', 'take'], function(methodName, index) {
78451 LazyWrapper.prototype[methodName] = function(n) {
78452 n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
78453
78454 var result = (this.__filtered__ && !index)
78455 ? new LazyWrapper(this)
78456 : this.clone();
78457
78458 if (result.__filtered__) {
78459 result.__takeCount__ = nativeMin(n, result.__takeCount__);
78460 } else {
78461 result.__views__.push({
78462 'size': nativeMin(n, MAX_ARRAY_LENGTH),
78463 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
78464 });
78465 }
78466 return result;
78467 };
78468
78469 LazyWrapper.prototype[methodName + 'Right'] = function(n) {
78470 return this.reverse()[methodName](n).reverse();
78471 };
78472 });
78473
78474 // Add `LazyWrapper` methods that accept an `iteratee` value.
78475 arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
78476 var type = index + 1,
78477 isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
78478
78479 LazyWrapper.prototype[methodName] = function(iteratee) {
78480 var result = this.clone();
78481 result.__iteratees__.push({
78482 'iteratee': getIteratee(iteratee, 3),
78483 'type': type
78484 });
78485 result.__filtered__ = result.__filtered__ || isFilter;
78486 return result;
78487 };
78488 });
78489
78490 // Add `LazyWrapper` methods for `_.head` and `_.last`.
78491 arrayEach(['head', 'last'], function(methodName, index) {
78492 var takeName = 'take' + (index ? 'Right' : '');
78493
78494 LazyWrapper.prototype[methodName] = function() {
78495 return this[takeName](1).value()[0];
78496 };
78497 });
78498
78499 // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
78500 arrayEach(['initial', 'tail'], function(methodName, index) {
78501 var dropName = 'drop' + (index ? '' : 'Right');
78502
78503 LazyWrapper.prototype[methodName] = function() {
78504 return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
78505 };
78506 });
78507
78508 LazyWrapper.prototype.compact = function() {
78509 return this.filter(identity);
78510 };
78511
78512 LazyWrapper.prototype.find = function(predicate) {
78513 return this.filter(predicate).head();
78514 };
78515
78516 LazyWrapper.prototype.findLast = function(predicate) {
78517 return this.reverse().find(predicate);
78518 };
78519
78520 LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
78521 if (typeof path == 'function') {
78522 return new LazyWrapper(this);
78523 }
78524 return this.map(function(value) {
78525 return baseInvoke(value, path, args);
78526 });
78527 });
78528
78529 LazyWrapper.prototype.reject = function(predicate) {
78530 return this.filter(negate(getIteratee(predicate)));
78531 };
78532
78533 LazyWrapper.prototype.slice = function(start, end) {
78534 start = toInteger(start);
78535
78536 var result = this;
78537 if (result.__filtered__ && (start > 0 || end < 0)) {
78538 return new LazyWrapper(result);
78539 }
78540 if (start < 0) {
78541 result = result.takeRight(-start);
78542 } else if (start) {
78543 result = result.drop(start);
78544 }
78545 if (end !== undefined) {
78546 end = toInteger(end);
78547 result = end < 0 ? result.dropRight(-end) : result.take(end - start);
78548 }
78549 return result;
78550 };
78551
78552 LazyWrapper.prototype.takeRightWhile = function(predicate) {
78553 return this.reverse().takeWhile(predicate).reverse();
78554 };
78555
78556 LazyWrapper.prototype.toArray = function() {
78557 return this.take(MAX_ARRAY_LENGTH);
78558 };
78559
78560 // Add `LazyWrapper` methods to `lodash.prototype`.
78561 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
78562 var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
78563 isTaker = /^(?:head|last)$/.test(methodName),
78564 lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
78565 retUnwrapped = isTaker || /^find/.test(methodName);
78566
78567 if (!lodashFunc) {
78568 return;
78569 }
78570 lodash.prototype[methodName] = function() {
78571 var value = this.__wrapped__,
78572 args = isTaker ? [1] : arguments,
78573 isLazy = value instanceof LazyWrapper,
78574 iteratee = args[0],
78575 useLazy = isLazy || isArray(value);
78576
78577 var interceptor = function(value) {
78578 var result = lodashFunc.apply(lodash, arrayPush([value], args));
78579 return (isTaker && chainAll) ? result[0] : result;
78580 };
78581
78582 if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
78583 // Avoid lazy use if the iteratee has a "length" value other than `1`.
78584 isLazy = useLazy = false;
78585 }
78586 var chainAll = this.__chain__,
78587 isHybrid = !!this.__actions__.length,
78588 isUnwrapped = retUnwrapped && !chainAll,
78589 onlyLazy = isLazy && !isHybrid;
78590
78591 if (!retUnwrapped && useLazy) {
78592 value = onlyLazy ? value : new LazyWrapper(this);
78593 var result = func.apply(value, args);
78594 result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
78595 return new LodashWrapper(result, chainAll);
78596 }
78597 if (isUnwrapped && onlyLazy) {
78598 return func.apply(this, args);
78599 }
78600 result = this.thru(interceptor);
78601 return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
78602 };
78603 });
78604
78605 // Add `Array` methods to `lodash.prototype`.
78606 arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
78607 var func = arrayProto[methodName],
78608 chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
78609 retUnwrapped = /^(?:pop|shift)$/.test(methodName);
78610
78611 lodash.prototype[methodName] = function() {
78612 var args = arguments;
78613 if (retUnwrapped && !this.__chain__) {
78614 var value = this.value();
78615 return func.apply(isArray(value) ? value : [], args);
78616 }
78617 return this[chainName](function(value) {
78618 return func.apply(isArray(value) ? value : [], args);
78619 });
78620 };
78621 });
78622
78623 // Map minified method names to their real names.
78624 baseForOwn(LazyWrapper.prototype, function(func, methodName) {
78625 var lodashFunc = lodash[methodName];
78626 if (lodashFunc) {
78627 var key = lodashFunc.name + '';
78628 if (!hasOwnProperty.call(realNames, key)) {
78629 realNames[key] = [];
78630 }
78631 realNames[key].push({ 'name': methodName, 'func': lodashFunc });
78632 }
78633 });
78634
78635 realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
78636 'name': 'wrapper',
78637 'func': undefined
78638 }];
78639
78640 // Add methods to `LazyWrapper`.
78641 LazyWrapper.prototype.clone = lazyClone;
78642 LazyWrapper.prototype.reverse = lazyReverse;
78643 LazyWrapper.prototype.value = lazyValue;
78644
78645 // Add chain sequence methods to the `lodash` wrapper.
78646 lodash.prototype.at = wrapperAt;
78647 lodash.prototype.chain = wrapperChain;
78648 lodash.prototype.commit = wrapperCommit;
78649 lodash.prototype.next = wrapperNext;
78650 lodash.prototype.plant = wrapperPlant;
78651 lodash.prototype.reverse = wrapperReverse;
78652 lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
78653
78654 // Add lazy aliases.
78655 lodash.prototype.first = lodash.prototype.head;
78656
78657 if (symIterator) {
78658 lodash.prototype[symIterator] = wrapperToIterator;
78659 }
78660 return lodash;
78661 });
78662
78663 /*--------------------------------------------------------------------------*/
78664
78665 // Export lodash.
78666 var _ = runInContext();
78667
78668 // Some AMD build optimizers, like r.js, check for condition patterns like:
78669 if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
78670 // Expose Lodash on the global object to prevent errors when Lodash is
78671 // loaded by a script tag in the presence of an AMD loader.
78672 // See http://requirejs.org/docs/errors.html#mismatch for more details.
78673 // Use `_.noConflict` to remove Lodash from the global object.
78674 root._ = _;
78675
78676 // Define as an anonymous module so, through path mapping, it can be
78677 // referenced as the "underscore" module.
78678 define(function() {
78679 return _;
78680 });
78681 }
78682 // Check for `exports` after `define` in case a build optimizer adds it.
78683 else if (freeModule) {
78684 // Export for Node.js.
78685 (freeModule.exports = _)._ = _;
78686 // Export for CommonJS support.
78687 freeExports._ = _;
78688 }
78689 else {
78690 // Export to the global object.
78691 root._ = _;
78692 }
78693}.call(this));
78694
78695/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
78696
78697/***/ }),
78698
78699/***/ "./node_modules/lodash/map.js":
78700/*!************************************!*\
78701 !*** ./node_modules/lodash/map.js ***!
78702 \************************************/
78703/*! no static exports found */
78704/***/ (function(module, exports, __webpack_require__) {
78705
78706var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"),
78707 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
78708 baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"),
78709 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
78710
78711/**
78712 * Creates an array of values by running each element in `collection` thru
78713 * `iteratee`. The iteratee is invoked with three arguments:
78714 * (value, index|key, collection).
78715 *
78716 * Many lodash methods are guarded to work as iteratees for methods like
78717 * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
78718 *
78719 * The guarded methods are:
78720 * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
78721 * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
78722 * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
78723 * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
78724 *
78725 * @static
78726 * @memberOf _
78727 * @since 0.1.0
78728 * @category Collection
78729 * @param {Array|Object} collection The collection to iterate over.
78730 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
78731 * @returns {Array} Returns the new mapped array.
78732 * @example
78733 *
78734 * function square(n) {
78735 * return n * n;
78736 * }
78737 *
78738 * _.map([4, 8], square);
78739 * // => [16, 64]
78740 *
78741 * _.map({ 'a': 4, 'b': 8 }, square);
78742 * // => [16, 64] (iteration order is not guaranteed)
78743 *
78744 * var users = [
78745 * { 'user': 'barney' },
78746 * { 'user': 'fred' }
78747 * ];
78748 *
78749 * // The `_.property` iteratee shorthand.
78750 * _.map(users, 'user');
78751 * // => ['barney', 'fred']
78752 */
78753function map(collection, iteratee) {
78754 var func = isArray(collection) ? arrayMap : baseMap;
78755 return func(collection, baseIteratee(iteratee, 3));
78756}
78757
78758module.exports = map;
78759
78760
78761/***/ }),
78762
78763/***/ "./node_modules/lodash/mapValues.js":
78764/*!******************************************!*\
78765 !*** ./node_modules/lodash/mapValues.js ***!
78766 \******************************************/
78767/*! no static exports found */
78768/***/ (function(module, exports, __webpack_require__) {
78769
78770var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"),
78771 baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"),
78772 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js");
78773
78774/**
78775 * Creates an object with the same keys as `object` and values generated
78776 * by running each own enumerable string keyed property of `object` thru
78777 * `iteratee`. The iteratee is invoked with three arguments:
78778 * (value, key, object).
78779 *
78780 * @static
78781 * @memberOf _
78782 * @since 2.4.0
78783 * @category Object
78784 * @param {Object} object The object to iterate over.
78785 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
78786 * @returns {Object} Returns the new mapped object.
78787 * @see _.mapKeys
78788 * @example
78789 *
78790 * var users = {
78791 * 'fred': { 'user': 'fred', 'age': 40 },
78792 * 'pebbles': { 'user': 'pebbles', 'age': 1 }
78793 * };
78794 *
78795 * _.mapValues(users, function(o) { return o.age; });
78796 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
78797 *
78798 * // The `_.property` iteratee shorthand.
78799 * _.mapValues(users, 'age');
78800 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
78801 */
78802function mapValues(object, iteratee) {
78803 var result = {};
78804 iteratee = baseIteratee(iteratee, 3);
78805
78806 baseForOwn(object, function(value, key, object) {
78807 baseAssignValue(result, key, iteratee(value, key, object));
78808 });
78809 return result;
78810}
78811
78812module.exports = mapValues;
78813
78814
78815/***/ }),
78816
78817/***/ "./node_modules/lodash/max.js":
78818/*!************************************!*\
78819 !*** ./node_modules/lodash/max.js ***!
78820 \************************************/
78821/*! no static exports found */
78822/***/ (function(module, exports, __webpack_require__) {
78823
78824var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"),
78825 baseGt = __webpack_require__(/*! ./_baseGt */ "./node_modules/lodash/_baseGt.js"),
78826 identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
78827
78828/**
78829 * Computes the maximum value of `array`. If `array` is empty or falsey,
78830 * `undefined` is returned.
78831 *
78832 * @static
78833 * @since 0.1.0
78834 * @memberOf _
78835 * @category Math
78836 * @param {Array} array The array to iterate over.
78837 * @returns {*} Returns the maximum value.
78838 * @example
78839 *
78840 * _.max([4, 2, 8, 6]);
78841 * // => 8
78842 *
78843 * _.max([]);
78844 * // => undefined
78845 */
78846function max(array) {
78847 return (array && array.length)
78848 ? baseExtremum(array, identity, baseGt)
78849 : undefined;
78850}
78851
78852module.exports = max;
78853
78854
78855/***/ }),
78856
78857/***/ "./node_modules/lodash/memoize.js":
78858/*!****************************************!*\
78859 !*** ./node_modules/lodash/memoize.js ***!
78860 \****************************************/
78861/*! no static exports found */
78862/***/ (function(module, exports, __webpack_require__) {
78863
78864var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js");
78865
78866/** Error message constants. */
78867var FUNC_ERROR_TEXT = 'Expected a function';
78868
78869/**
78870 * Creates a function that memoizes the result of `func`. If `resolver` is
78871 * provided, it determines the cache key for storing the result based on the
78872 * arguments provided to the memoized function. By default, the first argument
78873 * provided to the memoized function is used as the map cache key. The `func`
78874 * is invoked with the `this` binding of the memoized function.
78875 *
78876 * **Note:** The cache is exposed as the `cache` property on the memoized
78877 * function. Its creation may be customized by replacing the `_.memoize.Cache`
78878 * constructor with one whose instances implement the
78879 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
78880 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
78881 *
78882 * @static
78883 * @memberOf _
78884 * @since 0.1.0
78885 * @category Function
78886 * @param {Function} func The function to have its output memoized.
78887 * @param {Function} [resolver] The function to resolve the cache key.
78888 * @returns {Function} Returns the new memoized function.
78889 * @example
78890 *
78891 * var object = { 'a': 1, 'b': 2 };
78892 * var other = { 'c': 3, 'd': 4 };
78893 *
78894 * var values = _.memoize(_.values);
78895 * values(object);
78896 * // => [1, 2]
78897 *
78898 * values(other);
78899 * // => [3, 4]
78900 *
78901 * object.a = 2;
78902 * values(object);
78903 * // => [1, 2]
78904 *
78905 * // Modify the result cache.
78906 * values.cache.set(object, ['a', 'b']);
78907 * values(object);
78908 * // => ['a', 'b']
78909 *
78910 * // Replace `_.memoize.Cache`.
78911 * _.memoize.Cache = WeakMap;
78912 */
78913function memoize(func, resolver) {
78914 if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
78915 throw new TypeError(FUNC_ERROR_TEXT);
78916 }
78917 var memoized = function() {
78918 var args = arguments,
78919 key = resolver ? resolver.apply(this, args) : args[0],
78920 cache = memoized.cache;
78921
78922 if (cache.has(key)) {
78923 return cache.get(key);
78924 }
78925 var result = func.apply(this, args);
78926 memoized.cache = cache.set(key, result) || cache;
78927 return result;
78928 };
78929 memoized.cache = new (memoize.Cache || MapCache);
78930 return memoized;
78931}
78932
78933// Expose `MapCache`.
78934memoize.Cache = MapCache;
78935
78936module.exports = memoize;
78937
78938
78939/***/ }),
78940
78941/***/ "./node_modules/lodash/merge.js":
78942/*!**************************************!*\
78943 !*** ./node_modules/lodash/merge.js ***!
78944 \**************************************/
78945/*! no static exports found */
78946/***/ (function(module, exports, __webpack_require__) {
78947
78948var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"),
78949 createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js");
78950
78951/**
78952 * This method is like `_.assign` except that it recursively merges own and
78953 * inherited enumerable string keyed properties of source objects into the
78954 * destination object. Source properties that resolve to `undefined` are
78955 * skipped if a destination value exists. Array and plain object properties
78956 * are merged recursively. Other objects and value types are overridden by
78957 * assignment. Source objects are applied from left to right. Subsequent
78958 * sources overwrite property assignments of previous sources.
78959 *
78960 * **Note:** This method mutates `object`.
78961 *
78962 * @static
78963 * @memberOf _
78964 * @since 0.5.0
78965 * @category Object
78966 * @param {Object} object The destination object.
78967 * @param {...Object} [sources] The source objects.
78968 * @returns {Object} Returns `object`.
78969 * @example
78970 *
78971 * var object = {
78972 * 'a': [{ 'b': 2 }, { 'd': 4 }]
78973 * };
78974 *
78975 * var other = {
78976 * 'a': [{ 'c': 3 }, { 'e': 5 }]
78977 * };
78978 *
78979 * _.merge(object, other);
78980 * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
78981 */
78982var merge = createAssigner(function(object, source, srcIndex) {
78983 baseMerge(object, source, srcIndex);
78984});
78985
78986module.exports = merge;
78987
78988
78989/***/ }),
78990
78991/***/ "./node_modules/lodash/min.js":
78992/*!************************************!*\
78993 !*** ./node_modules/lodash/min.js ***!
78994 \************************************/
78995/*! no static exports found */
78996/***/ (function(module, exports, __webpack_require__) {
78997
78998var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"),
78999 baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"),
79000 identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js");
79001
79002/**
79003 * Computes the minimum value of `array`. If `array` is empty or falsey,
79004 * `undefined` is returned.
79005 *
79006 * @static
79007 * @since 0.1.0
79008 * @memberOf _
79009 * @category Math
79010 * @param {Array} array The array to iterate over.
79011 * @returns {*} Returns the minimum value.
79012 * @example
79013 *
79014 * _.min([4, 2, 8, 6]);
79015 * // => 2
79016 *
79017 * _.min([]);
79018 * // => undefined
79019 */
79020function min(array) {
79021 return (array && array.length)
79022 ? baseExtremum(array, identity, baseLt)
79023 : undefined;
79024}
79025
79026module.exports = min;
79027
79028
79029/***/ }),
79030
79031/***/ "./node_modules/lodash/minBy.js":
79032/*!**************************************!*\
79033 !*** ./node_modules/lodash/minBy.js ***!
79034 \**************************************/
79035/*! no static exports found */
79036/***/ (function(module, exports, __webpack_require__) {
79037
79038var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"),
79039 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
79040 baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js");
79041
79042/**
79043 * This method is like `_.min` except that it accepts `iteratee` which is
79044 * invoked for each element in `array` to generate the criterion by which
79045 * the value is ranked. The iteratee is invoked with one argument: (value).
79046 *
79047 * @static
79048 * @memberOf _
79049 * @since 4.0.0
79050 * @category Math
79051 * @param {Array} array The array to iterate over.
79052 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
79053 * @returns {*} Returns the minimum value.
79054 * @example
79055 *
79056 * var objects = [{ 'n': 1 }, { 'n': 2 }];
79057 *
79058 * _.minBy(objects, function(o) { return o.n; });
79059 * // => { 'n': 1 }
79060 *
79061 * // The `_.property` iteratee shorthand.
79062 * _.minBy(objects, 'n');
79063 * // => { 'n': 1 }
79064 */
79065function minBy(array, iteratee) {
79066 return (array && array.length)
79067 ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt)
79068 : undefined;
79069}
79070
79071module.exports = minBy;
79072
79073
79074/***/ }),
79075
79076/***/ "./node_modules/lodash/noop.js":
79077/*!*************************************!*\
79078 !*** ./node_modules/lodash/noop.js ***!
79079 \*************************************/
79080/*! no static exports found */
79081/***/ (function(module, exports) {
79082
79083/**
79084 * This method returns `undefined`.
79085 *
79086 * @static
79087 * @memberOf _
79088 * @since 2.3.0
79089 * @category Util
79090 * @example
79091 *
79092 * _.times(2, _.noop);
79093 * // => [undefined, undefined]
79094 */
79095function noop() {
79096 // No operation performed.
79097}
79098
79099module.exports = noop;
79100
79101
79102/***/ }),
79103
79104/***/ "./node_modules/lodash/now.js":
79105/*!************************************!*\
79106 !*** ./node_modules/lodash/now.js ***!
79107 \************************************/
79108/*! no static exports found */
79109/***/ (function(module, exports, __webpack_require__) {
79110
79111var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
79112
79113/**
79114 * Gets the timestamp of the number of milliseconds that have elapsed since
79115 * the Unix epoch (1 January 1970 00:00:00 UTC).
79116 *
79117 * @static
79118 * @memberOf _
79119 * @since 2.4.0
79120 * @category Date
79121 * @returns {number} Returns the timestamp.
79122 * @example
79123 *
79124 * _.defer(function(stamp) {
79125 * console.log(_.now() - stamp);
79126 * }, _.now());
79127 * // => Logs the number of milliseconds it took for the deferred invocation.
79128 */
79129var now = function() {
79130 return root.Date.now();
79131};
79132
79133module.exports = now;
79134
79135
79136/***/ }),
79137
79138/***/ "./node_modules/lodash/pick.js":
79139/*!*************************************!*\
79140 !*** ./node_modules/lodash/pick.js ***!
79141 \*************************************/
79142/*! no static exports found */
79143/***/ (function(module, exports, __webpack_require__) {
79144
79145var basePick = __webpack_require__(/*! ./_basePick */ "./node_modules/lodash/_basePick.js"),
79146 flatRest = __webpack_require__(/*! ./_flatRest */ "./node_modules/lodash/_flatRest.js");
79147
79148/**
79149 * Creates an object composed of the picked `object` properties.
79150 *
79151 * @static
79152 * @since 0.1.0
79153 * @memberOf _
79154 * @category Object
79155 * @param {Object} object The source object.
79156 * @param {...(string|string[])} [paths] The property paths to pick.
79157 * @returns {Object} Returns the new object.
79158 * @example
79159 *
79160 * var object = { 'a': 1, 'b': '2', 'c': 3 };
79161 *
79162 * _.pick(object, ['a', 'c']);
79163 * // => { 'a': 1, 'c': 3 }
79164 */
79165var pick = flatRest(function(object, paths) {
79166 return object == null ? {} : basePick(object, paths);
79167});
79168
79169module.exports = pick;
79170
79171
79172/***/ }),
79173
79174/***/ "./node_modules/lodash/property.js":
79175/*!*****************************************!*\
79176 !*** ./node_modules/lodash/property.js ***!
79177 \*****************************************/
79178/*! no static exports found */
79179/***/ (function(module, exports, __webpack_require__) {
79180
79181var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"),
79182 basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/lodash/_basePropertyDeep.js"),
79183 isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"),
79184 toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js");
79185
79186/**
79187 * Creates a function that returns the value at `path` of a given object.
79188 *
79189 * @static
79190 * @memberOf _
79191 * @since 2.4.0
79192 * @category Util
79193 * @param {Array|string} path The path of the property to get.
79194 * @returns {Function} Returns the new accessor function.
79195 * @example
79196 *
79197 * var objects = [
79198 * { 'a': { 'b': 2 } },
79199 * { 'a': { 'b': 1 } }
79200 * ];
79201 *
79202 * _.map(objects, _.property('a.b'));
79203 * // => [2, 1]
79204 *
79205 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
79206 * // => [1, 2]
79207 */
79208function property(path) {
79209 return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
79210}
79211
79212module.exports = property;
79213
79214
79215/***/ }),
79216
79217/***/ "./node_modules/lodash/range.js":
79218/*!**************************************!*\
79219 !*** ./node_modules/lodash/range.js ***!
79220 \**************************************/
79221/*! no static exports found */
79222/***/ (function(module, exports, __webpack_require__) {
79223
79224var createRange = __webpack_require__(/*! ./_createRange */ "./node_modules/lodash/_createRange.js");
79225
79226/**
79227 * Creates an array of numbers (positive and/or negative) progressing from
79228 * `start` up to, but not including, `end`. A step of `-1` is used if a negative
79229 * `start` is specified without an `end` or `step`. If `end` is not specified,
79230 * it's set to `start` with `start` then set to `0`.
79231 *
79232 * **Note:** JavaScript follows the IEEE-754 standard for resolving
79233 * floating-point values which can produce unexpected results.
79234 *
79235 * @static
79236 * @since 0.1.0
79237 * @memberOf _
79238 * @category Util
79239 * @param {number} [start=0] The start of the range.
79240 * @param {number} end The end of the range.
79241 * @param {number} [step=1] The value to increment or decrement by.
79242 * @returns {Array} Returns the range of numbers.
79243 * @see _.inRange, _.rangeRight
79244 * @example
79245 *
79246 * _.range(4);
79247 * // => [0, 1, 2, 3]
79248 *
79249 * _.range(-4);
79250 * // => [0, -1, -2, -3]
79251 *
79252 * _.range(1, 5);
79253 * // => [1, 2, 3, 4]
79254 *
79255 * _.range(0, 20, 5);
79256 * // => [0, 5, 10, 15]
79257 *
79258 * _.range(0, -4, -1);
79259 * // => [0, -1, -2, -3]
79260 *
79261 * _.range(1, 4, 0);
79262 * // => [1, 1, 1]
79263 *
79264 * _.range(0);
79265 * // => []
79266 */
79267var range = createRange();
79268
79269module.exports = range;
79270
79271
79272/***/ }),
79273
79274/***/ "./node_modules/lodash/reduce.js":
79275/*!***************************************!*\
79276 !*** ./node_modules/lodash/reduce.js ***!
79277 \***************************************/
79278/*! no static exports found */
79279/***/ (function(module, exports, __webpack_require__) {
79280
79281var arrayReduce = __webpack_require__(/*! ./_arrayReduce */ "./node_modules/lodash/_arrayReduce.js"),
79282 baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"),
79283 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
79284 baseReduce = __webpack_require__(/*! ./_baseReduce */ "./node_modules/lodash/_baseReduce.js"),
79285 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js");
79286
79287/**
79288 * Reduces `collection` to a value which is the accumulated result of running
79289 * each element in `collection` thru `iteratee`, where each successive
79290 * invocation is supplied the return value of the previous. If `accumulator`
79291 * is not given, the first element of `collection` is used as the initial
79292 * value. The iteratee is invoked with four arguments:
79293 * (accumulator, value, index|key, collection).
79294 *
79295 * Many lodash methods are guarded to work as iteratees for methods like
79296 * `_.reduce`, `_.reduceRight`, and `_.transform`.
79297 *
79298 * The guarded methods are:
79299 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
79300 * and `sortBy`
79301 *
79302 * @static
79303 * @memberOf _
79304 * @since 0.1.0
79305 * @category Collection
79306 * @param {Array|Object} collection The collection to iterate over.
79307 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
79308 * @param {*} [accumulator] The initial value.
79309 * @returns {*} Returns the accumulated value.
79310 * @see _.reduceRight
79311 * @example
79312 *
79313 * _.reduce([1, 2], function(sum, n) {
79314 * return sum + n;
79315 * }, 0);
79316 * // => 3
79317 *
79318 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
79319 * (result[value] || (result[value] = [])).push(key);
79320 * return result;
79321 * }, {});
79322 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
79323 */
79324function reduce(collection, iteratee, accumulator) {
79325 var func = isArray(collection) ? arrayReduce : baseReduce,
79326 initAccum = arguments.length < 3;
79327
79328 return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
79329}
79330
79331module.exports = reduce;
79332
79333
79334/***/ }),
79335
79336/***/ "./node_modules/lodash/size.js":
79337/*!*************************************!*\
79338 !*** ./node_modules/lodash/size.js ***!
79339 \*************************************/
79340/*! no static exports found */
79341/***/ (function(module, exports, __webpack_require__) {
79342
79343var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"),
79344 getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"),
79345 isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"),
79346 isString = __webpack_require__(/*! ./isString */ "./node_modules/lodash/isString.js"),
79347 stringSize = __webpack_require__(/*! ./_stringSize */ "./node_modules/lodash/_stringSize.js");
79348
79349/** `Object#toString` result references. */
79350var mapTag = '[object Map]',
79351 setTag = '[object Set]';
79352
79353/**
79354 * Gets the size of `collection` by returning its length for array-like
79355 * values or the number of own enumerable string keyed properties for objects.
79356 *
79357 * @static
79358 * @memberOf _
79359 * @since 0.1.0
79360 * @category Collection
79361 * @param {Array|Object|string} collection The collection to inspect.
79362 * @returns {number} Returns the collection size.
79363 * @example
79364 *
79365 * _.size([1, 2, 3]);
79366 * // => 3
79367 *
79368 * _.size({ 'a': 1, 'b': 2 });
79369 * // => 2
79370 *
79371 * _.size('pebbles');
79372 * // => 7
79373 */
79374function size(collection) {
79375 if (collection == null) {
79376 return 0;
79377 }
79378 if (isArrayLike(collection)) {
79379 return isString(collection) ? stringSize(collection) : collection.length;
79380 }
79381 var tag = getTag(collection);
79382 if (tag == mapTag || tag == setTag) {
79383 return collection.size;
79384 }
79385 return baseKeys(collection).length;
79386}
79387
79388module.exports = size;
79389
79390
79391/***/ }),
79392
79393/***/ "./node_modules/lodash/sortBy.js":
79394/*!***************************************!*\
79395 !*** ./node_modules/lodash/sortBy.js ***!
79396 \***************************************/
79397/*! no static exports found */
79398/***/ (function(module, exports, __webpack_require__) {
79399
79400var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"),
79401 baseOrderBy = __webpack_require__(/*! ./_baseOrderBy */ "./node_modules/lodash/_baseOrderBy.js"),
79402 baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
79403 isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js");
79404
79405/**
79406 * Creates an array of elements, sorted in ascending order by the results of
79407 * running each element in a collection thru each iteratee. This method
79408 * performs a stable sort, that is, it preserves the original sort order of
79409 * equal elements. The iteratees are invoked with one argument: (value).
79410 *
79411 * @static
79412 * @memberOf _
79413 * @since 0.1.0
79414 * @category Collection
79415 * @param {Array|Object} collection The collection to iterate over.
79416 * @param {...(Function|Function[])} [iteratees=[_.identity]]
79417 * The iteratees to sort by.
79418 * @returns {Array} Returns the new sorted array.
79419 * @example
79420 *
79421 * var users = [
79422 * { 'user': 'fred', 'age': 48 },
79423 * { 'user': 'barney', 'age': 36 },
79424 * { 'user': 'fred', 'age': 40 },
79425 * { 'user': 'barney', 'age': 34 }
79426 * ];
79427 *
79428 * _.sortBy(users, [function(o) { return o.user; }]);
79429 * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
79430 *
79431 * _.sortBy(users, ['user', 'age']);
79432 * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
79433 */
79434var sortBy = baseRest(function(collection, iteratees) {
79435 if (collection == null) {
79436 return [];
79437 }
79438 var length = iteratees.length;
79439 if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
79440 iteratees = [];
79441 } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
79442 iteratees = [iteratees[0]];
79443 }
79444 return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
79445});
79446
79447module.exports = sortBy;
79448
79449
79450/***/ }),
79451
79452/***/ "./node_modules/lodash/stubArray.js":
79453/*!******************************************!*\
79454 !*** ./node_modules/lodash/stubArray.js ***!
79455 \******************************************/
79456/*! no static exports found */
79457/***/ (function(module, exports) {
79458
79459/**
79460 * This method returns a new empty array.
79461 *
79462 * @static
79463 * @memberOf _
79464 * @since 4.13.0
79465 * @category Util
79466 * @returns {Array} Returns the new empty array.
79467 * @example
79468 *
79469 * var arrays = _.times(2, _.stubArray);
79470 *
79471 * console.log(arrays);
79472 * // => [[], []]
79473 *
79474 * console.log(arrays[0] === arrays[1]);
79475 * // => false
79476 */
79477function stubArray() {
79478 return [];
79479}
79480
79481module.exports = stubArray;
79482
79483
79484/***/ }),
79485
79486/***/ "./node_modules/lodash/stubFalse.js":
79487/*!******************************************!*\
79488 !*** ./node_modules/lodash/stubFalse.js ***!
79489 \******************************************/
79490/*! no static exports found */
79491/***/ (function(module, exports) {
79492
79493/**
79494 * This method returns `false`.
79495 *
79496 * @static
79497 * @memberOf _
79498 * @since 4.13.0
79499 * @category Util
79500 * @returns {boolean} Returns `false`.
79501 * @example
79502 *
79503 * _.times(2, _.stubFalse);
79504 * // => [false, false]
79505 */
79506function stubFalse() {
79507 return false;
79508}
79509
79510module.exports = stubFalse;
79511
79512
79513/***/ }),
79514
79515/***/ "./node_modules/lodash/toFinite.js":
79516/*!*****************************************!*\
79517 !*** ./node_modules/lodash/toFinite.js ***!
79518 \*****************************************/
79519/*! no static exports found */
79520/***/ (function(module, exports, __webpack_require__) {
79521
79522var toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js");
79523
79524/** Used as references for various `Number` constants. */
79525var INFINITY = 1 / 0,
79526 MAX_INTEGER = 1.7976931348623157e+308;
79527
79528/**
79529 * Converts `value` to a finite number.
79530 *
79531 * @static
79532 * @memberOf _
79533 * @since 4.12.0
79534 * @category Lang
79535 * @param {*} value The value to convert.
79536 * @returns {number} Returns the converted number.
79537 * @example
79538 *
79539 * _.toFinite(3.2);
79540 * // => 3.2
79541 *
79542 * _.toFinite(Number.MIN_VALUE);
79543 * // => 5e-324
79544 *
79545 * _.toFinite(Infinity);
79546 * // => 1.7976931348623157e+308
79547 *
79548 * _.toFinite('3.2');
79549 * // => 3.2
79550 */
79551function toFinite(value) {
79552 if (!value) {
79553 return value === 0 ? value : 0;
79554 }
79555 value = toNumber(value);
79556 if (value === INFINITY || value === -INFINITY) {
79557 var sign = (value < 0 ? -1 : 1);
79558 return sign * MAX_INTEGER;
79559 }
79560 return value === value ? value : 0;
79561}
79562
79563module.exports = toFinite;
79564
79565
79566/***/ }),
79567
79568/***/ "./node_modules/lodash/toInteger.js":
79569/*!******************************************!*\
79570 !*** ./node_modules/lodash/toInteger.js ***!
79571 \******************************************/
79572/*! no static exports found */
79573/***/ (function(module, exports, __webpack_require__) {
79574
79575var toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js");
79576
79577/**
79578 * Converts `value` to an integer.
79579 *
79580 * **Note:** This method is loosely based on
79581 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
79582 *
79583 * @static
79584 * @memberOf _
79585 * @since 4.0.0
79586 * @category Lang
79587 * @param {*} value The value to convert.
79588 * @returns {number} Returns the converted integer.
79589 * @example
79590 *
79591 * _.toInteger(3.2);
79592 * // => 3
79593 *
79594 * _.toInteger(Number.MIN_VALUE);
79595 * // => 0
79596 *
79597 * _.toInteger(Infinity);
79598 * // => 1.7976931348623157e+308
79599 *
79600 * _.toInteger('3.2');
79601 * // => 3
79602 */
79603function toInteger(value) {
79604 var result = toFinite(value),
79605 remainder = result % 1;
79606
79607 return result === result ? (remainder ? result - remainder : result) : 0;
79608}
79609
79610module.exports = toInteger;
79611
79612
79613/***/ }),
79614
79615/***/ "./node_modules/lodash/toNumber.js":
79616/*!*****************************************!*\
79617 !*** ./node_modules/lodash/toNumber.js ***!
79618 \*****************************************/
79619/*! no static exports found */
79620/***/ (function(module, exports, __webpack_require__) {
79621
79622var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
79623 isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
79624
79625/** Used as references for various `Number` constants. */
79626var NAN = 0 / 0;
79627
79628/** Used to match leading and trailing whitespace. */
79629var reTrim = /^\s+|\s+$/g;
79630
79631/** Used to detect bad signed hexadecimal string values. */
79632var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
79633
79634/** Used to detect binary string values. */
79635var reIsBinary = /^0b[01]+$/i;
79636
79637/** Used to detect octal string values. */
79638var reIsOctal = /^0o[0-7]+$/i;
79639
79640/** Built-in method references without a dependency on `root`. */
79641var freeParseInt = parseInt;
79642
79643/**
79644 * Converts `value` to a number.
79645 *
79646 * @static
79647 * @memberOf _
79648 * @since 4.0.0
79649 * @category Lang
79650 * @param {*} value The value to process.
79651 * @returns {number} Returns the number.
79652 * @example
79653 *
79654 * _.toNumber(3.2);
79655 * // => 3.2
79656 *
79657 * _.toNumber(Number.MIN_VALUE);
79658 * // => 5e-324
79659 *
79660 * _.toNumber(Infinity);
79661 * // => Infinity
79662 *
79663 * _.toNumber('3.2');
79664 * // => 3.2
79665 */
79666function toNumber(value) {
79667 if (typeof value == 'number') {
79668 return value;
79669 }
79670 if (isSymbol(value)) {
79671 return NAN;
79672 }
79673 if (isObject(value)) {
79674 var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
79675 value = isObject(other) ? (other + '') : other;
79676 }
79677 if (typeof value != 'string') {
79678 return value === 0 ? value : +value;
79679 }
79680 value = value.replace(reTrim, '');
79681 var isBinary = reIsBinary.test(value);
79682 return (isBinary || reIsOctal.test(value))
79683 ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
79684 : (reIsBadHex.test(value) ? NAN : +value);
79685}
79686
79687module.exports = toNumber;
79688
79689
79690/***/ }),
79691
79692/***/ "./node_modules/lodash/toPlainObject.js":
79693/*!**********************************************!*\
79694 !*** ./node_modules/lodash/toPlainObject.js ***!
79695 \**********************************************/
79696/*! no static exports found */
79697/***/ (function(module, exports, __webpack_require__) {
79698
79699var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"),
79700 keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js");
79701
79702/**
79703 * Converts `value` to a plain object flattening inherited enumerable string
79704 * keyed properties of `value` to own properties of the plain object.
79705 *
79706 * @static
79707 * @memberOf _
79708 * @since 3.0.0
79709 * @category Lang
79710 * @param {*} value The value to convert.
79711 * @returns {Object} Returns the converted plain object.
79712 * @example
79713 *
79714 * function Foo() {
79715 * this.b = 2;
79716 * }
79717 *
79718 * Foo.prototype.c = 3;
79719 *
79720 * _.assign({ 'a': 1 }, new Foo);
79721 * // => { 'a': 1, 'b': 2 }
79722 *
79723 * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
79724 * // => { 'a': 1, 'b': 2, 'c': 3 }
79725 */
79726function toPlainObject(value) {
79727 return copyObject(value, keysIn(value));
79728}
79729
79730module.exports = toPlainObject;
79731
79732
79733/***/ }),
79734
79735/***/ "./node_modules/lodash/toString.js":
79736/*!*****************************************!*\
79737 !*** ./node_modules/lodash/toString.js ***!
79738 \*****************************************/
79739/*! no static exports found */
79740/***/ (function(module, exports, __webpack_require__) {
79741
79742var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js");
79743
79744/**
79745 * Converts `value` to a string. An empty string is returned for `null`
79746 * and `undefined` values. The sign of `-0` is preserved.
79747 *
79748 * @static
79749 * @memberOf _
79750 * @since 4.0.0
79751 * @category Lang
79752 * @param {*} value The value to convert.
79753 * @returns {string} Returns the converted string.
79754 * @example
79755 *
79756 * _.toString(null);
79757 * // => ''
79758 *
79759 * _.toString(-0);
79760 * // => '-0'
79761 *
79762 * _.toString([1, 2, 3]);
79763 * // => '1,2,3'
79764 */
79765function toString(value) {
79766 return value == null ? '' : baseToString(value);
79767}
79768
79769module.exports = toString;
79770
79771
79772/***/ }),
79773
79774/***/ "./node_modules/lodash/transform.js":
79775/*!******************************************!*\
79776 !*** ./node_modules/lodash/transform.js ***!
79777 \******************************************/
79778/*! no static exports found */
79779/***/ (function(module, exports, __webpack_require__) {
79780
79781var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"),
79782 baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"),
79783 baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"),
79784 baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"),
79785 getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"),
79786 isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
79787 isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"),
79788 isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"),
79789 isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"),
79790 isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js");
79791
79792/**
79793 * An alternative to `_.reduce`; this method transforms `object` to a new
79794 * `accumulator` object which is the result of running each of its own
79795 * enumerable string keyed properties thru `iteratee`, with each invocation
79796 * potentially mutating the `accumulator` object. If `accumulator` is not
79797 * provided, a new object with the same `[[Prototype]]` will be used. The
79798 * iteratee is invoked with four arguments: (accumulator, value, key, object).
79799 * Iteratee functions may exit iteration early by explicitly returning `false`.
79800 *
79801 * @static
79802 * @memberOf _
79803 * @since 1.3.0
79804 * @category Object
79805 * @param {Object} object The object to iterate over.
79806 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
79807 * @param {*} [accumulator] The custom accumulator value.
79808 * @returns {*} Returns the accumulated value.
79809 * @example
79810 *
79811 * _.transform([2, 3, 4], function(result, n) {
79812 * result.push(n *= n);
79813 * return n % 2 == 0;
79814 * }, []);
79815 * // => [4, 9]
79816 *
79817 * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
79818 * (result[value] || (result[value] = [])).push(key);
79819 * }, {});
79820 * // => { '1': ['a', 'c'], '2': ['b'] }
79821 */
79822function transform(object, iteratee, accumulator) {
79823 var isArr = isArray(object),
79824 isArrLike = isArr || isBuffer(object) || isTypedArray(object);
79825
79826 iteratee = baseIteratee(iteratee, 4);
79827 if (accumulator == null) {
79828 var Ctor = object && object.constructor;
79829 if (isArrLike) {
79830 accumulator = isArr ? new Ctor : [];
79831 }
79832 else if (isObject(object)) {
79833 accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
79834 }
79835 else {
79836 accumulator = {};
79837 }
79838 }
79839 (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
79840 return iteratee(accumulator, value, index, object);
79841 });
79842 return accumulator;
79843}
79844
79845module.exports = transform;
79846
79847
79848/***/ }),
79849
79850/***/ "./node_modules/lodash/union.js":
79851/*!**************************************!*\
79852 !*** ./node_modules/lodash/union.js ***!
79853 \**************************************/
79854/*! no static exports found */
79855/***/ (function(module, exports, __webpack_require__) {
79856
79857var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"),
79858 baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"),
79859 baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/lodash/_baseUniq.js"),
79860 isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js");
79861
79862/**
79863 * Creates an array of unique values, in order, from all given arrays using
79864 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
79865 * for equality comparisons.
79866 *
79867 * @static
79868 * @memberOf _
79869 * @since 0.1.0
79870 * @category Array
79871 * @param {...Array} [arrays] The arrays to inspect.
79872 * @returns {Array} Returns the new array of combined values.
79873 * @example
79874 *
79875 * _.union([2], [1, 2]);
79876 * // => [2, 1]
79877 */
79878var union = baseRest(function(arrays) {
79879 return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
79880});
79881
79882module.exports = union;
79883
79884
79885/***/ }),
79886
79887/***/ "./node_modules/lodash/uniqueId.js":
79888/*!*****************************************!*\
79889 !*** ./node_modules/lodash/uniqueId.js ***!
79890 \*****************************************/
79891/*! no static exports found */
79892/***/ (function(module, exports, __webpack_require__) {
79893
79894var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
79895
79896/** Used to generate unique IDs. */
79897var idCounter = 0;
79898
79899/**
79900 * Generates a unique ID. If `prefix` is given, the ID is appended to it.
79901 *
79902 * @static
79903 * @since 0.1.0
79904 * @memberOf _
79905 * @category Util
79906 * @param {string} [prefix=''] The value to prefix the ID with.
79907 * @returns {string} Returns the unique ID.
79908 * @example
79909 *
79910 * _.uniqueId('contact_');
79911 * // => 'contact_104'
79912 *
79913 * _.uniqueId();
79914 * // => '105'
79915 */
79916function uniqueId(prefix) {
79917 var id = ++idCounter;
79918 return toString(prefix) + id;
79919}
79920
79921module.exports = uniqueId;
79922
79923
79924/***/ }),
79925
79926/***/ "./node_modules/lodash/values.js":
79927/*!***************************************!*\
79928 !*** ./node_modules/lodash/values.js ***!
79929 \***************************************/
79930/*! no static exports found */
79931/***/ (function(module, exports, __webpack_require__) {
79932
79933var baseValues = __webpack_require__(/*! ./_baseValues */ "./node_modules/lodash/_baseValues.js"),
79934 keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js");
79935
79936/**
79937 * Creates an array of the own enumerable string keyed property values of `object`.
79938 *
79939 * **Note:** Non-object values are coerced to objects.
79940 *
79941 * @static
79942 * @since 0.1.0
79943 * @memberOf _
79944 * @category Object
79945 * @param {Object} object The object to query.
79946 * @returns {Array} Returns the array of property values.
79947 * @example
79948 *
79949 * function Foo() {
79950 * this.a = 1;
79951 * this.b = 2;
79952 * }
79953 *
79954 * Foo.prototype.c = 3;
79955 *
79956 * _.values(new Foo);
79957 * // => [1, 2] (iteration order is not guaranteed)
79958 *
79959 * _.values('hi');
79960 * // => ['h', 'i']
79961 */
79962function values(object) {
79963 return object == null ? [] : baseValues(object, keys(object));
79964}
79965
79966module.exports = values;
79967
79968
79969/***/ }),
79970
79971/***/ "./node_modules/lodash/zipObject.js":
79972/*!******************************************!*\
79973 !*** ./node_modules/lodash/zipObject.js ***!
79974 \******************************************/
79975/*! no static exports found */
79976/***/ (function(module, exports, __webpack_require__) {
79977
79978var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"),
79979 baseZipObject = __webpack_require__(/*! ./_baseZipObject */ "./node_modules/lodash/_baseZipObject.js");
79980
79981/**
79982 * This method is like `_.fromPairs` except that it accepts two arrays,
79983 * one of property identifiers and one of corresponding values.
79984 *
79985 * @static
79986 * @memberOf _
79987 * @since 0.4.0
79988 * @category Array
79989 * @param {Array} [props=[]] The property identifiers.
79990 * @param {Array} [values=[]] The property values.
79991 * @returns {Object} Returns the new object.
79992 * @example
79993 *
79994 * _.zipObject(['a', 'b'], [1, 2]);
79995 * // => { 'a': 1, 'b': 2 }
79996 */
79997function zipObject(props, values) {
79998 return baseZipObject(props || [], values || [], assignValue);
79999}
80000
80001module.exports = zipObject;
80002
80003
80004/***/ }),
80005
80006/***/ "./node_modules/md5.js/index.js":
80007/*!**************************************!*\
80008 !*** ./node_modules/md5.js/index.js ***!
80009 \**************************************/
80010/*! no static exports found */
80011/***/ (function(module, exports, __webpack_require__) {
80012
80013"use strict";
80014
80015var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
80016var HashBase = __webpack_require__(/*! hash-base */ "./node_modules/hash-base/index.js")
80017var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
80018
80019var ARRAY16 = new Array(16)
80020
80021function MD5 () {
80022 HashBase.call(this, 64)
80023
80024 // state
80025 this._a = 0x67452301
80026 this._b = 0xefcdab89
80027 this._c = 0x98badcfe
80028 this._d = 0x10325476
80029}
80030
80031inherits(MD5, HashBase)
80032
80033MD5.prototype._update = function () {
80034 var M = ARRAY16
80035 for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)
80036
80037 var a = this._a
80038 var b = this._b
80039 var c = this._c
80040 var d = this._d
80041
80042 a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)
80043 d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)
80044 c = fnF(c, d, a, b, M[2], 0x242070db, 17)
80045 b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)
80046 a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)
80047 d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)
80048 c = fnF(c, d, a, b, M[6], 0xa8304613, 17)
80049 b = fnF(b, c, d, a, M[7], 0xfd469501, 22)
80050 a = fnF(a, b, c, d, M[8], 0x698098d8, 7)
80051 d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)
80052 c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)
80053 b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)
80054 a = fnF(a, b, c, d, M[12], 0x6b901122, 7)
80055 d = fnF(d, a, b, c, M[13], 0xfd987193, 12)
80056 c = fnF(c, d, a, b, M[14], 0xa679438e, 17)
80057 b = fnF(b, c, d, a, M[15], 0x49b40821, 22)
80058
80059 a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)
80060 d = fnG(d, a, b, c, M[6], 0xc040b340, 9)
80061 c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)
80062 b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)
80063 a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)
80064 d = fnG(d, a, b, c, M[10], 0x02441453, 9)
80065 c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)
80066 b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)
80067 a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)
80068 d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)
80069 c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)
80070 b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)
80071 a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)
80072 d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)
80073 c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)
80074 b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)
80075
80076 a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)
80077 d = fnH(d, a, b, c, M[8], 0x8771f681, 11)
80078 c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)
80079 b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)
80080 a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)
80081 d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)
80082 c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)
80083 b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)
80084 a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)
80085 d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)
80086 c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)
80087 b = fnH(b, c, d, a, M[6], 0x04881d05, 23)
80088 a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)
80089 d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)
80090 c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)
80091 b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)
80092
80093 a = fnI(a, b, c, d, M[0], 0xf4292244, 6)
80094 d = fnI(d, a, b, c, M[7], 0x432aff97, 10)
80095 c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)
80096 b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)
80097 a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)
80098 d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)
80099 c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)
80100 b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)
80101 a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)
80102 d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)
80103 c = fnI(c, d, a, b, M[6], 0xa3014314, 15)
80104 b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)
80105 a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)
80106 d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)
80107 c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)
80108 b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)
80109
80110 this._a = (this._a + a) | 0
80111 this._b = (this._b + b) | 0
80112 this._c = (this._c + c) | 0
80113 this._d = (this._d + d) | 0
80114}
80115
80116MD5.prototype._digest = function () {
80117 // create padding and handle blocks
80118 this._block[this._blockOffset++] = 0x80
80119 if (this._blockOffset > 56) {
80120 this._block.fill(0, this._blockOffset, 64)
80121 this._update()
80122 this._blockOffset = 0
80123 }
80124
80125 this._block.fill(0, this._blockOffset, 56)
80126 this._block.writeUInt32LE(this._length[0], 56)
80127 this._block.writeUInt32LE(this._length[1], 60)
80128 this._update()
80129
80130 // produce result
80131 var buffer = Buffer.allocUnsafe(16)
80132 buffer.writeInt32LE(this._a, 0)
80133 buffer.writeInt32LE(this._b, 4)
80134 buffer.writeInt32LE(this._c, 8)
80135 buffer.writeInt32LE(this._d, 12)
80136 return buffer
80137}
80138
80139function rotl (x, n) {
80140 return (x << n) | (x >>> (32 - n))
80141}
80142
80143function fnF (a, b, c, d, m, k, s) {
80144 return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0
80145}
80146
80147function fnG (a, b, c, d, m, k, s) {
80148 return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0
80149}
80150
80151function fnH (a, b, c, d, m, k, s) {
80152 return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0
80153}
80154
80155function fnI (a, b, c, d, m, k, s) {
80156 return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0
80157}
80158
80159module.exports = MD5
80160
80161
80162/***/ }),
80163
80164/***/ "./node_modules/miller-rabin/lib/mr.js":
80165/*!*********************************************!*\
80166 !*** ./node_modules/miller-rabin/lib/mr.js ***!
80167 \*********************************************/
80168/*! no static exports found */
80169/***/ (function(module, exports, __webpack_require__) {
80170
80171var bn = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js");
80172var brorand = __webpack_require__(/*! brorand */ "./node_modules/brorand/index.js");
80173
80174function MillerRabin(rand) {
80175 this.rand = rand || new brorand.Rand();
80176}
80177module.exports = MillerRabin;
80178
80179MillerRabin.create = function create(rand) {
80180 return new MillerRabin(rand);
80181};
80182
80183MillerRabin.prototype._randbelow = function _randbelow(n) {
80184 var len = n.bitLength();
80185 var min_bytes = Math.ceil(len / 8);
80186
80187 // Generage random bytes until a number less than n is found.
80188 // This ensures that 0..n-1 have an equal probability of being selected.
80189 do
80190 var a = new bn(this.rand.generate(min_bytes));
80191 while (a.cmp(n) >= 0);
80192
80193 return a;
80194};
80195
80196MillerRabin.prototype._randrange = function _randrange(start, stop) {
80197 // Generate a random number greater than or equal to start and less than stop.
80198 var size = stop.sub(start);
80199 return start.add(this._randbelow(size));
80200};
80201
80202MillerRabin.prototype.test = function test(n, k, cb) {
80203 var len = n.bitLength();
80204 var red = bn.mont(n);
80205 var rone = new bn(1).toRed(red);
80206
80207 if (!k)
80208 k = Math.max(1, (len / 48) | 0);
80209
80210 // Find d and s, (n - 1) = (2 ^ s) * d;
80211 var n1 = n.subn(1);
80212 for (var s = 0; !n1.testn(s); s++) {}
80213 var d = n.shrn(s);
80214
80215 var rn1 = n1.toRed(red);
80216
80217 var prime = true;
80218 for (; k > 0; k--) {
80219 var a = this._randrange(new bn(2), n1);
80220 if (cb)
80221 cb(a);
80222
80223 var x = a.toRed(red).redPow(d);
80224 if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
80225 continue;
80226
80227 for (var i = 1; i < s; i++) {
80228 x = x.redSqr();
80229
80230 if (x.cmp(rone) === 0)
80231 return false;
80232 if (x.cmp(rn1) === 0)
80233 break;
80234 }
80235
80236 if (i === s)
80237 return false;
80238 }
80239
80240 return prime;
80241};
80242
80243MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
80244 var len = n.bitLength();
80245 var red = bn.mont(n);
80246 var rone = new bn(1).toRed(red);
80247
80248 if (!k)
80249 k = Math.max(1, (len / 48) | 0);
80250
80251 // Find d and s, (n - 1) = (2 ^ s) * d;
80252 var n1 = n.subn(1);
80253 for (var s = 0; !n1.testn(s); s++) {}
80254 var d = n.shrn(s);
80255
80256 var rn1 = n1.toRed(red);
80257
80258 for (; k > 0; k--) {
80259 var a = this._randrange(new bn(2), n1);
80260
80261 var g = n.gcd(a);
80262 if (g.cmpn(1) !== 0)
80263 return g;
80264
80265 var x = a.toRed(red).redPow(d);
80266 if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
80267 continue;
80268
80269 for (var i = 1; i < s; i++) {
80270 x = x.redSqr();
80271
80272 if (x.cmp(rone) === 0)
80273 return x.fromRed().subn(1).gcd(n);
80274 if (x.cmp(rn1) === 0)
80275 break;
80276 }
80277
80278 if (i === s) {
80279 x = x.redSqr();
80280 return x.fromRed().subn(1).gcd(n);
80281 }
80282 }
80283
80284 return false;
80285};
80286
80287
80288/***/ }),
80289
80290/***/ "./node_modules/minimalistic-assert/index.js":
80291/*!***************************************************!*\
80292 !*** ./node_modules/minimalistic-assert/index.js ***!
80293 \***************************************************/
80294/*! no static exports found */
80295/***/ (function(module, exports) {
80296
80297module.exports = assert;
80298
80299function assert(val, msg) {
80300 if (!val)
80301 throw new Error(msg || 'Assertion failed');
80302}
80303
80304assert.equal = function assertEqual(l, r, msg) {
80305 if (l != r)
80306 throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
80307};
80308
80309
80310/***/ }),
80311
80312/***/ "./node_modules/minimalistic-crypto-utils/lib/utils.js":
80313/*!*************************************************************!*\
80314 !*** ./node_modules/minimalistic-crypto-utils/lib/utils.js ***!
80315 \*************************************************************/
80316/*! no static exports found */
80317/***/ (function(module, exports, __webpack_require__) {
80318
80319"use strict";
80320
80321
80322var utils = exports;
80323
80324function toArray(msg, enc) {
80325 if (Array.isArray(msg))
80326 return msg.slice();
80327 if (!msg)
80328 return [];
80329 var res = [];
80330 if (typeof msg !== 'string') {
80331 for (var i = 0; i < msg.length; i++)
80332 res[i] = msg[i] | 0;
80333 return res;
80334 }
80335 if (enc === 'hex') {
80336 msg = msg.replace(/[^a-z0-9]+/ig, '');
80337 if (msg.length % 2 !== 0)
80338 msg = '0' + msg;
80339 for (var i = 0; i < msg.length; i += 2)
80340 res.push(parseInt(msg[i] + msg[i + 1], 16));
80341 } else {
80342 for (var i = 0; i < msg.length; i++) {
80343 var c = msg.charCodeAt(i);
80344 var hi = c >> 8;
80345 var lo = c & 0xff;
80346 if (hi)
80347 res.push(hi, lo);
80348 else
80349 res.push(lo);
80350 }
80351 }
80352 return res;
80353}
80354utils.toArray = toArray;
80355
80356function zero2(word) {
80357 if (word.length === 1)
80358 return '0' + word;
80359 else
80360 return word;
80361}
80362utils.zero2 = zero2;
80363
80364function toHex(msg) {
80365 var res = '';
80366 for (var i = 0; i < msg.length; i++)
80367 res += zero2(msg[i].toString(16));
80368 return res;
80369}
80370utils.toHex = toHex;
80371
80372utils.encode = function encode(arr, enc) {
80373 if (enc === 'hex')
80374 return toHex(arr);
80375 else
80376 return arr;
80377};
80378
80379
80380/***/ }),
80381
80382/***/ "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$":
80383/*!*******************************************************!*\
80384 !*** ./node_modules/moment-mini/locale sync ^\.\/.*$ ***!
80385 \*******************************************************/
80386/*! no static exports found */
80387/***/ (function(module, exports, __webpack_require__) {
80388
80389var map = {
80390 "./locale": "./node_modules/moment-mini/locale/locale.js",
80391 "./locale.js": "./node_modules/moment-mini/locale/locale.js"
80392};
80393
80394
80395function webpackContext(req) {
80396 var id = webpackContextResolve(req);
80397 return __webpack_require__(id);
80398}
80399function webpackContextResolve(req) {
80400 if(!__webpack_require__.o(map, req)) {
80401 var e = new Error("Cannot find module '" + req + "'");
80402 e.code = 'MODULE_NOT_FOUND';
80403 throw e;
80404 }
80405 return map[req];
80406}
80407webpackContext.keys = function webpackContextKeys() {
80408 return Object.keys(map);
80409};
80410webpackContext.resolve = webpackContextResolve;
80411module.exports = webpackContext;
80412webpackContext.id = "./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$";
80413
80414/***/ }),
80415
80416/***/ "./node_modules/moment-mini/locale/locale.js":
80417/*!***************************************************!*\
80418 !*** ./node_modules/moment-mini/locale/locale.js ***!
80419 \***************************************************/
80420/*! no static exports found */
80421/***/ (function(module, exports) {
80422
80423
80424
80425/***/ }),
80426
80427/***/ "./node_modules/moment-mini/moment.min.js":
80428/*!************************************************!*\
80429 !*** ./node_modules/moment-mini/moment.min.js ***!
80430 \************************************************/
80431/*! no static exports found */
80432/***/ (function(module, exports, __webpack_require__) {
80433
80434/* WEBPACK VAR INJECTION */(function(module) {!function(e,t){ true?module.exports=t():undefined}(this,function(){"use strict";var e,i;function c(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _(e,t){for(var n in t)m(t,n)&&(e[n]=t[n]);return m(t,"toString")&&(e.toString=t.toString),m(t,"valueOf")&&(e.valueOf=t.valueOf),e}function y(e,t,n,s){return Ot(e,t,n,s,!0).utc()}function g(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function p(e){if(null==e._isValid){var t=g(e),n=i.call(t.parsedDateParts,function(e){return null!=e}),s=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(s=s&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return s;e._isValid=s}return e._isValid}function v(e){var t=y(NaN);return null!=e?_(g(t),e):g(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,s=0;s<n;s++)if(s in t&&e.call(this,t[s],s,t))return!0;return!1};var r=c.momentProperties=[];function w(e,t){var n,s,i;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),0<r.length)for(n=0;n<r.length;n++)l(i=t[s=r[n]])||(e[s]=i);return e}var t=!1;function M(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===t&&(t=!0,c.updateOffset(this),t=!1)}function S(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function D(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function k(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=D(t)),n}function a(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&k(e[s])!==k(t[s]))&&a++;return a+r}function Y(e){!1===c.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(i,r){var a=!0;return _(function(){if(null!=c.deprecationHandler&&c.deprecationHandler(null,i),a){for(var e,t=[],n=0;n<arguments.length;n++){if(e="","object"==typeof arguments[n]){for(var s in e+="\n["+n+"] ",arguments[0])e+=s+": "+arguments[0][s]+", ";e=e.slice(0,-2)}else e=arguments[n];t.push(e)}Y(i+"\nArguments: "+Array.prototype.slice.call(t).join("")+"\n"+(new Error).stack),a=!1}return r.apply(this,arguments)},r)}var s,O={};function T(e,t){null!=c.deprecationHandler&&c.deprecationHandler(e,t),O[e]||(Y(t),O[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function b(e,t){var n,s=_({},e);for(n in t)m(t,n)&&(u(e[n])&&u(t[n])?(s[n]={},_(s[n],e[n]),_(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)m(e,n)&&!m(t,n)&&u(e[n])&&(s[n]=_({},s[n]));return s}function P(e){null!=e&&this.set(e)}c.suppressDeprecationWarnings=!1,c.deprecationHandler=null,s=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)m(e,t)&&n.push(t);return n};var W={};function H(e,t){var n=e.toLowerCase();W[n]=W[n+"s"]=W[t]=e}function R(e){return"string"==typeof e?W[e]||W[e.toLowerCase()]:void 0}function C(e){var t,n,s={};for(n in e)m(e,n)&&(t=R(n))&&(s[t]=e[n]);return s}var F={};function L(e,t){F[e]=t}function U(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,G=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},E={};function I(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return U(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=j(t,e.localeData()),V[t]=V[t]||function(s){var e,i,t,r=s.match(N);for(e=0,i=r.length;e<i;e++)E[r[e]]?r[e]=E[r[e]]:r[e]=(t=r[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=x(r[t])?r[t].call(e,s):r[t];return n}}(t),V[t](e)):e.localeData().invalidDate()}function j(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(G.lastIndex=0;0<=n&&G.test(e);)e=e.replace(G,s),G.lastIndex=0,n-=1;return e}var Z=/\d/,z=/\d\d/,$=/\d{3}/,q=/\d{4}/,J=/[+-]?\d{6}/,B=/\d\d?/,Q=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,n,s){oe[e]=x(n)?n:function(e,t){return e&&s?s:n}}function le(e,t){return m(oe,e)?oe[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,n){var t,s=n;for("string"==typeof e&&(e=[e]),d(n)&&(s=function(e,t){t[n]=k(e)}),t=0;t<e.length;t++)he[e[t]]=s}function fe(e,i){ce(e,function(e,t,n,s){n._w=n._w||{},i(e,n._w,n,s)})}var me=0,_e=1,ye=2,ge=3,pe=4,ve=5,we=6,Me=7,Se=8;function De(e){return ke(e)?366:365}function ke(e){return e%4==0&&e%100!=0||e%400==0}I("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),I(0,["YY",2],0,function(){return this.year()%100}),I(0,["YYYY",4],0,"year"),I(0,["YYYYY",5],0,"year"),I(0,["YYYYYY",6,!0],0,"year"),H("year","y"),L("year",1),ue("Y",se),ue("YY",B,z),ue("YYYY",ee,q),ue("YYYYY",te,J),ue("YYYYYY",te,J),ce(["YYYYY","YYYYYY"],me),ce("YYYY",function(e,t){t[me]=2===e.length?c.parseTwoDigitYear(e):k(e)}),ce("YY",function(e,t){t[me]=c.parseTwoDigitYear(e)}),ce("Y",function(e,t){t[me]=parseInt(e,10)}),c.parseTwoDigitYear=function(e){return k(e)+(68<k(e)?1900:2e3)};var Ye,Oe=Te("FullYear",!0);function Te(t,n){return function(e){return null!=e?(be(this,t,e),c.updateOffset(this,n),this):xe(this,t)}}function xe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function be(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ke(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Pe(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function Pe(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?ke(e)?29:28:31-s%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},I("M",["MM",2],"Mo",function(){return this.month()+1}),I("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),I("MMMM",0,0,function(e){return this.localeData().months(this,e)}),H("month","M"),L("month",8),ue("M",B),ue("MM",B,z),ue("MMM",function(e,t){return t.monthsShortRegex(e)}),ue("MMMM",function(e,t){return t.monthsRegex(e)}),ce(["M","MM"],function(e,t){t[_e]=k(e)-1}),ce(["MMM","MMMM"],function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[_e]=i:g(n).invalidMonth=e});var We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ce(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=k(t);else if(!d(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Pe(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Fe(e){return null!=e?(Ce(this,e),c.updateOffset(this,!0),this):xe(this,"Month")}var Le=ae;var Ue=ae;function Ne(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=y([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=de(s[t]),i[t]=de(i[t]);for(t=0;t<24;t++)r[t]=de(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ge(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Ve(e,t,n){var s=7+t-n;return-((7+Ge(e,0,s).getUTCDay()-t)%7)+s-1}function Ee(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ve(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ie(e,t,n){var s,i,r=Ve(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ae(i=e.year()-1,t,n):a>Ae(e.year(),t,n)?(s=a-Ae(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ae(e,t,n){var s=Ve(e,t,n),i=Ve(e+1,t,n);return(De(e)-s+i)/7}I("w",["ww",2],"wo","week"),I("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),L("week",5),L("isoWeek",5),ue("w",B),ue("ww",B,z),ue("W",B),ue("WW",B,z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=k(e)});I("d",0,"do","day"),I("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),I("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),I("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),I("e",0,0,"weekday"),I("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),L("day",11),L("weekday",11),L("isoWeekday",11),ue("d",B),ue("e",B),ue("E",B),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:g(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=k(e)});var je="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var ze="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var qe=ae;var Je=ae;function Be(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=y([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);for(a.sort(e),o.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)o[t]=de(o[t]),u[t]=de(u[t]),l[t]=de(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,t){I(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ke(e,t){return t._meridiemParse}I("H",["HH",2],0,"hour"),I("h",["hh",2],0,Qe),I("k",["kk",2],0,function(){return this.hours()||24}),I("hmm",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)}),I("hmmss",0,0,function(){return""+Qe.apply(this)+U(this.minutes(),2)+U(this.seconds(),2)}),I("Hmm",0,0,function(){return""+this.hours()+U(this.minutes(),2)}),I("Hmmss",0,0,function(){return""+this.hours()+U(this.minutes(),2)+U(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),H("hour","h"),L("hour",13),ue("a",Ke),ue("A",Ke),ue("H",B),ue("h",B),ue("k",B),ue("HH",B,z),ue("hh",B,z),ue("kk",B,z),ue("hmm",Q),ue("hmmss",X),ue("Hmm",Q),ue("Hmmss",X),ce(["H","HH"],ge),ce(["k","kk"],function(e,t,n){var s=k(e);t[ge]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[ge]=k(e),g(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s)),g(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i)),g(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[ge]=k(e.substr(0,s)),t[pe]=k(e.substr(s,2)),t[ve]=k(e.substr(i))});var et,tt=Te("Hours",!0),nt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:He,monthsShort:Re,week:{dow:0,doy:6},weekdays:je,weekdaysMin:ze,weekdaysShort:Ze,meridiemParse:/[ap]\.?m?\.?/i},st={},it={};function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(e){var t=null;if(!st[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=et._abbr,__webpack_require__("./node_modules/moment-mini/locale sync recursive ^\\.\\/.*$")("./"+e),ot(t)}catch(e){}return st[e]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):ut(e,t))?et=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),et._abbr}function ut(e,t){if(null!==t){var n,s=nt;if(t.abbr=e,null!=st[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=st[e]._config;else if(null!=t.parentLocale)if(null!=st[t.parentLocale])s=st[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return it[t.parentLocale]||(it[t.parentLocale]=[]),it[t.parentLocale].push({name:e,config:t}),null;s=n._config}return st[e]=new P(b(s,t)),it[e]&&it[e].forEach(function(e){ut(e.name,e.config)}),ot(e),st[e]}return delete st[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return et;if(!o(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=rt(e[r]).split("-")).length,n=(n=rt(e[r+1]))?n.split("-"):null;0<t;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&a(i,n,!0)>=t-1)break;t--}r++}return et}(e)}function dt(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[_e]<0||11<n[_e]?_e:n[ye]<1||n[ye]>Pe(n[me],n[_e])?ye:n[ge]<0||24<n[ge]||24===n[ge]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?ge:n[pe]<0||59<n[pe]?pe:n[ve]<0||59<n[ve]?ve:n[we]<0||999<n[we]?we:-1,g(e)._overflowDayOfYear&&(t<me||ye<t)&&(t=ye),g(e)._overflowWeeks&&-1===t&&(t=Me),g(e)._overflowWeekday&&-1===t&&(t=Se),g(e).overflow=t),e}function ht(e,t,n){return null!=e?e:null!=t?t:n}function ct(e){var t,n,s,i,r,a=[];if(!e._d){var o,u;for(o=e,u=new Date(c.now()),s=o._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],e._w&&null==e._a[ye]&&null==e._a[_e]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ht(t.GG,e._a[me],Ie(Tt(),1,4).year),s=ht(t.W,1),((i=ht(t.E,1))<1||7<i)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var l=Ie(Tt(),r,a);n=ht(t.gg,e._a[me],l.year),s=ht(t.w,l.week),null!=t.d?((i=t.d)<0||6<i)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||6<t.e)&&(u=!0)):i=r}s<1||s>Ae(n,r,a)?g(e)._overflowWeeks=!0:null!=u?g(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[me]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ht(e._a[me],s[me]),(e._dayOfYear>De(r)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=Ge(r,0,e._dayOfYear),e._a[_e]=n.getUTCMonth(),e._a[ye]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=s[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[ge]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[ge]=0),e._d=(e._useUTC?Ge:function(e,t,n,s,i,r,a){var o=new Date(e,t,n,s,i,r,a);return e<100&&0<=e&&isFinite(o.getFullYear())&&o.setFullYear(e),o}).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(g(e).weekdayMismatch=!0)}}var ft=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,mt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_t=/Z|[+-]\d\d(?::?\d\d)?/,yt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],gt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,n,s,i,r,a,o=e._i,u=ft.exec(o)||mt.exec(o);if(u){for(g(e).iso=!0,t=0,n=yt.length;t<n;t++)if(yt[t][1].exec(u[1])){i=yt[t][0],s=!1!==yt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=gt.length;t<n;t++)if(gt[t][1].exec(u[3])){r=(u[2]||" ")+gt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!_t.exec(u[4]))return void(e._isValid=!1);a="Z"}e._f=i+(r||"")+(a||""),kt(e)}else e._isValid=!1}var wt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function Mt(e,t,n,s,i,r){var a=[function(e){var t=parseInt(e,10);{if(t<=49)return 2e3+t;if(t<=999)return 1900+t}return t}(e),Re.indexOf(t),parseInt(n,10),parseInt(s,10),parseInt(i,10)];return r&&a.push(parseInt(r,10)),a}var St={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dt(e){var t,n,s,i=wt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim());if(i){var r=Mt(i[4],i[3],i[2],i[5],i[6],i[7]);if(t=i[1],n=r,s=e,t&&Ze.indexOf(t)!==new Date(n[0],n[1],n[2]).getDay()&&(g(s).weekdayMismatch=!0,!(s._isValid=!1)))return;e._a=r,e._tzm=function(e,t,n){if(e)return St[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(i[8],i[9],i[10]),e._d=Ge.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==c.ISO_8601)if(e._f!==c.RFC_2822){e._a=[],g(e).empty=!0;var t,n,s,i,r,a,o,u,l=""+e._i,d=l.length,h=0;for(s=j(e._f,e._locale).match(N)||[],t=0;t<s.length;t++)i=s[t],(n=(l.match(le(i,e))||[])[0])&&(0<(r=l.substr(0,l.indexOf(n))).length&&g(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),h+=n.length),E[i]?(n?g(e).empty=!1:g(e).unusedTokens.push(i),a=i,u=e,null!=(o=n)&&m(he,a)&&he[a](o,u._a,u,a)):e._strict&&!n&&g(e).unusedTokens.push(i);g(e).charsLeftOver=d-h,0<l.length&&g(e).unusedInput.push(l),e._a[ge]<=12&&!0===g(e).bigHour&&0<e._a[ge]&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[ge]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0)),t)}(e._locale,e._a[ge],e._meridiem),ct(e),dt(e)}else Dt(e);else vt(e)}function Yt(e){var t,n,s,i,r=e._i,a=e._f;return e._locale=e._locale||lt(e._l),null===r||void 0===a&&""===r?v({nullInput:!0}):("string"==typeof r&&(e._i=r=e._locale.preparse(r)),S(r)?new M(dt(r)):(h(r)?e._d=r:o(a)?function(e){var t,n,s,i,r;if(0===e._f.length)return g(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)r=0,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],kt(t),p(t)&&(r+=g(t).charsLeftOver,r+=10*g(t).unusedTokens.length,g(t).score=r,(null==s||r<s)&&(s=r,n=t));_(e,n||t)}(e):a?kt(e):l(n=(t=e)._i)?t._d=new Date(c.now()):h(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(s=t,null===(i=pt.exec(s._i))?(vt(s),!1===s._isValid&&(delete s._isValid,Dt(s),!1===s._isValid&&(delete s._isValid,c.createFromInputFallback(s)))):s._d=new Date(+i[1])):o(n)?(t._a=f(n.slice(0),function(e){return parseInt(e,10)}),ct(t)):u(n)?function(e){if(!e._d){var t=C(e._i);e._a=f([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ct(e)}}(t):d(n)?t._d=new Date(n):c.createFromInputFallback(t),p(e)||(e._d=null),e))}function Ot(e,t,n,s,i){var r,a={};return!0!==n&&!1!==n||(s=n,n=void 0),(u(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||o(e)&&0===e.length)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=s,(r=new M(dt(Yt(a))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function Tt(e,t,n,s){return Ot(e,t,n,s,!1)}c.createFromInputFallback=n("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),c.ISO_8601=function(){},c.RFC_2822=function(){};var xt=n("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),bt=n("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:v()});function Pt(e,t){var n,s;if(1===t.length&&o(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Wt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ht(e){var t=C(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||0,a=t.day||0,o=t.hour||0,u=t.minute||0,l=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===Ye.call(Wt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var n=!1,s=0;s<Wt.length;++s)if(e[Wt[s]]){if(n)return!1;parseFloat(e[Wt[s]])!==k(e[Wt[s]])&&(n=!0)}return!0}(t),this._milliseconds=+d+1e3*l+6e4*u+1e3*o*60*60,this._days=+a+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Rt(e){return e instanceof Ht}function Ct(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Ft(e,n){I(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+U(~~(e/60),2)+n+U(~~e%60,2)})}Ft("Z",":"),Ft("ZZ",""),ue("Z",re),ue("ZZ",re),ce(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Ut(re,e)});var Lt=/([\+\-]|\d\d)/gi;function Ut(e,t){var n=(t||"").match(e);if(null===n)return null;var s=((n[n.length-1]||[])+"").match(Lt)||["-",0,0],i=60*s[1]+k(s[2]);return 0===i?0:"+"===s[0]?i:-i}function Nt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||h(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),c.updateOffset(n,!1),n):Tt(e).local()}function Gt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function Vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}c.updateOffset=function(){};var Et=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,It=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function At(e,t){var n,s,i,r=e,a=null;return Rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:d(e)?(r={},t?r[t]=e:r.milliseconds=e):(a=Et.exec(e))?(n="-"===a[1]?-1:1,r={y:0,d:k(a[ye])*n,h:k(a[ge])*n,m:k(a[pe])*n,s:k(a[ve])*n,ms:k(Ct(1e3*a[we]))*n}):(a=It.exec(e))?(n="-"===a[1]?-1:(a[1],1),r={y:jt(a[2],n),M:jt(a[3],n),w:jt(a[4],n),d:jt(a[5],n),h:jt(a[6],n),m:jt(a[7],n),s:jt(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=Nt(t,e),e.isBefore(t)?n=Zt(e,t):((n=Zt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(Tt(r.from),Tt(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),s=new Ht(r),Rt(e)&&m(e,"_locale")&&(s._locale=e._locale),s}function jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function zt(s,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=e,e=t,t=n),$t(this,At(e="string"==typeof e?+e:e,t),s),this}}function $t(e,t,n,s){var i=t._milliseconds,r=Ct(t._days),a=Ct(t._months);e.isValid()&&(s=null==s||s,a&&Ce(e,xe(e,"Month")+a*n),r&&be(e,"Date",xe(e,"Date")+r*n),i&&e._d.setTime(e._d.valueOf()+i*n),s&&c.updateOffset(e,r||a))}At.fn=Ht.prototype,At.invalid=function(){return At(NaN)};var qt=zt(1,"add"),Jt=zt(-1,"subtract");function Bt(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}c.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",c.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Kt(){return this._locale}function en(e,t){I(0,[e,e.length],0,t)}function tn(e,t,n,s,i){var r;return null==e?Ie(this,s,i).year:((r=Ae(e,s,i))<t&&(t=r),function(e,t,n,s,i){var r=Ee(e,t,n,s,i),a=Ge(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}I(0,["gg",2],0,function(){return this.weekYear()%100}),I(0,["GG",2],0,function(){return this.isoWeekYear()%100}),en("gggg","weekYear"),en("ggggg","weekYear"),en("GGGG","isoWeekYear"),en("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),L("weekYear",1),L("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",B,z),ue("gg",B,z),ue("GGGG",ee,q),ue("gggg",ee,q),ue("GGGGG",te,J),ue("ggggg",te,J),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=k(e)}),fe(["gg","GG"],function(e,t,n,s){t[s]=c.parseTwoDigitYear(e)}),I("Q",0,"Qo","quarter"),H("quarter","Q"),L("quarter",7),ue("Q",Z),ce("Q",function(e,t){t[_e]=3*(k(e)-1)}),I("D",["DD",2],"Do","date"),H("date","D"),L("date",9),ue("D",B),ue("DD",B,z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ye),ce("Do",function(e,t){t[ye]=k(e.match(B)[0])});var nn=Te("Date",!0);I("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),L("dayOfYear",4),ue("DDD",K),ue("DDDD",$),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=k(e)}),I("m",["mm",2],0,"minute"),H("minute","m"),L("minute",14),ue("m",B),ue("mm",B,z),ce(["m","mm"],pe);var sn=Te("Minutes",!1);I("s",["ss",2],0,"second"),H("second","s"),L("second",15),ue("s",B),ue("ss",B,z),ce(["s","ss"],ve);var rn,an=Te("Seconds",!1);for(I("S",0,0,function(){return~~(this.millisecond()/100)}),I(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),I(0,["SSS",3],0,"millisecond"),I(0,["SSSS",4],0,function(){return 10*this.millisecond()}),I(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),I(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),I(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),I(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),I(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),H("millisecond","ms"),L("millisecond",16),ue("S",K,Z),ue("SS",K,z),ue("SSS",K,$),rn="SSSS";rn.length<=9;rn+="S")ue(rn,ne);function on(e,t){t[we]=k(1e3*("0."+e))}for(rn="S";rn.length<=9;rn+="S")ce(rn,on);var un=Te("Milliseconds",!1);I("z",0,0,"zoneAbbr"),I("zz",0,0,"zoneName");var ln=M.prototype;function dn(e){return e}ln.add=qt,ln.calendar=function(e,t){var n=e||Tt(),s=Nt(n,this).startOf("day"),i=c.calendarFormat(this,s)||"sameElse",r=t&&(x(t[i])?t[i].call(this,n):t[i]);return this.format(r||this.localeData().calendar(i,this,Tt(n)))},ln.clone=function(){return new M(this)},ln.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Nt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=R(t)){case"year":r=Bt(this,s)/12;break;case"month":r=Bt(this,s);break;case"quarter":r=Bt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:D(r)},ln.endOf=function(e){return void 0===(e=R(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},ln.format=function(e){e||(e=this.isUtc()?c.defaultFormatUtc:c.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},ln.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.fromNow=function(e){return this.from(Tt(),e)},ln.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?At({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ln.toNow=function(e){return this.to(Tt(),e)},ln.get=function(e){return x(this[e=R(e)])?this[e]():this},ln.invalidAt=function(){return g(this).overflow},ln.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},ln.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=R(l(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},ln.isBetween=function(e,t,n,s){return("("===(s=s||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===s[1]?this.isBefore(t,n):!this.isAfter(t,n))},ln.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=R(t||"millisecond"))?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},ln.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ln.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ln.isValid=function(){return p(this)},ln.lang=Xt,ln.locale=Qt,ln.localeData=Kt,ln.max=bt,ln.min=xt,ln.parsingFlags=function(){return _({},g(this))},ln.set=function(e,t){if("object"==typeof e)for(var n=function(e){var t=[];for(var n in e)t.push({unit:n,priority:F[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}(e=C(e)),s=0;s<n.length;s++)this[n[s].unit](e[n[s].unit]);else if(x(this[e=R(e)]))return this[e](t);return this},ln.startOf=function(e){switch(e=R(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},ln.subtract=Jt,ln.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ln.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ln.toDate=function(){return new Date(this.valueOf())},ln.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||9999<n.year()?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):x(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ln.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},ln.toJSON=function(){return this.isValid()?this.toISOString():null},ln.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ln.unix=function(){return Math.floor(this.valueOf()/1e3)},ln.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ln.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ln.year=Oe,ln.isLeapYear=function(){return ke(this.year())},ln.weekYear=function(e){return tn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ln.isoWeekYear=function(e){return tn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ln.quarter=ln.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ln.month=Fe,ln.daysInMonth=function(){return Pe(this.year(),this.month())},ln.week=ln.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ln.isoWeek=ln.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ln.weeksInYear=function(){var e=this.localeData()._week;return Ae(this.year(),e.dow,e.doy)},ln.isoWeeksInYear=function(){return Ae(this.year(),1,4)},ln.date=nn,ln.day=ln.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,s=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-s,"d")):s},ln.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ln.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=(n=e,s=this.localeData(),"string"==typeof n?s.weekdaysParse(n)%7||7:isNaN(n)?null:n);return this.day(this.day()%7?t:t-7)}return this.day()||7;var n,s},ln.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ln.hour=ln.hours=tt,ln.minute=ln.minutes=sn,ln.second=ln.seconds=an,ln.millisecond=ln.milliseconds=un,ln.utcOffset=function(e,t,n){var s,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(re,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Gt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),i!==e&&(!t||this._changeInProgress?$t(this,At(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,c.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:Gt(this)},ln.utc=function(e){return this.utcOffset(0,e)},ln.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},ln.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ln.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ln.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ln.isLocal=function(){return!!this.isValid()&&!this._isUTC},ln.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ln.isUtc=Vt,ln.isUTC=Vt,ln.zoneAbbr=function(){return this._isUTC?"UTC":""},ln.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ln.dates=n("dates accessor is deprecated. Use date instead.",nn),ln.months=n("months accessor is deprecated. Use month instead",Fe),ln.years=n("years accessor is deprecated. Use year instead",Oe),ln.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),ln.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={};if(w(e,this),(e=Yt(e))._a){var t=e._isUTC?y(e._a):Tt(e._a);this._isDSTShifted=this.isValid()&&0<a(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted});var hn=P.prototype;function cn(e,t,n,s){var i=lt(),r=y().set(s,t);return i[n](r,e)}function fn(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return cn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=cn(e,s,n,"month");return i}function mn(e,t,n,s){"boolean"==typeof e?d(t)&&(n=t,t=void 0):(t=e,e=!1,d(n=t)&&(n=t,t=void 0)),t=t||"";var i,r=lt(),a=e?r._week.dow:0;if(null!=n)return cn(t,(n+a)%7,s,"day");var o=[];for(i=0;i<7;i++)o[i]=cn(t,(i+a)%7,s,"day");return o}hn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return x(s)?s.call(t,n):s},hn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},hn.invalidDate=function(){return this._invalidDate},hn.ordinal=function(e){return this._ordinal.replace("%d",e)},hn.preparse=dn,hn.postformat=dn,hn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return x(i)?i(e,t,n,s):i.replace(/%d/i,e)},hn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},hn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hn.months=function(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:o(this._months)?this._months:this._months.standalone},hn.monthsShort=function(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=y([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ye.call(this._shortMonthsParse,a))?i:-1!==(i=Ye.call(this._longMonthsParse,a))?i:null:-1!==(i=Ye.call(this._longMonthsParse,a))?i:-1!==(i=Ye.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=y([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},hn.monthsRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(m(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hn.monthsShortRegex=function(e){return this._monthsParseExact?(m(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(m(this,"_monthsShortRegex")||(this._monthsShortRegex=Le),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hn.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hn.firstDayOfYear=function(){return this._week.doy},hn.firstDayOfWeek=function(){return this._week.dow},hn.weekdays=function(e,t){return e?o(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:o(this._weekdays)?this._weekdays:this._weekdays.standalone},hn.weekdaysMin=function(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin},hn.weekdaysShort=function(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort},hn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=y([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ye.call(this._minWeekdaysParse,a))?i:-1!==(i=Ye.call(this._weekdaysParse,a))?i:-1!==(i=Ye.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=y([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},hn.weekdaysRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(m(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(m(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(m(this,"_weekdaysRegex")||Be.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(m(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Je),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},ot("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===k(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),c.lang=n("moment.lang is deprecated. Use moment.locale instead.",ot),c.langData=n("moment.langData is deprecated. Use moment.localeData instead.",lt);var _n=Math.abs;function yn(e,t,n,s){var i=At(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function gn(e){return e<0?Math.floor(e):Math.ceil(e)}function pn(e){return 4800*e/146097}function vn(e){return 146097*e/4800}function wn(e){return function(){return this.as(e)}}var Mn=wn("ms"),Sn=wn("s"),Dn=wn("m"),kn=wn("h"),Yn=wn("d"),On=wn("w"),Tn=wn("M"),xn=wn("y");function bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Pn=bn("milliseconds"),Wn=bn("seconds"),Hn=bn("minutes"),Rn=bn("hours"),Cn=bn("days"),Fn=bn("months"),Ln=bn("years");var Un=Math.round,Nn={ss:44,s:45,m:45,h:22,d:26,M:11};var Gn=Math.abs;function Vn(e){return(0<e)-(e<0)||+e}function En(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=Gn(this._milliseconds)/1e3,s=Gn(this._days),i=Gn(this._months);t=D((e=D(n/60))/60),n%=60,e%=60;var r=D(i/12),a=i%=12,o=s,u=t,l=e,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Vn(this._months)!==Vn(h)?"-":"",m=Vn(this._days)!==Vn(h)?"-":"",_=Vn(this._milliseconds)!==Vn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||l||d?"T":"")+(u?_+u+"H":"")+(l?_+l+"M":"")+(d?_+d+"S":"")}var In=Ht.prototype;return In.isValid=function(){return this._isValid},In.abs=function(){var e=this._data;return this._milliseconds=_n(this._milliseconds),this._days=_n(this._days),this._months=_n(this._months),e.milliseconds=_n(e.milliseconds),e.seconds=_n(e.seconds),e.minutes=_n(e.minutes),e.hours=_n(e.hours),e.months=_n(e.months),e.years=_n(e.years),this},In.add=function(e,t){return yn(this,e,t,1)},In.subtract=function(e,t){return yn(this,e,t,-1)},In.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=R(e))||"year"===e)return t=this._days+s/864e5,n=this._months+pn(t),"month"===e?n:n/12;switch(t=this._days+Math.round(vn(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},In.asMilliseconds=Mn,In.asSeconds=Sn,In.asMinutes=Dn,In.asHours=kn,In.asDays=Yn,In.asWeeks=On,In.asMonths=Tn,In.asYears=xn,In.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},In._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return 0<=r&&0<=a&&0<=o||r<=0&&a<=0&&o<=0||(r+=864e5*gn(vn(o)+a),o=a=0),u.milliseconds=r%1e3,e=D(r/1e3),u.seconds=e%60,t=D(e/60),u.minutes=t%60,n=D(t/60),u.hours=n%24,o+=i=D(pn(a+=D(n/24))),a-=gn(vn(i)),s=D(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},In.clone=function(){return At(this)},In.get=function(e){return e=R(e),this.isValid()?this[e+"s"]():NaN},In.milliseconds=Pn,In.seconds=Wn,In.minutes=Hn,In.hours=Rn,In.days=Cn,In.weeks=function(){return D(this.days()/7)},In.months=Fn,In.years=Ln,In.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t,n,s,i,r,a,o,u,l,d,h,c=this.localeData(),f=(n=!e,s=c,i=At(t=this).abs(),r=Un(i.as("s")),a=Un(i.as("m")),o=Un(i.as("h")),u=Un(i.as("d")),l=Un(i.as("M")),d=Un(i.as("y")),(h=r<=Nn.ss&&["s",r]||r<Nn.s&&["ss",r]||a<=1&&["m"]||a<Nn.m&&["mm",a]||o<=1&&["h"]||o<Nn.h&&["hh",o]||u<=1&&["d"]||u<Nn.d&&["dd",u]||l<=1&&["M"]||l<Nn.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=n,h[3]=0<+t,h[4]=s,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,h));return e&&(f=c.pastFuture(+this,f)),c.postformat(f)},In.toISOString=En,In.toString=En,In.toJSON=En,In.locale=Qt,In.localeData=Kt,In.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",En),In.lang=Xt,I("X",0,0,"unix"),I("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(k(e))}),c.version="2.22.1",e=Tt,c.fn=ln,c.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},c.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},c.now=function(){return Date.now?Date.now():+new Date},c.utc=y,c.unix=function(e){return Tt(1e3*e)},c.months=function(e,t){return fn(e,t,"months")},c.isDate=h,c.locale=ot,c.invalid=v,c.duration=At,c.isMoment=S,c.weekdays=function(e,t,n){return mn(e,t,n,"weekdays")},c.parseZone=function(){return Tt.apply(null,arguments).parseZone()},c.localeData=lt,c.isDuration=Rt,c.monthsShort=function(e,t){return fn(e,t,"monthsShort")},c.weekdaysMin=function(e,t,n){return mn(e,t,n,"weekdaysMin")},c.defineLocale=ut,c.updateLocale=function(e,t){if(null!=t){var n,s,i=nt;null!=(s=at(e))&&(i=s._config),(n=new P(t=b(i,t))).parentLocale=st[e],st[e]=n,ot(e)}else null!=st[e]&&(null!=st[e].parentLocale?st[e]=st[e].parentLocale:null!=st[e]&&delete st[e]);return st[e]},c.locales=function(){return s(st)},c.weekdaysShort=function(e,t,n){return mn(e,t,n,"weekdaysShort")},c.normalizeUnits=R,c.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},c.relativeTimeThreshold=function(e,t){return void 0!==Nn[e]&&(void 0===t?Nn[e]:(Nn[e]=t,"s"===e&&(Nn.ss=t-1),!0))},c.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},c.prototype=ln,c.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"YYYY-[W]WW",MONTH:"YYYY-MM"},c});
80435/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
80436
80437/***/ }),
80438
80439/***/ "./node_modules/node-libs-browser/mock/empty.js":
80440/*!******************************************************!*\
80441 !*** ./node_modules/node-libs-browser/mock/empty.js ***!
80442 \******************************************************/
80443/*! no static exports found */
80444/***/ (function(module, exports) {
80445
80446
80447
80448/***/ }),
80449
80450/***/ "./node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js":
80451/*!******************************************************************************************!*\
80452 !*** ./node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js ***!
80453 \******************************************************************************************/
80454/*! no static exports found */
80455/***/ (function(module, exports, __webpack_require__) {
80456
80457"use strict";
80458// Copyright Joyent, Inc. and other Node contributors.
80459//
80460// Permission is hereby granted, free of charge, to any person obtaining a
80461// copy of this software and associated documentation files (the
80462// "Software"), to deal in the Software without restriction, including
80463// without limitation the rights to use, copy, modify, merge, publish,
80464// distribute, sublicense, and/or sell copies of the Software, and to permit
80465// persons to whom the Software is furnished to do so, subject to the
80466// following conditions:
80467//
80468// The above copyright notice and this permission notice shall be included
80469// in all copies or substantial portions of the Software.
80470//
80471// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
80472// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
80473// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
80474// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
80475// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
80476// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
80477// USE OR OTHER DEALINGS IN THE SOFTWARE.
80478
80479
80480
80481/*<replacement>*/
80482
80483var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer;
80484/*</replacement>*/
80485
80486var isEncoding = Buffer.isEncoding || function (encoding) {
80487 encoding = '' + encoding;
80488 switch (encoding && encoding.toLowerCase()) {
80489 case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
80490 return true;
80491 default:
80492 return false;
80493 }
80494};
80495
80496function _normalizeEncoding(enc) {
80497 if (!enc) return 'utf8';
80498 var retried;
80499 while (true) {
80500 switch (enc) {
80501 case 'utf8':
80502 case 'utf-8':
80503 return 'utf8';
80504 case 'ucs2':
80505 case 'ucs-2':
80506 case 'utf16le':
80507 case 'utf-16le':
80508 return 'utf16le';
80509 case 'latin1':
80510 case 'binary':
80511 return 'latin1';
80512 case 'base64':
80513 case 'ascii':
80514 case 'hex':
80515 return enc;
80516 default:
80517 if (retried) return; // undefined
80518 enc = ('' + enc).toLowerCase();
80519 retried = true;
80520 }
80521 }
80522};
80523
80524// Do not cache `Buffer.isEncoding` when checking encoding names as some
80525// modules monkey-patch it to support additional encodings
80526function normalizeEncoding(enc) {
80527 var nenc = _normalizeEncoding(enc);
80528 if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
80529 return nenc || enc;
80530}
80531
80532// StringDecoder provides an interface for efficiently splitting a series of
80533// buffers into a series of JS strings without breaking apart multi-byte
80534// characters.
80535exports.StringDecoder = StringDecoder;
80536function StringDecoder(encoding) {
80537 this.encoding = normalizeEncoding(encoding);
80538 var nb;
80539 switch (this.encoding) {
80540 case 'utf16le':
80541 this.text = utf16Text;
80542 this.end = utf16End;
80543 nb = 4;
80544 break;
80545 case 'utf8':
80546 this.fillLast = utf8FillLast;
80547 nb = 4;
80548 break;
80549 case 'base64':
80550 this.text = base64Text;
80551 this.end = base64End;
80552 nb = 3;
80553 break;
80554 default:
80555 this.write = simpleWrite;
80556 this.end = simpleEnd;
80557 return;
80558 }
80559 this.lastNeed = 0;
80560 this.lastTotal = 0;
80561 this.lastChar = Buffer.allocUnsafe(nb);
80562}
80563
80564StringDecoder.prototype.write = function (buf) {
80565 if (buf.length === 0) return '';
80566 var r;
80567 var i;
80568 if (this.lastNeed) {
80569 r = this.fillLast(buf);
80570 if (r === undefined) return '';
80571 i = this.lastNeed;
80572 this.lastNeed = 0;
80573 } else {
80574 i = 0;
80575 }
80576 if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
80577 return r || '';
80578};
80579
80580StringDecoder.prototype.end = utf8End;
80581
80582// Returns only complete characters in a Buffer
80583StringDecoder.prototype.text = utf8Text;
80584
80585// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
80586StringDecoder.prototype.fillLast = function (buf) {
80587 if (this.lastNeed <= buf.length) {
80588 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
80589 return this.lastChar.toString(this.encoding, 0, this.lastTotal);
80590 }
80591 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
80592 this.lastNeed -= buf.length;
80593};
80594
80595// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
80596// continuation byte. If an invalid byte is detected, -2 is returned.
80597function utf8CheckByte(byte) {
80598 if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
80599 return byte >> 6 === 0x02 ? -1 : -2;
80600}
80601
80602// Checks at most 3 bytes at the end of a Buffer in order to detect an
80603// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
80604// needed to complete the UTF-8 character (if applicable) are returned.
80605function utf8CheckIncomplete(self, buf, i) {
80606 var j = buf.length - 1;
80607 if (j < i) return 0;
80608 var nb = utf8CheckByte(buf[j]);
80609 if (nb >= 0) {
80610 if (nb > 0) self.lastNeed = nb - 1;
80611 return nb;
80612 }
80613 if (--j < i || nb === -2) return 0;
80614 nb = utf8CheckByte(buf[j]);
80615 if (nb >= 0) {
80616 if (nb > 0) self.lastNeed = nb - 2;
80617 return nb;
80618 }
80619 if (--j < i || nb === -2) return 0;
80620 nb = utf8CheckByte(buf[j]);
80621 if (nb >= 0) {
80622 if (nb > 0) {
80623 if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
80624 }
80625 return nb;
80626 }
80627 return 0;
80628}
80629
80630// Validates as many continuation bytes for a multi-byte UTF-8 character as
80631// needed or are available. If we see a non-continuation byte where we expect
80632// one, we "replace" the validated continuation bytes we've seen so far with
80633// a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
80634// behavior. The continuation byte check is included three times in the case
80635// where all of the continuation bytes for a character exist in the same buffer.
80636// It is also done this way as a slight performance increase instead of using a
80637// loop.
80638function utf8CheckExtraBytes(self, buf, p) {
80639 if ((buf[0] & 0xC0) !== 0x80) {
80640 self.lastNeed = 0;
80641 return '\ufffd';
80642 }
80643 if (self.lastNeed > 1 && buf.length > 1) {
80644 if ((buf[1] & 0xC0) !== 0x80) {
80645 self.lastNeed = 1;
80646 return '\ufffd';
80647 }
80648 if (self.lastNeed > 2 && buf.length > 2) {
80649 if ((buf[2] & 0xC0) !== 0x80) {
80650 self.lastNeed = 2;
80651 return '\ufffd';
80652 }
80653 }
80654 }
80655}
80656
80657// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
80658function utf8FillLast(buf) {
80659 var p = this.lastTotal - this.lastNeed;
80660 var r = utf8CheckExtraBytes(this, buf, p);
80661 if (r !== undefined) return r;
80662 if (this.lastNeed <= buf.length) {
80663 buf.copy(this.lastChar, p, 0, this.lastNeed);
80664 return this.lastChar.toString(this.encoding, 0, this.lastTotal);
80665 }
80666 buf.copy(this.lastChar, p, 0, buf.length);
80667 this.lastNeed -= buf.length;
80668}
80669
80670// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
80671// partial character, the character's bytes are buffered until the required
80672// number of bytes are available.
80673function utf8Text(buf, i) {
80674 var total = utf8CheckIncomplete(this, buf, i);
80675 if (!this.lastNeed) return buf.toString('utf8', i);
80676 this.lastTotal = total;
80677 var end = buf.length - (total - this.lastNeed);
80678 buf.copy(this.lastChar, 0, end);
80679 return buf.toString('utf8', i, end);
80680}
80681
80682// For UTF-8, a replacement character is added when ending on a partial
80683// character.
80684function utf8End(buf) {
80685 var r = buf && buf.length ? this.write(buf) : '';
80686 if (this.lastNeed) return r + '\ufffd';
80687 return r;
80688}
80689
80690// UTF-16LE typically needs two bytes per character, but even if we have an even
80691// number of bytes available, we need to check if we end on a leading/high
80692// surrogate. In that case, we need to wait for the next two bytes in order to
80693// decode the last character properly.
80694function utf16Text(buf, i) {
80695 if ((buf.length - i) % 2 === 0) {
80696 var r = buf.toString('utf16le', i);
80697 if (r) {
80698 var c = r.charCodeAt(r.length - 1);
80699 if (c >= 0xD800 && c <= 0xDBFF) {
80700 this.lastNeed = 2;
80701 this.lastTotal = 4;
80702 this.lastChar[0] = buf[buf.length - 2];
80703 this.lastChar[1] = buf[buf.length - 1];
80704 return r.slice(0, -1);
80705 }
80706 }
80707 return r;
80708 }
80709 this.lastNeed = 1;
80710 this.lastTotal = 2;
80711 this.lastChar[0] = buf[buf.length - 1];
80712 return buf.toString('utf16le', i, buf.length - 1);
80713}
80714
80715// For UTF-16LE we do not explicitly append special replacement characters if we
80716// end on a partial character, we simply let v8 handle that.
80717function utf16End(buf) {
80718 var r = buf && buf.length ? this.write(buf) : '';
80719 if (this.lastNeed) {
80720 var end = this.lastTotal - this.lastNeed;
80721 return r + this.lastChar.toString('utf16le', 0, end);
80722 }
80723 return r;
80724}
80725
80726function base64Text(buf, i) {
80727 var n = (buf.length - i) % 3;
80728 if (n === 0) return buf.toString('base64', i);
80729 this.lastNeed = 3 - n;
80730 this.lastTotal = 3;
80731 if (n === 1) {
80732 this.lastChar[0] = buf[buf.length - 1];
80733 } else {
80734 this.lastChar[0] = buf[buf.length - 2];
80735 this.lastChar[1] = buf[buf.length - 1];
80736 }
80737 return buf.toString('base64', i, buf.length - n);
80738}
80739
80740function base64End(buf) {
80741 var r = buf && buf.length ? this.write(buf) : '';
80742 if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
80743 return r;
80744}
80745
80746// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
80747function simpleWrite(buf) {
80748 return buf.toString(this.encoding);
80749}
80750
80751function simpleEnd(buf) {
80752 return buf && buf.length ? this.write(buf) : '';
80753}
80754
80755/***/ }),
80756
80757/***/ "./node_modules/parse-asn1/aesid.json":
80758/*!********************************************!*\
80759 !*** ./node_modules/parse-asn1/aesid.json ***!
80760 \********************************************/
80761/*! exports provided: 2.16.840.1.101.3.4.1.1, 2.16.840.1.101.3.4.1.2, 2.16.840.1.101.3.4.1.3, 2.16.840.1.101.3.4.1.4, 2.16.840.1.101.3.4.1.21, 2.16.840.1.101.3.4.1.22, 2.16.840.1.101.3.4.1.23, 2.16.840.1.101.3.4.1.24, 2.16.840.1.101.3.4.1.41, 2.16.840.1.101.3.4.1.42, 2.16.840.1.101.3.4.1.43, 2.16.840.1.101.3.4.1.44, default */
80762/***/ (function(module) {
80763
80764module.exports = JSON.parse("{\"2.16.840.1.101.3.4.1.1\":\"aes-128-ecb\",\"2.16.840.1.101.3.4.1.2\":\"aes-128-cbc\",\"2.16.840.1.101.3.4.1.3\":\"aes-128-ofb\",\"2.16.840.1.101.3.4.1.4\":\"aes-128-cfb\",\"2.16.840.1.101.3.4.1.21\":\"aes-192-ecb\",\"2.16.840.1.101.3.4.1.22\":\"aes-192-cbc\",\"2.16.840.1.101.3.4.1.23\":\"aes-192-ofb\",\"2.16.840.1.101.3.4.1.24\":\"aes-192-cfb\",\"2.16.840.1.101.3.4.1.41\":\"aes-256-ecb\",\"2.16.840.1.101.3.4.1.42\":\"aes-256-cbc\",\"2.16.840.1.101.3.4.1.43\":\"aes-256-ofb\",\"2.16.840.1.101.3.4.1.44\":\"aes-256-cfb\"}");
80765
80766/***/ }),
80767
80768/***/ "./node_modules/parse-asn1/asn1.js":
80769/*!*****************************************!*\
80770 !*** ./node_modules/parse-asn1/asn1.js ***!
80771 \*****************************************/
80772/*! no static exports found */
80773/***/ (function(module, exports, __webpack_require__) {
80774
80775"use strict";
80776// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
80777// Fedor, you are amazing.
80778
80779
80780var asn1 = __webpack_require__(/*! asn1.js */ "./node_modules/asn1.js/lib/asn1.js")
80781
80782exports.certificate = __webpack_require__(/*! ./certificate */ "./node_modules/parse-asn1/certificate.js")
80783
80784var RSAPrivateKey = asn1.define('RSAPrivateKey', function () {
80785 this.seq().obj(
80786 this.key('version').int(),
80787 this.key('modulus').int(),
80788 this.key('publicExponent').int(),
80789 this.key('privateExponent').int(),
80790 this.key('prime1').int(),
80791 this.key('prime2').int(),
80792 this.key('exponent1').int(),
80793 this.key('exponent2').int(),
80794 this.key('coefficient').int()
80795 )
80796})
80797exports.RSAPrivateKey = RSAPrivateKey
80798
80799var RSAPublicKey = asn1.define('RSAPublicKey', function () {
80800 this.seq().obj(
80801 this.key('modulus').int(),
80802 this.key('publicExponent').int()
80803 )
80804})
80805exports.RSAPublicKey = RSAPublicKey
80806
80807var PublicKey = asn1.define('SubjectPublicKeyInfo', function () {
80808 this.seq().obj(
80809 this.key('algorithm').use(AlgorithmIdentifier),
80810 this.key('subjectPublicKey').bitstr()
80811 )
80812})
80813exports.PublicKey = PublicKey
80814
80815var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {
80816 this.seq().obj(
80817 this.key('algorithm').objid(),
80818 this.key('none').null_().optional(),
80819 this.key('curve').objid().optional(),
80820 this.key('params').seq().obj(
80821 this.key('p').int(),
80822 this.key('q').int(),
80823 this.key('g').int()
80824 ).optional()
80825 )
80826})
80827
80828var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {
80829 this.seq().obj(
80830 this.key('version').int(),
80831 this.key('algorithm').use(AlgorithmIdentifier),
80832 this.key('subjectPrivateKey').octstr()
80833 )
80834})
80835exports.PrivateKey = PrivateKeyInfo
80836var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {
80837 this.seq().obj(
80838 this.key('algorithm').seq().obj(
80839 this.key('id').objid(),
80840 this.key('decrypt').seq().obj(
80841 this.key('kde').seq().obj(
80842 this.key('id').objid(),
80843 this.key('kdeparams').seq().obj(
80844 this.key('salt').octstr(),
80845 this.key('iters').int()
80846 )
80847 ),
80848 this.key('cipher').seq().obj(
80849 this.key('algo').objid(),
80850 this.key('iv').octstr()
80851 )
80852 )
80853 ),
80854 this.key('subjectPrivateKey').octstr()
80855 )
80856})
80857
80858exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo
80859
80860var DSAPrivateKey = asn1.define('DSAPrivateKey', function () {
80861 this.seq().obj(
80862 this.key('version').int(),
80863 this.key('p').int(),
80864 this.key('q').int(),
80865 this.key('g').int(),
80866 this.key('pub_key').int(),
80867 this.key('priv_key').int()
80868 )
80869})
80870exports.DSAPrivateKey = DSAPrivateKey
80871
80872exports.DSAparam = asn1.define('DSAparam', function () {
80873 this.int()
80874})
80875
80876var ECPrivateKey = asn1.define('ECPrivateKey', function () {
80877 this.seq().obj(
80878 this.key('version').int(),
80879 this.key('privateKey').octstr(),
80880 this.key('parameters').optional().explicit(0).use(ECParameters),
80881 this.key('publicKey').optional().explicit(1).bitstr()
80882 )
80883})
80884exports.ECPrivateKey = ECPrivateKey
80885
80886var ECParameters = asn1.define('ECParameters', function () {
80887 this.choice({
80888 namedCurve: this.objid()
80889 })
80890})
80891
80892exports.signature = asn1.define('signature', function () {
80893 this.seq().obj(
80894 this.key('r').int(),
80895 this.key('s').int()
80896 )
80897})
80898
80899
80900/***/ }),
80901
80902/***/ "./node_modules/parse-asn1/certificate.js":
80903/*!************************************************!*\
80904 !*** ./node_modules/parse-asn1/certificate.js ***!
80905 \************************************************/
80906/*! no static exports found */
80907/***/ (function(module, exports, __webpack_require__) {
80908
80909"use strict";
80910// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
80911// thanks to @Rantanen
80912
80913
80914
80915var asn = __webpack_require__(/*! asn1.js */ "./node_modules/asn1.js/lib/asn1.js")
80916
80917var Time = asn.define('Time', function () {
80918 this.choice({
80919 utcTime: this.utctime(),
80920 generalTime: this.gentime()
80921 })
80922})
80923
80924var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
80925 this.seq().obj(
80926 this.key('type').objid(),
80927 this.key('value').any()
80928 )
80929})
80930
80931var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
80932 this.seq().obj(
80933 this.key('algorithm').objid(),
80934 this.key('parameters').optional(),
80935 this.key('curve').objid().optional()
80936 )
80937})
80938
80939var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
80940 this.seq().obj(
80941 this.key('algorithm').use(AlgorithmIdentifier),
80942 this.key('subjectPublicKey').bitstr()
80943 )
80944})
80945
80946var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
80947 this.setof(AttributeTypeValue)
80948})
80949
80950var RDNSequence = asn.define('RDNSequence', function () {
80951 this.seqof(RelativeDistinguishedName)
80952})
80953
80954var Name = asn.define('Name', function () {
80955 this.choice({
80956 rdnSequence: this.use(RDNSequence)
80957 })
80958})
80959
80960var Validity = asn.define('Validity', function () {
80961 this.seq().obj(
80962 this.key('notBefore').use(Time),
80963 this.key('notAfter').use(Time)
80964 )
80965})
80966
80967var Extension = asn.define('Extension', function () {
80968 this.seq().obj(
80969 this.key('extnID').objid(),
80970 this.key('critical').bool().def(false),
80971 this.key('extnValue').octstr()
80972 )
80973})
80974
80975var TBSCertificate = asn.define('TBSCertificate', function () {
80976 this.seq().obj(
80977 this.key('version').explicit(0).int().optional(),
80978 this.key('serialNumber').int(),
80979 this.key('signature').use(AlgorithmIdentifier),
80980 this.key('issuer').use(Name),
80981 this.key('validity').use(Validity),
80982 this.key('subject').use(Name),
80983 this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
80984 this.key('issuerUniqueID').implicit(1).bitstr().optional(),
80985 this.key('subjectUniqueID').implicit(2).bitstr().optional(),
80986 this.key('extensions').explicit(3).seqof(Extension).optional()
80987 )
80988})
80989
80990var X509Certificate = asn.define('X509Certificate', function () {
80991 this.seq().obj(
80992 this.key('tbsCertificate').use(TBSCertificate),
80993 this.key('signatureAlgorithm').use(AlgorithmIdentifier),
80994 this.key('signatureValue').bitstr()
80995 )
80996})
80997
80998module.exports = X509Certificate
80999
81000
81001/***/ }),
81002
81003/***/ "./node_modules/parse-asn1/fixProc.js":
81004/*!********************************************!*\
81005 !*** ./node_modules/parse-asn1/fixProc.js ***!
81006 \********************************************/
81007/*! no static exports found */
81008/***/ (function(module, exports, __webpack_require__) {
81009
81010// adapted from https://github.com/apatil/pemstrip
81011var findProc = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m
81012var startRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m
81013var fullRegex = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m
81014var evp = __webpack_require__(/*! evp_bytestokey */ "./node_modules/evp_bytestokey/index.js")
81015var ciphers = __webpack_require__(/*! browserify-aes */ "./node_modules/browserify-aes/browser.js")
81016var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
81017module.exports = function (okey, password) {
81018 var key = okey.toString()
81019 var match = key.match(findProc)
81020 var decrypted
81021 if (!match) {
81022 var match2 = key.match(fullRegex)
81023 decrypted = new Buffer(match2[2].replace(/[\r\n]/g, ''), 'base64')
81024 } else {
81025 var suite = 'aes' + match[1]
81026 var iv = Buffer.from(match[2], 'hex')
81027 var cipherText = Buffer.from(match[3].replace(/[\r\n]/g, ''), 'base64')
81028 var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key
81029 var out = []
81030 var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)
81031 out.push(cipher.update(cipherText))
81032 out.push(cipher.final())
81033 decrypted = Buffer.concat(out)
81034 }
81035 var tag = key.match(startRegex)[1]
81036 return {
81037 tag: tag,
81038 data: decrypted
81039 }
81040}
81041
81042
81043/***/ }),
81044
81045/***/ "./node_modules/parse-asn1/index.js":
81046/*!******************************************!*\
81047 !*** ./node_modules/parse-asn1/index.js ***!
81048 \******************************************/
81049/*! no static exports found */
81050/***/ (function(module, exports, __webpack_require__) {
81051
81052var asn1 = __webpack_require__(/*! ./asn1 */ "./node_modules/parse-asn1/asn1.js")
81053var aesid = __webpack_require__(/*! ./aesid.json */ "./node_modules/parse-asn1/aesid.json")
81054var fixProc = __webpack_require__(/*! ./fixProc */ "./node_modules/parse-asn1/fixProc.js")
81055var ciphers = __webpack_require__(/*! browserify-aes */ "./node_modules/browserify-aes/browser.js")
81056var compat = __webpack_require__(/*! pbkdf2 */ "./node_modules/pbkdf2/browser.js")
81057var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
81058module.exports = parseKeys
81059
81060function parseKeys (buffer) {
81061 var password
81062 if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {
81063 password = buffer.passphrase
81064 buffer = buffer.key
81065 }
81066 if (typeof buffer === 'string') {
81067 buffer = Buffer.from(buffer)
81068 }
81069
81070 var stripped = fixProc(buffer, password)
81071
81072 var type = stripped.tag
81073 var data = stripped.data
81074 var subtype, ndata
81075 switch (type) {
81076 case 'CERTIFICATE':
81077 ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo
81078 // falls through
81079 case 'PUBLIC KEY':
81080 if (!ndata) {
81081 ndata = asn1.PublicKey.decode(data, 'der')
81082 }
81083 subtype = ndata.algorithm.algorithm.join('.')
81084 switch (subtype) {
81085 case '1.2.840.113549.1.1.1':
81086 return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')
81087 case '1.2.840.10045.2.1':
81088 ndata.subjectPrivateKey = ndata.subjectPublicKey
81089 return {
81090 type: 'ec',
81091 data: ndata
81092 }
81093 case '1.2.840.10040.4.1':
81094 ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')
81095 return {
81096 type: 'dsa',
81097 data: ndata.algorithm.params
81098 }
81099 default: throw new Error('unknown key id ' + subtype)
81100 }
81101 throw new Error('unknown key type ' + type)
81102 case 'ENCRYPTED PRIVATE KEY':
81103 data = asn1.EncryptedPrivateKey.decode(data, 'der')
81104 data = decrypt(data, password)
81105 // falls through
81106 case 'PRIVATE KEY':
81107 ndata = asn1.PrivateKey.decode(data, 'der')
81108 subtype = ndata.algorithm.algorithm.join('.')
81109 switch (subtype) {
81110 case '1.2.840.113549.1.1.1':
81111 return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')
81112 case '1.2.840.10045.2.1':
81113 return {
81114 curve: ndata.algorithm.curve,
81115 privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey
81116 }
81117 case '1.2.840.10040.4.1':
81118 ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')
81119 return {
81120 type: 'dsa',
81121 params: ndata.algorithm.params
81122 }
81123 default: throw new Error('unknown key id ' + subtype)
81124 }
81125 throw new Error('unknown key type ' + type)
81126 case 'RSA PUBLIC KEY':
81127 return asn1.RSAPublicKey.decode(data, 'der')
81128 case 'RSA PRIVATE KEY':
81129 return asn1.RSAPrivateKey.decode(data, 'der')
81130 case 'DSA PRIVATE KEY':
81131 return {
81132 type: 'dsa',
81133 params: asn1.DSAPrivateKey.decode(data, 'der')
81134 }
81135 case 'EC PRIVATE KEY':
81136 data = asn1.ECPrivateKey.decode(data, 'der')
81137 return {
81138 curve: data.parameters.value,
81139 privateKey: data.privateKey
81140 }
81141 default: throw new Error('unknown key type ' + type)
81142 }
81143}
81144parseKeys.signature = asn1.signature
81145function decrypt (data, password) {
81146 var salt = data.algorithm.decrypt.kde.kdeparams.salt
81147 var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
81148 var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]
81149 var iv = data.algorithm.decrypt.cipher.iv
81150 var cipherText = data.subjectPrivateKey
81151 var keylen = parseInt(algo.split('-')[1], 10) / 8
81152 var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')
81153 var cipher = ciphers.createDecipheriv(algo, key, iv)
81154 var out = []
81155 out.push(cipher.update(cipherText))
81156 out.push(cipher.final())
81157 return Buffer.concat(out)
81158}
81159
81160
81161/***/ }),
81162
81163/***/ "./node_modules/path-browserify/index.js":
81164/*!***********************************************!*\
81165 !*** ./node_modules/path-browserify/index.js ***!
81166 \***********************************************/
81167/*! no static exports found */
81168/***/ (function(module, exports, __webpack_require__) {
81169
81170/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
81171// backported and transplited with Babel, with backwards-compat fixes
81172
81173// Copyright Joyent, Inc. and other Node contributors.
81174//
81175// Permission is hereby granted, free of charge, to any person obtaining a
81176// copy of this software and associated documentation files (the
81177// "Software"), to deal in the Software without restriction, including
81178// without limitation the rights to use, copy, modify, merge, publish,
81179// distribute, sublicense, and/or sell copies of the Software, and to permit
81180// persons to whom the Software is furnished to do so, subject to the
81181// following conditions:
81182//
81183// The above copyright notice and this permission notice shall be included
81184// in all copies or substantial portions of the Software.
81185//
81186// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
81187// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
81188// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
81189// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
81190// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
81191// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
81192// USE OR OTHER DEALINGS IN THE SOFTWARE.
81193
81194// resolves . and .. elements in a path array with directory names there
81195// must be no slashes, empty elements, or device names (c:\) in the array
81196// (so also no leading and trailing slashes - it does not distinguish
81197// relative and absolute paths)
81198function normalizeArray(parts, allowAboveRoot) {
81199 // if the path tries to go above the root, `up` ends up > 0
81200 var up = 0;
81201 for (var i = parts.length - 1; i >= 0; i--) {
81202 var last = parts[i];
81203 if (last === '.') {
81204 parts.splice(i, 1);
81205 } else if (last === '..') {
81206 parts.splice(i, 1);
81207 up++;
81208 } else if (up) {
81209 parts.splice(i, 1);
81210 up--;
81211 }
81212 }
81213
81214 // if the path is allowed to go above the root, restore leading ..s
81215 if (allowAboveRoot) {
81216 for (; up--; up) {
81217 parts.unshift('..');
81218 }
81219 }
81220
81221 return parts;
81222}
81223
81224// path.resolve([from ...], to)
81225// posix version
81226exports.resolve = function() {
81227 var resolvedPath = '',
81228 resolvedAbsolute = false;
81229
81230 for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
81231 var path = (i >= 0) ? arguments[i] : process.cwd();
81232
81233 // Skip empty and invalid entries
81234 if (typeof path !== 'string') {
81235 throw new TypeError('Arguments to path.resolve must be strings');
81236 } else if (!path) {
81237 continue;
81238 }
81239
81240 resolvedPath = path + '/' + resolvedPath;
81241 resolvedAbsolute = path.charAt(0) === '/';
81242 }
81243
81244 // At this point the path should be resolved to a full absolute path, but
81245 // handle relative paths to be safe (might happen when process.cwd() fails)
81246
81247 // Normalize the path
81248 resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
81249 return !!p;
81250 }), !resolvedAbsolute).join('/');
81251
81252 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
81253};
81254
81255// path.normalize(path)
81256// posix version
81257exports.normalize = function(path) {
81258 var isAbsolute = exports.isAbsolute(path),
81259 trailingSlash = substr(path, -1) === '/';
81260
81261 // Normalize the path
81262 path = normalizeArray(filter(path.split('/'), function(p) {
81263 return !!p;
81264 }), !isAbsolute).join('/');
81265
81266 if (!path && !isAbsolute) {
81267 path = '.';
81268 }
81269 if (path && trailingSlash) {
81270 path += '/';
81271 }
81272
81273 return (isAbsolute ? '/' : '') + path;
81274};
81275
81276// posix version
81277exports.isAbsolute = function(path) {
81278 return path.charAt(0) === '/';
81279};
81280
81281// posix version
81282exports.join = function() {
81283 var paths = Array.prototype.slice.call(arguments, 0);
81284 return exports.normalize(filter(paths, function(p, index) {
81285 if (typeof p !== 'string') {
81286 throw new TypeError('Arguments to path.join must be strings');
81287 }
81288 return p;
81289 }).join('/'));
81290};
81291
81292
81293// path.relative(from, to)
81294// posix version
81295exports.relative = function(from, to) {
81296 from = exports.resolve(from).substr(1);
81297 to = exports.resolve(to).substr(1);
81298
81299 function trim(arr) {
81300 var start = 0;
81301 for (; start < arr.length; start++) {
81302 if (arr[start] !== '') break;
81303 }
81304
81305 var end = arr.length - 1;
81306 for (; end >= 0; end--) {
81307 if (arr[end] !== '') break;
81308 }
81309
81310 if (start > end) return [];
81311 return arr.slice(start, end - start + 1);
81312 }
81313
81314 var fromParts = trim(from.split('/'));
81315 var toParts = trim(to.split('/'));
81316
81317 var length = Math.min(fromParts.length, toParts.length);
81318 var samePartsLength = length;
81319 for (var i = 0; i < length; i++) {
81320 if (fromParts[i] !== toParts[i]) {
81321 samePartsLength = i;
81322 break;
81323 }
81324 }
81325
81326 var outputParts = [];
81327 for (var i = samePartsLength; i < fromParts.length; i++) {
81328 outputParts.push('..');
81329 }
81330
81331 outputParts = outputParts.concat(toParts.slice(samePartsLength));
81332
81333 return outputParts.join('/');
81334};
81335
81336exports.sep = '/';
81337exports.delimiter = ':';
81338
81339exports.dirname = function (path) {
81340 if (typeof path !== 'string') path = path + '';
81341 if (path.length === 0) return '.';
81342 var code = path.charCodeAt(0);
81343 var hasRoot = code === 47 /*/*/;
81344 var end = -1;
81345 var matchedSlash = true;
81346 for (var i = path.length - 1; i >= 1; --i) {
81347 code = path.charCodeAt(i);
81348 if (code === 47 /*/*/) {
81349 if (!matchedSlash) {
81350 end = i;
81351 break;
81352 }
81353 } else {
81354 // We saw the first non-path separator
81355 matchedSlash = false;
81356 }
81357 }
81358
81359 if (end === -1) return hasRoot ? '/' : '.';
81360 if (hasRoot && end === 1) {
81361 // return '//';
81362 // Backwards-compat fix:
81363 return '/';
81364 }
81365 return path.slice(0, end);
81366};
81367
81368function basename(path) {
81369 if (typeof path !== 'string') path = path + '';
81370
81371 var start = 0;
81372 var end = -1;
81373 var matchedSlash = true;
81374 var i;
81375
81376 for (i = path.length - 1; i >= 0; --i) {
81377 if (path.charCodeAt(i) === 47 /*/*/) {
81378 // If we reached a path separator that was not part of a set of path
81379 // separators at the end of the string, stop now
81380 if (!matchedSlash) {
81381 start = i + 1;
81382 break;
81383 }
81384 } else if (end === -1) {
81385 // We saw the first non-path separator, mark this as the end of our
81386 // path component
81387 matchedSlash = false;
81388 end = i + 1;
81389 }
81390 }
81391
81392 if (end === -1) return '';
81393 return path.slice(start, end);
81394}
81395
81396// Uses a mixed approach for backwards-compatibility, as ext behavior changed
81397// in new Node.js versions, so only basename() above is backported here
81398exports.basename = function (path, ext) {
81399 var f = basename(path);
81400 if (ext && f.substr(-1 * ext.length) === ext) {
81401 f = f.substr(0, f.length - ext.length);
81402 }
81403 return f;
81404};
81405
81406exports.extname = function (path) {
81407 if (typeof path !== 'string') path = path + '';
81408 var startDot = -1;
81409 var startPart = 0;
81410 var end = -1;
81411 var matchedSlash = true;
81412 // Track the state of characters (if any) we see before our first dot and
81413 // after any path separator we find
81414 var preDotState = 0;
81415 for (var i = path.length - 1; i >= 0; --i) {
81416 var code = path.charCodeAt(i);
81417 if (code === 47 /*/*/) {
81418 // If we reached a path separator that was not part of a set of path
81419 // separators at the end of the string, stop now
81420 if (!matchedSlash) {
81421 startPart = i + 1;
81422 break;
81423 }
81424 continue;
81425 }
81426 if (end === -1) {
81427 // We saw the first non-path separator, mark this as the end of our
81428 // extension
81429 matchedSlash = false;
81430 end = i + 1;
81431 }
81432 if (code === 46 /*.*/) {
81433 // If this is our first dot, mark it as the start of our extension
81434 if (startDot === -1)
81435 startDot = i;
81436 else if (preDotState !== 1)
81437 preDotState = 1;
81438 } else if (startDot !== -1) {
81439 // We saw a non-dot and non-path separator before our dot, so we should
81440 // have a good chance at having a non-empty extension
81441 preDotState = -1;
81442 }
81443 }
81444
81445 if (startDot === -1 || end === -1 ||
81446 // We saw a non-dot character immediately before the dot
81447 preDotState === 0 ||
81448 // The (right-most) trimmed path component is exactly '..'
81449 preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
81450 return '';
81451 }
81452 return path.slice(startDot, end);
81453};
81454
81455function filter (xs, f) {
81456 if (xs.filter) return xs.filter(f);
81457 var res = [];
81458 for (var i = 0; i < xs.length; i++) {
81459 if (f(xs[i], i, xs)) res.push(xs[i]);
81460 }
81461 return res;
81462}
81463
81464// String.prototype.substr - negative index don't work in IE8
81465var substr = 'ab'.substr(-1) === 'b'
81466 ? function (str, start, len) { return str.substr(start, len) }
81467 : function (str, start, len) {
81468 if (start < 0) start = str.length + start;
81469 return str.substr(start, len);
81470 }
81471;
81472
81473/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
81474
81475/***/ }),
81476
81477/***/ "./node_modules/pbkdf2/browser.js":
81478/*!****************************************!*\
81479 !*** ./node_modules/pbkdf2/browser.js ***!
81480 \****************************************/
81481/*! no static exports found */
81482/***/ (function(module, exports, __webpack_require__) {
81483
81484exports.pbkdf2 = __webpack_require__(/*! ./lib/async */ "./node_modules/pbkdf2/lib/async.js")
81485exports.pbkdf2Sync = __webpack_require__(/*! ./lib/sync */ "./node_modules/pbkdf2/lib/sync-browser.js")
81486
81487
81488/***/ }),
81489
81490/***/ "./node_modules/pbkdf2/lib/async.js":
81491/*!******************************************!*\
81492 !*** ./node_modules/pbkdf2/lib/async.js ***!
81493 \******************************************/
81494/*! no static exports found */
81495/***/ (function(module, exports, __webpack_require__) {
81496
81497/* WEBPACK VAR INJECTION */(function(global, process) {var checkParameters = __webpack_require__(/*! ./precondition */ "./node_modules/pbkdf2/lib/precondition.js")
81498var defaultEncoding = __webpack_require__(/*! ./default-encoding */ "./node_modules/pbkdf2/lib/default-encoding.js")
81499var sync = __webpack_require__(/*! ./sync */ "./node_modules/pbkdf2/lib/sync-browser.js")
81500var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
81501
81502var ZERO_BUF
81503var subtle = global.crypto && global.crypto.subtle
81504var toBrowser = {
81505 'sha': 'SHA-1',
81506 'sha-1': 'SHA-1',
81507 'sha1': 'SHA-1',
81508 'sha256': 'SHA-256',
81509 'sha-256': 'SHA-256',
81510 'sha384': 'SHA-384',
81511 'sha-384': 'SHA-384',
81512 'sha-512': 'SHA-512',
81513 'sha512': 'SHA-512'
81514}
81515var checks = []
81516function checkNative (algo) {
81517 if (global.process && !global.process.browser) {
81518 return Promise.resolve(false)
81519 }
81520 if (!subtle || !subtle.importKey || !subtle.deriveBits) {
81521 return Promise.resolve(false)
81522 }
81523 if (checks[algo] !== undefined) {
81524 return checks[algo]
81525 }
81526 ZERO_BUF = ZERO_BUF || Buffer.alloc(8)
81527 var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)
81528 .then(function () {
81529 return true
81530 }).catch(function () {
81531 return false
81532 })
81533 checks[algo] = prom
81534 return prom
81535}
81536
81537function browserPbkdf2 (password, salt, iterations, length, algo) {
81538 return subtle.importKey(
81539 'raw', password, {name: 'PBKDF2'}, false, ['deriveBits']
81540 ).then(function (key) {
81541 return subtle.deriveBits({
81542 name: 'PBKDF2',
81543 salt: salt,
81544 iterations: iterations,
81545 hash: {
81546 name: algo
81547 }
81548 }, key, length << 3)
81549 }).then(function (res) {
81550 return Buffer.from(res)
81551 })
81552}
81553
81554function resolvePromise (promise, callback) {
81555 promise.then(function (out) {
81556 process.nextTick(function () {
81557 callback(null, out)
81558 })
81559 }, function (e) {
81560 process.nextTick(function () {
81561 callback(e)
81562 })
81563 })
81564}
81565module.exports = function (password, salt, iterations, keylen, digest, callback) {
81566 if (typeof digest === 'function') {
81567 callback = digest
81568 digest = undefined
81569 }
81570
81571 digest = digest || 'sha1'
81572 var algo = toBrowser[digest.toLowerCase()]
81573
81574 if (!algo || typeof global.Promise !== 'function') {
81575 return process.nextTick(function () {
81576 var out
81577 try {
81578 out = sync(password, salt, iterations, keylen, digest)
81579 } catch (e) {
81580 return callback(e)
81581 }
81582 callback(null, out)
81583 })
81584 }
81585
81586 checkParameters(password, salt, iterations, keylen)
81587 if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')
81588 if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding)
81589 if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding)
81590
81591 resolvePromise(checkNative(algo).then(function (resp) {
81592 if (resp) return browserPbkdf2(password, salt, iterations, keylen, algo)
81593
81594 return sync(password, salt, iterations, keylen, digest)
81595 }), callback)
81596}
81597
81598/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
81599
81600/***/ }),
81601
81602/***/ "./node_modules/pbkdf2/lib/default-encoding.js":
81603/*!*****************************************************!*\
81604 !*** ./node_modules/pbkdf2/lib/default-encoding.js ***!
81605 \*****************************************************/
81606/*! no static exports found */
81607/***/ (function(module, exports, __webpack_require__) {
81608
81609/* WEBPACK VAR INJECTION */(function(process) {var defaultEncoding
81610/* istanbul ignore next */
81611if (process.browser) {
81612 defaultEncoding = 'utf-8'
81613} else {
81614 var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
81615
81616 defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
81617}
81618module.exports = defaultEncoding
81619
81620/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
81621
81622/***/ }),
81623
81624/***/ "./node_modules/pbkdf2/lib/precondition.js":
81625/*!*************************************************!*\
81626 !*** ./node_modules/pbkdf2/lib/precondition.js ***!
81627 \*************************************************/
81628/*! no static exports found */
81629/***/ (function(module, exports, __webpack_require__) {
81630
81631/* WEBPACK VAR INJECTION */(function(Buffer) {var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
81632
81633function checkBuffer (buf, name) {
81634 if (typeof buf !== 'string' && !Buffer.isBuffer(buf)) {
81635 throw new TypeError(name + ' must be a buffer or string')
81636 }
81637}
81638
81639module.exports = function (password, salt, iterations, keylen) {
81640 checkBuffer(password, 'Password')
81641 checkBuffer(salt, 'Salt')
81642
81643 if (typeof iterations !== 'number') {
81644 throw new TypeError('Iterations not a number')
81645 }
81646
81647 if (iterations < 0) {
81648 throw new TypeError('Bad iterations')
81649 }
81650
81651 if (typeof keylen !== 'number') {
81652 throw new TypeError('Key length not a number')
81653 }
81654
81655 if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */
81656 throw new TypeError('Bad key length')
81657 }
81658}
81659
81660/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../buffer/index.js */ "./node_modules/buffer/index.js").Buffer))
81661
81662/***/ }),
81663
81664/***/ "./node_modules/pbkdf2/lib/sync-browser.js":
81665/*!*************************************************!*\
81666 !*** ./node_modules/pbkdf2/lib/sync-browser.js ***!
81667 \*************************************************/
81668/*! no static exports found */
81669/***/ (function(module, exports, __webpack_require__) {
81670
81671var md5 = __webpack_require__(/*! create-hash/md5 */ "./node_modules/create-hash/md5.js")
81672var RIPEMD160 = __webpack_require__(/*! ripemd160 */ "./node_modules/ripemd160/index.js")
81673var sha = __webpack_require__(/*! sha.js */ "./node_modules/sha.js/index.js")
81674
81675var checkParameters = __webpack_require__(/*! ./precondition */ "./node_modules/pbkdf2/lib/precondition.js")
81676var defaultEncoding = __webpack_require__(/*! ./default-encoding */ "./node_modules/pbkdf2/lib/default-encoding.js")
81677var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
81678var ZEROS = Buffer.alloc(128)
81679var sizes = {
81680 md5: 16,
81681 sha1: 20,
81682 sha224: 28,
81683 sha256: 32,
81684 sha384: 48,
81685 sha512: 64,
81686 rmd160: 20,
81687 ripemd160: 20
81688}
81689
81690function Hmac (alg, key, saltLen) {
81691 var hash = getDigest(alg)
81692 var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
81693
81694 if (key.length > blocksize) {
81695 key = hash(key)
81696 } else if (key.length < blocksize) {
81697 key = Buffer.concat([key, ZEROS], blocksize)
81698 }
81699
81700 var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])
81701 var opad = Buffer.allocUnsafe(blocksize + sizes[alg])
81702 for (var i = 0; i < blocksize; i++) {
81703 ipad[i] = key[i] ^ 0x36
81704 opad[i] = key[i] ^ 0x5C
81705 }
81706
81707 var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)
81708 ipad.copy(ipad1, 0, 0, blocksize)
81709 this.ipad1 = ipad1
81710 this.ipad2 = ipad
81711 this.opad = opad
81712 this.alg = alg
81713 this.blocksize = blocksize
81714 this.hash = hash
81715 this.size = sizes[alg]
81716}
81717
81718Hmac.prototype.run = function (data, ipad) {
81719 data.copy(ipad, this.blocksize)
81720 var h = this.hash(ipad)
81721 h.copy(this.opad, this.blocksize)
81722 return this.hash(this.opad)
81723}
81724
81725function getDigest (alg) {
81726 function shaFunc (data) {
81727 return sha(alg).update(data).digest()
81728 }
81729 function rmd160Func (data) {
81730 return new RIPEMD160().update(data).digest()
81731 }
81732
81733 if (alg === 'rmd160' || alg === 'ripemd160') return rmd160Func
81734 if (alg === 'md5') return md5
81735 return shaFunc
81736}
81737
81738function pbkdf2 (password, salt, iterations, keylen, digest) {
81739 checkParameters(password, salt, iterations, keylen)
81740
81741 if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding)
81742 if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding)
81743
81744 digest = digest || 'sha1'
81745
81746 var hmac = new Hmac(digest, password, salt.length)
81747
81748 var DK = Buffer.allocUnsafe(keylen)
81749 var block1 = Buffer.allocUnsafe(salt.length + 4)
81750 salt.copy(block1, 0, 0, salt.length)
81751
81752 var destPos = 0
81753 var hLen = sizes[digest]
81754 var l = Math.ceil(keylen / hLen)
81755
81756 for (var i = 1; i <= l; i++) {
81757 block1.writeUInt32BE(i, salt.length)
81758
81759 var T = hmac.run(block1, hmac.ipad1)
81760 var U = T
81761
81762 for (var j = 1; j < iterations; j++) {
81763 U = hmac.run(U, hmac.ipad2)
81764 for (var k = 0; k < hLen; k++) T[k] ^= U[k]
81765 }
81766
81767 T.copy(DK, destPos)
81768 destPos += hLen
81769 }
81770
81771 return DK
81772}
81773
81774module.exports = pbkdf2
81775
81776
81777/***/ }),
81778
81779/***/ "./node_modules/process/browser.js":
81780/*!*****************************************!*\
81781 !*** ./node_modules/process/browser.js ***!
81782 \*****************************************/
81783/*! no static exports found */
81784/***/ (function(module, exports) {
81785
81786// shim for using process in browser
81787var process = module.exports = {};
81788
81789// cached from whatever global is present so that test runners that stub it
81790// don't break things. But we need to wrap it in a try catch in case it is
81791// wrapped in strict mode code which doesn't define any globals. It's inside a
81792// function because try/catches deoptimize in certain engines.
81793
81794var cachedSetTimeout;
81795var cachedClearTimeout;
81796
81797function defaultSetTimout() {
81798 throw new Error('setTimeout has not been defined');
81799}
81800function defaultClearTimeout () {
81801 throw new Error('clearTimeout has not been defined');
81802}
81803(function () {
81804 try {
81805 if (typeof setTimeout === 'function') {
81806 cachedSetTimeout = setTimeout;
81807 } else {
81808 cachedSetTimeout = defaultSetTimout;
81809 }
81810 } catch (e) {
81811 cachedSetTimeout = defaultSetTimout;
81812 }
81813 try {
81814 if (typeof clearTimeout === 'function') {
81815 cachedClearTimeout = clearTimeout;
81816 } else {
81817 cachedClearTimeout = defaultClearTimeout;
81818 }
81819 } catch (e) {
81820 cachedClearTimeout = defaultClearTimeout;
81821 }
81822} ())
81823function runTimeout(fun) {
81824 if (cachedSetTimeout === setTimeout) {
81825 //normal enviroments in sane situations
81826 return setTimeout(fun, 0);
81827 }
81828 // if setTimeout wasn't available but was latter defined
81829 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
81830 cachedSetTimeout = setTimeout;
81831 return setTimeout(fun, 0);
81832 }
81833 try {
81834 // when when somebody has screwed with setTimeout but no I.E. maddness
81835 return cachedSetTimeout(fun, 0);
81836 } catch(e){
81837 try {
81838 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
81839 return cachedSetTimeout.call(null, fun, 0);
81840 } catch(e){
81841 // 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
81842 return cachedSetTimeout.call(this, fun, 0);
81843 }
81844 }
81845
81846
81847}
81848function runClearTimeout(marker) {
81849 if (cachedClearTimeout === clearTimeout) {
81850 //normal enviroments in sane situations
81851 return clearTimeout(marker);
81852 }
81853 // if clearTimeout wasn't available but was latter defined
81854 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
81855 cachedClearTimeout = clearTimeout;
81856 return clearTimeout(marker);
81857 }
81858 try {
81859 // when when somebody has screwed with setTimeout but no I.E. maddness
81860 return cachedClearTimeout(marker);
81861 } catch (e){
81862 try {
81863 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
81864 return cachedClearTimeout.call(null, marker);
81865 } catch (e){
81866 // 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.
81867 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
81868 return cachedClearTimeout.call(this, marker);
81869 }
81870 }
81871
81872
81873
81874}
81875var queue = [];
81876var draining = false;
81877var currentQueue;
81878var queueIndex = -1;
81879
81880function cleanUpNextTick() {
81881 if (!draining || !currentQueue) {
81882 return;
81883 }
81884 draining = false;
81885 if (currentQueue.length) {
81886 queue = currentQueue.concat(queue);
81887 } else {
81888 queueIndex = -1;
81889 }
81890 if (queue.length) {
81891 drainQueue();
81892 }
81893}
81894
81895function drainQueue() {
81896 if (draining) {
81897 return;
81898 }
81899 var timeout = runTimeout(cleanUpNextTick);
81900 draining = true;
81901
81902 var len = queue.length;
81903 while(len) {
81904 currentQueue = queue;
81905 queue = [];
81906 while (++queueIndex < len) {
81907 if (currentQueue) {
81908 currentQueue[queueIndex].run();
81909 }
81910 }
81911 queueIndex = -1;
81912 len = queue.length;
81913 }
81914 currentQueue = null;
81915 draining = false;
81916 runClearTimeout(timeout);
81917}
81918
81919process.nextTick = function (fun) {
81920 var args = new Array(arguments.length - 1);
81921 if (arguments.length > 1) {
81922 for (var i = 1; i < arguments.length; i++) {
81923 args[i - 1] = arguments[i];
81924 }
81925 }
81926 queue.push(new Item(fun, args));
81927 if (queue.length === 1 && !draining) {
81928 runTimeout(drainQueue);
81929 }
81930};
81931
81932// v8 likes predictible objects
81933function Item(fun, array) {
81934 this.fun = fun;
81935 this.array = array;
81936}
81937Item.prototype.run = function () {
81938 this.fun.apply(null, this.array);
81939};
81940process.title = 'browser';
81941process.browser = true;
81942process.env = {};
81943process.argv = [];
81944process.version = ''; // empty string to avoid regexp issues
81945process.versions = {};
81946
81947function noop() {}
81948
81949process.on = noop;
81950process.addListener = noop;
81951process.once = noop;
81952process.off = noop;
81953process.removeListener = noop;
81954process.removeAllListeners = noop;
81955process.emit = noop;
81956process.prependListener = noop;
81957process.prependOnceListener = noop;
81958
81959process.listeners = function (name) { return [] }
81960
81961process.binding = function (name) {
81962 throw new Error('process.binding is not supported');
81963};
81964
81965process.cwd = function () { return '/' };
81966process.chdir = function (dir) {
81967 throw new Error('process.chdir is not supported');
81968};
81969process.umask = function() { return 0; };
81970
81971
81972/***/ }),
81973
81974/***/ "./node_modules/public-encrypt/browser.js":
81975/*!************************************************!*\
81976 !*** ./node_modules/public-encrypt/browser.js ***!
81977 \************************************************/
81978/*! no static exports found */
81979/***/ (function(module, exports, __webpack_require__) {
81980
81981exports.publicEncrypt = __webpack_require__(/*! ./publicEncrypt */ "./node_modules/public-encrypt/publicEncrypt.js")
81982exports.privateDecrypt = __webpack_require__(/*! ./privateDecrypt */ "./node_modules/public-encrypt/privateDecrypt.js")
81983
81984exports.privateEncrypt = function privateEncrypt (key, buf) {
81985 return exports.publicEncrypt(key, buf, true)
81986}
81987
81988exports.publicDecrypt = function publicDecrypt (key, buf) {
81989 return exports.privateDecrypt(key, buf, true)
81990}
81991
81992
81993/***/ }),
81994
81995/***/ "./node_modules/public-encrypt/mgf.js":
81996/*!********************************************!*\
81997 !*** ./node_modules/public-encrypt/mgf.js ***!
81998 \********************************************/
81999/*! no static exports found */
82000/***/ (function(module, exports, __webpack_require__) {
82001
82002var createHash = __webpack_require__(/*! create-hash */ "./node_modules/create-hash/browser.js")
82003var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
82004
82005module.exports = function (seed, len) {
82006 var t = Buffer.alloc(0)
82007 var i = 0
82008 var c
82009 while (t.length < len) {
82010 c = i2ops(i++)
82011 t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()])
82012 }
82013 return t.slice(0, len)
82014}
82015
82016function i2ops (c) {
82017 var out = Buffer.allocUnsafe(4)
82018 out.writeUInt32BE(c, 0)
82019 return out
82020}
82021
82022
82023/***/ }),
82024
82025/***/ "./node_modules/public-encrypt/privateDecrypt.js":
82026/*!*******************************************************!*\
82027 !*** ./node_modules/public-encrypt/privateDecrypt.js ***!
82028 \*******************************************************/
82029/*! no static exports found */
82030/***/ (function(module, exports, __webpack_require__) {
82031
82032var parseKeys = __webpack_require__(/*! parse-asn1 */ "./node_modules/parse-asn1/index.js")
82033var mgf = __webpack_require__(/*! ./mgf */ "./node_modules/public-encrypt/mgf.js")
82034var xor = __webpack_require__(/*! ./xor */ "./node_modules/public-encrypt/xor.js")
82035var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
82036var crt = __webpack_require__(/*! browserify-rsa */ "./node_modules/browserify-rsa/index.js")
82037var createHash = __webpack_require__(/*! create-hash */ "./node_modules/create-hash/browser.js")
82038var withPublic = __webpack_require__(/*! ./withPublic */ "./node_modules/public-encrypt/withPublic.js")
82039var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
82040
82041module.exports = function privateDecrypt (privateKey, enc, reverse) {
82042 var padding
82043 if (privateKey.padding) {
82044 padding = privateKey.padding
82045 } else if (reverse) {
82046 padding = 1
82047 } else {
82048 padding = 4
82049 }
82050
82051 var key = parseKeys(privateKey)
82052 var k = key.modulus.byteLength()
82053 if (enc.length > k || new BN(enc).cmp(key.modulus) >= 0) {
82054 throw new Error('decryption error')
82055 }
82056 var msg
82057 if (reverse) {
82058 msg = withPublic(new BN(enc), key)
82059 } else {
82060 msg = crt(enc, key)
82061 }
82062 var zBuffer = Buffer.alloc(k - msg.length)
82063 msg = Buffer.concat([zBuffer, msg], k)
82064 if (padding === 4) {
82065 return oaep(key, msg)
82066 } else if (padding === 1) {
82067 return pkcs1(key, msg, reverse)
82068 } else if (padding === 3) {
82069 return msg
82070 } else {
82071 throw new Error('unknown padding')
82072 }
82073}
82074
82075function oaep (key, msg) {
82076 var k = key.modulus.byteLength()
82077 var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
82078 var hLen = iHash.length
82079 if (msg[0] !== 0) {
82080 throw new Error('decryption error')
82081 }
82082 var maskedSeed = msg.slice(1, hLen + 1)
82083 var maskedDb = msg.slice(hLen + 1)
82084 var seed = xor(maskedSeed, mgf(maskedDb, hLen))
82085 var db = xor(maskedDb, mgf(seed, k - hLen - 1))
82086 if (compare(iHash, db.slice(0, hLen))) {
82087 throw new Error('decryption error')
82088 }
82089 var i = hLen
82090 while (db[i] === 0) {
82091 i++
82092 }
82093 if (db[i++] !== 1) {
82094 throw new Error('decryption error')
82095 }
82096 return db.slice(i)
82097}
82098
82099function pkcs1 (key, msg, reverse) {
82100 var p1 = msg.slice(0, 2)
82101 var i = 2
82102 var status = 0
82103 while (msg[i++] !== 0) {
82104 if (i >= msg.length) {
82105 status++
82106 break
82107 }
82108 }
82109 var ps = msg.slice(2, i - 1)
82110
82111 if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)) {
82112 status++
82113 }
82114 if (ps.length < 8) {
82115 status++
82116 }
82117 if (status) {
82118 throw new Error('decryption error')
82119 }
82120 return msg.slice(i)
82121}
82122function compare (a, b) {
82123 a = Buffer.from(a)
82124 b = Buffer.from(b)
82125 var dif = 0
82126 var len = a.length
82127 if (a.length !== b.length) {
82128 dif++
82129 len = Math.min(a.length, b.length)
82130 }
82131 var i = -1
82132 while (++i < len) {
82133 dif += (a[i] ^ b[i])
82134 }
82135 return dif
82136}
82137
82138
82139/***/ }),
82140
82141/***/ "./node_modules/public-encrypt/publicEncrypt.js":
82142/*!******************************************************!*\
82143 !*** ./node_modules/public-encrypt/publicEncrypt.js ***!
82144 \******************************************************/
82145/*! no static exports found */
82146/***/ (function(module, exports, __webpack_require__) {
82147
82148var parseKeys = __webpack_require__(/*! parse-asn1 */ "./node_modules/parse-asn1/index.js")
82149var randomBytes = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js")
82150var createHash = __webpack_require__(/*! create-hash */ "./node_modules/create-hash/browser.js")
82151var mgf = __webpack_require__(/*! ./mgf */ "./node_modules/public-encrypt/mgf.js")
82152var xor = __webpack_require__(/*! ./xor */ "./node_modules/public-encrypt/xor.js")
82153var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
82154var withPublic = __webpack_require__(/*! ./withPublic */ "./node_modules/public-encrypt/withPublic.js")
82155var crt = __webpack_require__(/*! browserify-rsa */ "./node_modules/browserify-rsa/index.js")
82156var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
82157
82158module.exports = function publicEncrypt (publicKey, msg, reverse) {
82159 var padding
82160 if (publicKey.padding) {
82161 padding = publicKey.padding
82162 } else if (reverse) {
82163 padding = 1
82164 } else {
82165 padding = 4
82166 }
82167 var key = parseKeys(publicKey)
82168 var paddedMsg
82169 if (padding === 4) {
82170 paddedMsg = oaep(key, msg)
82171 } else if (padding === 1) {
82172 paddedMsg = pkcs1(key, msg, reverse)
82173 } else if (padding === 3) {
82174 paddedMsg = new BN(msg)
82175 if (paddedMsg.cmp(key.modulus) >= 0) {
82176 throw new Error('data too long for modulus')
82177 }
82178 } else {
82179 throw new Error('unknown padding')
82180 }
82181 if (reverse) {
82182 return crt(paddedMsg, key)
82183 } else {
82184 return withPublic(paddedMsg, key)
82185 }
82186}
82187
82188function oaep (key, msg) {
82189 var k = key.modulus.byteLength()
82190 var mLen = msg.length
82191 var iHash = createHash('sha1').update(Buffer.alloc(0)).digest()
82192 var hLen = iHash.length
82193 var hLen2 = 2 * hLen
82194 if (mLen > k - hLen2 - 2) {
82195 throw new Error('message too long')
82196 }
82197 var ps = Buffer.alloc(k - mLen - hLen2 - 2)
82198 var dblen = k - hLen - 1
82199 var seed = randomBytes(hLen)
82200 var maskedDb = xor(Buffer.concat([iHash, ps, Buffer.alloc(1, 1), msg], dblen), mgf(seed, dblen))
82201 var maskedSeed = xor(seed, mgf(maskedDb, hLen))
82202 return new BN(Buffer.concat([Buffer.alloc(1), maskedSeed, maskedDb], k))
82203}
82204function pkcs1 (key, msg, reverse) {
82205 var mLen = msg.length
82206 var k = key.modulus.byteLength()
82207 if (mLen > k - 11) {
82208 throw new Error('message too long')
82209 }
82210 var ps
82211 if (reverse) {
82212 ps = Buffer.alloc(k - mLen - 3, 0xff)
82213 } else {
82214 ps = nonZero(k - mLen - 3)
82215 }
82216 return new BN(Buffer.concat([Buffer.from([0, reverse ? 1 : 2]), ps, Buffer.alloc(1), msg], k))
82217}
82218function nonZero (len) {
82219 var out = Buffer.allocUnsafe(len)
82220 var i = 0
82221 var cache = randomBytes(len * 2)
82222 var cur = 0
82223 var num
82224 while (i < len) {
82225 if (cur === cache.length) {
82226 cache = randomBytes(len * 2)
82227 cur = 0
82228 }
82229 num = cache[cur++]
82230 if (num) {
82231 out[i++] = num
82232 }
82233 }
82234 return out
82235}
82236
82237
82238/***/ }),
82239
82240/***/ "./node_modules/public-encrypt/withPublic.js":
82241/*!***************************************************!*\
82242 !*** ./node_modules/public-encrypt/withPublic.js ***!
82243 \***************************************************/
82244/*! no static exports found */
82245/***/ (function(module, exports, __webpack_require__) {
82246
82247var BN = __webpack_require__(/*! bn.js */ "./node_modules/bn.js/lib/bn.js")
82248var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
82249
82250function withPublic (paddedMsg, key) {
82251 return Buffer.from(paddedMsg
82252 .toRed(BN.mont(key.modulus))
82253 .redPow(new BN(key.publicExponent))
82254 .fromRed()
82255 .toArray())
82256}
82257
82258module.exports = withPublic
82259
82260
82261/***/ }),
82262
82263/***/ "./node_modules/public-encrypt/xor.js":
82264/*!********************************************!*\
82265 !*** ./node_modules/public-encrypt/xor.js ***!
82266 \********************************************/
82267/*! no static exports found */
82268/***/ (function(module, exports) {
82269
82270module.exports = function xor (a, b) {
82271 var len = a.length
82272 var i = -1
82273 while (++i < len) {
82274 a[i] ^= b[i]
82275 }
82276 return a
82277}
82278
82279
82280/***/ }),
82281
82282/***/ "./node_modules/randombytes/browser.js":
82283/*!*********************************************!*\
82284 !*** ./node_modules/randombytes/browser.js ***!
82285 \*********************************************/
82286/*! no static exports found */
82287/***/ (function(module, exports, __webpack_require__) {
82288
82289"use strict";
82290/* WEBPACK VAR INJECTION */(function(global, process) {
82291
82292// limit of Crypto.getRandomValues()
82293// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
82294var MAX_BYTES = 65536
82295
82296// Node supports requesting up to this number of bytes
82297// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48
82298var MAX_UINT32 = 4294967295
82299
82300function oldBrowser () {
82301 throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')
82302}
82303
82304var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
82305var crypto = global.crypto || global.msCrypto
82306
82307if (crypto && crypto.getRandomValues) {
82308 module.exports = randomBytes
82309} else {
82310 module.exports = oldBrowser
82311}
82312
82313function randomBytes (size, cb) {
82314 // phantomjs needs to throw
82315 if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
82316
82317 var bytes = Buffer.allocUnsafe(size)
82318
82319 if (size > 0) { // getRandomValues fails on IE if size == 0
82320 if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues
82321 // can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
82322 for (var generated = 0; generated < size; generated += MAX_BYTES) {
82323 // buffer.slice automatically checks if the end is past the end of
82324 // the buffer so we don't have to here
82325 crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))
82326 }
82327 } else {
82328 crypto.getRandomValues(bytes)
82329 }
82330 }
82331
82332 if (typeof cb === 'function') {
82333 return process.nextTick(function () {
82334 cb(null, bytes)
82335 })
82336 }
82337
82338 return bytes
82339}
82340
82341/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
82342
82343/***/ }),
82344
82345/***/ "./node_modules/randomfill/browser.js":
82346/*!********************************************!*\
82347 !*** ./node_modules/randomfill/browser.js ***!
82348 \********************************************/
82349/*! no static exports found */
82350/***/ (function(module, exports, __webpack_require__) {
82351
82352"use strict";
82353/* WEBPACK VAR INJECTION */(function(global, process) {
82354
82355function oldBrowser () {
82356 throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11')
82357}
82358var safeBuffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js")
82359var randombytes = __webpack_require__(/*! randombytes */ "./node_modules/randombytes/browser.js")
82360var Buffer = safeBuffer.Buffer
82361var kBufferMaxLength = safeBuffer.kMaxLength
82362var crypto = global.crypto || global.msCrypto
82363var kMaxUint32 = Math.pow(2, 32) - 1
82364function assertOffset (offset, length) {
82365 if (typeof offset !== 'number' || offset !== offset) { // eslint-disable-line no-self-compare
82366 throw new TypeError('offset must be a number')
82367 }
82368
82369 if (offset > kMaxUint32 || offset < 0) {
82370 throw new TypeError('offset must be a uint32')
82371 }
82372
82373 if (offset > kBufferMaxLength || offset > length) {
82374 throw new RangeError('offset out of range')
82375 }
82376}
82377
82378function assertSize (size, offset, length) {
82379 if (typeof size !== 'number' || size !== size) { // eslint-disable-line no-self-compare
82380 throw new TypeError('size must be a number')
82381 }
82382
82383 if (size > kMaxUint32 || size < 0) {
82384 throw new TypeError('size must be a uint32')
82385 }
82386
82387 if (size + offset > length || size > kBufferMaxLength) {
82388 throw new RangeError('buffer too small')
82389 }
82390}
82391if ((crypto && crypto.getRandomValues) || !process.browser) {
82392 exports.randomFill = randomFill
82393 exports.randomFillSync = randomFillSync
82394} else {
82395 exports.randomFill = oldBrowser
82396 exports.randomFillSync = oldBrowser
82397}
82398function randomFill (buf, offset, size, cb) {
82399 if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
82400 throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
82401 }
82402
82403 if (typeof offset === 'function') {
82404 cb = offset
82405 offset = 0
82406 size = buf.length
82407 } else if (typeof size === 'function') {
82408 cb = size
82409 size = buf.length - offset
82410 } else if (typeof cb !== 'function') {
82411 throw new TypeError('"cb" argument must be a function')
82412 }
82413 assertOffset(offset, buf.length)
82414 assertSize(size, offset, buf.length)
82415 return actualFill(buf, offset, size, cb)
82416}
82417
82418function actualFill (buf, offset, size, cb) {
82419 if (process.browser) {
82420 var ourBuf = buf.buffer
82421 var uint = new Uint8Array(ourBuf, offset, size)
82422 crypto.getRandomValues(uint)
82423 if (cb) {
82424 process.nextTick(function () {
82425 cb(null, buf)
82426 })
82427 return
82428 }
82429 return buf
82430 }
82431 if (cb) {
82432 randombytes(size, function (err, bytes) {
82433 if (err) {
82434 return cb(err)
82435 }
82436 bytes.copy(buf, offset)
82437 cb(null, buf)
82438 })
82439 return
82440 }
82441 var bytes = randombytes(size)
82442 bytes.copy(buf, offset)
82443 return buf
82444}
82445function randomFillSync (buf, offset, size) {
82446 if (typeof offset === 'undefined') {
82447 offset = 0
82448 }
82449 if (!Buffer.isBuffer(buf) && !(buf instanceof global.Uint8Array)) {
82450 throw new TypeError('"buf" argument must be a Buffer or Uint8Array')
82451 }
82452
82453 assertOffset(offset, buf.length)
82454
82455 if (size === undefined) size = buf.length - offset
82456
82457 assertSize(size, offset, buf.length)
82458
82459 return actualFill(buf, offset, size)
82460}
82461
82462/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
82463
82464/***/ }),
82465
82466/***/ "./node_modules/readable-stream/duplex-browser.js":
82467/*!********************************************************!*\
82468 !*** ./node_modules/readable-stream/duplex-browser.js ***!
82469 \********************************************************/
82470/*! no static exports found */
82471/***/ (function(module, exports, __webpack_require__) {
82472
82473module.exports = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/readable-stream/lib/_stream_duplex.js");
82474
82475
82476/***/ }),
82477
82478/***/ "./node_modules/readable-stream/lib/_stream_duplex.js":
82479/*!************************************************************!*\
82480 !*** ./node_modules/readable-stream/lib/_stream_duplex.js ***!
82481 \************************************************************/
82482/*! no static exports found */
82483/***/ (function(module, exports, __webpack_require__) {
82484
82485"use strict";
82486// Copyright Joyent, Inc. and other Node contributors.
82487//
82488// Permission is hereby granted, free of charge, to any person obtaining a
82489// copy of this software and associated documentation files (the
82490// "Software"), to deal in the Software without restriction, including
82491// without limitation the rights to use, copy, modify, merge, publish,
82492// distribute, sublicense, and/or sell copies of the Software, and to permit
82493// persons to whom the Software is furnished to do so, subject to the
82494// following conditions:
82495//
82496// The above copyright notice and this permission notice shall be included
82497// in all copies or substantial portions of the Software.
82498//
82499// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
82500// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
82501// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
82502// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
82503// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
82504// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
82505// USE OR OTHER DEALINGS IN THE SOFTWARE.
82506
82507// a duplex stream is just a stream that is both readable and writable.
82508// Since JS doesn't have multiple prototypal inheritance, this class
82509// prototypally inherits from Readable, and then parasitically from
82510// Writable.
82511
82512
82513
82514/*<replacement>*/
82515
82516var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/readable-stream/node_modules/process-nextick-args/index.js");
82517/*</replacement>*/
82518
82519/*<replacement>*/
82520var objectKeys = Object.keys || function (obj) {
82521 var keys = [];
82522 for (var key in obj) {
82523 keys.push(key);
82524 }return keys;
82525};
82526/*</replacement>*/
82527
82528module.exports = Duplex;
82529
82530/*<replacement>*/
82531var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
82532util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
82533/*</replacement>*/
82534
82535var Readable = __webpack_require__(/*! ./_stream_readable */ "./node_modules/readable-stream/lib/_stream_readable.js");
82536var Writable = __webpack_require__(/*! ./_stream_writable */ "./node_modules/readable-stream/lib/_stream_writable.js");
82537
82538util.inherits(Duplex, Readable);
82539
82540{
82541 // avoid scope creep, the keys array can then be collected
82542 var keys = objectKeys(Writable.prototype);
82543 for (var v = 0; v < keys.length; v++) {
82544 var method = keys[v];
82545 if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
82546 }
82547}
82548
82549function Duplex(options) {
82550 if (!(this instanceof Duplex)) return new Duplex(options);
82551
82552 Readable.call(this, options);
82553 Writable.call(this, options);
82554
82555 if (options && options.readable === false) this.readable = false;
82556
82557 if (options && options.writable === false) this.writable = false;
82558
82559 this.allowHalfOpen = true;
82560 if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
82561
82562 this.once('end', onend);
82563}
82564
82565Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
82566 // making it explicit this property is not enumerable
82567 // because otherwise some prototype manipulation in
82568 // userland will fail
82569 enumerable: false,
82570 get: function () {
82571 return this._writableState.highWaterMark;
82572 }
82573});
82574
82575// the no-half-open enforcer
82576function onend() {
82577 // if we allow half-open state, or if the writable side ended,
82578 // then we're ok.
82579 if (this.allowHalfOpen || this._writableState.ended) return;
82580
82581 // no more data can be written.
82582 // But allow more writes to happen in this tick.
82583 pna.nextTick(onEndNT, this);
82584}
82585
82586function onEndNT(self) {
82587 self.end();
82588}
82589
82590Object.defineProperty(Duplex.prototype, 'destroyed', {
82591 get: function () {
82592 if (this._readableState === undefined || this._writableState === undefined) {
82593 return false;
82594 }
82595 return this._readableState.destroyed && this._writableState.destroyed;
82596 },
82597 set: function (value) {
82598 // we ignore the value if the stream
82599 // has not been initialized yet
82600 if (this._readableState === undefined || this._writableState === undefined) {
82601 return;
82602 }
82603
82604 // backward compatibility, the user is explicitly
82605 // managing destroyed
82606 this._readableState.destroyed = value;
82607 this._writableState.destroyed = value;
82608 }
82609});
82610
82611Duplex.prototype._destroy = function (err, cb) {
82612 this.push(null);
82613 this.end();
82614
82615 pna.nextTick(cb, err);
82616};
82617
82618/***/ }),
82619
82620/***/ "./node_modules/readable-stream/lib/_stream_passthrough.js":
82621/*!*****************************************************************!*\
82622 !*** ./node_modules/readable-stream/lib/_stream_passthrough.js ***!
82623 \*****************************************************************/
82624/*! no static exports found */
82625/***/ (function(module, exports, __webpack_require__) {
82626
82627"use strict";
82628// Copyright Joyent, Inc. and other Node contributors.
82629//
82630// Permission is hereby granted, free of charge, to any person obtaining a
82631// copy of this software and associated documentation files (the
82632// "Software"), to deal in the Software without restriction, including
82633// without limitation the rights to use, copy, modify, merge, publish,
82634// distribute, sublicense, and/or sell copies of the Software, and to permit
82635// persons to whom the Software is furnished to do so, subject to the
82636// following conditions:
82637//
82638// The above copyright notice and this permission notice shall be included
82639// in all copies or substantial portions of the Software.
82640//
82641// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
82642// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
82643// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
82644// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
82645// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
82646// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
82647// USE OR OTHER DEALINGS IN THE SOFTWARE.
82648
82649// a passthrough stream.
82650// basically just the most minimal sort of Transform stream.
82651// Every written chunk gets output as-is.
82652
82653
82654
82655module.exports = PassThrough;
82656
82657var Transform = __webpack_require__(/*! ./_stream_transform */ "./node_modules/readable-stream/lib/_stream_transform.js");
82658
82659/*<replacement>*/
82660var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
82661util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
82662/*</replacement>*/
82663
82664util.inherits(PassThrough, Transform);
82665
82666function PassThrough(options) {
82667 if (!(this instanceof PassThrough)) return new PassThrough(options);
82668
82669 Transform.call(this, options);
82670}
82671
82672PassThrough.prototype._transform = function (chunk, encoding, cb) {
82673 cb(null, chunk);
82674};
82675
82676/***/ }),
82677
82678/***/ "./node_modules/readable-stream/lib/_stream_readable.js":
82679/*!**************************************************************!*\
82680 !*** ./node_modules/readable-stream/lib/_stream_readable.js ***!
82681 \**************************************************************/
82682/*! no static exports found */
82683/***/ (function(module, exports, __webpack_require__) {
82684
82685"use strict";
82686/* WEBPACK VAR INJECTION */(function(global, process) {// Copyright Joyent, Inc. and other Node contributors.
82687//
82688// Permission is hereby granted, free of charge, to any person obtaining a
82689// copy of this software and associated documentation files (the
82690// "Software"), to deal in the Software without restriction, including
82691// without limitation the rights to use, copy, modify, merge, publish,
82692// distribute, sublicense, and/or sell copies of the Software, and to permit
82693// persons to whom the Software is furnished to do so, subject to the
82694// following conditions:
82695//
82696// The above copyright notice and this permission notice shall be included
82697// in all copies or substantial portions of the Software.
82698//
82699// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
82700// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
82701// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
82702// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
82703// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
82704// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
82705// USE OR OTHER DEALINGS IN THE SOFTWARE.
82706
82707
82708
82709/*<replacement>*/
82710
82711var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/readable-stream/node_modules/process-nextick-args/index.js");
82712/*</replacement>*/
82713
82714module.exports = Readable;
82715
82716/*<replacement>*/
82717var isArray = __webpack_require__(/*! isarray */ "./node_modules/isarray/index.js");
82718/*</replacement>*/
82719
82720/*<replacement>*/
82721var Duplex;
82722/*</replacement>*/
82723
82724Readable.ReadableState = ReadableState;
82725
82726/*<replacement>*/
82727var EE = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
82728
82729var EElistenerCount = function (emitter, type) {
82730 return emitter.listeners(type).length;
82731};
82732/*</replacement>*/
82733
82734/*<replacement>*/
82735var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js");
82736/*</replacement>*/
82737
82738/*<replacement>*/
82739
82740var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/readable-stream/node_modules/safe-buffer/index.js").Buffer;
82741var OurUint8Array = global.Uint8Array || function () {};
82742function _uint8ArrayToBuffer(chunk) {
82743 return Buffer.from(chunk);
82744}
82745function _isUint8Array(obj) {
82746 return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
82747}
82748
82749/*</replacement>*/
82750
82751/*<replacement>*/
82752var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
82753util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
82754/*</replacement>*/
82755
82756/*<replacement>*/
82757var debugUtil = __webpack_require__(/*! util */ 0);
82758var debug = void 0;
82759if (debugUtil && debugUtil.debuglog) {
82760 debug = debugUtil.debuglog('stream');
82761} else {
82762 debug = function () {};
82763}
82764/*</replacement>*/
82765
82766var BufferList = __webpack_require__(/*! ./internal/streams/BufferList */ "./node_modules/readable-stream/lib/internal/streams/BufferList.js");
82767var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js");
82768var StringDecoder;
82769
82770util.inherits(Readable, Stream);
82771
82772var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
82773
82774function prependListener(emitter, event, fn) {
82775 // Sadly this is not cacheable as some libraries bundle their own
82776 // event emitter implementation with them.
82777 if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn);
82778
82779 // This is a hack to make sure that our error handler is attached before any
82780 // userland ones. NEVER DO THIS. This is here only because this code needs
82781 // to continue to work with older versions of Node.js that do not include
82782 // the prependListener() method. The goal is to eventually remove this hack.
82783 if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
82784}
82785
82786function ReadableState(options, stream) {
82787 Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
82788
82789 options = options || {};
82790
82791 // Duplex streams are both readable and writable, but share
82792 // the same options object.
82793 // However, some cases require setting options to different
82794 // values for the readable and the writable sides of the duplex stream.
82795 // These options can be provided separately as readableXXX and writableXXX.
82796 var isDuplex = stream instanceof Duplex;
82797
82798 // object stream flag. Used to make read(n) ignore n and to
82799 // make all the buffer merging and length checks go away
82800 this.objectMode = !!options.objectMode;
82801
82802 if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
82803
82804 // the point at which it stops calling _read() to fill the buffer
82805 // Note: 0 is a valid value, means "don't call _read preemptively ever"
82806 var hwm = options.highWaterMark;
82807 var readableHwm = options.readableHighWaterMark;
82808 var defaultHwm = this.objectMode ? 16 : 16 * 1024;
82809
82810 if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm;else this.highWaterMark = defaultHwm;
82811
82812 // cast to ints.
82813 this.highWaterMark = Math.floor(this.highWaterMark);
82814
82815 // A linked list is used to store data chunks instead of an array because the
82816 // linked list can remove elements from the beginning faster than
82817 // array.shift()
82818 this.buffer = new BufferList();
82819 this.length = 0;
82820 this.pipes = null;
82821 this.pipesCount = 0;
82822 this.flowing = null;
82823 this.ended = false;
82824 this.endEmitted = false;
82825 this.reading = false;
82826
82827 // a flag to be able to tell if the event 'readable'/'data' is emitted
82828 // immediately, or on a later tick. We set this to true at first, because
82829 // any actions that shouldn't happen until "later" should generally also
82830 // not happen before the first read call.
82831 this.sync = true;
82832
82833 // whenever we return null, then we set a flag to say
82834 // that we're awaiting a 'readable' event emission.
82835 this.needReadable = false;
82836 this.emittedReadable = false;
82837 this.readableListening = false;
82838 this.resumeScheduled = false;
82839
82840 // has it been destroyed
82841 this.destroyed = false;
82842
82843 // Crypto is kind of old and crusty. Historically, its default string
82844 // encoding is 'binary' so we have to make this configurable.
82845 // Everything else in the universe uses 'utf8', though.
82846 this.defaultEncoding = options.defaultEncoding || 'utf8';
82847
82848 // the number of writers that are awaiting a drain event in .pipe()s
82849 this.awaitDrain = 0;
82850
82851 // if true, a maybeReadMore has been scheduled
82852 this.readingMore = false;
82853
82854 this.decoder = null;
82855 this.encoding = null;
82856 if (options.encoding) {
82857 if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
82858 this.decoder = new StringDecoder(options.encoding);
82859 this.encoding = options.encoding;
82860 }
82861}
82862
82863function Readable(options) {
82864 Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
82865
82866 if (!(this instanceof Readable)) return new Readable(options);
82867
82868 this._readableState = new ReadableState(options, this);
82869
82870 // legacy
82871 this.readable = true;
82872
82873 if (options) {
82874 if (typeof options.read === 'function') this._read = options.read;
82875
82876 if (typeof options.destroy === 'function') this._destroy = options.destroy;
82877 }
82878
82879 Stream.call(this);
82880}
82881
82882Object.defineProperty(Readable.prototype, 'destroyed', {
82883 get: function () {
82884 if (this._readableState === undefined) {
82885 return false;
82886 }
82887 return this._readableState.destroyed;
82888 },
82889 set: function (value) {
82890 // we ignore the value if the stream
82891 // has not been initialized yet
82892 if (!this._readableState) {
82893 return;
82894 }
82895
82896 // backward compatibility, the user is explicitly
82897 // managing destroyed
82898 this._readableState.destroyed = value;
82899 }
82900});
82901
82902Readable.prototype.destroy = destroyImpl.destroy;
82903Readable.prototype._undestroy = destroyImpl.undestroy;
82904Readable.prototype._destroy = function (err, cb) {
82905 this.push(null);
82906 cb(err);
82907};
82908
82909// Manually shove something into the read() buffer.
82910// This returns true if the highWaterMark has not been hit yet,
82911// similar to how Writable.write() returns true if you should
82912// write() some more.
82913Readable.prototype.push = function (chunk, encoding) {
82914 var state = this._readableState;
82915 var skipChunkCheck;
82916
82917 if (!state.objectMode) {
82918 if (typeof chunk === 'string') {
82919 encoding = encoding || state.defaultEncoding;
82920 if (encoding !== state.encoding) {
82921 chunk = Buffer.from(chunk, encoding);
82922 encoding = '';
82923 }
82924 skipChunkCheck = true;
82925 }
82926 } else {
82927 skipChunkCheck = true;
82928 }
82929
82930 return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
82931};
82932
82933// Unshift should *always* be something directly out of read()
82934Readable.prototype.unshift = function (chunk) {
82935 return readableAddChunk(this, chunk, null, true, false);
82936};
82937
82938function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
82939 var state = stream._readableState;
82940 if (chunk === null) {
82941 state.reading = false;
82942 onEofChunk(stream, state);
82943 } else {
82944 var er;
82945 if (!skipChunkCheck) er = chunkInvalid(state, chunk);
82946 if (er) {
82947 stream.emit('error', er);
82948 } else if (state.objectMode || chunk && chunk.length > 0) {
82949 if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
82950 chunk = _uint8ArrayToBuffer(chunk);
82951 }
82952
82953 if (addToFront) {
82954 if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
82955 } else if (state.ended) {
82956 stream.emit('error', new Error('stream.push() after EOF'));
82957 } else {
82958 state.reading = false;
82959 if (state.decoder && !encoding) {
82960 chunk = state.decoder.write(chunk);
82961 if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
82962 } else {
82963 addChunk(stream, state, chunk, false);
82964 }
82965 }
82966 } else if (!addToFront) {
82967 state.reading = false;
82968 }
82969 }
82970
82971 return needMoreData(state);
82972}
82973
82974function addChunk(stream, state, chunk, addToFront) {
82975 if (state.flowing && state.length === 0 && !state.sync) {
82976 stream.emit('data', chunk);
82977 stream.read(0);
82978 } else {
82979 // update the buffer info.
82980 state.length += state.objectMode ? 1 : chunk.length;
82981 if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
82982
82983 if (state.needReadable) emitReadable(stream);
82984 }
82985 maybeReadMore(stream, state);
82986}
82987
82988function chunkInvalid(state, chunk) {
82989 var er;
82990 if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
82991 er = new TypeError('Invalid non-string/buffer chunk');
82992 }
82993 return er;
82994}
82995
82996// if it's past the high water mark, we can push in some more.
82997// Also, if we have no data yet, we can stand some
82998// more bytes. This is to work around cases where hwm=0,
82999// such as the repl. Also, if the push() triggered a
83000// readable event, and the user called read(largeNumber) such that
83001// needReadable was set, then we ought to push more, so that another
83002// 'readable' event will be triggered.
83003function needMoreData(state) {
83004 return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
83005}
83006
83007Readable.prototype.isPaused = function () {
83008 return this._readableState.flowing === false;
83009};
83010
83011// backwards compatibility.
83012Readable.prototype.setEncoding = function (enc) {
83013 if (!StringDecoder) StringDecoder = __webpack_require__(/*! string_decoder/ */ "./node_modules/node-libs-browser/node_modules/string_decoder/lib/string_decoder.js").StringDecoder;
83014 this._readableState.decoder = new StringDecoder(enc);
83015 this._readableState.encoding = enc;
83016 return this;
83017};
83018
83019// Don't raise the hwm > 8MB
83020var MAX_HWM = 0x800000;
83021function computeNewHighWaterMark(n) {
83022 if (n >= MAX_HWM) {
83023 n = MAX_HWM;
83024 } else {
83025 // Get the next highest power of 2 to prevent increasing hwm excessively in
83026 // tiny amounts
83027 n--;
83028 n |= n >>> 1;
83029 n |= n >>> 2;
83030 n |= n >>> 4;
83031 n |= n >>> 8;
83032 n |= n >>> 16;
83033 n++;
83034 }
83035 return n;
83036}
83037
83038// This function is designed to be inlinable, so please take care when making
83039// changes to the function body.
83040function howMuchToRead(n, state) {
83041 if (n <= 0 || state.length === 0 && state.ended) return 0;
83042 if (state.objectMode) return 1;
83043 if (n !== n) {
83044 // Only flow one buffer at a time
83045 if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
83046 }
83047 // If we're asking for more than the current hwm, then raise the hwm.
83048 if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
83049 if (n <= state.length) return n;
83050 // Don't have enough
83051 if (!state.ended) {
83052 state.needReadable = true;
83053 return 0;
83054 }
83055 return state.length;
83056}
83057
83058// you can override either this method, or the async _read(n) below.
83059Readable.prototype.read = function (n) {
83060 debug('read', n);
83061 n = parseInt(n, 10);
83062 var state = this._readableState;
83063 var nOrig = n;
83064
83065 if (n !== 0) state.emittedReadable = false;
83066
83067 // if we're doing read(0) to trigger a readable event, but we
83068 // already have a bunch of data in the buffer, then just trigger
83069 // the 'readable' event and move on.
83070 if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
83071 debug('read: emitReadable', state.length, state.ended);
83072 if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
83073 return null;
83074 }
83075
83076 n = howMuchToRead(n, state);
83077
83078 // if we've ended, and we're now clear, then finish it up.
83079 if (n === 0 && state.ended) {
83080 if (state.length === 0) endReadable(this);
83081 return null;
83082 }
83083
83084 // All the actual chunk generation logic needs to be
83085 // *below* the call to _read. The reason is that in certain
83086 // synthetic stream cases, such as passthrough streams, _read
83087 // may be a completely synchronous operation which may change
83088 // the state of the read buffer, providing enough data when
83089 // before there was *not* enough.
83090 //
83091 // So, the steps are:
83092 // 1. Figure out what the state of things will be after we do
83093 // a read from the buffer.
83094 //
83095 // 2. If that resulting state will trigger a _read, then call _read.
83096 // Note that this may be asynchronous, or synchronous. Yes, it is
83097 // deeply ugly to write APIs this way, but that still doesn't mean
83098 // that the Readable class should behave improperly, as streams are
83099 // designed to be sync/async agnostic.
83100 // Take note if the _read call is sync or async (ie, if the read call
83101 // has returned yet), so that we know whether or not it's safe to emit
83102 // 'readable' etc.
83103 //
83104 // 3. Actually pull the requested chunks out of the buffer and return.
83105
83106 // if we need a readable event, then we need to do some reading.
83107 var doRead = state.needReadable;
83108 debug('need readable', doRead);
83109
83110 // if we currently have less than the highWaterMark, then also read some
83111 if (state.length === 0 || state.length - n < state.highWaterMark) {
83112 doRead = true;
83113 debug('length less than watermark', doRead);
83114 }
83115
83116 // however, if we've ended, then there's no point, and if we're already
83117 // reading, then it's unnecessary.
83118 if (state.ended || state.reading) {
83119 doRead = false;
83120 debug('reading or ended', doRead);
83121 } else if (doRead) {
83122 debug('do read');
83123 state.reading = true;
83124 state.sync = true;
83125 // if the length is currently zero, then we *need* a readable event.
83126 if (state.length === 0) state.needReadable = true;
83127 // call internal read method
83128 this._read(state.highWaterMark);
83129 state.sync = false;
83130 // If _read pushed data synchronously, then `reading` will be false,
83131 // and we need to re-evaluate how much data we can return to the user.
83132 if (!state.reading) n = howMuchToRead(nOrig, state);
83133 }
83134
83135 var ret;
83136 if (n > 0) ret = fromList(n, state);else ret = null;
83137
83138 if (ret === null) {
83139 state.needReadable = true;
83140 n = 0;
83141 } else {
83142 state.length -= n;
83143 }
83144
83145 if (state.length === 0) {
83146 // If we have nothing in the buffer, then we want to know
83147 // as soon as we *do* get something into the buffer.
83148 if (!state.ended) state.needReadable = true;
83149
83150 // If we tried to read() past the EOF, then emit end on the next tick.
83151 if (nOrig !== n && state.ended) endReadable(this);
83152 }
83153
83154 if (ret !== null) this.emit('data', ret);
83155
83156 return ret;
83157};
83158
83159function onEofChunk(stream, state) {
83160 if (state.ended) return;
83161 if (state.decoder) {
83162 var chunk = state.decoder.end();
83163 if (chunk && chunk.length) {
83164 state.buffer.push(chunk);
83165 state.length += state.objectMode ? 1 : chunk.length;
83166 }
83167 }
83168 state.ended = true;
83169
83170 // emit 'readable' now to make sure it gets picked up.
83171 emitReadable(stream);
83172}
83173
83174// Don't emit readable right away in sync mode, because this can trigger
83175// another read() call => stack overflow. This way, it might trigger
83176// a nextTick recursion warning, but that's not so bad.
83177function emitReadable(stream) {
83178 var state = stream._readableState;
83179 state.needReadable = false;
83180 if (!state.emittedReadable) {
83181 debug('emitReadable', state.flowing);
83182 state.emittedReadable = true;
83183 if (state.sync) pna.nextTick(emitReadable_, stream);else emitReadable_(stream);
83184 }
83185}
83186
83187function emitReadable_(stream) {
83188 debug('emit readable');
83189 stream.emit('readable');
83190 flow(stream);
83191}
83192
83193// at this point, the user has presumably seen the 'readable' event,
83194// and called read() to consume some data. that may have triggered
83195// in turn another _read(n) call, in which case reading = true if
83196// it's in progress.
83197// However, if we're not ended, or reading, and the length < hwm,
83198// then go ahead and try to read some more preemptively.
83199function maybeReadMore(stream, state) {
83200 if (!state.readingMore) {
83201 state.readingMore = true;
83202 pna.nextTick(maybeReadMore_, stream, state);
83203 }
83204}
83205
83206function maybeReadMore_(stream, state) {
83207 var len = state.length;
83208 while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
83209 debug('maybeReadMore read 0');
83210 stream.read(0);
83211 if (len === state.length)
83212 // didn't get any data, stop spinning.
83213 break;else len = state.length;
83214 }
83215 state.readingMore = false;
83216}
83217
83218// abstract method. to be overridden in specific implementation classes.
83219// call cb(er, data) where data is <= n in length.
83220// for virtual (non-string, non-buffer) streams, "length" is somewhat
83221// arbitrary, and perhaps not very meaningful.
83222Readable.prototype._read = function (n) {
83223 this.emit('error', new Error('_read() is not implemented'));
83224};
83225
83226Readable.prototype.pipe = function (dest, pipeOpts) {
83227 var src = this;
83228 var state = this._readableState;
83229
83230 switch (state.pipesCount) {
83231 case 0:
83232 state.pipes = dest;
83233 break;
83234 case 1:
83235 state.pipes = [state.pipes, dest];
83236 break;
83237 default:
83238 state.pipes.push(dest);
83239 break;
83240 }
83241 state.pipesCount += 1;
83242 debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
83243
83244 var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
83245
83246 var endFn = doEnd ? onend : unpipe;
83247 if (state.endEmitted) pna.nextTick(endFn);else src.once('end', endFn);
83248
83249 dest.on('unpipe', onunpipe);
83250 function onunpipe(readable, unpipeInfo) {
83251 debug('onunpipe');
83252 if (readable === src) {
83253 if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
83254 unpipeInfo.hasUnpiped = true;
83255 cleanup();
83256 }
83257 }
83258 }
83259
83260 function onend() {
83261 debug('onend');
83262 dest.end();
83263 }
83264
83265 // when the dest drains, it reduces the awaitDrain counter
83266 // on the source. This would be more elegant with a .once()
83267 // handler in flow(), but adding and removing repeatedly is
83268 // too slow.
83269 var ondrain = pipeOnDrain(src);
83270 dest.on('drain', ondrain);
83271
83272 var cleanedUp = false;
83273 function cleanup() {
83274 debug('cleanup');
83275 // cleanup event handlers once the pipe is broken
83276 dest.removeListener('close', onclose);
83277 dest.removeListener('finish', onfinish);
83278 dest.removeListener('drain', ondrain);
83279 dest.removeListener('error', onerror);
83280 dest.removeListener('unpipe', onunpipe);
83281 src.removeListener('end', onend);
83282 src.removeListener('end', unpipe);
83283 src.removeListener('data', ondata);
83284
83285 cleanedUp = true;
83286
83287 // if the reader is waiting for a drain event from this
83288 // specific writer, then it would cause it to never start
83289 // flowing again.
83290 // So, if this is awaiting a drain, then we just call it now.
83291 // If we don't know, then assume that we are waiting for one.
83292 if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
83293 }
83294
83295 // If the user pushes more data while we're writing to dest then we'll end up
83296 // in ondata again. However, we only want to increase awaitDrain once because
83297 // dest will only emit one 'drain' event for the multiple writes.
83298 // => Introduce a guard on increasing awaitDrain.
83299 var increasedAwaitDrain = false;
83300 src.on('data', ondata);
83301 function ondata(chunk) {
83302 debug('ondata');
83303 increasedAwaitDrain = false;
83304 var ret = dest.write(chunk);
83305 if (false === ret && !increasedAwaitDrain) {
83306 // If the user unpiped during `dest.write()`, it is possible
83307 // to get stuck in a permanently paused state if that write
83308 // also returned false.
83309 // => Check whether `dest` is still a piping destination.
83310 if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
83311 debug('false write response, pause', src._readableState.awaitDrain);
83312 src._readableState.awaitDrain++;
83313 increasedAwaitDrain = true;
83314 }
83315 src.pause();
83316 }
83317 }
83318
83319 // if the dest has an error, then stop piping into it.
83320 // however, don't suppress the throwing behavior for this.
83321 function onerror(er) {
83322 debug('onerror', er);
83323 unpipe();
83324 dest.removeListener('error', onerror);
83325 if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
83326 }
83327
83328 // Make sure our error handler is attached before userland ones.
83329 prependListener(dest, 'error', onerror);
83330
83331 // Both close and finish should trigger unpipe, but only once.
83332 function onclose() {
83333 dest.removeListener('finish', onfinish);
83334 unpipe();
83335 }
83336 dest.once('close', onclose);
83337 function onfinish() {
83338 debug('onfinish');
83339 dest.removeListener('close', onclose);
83340 unpipe();
83341 }
83342 dest.once('finish', onfinish);
83343
83344 function unpipe() {
83345 debug('unpipe');
83346 src.unpipe(dest);
83347 }
83348
83349 // tell the dest that it's being piped to
83350 dest.emit('pipe', src);
83351
83352 // start the flow if it hasn't been started already.
83353 if (!state.flowing) {
83354 debug('pipe resume');
83355 src.resume();
83356 }
83357
83358 return dest;
83359};
83360
83361function pipeOnDrain(src) {
83362 return function () {
83363 var state = src._readableState;
83364 debug('pipeOnDrain', state.awaitDrain);
83365 if (state.awaitDrain) state.awaitDrain--;
83366 if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
83367 state.flowing = true;
83368 flow(src);
83369 }
83370 };
83371}
83372
83373Readable.prototype.unpipe = function (dest) {
83374 var state = this._readableState;
83375 var unpipeInfo = { hasUnpiped: false };
83376
83377 // if we're not piping anywhere, then do nothing.
83378 if (state.pipesCount === 0) return this;
83379
83380 // just one destination. most common case.
83381 if (state.pipesCount === 1) {
83382 // passed in one, but it's not the right one.
83383 if (dest && dest !== state.pipes) return this;
83384
83385 if (!dest) dest = state.pipes;
83386
83387 // got a match.
83388 state.pipes = null;
83389 state.pipesCount = 0;
83390 state.flowing = false;
83391 if (dest) dest.emit('unpipe', this, unpipeInfo);
83392 return this;
83393 }
83394
83395 // slow case. multiple pipe destinations.
83396
83397 if (!dest) {
83398 // remove all.
83399 var dests = state.pipes;
83400 var len = state.pipesCount;
83401 state.pipes = null;
83402 state.pipesCount = 0;
83403 state.flowing = false;
83404
83405 for (var i = 0; i < len; i++) {
83406 dests[i].emit('unpipe', this, unpipeInfo);
83407 }return this;
83408 }
83409
83410 // try to find the right one.
83411 var index = indexOf(state.pipes, dest);
83412 if (index === -1) return this;
83413
83414 state.pipes.splice(index, 1);
83415 state.pipesCount -= 1;
83416 if (state.pipesCount === 1) state.pipes = state.pipes[0];
83417
83418 dest.emit('unpipe', this, unpipeInfo);
83419
83420 return this;
83421};
83422
83423// set up data events if they are asked for
83424// Ensure readable listeners eventually get something
83425Readable.prototype.on = function (ev, fn) {
83426 var res = Stream.prototype.on.call(this, ev, fn);
83427
83428 if (ev === 'data') {
83429 // Start flowing on next tick if stream isn't explicitly paused
83430 if (this._readableState.flowing !== false) this.resume();
83431 } else if (ev === 'readable') {
83432 var state = this._readableState;
83433 if (!state.endEmitted && !state.readableListening) {
83434 state.readableListening = state.needReadable = true;
83435 state.emittedReadable = false;
83436 if (!state.reading) {
83437 pna.nextTick(nReadingNextTick, this);
83438 } else if (state.length) {
83439 emitReadable(this);
83440 }
83441 }
83442 }
83443
83444 return res;
83445};
83446Readable.prototype.addListener = Readable.prototype.on;
83447
83448function nReadingNextTick(self) {
83449 debug('readable nexttick read 0');
83450 self.read(0);
83451}
83452
83453// pause() and resume() are remnants of the legacy readable stream API
83454// If the user uses them, then switch into old mode.
83455Readable.prototype.resume = function () {
83456 var state = this._readableState;
83457 if (!state.flowing) {
83458 debug('resume');
83459 state.flowing = true;
83460 resume(this, state);
83461 }
83462 return this;
83463};
83464
83465function resume(stream, state) {
83466 if (!state.resumeScheduled) {
83467 state.resumeScheduled = true;
83468 pna.nextTick(resume_, stream, state);
83469 }
83470}
83471
83472function resume_(stream, state) {
83473 if (!state.reading) {
83474 debug('resume read 0');
83475 stream.read(0);
83476 }
83477
83478 state.resumeScheduled = false;
83479 state.awaitDrain = 0;
83480 stream.emit('resume');
83481 flow(stream);
83482 if (state.flowing && !state.reading) stream.read(0);
83483}
83484
83485Readable.prototype.pause = function () {
83486 debug('call pause flowing=%j', this._readableState.flowing);
83487 if (false !== this._readableState.flowing) {
83488 debug('pause');
83489 this._readableState.flowing = false;
83490 this.emit('pause');
83491 }
83492 return this;
83493};
83494
83495function flow(stream) {
83496 var state = stream._readableState;
83497 debug('flow', state.flowing);
83498 while (state.flowing && stream.read() !== null) {}
83499}
83500
83501// wrap an old-style stream as the async data source.
83502// This is *not* part of the readable stream interface.
83503// It is an ugly unfortunate mess of history.
83504Readable.prototype.wrap = function (stream) {
83505 var _this = this;
83506
83507 var state = this._readableState;
83508 var paused = false;
83509
83510 stream.on('end', function () {
83511 debug('wrapped end');
83512 if (state.decoder && !state.ended) {
83513 var chunk = state.decoder.end();
83514 if (chunk && chunk.length) _this.push(chunk);
83515 }
83516
83517 _this.push(null);
83518 });
83519
83520 stream.on('data', function (chunk) {
83521 debug('wrapped data');
83522 if (state.decoder) chunk = state.decoder.write(chunk);
83523
83524 // don't skip over falsy values in objectMode
83525 if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
83526
83527 var ret = _this.push(chunk);
83528 if (!ret) {
83529 paused = true;
83530 stream.pause();
83531 }
83532 });
83533
83534 // proxy all the other methods.
83535 // important when wrapping filters and duplexes.
83536 for (var i in stream) {
83537 if (this[i] === undefined && typeof stream[i] === 'function') {
83538 this[i] = function (method) {
83539 return function () {
83540 return stream[method].apply(stream, arguments);
83541 };
83542 }(i);
83543 }
83544 }
83545
83546 // proxy certain important events.
83547 for (var n = 0; n < kProxyEvents.length; n++) {
83548 stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
83549 }
83550
83551 // when we try to consume some more bytes, simply unpause the
83552 // underlying stream.
83553 this._read = function (n) {
83554 debug('wrapped _read', n);
83555 if (paused) {
83556 paused = false;
83557 stream.resume();
83558 }
83559 };
83560
83561 return this;
83562};
83563
83564Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
83565 // making it explicit this property is not enumerable
83566 // because otherwise some prototype manipulation in
83567 // userland will fail
83568 enumerable: false,
83569 get: function () {
83570 return this._readableState.highWaterMark;
83571 }
83572});
83573
83574// exposed for testing purposes only.
83575Readable._fromList = fromList;
83576
83577// Pluck off n bytes from an array of buffers.
83578// Length is the combined lengths of all the buffers in the list.
83579// This function is designed to be inlinable, so please take care when making
83580// changes to the function body.
83581function fromList(n, state) {
83582 // nothing buffered
83583 if (state.length === 0) return null;
83584
83585 var ret;
83586 if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
83587 // read it all, truncate the list
83588 if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
83589 state.buffer.clear();
83590 } else {
83591 // read part of list
83592 ret = fromListPartial(n, state.buffer, state.decoder);
83593 }
83594
83595 return ret;
83596}
83597
83598// Extracts only enough buffered data to satisfy the amount requested.
83599// This function is designed to be inlinable, so please take care when making
83600// changes to the function body.
83601function fromListPartial(n, list, hasStrings) {
83602 var ret;
83603 if (n < list.head.data.length) {
83604 // slice is the same for buffers and strings
83605 ret = list.head.data.slice(0, n);
83606 list.head.data = list.head.data.slice(n);
83607 } else if (n === list.head.data.length) {
83608 // first chunk is a perfect match
83609 ret = list.shift();
83610 } else {
83611 // result spans more than one buffer
83612 ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
83613 }
83614 return ret;
83615}
83616
83617// Copies a specified amount of characters from the list of buffered data
83618// chunks.
83619// This function is designed to be inlinable, so please take care when making
83620// changes to the function body.
83621function copyFromBufferString(n, list) {
83622 var p = list.head;
83623 var c = 1;
83624 var ret = p.data;
83625 n -= ret.length;
83626 while (p = p.next) {
83627 var str = p.data;
83628 var nb = n > str.length ? str.length : n;
83629 if (nb === str.length) ret += str;else ret += str.slice(0, n);
83630 n -= nb;
83631 if (n === 0) {
83632 if (nb === str.length) {
83633 ++c;
83634 if (p.next) list.head = p.next;else list.head = list.tail = null;
83635 } else {
83636 list.head = p;
83637 p.data = str.slice(nb);
83638 }
83639 break;
83640 }
83641 ++c;
83642 }
83643 list.length -= c;
83644 return ret;
83645}
83646
83647// Copies a specified amount of bytes from the list of buffered data chunks.
83648// This function is designed to be inlinable, so please take care when making
83649// changes to the function body.
83650function copyFromBuffer(n, list) {
83651 var ret = Buffer.allocUnsafe(n);
83652 var p = list.head;
83653 var c = 1;
83654 p.data.copy(ret);
83655 n -= p.data.length;
83656 while (p = p.next) {
83657 var buf = p.data;
83658 var nb = n > buf.length ? buf.length : n;
83659 buf.copy(ret, ret.length - n, 0, nb);
83660 n -= nb;
83661 if (n === 0) {
83662 if (nb === buf.length) {
83663 ++c;
83664 if (p.next) list.head = p.next;else list.head = list.tail = null;
83665 } else {
83666 list.head = p;
83667 p.data = buf.slice(nb);
83668 }
83669 break;
83670 }
83671 ++c;
83672 }
83673 list.length -= c;
83674 return ret;
83675}
83676
83677function endReadable(stream) {
83678 var state = stream._readableState;
83679
83680 // If we get here before consuming all the bytes, then that is a
83681 // bug in node. Should never happen.
83682 if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
83683
83684 if (!state.endEmitted) {
83685 state.ended = true;
83686 pna.nextTick(endReadableNT, state, stream);
83687 }
83688}
83689
83690function endReadableNT(state, stream) {
83691 // Check that we didn't get one last unshift.
83692 if (!state.endEmitted && state.length === 0) {
83693 state.endEmitted = true;
83694 stream.readable = false;
83695 stream.emit('end');
83696 }
83697}
83698
83699function indexOf(xs, x) {
83700 for (var i = 0, l = xs.length; i < l; i++) {
83701 if (xs[i] === x) return i;
83702 }
83703 return -1;
83704}
83705/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js")))
83706
83707/***/ }),
83708
83709/***/ "./node_modules/readable-stream/lib/_stream_transform.js":
83710/*!***************************************************************!*\
83711 !*** ./node_modules/readable-stream/lib/_stream_transform.js ***!
83712 \***************************************************************/
83713/*! no static exports found */
83714/***/ (function(module, exports, __webpack_require__) {
83715
83716"use strict";
83717// Copyright Joyent, Inc. and other Node contributors.
83718//
83719// Permission is hereby granted, free of charge, to any person obtaining a
83720// copy of this software and associated documentation files (the
83721// "Software"), to deal in the Software without restriction, including
83722// without limitation the rights to use, copy, modify, merge, publish,
83723// distribute, sublicense, and/or sell copies of the Software, and to permit
83724// persons to whom the Software is furnished to do so, subject to the
83725// following conditions:
83726//
83727// The above copyright notice and this permission notice shall be included
83728// in all copies or substantial portions of the Software.
83729//
83730// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
83731// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
83732// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
83733// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
83734// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
83735// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
83736// USE OR OTHER DEALINGS IN THE SOFTWARE.
83737
83738// a transform stream is a readable/writable stream where you do
83739// something with the data. Sometimes it's called a "filter",
83740// but that's not a great name for it, since that implies a thing where
83741// some bits pass through, and others are simply ignored. (That would
83742// be a valid example of a transform, of course.)
83743//
83744// While the output is causally related to the input, it's not a
83745// necessarily symmetric or synchronous transformation. For example,
83746// a zlib stream might take multiple plain-text writes(), and then
83747// emit a single compressed chunk some time in the future.
83748//
83749// Here's how this works:
83750//
83751// The Transform stream has all the aspects of the readable and writable
83752// stream classes. When you write(chunk), that calls _write(chunk,cb)
83753// internally, and returns false if there's a lot of pending writes
83754// buffered up. When you call read(), that calls _read(n) until
83755// there's enough pending readable data buffered up.
83756//
83757// In a transform stream, the written data is placed in a buffer. When
83758// _read(n) is called, it transforms the queued up data, calling the
83759// buffered _write cb's as it consumes chunks. If consuming a single
83760// written chunk would result in multiple output chunks, then the first
83761// outputted bit calls the readcb, and subsequent chunks just go into
83762// the read buffer, and will cause it to emit 'readable' if necessary.
83763//
83764// This way, back-pressure is actually determined by the reading side,
83765// since _read has to be called to start processing a new chunk. However,
83766// a pathological inflate type of transform can cause excessive buffering
83767// here. For example, imagine a stream where every byte of input is
83768// interpreted as an integer from 0-255, and then results in that many
83769// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
83770// 1kb of data being output. In this case, you could write a very small
83771// amount of input, and end up with a very large amount of output. In
83772// such a pathological inflating mechanism, there'd be no way to tell
83773// the system to stop doing the transform. A single 4MB write could
83774// cause the system to run out of memory.
83775//
83776// However, even in such a pathological case, only a single written chunk
83777// would be consumed, and then the rest would wait (un-transformed) until
83778// the results of the previous transformed chunk were consumed.
83779
83780
83781
83782module.exports = Transform;
83783
83784var Duplex = __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
83785
83786/*<replacement>*/
83787var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
83788util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
83789/*</replacement>*/
83790
83791util.inherits(Transform, Duplex);
83792
83793function afterTransform(er, data) {
83794 var ts = this._transformState;
83795 ts.transforming = false;
83796
83797 var cb = ts.writecb;
83798
83799 if (!cb) {
83800 return this.emit('error', new Error('write callback called multiple times'));
83801 }
83802
83803 ts.writechunk = null;
83804 ts.writecb = null;
83805
83806 if (data != null) // single equals check for both `null` and `undefined`
83807 this.push(data);
83808
83809 cb(er);
83810
83811 var rs = this._readableState;
83812 rs.reading = false;
83813 if (rs.needReadable || rs.length < rs.highWaterMark) {
83814 this._read(rs.highWaterMark);
83815 }
83816}
83817
83818function Transform(options) {
83819 if (!(this instanceof Transform)) return new Transform(options);
83820
83821 Duplex.call(this, options);
83822
83823 this._transformState = {
83824 afterTransform: afterTransform.bind(this),
83825 needTransform: false,
83826 transforming: false,
83827 writecb: null,
83828 writechunk: null,
83829 writeencoding: null
83830 };
83831
83832 // start out asking for a readable event once data is transformed.
83833 this._readableState.needReadable = true;
83834
83835 // we have implemented the _read method, and done the other things
83836 // that Readable wants before the first _read call, so unset the
83837 // sync guard flag.
83838 this._readableState.sync = false;
83839
83840 if (options) {
83841 if (typeof options.transform === 'function') this._transform = options.transform;
83842
83843 if (typeof options.flush === 'function') this._flush = options.flush;
83844 }
83845
83846 // When the writable side finishes, then flush out anything remaining.
83847 this.on('prefinish', prefinish);
83848}
83849
83850function prefinish() {
83851 var _this = this;
83852
83853 if (typeof this._flush === 'function') {
83854 this._flush(function (er, data) {
83855 done(_this, er, data);
83856 });
83857 } else {
83858 done(this, null, null);
83859 }
83860}
83861
83862Transform.prototype.push = function (chunk, encoding) {
83863 this._transformState.needTransform = false;
83864 return Duplex.prototype.push.call(this, chunk, encoding);
83865};
83866
83867// This is the part where you do stuff!
83868// override this function in implementation classes.
83869// 'chunk' is an input chunk.
83870//
83871// Call `push(newChunk)` to pass along transformed output
83872// to the readable side. You may call 'push' zero or more times.
83873//
83874// Call `cb(err)` when you are done with this chunk. If you pass
83875// an error, then that'll put the hurt on the whole operation. If you
83876// never call cb(), then you'll never get another chunk.
83877Transform.prototype._transform = function (chunk, encoding, cb) {
83878 throw new Error('_transform() is not implemented');
83879};
83880
83881Transform.prototype._write = function (chunk, encoding, cb) {
83882 var ts = this._transformState;
83883 ts.writecb = cb;
83884 ts.writechunk = chunk;
83885 ts.writeencoding = encoding;
83886 if (!ts.transforming) {
83887 var rs = this._readableState;
83888 if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
83889 }
83890};
83891
83892// Doesn't matter what the args are here.
83893// _transform does all the work.
83894// That we got here means that the readable side wants more data.
83895Transform.prototype._read = function (n) {
83896 var ts = this._transformState;
83897
83898 if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
83899 ts.transforming = true;
83900 this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
83901 } else {
83902 // mark that we need a transform, so that any data that comes in
83903 // will get processed, now that we've asked for it.
83904 ts.needTransform = true;
83905 }
83906};
83907
83908Transform.prototype._destroy = function (err, cb) {
83909 var _this2 = this;
83910
83911 Duplex.prototype._destroy.call(this, err, function (err2) {
83912 cb(err2);
83913 _this2.emit('close');
83914 });
83915};
83916
83917function done(stream, er, data) {
83918 if (er) return stream.emit('error', er);
83919
83920 if (data != null) // single equals check for both `null` and `undefined`
83921 stream.push(data);
83922
83923 // if there's nothing in the write buffer, then that means
83924 // that nothing more will ever be provided
83925 if (stream._writableState.length) throw new Error('Calling transform done when ws.length != 0');
83926
83927 if (stream._transformState.transforming) throw new Error('Calling transform done when still transforming');
83928
83929 return stream.push(null);
83930}
83931
83932/***/ }),
83933
83934/***/ "./node_modules/readable-stream/lib/_stream_writable.js":
83935/*!**************************************************************!*\
83936 !*** ./node_modules/readable-stream/lib/_stream_writable.js ***!
83937 \**************************************************************/
83938/*! no static exports found */
83939/***/ (function(module, exports, __webpack_require__) {
83940
83941"use strict";
83942/* WEBPACK VAR INJECTION */(function(process, setImmediate, global) {// Copyright Joyent, Inc. and other Node contributors.
83943//
83944// Permission is hereby granted, free of charge, to any person obtaining a
83945// copy of this software and associated documentation files (the
83946// "Software"), to deal in the Software without restriction, including
83947// without limitation the rights to use, copy, modify, merge, publish,
83948// distribute, sublicense, and/or sell copies of the Software, and to permit
83949// persons to whom the Software is furnished to do so, subject to the
83950// following conditions:
83951//
83952// The above copyright notice and this permission notice shall be included
83953// in all copies or substantial portions of the Software.
83954//
83955// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
83956// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
83957// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
83958// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
83959// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
83960// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
83961// USE OR OTHER DEALINGS IN THE SOFTWARE.
83962
83963// A bit simpler than readable streams.
83964// Implement an async ._write(chunk, encoding, cb), and it'll handle all
83965// the drain event emission and buffering.
83966
83967
83968
83969/*<replacement>*/
83970
83971var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/readable-stream/node_modules/process-nextick-args/index.js");
83972/*</replacement>*/
83973
83974module.exports = Writable;
83975
83976/* <replacement> */
83977function WriteReq(chunk, encoding, cb) {
83978 this.chunk = chunk;
83979 this.encoding = encoding;
83980 this.callback = cb;
83981 this.next = null;
83982}
83983
83984// It seems a linked list but it is not
83985// there will be only 2 of these for each stream
83986function CorkedRequest(state) {
83987 var _this = this;
83988
83989 this.next = null;
83990 this.entry = null;
83991 this.finish = function () {
83992 onCorkedFinish(_this, state);
83993 };
83994}
83995/* </replacement> */
83996
83997/*<replacement>*/
83998var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;
83999/*</replacement>*/
84000
84001/*<replacement>*/
84002var Duplex;
84003/*</replacement>*/
84004
84005Writable.WritableState = WritableState;
84006
84007/*<replacement>*/
84008var util = __webpack_require__(/*! core-util-is */ "./node_modules/core-util-is/lib/util.js");
84009util.inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
84010/*</replacement>*/
84011
84012/*<replacement>*/
84013var internalUtil = {
84014 deprecate: __webpack_require__(/*! util-deprecate */ "./node_modules/util-deprecate/browser.js")
84015};
84016/*</replacement>*/
84017
84018/*<replacement>*/
84019var Stream = __webpack_require__(/*! ./internal/streams/stream */ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js");
84020/*</replacement>*/
84021
84022/*<replacement>*/
84023
84024var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/readable-stream/node_modules/safe-buffer/index.js").Buffer;
84025var OurUint8Array = global.Uint8Array || function () {};
84026function _uint8ArrayToBuffer(chunk) {
84027 return Buffer.from(chunk);
84028}
84029function _isUint8Array(obj) {
84030 return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
84031}
84032
84033/*</replacement>*/
84034
84035var destroyImpl = __webpack_require__(/*! ./internal/streams/destroy */ "./node_modules/readable-stream/lib/internal/streams/destroy.js");
84036
84037util.inherits(Writable, Stream);
84038
84039function nop() {}
84040
84041function WritableState(options, stream) {
84042 Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
84043
84044 options = options || {};
84045
84046 // Duplex streams are both readable and writable, but share
84047 // the same options object.
84048 // However, some cases require setting options to different
84049 // values for the readable and the writable sides of the duplex stream.
84050 // These options can be provided separately as readableXXX and writableXXX.
84051 var isDuplex = stream instanceof Duplex;
84052
84053 // object stream flag to indicate whether or not this stream
84054 // contains buffers or objects.
84055 this.objectMode = !!options.objectMode;
84056
84057 if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
84058
84059 // the point at which write() starts returning false
84060 // Note: 0 is a valid value, means that we always return false if
84061 // the entire buffer is not flushed immediately on write()
84062 var hwm = options.highWaterMark;
84063 var writableHwm = options.writableHighWaterMark;
84064 var defaultHwm = this.objectMode ? 16 : 16 * 1024;
84065
84066 if (hwm || hwm === 0) this.highWaterMark = hwm;else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm;else this.highWaterMark = defaultHwm;
84067
84068 // cast to ints.
84069 this.highWaterMark = Math.floor(this.highWaterMark);
84070
84071 // if _final has been called
84072 this.finalCalled = false;
84073
84074 // drain event flag.
84075 this.needDrain = false;
84076 // at the start of calling end()
84077 this.ending = false;
84078 // when end() has been called, and returned
84079 this.ended = false;
84080 // when 'finish' is emitted
84081 this.finished = false;
84082
84083 // has it been destroyed
84084 this.destroyed = false;
84085
84086 // should we decode strings into buffers before passing to _write?
84087 // this is here so that some node-core streams can optimize string
84088 // handling at a lower level.
84089 var noDecode = options.decodeStrings === false;
84090 this.decodeStrings = !noDecode;
84091
84092 // Crypto is kind of old and crusty. Historically, its default string
84093 // encoding is 'binary' so we have to make this configurable.
84094 // Everything else in the universe uses 'utf8', though.
84095 this.defaultEncoding = options.defaultEncoding || 'utf8';
84096
84097 // not an actual buffer we keep track of, but a measurement
84098 // of how much we're waiting to get pushed to some underlying
84099 // socket or file.
84100 this.length = 0;
84101
84102 // a flag to see when we're in the middle of a write.
84103 this.writing = false;
84104
84105 // when true all writes will be buffered until .uncork() call
84106 this.corked = 0;
84107
84108 // a flag to be able to tell if the onwrite cb is called immediately,
84109 // or on a later tick. We set this to true at first, because any
84110 // actions that shouldn't happen until "later" should generally also
84111 // not happen before the first write call.
84112 this.sync = true;
84113
84114 // a flag to know if we're processing previously buffered items, which
84115 // may call the _write() callback in the same tick, so that we don't
84116 // end up in an overlapped onwrite situation.
84117 this.bufferProcessing = false;
84118
84119 // the callback that's passed to _write(chunk,cb)
84120 this.onwrite = function (er) {
84121 onwrite(stream, er);
84122 };
84123
84124 // the callback that the user supplies to write(chunk,encoding,cb)
84125 this.writecb = null;
84126
84127 // the amount that is being written when _write is called.
84128 this.writelen = 0;
84129
84130 this.bufferedRequest = null;
84131 this.lastBufferedRequest = null;
84132
84133 // number of pending user-supplied write callbacks
84134 // this must be 0 before 'finish' can be emitted
84135 this.pendingcb = 0;
84136
84137 // emit prefinish if the only thing we're waiting for is _write cbs
84138 // This is relevant for synchronous Transform streams
84139 this.prefinished = false;
84140
84141 // True if the error was already emitted and should not be thrown again
84142 this.errorEmitted = false;
84143
84144 // count buffered requests
84145 this.bufferedRequestCount = 0;
84146
84147 // allocate the first CorkedRequest, there is always
84148 // one allocated and free to use, and we maintain at most two
84149 this.corkedRequestsFree = new CorkedRequest(this);
84150}
84151
84152WritableState.prototype.getBuffer = function getBuffer() {
84153 var current = this.bufferedRequest;
84154 var out = [];
84155 while (current) {
84156 out.push(current);
84157 current = current.next;
84158 }
84159 return out;
84160};
84161
84162(function () {
84163 try {
84164 Object.defineProperty(WritableState.prototype, 'buffer', {
84165 get: internalUtil.deprecate(function () {
84166 return this.getBuffer();
84167 }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
84168 });
84169 } catch (_) {}
84170})();
84171
84172// Test _writableState for inheritance to account for Duplex streams,
84173// whose prototype chain only points to Readable.
84174var realHasInstance;
84175if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
84176 realHasInstance = Function.prototype[Symbol.hasInstance];
84177 Object.defineProperty(Writable, Symbol.hasInstance, {
84178 value: function (object) {
84179 if (realHasInstance.call(this, object)) return true;
84180 if (this !== Writable) return false;
84181
84182 return object && object._writableState instanceof WritableState;
84183 }
84184 });
84185} else {
84186 realHasInstance = function (object) {
84187 return object instanceof this;
84188 };
84189}
84190
84191function Writable(options) {
84192 Duplex = Duplex || __webpack_require__(/*! ./_stream_duplex */ "./node_modules/readable-stream/lib/_stream_duplex.js");
84193
84194 // Writable ctor is applied to Duplexes, too.
84195 // `realHasInstance` is necessary because using plain `instanceof`
84196 // would return false, as no `_writableState` property is attached.
84197
84198 // Trying to use the custom `instanceof` for Writable here will also break the
84199 // Node.js LazyTransform implementation, which has a non-trivial getter for
84200 // `_writableState` that would lead to infinite recursion.
84201 if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
84202 return new Writable(options);
84203 }
84204
84205 this._writableState = new WritableState(options, this);
84206
84207 // legacy.
84208 this.writable = true;
84209
84210 if (options) {
84211 if (typeof options.write === 'function') this._write = options.write;
84212
84213 if (typeof options.writev === 'function') this._writev = options.writev;
84214
84215 if (typeof options.destroy === 'function') this._destroy = options.destroy;
84216
84217 if (typeof options.final === 'function') this._final = options.final;
84218 }
84219
84220 Stream.call(this);
84221}
84222
84223// Otherwise people can pipe Writable streams, which is just wrong.
84224Writable.prototype.pipe = function () {
84225 this.emit('error', new Error('Cannot pipe, not readable'));
84226};
84227
84228function writeAfterEnd(stream, cb) {
84229 var er = new Error('write after end');
84230 // TODO: defer error events consistently everywhere, not just the cb
84231 stream.emit('error', er);
84232 pna.nextTick(cb, er);
84233}
84234
84235// Checks that a user-supplied chunk is valid, especially for the particular
84236// mode the stream is in. Currently this means that `null` is never accepted
84237// and undefined/non-string values are only allowed in object mode.
84238function validChunk(stream, state, chunk, cb) {
84239 var valid = true;
84240 var er = false;
84241
84242 if (chunk === null) {
84243 er = new TypeError('May not write null values to stream');
84244 } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
84245 er = new TypeError('Invalid non-string/buffer chunk');
84246 }
84247 if (er) {
84248 stream.emit('error', er);
84249 pna.nextTick(cb, er);
84250 valid = false;
84251 }
84252 return valid;
84253}
84254
84255Writable.prototype.write = function (chunk, encoding, cb) {
84256 var state = this._writableState;
84257 var ret = false;
84258 var isBuf = !state.objectMode && _isUint8Array(chunk);
84259
84260 if (isBuf && !Buffer.isBuffer(chunk)) {
84261 chunk = _uint8ArrayToBuffer(chunk);
84262 }
84263
84264 if (typeof encoding === 'function') {
84265 cb = encoding;
84266 encoding = null;
84267 }
84268
84269 if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
84270
84271 if (typeof cb !== 'function') cb = nop;
84272
84273 if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
84274 state.pendingcb++;
84275 ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
84276 }
84277
84278 return ret;
84279};
84280
84281Writable.prototype.cork = function () {
84282 var state = this._writableState;
84283
84284 state.corked++;
84285};
84286
84287Writable.prototype.uncork = function () {
84288 var state = this._writableState;
84289
84290 if (state.corked) {
84291 state.corked--;
84292
84293 if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
84294 }
84295};
84296
84297Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
84298 // node::ParseEncoding() requires lower case.
84299 if (typeof encoding === 'string') encoding = encoding.toLowerCase();
84300 if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
84301 this._writableState.defaultEncoding = encoding;
84302 return this;
84303};
84304
84305function decodeChunk(state, chunk, encoding) {
84306 if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
84307 chunk = Buffer.from(chunk, encoding);
84308 }
84309 return chunk;
84310}
84311
84312Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
84313 // making it explicit this property is not enumerable
84314 // because otherwise some prototype manipulation in
84315 // userland will fail
84316 enumerable: false,
84317 get: function () {
84318 return this._writableState.highWaterMark;
84319 }
84320});
84321
84322// if we're already writing something, then just put this
84323// in the queue, and wait our turn. Otherwise, call _write
84324// If we return false, then we need a drain event, so set that flag.
84325function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
84326 if (!isBuf) {
84327 var newChunk = decodeChunk(state, chunk, encoding);
84328 if (chunk !== newChunk) {
84329 isBuf = true;
84330 encoding = 'buffer';
84331 chunk = newChunk;
84332 }
84333 }
84334 var len = state.objectMode ? 1 : chunk.length;
84335
84336 state.length += len;
84337
84338 var ret = state.length < state.highWaterMark;
84339 // we must ensure that previous needDrain will not be reset to false.
84340 if (!ret) state.needDrain = true;
84341
84342 if (state.writing || state.corked) {
84343 var last = state.lastBufferedRequest;
84344 state.lastBufferedRequest = {
84345 chunk: chunk,
84346 encoding: encoding,
84347 isBuf: isBuf,
84348 callback: cb,
84349 next: null
84350 };
84351 if (last) {
84352 last.next = state.lastBufferedRequest;
84353 } else {
84354 state.bufferedRequest = state.lastBufferedRequest;
84355 }
84356 state.bufferedRequestCount += 1;
84357 } else {
84358 doWrite(stream, state, false, len, chunk, encoding, cb);
84359 }
84360
84361 return ret;
84362}
84363
84364function doWrite(stream, state, writev, len, chunk, encoding, cb) {
84365 state.writelen = len;
84366 state.writecb = cb;
84367 state.writing = true;
84368 state.sync = true;
84369 if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
84370 state.sync = false;
84371}
84372
84373function onwriteError(stream, state, sync, er, cb) {
84374 --state.pendingcb;
84375
84376 if (sync) {
84377 // defer the callback if we are being called synchronously
84378 // to avoid piling up things on the stack
84379 pna.nextTick(cb, er);
84380 // this can emit finish, and it will always happen
84381 // after error
84382 pna.nextTick(finishMaybe, stream, state);
84383 stream._writableState.errorEmitted = true;
84384 stream.emit('error', er);
84385 } else {
84386 // the caller expect this to happen before if
84387 // it is async
84388 cb(er);
84389 stream._writableState.errorEmitted = true;
84390 stream.emit('error', er);
84391 // this can emit finish, but finish must
84392 // always follow error
84393 finishMaybe(stream, state);
84394 }
84395}
84396
84397function onwriteStateUpdate(state) {
84398 state.writing = false;
84399 state.writecb = null;
84400 state.length -= state.writelen;
84401 state.writelen = 0;
84402}
84403
84404function onwrite(stream, er) {
84405 var state = stream._writableState;
84406 var sync = state.sync;
84407 var cb = state.writecb;
84408
84409 onwriteStateUpdate(state);
84410
84411 if (er) onwriteError(stream, state, sync, er, cb);else {
84412 // Check if we're actually ready to finish, but don't emit yet
84413 var finished = needFinish(state);
84414
84415 if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
84416 clearBuffer(stream, state);
84417 }
84418
84419 if (sync) {
84420 /*<replacement>*/
84421 asyncWrite(afterWrite, stream, state, finished, cb);
84422 /*</replacement>*/
84423 } else {
84424 afterWrite(stream, state, finished, cb);
84425 }
84426 }
84427}
84428
84429function afterWrite(stream, state, finished, cb) {
84430 if (!finished) onwriteDrain(stream, state);
84431 state.pendingcb--;
84432 cb();
84433 finishMaybe(stream, state);
84434}
84435
84436// Must force callback to be called on nextTick, so that we don't
84437// emit 'drain' before the write() consumer gets the 'false' return
84438// value, and has a chance to attach a 'drain' listener.
84439function onwriteDrain(stream, state) {
84440 if (state.length === 0 && state.needDrain) {
84441 state.needDrain = false;
84442 stream.emit('drain');
84443 }
84444}
84445
84446// if there's something in the buffer waiting, then process it
84447function clearBuffer(stream, state) {
84448 state.bufferProcessing = true;
84449 var entry = state.bufferedRequest;
84450
84451 if (stream._writev && entry && entry.next) {
84452 // Fast case, write everything using _writev()
84453 var l = state.bufferedRequestCount;
84454 var buffer = new Array(l);
84455 var holder = state.corkedRequestsFree;
84456 holder.entry = entry;
84457
84458 var count = 0;
84459 var allBuffers = true;
84460 while (entry) {
84461 buffer[count] = entry;
84462 if (!entry.isBuf) allBuffers = false;
84463 entry = entry.next;
84464 count += 1;
84465 }
84466 buffer.allBuffers = allBuffers;
84467
84468 doWrite(stream, state, true, state.length, buffer, '', holder.finish);
84469
84470 // doWrite is almost always async, defer these to save a bit of time
84471 // as the hot path ends with doWrite
84472 state.pendingcb++;
84473 state.lastBufferedRequest = null;
84474 if (holder.next) {
84475 state.corkedRequestsFree = holder.next;
84476 holder.next = null;
84477 } else {
84478 state.corkedRequestsFree = new CorkedRequest(state);
84479 }
84480 state.bufferedRequestCount = 0;
84481 } else {
84482 // Slow case, write chunks one-by-one
84483 while (entry) {
84484 var chunk = entry.chunk;
84485 var encoding = entry.encoding;
84486 var cb = entry.callback;
84487 var len = state.objectMode ? 1 : chunk.length;
84488
84489 doWrite(stream, state, false, len, chunk, encoding, cb);
84490 entry = entry.next;
84491 state.bufferedRequestCount--;
84492 // if we didn't call the onwrite immediately, then
84493 // it means that we need to wait until it does.
84494 // also, that means that the chunk and cb are currently
84495 // being processed, so move the buffer counter past them.
84496 if (state.writing) {
84497 break;
84498 }
84499 }
84500
84501 if (entry === null) state.lastBufferedRequest = null;
84502 }
84503
84504 state.bufferedRequest = entry;
84505 state.bufferProcessing = false;
84506}
84507
84508Writable.prototype._write = function (chunk, encoding, cb) {
84509 cb(new Error('_write() is not implemented'));
84510};
84511
84512Writable.prototype._writev = null;
84513
84514Writable.prototype.end = function (chunk, encoding, cb) {
84515 var state = this._writableState;
84516
84517 if (typeof chunk === 'function') {
84518 cb = chunk;
84519 chunk = null;
84520 encoding = null;
84521 } else if (typeof encoding === 'function') {
84522 cb = encoding;
84523 encoding = null;
84524 }
84525
84526 if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
84527
84528 // .end() fully uncorks
84529 if (state.corked) {
84530 state.corked = 1;
84531 this.uncork();
84532 }
84533
84534 // ignore unnecessary end() calls.
84535 if (!state.ending && !state.finished) endWritable(this, state, cb);
84536};
84537
84538function needFinish(state) {
84539 return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
84540}
84541function callFinal(stream, state) {
84542 stream._final(function (err) {
84543 state.pendingcb--;
84544 if (err) {
84545 stream.emit('error', err);
84546 }
84547 state.prefinished = true;
84548 stream.emit('prefinish');
84549 finishMaybe(stream, state);
84550 });
84551}
84552function prefinish(stream, state) {
84553 if (!state.prefinished && !state.finalCalled) {
84554 if (typeof stream._final === 'function') {
84555 state.pendingcb++;
84556 state.finalCalled = true;
84557 pna.nextTick(callFinal, stream, state);
84558 } else {
84559 state.prefinished = true;
84560 stream.emit('prefinish');
84561 }
84562 }
84563}
84564
84565function finishMaybe(stream, state) {
84566 var need = needFinish(state);
84567 if (need) {
84568 prefinish(stream, state);
84569 if (state.pendingcb === 0) {
84570 state.finished = true;
84571 stream.emit('finish');
84572 }
84573 }
84574 return need;
84575}
84576
84577function endWritable(stream, state, cb) {
84578 state.ending = true;
84579 finishMaybe(stream, state);
84580 if (cb) {
84581 if (state.finished) pna.nextTick(cb);else stream.once('finish', cb);
84582 }
84583 state.ended = true;
84584 stream.writable = false;
84585}
84586
84587function onCorkedFinish(corkReq, state, err) {
84588 var entry = corkReq.entry;
84589 corkReq.entry = null;
84590 while (entry) {
84591 var cb = entry.callback;
84592 state.pendingcb--;
84593 cb(err);
84594 entry = entry.next;
84595 }
84596 if (state.corkedRequestsFree) {
84597 state.corkedRequestsFree.next = corkReq;
84598 } else {
84599 state.corkedRequestsFree = corkReq;
84600 }
84601}
84602
84603Object.defineProperty(Writable.prototype, 'destroyed', {
84604 get: function () {
84605 if (this._writableState === undefined) {
84606 return false;
84607 }
84608 return this._writableState.destroyed;
84609 },
84610 set: function (value) {
84611 // we ignore the value if the stream
84612 // has not been initialized yet
84613 if (!this._writableState) {
84614 return;
84615 }
84616
84617 // backward compatibility, the user is explicitly
84618 // managing destroyed
84619 this._writableState.destroyed = value;
84620 }
84621});
84622
84623Writable.prototype.destroy = destroyImpl.destroy;
84624Writable.prototype._undestroy = destroyImpl.undestroy;
84625Writable.prototype._destroy = function (err, cb) {
84626 this.end();
84627 cb(err);
84628};
84629/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../timers-browserify/main.js */ "./node_modules/timers-browserify/main.js").setImmediate, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
84630
84631/***/ }),
84632
84633/***/ "./node_modules/readable-stream/lib/internal/streams/BufferList.js":
84634/*!*************************************************************************!*\
84635 !*** ./node_modules/readable-stream/lib/internal/streams/BufferList.js ***!
84636 \*************************************************************************/
84637/*! no static exports found */
84638/***/ (function(module, exports, __webpack_require__) {
84639
84640"use strict";
84641
84642
84643function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
84644
84645var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/readable-stream/node_modules/safe-buffer/index.js").Buffer;
84646var util = __webpack_require__(/*! util */ 1);
84647
84648function copyBuffer(src, target, offset) {
84649 src.copy(target, offset);
84650}
84651
84652module.exports = function () {
84653 function BufferList() {
84654 _classCallCheck(this, BufferList);
84655
84656 this.head = null;
84657 this.tail = null;
84658 this.length = 0;
84659 }
84660
84661 BufferList.prototype.push = function push(v) {
84662 var entry = { data: v, next: null };
84663 if (this.length > 0) this.tail.next = entry;else this.head = entry;
84664 this.tail = entry;
84665 ++this.length;
84666 };
84667
84668 BufferList.prototype.unshift = function unshift(v) {
84669 var entry = { data: v, next: this.head };
84670 if (this.length === 0) this.tail = entry;
84671 this.head = entry;
84672 ++this.length;
84673 };
84674
84675 BufferList.prototype.shift = function shift() {
84676 if (this.length === 0) return;
84677 var ret = this.head.data;
84678 if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
84679 --this.length;
84680 return ret;
84681 };
84682
84683 BufferList.prototype.clear = function clear() {
84684 this.head = this.tail = null;
84685 this.length = 0;
84686 };
84687
84688 BufferList.prototype.join = function join(s) {
84689 if (this.length === 0) return '';
84690 var p = this.head;
84691 var ret = '' + p.data;
84692 while (p = p.next) {
84693 ret += s + p.data;
84694 }return ret;
84695 };
84696
84697 BufferList.prototype.concat = function concat(n) {
84698 if (this.length === 0) return Buffer.alloc(0);
84699 if (this.length === 1) return this.head.data;
84700 var ret = Buffer.allocUnsafe(n >>> 0);
84701 var p = this.head;
84702 var i = 0;
84703 while (p) {
84704 copyBuffer(p.data, ret, i);
84705 i += p.data.length;
84706 p = p.next;
84707 }
84708 return ret;
84709 };
84710
84711 return BufferList;
84712}();
84713
84714if (util && util.inspect && util.inspect.custom) {
84715 module.exports.prototype[util.inspect.custom] = function () {
84716 var obj = util.inspect({ length: this.length });
84717 return this.constructor.name + ' ' + obj;
84718 };
84719}
84720
84721/***/ }),
84722
84723/***/ "./node_modules/readable-stream/lib/internal/streams/destroy.js":
84724/*!**********************************************************************!*\
84725 !*** ./node_modules/readable-stream/lib/internal/streams/destroy.js ***!
84726 \**********************************************************************/
84727/*! no static exports found */
84728/***/ (function(module, exports, __webpack_require__) {
84729
84730"use strict";
84731
84732
84733/*<replacement>*/
84734
84735var pna = __webpack_require__(/*! process-nextick-args */ "./node_modules/readable-stream/node_modules/process-nextick-args/index.js");
84736/*</replacement>*/
84737
84738// undocumented cb() API, needed for core, not for public API
84739function destroy(err, cb) {
84740 var _this = this;
84741
84742 var readableDestroyed = this._readableState && this._readableState.destroyed;
84743 var writableDestroyed = this._writableState && this._writableState.destroyed;
84744
84745 if (readableDestroyed || writableDestroyed) {
84746 if (cb) {
84747 cb(err);
84748 } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
84749 pna.nextTick(emitErrorNT, this, err);
84750 }
84751 return this;
84752 }
84753
84754 // we set destroyed to true before firing error callbacks in order
84755 // to make it re-entrance safe in case destroy() is called within callbacks
84756
84757 if (this._readableState) {
84758 this._readableState.destroyed = true;
84759 }
84760
84761 // if this is a duplex stream mark the writable part as destroyed as well
84762 if (this._writableState) {
84763 this._writableState.destroyed = true;
84764 }
84765
84766 this._destroy(err || null, function (err) {
84767 if (!cb && err) {
84768 pna.nextTick(emitErrorNT, _this, err);
84769 if (_this._writableState) {
84770 _this._writableState.errorEmitted = true;
84771 }
84772 } else if (cb) {
84773 cb(err);
84774 }
84775 });
84776
84777 return this;
84778}
84779
84780function undestroy() {
84781 if (this._readableState) {
84782 this._readableState.destroyed = false;
84783 this._readableState.reading = false;
84784 this._readableState.ended = false;
84785 this._readableState.endEmitted = false;
84786 }
84787
84788 if (this._writableState) {
84789 this._writableState.destroyed = false;
84790 this._writableState.ended = false;
84791 this._writableState.ending = false;
84792 this._writableState.finished = false;
84793 this._writableState.errorEmitted = false;
84794 }
84795}
84796
84797function emitErrorNT(self, err) {
84798 self.emit('error', err);
84799}
84800
84801module.exports = {
84802 destroy: destroy,
84803 undestroy: undestroy
84804};
84805
84806/***/ }),
84807
84808/***/ "./node_modules/readable-stream/lib/internal/streams/stream-browser.js":
84809/*!*****************************************************************************!*\
84810 !*** ./node_modules/readable-stream/lib/internal/streams/stream-browser.js ***!
84811 \*****************************************************************************/
84812/*! no static exports found */
84813/***/ (function(module, exports, __webpack_require__) {
84814
84815module.exports = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
84816
84817
84818/***/ }),
84819
84820/***/ "./node_modules/readable-stream/node_modules/process-nextick-args/index.js":
84821/*!*********************************************************************************!*\
84822 !*** ./node_modules/readable-stream/node_modules/process-nextick-args/index.js ***!
84823 \*********************************************************************************/
84824/*! no static exports found */
84825/***/ (function(module, exports, __webpack_require__) {
84826
84827"use strict";
84828/* WEBPACK VAR INJECTION */(function(process) {
84829
84830if (typeof process === 'undefined' ||
84831 !process.version ||
84832 process.version.indexOf('v0.') === 0 ||
84833 process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
84834 module.exports = { nextTick: nextTick };
84835} else {
84836 module.exports = process
84837}
84838
84839function nextTick(fn, arg1, arg2, arg3) {
84840 if (typeof fn !== 'function') {
84841 throw new TypeError('"callback" argument must be a function');
84842 }
84843 var len = arguments.length;
84844 var args, i;
84845 switch (len) {
84846 case 0:
84847 case 1:
84848 return process.nextTick(fn);
84849 case 2:
84850 return process.nextTick(function afterTickOne() {
84851 fn.call(null, arg1);
84852 });
84853 case 3:
84854 return process.nextTick(function afterTickTwo() {
84855 fn.call(null, arg1, arg2);
84856 });
84857 case 4:
84858 return process.nextTick(function afterTickThree() {
84859 fn.call(null, arg1, arg2, arg3);
84860 });
84861 default:
84862 args = new Array(len - 1);
84863 i = 0;
84864 while (i < args.length) {
84865 args[i++] = arguments[i];
84866 }
84867 return process.nextTick(function afterTick() {
84868 fn.apply(null, args);
84869 });
84870 }
84871}
84872
84873
84874/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
84875
84876/***/ }),
84877
84878/***/ "./node_modules/readable-stream/node_modules/safe-buffer/index.js":
84879/*!************************************************************************!*\
84880 !*** ./node_modules/readable-stream/node_modules/safe-buffer/index.js ***!
84881 \************************************************************************/
84882/*! no static exports found */
84883/***/ (function(module, exports, __webpack_require__) {
84884
84885/* eslint-disable node/no-deprecated-api */
84886var buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")
84887var Buffer = buffer.Buffer
84888
84889// alternative to using Object.keys for old browsers
84890function copyProps (src, dst) {
84891 for (var key in src) {
84892 dst[key] = src[key]
84893 }
84894}
84895if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
84896 module.exports = buffer
84897} else {
84898 // Copy properties from require('buffer')
84899 copyProps(buffer, exports)
84900 exports.Buffer = SafeBuffer
84901}
84902
84903function SafeBuffer (arg, encodingOrOffset, length) {
84904 return Buffer(arg, encodingOrOffset, length)
84905}
84906
84907// Copy static methods from Buffer
84908copyProps(Buffer, SafeBuffer)
84909
84910SafeBuffer.from = function (arg, encodingOrOffset, length) {
84911 if (typeof arg === 'number') {
84912 throw new TypeError('Argument must not be a number')
84913 }
84914 return Buffer(arg, encodingOrOffset, length)
84915}
84916
84917SafeBuffer.alloc = function (size, fill, encoding) {
84918 if (typeof size !== 'number') {
84919 throw new TypeError('Argument must be a number')
84920 }
84921 var buf = Buffer(size)
84922 if (fill !== undefined) {
84923 if (typeof encoding === 'string') {
84924 buf.fill(fill, encoding)
84925 } else {
84926 buf.fill(fill)
84927 }
84928 } else {
84929 buf.fill(0)
84930 }
84931 return buf
84932}
84933
84934SafeBuffer.allocUnsafe = function (size) {
84935 if (typeof size !== 'number') {
84936 throw new TypeError('Argument must be a number')
84937 }
84938 return Buffer(size)
84939}
84940
84941SafeBuffer.allocUnsafeSlow = function (size) {
84942 if (typeof size !== 'number') {
84943 throw new TypeError('Argument must be a number')
84944 }
84945 return buffer.SlowBuffer(size)
84946}
84947
84948
84949/***/ }),
84950
84951/***/ "./node_modules/readable-stream/passthrough.js":
84952/*!*****************************************************!*\
84953 !*** ./node_modules/readable-stream/passthrough.js ***!
84954 \*****************************************************/
84955/*! no static exports found */
84956/***/ (function(module, exports, __webpack_require__) {
84957
84958module.exports = __webpack_require__(/*! ./readable */ "./node_modules/readable-stream/readable-browser.js").PassThrough
84959
84960
84961/***/ }),
84962
84963/***/ "./node_modules/readable-stream/readable-browser.js":
84964/*!**********************************************************!*\
84965 !*** ./node_modules/readable-stream/readable-browser.js ***!
84966 \**********************************************************/
84967/*! no static exports found */
84968/***/ (function(module, exports, __webpack_require__) {
84969
84970exports = module.exports = __webpack_require__(/*! ./lib/_stream_readable.js */ "./node_modules/readable-stream/lib/_stream_readable.js");
84971exports.Stream = exports;
84972exports.Readable = exports;
84973exports.Writable = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/readable-stream/lib/_stream_writable.js");
84974exports.Duplex = __webpack_require__(/*! ./lib/_stream_duplex.js */ "./node_modules/readable-stream/lib/_stream_duplex.js");
84975exports.Transform = __webpack_require__(/*! ./lib/_stream_transform.js */ "./node_modules/readable-stream/lib/_stream_transform.js");
84976exports.PassThrough = __webpack_require__(/*! ./lib/_stream_passthrough.js */ "./node_modules/readable-stream/lib/_stream_passthrough.js");
84977
84978
84979/***/ }),
84980
84981/***/ "./node_modules/readable-stream/transform.js":
84982/*!***************************************************!*\
84983 !*** ./node_modules/readable-stream/transform.js ***!
84984 \***************************************************/
84985/*! no static exports found */
84986/***/ (function(module, exports, __webpack_require__) {
84987
84988module.exports = __webpack_require__(/*! ./readable */ "./node_modules/readable-stream/readable-browser.js").Transform
84989
84990
84991/***/ }),
84992
84993/***/ "./node_modules/readable-stream/writable-browser.js":
84994/*!**********************************************************!*\
84995 !*** ./node_modules/readable-stream/writable-browser.js ***!
84996 \**********************************************************/
84997/*! no static exports found */
84998/***/ (function(module, exports, __webpack_require__) {
84999
85000module.exports = __webpack_require__(/*! ./lib/_stream_writable.js */ "./node_modules/readable-stream/lib/_stream_writable.js");
85001
85002
85003/***/ }),
85004
85005/***/ "./node_modules/ripemd160/index.js":
85006/*!*****************************************!*\
85007 !*** ./node_modules/ripemd160/index.js ***!
85008 \*****************************************/
85009/*! no static exports found */
85010/***/ (function(module, exports, __webpack_require__) {
85011
85012"use strict";
85013
85014var Buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js").Buffer
85015var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
85016var HashBase = __webpack_require__(/*! hash-base */ "./node_modules/hash-base/index.js")
85017
85018var ARRAY16 = new Array(16)
85019
85020var zl = [
85021 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
85022 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
85023 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
85024 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
85025 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
85026]
85027
85028var zr = [
85029 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
85030 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
85031 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
85032 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
85033 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
85034]
85035
85036var sl = [
85037 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
85038 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
85039 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
85040 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
85041 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
85042]
85043
85044var sr = [
85045 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
85046 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
85047 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
85048 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
85049 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
85050]
85051
85052var hl = [0x00000000, 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xa953fd4e]
85053var hr = [0x50a28be6, 0x5c4dd124, 0x6d703ef3, 0x7a6d76e9, 0x00000000]
85054
85055function RIPEMD160 () {
85056 HashBase.call(this, 64)
85057
85058 // state
85059 this._a = 0x67452301
85060 this._b = 0xefcdab89
85061 this._c = 0x98badcfe
85062 this._d = 0x10325476
85063 this._e = 0xc3d2e1f0
85064}
85065
85066inherits(RIPEMD160, HashBase)
85067
85068RIPEMD160.prototype._update = function () {
85069 var words = ARRAY16
85070 for (var j = 0; j < 16; ++j) words[j] = this._block.readInt32LE(j * 4)
85071
85072 var al = this._a | 0
85073 var bl = this._b | 0
85074 var cl = this._c | 0
85075 var dl = this._d | 0
85076 var el = this._e | 0
85077
85078 var ar = this._a | 0
85079 var br = this._b | 0
85080 var cr = this._c | 0
85081 var dr = this._d | 0
85082 var er = this._e | 0
85083
85084 // computation
85085 for (var i = 0; i < 80; i += 1) {
85086 var tl
85087 var tr
85088 if (i < 16) {
85089 tl = fn1(al, bl, cl, dl, el, words[zl[i]], hl[0], sl[i])
85090 tr = fn5(ar, br, cr, dr, er, words[zr[i]], hr[0], sr[i])
85091 } else if (i < 32) {
85092 tl = fn2(al, bl, cl, dl, el, words[zl[i]], hl[1], sl[i])
85093 tr = fn4(ar, br, cr, dr, er, words[zr[i]], hr[1], sr[i])
85094 } else if (i < 48) {
85095 tl = fn3(al, bl, cl, dl, el, words[zl[i]], hl[2], sl[i])
85096 tr = fn3(ar, br, cr, dr, er, words[zr[i]], hr[2], sr[i])
85097 } else if (i < 64) {
85098 tl = fn4(al, bl, cl, dl, el, words[zl[i]], hl[3], sl[i])
85099 tr = fn2(ar, br, cr, dr, er, words[zr[i]], hr[3], sr[i])
85100 } else { // if (i<80) {
85101 tl = fn5(al, bl, cl, dl, el, words[zl[i]], hl[4], sl[i])
85102 tr = fn1(ar, br, cr, dr, er, words[zr[i]], hr[4], sr[i])
85103 }
85104
85105 al = el
85106 el = dl
85107 dl = rotl(cl, 10)
85108 cl = bl
85109 bl = tl
85110
85111 ar = er
85112 er = dr
85113 dr = rotl(cr, 10)
85114 cr = br
85115 br = tr
85116 }
85117
85118 // update state
85119 var t = (this._b + cl + dr) | 0
85120 this._b = (this._c + dl + er) | 0
85121 this._c = (this._d + el + ar) | 0
85122 this._d = (this._e + al + br) | 0
85123 this._e = (this._a + bl + cr) | 0
85124 this._a = t
85125}
85126
85127RIPEMD160.prototype._digest = function () {
85128 // create padding and handle blocks
85129 this._block[this._blockOffset++] = 0x80
85130 if (this._blockOffset > 56) {
85131 this._block.fill(0, this._blockOffset, 64)
85132 this._update()
85133 this._blockOffset = 0
85134 }
85135
85136 this._block.fill(0, this._blockOffset, 56)
85137 this._block.writeUInt32LE(this._length[0], 56)
85138 this._block.writeUInt32LE(this._length[1], 60)
85139 this._update()
85140
85141 // produce result
85142 var buffer = Buffer.alloc ? Buffer.alloc(20) : new Buffer(20)
85143 buffer.writeInt32LE(this._a, 0)
85144 buffer.writeInt32LE(this._b, 4)
85145 buffer.writeInt32LE(this._c, 8)
85146 buffer.writeInt32LE(this._d, 12)
85147 buffer.writeInt32LE(this._e, 16)
85148 return buffer
85149}
85150
85151function rotl (x, n) {
85152 return (x << n) | (x >>> (32 - n))
85153}
85154
85155function fn1 (a, b, c, d, e, m, k, s) {
85156 return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
85157}
85158
85159function fn2 (a, b, c, d, e, m, k, s) {
85160 return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
85161}
85162
85163function fn3 (a, b, c, d, e, m, k, s) {
85164 return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
85165}
85166
85167function fn4 (a, b, c, d, e, m, k, s) {
85168 return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
85169}
85170
85171function fn5 (a, b, c, d, e, m, k, s) {
85172 return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
85173}
85174
85175module.exports = RIPEMD160
85176
85177
85178/***/ }),
85179
85180/***/ "./node_modules/safe-buffer/index.js":
85181/*!*******************************************!*\
85182 !*** ./node_modules/safe-buffer/index.js ***!
85183 \*******************************************/
85184/*! no static exports found */
85185/***/ (function(module, exports, __webpack_require__) {
85186
85187/* eslint-disable node/no-deprecated-api */
85188var buffer = __webpack_require__(/*! buffer */ "./node_modules/buffer/index.js")
85189var Buffer = buffer.Buffer
85190
85191// alternative to using Object.keys for old browsers
85192function copyProps (src, dst) {
85193 for (var key in src) {
85194 dst[key] = src[key]
85195 }
85196}
85197if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
85198 module.exports = buffer
85199} else {
85200 // Copy properties from require('buffer')
85201 copyProps(buffer, exports)
85202 exports.Buffer = SafeBuffer
85203}
85204
85205function SafeBuffer (arg, encodingOrOffset, length) {
85206 return Buffer(arg, encodingOrOffset, length)
85207}
85208
85209SafeBuffer.prototype = Object.create(Buffer.prototype)
85210
85211// Copy static methods from Buffer
85212copyProps(Buffer, SafeBuffer)
85213
85214SafeBuffer.from = function (arg, encodingOrOffset, length) {
85215 if (typeof arg === 'number') {
85216 throw new TypeError('Argument must not be a number')
85217 }
85218 return Buffer(arg, encodingOrOffset, length)
85219}
85220
85221SafeBuffer.alloc = function (size, fill, encoding) {
85222 if (typeof size !== 'number') {
85223 throw new TypeError('Argument must be a number')
85224 }
85225 var buf = Buffer(size)
85226 if (fill !== undefined) {
85227 if (typeof encoding === 'string') {
85228 buf.fill(fill, encoding)
85229 } else {
85230 buf.fill(fill)
85231 }
85232 } else {
85233 buf.fill(0)
85234 }
85235 return buf
85236}
85237
85238SafeBuffer.allocUnsafe = function (size) {
85239 if (typeof size !== 'number') {
85240 throw new TypeError('Argument must be a number')
85241 }
85242 return Buffer(size)
85243}
85244
85245SafeBuffer.allocUnsafeSlow = function (size) {
85246 if (typeof size !== 'number') {
85247 throw new TypeError('Argument must be a number')
85248 }
85249 return buffer.SlowBuffer(size)
85250}
85251
85252
85253/***/ }),
85254
85255/***/ "./node_modules/scope-css/index.js":
85256/*!*****************************************!*\
85257 !*** ./node_modules/scope-css/index.js ***!
85258 \*****************************************/
85259/*! no static exports found */
85260/***/ (function(module, exports, __webpack_require__) {
85261
85262"use strict";
85263
85264
85265var slugify = __webpack_require__(/*! slugify */ "./node_modules/slugify/slugify.js")
85266var escaper = __webpack_require__(/*! escaper */ "./node_modules/escaper/dist/escaper.js")
85267var stripComments = __webpack_require__(/*! strip-css-comments */ "./node_modules/strip-css-comments/index.js")
85268
85269module.exports = scope
85270scope.replace = replace
85271
85272function scope (css, parent, o) {
85273 if (!css) return css
85274
85275 if (!parent) return css
85276
85277 if (typeof o === 'string') o = {keyframes: o}
85278 if (!o) o = {keyframes: false}
85279
85280 css = replace(css, parent + ' $1$2')
85281
85282 //regexp.escape
85283 var parentRe = parent.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
85284
85285 //replace self-selectors
85286 css = css.replace(new RegExp('(' + parentRe + ')\\s*\\1(?=[\\s\\r\\n,{])', 'g'), '$1')
85287
85288 //replace `:host` with parent
85289 css = css.replace(new RegExp('(' + parentRe + ')\\s*:host', 'g'), '$1')
85290
85291 //revoke wrongly replaced @ statements, like @supports, @import, @media etc.
85292 css = css.replace(new RegExp('(' + parentRe + ')\\s*@', 'g'), '@')
85293
85294 //revoke wrongly replaced :root blocks
85295 css = css.replace(new RegExp('(' + parentRe + ')\\s*:root', 'g'), ':root')
85296
85297 //animations: prefix animation anmes
85298 var animations = [],
85299 animationNameRe = /@keyframes\s+([a-zA-Z0-9_-]+)\s*{/g,
85300 match
85301 while ((match = animationNameRe.exec(css)) !== null) {
85302 if (animations.indexOf(match[1]) < 0)
85303 animations.push(match[1])
85304 }
85305
85306 var slug = slugify(parent)
85307
85308 animations.forEach(function (name) {
85309 var newName = (o.keyframes === true ? slug + '-' : typeof o.keyframes === 'string' ? o.keyframes : '') + name
85310 css = css.replace(new RegExp('(@keyframes\\s+)' + name + '(\\s*{)', 'g'),
85311 '$1' + newName + '$2')
85312 css = css.replace(new RegExp('(animation(?:-name)?\\s*:[^;]*\\s*)' + name + '([\\s;}])', 'g'),
85313 '$1' + newName + '$2')
85314 })
85315 //animation: revoke wrongly replaced keyframes
85316 css = css.replace(new RegExp('(' + parentRe + ' )(\\s*(?:to|from|[+-]?(?:(?:\\.\\d+)|(?:\\d+(?:\\.\\d*)?))%))(?=[\\s\\r\\n,{])', 'g'), '$2')
85317
85318 return css
85319}
85320
85321function replace (css, replacer) {
85322 var arr = []
85323
85324 css = stripComments(css)
85325
85326 // escape strings etc.
85327 css = escaper.replace(css, true, arr)
85328
85329 css = css.replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g, replacer)
85330
85331 // insert comments, strings etc. back
85332 css = escaper.paste(css, arr)
85333
85334 return css
85335}
85336
85337
85338
85339/***/ }),
85340
85341/***/ "./node_modules/setimmediate/setImmediate.js":
85342/*!***************************************************!*\
85343 !*** ./node_modules/setimmediate/setImmediate.js ***!
85344 \***************************************************/
85345/*! no static exports found */
85346/***/ (function(module, exports, __webpack_require__) {
85347
85348/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
85349 "use strict";
85350
85351 if (global.setImmediate) {
85352 return;
85353 }
85354
85355 var nextHandle = 1; // Spec says greater than zero
85356 var tasksByHandle = {};
85357 var currentlyRunningATask = false;
85358 var doc = global.document;
85359 var registerImmediate;
85360
85361 function setImmediate(callback) {
85362 // Callback can either be a function or a string
85363 if (typeof callback !== "function") {
85364 callback = new Function("" + callback);
85365 }
85366 // Copy function arguments
85367 var args = new Array(arguments.length - 1);
85368 for (var i = 0; i < args.length; i++) {
85369 args[i] = arguments[i + 1];
85370 }
85371 // Store and register the task
85372 var task = { callback: callback, args: args };
85373 tasksByHandle[nextHandle] = task;
85374 registerImmediate(nextHandle);
85375 return nextHandle++;
85376 }
85377
85378 function clearImmediate(handle) {
85379 delete tasksByHandle[handle];
85380 }
85381
85382 function run(task) {
85383 var callback = task.callback;
85384 var args = task.args;
85385 switch (args.length) {
85386 case 0:
85387 callback();
85388 break;
85389 case 1:
85390 callback(args[0]);
85391 break;
85392 case 2:
85393 callback(args[0], args[1]);
85394 break;
85395 case 3:
85396 callback(args[0], args[1], args[2]);
85397 break;
85398 default:
85399 callback.apply(undefined, args);
85400 break;
85401 }
85402 }
85403
85404 function runIfPresent(handle) {
85405 // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
85406 // So if we're currently running a task, we'll need to delay this invocation.
85407 if (currentlyRunningATask) {
85408 // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
85409 // "too much recursion" error.
85410 setTimeout(runIfPresent, 0, handle);
85411 } else {
85412 var task = tasksByHandle[handle];
85413 if (task) {
85414 currentlyRunningATask = true;
85415 try {
85416 run(task);
85417 } finally {
85418 clearImmediate(handle);
85419 currentlyRunningATask = false;
85420 }
85421 }
85422 }
85423 }
85424
85425 function installNextTickImplementation() {
85426 registerImmediate = function(handle) {
85427 process.nextTick(function () { runIfPresent(handle); });
85428 };
85429 }
85430
85431 function canUsePostMessage() {
85432 // The test against `importScripts` prevents this implementation from being installed inside a web worker,
85433 // where `global.postMessage` means something completely different and can't be used for this purpose.
85434 if (global.postMessage && !global.importScripts) {
85435 var postMessageIsAsynchronous = true;
85436 var oldOnMessage = global.onmessage;
85437 global.onmessage = function() {
85438 postMessageIsAsynchronous = false;
85439 };
85440 global.postMessage("", "*");
85441 global.onmessage = oldOnMessage;
85442 return postMessageIsAsynchronous;
85443 }
85444 }
85445
85446 function installPostMessageImplementation() {
85447 // Installs an event handler on `global` for the `message` event: see
85448 // * https://developer.mozilla.org/en/DOM/window.postMessage
85449 // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
85450
85451 var messagePrefix = "setImmediate$" + Math.random() + "$";
85452 var onGlobalMessage = function(event) {
85453 if (event.source === global &&
85454 typeof event.data === "string" &&
85455 event.data.indexOf(messagePrefix) === 0) {
85456 runIfPresent(+event.data.slice(messagePrefix.length));
85457 }
85458 };
85459
85460 if (global.addEventListener) {
85461 global.addEventListener("message", onGlobalMessage, false);
85462 } else {
85463 global.attachEvent("onmessage", onGlobalMessage);
85464 }
85465
85466 registerImmediate = function(handle) {
85467 global.postMessage(messagePrefix + handle, "*");
85468 };
85469 }
85470
85471 function installMessageChannelImplementation() {
85472 var channel = new MessageChannel();
85473 channel.port1.onmessage = function(event) {
85474 var handle = event.data;
85475 runIfPresent(handle);
85476 };
85477
85478 registerImmediate = function(handle) {
85479 channel.port2.postMessage(handle);
85480 };
85481 }
85482
85483 function installReadyStateChangeImplementation() {
85484 var html = doc.documentElement;
85485 registerImmediate = function(handle) {
85486 // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
85487 // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
85488 var script = doc.createElement("script");
85489 script.onreadystatechange = function () {
85490 runIfPresent(handle);
85491 script.onreadystatechange = null;
85492 html.removeChild(script);
85493 script = null;
85494 };
85495 html.appendChild(script);
85496 };
85497 }
85498
85499 function installSetTimeoutImplementation() {
85500 registerImmediate = function(handle) {
85501 setTimeout(runIfPresent, 0, handle);
85502 };
85503 }
85504
85505 // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
85506 var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
85507 attachTo = attachTo && attachTo.setTimeout ? attachTo : global;
85508
85509 // Don't get fooled by e.g. browserify environments.
85510 if ({}.toString.call(global.process) === "[object process]") {
85511 // For Node.js before 0.9
85512 installNextTickImplementation();
85513
85514 } else if (canUsePostMessage()) {
85515 // For non-IE10 modern browsers
85516 installPostMessageImplementation();
85517
85518 } else if (global.MessageChannel) {
85519 // For web workers, where supported
85520 installMessageChannelImplementation();
85521
85522 } else if (doc && "onreadystatechange" in doc.createElement("script")) {
85523 // For IE 6–8
85524 installReadyStateChangeImplementation();
85525
85526 } else {
85527 // For older browsers
85528 installSetTimeoutImplementation();
85529 }
85530
85531 attachTo.setImmediate = setImmediate;
85532 attachTo.clearImmediate = clearImmediate;
85533}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self));
85534
85535/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../process/browser.js */ "./node_modules/process/browser.js")))
85536
85537/***/ }),
85538
85539/***/ "./node_modules/sha.js/hash.js":
85540/*!*************************************!*\
85541 !*** ./node_modules/sha.js/hash.js ***!
85542 \*************************************/
85543/*! no static exports found */
85544/***/ (function(module, exports, __webpack_require__) {
85545
85546var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
85547
85548// prototype class for hash functions
85549function Hash (blockSize, finalSize) {
85550 this._block = Buffer.alloc(blockSize)
85551 this._finalSize = finalSize
85552 this._blockSize = blockSize
85553 this._len = 0
85554}
85555
85556Hash.prototype.update = function (data, enc) {
85557 if (typeof data === 'string') {
85558 enc = enc || 'utf8'
85559 data = Buffer.from(data, enc)
85560 }
85561
85562 var block = this._block
85563 var blockSize = this._blockSize
85564 var length = data.length
85565 var accum = this._len
85566
85567 for (var offset = 0; offset < length;) {
85568 var assigned = accum % blockSize
85569 var remainder = Math.min(length - offset, blockSize - assigned)
85570
85571 for (var i = 0; i < remainder; i++) {
85572 block[assigned + i] = data[offset + i]
85573 }
85574
85575 accum += remainder
85576 offset += remainder
85577
85578 if ((accum % blockSize) === 0) {
85579 this._update(block)
85580 }
85581 }
85582
85583 this._len += length
85584 return this
85585}
85586
85587Hash.prototype.digest = function (enc) {
85588 var rem = this._len % this._blockSize
85589
85590 this._block[rem] = 0x80
85591
85592 // zero (rem + 1) trailing bits, where (rem + 1) is the smallest
85593 // non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize
85594 this._block.fill(0, rem + 1)
85595
85596 if (rem >= this._finalSize) {
85597 this._update(this._block)
85598 this._block.fill(0)
85599 }
85600
85601 var bits = this._len * 8
85602
85603 // uint32
85604 if (bits <= 0xffffffff) {
85605 this._block.writeUInt32BE(bits, this._blockSize - 4)
85606
85607 // uint64
85608 } else {
85609 var lowBits = (bits & 0xffffffff) >>> 0
85610 var highBits = (bits - lowBits) / 0x100000000
85611
85612 this._block.writeUInt32BE(highBits, this._blockSize - 8)
85613 this._block.writeUInt32BE(lowBits, this._blockSize - 4)
85614 }
85615
85616 this._update(this._block)
85617 var hash = this._hash()
85618
85619 return enc ? hash.toString(enc) : hash
85620}
85621
85622Hash.prototype._update = function () {
85623 throw new Error('_update must be implemented by subclass')
85624}
85625
85626module.exports = Hash
85627
85628
85629/***/ }),
85630
85631/***/ "./node_modules/sha.js/index.js":
85632/*!**************************************!*\
85633 !*** ./node_modules/sha.js/index.js ***!
85634 \**************************************/
85635/*! no static exports found */
85636/***/ (function(module, exports, __webpack_require__) {
85637
85638var exports = module.exports = function SHA (algorithm) {
85639 algorithm = algorithm.toLowerCase()
85640
85641 var Algorithm = exports[algorithm]
85642 if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
85643
85644 return new Algorithm()
85645}
85646
85647exports.sha = __webpack_require__(/*! ./sha */ "./node_modules/sha.js/sha.js")
85648exports.sha1 = __webpack_require__(/*! ./sha1 */ "./node_modules/sha.js/sha1.js")
85649exports.sha224 = __webpack_require__(/*! ./sha224 */ "./node_modules/sha.js/sha224.js")
85650exports.sha256 = __webpack_require__(/*! ./sha256 */ "./node_modules/sha.js/sha256.js")
85651exports.sha384 = __webpack_require__(/*! ./sha384 */ "./node_modules/sha.js/sha384.js")
85652exports.sha512 = __webpack_require__(/*! ./sha512 */ "./node_modules/sha.js/sha512.js")
85653
85654
85655/***/ }),
85656
85657/***/ "./node_modules/sha.js/sha.js":
85658/*!************************************!*\
85659 !*** ./node_modules/sha.js/sha.js ***!
85660 \************************************/
85661/*! no static exports found */
85662/***/ (function(module, exports, __webpack_require__) {
85663
85664/*
85665 * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
85666 * in FIPS PUB 180-1
85667 * This source code is derived from sha1.js of the same repository.
85668 * The difference between SHA-0 and SHA-1 is just a bitwise rotate left
85669 * operation was added.
85670 */
85671
85672var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
85673var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
85674var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
85675
85676var K = [
85677 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
85678]
85679
85680var W = new Array(80)
85681
85682function Sha () {
85683 this.init()
85684 this._w = W
85685
85686 Hash.call(this, 64, 56)
85687}
85688
85689inherits(Sha, Hash)
85690
85691Sha.prototype.init = function () {
85692 this._a = 0x67452301
85693 this._b = 0xefcdab89
85694 this._c = 0x98badcfe
85695 this._d = 0x10325476
85696 this._e = 0xc3d2e1f0
85697
85698 return this
85699}
85700
85701function rotl5 (num) {
85702 return (num << 5) | (num >>> 27)
85703}
85704
85705function rotl30 (num) {
85706 return (num << 30) | (num >>> 2)
85707}
85708
85709function ft (s, b, c, d) {
85710 if (s === 0) return (b & c) | ((~b) & d)
85711 if (s === 2) return (b & c) | (b & d) | (c & d)
85712 return b ^ c ^ d
85713}
85714
85715Sha.prototype._update = function (M) {
85716 var W = this._w
85717
85718 var a = this._a | 0
85719 var b = this._b | 0
85720 var c = this._c | 0
85721 var d = this._d | 0
85722 var e = this._e | 0
85723
85724 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
85725 for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]
85726
85727 for (var j = 0; j < 80; ++j) {
85728 var s = ~~(j / 20)
85729 var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
85730
85731 e = d
85732 d = c
85733 c = rotl30(b)
85734 b = a
85735 a = t
85736 }
85737
85738 this._a = (a + this._a) | 0
85739 this._b = (b + this._b) | 0
85740 this._c = (c + this._c) | 0
85741 this._d = (d + this._d) | 0
85742 this._e = (e + this._e) | 0
85743}
85744
85745Sha.prototype._hash = function () {
85746 var H = Buffer.allocUnsafe(20)
85747
85748 H.writeInt32BE(this._a | 0, 0)
85749 H.writeInt32BE(this._b | 0, 4)
85750 H.writeInt32BE(this._c | 0, 8)
85751 H.writeInt32BE(this._d | 0, 12)
85752 H.writeInt32BE(this._e | 0, 16)
85753
85754 return H
85755}
85756
85757module.exports = Sha
85758
85759
85760/***/ }),
85761
85762/***/ "./node_modules/sha.js/sha1.js":
85763/*!*************************************!*\
85764 !*** ./node_modules/sha.js/sha1.js ***!
85765 \*************************************/
85766/*! no static exports found */
85767/***/ (function(module, exports, __webpack_require__) {
85768
85769/*
85770 * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
85771 * in FIPS PUB 180-1
85772 * Version 2.1a Copyright Paul Johnston 2000 - 2002.
85773 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
85774 * Distributed under the BSD License
85775 * See http://pajhome.org.uk/crypt/md5 for details.
85776 */
85777
85778var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
85779var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
85780var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
85781
85782var K = [
85783 0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
85784]
85785
85786var W = new Array(80)
85787
85788function Sha1 () {
85789 this.init()
85790 this._w = W
85791
85792 Hash.call(this, 64, 56)
85793}
85794
85795inherits(Sha1, Hash)
85796
85797Sha1.prototype.init = function () {
85798 this._a = 0x67452301
85799 this._b = 0xefcdab89
85800 this._c = 0x98badcfe
85801 this._d = 0x10325476
85802 this._e = 0xc3d2e1f0
85803
85804 return this
85805}
85806
85807function rotl1 (num) {
85808 return (num << 1) | (num >>> 31)
85809}
85810
85811function rotl5 (num) {
85812 return (num << 5) | (num >>> 27)
85813}
85814
85815function rotl30 (num) {
85816 return (num << 30) | (num >>> 2)
85817}
85818
85819function ft (s, b, c, d) {
85820 if (s === 0) return (b & c) | ((~b) & d)
85821 if (s === 2) return (b & c) | (b & d) | (c & d)
85822 return b ^ c ^ d
85823}
85824
85825Sha1.prototype._update = function (M) {
85826 var W = this._w
85827
85828 var a = this._a | 0
85829 var b = this._b | 0
85830 var c = this._c | 0
85831 var d = this._d | 0
85832 var e = this._e | 0
85833
85834 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
85835 for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])
85836
85837 for (var j = 0; j < 80; ++j) {
85838 var s = ~~(j / 20)
85839 var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
85840
85841 e = d
85842 d = c
85843 c = rotl30(b)
85844 b = a
85845 a = t
85846 }
85847
85848 this._a = (a + this._a) | 0
85849 this._b = (b + this._b) | 0
85850 this._c = (c + this._c) | 0
85851 this._d = (d + this._d) | 0
85852 this._e = (e + this._e) | 0
85853}
85854
85855Sha1.prototype._hash = function () {
85856 var H = Buffer.allocUnsafe(20)
85857
85858 H.writeInt32BE(this._a | 0, 0)
85859 H.writeInt32BE(this._b | 0, 4)
85860 H.writeInt32BE(this._c | 0, 8)
85861 H.writeInt32BE(this._d | 0, 12)
85862 H.writeInt32BE(this._e | 0, 16)
85863
85864 return H
85865}
85866
85867module.exports = Sha1
85868
85869
85870/***/ }),
85871
85872/***/ "./node_modules/sha.js/sha224.js":
85873/*!***************************************!*\
85874 !*** ./node_modules/sha.js/sha224.js ***!
85875 \***************************************/
85876/*! no static exports found */
85877/***/ (function(module, exports, __webpack_require__) {
85878
85879/**
85880 * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
85881 * in FIPS 180-2
85882 * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
85883 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
85884 *
85885 */
85886
85887var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
85888var Sha256 = __webpack_require__(/*! ./sha256 */ "./node_modules/sha.js/sha256.js")
85889var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
85890var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
85891
85892var W = new Array(64)
85893
85894function Sha224 () {
85895 this.init()
85896
85897 this._w = W // new Array(64)
85898
85899 Hash.call(this, 64, 56)
85900}
85901
85902inherits(Sha224, Sha256)
85903
85904Sha224.prototype.init = function () {
85905 this._a = 0xc1059ed8
85906 this._b = 0x367cd507
85907 this._c = 0x3070dd17
85908 this._d = 0xf70e5939
85909 this._e = 0xffc00b31
85910 this._f = 0x68581511
85911 this._g = 0x64f98fa7
85912 this._h = 0xbefa4fa4
85913
85914 return this
85915}
85916
85917Sha224.prototype._hash = function () {
85918 var H = Buffer.allocUnsafe(28)
85919
85920 H.writeInt32BE(this._a, 0)
85921 H.writeInt32BE(this._b, 4)
85922 H.writeInt32BE(this._c, 8)
85923 H.writeInt32BE(this._d, 12)
85924 H.writeInt32BE(this._e, 16)
85925 H.writeInt32BE(this._f, 20)
85926 H.writeInt32BE(this._g, 24)
85927
85928 return H
85929}
85930
85931module.exports = Sha224
85932
85933
85934/***/ }),
85935
85936/***/ "./node_modules/sha.js/sha256.js":
85937/*!***************************************!*\
85938 !*** ./node_modules/sha.js/sha256.js ***!
85939 \***************************************/
85940/*! no static exports found */
85941/***/ (function(module, exports, __webpack_require__) {
85942
85943/**
85944 * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
85945 * in FIPS 180-2
85946 * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
85947 * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
85948 *
85949 */
85950
85951var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
85952var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
85953var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
85954
85955var K = [
85956 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
85957 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
85958 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
85959 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
85960 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
85961 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
85962 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
85963 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
85964 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
85965 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
85966 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
85967 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
85968 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
85969 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
85970 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
85971 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
85972]
85973
85974var W = new Array(64)
85975
85976function Sha256 () {
85977 this.init()
85978
85979 this._w = W // new Array(64)
85980
85981 Hash.call(this, 64, 56)
85982}
85983
85984inherits(Sha256, Hash)
85985
85986Sha256.prototype.init = function () {
85987 this._a = 0x6a09e667
85988 this._b = 0xbb67ae85
85989 this._c = 0x3c6ef372
85990 this._d = 0xa54ff53a
85991 this._e = 0x510e527f
85992 this._f = 0x9b05688c
85993 this._g = 0x1f83d9ab
85994 this._h = 0x5be0cd19
85995
85996 return this
85997}
85998
85999function ch (x, y, z) {
86000 return z ^ (x & (y ^ z))
86001}
86002
86003function maj (x, y, z) {
86004 return (x & y) | (z & (x | y))
86005}
86006
86007function sigma0 (x) {
86008 return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)
86009}
86010
86011function sigma1 (x) {
86012 return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)
86013}
86014
86015function gamma0 (x) {
86016 return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)
86017}
86018
86019function gamma1 (x) {
86020 return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)
86021}
86022
86023Sha256.prototype._update = function (M) {
86024 var W = this._w
86025
86026 var a = this._a | 0
86027 var b = this._b | 0
86028 var c = this._c | 0
86029 var d = this._d | 0
86030 var e = this._e | 0
86031 var f = this._f | 0
86032 var g = this._g | 0
86033 var h = this._h | 0
86034
86035 for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
86036 for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0
86037
86038 for (var j = 0; j < 64; ++j) {
86039 var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0
86040 var T2 = (sigma0(a) + maj(a, b, c)) | 0
86041
86042 h = g
86043 g = f
86044 f = e
86045 e = (d + T1) | 0
86046 d = c
86047 c = b
86048 b = a
86049 a = (T1 + T2) | 0
86050 }
86051
86052 this._a = (a + this._a) | 0
86053 this._b = (b + this._b) | 0
86054 this._c = (c + this._c) | 0
86055 this._d = (d + this._d) | 0
86056 this._e = (e + this._e) | 0
86057 this._f = (f + this._f) | 0
86058 this._g = (g + this._g) | 0
86059 this._h = (h + this._h) | 0
86060}
86061
86062Sha256.prototype._hash = function () {
86063 var H = Buffer.allocUnsafe(32)
86064
86065 H.writeInt32BE(this._a, 0)
86066 H.writeInt32BE(this._b, 4)
86067 H.writeInt32BE(this._c, 8)
86068 H.writeInt32BE(this._d, 12)
86069 H.writeInt32BE(this._e, 16)
86070 H.writeInt32BE(this._f, 20)
86071 H.writeInt32BE(this._g, 24)
86072 H.writeInt32BE(this._h, 28)
86073
86074 return H
86075}
86076
86077module.exports = Sha256
86078
86079
86080/***/ }),
86081
86082/***/ "./node_modules/sha.js/sha384.js":
86083/*!***************************************!*\
86084 !*** ./node_modules/sha.js/sha384.js ***!
86085 \***************************************/
86086/*! no static exports found */
86087/***/ (function(module, exports, __webpack_require__) {
86088
86089var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
86090var SHA512 = __webpack_require__(/*! ./sha512 */ "./node_modules/sha.js/sha512.js")
86091var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
86092var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
86093
86094var W = new Array(160)
86095
86096function Sha384 () {
86097 this.init()
86098 this._w = W
86099
86100 Hash.call(this, 128, 112)
86101}
86102
86103inherits(Sha384, SHA512)
86104
86105Sha384.prototype.init = function () {
86106 this._ah = 0xcbbb9d5d
86107 this._bh = 0x629a292a
86108 this._ch = 0x9159015a
86109 this._dh = 0x152fecd8
86110 this._eh = 0x67332667
86111 this._fh = 0x8eb44a87
86112 this._gh = 0xdb0c2e0d
86113 this._hh = 0x47b5481d
86114
86115 this._al = 0xc1059ed8
86116 this._bl = 0x367cd507
86117 this._cl = 0x3070dd17
86118 this._dl = 0xf70e5939
86119 this._el = 0xffc00b31
86120 this._fl = 0x68581511
86121 this._gl = 0x64f98fa7
86122 this._hl = 0xbefa4fa4
86123
86124 return this
86125}
86126
86127Sha384.prototype._hash = function () {
86128 var H = Buffer.allocUnsafe(48)
86129
86130 function writeInt64BE (h, l, offset) {
86131 H.writeInt32BE(h, offset)
86132 H.writeInt32BE(l, offset + 4)
86133 }
86134
86135 writeInt64BE(this._ah, this._al, 0)
86136 writeInt64BE(this._bh, this._bl, 8)
86137 writeInt64BE(this._ch, this._cl, 16)
86138 writeInt64BE(this._dh, this._dl, 24)
86139 writeInt64BE(this._eh, this._el, 32)
86140 writeInt64BE(this._fh, this._fl, 40)
86141
86142 return H
86143}
86144
86145module.exports = Sha384
86146
86147
86148/***/ }),
86149
86150/***/ "./node_modules/sha.js/sha512.js":
86151/*!***************************************!*\
86152 !*** ./node_modules/sha.js/sha512.js ***!
86153 \***************************************/
86154/*! no static exports found */
86155/***/ (function(module, exports, __webpack_require__) {
86156
86157var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js")
86158var Hash = __webpack_require__(/*! ./hash */ "./node_modules/sha.js/hash.js")
86159var Buffer = __webpack_require__(/*! safe-buffer */ "./node_modules/safe-buffer/index.js").Buffer
86160
86161var K = [
86162 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
86163 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
86164 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
86165 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
86166 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
86167 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
86168 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
86169 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
86170 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
86171 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
86172 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
86173 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
86174 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
86175 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
86176 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
86177 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
86178 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
86179 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
86180 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
86181 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
86182 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
86183 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
86184 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
86185 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
86186 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
86187 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
86188 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
86189 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
86190 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
86191 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
86192 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
86193 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
86194 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
86195 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
86196 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
86197 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
86198 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
86199 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
86200 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
86201 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
86202]
86203
86204var W = new Array(160)
86205
86206function Sha512 () {
86207 this.init()
86208 this._w = W
86209
86210 Hash.call(this, 128, 112)
86211}
86212
86213inherits(Sha512, Hash)
86214
86215Sha512.prototype.init = function () {
86216 this._ah = 0x6a09e667
86217 this._bh = 0xbb67ae85
86218 this._ch = 0x3c6ef372
86219 this._dh = 0xa54ff53a
86220 this._eh = 0x510e527f
86221 this._fh = 0x9b05688c
86222 this._gh = 0x1f83d9ab
86223 this._hh = 0x5be0cd19
86224
86225 this._al = 0xf3bcc908
86226 this._bl = 0x84caa73b
86227 this._cl = 0xfe94f82b
86228 this._dl = 0x5f1d36f1
86229 this._el = 0xade682d1
86230 this._fl = 0x2b3e6c1f
86231 this._gl = 0xfb41bd6b
86232 this._hl = 0x137e2179
86233
86234 return this
86235}
86236
86237function Ch (x, y, z) {
86238 return z ^ (x & (y ^ z))
86239}
86240
86241function maj (x, y, z) {
86242 return (x & y) | (z & (x | y))
86243}
86244
86245function sigma0 (x, xl) {
86246 return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)
86247}
86248
86249function sigma1 (x, xl) {
86250 return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)
86251}
86252
86253function Gamma0 (x, xl) {
86254 return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)
86255}
86256
86257function Gamma0l (x, xl) {
86258 return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)
86259}
86260
86261function Gamma1 (x, xl) {
86262 return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)
86263}
86264
86265function Gamma1l (x, xl) {
86266 return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)
86267}
86268
86269function getCarry (a, b) {
86270 return (a >>> 0) < (b >>> 0) ? 1 : 0
86271}
86272
86273Sha512.prototype._update = function (M) {
86274 var W = this._w
86275
86276 var ah = this._ah | 0
86277 var bh = this._bh | 0
86278 var ch = this._ch | 0
86279 var dh = this._dh | 0
86280 var eh = this._eh | 0
86281 var fh = this._fh | 0
86282 var gh = this._gh | 0
86283 var hh = this._hh | 0
86284
86285 var al = this._al | 0
86286 var bl = this._bl | 0
86287 var cl = this._cl | 0
86288 var dl = this._dl | 0
86289 var el = this._el | 0
86290 var fl = this._fl | 0
86291 var gl = this._gl | 0
86292 var hl = this._hl | 0
86293
86294 for (var i = 0; i < 32; i += 2) {
86295 W[i] = M.readInt32BE(i * 4)
86296 W[i + 1] = M.readInt32BE(i * 4 + 4)
86297 }
86298 for (; i < 160; i += 2) {
86299 var xh = W[i - 15 * 2]
86300 var xl = W[i - 15 * 2 + 1]
86301 var gamma0 = Gamma0(xh, xl)
86302 var gamma0l = Gamma0l(xl, xh)
86303
86304 xh = W[i - 2 * 2]
86305 xl = W[i - 2 * 2 + 1]
86306 var gamma1 = Gamma1(xh, xl)
86307 var gamma1l = Gamma1l(xl, xh)
86308
86309 // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
86310 var Wi7h = W[i - 7 * 2]
86311 var Wi7l = W[i - 7 * 2 + 1]
86312
86313 var Wi16h = W[i - 16 * 2]
86314 var Wi16l = W[i - 16 * 2 + 1]
86315
86316 var Wil = (gamma0l + Wi7l) | 0
86317 var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0
86318 Wil = (Wil + gamma1l) | 0
86319 Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0
86320 Wil = (Wil + Wi16l) | 0
86321 Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0
86322
86323 W[i] = Wih
86324 W[i + 1] = Wil
86325 }
86326
86327 for (var j = 0; j < 160; j += 2) {
86328 Wih = W[j]
86329 Wil = W[j + 1]
86330
86331 var majh = maj(ah, bh, ch)
86332 var majl = maj(al, bl, cl)
86333
86334 var sigma0h = sigma0(ah, al)
86335 var sigma0l = sigma0(al, ah)
86336 var sigma1h = sigma1(eh, el)
86337 var sigma1l = sigma1(el, eh)
86338
86339 // t1 = h + sigma1 + ch + K[j] + W[j]
86340 var Kih = K[j]
86341 var Kil = K[j + 1]
86342
86343 var chh = Ch(eh, fh, gh)
86344 var chl = Ch(el, fl, gl)
86345
86346 var t1l = (hl + sigma1l) | 0
86347 var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0
86348 t1l = (t1l + chl) | 0
86349 t1h = (t1h + chh + getCarry(t1l, chl)) | 0
86350 t1l = (t1l + Kil) | 0
86351 t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0
86352 t1l = (t1l + Wil) | 0
86353 t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0
86354
86355 // t2 = sigma0 + maj
86356 var t2l = (sigma0l + majl) | 0
86357 var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0
86358
86359 hh = gh
86360 hl = gl
86361 gh = fh
86362 gl = fl
86363 fh = eh
86364 fl = el
86365 el = (dl + t1l) | 0
86366 eh = (dh + t1h + getCarry(el, dl)) | 0
86367 dh = ch
86368 dl = cl
86369 ch = bh
86370 cl = bl
86371 bh = ah
86372 bl = al
86373 al = (t1l + t2l) | 0
86374 ah = (t1h + t2h + getCarry(al, t1l)) | 0
86375 }
86376
86377 this._al = (this._al + al) | 0
86378 this._bl = (this._bl + bl) | 0
86379 this._cl = (this._cl + cl) | 0
86380 this._dl = (this._dl + dl) | 0
86381 this._el = (this._el + el) | 0
86382 this._fl = (this._fl + fl) | 0
86383 this._gl = (this._gl + gl) | 0
86384 this._hl = (this._hl + hl) | 0
86385
86386 this._ah = (this._ah + ah + getCarry(this._al, al)) | 0
86387 this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0
86388 this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0
86389 this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0
86390 this._eh = (this._eh + eh + getCarry(this._el, el)) | 0
86391 this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0
86392 this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0
86393 this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0
86394}
86395
86396Sha512.prototype._hash = function () {
86397 var H = Buffer.allocUnsafe(64)
86398
86399 function writeInt64BE (h, l, offset) {
86400 H.writeInt32BE(h, offset)
86401 H.writeInt32BE(l, offset + 4)
86402 }
86403
86404 writeInt64BE(this._ah, this._al, 0)
86405 writeInt64BE(this._bh, this._bl, 8)
86406 writeInt64BE(this._ch, this._cl, 16)
86407 writeInt64BE(this._dh, this._dl, 24)
86408 writeInt64BE(this._eh, this._el, 32)
86409 writeInt64BE(this._fh, this._fl, 40)
86410 writeInt64BE(this._gh, this._gl, 48)
86411 writeInt64BE(this._hh, this._hl, 56)
86412
86413 return H
86414}
86415
86416module.exports = Sha512
86417
86418
86419/***/ }),
86420
86421/***/ "./node_modules/slugify/slugify.js":
86422/*!*****************************************!*\
86423 !*** ./node_modules/slugify/slugify.js ***!
86424 \*****************************************/
86425/*! no static exports found */
86426/***/ (function(module, exports, __webpack_require__) {
86427
86428
86429;(function (name, root, factory) {
86430 if (true) {
86431 module.exports = factory()
86432 module.exports['default'] = factory()
86433 }
86434 /* istanbul ignore next */
86435 else {}
86436}('slugify', this, function () {
86437 var charMap = JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\\"","”":"\\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}')
86438 var locales = JSON.parse('{"vi":{"Đ":"D","đ":"d"}}')
86439
86440 function replace (string, options) {
86441 if (typeof string !== 'string') {
86442 throw new Error('slugify: string argument expected')
86443 }
86444
86445 options = (typeof options === 'string')
86446 ? { replacement: options }
86447 : options || {}
86448
86449 var locale = locales[options.locale] || {}
86450
86451 var slug = string.split('')
86452 .reduce(function (result, ch) {
86453 return result + (locale[ch] || charMap[ch] || ch)
86454 // allowed
86455 .replace(options.remove || /[^\w\s$*_+~.()'"!\-:@]/g, '')
86456 }, '')
86457 // trim leading/trailing spaces
86458 .trim()
86459 // convert spaces
86460 .replace(/[-\s]+/g, options.replacement || '-')
86461
86462 return options.lower ? slug.toLowerCase() : slug
86463 }
86464
86465 replace.extend = function (customMap) {
86466 for (var key in customMap) {
86467 charMap[key] = customMap[key]
86468 }
86469 }
86470
86471 return replace
86472}))
86473
86474
86475/***/ }),
86476
86477/***/ "./node_modules/stream-browserify/index.js":
86478/*!*************************************************!*\
86479 !*** ./node_modules/stream-browserify/index.js ***!
86480 \*************************************************/
86481/*! no static exports found */
86482/***/ (function(module, exports, __webpack_require__) {
86483
86484// Copyright Joyent, Inc. and other Node contributors.
86485//
86486// Permission is hereby granted, free of charge, to any person obtaining a
86487// copy of this software and associated documentation files (the
86488// "Software"), to deal in the Software without restriction, including
86489// without limitation the rights to use, copy, modify, merge, publish,
86490// distribute, sublicense, and/or sell copies of the Software, and to permit
86491// persons to whom the Software is furnished to do so, subject to the
86492// following conditions:
86493//
86494// The above copyright notice and this permission notice shall be included
86495// in all copies or substantial portions of the Software.
86496//
86497// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
86498// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86499// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
86500// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
86501// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
86502// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
86503// USE OR OTHER DEALINGS IN THE SOFTWARE.
86504
86505module.exports = Stream;
86506
86507var EE = __webpack_require__(/*! events */ "./node_modules/events/events.js").EventEmitter;
86508var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
86509
86510inherits(Stream, EE);
86511Stream.Readable = __webpack_require__(/*! readable-stream/readable.js */ "./node_modules/readable-stream/readable-browser.js");
86512Stream.Writable = __webpack_require__(/*! readable-stream/writable.js */ "./node_modules/readable-stream/writable-browser.js");
86513Stream.Duplex = __webpack_require__(/*! readable-stream/duplex.js */ "./node_modules/readable-stream/duplex-browser.js");
86514Stream.Transform = __webpack_require__(/*! readable-stream/transform.js */ "./node_modules/readable-stream/transform.js");
86515Stream.PassThrough = __webpack_require__(/*! readable-stream/passthrough.js */ "./node_modules/readable-stream/passthrough.js");
86516
86517// Backwards-compat with node 0.4.x
86518Stream.Stream = Stream;
86519
86520
86521
86522// old-style streams. Note that the pipe method (the only relevant
86523// part of this class) is overridden in the Readable class.
86524
86525function Stream() {
86526 EE.call(this);
86527}
86528
86529Stream.prototype.pipe = function(dest, options) {
86530 var source = this;
86531
86532 function ondata(chunk) {
86533 if (dest.writable) {
86534 if (false === dest.write(chunk) && source.pause) {
86535 source.pause();
86536 }
86537 }
86538 }
86539
86540 source.on('data', ondata);
86541
86542 function ondrain() {
86543 if (source.readable && source.resume) {
86544 source.resume();
86545 }
86546 }
86547
86548 dest.on('drain', ondrain);
86549
86550 // If the 'end' option is not supplied, dest.end() will be called when
86551 // source gets the 'end' or 'close' events. Only dest.end() once.
86552 if (!dest._isStdio && (!options || options.end !== false)) {
86553 source.on('end', onend);
86554 source.on('close', onclose);
86555 }
86556
86557 var didOnEnd = false;
86558 function onend() {
86559 if (didOnEnd) return;
86560 didOnEnd = true;
86561
86562 dest.end();
86563 }
86564
86565
86566 function onclose() {
86567 if (didOnEnd) return;
86568 didOnEnd = true;
86569
86570 if (typeof dest.destroy === 'function') dest.destroy();
86571 }
86572
86573 // don't leave dangling pipes when there are errors.
86574 function onerror(er) {
86575 cleanup();
86576 if (EE.listenerCount(this, 'error') === 0) {
86577 throw er; // Unhandled stream error in pipe.
86578 }
86579 }
86580
86581 source.on('error', onerror);
86582 dest.on('error', onerror);
86583
86584 // remove all the event listeners that were added.
86585 function cleanup() {
86586 source.removeListener('data', ondata);
86587 dest.removeListener('drain', ondrain);
86588
86589 source.removeListener('end', onend);
86590 source.removeListener('close', onclose);
86591
86592 source.removeListener('error', onerror);
86593 dest.removeListener('error', onerror);
86594
86595 source.removeListener('end', cleanup);
86596 source.removeListener('close', cleanup);
86597
86598 dest.removeListener('close', cleanup);
86599 }
86600
86601 source.on('end', cleanup);
86602 source.on('close', cleanup);
86603
86604 dest.on('close', cleanup);
86605
86606 dest.emit('pipe', source);
86607
86608 // Allow for unix-like usage: A.pipe(B).pipe(C)
86609 return dest;
86610};
86611
86612
86613/***/ }),
86614
86615/***/ "./node_modules/strip-css-comments/index.js":
86616/*!**************************************************!*\
86617 !*** ./node_modules/strip-css-comments/index.js ***!
86618 \**************************************************/
86619/*! no static exports found */
86620/***/ (function(module, exports, __webpack_require__) {
86621
86622"use strict";
86623
86624var isRegExp = __webpack_require__(/*! is-regexp */ "./node_modules/is-regexp/index.js");
86625
86626module.exports = function (str, opts) {
86627 str = str.toString();
86628 opts = opts || {};
86629
86630 var preserveFilter;
86631 var comment = '';
86632 var currentChar = '';
86633 var insideString = false;
86634 var preserveImportant = !(opts.preserve === false || opts.all === true);
86635 var ret = '';
86636
86637 if (typeof opts.preserve === 'function') {
86638 preserveImportant = false;
86639 preserveFilter = opts.preserve;
86640 } else if (isRegExp(opts.preserve)) {
86641 preserveImportant = false;
86642 preserveFilter = function (comment) {
86643 return opts.preserve.test(comment);
86644 };
86645 }
86646
86647 for (var i = 0; i < str.length; i++) {
86648 currentChar = str[i];
86649
86650 if (str[i - 1] !== '\\') {
86651 if (currentChar === '"' || currentChar === '\'') {
86652 if (insideString === currentChar) {
86653 insideString = false;
86654 } else if (!insideString) {
86655 insideString = currentChar;
86656 }
86657 }
86658 }
86659
86660 // find beginning of /* type comment
86661 if (!insideString && currentChar === '/' && str[i + 1] === '*') {
86662 // ignore important comment when configured to preserve comments using important syntax: /*!
86663 if (!(preserveImportant && str[i + 2] === '!')) {
86664 var j = i + 2;
86665
86666 // iterate over comment
86667 for (; j < str.length; j++) {
86668 // find end of comment
86669 if (str[j] === '*' && str[j + 1] === '/') {
86670 if (preserveFilter) {
86671 // evaluate comment text
86672 ret = preserveFilter(comment) ? ret + ('/*' + comment + '*/') : ret;
86673 comment = '';
86674 }
86675
86676 break;
86677 }
86678
86679 // store comment text to be evaluated by the filter when the end of the comment is reached
86680 if (preserveFilter) {
86681 comment += str[j];
86682 }
86683 }
86684
86685 // resume iteration over CSS string from the end of the comment
86686 i = j + 1;
86687
86688 continue;
86689 }
86690 }
86691
86692 ret += currentChar;
86693 }
86694
86695 return ret;
86696};
86697
86698
86699/***/ }),
86700
86701/***/ "./node_modules/timers-browserify/main.js":
86702/*!************************************************!*\
86703 !*** ./node_modules/timers-browserify/main.js ***!
86704 \************************************************/
86705/*! no static exports found */
86706/***/ (function(module, exports, __webpack_require__) {
86707
86708/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) ||
86709 (typeof self !== "undefined" && self) ||
86710 window;
86711var apply = Function.prototype.apply;
86712
86713// DOM APIs, for completeness
86714
86715exports.setTimeout = function() {
86716 return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
86717};
86718exports.setInterval = function() {
86719 return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
86720};
86721exports.clearTimeout =
86722exports.clearInterval = function(timeout) {
86723 if (timeout) {
86724 timeout.close();
86725 }
86726};
86727
86728function Timeout(id, clearFn) {
86729 this._id = id;
86730 this._clearFn = clearFn;
86731}
86732Timeout.prototype.unref = Timeout.prototype.ref = function() {};
86733Timeout.prototype.close = function() {
86734 this._clearFn.call(scope, this._id);
86735};
86736
86737// Does not start the time, just sets up the members needed.
86738exports.enroll = function(item, msecs) {
86739 clearTimeout(item._idleTimeoutId);
86740 item._idleTimeout = msecs;
86741};
86742
86743exports.unenroll = function(item) {
86744 clearTimeout(item._idleTimeoutId);
86745 item._idleTimeout = -1;
86746};
86747
86748exports._unrefActive = exports.active = function(item) {
86749 clearTimeout(item._idleTimeoutId);
86750
86751 var msecs = item._idleTimeout;
86752 if (msecs >= 0) {
86753 item._idleTimeoutId = setTimeout(function onTimeout() {
86754 if (item._onTimeout)
86755 item._onTimeout();
86756 }, msecs);
86757 }
86758};
86759
86760// setimmediate attaches itself to the global object
86761__webpack_require__(/*! setimmediate */ "./node_modules/setimmediate/setImmediate.js");
86762// On some exotic environments, it's not clear which object `setimmediate` was
86763// able to install onto. Search each possibility in the same order as the
86764// `setimmediate` library.
86765exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) ||
86766 (typeof global !== "undefined" && global.setImmediate) ||
86767 (this && this.setImmediate);
86768exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) ||
86769 (typeof global !== "undefined" && global.clearImmediate) ||
86770 (this && this.clearImmediate);
86771
86772/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
86773
86774/***/ }),
86775
86776/***/ "./node_modules/util-deprecate/browser.js":
86777/*!************************************************!*\
86778 !*** ./node_modules/util-deprecate/browser.js ***!
86779 \************************************************/
86780/*! no static exports found */
86781/***/ (function(module, exports, __webpack_require__) {
86782
86783/* WEBPACK VAR INJECTION */(function(global) {
86784/**
86785 * Module exports.
86786 */
86787
86788module.exports = deprecate;
86789
86790/**
86791 * Mark that a method should not be used.
86792 * Returns a modified function which warns once by default.
86793 *
86794 * If `localStorage.noDeprecation = true` is set, then it is a no-op.
86795 *
86796 * If `localStorage.throwDeprecation = true` is set, then deprecated functions
86797 * will throw an Error when invoked.
86798 *
86799 * If `localStorage.traceDeprecation = true` is set, then deprecated functions
86800 * will invoke `console.trace()` instead of `console.error()`.
86801 *
86802 * @param {Function} fn - the function to deprecate
86803 * @param {String} msg - the string to print to the console when `fn` is invoked
86804 * @returns {Function} a new "deprecated" version of `fn`
86805 * @api public
86806 */
86807
86808function deprecate (fn, msg) {
86809 if (config('noDeprecation')) {
86810 return fn;
86811 }
86812
86813 var warned = false;
86814 function deprecated() {
86815 if (!warned) {
86816 if (config('throwDeprecation')) {
86817 throw new Error(msg);
86818 } else if (config('traceDeprecation')) {
86819 console.trace(msg);
86820 } else {
86821 console.warn(msg);
86822 }
86823 warned = true;
86824 }
86825 return fn.apply(this, arguments);
86826 }
86827
86828 return deprecated;
86829}
86830
86831/**
86832 * Checks `localStorage` for boolean values for the given `name`.
86833 *
86834 * @param {String} name
86835 * @returns {Boolean}
86836 * @api private
86837 */
86838
86839function config (name) {
86840 // accessing global.localStorage can trigger a DOMException in sandboxed iframes
86841 try {
86842 if (!global.localStorage) return false;
86843 } catch (_) {
86844 return false;
86845 }
86846 var val = global.localStorage[name];
86847 if (null == val) return false;
86848 return String(val).toLowerCase() === 'true';
86849}
86850
86851/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
86852
86853/***/ }),
86854
86855/***/ "./node_modules/vm-browserify/index.js":
86856/*!*********************************************!*\
86857 !*** ./node_modules/vm-browserify/index.js ***!
86858 \*********************************************/
86859/*! no static exports found */
86860/***/ (function(module, exports) {
86861
86862var indexOf = function (xs, item) {
86863 if (xs.indexOf) return xs.indexOf(item);
86864 else for (var i = 0; i < xs.length; i++) {
86865 if (xs[i] === item) return i;
86866 }
86867 return -1;
86868};
86869var Object_keys = function (obj) {
86870 if (Object.keys) return Object.keys(obj)
86871 else {
86872 var res = [];
86873 for (var key in obj) res.push(key)
86874 return res;
86875 }
86876};
86877
86878var forEach = function (xs, fn) {
86879 if (xs.forEach) return xs.forEach(fn)
86880 else for (var i = 0; i < xs.length; i++) {
86881 fn(xs[i], i, xs);
86882 }
86883};
86884
86885var defineProp = (function() {
86886 try {
86887 Object.defineProperty({}, '_', {});
86888 return function(obj, name, value) {
86889 Object.defineProperty(obj, name, {
86890 writable: true,
86891 enumerable: false,
86892 configurable: true,
86893 value: value
86894 })
86895 };
86896 } catch(e) {
86897 return function(obj, name, value) {
86898 obj[name] = value;
86899 };
86900 }
86901}());
86902
86903var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function',
86904'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError',
86905'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError',
86906'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape',
86907'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape'];
86908
86909function Context() {}
86910Context.prototype = {};
86911
86912var Script = exports.Script = function NodeScript (code) {
86913 if (!(this instanceof Script)) return new Script(code);
86914 this.code = code;
86915};
86916
86917Script.prototype.runInContext = function (context) {
86918 if (!(context instanceof Context)) {
86919 throw new TypeError("needs a 'context' argument.");
86920 }
86921
86922 var iframe = document.createElement('iframe');
86923 if (!iframe.style) iframe.style = {};
86924 iframe.style.display = 'none';
86925
86926 document.body.appendChild(iframe);
86927
86928 var win = iframe.contentWindow;
86929 var wEval = win.eval, wExecScript = win.execScript;
86930
86931 if (!wEval && wExecScript) {
86932 // win.eval() magically appears when this is called in IE:
86933 wExecScript.call(win, 'null');
86934 wEval = win.eval;
86935 }
86936
86937 forEach(Object_keys(context), function (key) {
86938 win[key] = context[key];
86939 });
86940 forEach(globals, function (key) {
86941 if (context[key]) {
86942 win[key] = context[key];
86943 }
86944 });
86945
86946 var winKeys = Object_keys(win);
86947
86948 var res = wEval.call(win, this.code);
86949
86950 forEach(Object_keys(win), function (key) {
86951 // Avoid copying circular objects like `top` and `window` by only
86952 // updating existing context properties or new properties in the `win`
86953 // that was only introduced after the eval.
86954 if (key in context || indexOf(winKeys, key) === -1) {
86955 context[key] = win[key];
86956 }
86957 });
86958
86959 forEach(globals, function (key) {
86960 if (!(key in context)) {
86961 defineProp(context, key, win[key]);
86962 }
86963 });
86964
86965 document.body.removeChild(iframe);
86966
86967 return res;
86968};
86969
86970Script.prototype.runInThisContext = function () {
86971 return eval(this.code); // maybe...
86972};
86973
86974Script.prototype.runInNewContext = function (context) {
86975 var ctx = Script.createContext(context);
86976 var res = this.runInContext(ctx);
86977
86978 if (context) {
86979 forEach(Object_keys(ctx), function (key) {
86980 context[key] = ctx[key];
86981 });
86982 }
86983
86984 return res;
86985};
86986
86987forEach(Object_keys(Script.prototype), function (name) {
86988 exports[name] = Script[name] = function (code) {
86989 var s = Script(code);
86990 return s[name].apply(s, [].slice.call(arguments, 1));
86991 };
86992});
86993
86994exports.isContext = function (context) {
86995 return context instanceof Context;
86996};
86997
86998exports.createScript = function (code) {
86999 return exports.Script(code);
87000};
87001
87002exports.createContext = Script.createContext = function (context) {
87003 var copy = new Context();
87004 if(typeof context === 'object') {
87005 forEach(Object_keys(context), function (key) {
87006 copy[key] = context[key];
87007 });
87008 }
87009 return copy;
87010};
87011
87012
87013/***/ }),
87014
87015/***/ "./node_modules/webpack/buildin/global.js":
87016/*!***********************************!*\
87017 !*** (webpack)/buildin/global.js ***!
87018 \***********************************/
87019/*! no static exports found */
87020/***/ (function(module, exports) {
87021
87022var g;
87023
87024// This works in non-strict mode
87025g = (function() {
87026 return this;
87027})();
87028
87029try {
87030 // This works if eval is allowed (see CSP)
87031 g = g || new Function("return this")();
87032} catch (e) {
87033 // This works if the window reference is available
87034 if (typeof window === "object") g = window;
87035}
87036
87037// g can still be undefined, but nothing to do about it...
87038// We return undefined, instead of nothing here, so it's
87039// easier to handle this case. if(!global) { ...}
87040
87041module.exports = g;
87042
87043
87044/***/ }),
87045
87046/***/ "./node_modules/webpack/buildin/module.js":
87047/*!***********************************!*\
87048 !*** (webpack)/buildin/module.js ***!
87049 \***********************************/
87050/*! no static exports found */
87051/***/ (function(module, exports) {
87052
87053module.exports = function(module) {
87054 if (!module.webpackPolyfill) {
87055 module.deprecate = function() {};
87056 module.paths = [];
87057 // module.parent = undefined by default
87058 if (!module.children) module.children = [];
87059 Object.defineProperty(module, "loaded", {
87060 enumerable: true,
87061 get: function() {
87062 return module.l;
87063 }
87064 });
87065 Object.defineProperty(module, "id", {
87066 enumerable: true,
87067 get: function() {
87068 return module.i;
87069 }
87070 });
87071 module.webpackPolyfill = 1;
87072 }
87073 return module;
87074};
87075
87076
87077/***/ }),
87078
87079/***/ "./package.json":
87080/*!**********************!*\
87081 !*** ./package.json ***!
87082 \**********************/
87083/*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, yarn-upgrade-all, default */
87084/***/ (function(module) {
87085
87086module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.4.4\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build\":\"webpack --progress --colors\",\"postbuild\":\"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md\",\"build:watch\":\"yarn build --watch\",\"minify\":\"minify ./dist/mermaid.js > ./dist/mermaid.min.js\",\"release\":\"yarn build -p --config webpack.config.prod.babel.js\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack-dev-server --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn release && yarn test && yarn e2e\",\"prepush\":\"yarn test\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"crypto-random-string\":\"^3.0.1\",\"d3\":\"^5.7.0\",\"dagre\":\"^0.8.4\",\"dagre-d3\":\"^0.6.4\",\"graphlib\":\"^2.1.7\",\"he\":\"^1.2.0\",\"lodash\":\"^4.17.11\",\"minify\":\"^4.1.1\",\"moment-mini\":\"^2.22.1\",\"scope-css\":\"^1.2.1\"},\"devDependencies\":{\"@babel/core\":\"^7.2.2\",\"@babel/preset-env\":\"^7.2.0\",\"@babel/register\":\"^7.0.0\",\"@percy/cypress\":\"^2.0.1\",\"babel-core\":\"7.0.0-bridge.0\",\"babel-jest\":\"^24.9.0\",\"babel-loader\":\"^8.0.4\",\"coveralls\":\"^3.0.2\",\"css-loader\":\"^2.0.1\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"3.4.0\",\"documentation\":\"^12.0.1\",\"eslint\":\"^6.3.0\",\"eslint-config-prettier\":\"^6.3.0\",\"eslint-plugin-prettier\":\"^3.1.0\",\"husky\":\"^1.2.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^24.9.0\",\"jison\":\"^0.4.18\",\"moment\":\"^2.23.0\",\"node-sass\":\"^4.12.0\",\"prettier\":\"^1.18.2\",\"puppeteer\":\"^1.17.0\",\"sass-loader\":\"^7.1.0\",\"start-server-and-test\":\"^1.10.6\",\"terser-webpack-plugin\":\"^2.2.2\",\"webpack\":\"^4.41.2\",\"webpack-cli\":\"^3.1.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^1.7.2\",\"yarn-upgrade-all\":\"^0.5.0\"},\"files\":[\"dist\"],\"yarn-upgrade-all\":{\"ignore\":[\"babel-core\"]}}");
87087
87088/***/ }),
87089
87090/***/ "./src/config.js":
87091/*!***********************!*\
87092 !*** ./src/config.js ***!
87093 \***********************/
87094/*! exports provided: setConfig, getConfig, default */
87095/***/ (function(module, __webpack_exports__, __webpack_require__) {
87096
87097"use strict";
87098__webpack_require__.r(__webpack_exports__);
87099/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConfig", function() { return setConfig; });
87100/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getConfig", function() { return getConfig; });
87101function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
87102
87103var config = {};
87104
87105var setConf = function setConf(cnf) {
87106 // Top level initially mermaid, gflow, sequenceDiagram and gantt
87107 var lvl1Keys = Object.keys(cnf);
87108
87109 for (var i = 0; i < lvl1Keys.length; i++) {
87110 if (_typeof(cnf[lvl1Keys[i]]) === 'object' && cnf[lvl1Keys[i]] != null) {
87111 var lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
87112
87113 for (var j = 0; j < lvl2Keys.length; j++) {
87114 // logger.debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j])
87115 if (typeof config[lvl1Keys[i]] === 'undefined') {
87116 config[lvl1Keys[i]] = {};
87117 } // logger.debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]])
87118
87119
87120 config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
87121 }
87122 } else {
87123 config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
87124 }
87125 }
87126};
87127
87128var setConfig = function setConfig(conf) {
87129 setConf(conf);
87130};
87131var getConfig = function getConfig() {
87132 return config;
87133};
87134var configApi = {
87135 setConfig: setConfig,
87136 getConfig: getConfig // get conf() {
87137 // return config;
87138 // }
87139
87140};
87141/* harmony default export */ __webpack_exports__["default"] = (configApi);
87142
87143/***/ }),
87144
87145/***/ "./src/diagrams/class/classDb.js":
87146/*!***************************************!*\
87147 !*** ./src/diagrams/class/classDb.js ***!
87148 \***************************************/
87149/*! exports provided: addClass, clear, getClass, getClasses, getRelations, addRelation, addAnnotation, addMember, addMembers, cleanupLabel, setCssClass, setLink, setClickEvent, bindFunctions, lineType, relationType, default */
87150/***/ (function(module, __webpack_exports__, __webpack_require__) {
87151
87152"use strict";
87153__webpack_require__.r(__webpack_exports__);
87154/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
87155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
87156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClass", function() { return getClass; });
87157/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
87158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
87159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
87160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addAnnotation", function() { return addAnnotation; });
87161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMember", function() { return addMember; });
87162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMembers", function() { return addMembers; });
87163/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
87164/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCssClass", function() { return setCssClass; });
87165/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
87166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
87167/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
87168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
87169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
87170/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
87171/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
87172/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../config */ "./src/config.js");
87173/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
87174
87175
87176
87177
87178var MERMAID_DOM_ID_PREFIX = 'classid-';
87179var config = Object(_config__WEBPACK_IMPORTED_MODULE_2__["getConfig"])();
87180var relations = [];
87181var classes = {};
87182var funs = [];
87183
87184var splitClassNameAndType = function splitClassNameAndType(id) {
87185 var genericType = '';
87186 var className = id;
87187
87188 if (id.indexOf('~') > 0) {
87189 var split = id.split('~');
87190 className = split[0];
87191 genericType = split[1];
87192 }
87193
87194 return {
87195 className: className,
87196 type: genericType
87197 };
87198};
87199/**
87200 * Function called by parser when a node definition has been found.
87201 * @param id
87202 * @public
87203 */
87204
87205
87206var addClass = function addClass(id) {
87207 var classId = splitClassNameAndType(id); // Only add class if not exists
87208
87209 if (typeof classes[classId.className] !== 'undefined') return;
87210 classes[classId.className] = {
87211 id: classId.className,
87212 type: classId.type,
87213 cssClasses: [],
87214 methods: [],
87215 members: [],
87216 annotations: []
87217 };
87218};
87219var clear = function clear() {
87220 relations = [];
87221 classes = {};
87222 funs = [];
87223 funs.push(setupToolTips);
87224};
87225var getClass = function getClass(id) {
87226 return classes[id];
87227};
87228var getClasses = function getClasses() {
87229 return classes;
87230};
87231var getRelations = function getRelations() {
87232 return relations;
87233};
87234var addRelation = function addRelation(relation) {
87235 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Adding relation: ' + JSON.stringify(relation));
87236 addClass(relation.id1);
87237 addClass(relation.id2);
87238 relation.id1 = splitClassNameAndType(relation.id1).className;
87239 relation.id2 = splitClassNameAndType(relation.id2).className;
87240 relations.push(relation);
87241};
87242/**
87243 * Adds an annotation to the specified class
87244 * Annotations mark special properties of the given type (like 'interface' or 'service')
87245 * @param className The class name
87246 * @param annotation The name of the annotation without any brackets
87247 * @public
87248 */
87249
87250var addAnnotation = function addAnnotation(className, annotation) {
87251 var validatedClassName = splitClassNameAndType(className).className;
87252 classes[validatedClassName].annotations.push(annotation);
87253};
87254/**
87255 * Adds a member to the specified class
87256 * @param className The class name
87257 * @param member The full name of the member.
87258 * If the member is enclosed in <<brackets>> it is treated as an annotation
87259 * If the member is ending with a closing bracket ) it is treated as a method
87260 * Otherwise the member will be treated as a normal property
87261 * @public
87262 */
87263
87264var addMember = function addMember(className, member) {
87265 var validatedClassName = splitClassNameAndType(className).className;
87266 var theClass = classes[validatedClassName];
87267
87268 if (typeof member === 'string') {
87269 // Member can contain white spaces, we trim them out
87270 var memberString = member.trim();
87271
87272 if (memberString.startsWith('<<') && memberString.endsWith('>>')) {
87273 // Remove leading and trailing brackets
87274 theClass.annotations.push(memberString.substring(2, memberString.length - 2));
87275 } else if (memberString.indexOf(')') > 0) {
87276 theClass.methods.push(memberString);
87277 } else if (memberString) {
87278 theClass.members.push(memberString);
87279 }
87280 }
87281};
87282var addMembers = function addMembers(className, members) {
87283 if (Array.isArray(members)) {
87284 members.reverse();
87285 members.forEach(function (member) {
87286 return addMember(className, member);
87287 });
87288 }
87289};
87290var cleanupLabel = function cleanupLabel(label) {
87291 if (label.substring(0, 1) === ':') {
87292 return label.substr(2).trim();
87293 } else {
87294 return label.trim();
87295 }
87296};
87297/**
87298 * Called by parser when a special node is found, e.g. a clickable element.
87299 * @param ids Comma separated list of ids
87300 * @param className Class to add
87301 */
87302
87303var setCssClass = function setCssClass(ids, className) {
87304 ids.split(',').forEach(function (_id) {
87305 var id = _id;
87306 if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
87307
87308 if (typeof classes[id] !== 'undefined') {
87309 classes[id].cssClasses.push(className);
87310 }
87311 });
87312};
87313/**
87314 * Called by parser when a link is found. Adds the URL to the vertex data.
87315 * @param ids Comma separated list of ids
87316 * @param linkStr URL to create a link for
87317 * @param tooltip Tooltip for the clickable element
87318 */
87319
87320var setLink = function setLink(ids, linkStr, tooltip) {
87321 ids.split(',').forEach(function (_id) {
87322 var id = _id;
87323 if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
87324
87325 if (typeof classes[id] !== 'undefined') {
87326 classes[id].link = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].formatUrl(linkStr, config);
87327
87328 if (tooltip) {
87329 classes[id].tooltip = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].sanitize(tooltip, config);
87330 }
87331 }
87332 });
87333 setCssClass(ids, 'clickable');
87334};
87335/**
87336 * Called by parser when a click definition is found. Registers an event handler.
87337 * @param ids Comma separated list of ids
87338 * @param functionName Function to be called on click
87339 * @param tooltip Tooltip for the clickable element
87340 */
87341
87342var setClickEvent = function setClickEvent(ids, functionName, tooltip) {
87343 ids.split(',').forEach(function (id) {
87344 setClickFunc(id, functionName, tooltip);
87345 });
87346 setCssClass(ids, 'clickable');
87347};
87348
87349var setClickFunc = function setClickFunc(_id, functionName, tooltip) {
87350 var id = _id;
87351 var elemId = MERMAID_DOM_ID_PREFIX + id;
87352
87353 if (config.securityLevel !== 'loose') {
87354 return;
87355 }
87356
87357 if (typeof functionName === 'undefined') {
87358 return;
87359 }
87360
87361 if (typeof classes[id] !== 'undefined') {
87362 if (tooltip) {
87363 classes[id].tooltip = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].sanitize(tooltip, config);
87364 }
87365
87366 funs.push(function () {
87367 var elem = document.querySelector("[id=\"".concat(elemId, "\"]"));
87368
87369 if (elem !== null) {
87370 elem.addEventListener('click', function () {
87371 window[functionName](elemId);
87372 }, false);
87373 }
87374 });
87375 }
87376};
87377
87378var bindFunctions = function bindFunctions(element) {
87379 funs.forEach(function (fun) {
87380 fun(element);
87381 });
87382};
87383var lineType = {
87384 LINE: 0,
87385 DOTTED_LINE: 1
87386};
87387var relationType = {
87388 AGGREGATION: 0,
87389 EXTENSION: 1,
87390 COMPOSITION: 2,
87391 DEPENDENCY: 3
87392};
87393
87394var setupToolTips = function setupToolTips(element) {
87395 var tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
87396
87397 if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
87398 tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
87399 }
87400
87401 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
87402 var nodes = svg.selectAll('g.node');
87403 nodes.on('mouseover', function () {
87404 var el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
87405 var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided
87406
87407 if (title === null) {
87408 return;
87409 }
87410
87411 var rect = this.getBoundingClientRect();
87412 tooltipElem.transition().duration(200).style('opacity', '.9');
87413 tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
87414 el.classed('hover', true);
87415 }).on('mouseout', function () {
87416 tooltipElem.transition().duration(500).style('opacity', 0);
87417 var el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
87418 el.classed('hover', false);
87419 });
87420};
87421
87422funs.push(setupToolTips);
87423/* harmony default export */ __webpack_exports__["default"] = ({
87424 addClass: addClass,
87425 bindFunctions: bindFunctions,
87426 clear: clear,
87427 getClass: getClass,
87428 getClasses: getClasses,
87429 addAnnotation: addAnnotation,
87430 getRelations: getRelations,
87431 addRelation: addRelation,
87432 addMember: addMember,
87433 addMembers: addMembers,
87434 cleanupLabel: cleanupLabel,
87435 lineType: lineType,
87436 relationType: relationType,
87437 setClickEvent: setClickEvent,
87438 setCssClass: setCssClass,
87439 setLink: setLink
87440});
87441
87442/***/ }),
87443
87444/***/ "./src/diagrams/class/classRenderer.js":
87445/*!*********************************************!*\
87446 !*** ./src/diagrams/class/classRenderer.js ***!
87447 \*********************************************/
87448/*! exports provided: setConf, draw, default */
87449/***/ (function(module, __webpack_exports__, __webpack_require__) {
87450
87451"use strict";
87452__webpack_require__.r(__webpack_exports__);
87453/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
87454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
87455/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
87456/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "./node_modules/dagre/index.js");
87457/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);
87458/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js");
87459/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);
87460/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
87461/* harmony import */ var _classDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./classDb */ "./src/diagrams/class/classDb.js");
87462/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
87463/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
87464/* harmony import */ var _parser_classDiagram__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_parser_classDiagram__WEBPACK_IMPORTED_MODULE_6__);
87465
87466
87467
87468
87469
87470
87471
87472_parser_classDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"];
87473var MERMAID_DOM_ID_PREFIX = 'classid-';
87474var idCache = {};
87475var conf = {
87476 dividerMargin: 10,
87477 padding: 5,
87478 textHeight: 10
87479}; // Todo optimize
87480
87481var getGraphId = function getGraphId(label) {
87482 var keys = Object.keys(idCache);
87483
87484 for (var i = 0; i < keys.length; i++) {
87485 if (idCache[keys[i]].label === label) {
87486 return keys[i];
87487 }
87488 }
87489
87490 return undefined;
87491};
87492/**
87493 * Setup arrow head and define the marker. The result is appended to the svg.
87494 */
87495
87496
87497var insertMarkers = function insertMarkers(elem) {
87498 elem.append('defs').append('marker').attr('id', 'extensionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 1,7 L18,13 V 1 Z');
87499 elem.append('defs').append('marker').attr('id', 'extensionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead
87500
87501 elem.append('defs').append('marker').attr('id', 'compositionStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
87502 elem.append('defs').append('marker').attr('id', 'compositionEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
87503 elem.append('defs').append('marker').attr('id', 'aggregationStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
87504 elem.append('defs').append('marker').attr('id', 'aggregationEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');
87505 elem.append('defs').append('marker').attr('id', 'dependencyStart').attr('class', 'extension').attr('refX', 0).attr('refY', 7).attr('markerWidth', 190).attr('markerHeight', 240).attr('orient', 'auto').append('path').attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');
87506 elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');
87507};
87508
87509var edgeCount = 0;
87510
87511var drawEdge = function drawEdge(elem, path, relation) {
87512 var getRelationType = function getRelationType(type) {
87513 switch (type) {
87514 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.AGGREGATION:
87515 return 'aggregation';
87516
87517 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.EXTENSION:
87518 return 'extension';
87519
87520 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.COMPOSITION:
87521 return 'composition';
87522
87523 case _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].relationType.DEPENDENCY:
87524 return 'dependency';
87525 }
87526 };
87527
87528 path.points = path.points.filter(function (p) {
87529 return !Number.isNaN(p.y);
87530 }); // The data for our line
87531
87532 var lineData = path.points; // This is the accessor function we talked about above
87533
87534 var lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
87535 return d.x;
87536 }).y(function (d) {
87537 return d.y;
87538 }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
87539 var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'relation');
87540 var url = '';
87541
87542 if (conf.arrowMarkerAbsolute) {
87543 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
87544 url = url.replace(/\(/g, '\\(');
87545 url = url.replace(/\)/g, '\\)');
87546 }
87547
87548 if (relation.relation.lineType == 1) {
87549 svgPath.attr('class', 'relation dashed-line');
87550 }
87551
87552 if (relation.relation.type1 !== 'none') {
87553 svgPath.attr('marker-start', 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')');
87554 }
87555
87556 if (relation.relation.type2 !== 'none') {
87557 svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')');
87558 }
87559
87560 var x, y;
87561 var l = path.points.length; // Calculate Label position
87562
87563 var labalPosition = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].calcLabelPosition(path.points);
87564 x = labalPosition.x;
87565 y = labalPosition.y;
87566 var p1_card_x, p1_card_y; // p1_card_padd_x = conf.padding * 2,
87567 // p1_card_padd_y = conf.padding;
87568
87569 var p2_card_x, p2_card_y; // p2_card_padd_x = conf.padding * 2,
87570 // p2_card_padd_y = -conf.padding / 2;
87571
87572 if (l % 2 !== 0 && l > 1) {
87573 var cardinality_1_point = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].calcCardinalityPosition(relation.relation.type1 !== 'none', path.points, path.points[0]);
87574 var cardinality_2_point = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].calcCardinalityPosition(relation.relation.type2 !== 'none', path.points, path.points[l - 1]);
87575 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));
87576 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));
87577 p1_card_x = cardinality_1_point.x;
87578 p1_card_y = cardinality_1_point.y;
87579 p2_card_x = cardinality_2_point.x;
87580 p2_card_y = cardinality_2_point.y;
87581 }
87582
87583 if (typeof relation.title !== 'undefined') {
87584 var g = elem.append('g').attr('class', 'classLabel');
87585 var label = g.append('text').attr('class', 'label').attr('x', x).attr('y', y).attr('fill', 'red').attr('text-anchor', 'middle').text(relation.title);
87586 window.label = label;
87587 var bounds = label.node().getBBox();
87588 g.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - conf.padding / 2).attr('y', bounds.y - conf.padding / 2).attr('width', bounds.width + conf.padding).attr('height', bounds.height + conf.padding);
87589 }
87590
87591 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering relation ' + JSON.stringify(relation));
87592
87593 if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {
87594 var _g = elem.append('g').attr('class', 'cardinality');
87595
87596 _g.append('text').attr('class', 'type1').attr('x', p1_card_x).attr('y', p1_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle1);
87597 }
87598
87599 if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {
87600 var _g2 = elem.append('g').attr('class', 'cardinality');
87601
87602 _g2.append('text').attr('class', 'type2').attr('x', p2_card_x).attr('y', p2_card_y).attr('fill', 'black').attr('font-size', '6').text(relation.relationTitle2);
87603 }
87604
87605 edgeCount++;
87606};
87607
87608var drawClass = function drawClass(elem, classDef) {
87609 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering class ' + classDef);
87610 var cssClassStr = 'classGroup ';
87611
87612 if (classDef.cssClasses.length > 0) {
87613 cssClassStr = cssClassStr + classDef.cssClasses.join(' ');
87614 }
87615
87616 var addTspan = function addTspan(textEl, txt, isFirst) {
87617 var displayText = txt;
87618 var cssStyle = '';
87619 var methodEnd = txt.indexOf(')') + 1;
87620
87621 if (methodEnd > 1 && methodEnd <= txt.length) {
87622 var classifier = txt.substring(methodEnd);
87623
87624 switch (classifier) {
87625 case '*':
87626 cssStyle = 'font-style:italic;';
87627 break;
87628
87629 case '$':
87630 cssStyle = 'text-decoration:underline;';
87631 break;
87632 }
87633
87634 displayText = txt.substring(0, methodEnd);
87635 }
87636
87637 var tSpan = textEl.append('tspan').attr('x', conf.padding).text(displayText);
87638
87639 if (cssStyle !== '') {
87640 tSpan.attr('style', cssStyle);
87641 }
87642
87643 if (!isFirst) {
87644 tSpan.attr('dy', conf.textHeight);
87645 }
87646 };
87647
87648 var id = MERMAID_DOM_ID_PREFIX + classDef.id;
87649 var classInfo = {
87650 id: id,
87651 label: classDef.id,
87652 width: 0,
87653 height: 0
87654 }; // add class group
87655
87656 var g = elem.append('g').attr('id', id).attr('class', cssClassStr); // add title
87657
87658 var title;
87659
87660 if (classDef.link) {
87661 title = g.append('svg:a').attr('xlink:href', classDef.link).attr('target', '_blank').append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);
87662 } else {
87663 title = g.append('text').attr('y', conf.textHeight + conf.padding).attr('x', 0);
87664 } // add annotations
87665
87666
87667 var isFirst = true;
87668 classDef.annotations.forEach(function (member) {
87669 var titleText2 = title.append('tspan').text('«' + member + '»');
87670 if (!isFirst) titleText2.attr('dy', conf.textHeight);
87671 isFirst = false;
87672 });
87673 var classTitleString = classDef.id;
87674
87675 if (classDef.type !== undefined && classDef.type !== '') {
87676 classTitleString += '<' + classDef.type + '>';
87677 }
87678
87679 var classTitle = title.append('tspan').text(classTitleString).attr('class', 'title'); // If class has annotations the title needs to have an offset of the text height
87680
87681 if (!isFirst) classTitle.attr('dy', conf.textHeight);
87682 var titleHeight = title.node().getBBox().height;
87683 var membersLine = g.append('line') // text label for the x axis
87684 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2).attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);
87685 var members = g.append('text') // text label for the x axis
87686 .attr('x', conf.padding).attr('y', titleHeight + conf.dividerMargin + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
87687 isFirst = true;
87688 classDef.members.forEach(function (member) {
87689 addTspan(members, member, isFirst);
87690 isFirst = false;
87691 });
87692 var membersBox = members.node().getBBox();
87693 var methodsLine = g.append('line') // text label for the x axis
87694 .attr('x1', 0).attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height).attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);
87695 var methods = g.append('text') // text label for the x axis
87696 .attr('x', conf.padding).attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight).attr('fill', 'white').attr('class', 'classText');
87697 isFirst = true;
87698 classDef.methods.forEach(function (method) {
87699 addTspan(methods, method, isFirst);
87700 isFirst = false;
87701 });
87702 var classBox = g.node().getBBox();
87703 var rect = g.insert('rect', ':first-child').attr('x', 0).attr('y', 0).attr('width', classBox.width + 2 * conf.padding).attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin);
87704 var rectWidth = rect.node().getBBox().width; // Center title
87705 // We subtract the width of each text element from the class box width and divide it by 2
87706
87707 title.node().childNodes.forEach(function (x) {
87708 x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);
87709 });
87710
87711 if (classDef.tooltip) {
87712 title.insert('title').text(classDef.tooltip);
87713 }
87714
87715 membersLine.attr('x2', rectWidth);
87716 methodsLine.attr('x2', rectWidth);
87717 classInfo.width = rectWidth;
87718 classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;
87719 idCache[id] = classInfo;
87720 return classInfo;
87721};
87722
87723var setConf = function setConf(cnf) {
87724 var keys = Object.keys(cnf);
87725 keys.forEach(function (key) {
87726 conf[key] = cnf[key];
87727 });
87728};
87729/**
87730 * Draws a flowchart in the tag with id: id based on the graph definition in text.
87731 * @param text
87732 * @param id
87733 */
87734
87735var draw = function draw(text, id) {
87736 idCache = {};
87737 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].yy.clear();
87738 _parser_classDiagram__WEBPACK_IMPORTED_MODULE_6__["parser"].parse(text);
87739 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Rendering diagram ' + text); /// / Fetch the default direction, use TD if none was found
87740
87741 var diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id='".concat(id, "']"));
87742 insertMarkers(diagram); // Layout graph, Create a new directed graph
87743
87744 var g = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
87745 multigraph: true
87746 }); // Set an object for the graph label
87747
87748 g.setGraph({
87749 isMultiGraph: true
87750 }); // Default to assigning a new object as a label for each new edge.
87751
87752 g.setDefaultEdgeLabel(function () {
87753 return {};
87754 });
87755 var classes = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getClasses();
87756 var keys = Object.keys(classes);
87757
87758 for (var i = 0; i < keys.length; i++) {
87759 var classDef = classes[keys[i]];
87760 var node = drawClass(diagram, classDef); // Add nodes to the graph. The first argument is the node id. The second is
87761 // metadata about the node. In this case we're going to add labels to each of
87762 // our nodes.
87763
87764 g.setNode(node.id, node);
87765 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Org height: ' + node.height);
87766 }
87767
87768 var relations = _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
87769 relations.forEach(function (relation) {
87770 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation));
87771 g.setEdge(getGraphId(relation.id1), getGraphId(relation.id2), {
87772 relation: relation
87773 });
87774 });
87775 dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(g);
87776 g.nodes().forEach(function (v) {
87777 if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {
87778 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));
87779 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + v).attr('transform', 'translate(' + (g.node(v).x - g.node(v).width / 2) + ',' + (g.node(v).y - g.node(v).height / 2) + ' )');
87780 }
87781 });
87782 g.edges().forEach(function (e) {
87783 if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {
87784 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));
87785 drawEdge(diagram, g.edge(e), g.edge(e).relation);
87786 }
87787 });
87788 diagram.attr('height', '100%');
87789 diagram.attr('width', "".concat(g.graph().width * 1.5 + 20));
87790 diagram.attr('viewBox', '-10 -10 ' + (g.graph().width + 20) + ' ' + (g.graph().height + 20));
87791};
87792/* harmony default export */ __webpack_exports__["default"] = ({
87793 setConf: setConf,
87794 draw: draw
87795});
87796
87797/***/ }),
87798
87799/***/ "./src/diagrams/class/parser/classDiagram.jison":
87800/*!******************************************************!*\
87801 !*** ./src/diagrams/class/parser/classDiagram.jison ***!
87802 \******************************************************/
87803/*! no static exports found */
87804/***/ (function(module, exports, __webpack_require__) {
87805
87806/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
87807/*
87808 Returns a Parser object of the following structure:
87809
87810 Parser: {
87811 yy: {}
87812 }
87813
87814 Parser.prototype: {
87815 yy: {},
87816 trace: function(),
87817 symbols_: {associative list: name ==> number},
87818 terminals_: {associative list: number ==> name},
87819 productions_: [...],
87820 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
87821 table: [...],
87822 defaultActions: {...},
87823 parseError: function(str, hash),
87824 parse: function(input),
87825
87826 lexer: {
87827 EOF: 1,
87828 parseError: function(str, hash),
87829 setInput: function(input),
87830 input: function(),
87831 unput: function(str),
87832 more: function(),
87833 less: function(n),
87834 pastInput: function(),
87835 upcomingInput: function(),
87836 showPosition: function(),
87837 test_match: function(regex_match_array, rule_index),
87838 next: function(),
87839 lex: function(),
87840 begin: function(condition),
87841 popState: function(),
87842 _currentRules: function(),
87843 topState: function(),
87844 pushState: function(condition),
87845
87846 options: {
87847 ranges: boolean (optional: true ==> token location info will include a .range[] member)
87848 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
87849 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
87850 },
87851
87852 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
87853 rules: [...],
87854 conditions: {associative list: name ==> set},
87855 }
87856 }
87857
87858
87859 token location info (@$, _$, etc.): {
87860 first_line: n,
87861 last_line: n,
87862 first_column: n,
87863 last_column: n,
87864 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
87865 }
87866
87867
87868 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
87869 text: (matched text)
87870 token: (the produced terminal token, if any)
87871 line: (yylineno)
87872 }
87873 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
87874 loc: (yylloc)
87875 expected: (string describing the set of expected tokens)
87876 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
87877 }
87878*/
87879var parser = (function(){
87880var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,13],$V1=[1,16],$V2=[1,14],$V3=[1,15],$V4=[1,17],$V5=[1,18],$V6=[1,20],$V7=[1,21],$V8=[1,22],$V9=[6,8],$Va=[1,31],$Vb=[1,32],$Vc=[1,33],$Vd=[1,34],$Ve=[1,35],$Vf=[1,36],$Vg=[6,8,14,20,28,31,32,33,34,35,36],$Vh=[6,8,12,14,20,24,28,31,32,33,34,35,36,52,53,54],$Vi=[28,52,53,54],$Vj=[28,35,36,52,53,54],$Vk=[28,31,32,33,34,52,53,54],$Vl=[6,8,14],$Vm=[1,59];
87881var parser = {trace: function trace () { },
87882yy: {},
87883symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"CLASS_DIAGRAM":5,"NEWLINE":6,"statements":7,"EOF":8,"statement":9,"className":10,"alphaNumToken":11,"GENERICTYPE":12,"relationStatement":13,"LABEL":14,"classStatement":15,"methodStatement":16,"annotationStatement":17,"clickStatement":18,"CLASS":19,"STRUCT_START":20,"members":21,"STRUCT_STOP":22,"ANNOTATION_START":23,"ANNOTATION_END":24,"MEMBER":25,"SEPARATOR":26,"relation":27,"STR":28,"relationType":29,"lineType":30,"AGGREGATION":31,"EXTENSION":32,"COMPOSITION":33,"DEPENDENCY":34,"LINE":35,"DOTTED_LINE":36,"CALLBACK":37,"LINK":38,"commentToken":39,"textToken":40,"graphCodeTokens":41,"textNoTagsToken":42,"TAGSTART":43,"TAGEND":44,"==":45,"--":46,"PCT":47,"DEFAULT":48,"SPACE":49,"MINUS":50,"keywords":51,"UNICODE_TEXT":52,"NUM":53,"ALPHA":54,"$accept":0,"$end":1},
87884terminals_: {2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",12:"GENERICTYPE",14:"LABEL",19:"CLASS",20:"STRUCT_START",22:"STRUCT_STOP",23:"ANNOTATION_START",24:"ANNOTATION_END",25:"MEMBER",26:"SEPARATOR",28:"STR",31:"AGGREGATION",32:"EXTENSION",33:"COMPOSITION",34:"DEPENDENCY",35:"LINE",36:"DOTTED_LINE",37:"CALLBACK",38:"LINK",41:"graphCodeTokens",43:"TAGSTART",44:"TAGEND",45:"==",46:"--",47:"PCT",48:"DEFAULT",49:"SPACE",50:"MINUS",51:"keywords",52:"UNICODE_TEXT",53:"NUM",54:"ALPHA"},
87885productions_: [0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[10,3],[10,2],[9,1],[9,2],[9,1],[9,1],[9,1],[9,1],[15,2],[15,5],[17,4],[21,1],[21,2],[16,1],[16,2],[16,1],[16,1],[13,3],[13,4],[13,4],[13,5],[27,3],[27,2],[27,2],[27,1],[29,1],[29,1],[29,1],[29,1],[30,1],[30,1],[18,3],[18,4],[18,3],[18,4],[39,1],[39,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[42,1],[42,1],[42,1],[42,1],[11,1],[11,1],[11,1]],
87886performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
87887/* this == yyval */
87888
87889var $0 = $$.length - 1;
87890switch (yystate) {
87891case 6:
87892 this.$=$$[$0-1]+$$[$0];
87893break;
87894case 7:
87895 this.$=$$[$0];
87896break;
87897case 8:
87898 this.$=$$[$0-2]+'~'+$$[$0-1]+$$[$0];
87899break;
87900case 9:
87901 this.$=$$[$0-1]+'~'+$$[$0];
87902break;
87903case 10:
87904 yy.addRelation($$[$0]);
87905break;
87906case 11:
87907 $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]);
87908break;
87909case 16:
87910yy.addClass($$[$0]);
87911break;
87912case 17:
87913/*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]);
87914break;
87915case 18:
87916 yy.addAnnotation($$[$0],$$[$0-2]);
87917break;
87918case 19:
87919 this.$ = [$$[$0]];
87920break;
87921case 20:
87922 $$[$0].push($$[$0-1]);this.$=$$[$0];
87923break;
87924case 21:
87925/*console.log('Rel found',$$[$0]);*/
87926break;
87927case 22:
87928yy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));
87929break;
87930case 23:
87931/*console.warn('Member',$$[$0]);*/
87932break;
87933case 24:
87934/*console.log('sep found',$$[$0]);*/
87935break;
87936case 25:
87937 this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'};
87938break;
87939case 26:
87940 this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}
87941break;
87942case 27:
87943 this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]};
87944break;
87945case 28:
87946 this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]}
87947break;
87948case 29:
87949 this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]};
87950break;
87951case 30:
87952 this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]};
87953break;
87954case 31:
87955 this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]};
87956break;
87957case 32:
87958 this.$={type1:'none',type2:'none',lineType:$$[$0]};
87959break;
87960case 33:
87961 this.$=yy.relationType.AGGREGATION;
87962break;
87963case 34:
87964 this.$=yy.relationType.EXTENSION;
87965break;
87966case 35:
87967 this.$=yy.relationType.COMPOSITION;
87968break;
87969case 36:
87970 this.$=yy.relationType.DEPENDENCY;
87971break;
87972case 37:
87973this.$=yy.lineType.LINE;
87974break;
87975case 38:
87976this.$=yy.lineType.DOTTED_LINE;
87977break;
87978case 39:
87979this.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0], undefined);
87980break;
87981case 40:
87982this.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);
87983break;
87984case 41:
87985this.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0], undefined);
87986break;
87987case 42:
87988this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1], $$[$0]);
87989break;
87990}
87991},
87992table: [{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:$V0,23:$V1,25:$V2,26:$V3,37:$V4,38:$V5,52:$V6,53:$V7,54:$V8},{8:[1,23]},{6:[1,24],8:[2,3]},o($V9,[2,10],{14:[1,25]}),o($V9,[2,12]),o($V9,[2,13]),o($V9,[2,14]),o($V9,[2,15]),o($V9,[2,21],{27:26,29:29,30:30,14:[1,28],28:[1,27],31:$Va,32:$Vb,33:$Vc,34:$Vd,35:$Ve,36:$Vf}),{10:37,11:19,52:$V6,53:$V7,54:$V8},o($V9,[2,23]),o($V9,[2,24]),{11:38,52:$V6,53:$V7,54:$V8},{10:39,11:19,52:$V6,53:$V7,54:$V8},{10:40,11:19,52:$V6,53:$V7,54:$V8},o($Vg,[2,7],{11:19,10:41,12:[1,42],52:$V6,53:$V7,54:$V8}),o($Vh,[2,56]),o($Vh,[2,57]),o($Vh,[2,58]),{1:[2,2]},{7:43,8:[2,4],9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:$V0,23:$V1,25:$V2,26:$V3,37:$V4,38:$V5,52:$V6,53:$V7,54:$V8},o($V9,[2,11]),{10:44,11:19,28:[1,45],52:$V6,53:$V7,54:$V8},{27:46,29:29,30:30,31:$Va,32:$Vb,33:$Vc,34:$Vd,35:$Ve,36:$Vf},o($V9,[2,22]),{30:47,35:$Ve,36:$Vf},o($Vi,[2,32],{29:48,31:$Va,32:$Vb,33:$Vc,34:$Vd}),o($Vj,[2,33]),o($Vj,[2,34]),o($Vj,[2,35]),o($Vj,[2,36]),o($Vk,[2,37]),o($Vk,[2,38]),o($V9,[2,16],{20:[1,49]}),{24:[1,50]},{28:[1,51]},{28:[1,52]},o($Vg,[2,6]),o($Vg,[2,9],{11:19,10:53,52:$V6,53:$V7,54:$V8}),{8:[2,5]},o($Vl,[2,25]),{10:54,11:19,52:$V6,53:$V7,54:$V8},{10:55,11:19,28:[1,56],52:$V6,53:$V7,54:$V8},o($Vi,[2,31],{29:57,31:$Va,32:$Vb,33:$Vc,34:$Vd}),o($Vi,[2,30]),{21:58,25:$Vm},{10:60,11:19,52:$V6,53:$V7,54:$V8},o($V9,[2,39],{28:[1,61]}),o($V9,[2,41],{28:[1,62]}),o($Vg,[2,8]),o($Vl,[2,27]),o($Vl,[2,26]),{10:63,11:19,52:$V6,53:$V7,54:$V8},o($Vi,[2,29]),{22:[1,64]},{21:65,22:[2,19],25:$Vm},o($V9,[2,18]),o($V9,[2,40]),o($V9,[2,42]),o($Vl,[2,28]),o($V9,[2,17]),{22:[2,20]}],
87993defaultActions: {2:[2,1],23:[2,2],43:[2,5],65:[2,20]},
87994parseError: function parseError (str, hash) {
87995 if (hash.recoverable) {
87996 this.trace(str);
87997 } else {
87998 var error = new Error(str);
87999 error.hash = hash;
88000 throw error;
88001 }
88002},
88003parse: function parse(input) {
88004 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
88005 var args = lstack.slice.call(arguments, 1);
88006 var lexer = Object.create(this.lexer);
88007 var sharedState = { yy: {} };
88008 for (var k in this.yy) {
88009 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
88010 sharedState.yy[k] = this.yy[k];
88011 }
88012 }
88013 lexer.setInput(input, sharedState.yy);
88014 sharedState.yy.lexer = lexer;
88015 sharedState.yy.parser = this;
88016 if (typeof lexer.yylloc == 'undefined') {
88017 lexer.yylloc = {};
88018 }
88019 var yyloc = lexer.yylloc;
88020 lstack.push(yyloc);
88021 var ranges = lexer.options && lexer.options.ranges;
88022 if (typeof sharedState.yy.parseError === 'function') {
88023 this.parseError = sharedState.yy.parseError;
88024 } else {
88025 this.parseError = Object.getPrototypeOf(this).parseError;
88026 }
88027 function popStack(n) {
88028 stack.length = stack.length - 2 * n;
88029 vstack.length = vstack.length - n;
88030 lstack.length = lstack.length - n;
88031 }
88032 function lex() {
88033 var token;
88034 token = tstack.pop() || lexer.lex() || EOF;
88035 if (typeof token !== 'number') {
88036 if (token instanceof Array) {
88037 tstack = token;
88038 token = tstack.pop();
88039 }
88040 token = self.symbols_[token] || token;
88041 }
88042 return token;
88043 }
88044 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
88045 while (true) {
88046 state = stack[stack.length - 1];
88047 if (this.defaultActions[state]) {
88048 action = this.defaultActions[state];
88049 } else {
88050 if (symbol === null || typeof symbol == 'undefined') {
88051 symbol = lex();
88052 }
88053 action = table[state] && table[state][symbol];
88054 }
88055 if (typeof action === 'undefined' || !action.length || !action[0]) {
88056 var errStr = '';
88057 expected = [];
88058 for (p in table[state]) {
88059 if (this.terminals_[p] && p > TERROR) {
88060 expected.push('\'' + this.terminals_[p] + '\'');
88061 }
88062 }
88063 if (lexer.showPosition) {
88064 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
88065 } else {
88066 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
88067 }
88068 this.parseError(errStr, {
88069 text: lexer.match,
88070 token: this.terminals_[symbol] || symbol,
88071 line: lexer.yylineno,
88072 loc: yyloc,
88073 expected: expected
88074 });
88075 }
88076 if (action[0] instanceof Array && action.length > 1) {
88077 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
88078 }
88079 switch (action[0]) {
88080 case 1:
88081 stack.push(symbol);
88082 vstack.push(lexer.yytext);
88083 lstack.push(lexer.yylloc);
88084 stack.push(action[1]);
88085 symbol = null;
88086 if (!preErrorSymbol) {
88087 yyleng = lexer.yyleng;
88088 yytext = lexer.yytext;
88089 yylineno = lexer.yylineno;
88090 yyloc = lexer.yylloc;
88091 if (recovering > 0) {
88092 recovering--;
88093 }
88094 } else {
88095 symbol = preErrorSymbol;
88096 preErrorSymbol = null;
88097 }
88098 break;
88099 case 2:
88100 len = this.productions_[action[1]][1];
88101 yyval.$ = vstack[vstack.length - len];
88102 yyval._$ = {
88103 first_line: lstack[lstack.length - (len || 1)].first_line,
88104 last_line: lstack[lstack.length - 1].last_line,
88105 first_column: lstack[lstack.length - (len || 1)].first_column,
88106 last_column: lstack[lstack.length - 1].last_column
88107 };
88108 if (ranges) {
88109 yyval._$.range = [
88110 lstack[lstack.length - (len || 1)].range[0],
88111 lstack[lstack.length - 1].range[1]
88112 ];
88113 }
88114 r = this.performAction.apply(yyval, [
88115 yytext,
88116 yyleng,
88117 yylineno,
88118 sharedState.yy,
88119 action[1],
88120 vstack,
88121 lstack
88122 ].concat(args));
88123 if (typeof r !== 'undefined') {
88124 return r;
88125 }
88126 if (len) {
88127 stack = stack.slice(0, -1 * len * 2);
88128 vstack = vstack.slice(0, -1 * len);
88129 lstack = lstack.slice(0, -1 * len);
88130 }
88131 stack.push(this.productions_[action[1]][0]);
88132 vstack.push(yyval.$);
88133 lstack.push(yyval._$);
88134 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
88135 stack.push(newState);
88136 break;
88137 case 3:
88138 return true;
88139 }
88140 }
88141 return true;
88142}};
88143
88144/* generated by jison-lex 0.3.4 */
88145var lexer = (function(){
88146var lexer = ({
88147
88148EOF:1,
88149
88150parseError:function parseError(str, hash) {
88151 if (this.yy.parser) {
88152 this.yy.parser.parseError(str, hash);
88153 } else {
88154 throw new Error(str);
88155 }
88156 },
88157
88158// resets the lexer, sets new input
88159setInput:function (input, yy) {
88160 this.yy = yy || this.yy || {};
88161 this._input = input;
88162 this._more = this._backtrack = this.done = false;
88163 this.yylineno = this.yyleng = 0;
88164 this.yytext = this.matched = this.match = '';
88165 this.conditionStack = ['INITIAL'];
88166 this.yylloc = {
88167 first_line: 1,
88168 first_column: 0,
88169 last_line: 1,
88170 last_column: 0
88171 };
88172 if (this.options.ranges) {
88173 this.yylloc.range = [0,0];
88174 }
88175 this.offset = 0;
88176 return this;
88177 },
88178
88179// consumes and returns one char from the input
88180input:function () {
88181 var ch = this._input[0];
88182 this.yytext += ch;
88183 this.yyleng++;
88184 this.offset++;
88185 this.match += ch;
88186 this.matched += ch;
88187 var lines = ch.match(/(?:\r\n?|\n).*/g);
88188 if (lines) {
88189 this.yylineno++;
88190 this.yylloc.last_line++;
88191 } else {
88192 this.yylloc.last_column++;
88193 }
88194 if (this.options.ranges) {
88195 this.yylloc.range[1]++;
88196 }
88197
88198 this._input = this._input.slice(1);
88199 return ch;
88200 },
88201
88202// unshifts one char (or a string) into the input
88203unput:function (ch) {
88204 var len = ch.length;
88205 var lines = ch.split(/(?:\r\n?|\n)/g);
88206
88207 this._input = ch + this._input;
88208 this.yytext = this.yytext.substr(0, this.yytext.length - len);
88209 //this.yyleng -= len;
88210 this.offset -= len;
88211 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
88212 this.match = this.match.substr(0, this.match.length - 1);
88213 this.matched = this.matched.substr(0, this.matched.length - 1);
88214
88215 if (lines.length - 1) {
88216 this.yylineno -= lines.length - 1;
88217 }
88218 var r = this.yylloc.range;
88219
88220 this.yylloc = {
88221 first_line: this.yylloc.first_line,
88222 last_line: this.yylineno + 1,
88223 first_column: this.yylloc.first_column,
88224 last_column: lines ?
88225 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
88226 + oldLines[oldLines.length - lines.length].length - lines[0].length :
88227 this.yylloc.first_column - len
88228 };
88229
88230 if (this.options.ranges) {
88231 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
88232 }
88233 this.yyleng = this.yytext.length;
88234 return this;
88235 },
88236
88237// When called from action, caches matched text and appends it on next action
88238more:function () {
88239 this._more = true;
88240 return this;
88241 },
88242
88243// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
88244reject:function () {
88245 if (this.options.backtrack_lexer) {
88246 this._backtrack = true;
88247 } else {
88248 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
88249 text: "",
88250 token: null,
88251 line: this.yylineno
88252 });
88253
88254 }
88255 return this;
88256 },
88257
88258// retain first n characters of the match
88259less:function (n) {
88260 this.unput(this.match.slice(n));
88261 },
88262
88263// displays already matched input, i.e. for error messages
88264pastInput:function () {
88265 var past = this.matched.substr(0, this.matched.length - this.match.length);
88266 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
88267 },
88268
88269// displays upcoming input, i.e. for error messages
88270upcomingInput:function () {
88271 var next = this.match;
88272 if (next.length < 20) {
88273 next += this._input.substr(0, 20-next.length);
88274 }
88275 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
88276 },
88277
88278// displays the character position where the lexing error occurred, i.e. for error messages
88279showPosition:function () {
88280 var pre = this.pastInput();
88281 var c = new Array(pre.length + 1).join("-");
88282 return pre + this.upcomingInput() + "\n" + c + "^";
88283 },
88284
88285// test the lexed token: return FALSE when not a match, otherwise return token
88286test_match:function(match, indexed_rule) {
88287 var token,
88288 lines,
88289 backup;
88290
88291 if (this.options.backtrack_lexer) {
88292 // save context
88293 backup = {
88294 yylineno: this.yylineno,
88295 yylloc: {
88296 first_line: this.yylloc.first_line,
88297 last_line: this.last_line,
88298 first_column: this.yylloc.first_column,
88299 last_column: this.yylloc.last_column
88300 },
88301 yytext: this.yytext,
88302 match: this.match,
88303 matches: this.matches,
88304 matched: this.matched,
88305 yyleng: this.yyleng,
88306 offset: this.offset,
88307 _more: this._more,
88308 _input: this._input,
88309 yy: this.yy,
88310 conditionStack: this.conditionStack.slice(0),
88311 done: this.done
88312 };
88313 if (this.options.ranges) {
88314 backup.yylloc.range = this.yylloc.range.slice(0);
88315 }
88316 }
88317
88318 lines = match[0].match(/(?:\r\n?|\n).*/g);
88319 if (lines) {
88320 this.yylineno += lines.length;
88321 }
88322 this.yylloc = {
88323 first_line: this.yylloc.last_line,
88324 last_line: this.yylineno + 1,
88325 first_column: this.yylloc.last_column,
88326 last_column: lines ?
88327 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
88328 this.yylloc.last_column + match[0].length
88329 };
88330 this.yytext += match[0];
88331 this.match += match[0];
88332 this.matches = match;
88333 this.yyleng = this.yytext.length;
88334 if (this.options.ranges) {
88335 this.yylloc.range = [this.offset, this.offset += this.yyleng];
88336 }
88337 this._more = false;
88338 this._backtrack = false;
88339 this._input = this._input.slice(match[0].length);
88340 this.matched += match[0];
88341 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
88342 if (this.done && this._input) {
88343 this.done = false;
88344 }
88345 if (token) {
88346 return token;
88347 } else if (this._backtrack) {
88348 // recover context
88349 for (var k in backup) {
88350 this[k] = backup[k];
88351 }
88352 return false; // rule action called reject() implying the next rule should be tested instead.
88353 }
88354 return false;
88355 },
88356
88357// return next match in input
88358next:function () {
88359 if (this.done) {
88360 return this.EOF;
88361 }
88362 if (!this._input) {
88363 this.done = true;
88364 }
88365
88366 var token,
88367 match,
88368 tempMatch,
88369 index;
88370 if (!this._more) {
88371 this.yytext = '';
88372 this.match = '';
88373 }
88374 var rules = this._currentRules();
88375 for (var i = 0; i < rules.length; i++) {
88376 tempMatch = this._input.match(this.rules[rules[i]]);
88377 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
88378 match = tempMatch;
88379 index = i;
88380 if (this.options.backtrack_lexer) {
88381 token = this.test_match(tempMatch, rules[i]);
88382 if (token !== false) {
88383 return token;
88384 } else if (this._backtrack) {
88385 match = false;
88386 continue; // rule action called reject() implying a rule MISmatch.
88387 } else {
88388 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
88389 return false;
88390 }
88391 } else if (!this.options.flex) {
88392 break;
88393 }
88394 }
88395 }
88396 if (match) {
88397 token = this.test_match(match, rules[index]);
88398 if (token !== false) {
88399 return token;
88400 }
88401 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
88402 return false;
88403 }
88404 if (this._input === "") {
88405 return this.EOF;
88406 } else {
88407 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
88408 text: "",
88409 token: null,
88410 line: this.yylineno
88411 });
88412 }
88413 },
88414
88415// return next match that has a token
88416lex:function lex () {
88417 var r = this.next();
88418 if (r) {
88419 return r;
88420 } else {
88421 return this.lex();
88422 }
88423 },
88424
88425// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
88426begin:function begin (condition) {
88427 this.conditionStack.push(condition);
88428 },
88429
88430// pop the previously active lexer condition state off the condition stack
88431popState:function popState () {
88432 var n = this.conditionStack.length - 1;
88433 if (n > 0) {
88434 return this.conditionStack.pop();
88435 } else {
88436 return this.conditionStack[0];
88437 }
88438 },
88439
88440// produce the lexer rule set which is active for the currently active lexer condition state
88441_currentRules:function _currentRules () {
88442 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
88443 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
88444 } else {
88445 return this.conditions["INITIAL"].rules;
88446 }
88447 },
88448
88449// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
88450topState:function topState (n) {
88451 n = this.conditionStack.length - 1 - Math.abs(n || 0);
88452 if (n >= 0) {
88453 return this.conditionStack[n];
88454 } else {
88455 return "INITIAL";
88456 }
88457 },
88458
88459// alias for begin(condition)
88460pushState:function pushState (condition) {
88461 this.begin(condition);
88462 },
88463
88464// return the number of states currently on the stack
88465stateStackSize:function stateStackSize() {
88466 return this.conditionStack.length;
88467 },
88468options: {},
88469performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
88470var YYSTATE=YY_START;
88471switch($avoiding_name_collisions) {
88472case 0:/* do nothing */
88473break;
88474case 1:return 6;
88475break;
88476case 2:/* skip whitespace */
88477break;
88478case 3:return 5;
88479break;
88480case 4: this.begin("struct"); /*console.log('Starting struct');*/return 20;
88481break;
88482case 5: /*console.log('Ending struct');*/this.popState(); return 22;
88483break;
88484case 6:/* nothing */
88485break;
88486case 7: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER";
88487break;
88488case 8:return 19;
88489break;
88490case 9:return 37;
88491break;
88492case 10:return 38;
88493break;
88494case 11:return 23;
88495break;
88496case 12:return 24;
88497break;
88498case 13:this.begin("generic");
88499break;
88500case 14:this.popState();
88501break;
88502case 15:return "GENERICTYPE";
88503break;
88504case 16:this.begin("string");
88505break;
88506case 17:this.popState();
88507break;
88508case 18:return "STR";
88509break;
88510case 19:return 32;
88511break;
88512case 20:return 32;
88513break;
88514case 21:return 34;
88515break;
88516case 22:return 34;
88517break;
88518case 23:return 33;
88519break;
88520case 24:return 31;
88521break;
88522case 25:return 35;
88523break;
88524case 26:return 36;
88525break;
88526case 27:return 14;
88527break;
88528case 28:return 50;
88529break;
88530case 29:return 'DOT';
88531break;
88532case 30:return 'PLUS';
88533break;
88534case 31:return 47;
88535break;
88536case 32:return 'EQUALS';
88537break;
88538case 33:return 'EQUALS';
88539break;
88540case 34:return 54;
88541break;
88542case 35:return 'PUNCTUATION';
88543break;
88544case 36:return 53;
88545break;
88546case 37:return 52;
88547break;
88548case 38:return 49;
88549break;
88550case 39:return 8;
88551break;
88552}
88553},
88554rules: [/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],
88555conditions: {"string":{"rules":[17,18],"inclusive":false},"generic":{"rules":[14,15],"inclusive":false},"struct":{"rules":[5,6,7],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,8,9,10,11,12,13,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"inclusive":true}}
88556});
88557return lexer;
88558})();
88559parser.lexer = lexer;
88560function Parser () {
88561 this.yy = {};
88562}
88563Parser.prototype = parser;parser.Parser = Parser;
88564return new Parser;
88565})();
88566
88567
88568if (true) {
88569exports.parser = parser;
88570exports.Parser = parser.Parser;
88571exports.parse = function () { return parser.parse.apply(parser, arguments); };
88572exports.main = function commonjsMain (args) {
88573 if (!args[1]) {
88574 console.log('Usage: '+args[0]+' FILE');
88575 process.exit(1);
88576 }
88577 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
88578 return exports.parser.parse(source);
88579};
88580if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
88581 exports.main(process.argv.slice(1));
88582}
88583}
88584/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
88585
88586/***/ }),
88587
88588/***/ "./src/diagrams/flowchart/flowChartShapes.js":
88589/*!***************************************************!*\
88590 !*** ./src/diagrams/flowchart/flowChartShapes.js ***!
88591 \***************************************************/
88592/*! exports provided: addToRender, default */
88593/***/ (function(module, __webpack_exports__, __webpack_require__) {
88594
88595"use strict";
88596__webpack_require__.r(__webpack_exports__);
88597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addToRender", function() { return addToRender; });
88598/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dagre-d3 */ "./node_modules/dagre-d3/index.js");
88599/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_0__);
88600
88601
88602function question(parent, bbox, node) {
88603 var w = bbox.width;
88604 var h = bbox.height;
88605 var s = (w + h) * 0.9;
88606 var points = [{
88607 x: s / 2,
88608 y: 0
88609 }, {
88610 x: s,
88611 y: -s / 2
88612 }, {
88613 x: s / 2,
88614 y: -s
88615 }, {
88616 x: 0,
88617 y: -s / 2
88618 }];
88619 var shapeSvg = insertPolygonShape(parent, s, s, points);
88620
88621 node.intersect = function (point) {
88622 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88623 };
88624
88625 return shapeSvg;
88626}
88627
88628function hexagon(parent, bbox, node) {
88629 var f = 4;
88630 var h = bbox.height;
88631 var m = h / f;
88632 var w = bbox.width + 2 * m;
88633 var points = [{
88634 x: m,
88635 y: 0
88636 }, {
88637 x: w - m,
88638 y: 0
88639 }, {
88640 x: w,
88641 y: -h / 2
88642 }, {
88643 x: w - m,
88644 y: -h
88645 }, {
88646 x: m,
88647 y: -h
88648 }, {
88649 x: 0,
88650 y: -h / 2
88651 }];
88652 var shapeSvg = insertPolygonShape(parent, w, h, points);
88653
88654 node.intersect = function (point) {
88655 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88656 };
88657
88658 return shapeSvg;
88659}
88660
88661function rect_left_inv_arrow(parent, bbox, node) {
88662 var w = bbox.width;
88663 var h = bbox.height;
88664 var points = [{
88665 x: -h / 2,
88666 y: 0
88667 }, {
88668 x: w,
88669 y: 0
88670 }, {
88671 x: w,
88672 y: -h
88673 }, {
88674 x: -h / 2,
88675 y: -h
88676 }, {
88677 x: 0,
88678 y: -h / 2
88679 }];
88680 var shapeSvg = insertPolygonShape(parent, w, h, points);
88681
88682 node.intersect = function (point) {
88683 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88684 };
88685
88686 return shapeSvg;
88687}
88688
88689function lean_right(parent, bbox, node) {
88690 var w = bbox.width;
88691 var h = bbox.height;
88692 var points = [{
88693 x: -2 * h / 6,
88694 y: 0
88695 }, {
88696 x: w - h / 6,
88697 y: 0
88698 }, {
88699 x: w + 2 * h / 6,
88700 y: -h
88701 }, {
88702 x: h / 6,
88703 y: -h
88704 }];
88705 var shapeSvg = insertPolygonShape(parent, w, h, points);
88706
88707 node.intersect = function (point) {
88708 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88709 };
88710
88711 return shapeSvg;
88712}
88713
88714function lean_left(parent, bbox, node) {
88715 var w = bbox.width;
88716 var h = bbox.height;
88717 var points = [{
88718 x: 2 * h / 6,
88719 y: 0
88720 }, {
88721 x: w + h / 6,
88722 y: 0
88723 }, {
88724 x: w - 2 * h / 6,
88725 y: -h
88726 }, {
88727 x: -h / 6,
88728 y: -h
88729 }];
88730 var shapeSvg = insertPolygonShape(parent, w, h, points);
88731
88732 node.intersect = function (point) {
88733 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88734 };
88735
88736 return shapeSvg;
88737}
88738
88739function trapezoid(parent, bbox, node) {
88740 var w = bbox.width;
88741 var h = bbox.height;
88742 var points = [{
88743 x: -2 * h / 6,
88744 y: 0
88745 }, {
88746 x: w + 2 * h / 6,
88747 y: 0
88748 }, {
88749 x: w - h / 6,
88750 y: -h
88751 }, {
88752 x: h / 6,
88753 y: -h
88754 }];
88755 var shapeSvg = insertPolygonShape(parent, w, h, points);
88756
88757 node.intersect = function (point) {
88758 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88759 };
88760
88761 return shapeSvg;
88762}
88763
88764function inv_trapezoid(parent, bbox, node) {
88765 var w = bbox.width;
88766 var h = bbox.height;
88767 var points = [{
88768 x: h / 6,
88769 y: 0
88770 }, {
88771 x: w - h / 6,
88772 y: 0
88773 }, {
88774 x: w + 2 * h / 6,
88775 y: -h
88776 }, {
88777 x: -2 * h / 6,
88778 y: -h
88779 }];
88780 var shapeSvg = insertPolygonShape(parent, w, h, points);
88781
88782 node.intersect = function (point) {
88783 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88784 };
88785
88786 return shapeSvg;
88787}
88788
88789function rect_right_inv_arrow(parent, bbox, node) {
88790 var w = bbox.width;
88791 var h = bbox.height;
88792 var points = [{
88793 x: 0,
88794 y: 0
88795 }, {
88796 x: w + h / 2,
88797 y: 0
88798 }, {
88799 x: w,
88800 y: -h / 2
88801 }, {
88802 x: w + h / 2,
88803 y: -h
88804 }, {
88805 x: 0,
88806 y: -h
88807 }];
88808 var shapeSvg = insertPolygonShape(parent, w, h, points);
88809
88810 node.intersect = function (point) {
88811 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.polygon(node, points, point);
88812 };
88813
88814 return shapeSvg;
88815}
88816
88817function stadium(parent, bbox, node) {
88818 var h = bbox.height;
88819 var w = bbox.width + h / 4;
88820 var shapeSvg = parent.insert('rect', ':first-child').attr('rx', h / 2).attr('ry', h / 2).attr('x', -w / 2).attr('y', -h / 2).attr('width', w).attr('height', h);
88821
88822 node.intersect = function (point) {
88823 return dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);
88824 };
88825
88826 return shapeSvg;
88827}
88828
88829function cylinder(parent, bbox, node) {
88830 var w = bbox.width;
88831 var rx = w / 2;
88832 var ry = rx / (2.5 + w / 50);
88833 var h = bbox.height + ry;
88834 var shape = 'M 0,' + ry + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 a ' + rx + ',' + ry + ' 0,0,0 ' + -w + ' 0 l 0,' + h + ' a ' + rx + ',' + ry + ' 0,0,0 ' + w + ' 0 l 0,' + -h;
88835 var shapeSvg = parent.attr('label-offset-y', ry).insert('path', ':first-child').attr('d', shape).attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');
88836
88837 node.intersect = function (point) {
88838 var pos = dagre_d3__WEBPACK_IMPORTED_MODULE_0___default.a.intersect.rect(node, point);
88839 var x = pos.x - node.x;
88840
88841 if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
88842 // ellipsis equation: x*x / a*a + y*y / b*b = 1
88843 // solve for y to get adjustion value for pos.y
88844 var y = ry * ry * (1 - x * x / (rx * rx));
88845 if (y != 0) y = Math.sqrt(y);
88846 y = ry - y;
88847 if (point.y - node.y > 0) y = -y;
88848 pos.y += y;
88849 }
88850
88851 return pos;
88852 };
88853
88854 return shapeSvg;
88855}
88856
88857function addToRender(render) {
88858 render.shapes().question = question;
88859 render.shapes().hexagon = hexagon;
88860 render.shapes().stadium = stadium;
88861 render.shapes().cylinder = cylinder; // Add custom shape for box with inverted arrow on left side
88862
88863 render.shapes().rect_left_inv_arrow = rect_left_inv_arrow; // Add custom shape for box with inverted arrow on left side
88864
88865 render.shapes().lean_right = lean_right; // Add custom shape for box with inverted arrow on left side
88866
88867 render.shapes().lean_left = lean_left; // Add custom shape for box with inverted arrow on left side
88868
88869 render.shapes().trapezoid = trapezoid; // Add custom shape for box with inverted arrow on left side
88870
88871 render.shapes().inv_trapezoid = inv_trapezoid; // Add custom shape for box with inverted arrow on right side
88872
88873 render.shapes().rect_right_inv_arrow = rect_right_inv_arrow;
88874}
88875
88876function insertPolygonShape(parent, w, h, points) {
88877 return parent.insert('polygon', ':first-child').attr('points', points.map(function (d) {
88878 return d.x + ',' + d.y;
88879 }).join(' ')).attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');
88880}
88881
88882/* harmony default export */ __webpack_exports__["default"] = ({
88883 addToRender: addToRender
88884});
88885
88886/***/ }),
88887
88888/***/ "./src/diagrams/flowchart/flowDb.js":
88889/*!******************************************!*\
88890 !*** ./src/diagrams/flowchart/flowDb.js ***!
88891 \******************************************/
88892/*! exports provided: addVertex, addSingleLink, addLink, updateLinkInterpolate, updateLink, addClass, setDirection, setClass, setLink, getTooltip, setClickEvent, bindFunctions, getDirection, getVertices, getEdges, getClasses, clear, defaultStyle, addSubGraph, getDepthFirstPos, indexNodes, getSubGraphs, firstGraph, default */
88893/***/ (function(module, __webpack_exports__, __webpack_require__) {
88894
88895"use strict";
88896__webpack_require__.r(__webpack_exports__);
88897/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertex", function() { return addVertex; });
88898/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSingleLink", function() { return addSingleLink; });
88899/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addLink", function() { return addLink; });
88900/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLinkInterpolate", function() { return updateLinkInterpolate; });
88901/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateLink", function() { return updateLink; });
88902/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; });
88903/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
88904/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
88905/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
88906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTooltip", function() { return getTooltip; });
88907/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
88908/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
88909/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
88910/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getVertices", function() { return getVertices; });
88911/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getEdges", function() { return getEdges; });
88912/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
88913/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
88914/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "defaultStyle", function() { return defaultStyle; });
88915/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSubGraph", function() { return addSubGraph; });
88916/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDepthFirstPos", function() { return getDepthFirstPos; });
88917/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexNodes", function() { return indexNodes; });
88918/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSubGraphs", function() { return getSubGraphs; });
88919/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "firstGraph", function() { return firstGraph; });
88920/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
88921/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
88922/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
88923/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js");
88924function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
88925
88926
88927
88928
88929 // const MERMAID_DOM_ID_PREFIX = 'mermaid-dom-id-';
88930
88931var MERMAID_DOM_ID_PREFIX = '';
88932var config = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])();
88933var vertices = {};
88934var edges = [];
88935var classes = [];
88936var subGraphs = [];
88937var subGraphLookup = {};
88938var tooltips = {};
88939var subCount = 0;
88940var firstGraphFlag = true;
88941var direction; // Functions to be run after graph rendering
88942
88943var funs = [];
88944/**
88945 * Function called by parser when a node definition has been found
88946 * @param id
88947 * @param text
88948 * @param type
88949 * @param style
88950 * @param classes
88951 */
88952
88953var addVertex = function addVertex(_id, text, type, style, classes) {
88954 var txt;
88955 var id = _id;
88956
88957 if (typeof id === 'undefined') {
88958 return;
88959 }
88960
88961 if (id.trim().length === 0) {
88962 return;
88963 }
88964
88965 if (id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
88966
88967 if (typeof vertices[id] === 'undefined') {
88968 vertices[id] = {
88969 id: id,
88970 styles: [],
88971 classes: []
88972 };
88973 }
88974
88975 if (typeof text !== 'undefined') {
88976 txt = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].sanitize(text.trim(), config); // strip quotes if string starts and ends with a quote
88977
88978 if (txt[0] === '"' && txt[txt.length - 1] === '"') {
88979 txt = txt.substring(1, txt.length - 1);
88980 }
88981
88982 vertices[id].text = txt;
88983 } else {
88984 if (!vertices[id].text) {
88985 vertices[id].text = _id;
88986 }
88987 }
88988
88989 if (typeof type !== 'undefined') {
88990 vertices[id].type = type;
88991 }
88992
88993 if (typeof style !== 'undefined') {
88994 if (style !== null) {
88995 style.forEach(function (s) {
88996 vertices[id].styles.push(s);
88997 });
88998 }
88999 }
89000
89001 if (typeof classes !== 'undefined') {
89002 if (classes !== null) {
89003 classes.forEach(function (s) {
89004 vertices[id].classes.push(s);
89005 });
89006 }
89007 }
89008};
89009/**
89010 * Function called by parser when a link/edge definition has been found
89011 * @param start
89012 * @param end
89013 * @param type
89014 * @param linktext
89015 */
89016
89017var addSingleLink = function addSingleLink(_start, _end, type, linktext) {
89018 var start = _start;
89019 var end = _end;
89020 if (start[0].match(/\d/)) start = MERMAID_DOM_ID_PREFIX + start;
89021 if (end[0].match(/\d/)) end = MERMAID_DOM_ID_PREFIX + end;
89022 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].info('Got edge...', start, end);
89023 var edge = {
89024 start: start,
89025 end: end,
89026 type: undefined,
89027 text: ''
89028 };
89029 linktext = type.text;
89030
89031 if (typeof linktext !== 'undefined') {
89032 edge.text = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].sanitize(linktext.trim(), config); // strip quotes if string starts and exnds with a quote
89033
89034 if (edge.text[0] === '"' && edge.text[edge.text.length - 1] === '"') {
89035 edge.text = edge.text.substring(1, edge.text.length - 1);
89036 }
89037 }
89038
89039 if (typeof type !== 'undefined') {
89040 edge.type = type.type;
89041 edge.stroke = type.stroke;
89042 }
89043
89044 edges.push(edge);
89045};
89046var addLink = function addLink(_start, _end, type, linktext) {
89047 var i, j;
89048
89049 for (i = 0; i < _start.length; i++) {
89050 for (j = 0; j < _end.length; j++) {
89051 addSingleLink(_start[i], _end[j], type, linktext);
89052 }
89053 }
89054};
89055/**
89056 * Updates a link's line interpolation algorithm
89057 * @param pos
89058 * @param interpolate
89059 */
89060
89061var updateLinkInterpolate = function updateLinkInterpolate(positions, interp) {
89062 positions.forEach(function (pos) {
89063 if (pos === 'default') {
89064 edges.defaultInterpolate = interp;
89065 } else {
89066 edges[pos].interpolate = interp;
89067 }
89068 });
89069};
89070/**
89071 * Updates a link with a style
89072 * @param pos
89073 * @param style
89074 */
89075
89076var updateLink = function updateLink(positions, style) {
89077 positions.forEach(function (pos) {
89078 if (pos === 'default') {
89079 edges.defaultStyle = style;
89080 } else {
89081 if (_utils__WEBPACK_IMPORTED_MODULE_2__["default"].isSubstringInArray('fill', style) === -1) {
89082 style.push('fill:none');
89083 }
89084
89085 edges[pos].style = style;
89086 }
89087 });
89088};
89089var addClass = function addClass(id, style) {
89090 if (typeof classes[id] === 'undefined') {
89091 classes[id] = {
89092 id: id,
89093 styles: []
89094 };
89095 }
89096
89097 if (typeof style !== 'undefined') {
89098 if (style !== null) {
89099 style.forEach(function (s) {
89100 classes[id].styles.push(s);
89101 });
89102 }
89103 }
89104};
89105/**
89106 * Called by parser when a graph definition is found, stores the direction of the chart.
89107 * @param dir
89108 */
89109
89110var setDirection = function setDirection(dir) {
89111 direction = dir;
89112
89113 if (direction.match(/.*</)) {
89114 direction = 'RL';
89115 }
89116
89117 if (direction.match(/.*\^/)) {
89118 direction = 'BT';
89119 }
89120
89121 if (direction.match(/.*>/)) {
89122 direction = 'LR';
89123 }
89124
89125 if (direction.match(/.*v/)) {
89126 direction = 'TB';
89127 }
89128};
89129/**
89130 * Called by parser when a special node is found, e.g. a clickable element.
89131 * @param ids Comma separated list of ids
89132 * @param className Class to add
89133 */
89134
89135var setClass = function setClass(ids, className) {
89136 ids.split(',').forEach(function (_id) {
89137 var id = _id;
89138 if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
89139
89140 if (typeof vertices[id] !== 'undefined') {
89141 vertices[id].classes.push(className);
89142 }
89143
89144 if (typeof subGraphLookup[id] !== 'undefined') {
89145 subGraphLookup[id].classes.push(className);
89146 }
89147 });
89148};
89149
89150var setTooltip = function setTooltip(ids, tooltip) {
89151 ids.split(',').forEach(function (id) {
89152 if (typeof tooltip !== 'undefined') {
89153 tooltips[id] = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].sanitize(tooltip, config);
89154 }
89155 });
89156};
89157
89158var setClickFun = function setClickFun(_id, functionName) {
89159 var id = _id;
89160 if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
89161
89162 if (config.securityLevel !== 'loose') {
89163 return;
89164 }
89165
89166 if (typeof functionName === 'undefined') {
89167 return;
89168 }
89169
89170 if (typeof vertices[id] !== 'undefined') {
89171 funs.push(function () {
89172 var elem = document.querySelector("[id=\"".concat(id, "\"]"));
89173
89174 if (elem !== null) {
89175 elem.addEventListener('click', function () {
89176 window[functionName](id);
89177 }, false);
89178 }
89179 });
89180 }
89181};
89182/**
89183 * Called by parser when a link is found. Adds the URL to the vertex data.
89184 * @param ids Comma separated list of ids
89185 * @param linkStr URL to create a link for
89186 * @param tooltip Tooltip for the clickable element
89187 */
89188
89189
89190var setLink = function setLink(ids, linkStr, tooltip) {
89191 ids.split(',').forEach(function (_id) {
89192 var id = _id;
89193 if (_id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
89194
89195 if (typeof vertices[id] !== 'undefined') {
89196 vertices[id].link = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].formatUrl(linkStr, config);
89197 }
89198 });
89199 setTooltip(ids, tooltip);
89200 setClass(ids, 'clickable');
89201};
89202var getTooltip = function getTooltip(id) {
89203 return tooltips[id];
89204};
89205/**
89206 * Called by parser when a click definition is found. Registers an event handler.
89207 * @param ids Comma separated list of ids
89208 * @param functionName Function to be called on click
89209 * @param tooltip Tooltip for the clickable element
89210 */
89211
89212var setClickEvent = function setClickEvent(ids, functionName, tooltip) {
89213 ids.split(',').forEach(function (id) {
89214 setClickFun(id, functionName);
89215 });
89216 setTooltip(ids, tooltip);
89217 setClass(ids, 'clickable');
89218};
89219var bindFunctions = function bindFunctions(element) {
89220 funs.forEach(function (fun) {
89221 fun(element);
89222 });
89223};
89224var getDirection = function getDirection() {
89225 return direction.trim();
89226};
89227/**
89228 * Retrieval function for fetching the found nodes after parsing has completed.
89229 * @returns {{}|*|vertices}
89230 */
89231
89232var getVertices = function getVertices() {
89233 return vertices;
89234};
89235/**
89236 * Retrieval function for fetching the found links after parsing has completed.
89237 * @returns {{}|*|edges}
89238 */
89239
89240var getEdges = function getEdges() {
89241 return edges;
89242};
89243/**
89244 * Retrieval function for fetching the found class definitions after parsing has completed.
89245 * @returns {{}|*|classes}
89246 */
89247
89248var getClasses = function getClasses() {
89249 return classes;
89250};
89251
89252var setupToolTips = function setupToolTips(element) {
89253 var tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('.mermaidTooltip');
89254
89255 if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
89256 tooltipElem = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);
89257 }
89258
89259 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"](element).select('svg');
89260 var nodes = svg.selectAll('g.node');
89261 nodes.on('mouseover', function () {
89262 var el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
89263 var title = el.attr('title'); // Dont try to draw a tooltip if no data is provided
89264
89265 if (title === null) {
89266 return;
89267 }
89268
89269 var rect = this.getBoundingClientRect();
89270 tooltipElem.transition().duration(200).style('opacity', '.9');
89271 tooltipElem.html(el.attr('title')).style('left', rect.left + (rect.right - rect.left) / 2 + 'px').style('top', rect.top - 14 + document.body.scrollTop + 'px');
89272 el.classed('hover', true);
89273 }).on('mouseout', function () {
89274 tooltipElem.transition().duration(500).style('opacity', 0);
89275 var el = d3__WEBPACK_IMPORTED_MODULE_0__["select"](this);
89276 el.classed('hover', false);
89277 });
89278};
89279
89280funs.push(setupToolTips);
89281/**
89282 * Clears the internal graph db so that a new graph can be parsed.
89283 */
89284
89285var clear = function clear() {
89286 vertices = {};
89287 classes = {};
89288 edges = [];
89289 funs = [];
89290 funs.push(setupToolTips);
89291 subGraphs = [];
89292 subGraphLookup = {};
89293 subCount = 0;
89294 tooltips = [];
89295 firstGraphFlag = true;
89296};
89297/**
89298 *
89299 * @returns {string}
89300 */
89301
89302var defaultStyle = function defaultStyle() {
89303 return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';
89304};
89305/**
89306 * Clears the internal graph db so that a new graph can be parsed.
89307 */
89308
89309var addSubGraph = function addSubGraph(_id, list, _title) {
89310 var id = _id;
89311 var title = _title;
89312
89313 if (_id === _title && _title.match(/\s/)) {
89314 id = undefined;
89315 }
89316
89317 function uniq(a) {
89318 var prims = {
89319 boolean: {},
89320 number: {},
89321 string: {}
89322 };
89323 var objs = [];
89324 return a.filter(function (item) {
89325 var type = _typeof(item);
89326
89327 if (item.trim() === '') {
89328 return false;
89329 }
89330
89331 if (type in prims) {
89332 return prims[type].hasOwnProperty(item) ? false : prims[type][item] = true; // eslint-disable-line
89333 } else {
89334 return objs.indexOf(item) >= 0 ? false : objs.push(item);
89335 }
89336 });
89337 }
89338
89339 var nodeList = [];
89340 nodeList = uniq(nodeList.concat.apply(nodeList, list));
89341
89342 for (var i = 0; i < nodeList.length; i++) {
89343 if (nodeList[i][0].match(/\d/)) nodeList[i] = MERMAID_DOM_ID_PREFIX + nodeList[i];
89344 }
89345
89346 id = id || 'subGraph' + subCount;
89347 if (id[0].match(/\d/)) id = MERMAID_DOM_ID_PREFIX + id;
89348 title = title || '';
89349 title = _utils__WEBPACK_IMPORTED_MODULE_2__["default"].sanitize(title, config);
89350 subCount = subCount + 1;
89351 var subGraph = {
89352 id: id,
89353 nodes: nodeList,
89354 title: title.trim(),
89355 classes: []
89356 };
89357 subGraphs.push(subGraph);
89358 subGraphLookup[id] = subGraph;
89359 return id;
89360};
89361
89362var getPosForId = function getPosForId(id) {
89363 for (var i = 0; i < subGraphs.length; i++) {
89364 if (subGraphs[i].id === id) {
89365 return i;
89366 }
89367 }
89368
89369 return -1;
89370};
89371
89372var secCount = -1;
89373var posCrossRef = [];
89374
89375var indexNodes2 = function indexNodes2(id, pos) {
89376 var nodes = subGraphs[pos].nodes;
89377 secCount = secCount + 1;
89378
89379 if (secCount > 2000) {
89380 return;
89381 }
89382
89383 posCrossRef[secCount] = pos; // Check if match
89384
89385 if (subGraphs[pos].id === id) {
89386 return {
89387 result: true,
89388 count: 0
89389 };
89390 }
89391
89392 var count = 0;
89393 var posCount = 1;
89394
89395 while (count < nodes.length) {
89396 var childPos = getPosForId(nodes[count]); // Ignore regular nodes (pos will be -1)
89397
89398 if (childPos >= 0) {
89399 var res = indexNodes2(id, childPos);
89400
89401 if (res.result) {
89402 return {
89403 result: true,
89404 count: posCount + res.count
89405 };
89406 } else {
89407 posCount = posCount + res.count;
89408 }
89409 }
89410
89411 count = count + 1;
89412 }
89413
89414 return {
89415 result: false,
89416 count: posCount
89417 };
89418};
89419
89420var getDepthFirstPos = function getDepthFirstPos(pos) {
89421 return posCrossRef[pos];
89422};
89423var indexNodes = function indexNodes() {
89424 secCount = -1;
89425
89426 if (subGraphs.length > 0) {
89427 indexNodes2('none', subGraphs.length - 1, 0);
89428 }
89429};
89430var getSubGraphs = function getSubGraphs() {
89431 return subGraphs;
89432};
89433var firstGraph = function firstGraph() {
89434 if (firstGraphFlag) {
89435 firstGraphFlag = false;
89436 return true;
89437 }
89438
89439 return false;
89440};
89441
89442var destructStartLink = function destructStartLink(_str) {
89443 var str = _str.trim();
89444
89445 switch (str) {
89446 case '<--':
89447 return {
89448 type: 'arrow',
89449 stroke: 'normal'
89450 };
89451
89452 case 'x--':
89453 return {
89454 type: 'arrow_cross',
89455 stroke: 'normal'
89456 };
89457
89458 case 'o--':
89459 return {
89460 type: 'arrow_circle',
89461 stroke: 'normal'
89462 };
89463
89464 case '<-.':
89465 return {
89466 type: 'arrow',
89467 stroke: 'dotted'
89468 };
89469
89470 case 'x-.':
89471 return {
89472 type: 'arrow_cross',
89473 stroke: 'dotted'
89474 };
89475
89476 case 'o-.':
89477 return {
89478 type: 'arrow_circle',
89479 stroke: 'dotted'
89480 };
89481
89482 case '<==':
89483 return {
89484 type: 'arrow',
89485 stroke: 'thick'
89486 };
89487
89488 case 'x==':
89489 return {
89490 type: 'arrow_cross',
89491 stroke: 'thick'
89492 };
89493
89494 case 'o==':
89495 return {
89496 type: 'arrow_circle',
89497 stroke: 'thick'
89498 };
89499
89500 case '--':
89501 return {
89502 type: 'arrow_open',
89503 stroke: 'normal'
89504 };
89505
89506 case '==':
89507 return {
89508 type: 'arrow_open',
89509 stroke: 'thick'
89510 };
89511
89512 case '-.':
89513 return {
89514 type: 'arrow_open',
89515 stroke: 'dotted'
89516 };
89517 }
89518};
89519
89520var destructEndLink = function destructEndLink(_str) {
89521 var str = _str.trim();
89522
89523 switch (str) {
89524 case '--x':
89525 return {
89526 type: 'arrow_cross',
89527 stroke: 'normal'
89528 };
89529
89530 case '-->':
89531 return {
89532 type: 'arrow',
89533 stroke: 'normal'
89534 };
89535
89536 case '<-->':
89537 return {
89538 type: 'double_arrow_point',
89539 stroke: 'normal'
89540 };
89541
89542 case 'x--x':
89543 return {
89544 type: 'double_arrow_cross',
89545 stroke: 'normal'
89546 };
89547
89548 case 'o--o':
89549 return {
89550 type: 'double_arrow_circle',
89551 stroke: 'normal'
89552 };
89553
89554 case 'o.-o':
89555 return {
89556 type: 'double_arrow_circle',
89557 stroke: 'dotted'
89558 };
89559
89560 case '<==>':
89561 return {
89562 type: 'double_arrow_point',
89563 stroke: 'thick'
89564 };
89565
89566 case 'o==o':
89567 return {
89568 type: 'double_arrow_circle',
89569 stroke: 'thick'
89570 };
89571
89572 case 'x==x':
89573 return {
89574 type: 'double_arrow_cross',
89575 stroke: 'thick'
89576 };
89577
89578 case 'x.-x':
89579 return {
89580 type: 'double_arrow_cross',
89581 stroke: 'dotted'
89582 };
89583
89584 case 'x-.-x':
89585 return {
89586 type: 'double_arrow_cross',
89587 stroke: 'dotted'
89588 };
89589
89590 case '<.->':
89591 return {
89592 type: 'double_arrow_point',
89593 stroke: 'dotted'
89594 };
89595
89596 case '<-.->':
89597 return {
89598 type: 'double_arrow_point',
89599 stroke: 'dotted'
89600 };
89601
89602 case 'o-.-o':
89603 return {
89604 type: 'double_arrow_circle',
89605 stroke: 'dotted'
89606 };
89607
89608 case '--o':
89609 return {
89610 type: 'arrow_circle',
89611 stroke: 'normal'
89612 };
89613
89614 case '---':
89615 return {
89616 type: 'arrow_open',
89617 stroke: 'normal'
89618 };
89619
89620 case '-.-x':
89621 return {
89622 type: 'arrow_cross',
89623 stroke: 'dotted'
89624 };
89625
89626 case '-.->':
89627 return {
89628 type: 'arrow',
89629 stroke: 'dotted'
89630 };
89631
89632 case '-.-o':
89633 return {
89634 type: 'arrow_circle',
89635 stroke: 'dotted'
89636 };
89637
89638 case '-.-':
89639 return {
89640 type: 'arrow_open',
89641 stroke: 'dotted'
89642 };
89643
89644 case '.-x':
89645 return {
89646 type: 'arrow_cross',
89647 stroke: 'dotted'
89648 };
89649
89650 case '.->':
89651 return {
89652 type: 'arrow',
89653 stroke: 'dotted'
89654 };
89655
89656 case '.-o':
89657 return {
89658 type: 'arrow_circle',
89659 stroke: 'dotted'
89660 };
89661
89662 case '.-':
89663 return {
89664 type: 'arrow_open',
89665 stroke: 'dotted'
89666 };
89667
89668 case '==x':
89669 return {
89670 type: 'arrow_cross',
89671 stroke: 'thick'
89672 };
89673
89674 case '==>':
89675 return {
89676 type: 'arrow',
89677 stroke: 'thick'
89678 };
89679
89680 case '==o':
89681 return {
89682 type: 'arrow_circle',
89683 stroke: 'thick'
89684 };
89685
89686 case '===':
89687 return {
89688 type: 'arrow_open',
89689 stroke: 'thick'
89690 };
89691 }
89692};
89693
89694var destructLink = function destructLink(_str, _startStr) {
89695 var info = destructEndLink(_str);
89696 var startInfo;
89697
89698 if (_startStr) {
89699 startInfo = destructStartLink(_startStr);
89700
89701 if (startInfo.stroke !== info.stroke) {
89702 return {
89703 type: 'INVALID',
89704 stroke: 'INVALID'
89705 };
89706 }
89707
89708 if (startInfo.type === 'arrow_open') {
89709 // -- xyz --> - take arrow type form ending
89710 startInfo.type = info.type;
89711 } else {
89712 // x-- xyz --> - not supported
89713 if (startInfo.type !== info.type) return {
89714 type: 'INVALID',
89715 stroke: 'INVALID'
89716 };
89717 startInfo.type = 'double_' + startInfo.type;
89718 }
89719
89720 if (startInfo.type === 'double_arrow') {
89721 startInfo.type = 'double_arrow_point';
89722 }
89723
89724 return startInfo;
89725 }
89726
89727 return info;
89728};
89729
89730/* harmony default export */ __webpack_exports__["default"] = ({
89731 addVertex: addVertex,
89732 addLink: addLink,
89733 updateLinkInterpolate: updateLinkInterpolate,
89734 updateLink: updateLink,
89735 addClass: addClass,
89736 setDirection: setDirection,
89737 setClass: setClass,
89738 getTooltip: getTooltip,
89739 setClickEvent: setClickEvent,
89740 setLink: setLink,
89741 bindFunctions: bindFunctions,
89742 getDirection: getDirection,
89743 getVertices: getVertices,
89744 getEdges: getEdges,
89745 getClasses: getClasses,
89746 clear: clear,
89747 defaultStyle: defaultStyle,
89748 addSubGraph: addSubGraph,
89749 getDepthFirstPos: getDepthFirstPos,
89750 indexNodes: indexNodes,
89751 getSubGraphs: getSubGraphs,
89752 destructLink: destructLink,
89753 lex: {
89754 firstGraph: firstGraph
89755 }
89756});
89757
89758/***/ }),
89759
89760/***/ "./src/diagrams/flowchart/flowRenderer.js":
89761/*!************************************************!*\
89762 !*** ./src/diagrams/flowchart/flowRenderer.js ***!
89763 \************************************************/
89764/*! exports provided: setConf, addVertices, addEdges, getClasses, draw, default */
89765/***/ (function(module, __webpack_exports__, __webpack_require__) {
89766
89767"use strict";
89768__webpack_require__.r(__webpack_exports__);
89769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
89770/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addVertices", function() { return addVertices; });
89771/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addEdges", function() { return addEdges; });
89772/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClasses", function() { return getClasses; });
89773/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
89774/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js");
89775/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_0__);
89776/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
89777/* harmony import */ var _flowDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flowDb */ "./src/diagrams/flowchart/flowDb.js");
89778/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/flow */ "./src/diagrams/flowchart/parser/flow.jison");
89779/* harmony import */ var _parser_flow__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_flow__WEBPACK_IMPORTED_MODULE_3__);
89780/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
89781/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dagre-d3 */ "./node_modules/dagre-d3/index.js");
89782/* harmony import */ var dagre_d3__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(dagre_d3__WEBPACK_IMPORTED_MODULE_5__);
89783/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dagre-d3/lib/label/add-html-label.js */ "./node_modules/dagre-d3/lib/label/add-html-label.js");
89784/* harmony import */ var dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6__);
89785/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
89786/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
89787/* harmony import */ var _flowChartShapes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./flowChartShapes */ "./src/diagrams/flowchart/flowChartShapes.js");
89788
89789
89790
89791
89792
89793var newDagreD3 = true;
89794 // const newDagreD3 = false;
89795
89796
89797
89798
89799
89800var conf = {};
89801var setConf = function setConf(cnf) {
89802 var keys = Object.keys(cnf);
89803
89804 for (var i = 0; i < keys.length; i++) {
89805 conf[keys[i]] = cnf[keys[i]];
89806 }
89807};
89808/**
89809 * Function that adds the vertices found in the graph definition to the graph to be rendered.
89810 * @param vert Object containing the vertices.
89811 * @param g The graph that is to be drawn.
89812 */
89813
89814var addVertices = function addVertices(vert, g, svgId) {
89815 var svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"]("[id=\"".concat(svgId, "\"]"));
89816 var keys = Object.keys(vert);
89817
89818 var styleFromStyleArr = function styleFromStyleArr(styleStr, arr, _ref) {
89819 var label = _ref.label;
89820
89821 if (!label) {
89822 // Create a compound style definition from the style definitions found for the node in the graph definition
89823 for (var i = 0; i < arr.length; i++) {
89824 if (typeof arr[i] !== 'undefined') {
89825 styleStr = styleStr + arr[i] + ';';
89826 }
89827 }
89828 } else {
89829 // create the style definition for the text, if property is a text-property
89830 for (var _i = 0; _i < arr.length; _i++) {
89831 if (typeof arr[_i] !== 'undefined') {
89832 if (arr[_i].match('^color:|^text-align:')) styleStr = styleStr + arr[_i] + ';';
89833 }
89834 }
89835 }
89836
89837 return styleStr;
89838 }; // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition
89839
89840
89841 keys.forEach(function (id) {
89842 var vertex = vert[id];
89843 /**
89844 * Variable for storing the classes for the vertex
89845 * @type {string}
89846 */
89847
89848 var classStr = '';
89849
89850 if (vertex.classes.length > 0) {
89851 classStr = vertex.classes.join(' ');
89852 }
89853 /**
89854 * Variable for storing the extracted style for the vertex
89855 * @type {string}
89856 */
89857
89858
89859 var style = ''; // Create a compound style definition from the style definitions found for the node in the graph definition
89860
89861 style = styleFromStyleArr(style, vertex.styles, {
89862 label: false
89863 });
89864 var labelStyle = '';
89865 labelStyle = styleFromStyleArr(labelStyle, vertex.styles, {
89866 label: true
89867 }); // Use vertex id as text in the box if no text is provided by the graph definition
89868
89869 var vertexText = vertex.text !== undefined ? vertex.text : vertex.id; // We create a SVG label, either by delegating to addHtmlLabel or manually
89870
89871 var vertexNode;
89872
89873 if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
89874 // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?
89875 var node = {
89876 label: vertexText.replace(/fa[lrsb]?:fa-[\w-]+/g, function (s) {
89877 return "<i class='".concat(s.replace(':', ' '), "'></i>");
89878 })
89879 };
89880 vertexNode = dagre_d3_lib_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_6___default()(svg, node).node();
89881 vertexNode.parentNode.removeChild(vertexNode);
89882 } else {
89883 var svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
89884 var rows = vertexText.split(/<br[/]{0,1}>/);
89885
89886 for (var j = 0; j < rows.length; j++) {
89887 var tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');
89888 tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
89889 tspan.setAttribute('dy', '1em');
89890 tspan.setAttribute('x', '1');
89891 tspan.textContent = rows[j];
89892 svgLabel.appendChild(tspan);
89893 }
89894
89895 vertexNode = svgLabel;
89896 }
89897
89898 var radious = 0;
89899 var _shape = ''; // Set the shape based parameters
89900
89901 switch (vertex.type) {
89902 case 'round':
89903 radious = 5;
89904 _shape = 'rect';
89905 break;
89906
89907 case 'square':
89908 _shape = 'rect';
89909 break;
89910
89911 case 'diamond':
89912 _shape = 'question';
89913 break;
89914
89915 case 'hexagon':
89916 _shape = 'hexagon';
89917 break;
89918
89919 case 'odd':
89920 _shape = 'rect_left_inv_arrow';
89921 break;
89922
89923 case 'lean_right':
89924 _shape = 'lean_right';
89925 break;
89926
89927 case 'lean_left':
89928 _shape = 'lean_left';
89929 break;
89930
89931 case 'trapezoid':
89932 _shape = 'trapezoid';
89933 break;
89934
89935 case 'inv_trapezoid':
89936 _shape = 'inv_trapezoid';
89937 break;
89938
89939 case 'odd_right':
89940 _shape = 'rect_left_inv_arrow';
89941 break;
89942
89943 case 'circle':
89944 _shape = 'circle';
89945 break;
89946
89947 case 'ellipse':
89948 _shape = 'ellipse';
89949 break;
89950
89951 case 'stadium':
89952 _shape = 'stadium';
89953 break;
89954
89955 case 'cylinder':
89956 _shape = 'cylinder';
89957 break;
89958
89959 case 'group':
89960 _shape = 'rect';
89961 break;
89962
89963 default:
89964 _shape = 'rect';
89965 } // Add the node
89966
89967
89968 g.setNode(vertex.id, {
89969 labelType: 'svg',
89970 labelStyle: labelStyle,
89971 shape: _shape,
89972 label: vertexNode,
89973 rx: radious,
89974 ry: radious,
89975 class: classStr,
89976 style: style,
89977 id: vertex.id
89978 });
89979 });
89980};
89981/**
89982 * Add edges to graph based on parsed graph defninition
89983 * @param {Object} edges The edges to add to the graph
89984 * @param {Object} g The graph object
89985 */
89986
89987var addEdges = function addEdges(edges, g) {
89988 var cnt = 0;
89989 var defaultStyle;
89990
89991 if (typeof edges.defaultStyle !== 'undefined') {
89992 defaultStyle = edges.defaultStyle.toString().replace(/,/g, ';');
89993 }
89994
89995 edges.forEach(function (edge) {
89996 cnt++;
89997 var edgeData = {}; // Set link type for rendering
89998
89999 if (edge.type === 'arrow_open') {
90000 edgeData.arrowhead = 'none';
90001 } else {
90002 edgeData.arrowhead = 'normal';
90003 }
90004
90005 var style = '';
90006
90007 if (typeof edge.style !== 'undefined') {
90008 edge.style.forEach(function (s) {
90009 style = style + s + ';';
90010 });
90011 } else {
90012 switch (edge.stroke) {
90013 case 'normal':
90014 style = 'fill:none';
90015
90016 if (typeof defaultStyle !== 'undefined') {
90017 style = defaultStyle;
90018 }
90019
90020 break;
90021
90022 case 'dotted':
90023 style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';
90024 break;
90025
90026 case 'thick':
90027 style = ' stroke-width: 3.5px;fill:none';
90028 break;
90029 }
90030 }
90031
90032 edgeData.style = style;
90033
90034 if (typeof edge.interpolate !== 'undefined') {
90035 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
90036 } else if (typeof edges.defaultInterpolate !== 'undefined') {
90037 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
90038 } else {
90039 edgeData.curve = Object(_utils__WEBPACK_IMPORTED_MODULE_8__["interpolateToCurve"])(conf.curve, d3__WEBPACK_IMPORTED_MODULE_1__["curveLinear"]);
90040 }
90041
90042 if (typeof edge.text === 'undefined') {
90043 if (typeof edge.style !== 'undefined') {
90044 edgeData.arrowheadStyle = 'fill: #333';
90045 }
90046 } else {
90047 edgeData.arrowheadStyle = 'fill: #333';
90048 edgeData.labelpos = 'c';
90049
90050 if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart.htmlLabels) {
90051 edgeData.labelType = 'html';
90052 edgeData.label = '<span class="edgeLabel">' + edge.text + '</span>';
90053 } else {
90054 edgeData.labelType = 'text';
90055 edgeData.label = edge.text.replace(/<br\s*\/?>/g, '\n');
90056
90057 if (typeof edge.style === 'undefined') {
90058 edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';
90059 }
90060 }
90061 } // Add the edge to the graph
90062
90063
90064 g.setEdge(edge.start, edge.end, edgeData, cnt);
90065 });
90066};
90067/**
90068 * Returns the all the styles from classDef statements in the graph definition.
90069 * @returns {object} classDef styles
90070 */
90071
90072var getClasses = function getClasses(text) {
90073 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Extracting classes');
90074 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
90075 var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
90076 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
90077
90078 parser.parse(text);
90079 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getClasses();
90080};
90081/**
90082 * Draws a flowchart in the tag with id: id based on the graph definition in text.
90083 * @param text
90084 * @param id
90085 */
90086
90087var draw = function draw(text, id) {
90088 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].info('Drawing flowchart');
90089 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].clear();
90090 var parser = _parser_flow__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
90091 parser.yy = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"]; // Parse the graph definition
90092
90093 try {
90094 parser.parse(text);
90095 } catch (err) {
90096 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug('Parsing failed');
90097 } // Fetch the default direction, use TD if none was found
90098
90099
90100 var dir = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
90101
90102 if (typeof dir === 'undefined') {
90103 dir = 'TD';
90104 } // Create the input mermaid.graph
90105
90106
90107 var g; // Todo remove newDagreD3 when properly verified
90108
90109 if (newDagreD3) {
90110 g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
90111 multigraph: true,
90112 compound: true
90113 }).setGraph({
90114 rankdir: dir,
90115 marginx: 8,
90116 marginy: 8
90117 }).setDefaultEdgeLabel(function () {
90118 return {};
90119 });
90120 } else {
90121 g = new graphlib__WEBPACK_IMPORTED_MODULE_0___default.a.Graph({
90122 multigraph: true,
90123 compound: true
90124 }).setGraph({
90125 rankdir: dir,
90126 marginx: 20,
90127 marginy: 20
90128 }).setDefaultEdgeLabel(function () {
90129 return {};
90130 });
90131 }
90132
90133 var subG;
90134 var subGraphs = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getSubGraphs();
90135
90136 for (var _i2 = subGraphs.length - 1; _i2 >= 0; _i2--) {
90137 subG = subGraphs[_i2];
90138 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
90139 } // Fetch the verices/nodes and edges/links from the parsed graph definition
90140
90141
90142 var vert = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getVertices();
90143 var edges = _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getEdges();
90144 var i = 0;
90145
90146 for (i = subGraphs.length - 1; i >= 0; i--) {
90147 subG = subGraphs[i];
90148 d3__WEBPACK_IMPORTED_MODULE_1__["selectAll"]('cluster').append('text');
90149
90150 for (var j = 0; j < subG.nodes.length; j++) {
90151 g.setParent(subG.nodes[j], subG.id);
90152 }
90153 }
90154
90155 addVertices(vert, g, id);
90156 addEdges(edges, g); // Create the renderer
90157
90158 var Render = dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.render;
90159 var render = new Render(); // Add custom shapes
90160
90161 _flowChartShapes__WEBPACK_IMPORTED_MODULE_9__["default"].addToRender(render); // Add our custom arrow - an empty arrowhead
90162
90163 render.arrows().none = function normal(parent, id, edge, type) {
90164 var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
90165 var path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');
90166 dagre_d3__WEBPACK_IMPORTED_MODULE_5___default.a.util.applyStyle(path, edge[type + 'Style']);
90167 }; // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.
90168
90169
90170 render.arrows().normal = function normal(parent, id) {
90171 var marker = parent.append('marker').attr('id', id).attr('viewBox', '0 0 10 10').attr('refX', 9).attr('refY', 5).attr('markerUnits', 'strokeWidth').attr('markerWidth', 8).attr('markerHeight', 6).attr('orient', 'auto');
90172 marker.append('path').attr('d', 'M 0 0 L 10 5 L 0 10 z').attr('class', 'arrowheadPath').style('stroke-width', 1).style('stroke-dasharray', '1,0');
90173 }; // Set up an SVG group so that we can translate the final graph.
90174
90175
90176 var svg = d3__WEBPACK_IMPORTED_MODULE_1__["select"]("[id=\"".concat(id, "\"]")); // Run the renderer. This is what draws the final graph.
90177
90178 var element = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' g');
90179 render(element, g);
90180 element.selectAll('g.node').attr('title', function () {
90181 return _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].getTooltip(this.id);
90182 });
90183 var conf = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().flowchart;
90184 var padding = 8; // Todo remove newDagreD3 when properly verified
90185
90186 if (newDagreD3) {
90187 var svgBounds = svg.node().getBBox();
90188 var width = svgBounds.width + padding * 2;
90189 var height = svgBounds.height + padding * 2;
90190 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug("new ViewBox 0 0 ".concat(width, " ").concat(height), "translate(".concat(padding - g._label.marginx, ", ").concat(padding - g._label.marginy, ")"));
90191
90192 if (conf.useMaxWidth) {
90193 svg.attr('width', '100%');
90194 svg.attr('style', "max-width: ".concat(width, "px;"));
90195 } else {
90196 svg.attr('height', height);
90197 svg.attr('width', width);
90198 }
90199
90200 svg.attr('viewBox', "0 0 ".concat(width, " ").concat(height));
90201 svg.select('g').attr('transform', "translate(".concat(padding - g._label.marginx, ", ").concat(padding - svgBounds.y, ")"));
90202 } else {
90203 var _width = g.maxX - g.minX + padding * 2;
90204
90205 var _height = g.maxY - g.minY + padding * 2;
90206
90207 if (conf.useMaxWidth) {
90208 svg.attr('width', '100%');
90209 svg.attr('style', "max-width: ".concat(_width, "px;"));
90210 } else {
90211 svg.attr('height', _height);
90212 svg.attr('width', _width);
90213 }
90214
90215 _logger__WEBPACK_IMPORTED_MODULE_7__["logger"].debug("Org ViewBox 0 0 ".concat(_width, " ").concat(_height), "translate(".concat(padding - g.minX, ", ").concat(padding - g.minY, ")\n").concat(location.href));
90216 svg.attr('viewBox', "0 0 ".concat(_width, " ").concat(_height));
90217 svg.select('g').attr('transform', "translate(".concat(padding - g.minX, ", ").concat(padding - g.minY, ")")); // svg.select('g').attr('transform', `translate(${padding - minX}, ${padding - minY})`);
90218 } // Index nodes
90219
90220
90221 _flowDb__WEBPACK_IMPORTED_MODULE_2__["default"].indexNodes('subGraph' + i); // reposition labels
90222
90223 for (i = 0; i < subGraphs.length; i++) {
90224 subG = subGraphs[i];
90225
90226 if (subG.title !== 'undefined') {
90227 var clusterRects = document.querySelectorAll('#' + id + ' [id="' + subG.id + '"] rect');
90228 var clusterEl = document.querySelectorAll('#' + id + ' [id="' + subG.id + '"]');
90229 var xPos = clusterRects[0].x.baseVal.value;
90230 var yPos = clusterRects[0].y.baseVal.value;
90231 var _width2 = clusterRects[0].width.baseVal.value;
90232 var cluster = d3__WEBPACK_IMPORTED_MODULE_1__["select"](clusterEl[0]);
90233 var te = cluster.select('.label');
90234 te.attr('transform', "translate(".concat(xPos + _width2 / 2, ", ").concat(yPos + 14, ")"));
90235 te.attr('id', id + 'Text');
90236 }
90237 } // Add label rects for non html labels
90238
90239
90240 if (!conf.htmlLabels) {
90241 var labels = document.querySelectorAll('[id="' + id + '"] .edgeLabel .label');
90242
90243 for (var k = 0; k < labels.length; k++) {
90244 var label = labels[k]; // Get dimensions of label
90245
90246 var dim = label.getBBox();
90247 var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
90248 rect.setAttribute('rx', 0);
90249 rect.setAttribute('ry', 0);
90250 rect.setAttribute('width', dim.width);
90251 rect.setAttribute('height', dim.height);
90252 rect.setAttribute('style', 'fill:#e8e8e8;');
90253 label.insertBefore(rect, label.firstChild);
90254 }
90255 } // If node has a link, wrap it in an anchor SVG object.
90256
90257
90258 var keys = Object.keys(vert);
90259 keys.forEach(function (key) {
90260 var vertex = vert[key];
90261
90262 if (vertex.link) {
90263 var node = d3__WEBPACK_IMPORTED_MODULE_1__["select"]('#' + id + ' [id="' + key + '"]');
90264
90265 if (node) {
90266 var link = document.createElementNS('http://www.w3.org/2000/svg', 'a');
90267 link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);
90268 link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');
90269 var linkNode = node.insert(function () {
90270 return link;
90271 }, ':first-child');
90272 var shape = node.select('.label-container');
90273
90274 if (shape) {
90275 linkNode.append(function () {
90276 return shape.node();
90277 });
90278 }
90279
90280 var _label = node.select('.label');
90281
90282 if (_label) {
90283 linkNode.append(function () {
90284 return _label.node();
90285 });
90286 }
90287 }
90288 }
90289 });
90290};
90291/* harmony default export */ __webpack_exports__["default"] = ({
90292 setConf: setConf,
90293 addVertices: addVertices,
90294 addEdges: addEdges,
90295 getClasses: getClasses,
90296 draw: draw
90297});
90298
90299/***/ }),
90300
90301/***/ "./src/diagrams/flowchart/parser/flow.jison":
90302/*!**************************************************!*\
90303 !*** ./src/diagrams/flowchart/parser/flow.jison ***!
90304 \**************************************************/
90305/*! no static exports found */
90306/***/ (function(module, exports, __webpack_require__) {
90307
90308/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
90309/*
90310 Returns a Parser object of the following structure:
90311
90312 Parser: {
90313 yy: {}
90314 }
90315
90316 Parser.prototype: {
90317 yy: {},
90318 trace: function(),
90319 symbols_: {associative list: name ==> number},
90320 terminals_: {associative list: number ==> name},
90321 productions_: [...],
90322 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
90323 table: [...],
90324 defaultActions: {...},
90325 parseError: function(str, hash),
90326 parse: function(input),
90327
90328 lexer: {
90329 EOF: 1,
90330 parseError: function(str, hash),
90331 setInput: function(input),
90332 input: function(),
90333 unput: function(str),
90334 more: function(),
90335 less: function(n),
90336 pastInput: function(),
90337 upcomingInput: function(),
90338 showPosition: function(),
90339 test_match: function(regex_match_array, rule_index),
90340 next: function(),
90341 lex: function(),
90342 begin: function(condition),
90343 popState: function(),
90344 _currentRules: function(),
90345 topState: function(),
90346 pushState: function(condition),
90347
90348 options: {
90349 ranges: boolean (optional: true ==> token location info will include a .range[] member)
90350 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
90351 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
90352 },
90353
90354 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
90355 rules: [...],
90356 conditions: {associative list: name ==> set},
90357 }
90358 }
90359
90360
90361 token location info (@$, _$, etc.): {
90362 first_line: n,
90363 last_line: n,
90364 first_column: n,
90365 last_column: n,
90366 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
90367 }
90368
90369
90370 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
90371 text: (matched text)
90372 token: (the produced terminal token, if any)
90373 line: (yylineno)
90374 }
90375 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
90376 loc: (yylloc)
90377 expected: (string describing the set of expected tokens)
90378 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
90379 }
90380*/
90381var parser = (function(){
90382var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,4],$V1=[1,3],$V2=[1,5],$V3=[1,8,9,10,11,26,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$V4=[2,2],$V5=[1,12],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,22],$Va=[1,46],$Vb=[1,24],$Vc=[1,25],$Vd=[1,26],$Ve=[1,27],$Vf=[1,28],$Vg=[1,40],$Vh=[1,35],$Vi=[1,37],$Vj=[1,32],$Vk=[1,36],$Vl=[1,39],$Vm=[1,43],$Vn=[1,44],$Vo=[1,45],$Vp=[1,34],$Vq=[1,38],$Vr=[1,41],$Vs=[1,42],$Vt=[1,33],$Vu=[1,51],$Vv=[1,8,9,10,11,26,30,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$Vw=[1,55],$Vx=[1,54],$Vy=[1,56],$Vz=[8,9,11,55,56],$VA=[8,9,10,11,55,56],$VB=[8,9,10,11,35,55,56],$VC=[8,9,10,11,28,34,35,37,39,41,43,45,47,48,50,55,56,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$VD=[8,9,11,34,55,56,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$VE=[34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$VF=[1,100],$VG=[1,121],$VH=[1,122],$VI=[1,123],$VJ=[1,124],$VK=[1,104],$VL=[1,95],$VM=[1,96],$VN=[1,92],$VO=[1,116],$VP=[1,117],$VQ=[1,118],$VR=[1,119],$VS=[1,120],$VT=[1,125],$VU=[1,126],$VV=[1,98],$VW=[1,106],$VX=[1,109],$VY=[1,107],$VZ=[1,108],$V_=[1,101],$V$=[1,114],$V01=[1,113],$V11=[1,97],$V21=[1,94],$V31=[1,103],$V41=[1,105],$V51=[1,110],$V61=[1,111],$V71=[1,112],$V81=[1,115],$V91=[8,9,10,11,26,30,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$Va1=[1,129],$Vb1=[1,133],$Vc1=[1,135],$Vd1=[1,136],$Ve1=[8,9,10,11,12,13,26,28,29,30,34,38,40,42,44,46,47,49,51,55,56,57,61,62,63,64,65,66,67,70,76,77,80,81,82,84,85,86,87,91,92,93,94,95,96],$Vf1=[8,9,10,11,13,34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],$Vg1=[10,77],$Vh1=[1,201],$Vi1=[1,205],$Vj1=[1,202],$Vk1=[1,199],$Vl1=[1,196],$Vm1=[1,197],$Vn1=[1,198],$Vo1=[1,200],$Vp1=[1,203],$Vq1=[1,204],$Vr1=[1,206],$Vs1=[8,9,11],$Vt1=[1,222],$Vu1=[8,9,11,77],$Vv1=[8,9,10,11,61,73,76,77,80,81,82,83,84,85,86];
90383var parser = {trace: function trace () { },
90384yy: {},
90385symbols_: {"error":2,"mermaidDoc":3,"graphConfig":4,"document":5,"line":6,"statement":7,"SEMI":8,"NEWLINE":9,"SPACE":10,"EOF":11,"GRAPH":12,"DIR":13,"FirstStmtSeperator":14,"ending":15,"endToken":16,"spaceList":17,"spaceListNewline":18,"verticeStatement":19,"separator":20,"styleStatement":21,"linkStyleStatement":22,"classDefStatement":23,"classStatement":24,"clickStatement":25,"subgraph":26,"text":27,"SQS":28,"SQE":29,"end":30,"link":31,"node":32,"vertex":33,"AMP":34,"STYLE_SEPARATOR":35,"idString":36,"PS":37,"PE":38,"(-":39,"-)":40,"STADIUMSTART":41,"STADIUMEND":42,"CYLINDERSTART":43,"CYLINDEREND":44,"DIAMOND_START":45,"DIAMOND_STOP":46,"TAGEND":47,"TRAPSTART":48,"TRAPEND":49,"INVTRAPSTART":50,"INVTRAPEND":51,"linkStatement":52,"arrowText":53,"TESTSTR":54,"START_LINK":55,"LINK":56,"PIPE":57,"textToken":58,"STR":59,"keywords":60,"STYLE":61,"LINKSTYLE":62,"CLASSDEF":63,"CLASS":64,"CLICK":65,"DOWN":66,"UP":67,"textNoTags":68,"textNoTagsToken":69,"DEFAULT":70,"stylesOpt":71,"alphaNum":72,"HEX":73,"numList":74,"INTERPOLATE":75,"NUM":76,"COMMA":77,"style":78,"styleComponent":79,"ALPHA":80,"COLON":81,"MINUS":82,"UNIT":83,"BRKT":84,"DOT":85,"PCT":86,"TAGSTART":87,"alphaNumToken":88,"idStringToken":89,"alphaNumStatement":90,"PUNCTUATION":91,"UNICODE_TEXT":92,"PLUS":93,"EQUALS":94,"MULT":95,"UNDERSCORE":96,"graphCodeTokens":97,"ARROW_CROSS":98,"ARROW_POINT":99,"ARROW_CIRCLE":100,"ARROW_OPEN":101,"QUOTE":102,"$accept":0,"$end":1},
90386terminals_: {2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",26:"subgraph",28:"SQS",29:"SQE",30:"end",34:"AMP",35:"STYLE_SEPARATOR",37:"PS",38:"PE",39:"(-",40:"-)",41:"STADIUMSTART",42:"STADIUMEND",43:"CYLINDERSTART",44:"CYLINDEREND",45:"DIAMOND_START",46:"DIAMOND_STOP",47:"TAGEND",48:"TRAPSTART",49:"TRAPEND",50:"INVTRAPSTART",51:"INVTRAPEND",54:"TESTSTR",55:"START_LINK",56:"LINK",57:"PIPE",59:"STR",61:"STYLE",62:"LINKSTYLE",63:"CLASSDEF",64:"CLASS",65:"CLICK",66:"DOWN",67:"UP",70:"DEFAULT",73:"HEX",75:"INTERPOLATE",76:"NUM",77:"COMMA",80:"ALPHA",81:"COLON",82:"MINUS",83:"UNIT",84:"BRKT",85:"DOT",86:"PCT",87:"TAGSTART",91:"PUNCTUATION",92:"UNICODE_TEXT",93:"PLUS",94:"EQUALS",95:"MULT",96:"UNDERSCORE",98:"ARROW_CROSS",99:"ARROW_POINT",100:"ARROW_CIRCLE",101:"ARROW_OPEN",102:"QUOTE"},
90387productions_: [0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,3],[15,2],[15,1],[16,1],[16,1],[16,1],[14,1],[14,1],[14,2],[18,2],[18,2],[18,1],[18,1],[17,2],[17,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[20,1],[20,1],[20,1],[19,3],[19,4],[19,2],[19,1],[32,1],[32,5],[32,3],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,1],[31,2],[31,3],[31,3],[31,1],[31,3],[52,1],[53,3],[27,1],[27,2],[27,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[68,1],[68,2],[23,5],[23,5],[24,5],[25,5],[25,7],[25,5],[25,7],[21,5],[21,5],[22,5],[22,5],[22,9],[22,9],[22,7],[22,7],[74,1],[74,3],[71,1],[71,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[69,1],[69,1],[69,1],[69,1],[36,1],[36,2],[72,1],[72,2],[90,1],[90,1],[90,1],[90,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1]],
90388performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
90389/* this == yyval */
90390
90391var $0 = $$.length - 1;
90392switch (yystate) {
90393case 2:
90394 this.$ = [];
90395break;
90396case 3:
90397
90398 if($$[$0] !== []){
90399 $$[$0-1].push($$[$0]);
90400 }
90401 this.$=$$[$0-1];
90402break;
90403case 4: case 66: case 68: case 80: case 126: case 128: case 129:
90404this.$=$$[$0];
90405break;
90406case 11:
90407 yy.setDirection($$[$0-1]);this.$ = $$[$0-1];
90408break;
90409case 26:
90410 /* console.warn('finat vs', $$[$0-1].nodes); */ this.$=$$[$0-1].nodes
90411break;
90412case 27: case 28: case 29: case 30: case 31:
90413this.$=[];
90414break;
90415case 32:
90416this.$=yy.addSubGraph($$[$0-6],$$[$0-1],$$[$0-4]);
90417break;
90418case 33:
90419this.$=yy.addSubGraph($$[$0-3],$$[$0-1],$$[$0-3]);
90420break;
90421case 34:
90422this.$=yy.addSubGraph(undefined,$$[$0-1],undefined);
90423break;
90424case 38:
90425 /* console.warn('vs',$$[$0-2].stmt,$$[$0]); */ yy.addLink($$[$0-2].stmt,$$[$0],$$[$0-1]); this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0-2].nodes) }
90426break;
90427case 39:
90428 /* console.warn('vs',$$[$0-3].stmt,$$[$0-1]); */ yy.addLink($$[$0-3].stmt,$$[$0-1],$$[$0-2]); this.$ = { stmt: $$[$0-1], nodes: $$[$0-1].concat($$[$0-3].nodes) }
90429break;
90430case 40:
90431/*console.warn('noda', $$[$0-1]);*/ this.$ = {stmt: $$[$0-1], nodes:$$[$0-1] }
90432break;
90433case 41:
90434 /*console.warn('noda', $$[$0]);*/ this.$ = {stmt: $$[$0], nodes:$$[$0] }
90435break;
90436case 42:
90437 /* console.warn('nod', $$[$0]); */ this.$ = [$$[$0]];
90438break;
90439case 43:
90440 this.$ = $$[$0-4].concat($$[$0]); /* console.warn('pip', $$[$0-4][0], $$[$0], this.$); */
90441break;
90442case 44:
90443this.$ = [$$[$0-2]];yy.setClass($$[$0-2],$$[$0])
90444break;
90445case 45:
90446this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'square');
90447break;
90448case 46:
90449this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'circle');
90450break;
90451case 47:
90452this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'ellipse');
90453break;
90454case 48:
90455this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'stadium');
90456break;
90457case 49:
90458this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'cylinder');
90459break;
90460case 50:
90461this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'round');
90462break;
90463case 51:
90464this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'diamond');
90465break;
90466case 52:
90467this.$ = $$[$0-5];yy.addVertex($$[$0-5],$$[$0-2],'hexagon');
90468break;
90469case 53:
90470this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'odd');
90471break;
90472case 54:
90473this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'trapezoid');
90474break;
90475case 55:
90476this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'inv_trapezoid');
90477break;
90478case 56:
90479this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_right');
90480break;
90481case 57:
90482this.$ = $$[$0-3];yy.addVertex($$[$0-3],$$[$0-1],'lean_left');
90483break;
90484case 58:
90485 /*console.warn('h: ', $$[$0]);*/this.$ = $$[$0];yy.addVertex($$[$0]);
90486break;
90487case 59:
90488$$[$0-1].text = $$[$0];this.$ = $$[$0-1];
90489break;
90490case 60: case 61:
90491$$[$0-2].text = $$[$0-1];this.$ = $$[$0-2];
90492break;
90493case 62:
90494this.$ = $$[$0];
90495break;
90496case 63:
90497var inf = yy.destructLink($$[$0], $$[$0-2]); this.$ = {"type":inf.type,"stroke":inf.stroke,"text":$$[$0-1]};
90498break;
90499case 64:
90500var inf = yy.destructLink($$[$0]);this.$ = {"type":inf.type,"stroke":inf.stroke};
90501break;
90502case 65:
90503this.$ = $$[$0-1];
90504break;
90505case 67: case 81: case 127:
90506this.$=$$[$0-1]+''+$$[$0];
90507break;
90508case 82: case 83:
90509this.$ = $$[$0-4];yy.addClass($$[$0-2],$$[$0]);
90510break;
90511case 84:
90512this.$ = $$[$0-4];yy.setClass($$[$0-2], $$[$0]);
90513break;
90514case 85:
90515this.$ = $$[$0-4];yy.setClickEvent($$[$0-2], $$[$0], undefined);
90516break;
90517case 86:
90518this.$ = $$[$0-6];yy.setClickEvent($$[$0-4], $$[$0-2], $$[$0]) ;
90519break;
90520case 87:
90521this.$ = $$[$0-4];yy.setLink($$[$0-2], $$[$0], undefined);
90522break;
90523case 88:
90524this.$ = $$[$0-6];yy.setLink($$[$0-4], $$[$0-2], $$[$0] );
90525break;
90526case 89:
90527this.$ = $$[$0-4];yy.addVertex($$[$0-2],undefined,undefined,$$[$0]);
90528break;
90529case 90: case 92:
90530this.$ = $$[$0-4];yy.updateLink($$[$0-2],$$[$0]);
90531break;
90532case 91:
90533this.$ = $$[$0-4];yy.updateLink([$$[$0-2]],$$[$0]);
90534break;
90535case 93:
90536this.$ = $$[$0-8];yy.updateLinkInterpolate([$$[$0-6]],$$[$0-2]);yy.updateLink([$$[$0-6]],$$[$0]);
90537break;
90538case 94:
90539this.$ = $$[$0-8];yy.updateLinkInterpolate($$[$0-6],$$[$0-2]);yy.updateLink($$[$0-6],$$[$0]);
90540break;
90541case 95:
90542this.$ = $$[$0-6];yy.updateLinkInterpolate([$$[$0-4]],$$[$0]);
90543break;
90544case 96:
90545this.$ = $$[$0-6];yy.updateLinkInterpolate($$[$0-4],$$[$0]);
90546break;
90547case 97: case 99:
90548this.$ = [$$[$0]]
90549break;
90550case 98: case 100:
90551$$[$0-2].push($$[$0]);this.$ = $$[$0-2];
90552break;
90553case 102:
90554this.$ = $$[$0-1] + $$[$0];
90555break;
90556case 124:
90557this.$=$$[$0]
90558break;
90559case 125:
90560this.$=$$[$0-1]+''+$$[$0]
90561break;
90562case 130:
90563this.$='v';
90564break;
90565case 131:
90566this.$='-';
90567break;
90568}
90569},
90570table: [{3:1,4:2,9:$V0,10:$V1,12:$V2},{1:[3]},o($V3,$V4,{5:6}),{4:7,9:$V0,10:$V1,12:$V2},{4:8,9:$V0,10:$V1,12:$V2},{13:[1,9]},{1:[2,1],6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,32:23,33:29,34:$Va,36:30,61:$Vb,62:$Vc,63:$Vd,64:$Ve,65:$Vf,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},o($V3,[2,9]),o($V3,[2,10]),{8:[1,48],9:[1,49],10:$Vu,14:47,17:50},o($Vv,[2,3]),o($Vv,[2,4]),o($Vv,[2,5]),o($Vv,[2,6]),o($Vv,[2,7]),o($Vv,[2,8]),{8:$Vw,9:$Vx,11:$Vy,20:52,31:53,52:57,55:[1,58],56:[1,59]},{8:$Vw,9:$Vx,11:$Vy,20:60},{8:$Vw,9:$Vx,11:$Vy,20:61},{8:$Vw,9:$Vx,11:$Vy,20:62},{8:$Vw,9:$Vx,11:$Vy,20:63},{8:$Vw,9:$Vx,11:$Vy,20:64},{8:$Vw,9:$Vx,10:[1,65],11:$Vy,20:66},o($Vz,[2,41],{17:67,10:$Vu}),{10:[1,68]},{10:[1,69]},{10:[1,70]},{10:[1,71]},{10:[1,72]},o($VA,[2,42],{35:[1,73]}),o($VB,[2,58],{89:83,28:[1,74],34:$Va,37:[1,75],39:[1,76],41:[1,77],43:[1,78],45:[1,79],47:[1,80],48:[1,81],50:[1,82],66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt}),o($VC,[2,124]),o($VC,[2,145]),o($VC,[2,146]),o($VC,[2,147]),o($VC,[2,148]),o($VC,[2,149]),o($VC,[2,150]),o($VC,[2,151]),o($VC,[2,152]),o($VC,[2,153]),o($VC,[2,154]),o($VC,[2,155]),o($VC,[2,156]),o($VC,[2,157]),o($VC,[2,158]),o($VC,[2,159]),o($V3,[2,11]),o($V3,[2,17]),o($V3,[2,18]),{9:[1,84]},o($VD,[2,25],{17:85,10:$Vu}),o($Vv,[2,26]),{32:86,33:29,34:$Va,36:30,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},o($Vv,[2,35]),o($Vv,[2,36]),o($Vv,[2,37]),o($VE,[2,62],{53:87,54:[1,88],57:[1,89]}),{10:$VF,12:$VG,13:$VH,26:$VI,27:90,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o([34,54,57,66,76,77,80,81,82,84,85,91,92,93,94,95,96],[2,64]),o($Vv,[2,27]),o($Vv,[2,28]),o($Vv,[2,29]),o($Vv,[2,30]),o($Vv,[2,31]),{10:$VF,12:$VG,13:$VH,26:$VI,27:127,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($V91,$V4,{5:128}),o($Vz,[2,40],{34:$Va1}),{13:$Vb1,34:$VK,66:$Vc1,72:130,73:[1,131],76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{70:[1,137],74:138,76:[1,139]},{13:$Vb1,34:$VK,66:$Vc1,70:[1,140],72:141,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{13:$Vb1,34:$VK,66:$Vc1,72:142,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{13:$Vb1,34:$VK,66:$Vc1,72:143,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{34:$Va,36:144,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},{10:$VF,12:$VG,13:$VH,26:$VI,27:145,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:147,30:$VJ,34:$VK,37:[1,146],47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:148,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:149,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:150,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:151,30:$VJ,34:$VK,45:[1,152],47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:153,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:154,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:155,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VC,[2,125]),o($V3,[2,19]),o($VD,[2,24]),o($Vz,[2,38],{17:156,10:$Vu}),o($VE,[2,59],{10:[1,157]}),{10:[1,158]},{10:$VF,12:$VG,13:$VH,26:$VI,27:159,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,47:$VL,55:$VM,56:[1,160],58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($Ve1,[2,66]),o($Ve1,[2,68]),o($Ve1,[2,114]),o($Ve1,[2,115]),o($Ve1,[2,116]),o($Ve1,[2,117]),o($Ve1,[2,118]),o($Ve1,[2,119]),o($Ve1,[2,120]),o($Ve1,[2,121]),o($Ve1,[2,122]),o($Ve1,[2,123]),o($Ve1,[2,132]),o($Ve1,[2,133]),o($Ve1,[2,134]),o($Ve1,[2,135]),o($Ve1,[2,136]),o($Ve1,[2,137]),o($Ve1,[2,138]),o($Ve1,[2,139]),o($Ve1,[2,140]),o($Ve1,[2,141]),o($Ve1,[2,142]),o($Ve1,[2,143]),o($Ve1,[2,144]),o($Ve1,[2,69]),o($Ve1,[2,70]),o($Ve1,[2,71]),o($Ve1,[2,72]),o($Ve1,[2,73]),o($Ve1,[2,74]),o($Ve1,[2,75]),o($Ve1,[2,76]),o($Ve1,[2,77]),o($Ve1,[2,78]),o($Ve1,[2,79]),{8:$Vw,9:$Vx,10:$VF,11:$Vy,12:$VG,13:$VH,20:163,26:$VI,28:[1,162],30:$VJ,34:$VK,47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,164],32:23,33:29,34:$Va,36:30,61:$Vb,62:$Vc,63:$Vd,64:$Ve,65:$Vf,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},{10:$Vu,17:165},{10:[1,166],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:167,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:[1,168]},o($Vf1,[2,126]),o($Vf1,[2,128]),o($Vf1,[2,129]),o($Vf1,[2,130]),o($Vf1,[2,131]),{10:[1,169]},{10:[1,170],77:[1,171]},o($Vg1,[2,97]),{10:[1,172]},{10:[1,173],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:167,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:[1,174],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:167,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:[1,175],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:167,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VA,[2,44],{89:83,34:$Va,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt}),{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,176],30:$VJ,34:$VK,47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:177,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,38:[1,178],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,40:[1,179],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,42:[1,180],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,44:[1,181],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,46:[1,182],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,27:183,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,184],30:$VJ,34:$VK,47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,47:$VL,49:[1,185],51:[1,186],55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,47:$VL,49:[1,188],51:[1,187],55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($Vz,[2,39],{34:$Va1}),o($VE,[2,61]),o($VE,[2,60]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,47:$VL,55:$VM,57:[1,189],58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VE,[2,63]),o($Ve1,[2,67]),{10:$VF,12:$VG,13:$VH,26:$VI,27:190,30:$VJ,34:$VK,47:$VL,55:$VM,58:91,59:$VN,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($V91,$V4,{5:191}),o($Vv,[2,34]),{33:192,34:$Va,36:30,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},{10:$Vh1,61:$Vi1,71:193,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},o($Vf1,[2,127]),{10:$Vh1,61:$Vi1,71:207,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{10:$Vh1,61:$Vi1,71:208,73:$Vj1,75:[1,209],76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{10:$Vh1,61:$Vi1,71:210,73:$Vj1,75:[1,211],76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{76:[1,212]},{10:$Vh1,61:$Vi1,71:213,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{10:$Vh1,61:$Vi1,71:214,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{13:$Vb1,34:$VK,66:$Vc1,72:215,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{13:$Vb1,34:$VK,59:[1,217],66:$Vc1,72:216,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VB,[2,45]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,38:[1,218],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VB,[2,50]),o($VB,[2,47]),o($VB,[2,48]),o($VB,[2,49]),o($VB,[2,51]),{10:$VF,12:$VG,13:$VH,26:$VI,30:$VJ,34:$VK,46:[1,219],47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},o($VB,[2,53]),o($VB,[2,54]),o($VB,[2,56]),o($VB,[2,55]),o($VB,[2,57]),o([10,34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],[2,65]),{10:$VF,12:$VG,13:$VH,26:$VI,29:[1,220],30:$VJ,34:$VK,47:$VL,55:$VM,58:161,60:102,61:$VO,62:$VP,63:$VQ,64:$VR,65:$VS,66:$VT,67:$VU,69:93,70:$VV,76:$VW,77:$VX,80:$VY,81:$VZ,82:$V_,84:$V$,85:$V01,86:$V11,87:$V21,88:99,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,221],32:23,33:29,34:$Va,36:30,61:$Vb,62:$Vc,63:$Vd,64:$Ve,65:$Vf,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},o($VA,[2,43]),o($Vs1,[2,89],{77:$Vt1}),o($Vu1,[2,99],{79:223,10:$Vh1,61:$Vi1,73:$Vj1,76:$Vk1,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1}),o($Vv1,[2,101]),o($Vv1,[2,103]),o($Vv1,[2,104]),o($Vv1,[2,105]),o($Vv1,[2,106]),o($Vv1,[2,107]),o($Vv1,[2,108]),o($Vv1,[2,109]),o($Vv1,[2,110]),o($Vv1,[2,111]),o($Vv1,[2,112]),o($Vv1,[2,113]),o($Vs1,[2,90],{77:$Vt1}),o($Vs1,[2,91],{77:$Vt1}),{10:[1,224]},o($Vs1,[2,92],{77:$Vt1}),{10:[1,225]},o($Vg1,[2,98]),o($Vs1,[2,82],{77:$Vt1}),o($Vs1,[2,83],{77:$Vt1}),o($Vs1,[2,84],{88:134,90:167,13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81}),o($Vs1,[2,85],{88:134,90:167,10:[1,226],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81}),o($Vs1,[2,87],{10:[1,227]}),{38:[1,228]},{46:[1,229]},{8:$Vw,9:$Vx,11:$Vy,20:230},o($Vv,[2,33]),{10:$Vh1,61:$Vi1,73:$Vj1,76:$Vk1,78:231,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},o($Vv1,[2,102]),{13:$Vb1,34:$VK,66:$Vc1,72:232,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{13:$Vb1,34:$VK,66:$Vc1,72:233,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,88:134,90:132,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81},{59:[1,234]},{59:[1,235]},o($VB,[2,46]),o($VB,[2,52]),o($V91,$V4,{5:236}),o($Vu1,[2,100],{79:223,10:$Vh1,61:$Vi1,73:$Vj1,76:$Vk1,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1}),o($Vs1,[2,95],{88:134,90:167,10:[1,237],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81}),o($Vs1,[2,96],{88:134,90:167,10:[1,238],13:$Vb1,34:$VK,66:$Vc1,76:$VW,77:$VX,80:$VY,81:$VZ,82:$Vd1,84:$V$,85:$V01,91:$V31,92:$V41,93:$V51,94:$V61,95:$V71,96:$V81}),o($Vs1,[2,86]),o($Vs1,[2,88]),{6:10,7:11,8:$V5,9:$V6,10:$V7,11:$V8,19:16,21:17,22:18,23:19,24:20,25:21,26:$V9,30:[1,239],32:23,33:29,34:$Va,36:30,61:$Vb,62:$Vc,63:$Vd,64:$Ve,65:$Vf,66:$Vg,76:$Vh,77:$Vi,80:$Vj,81:$Vk,82:$Vl,84:$Vm,85:$Vn,89:31,91:$Vo,92:$Vp,93:$Vq,94:$Vr,95:$Vs,96:$Vt},{10:$Vh1,61:$Vi1,71:240,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},{10:$Vh1,61:$Vi1,71:241,73:$Vj1,76:$Vk1,78:194,79:195,80:$Vl1,81:$Vm1,82:$Vn1,83:$Vo1,84:$Vp1,85:$Vq1,86:$Vr1},o($Vv,[2,32]),o($Vs1,[2,93],{77:$Vt1}),o($Vs1,[2,94],{77:$Vt1})],
90571defaultActions: {},
90572parseError: function parseError (str, hash) {
90573 if (hash.recoverable) {
90574 this.trace(str);
90575 } else {
90576 var error = new Error(str);
90577 error.hash = hash;
90578 throw error;
90579 }
90580},
90581parse: function parse(input) {
90582 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
90583 var args = lstack.slice.call(arguments, 1);
90584 var lexer = Object.create(this.lexer);
90585 var sharedState = { yy: {} };
90586 for (var k in this.yy) {
90587 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
90588 sharedState.yy[k] = this.yy[k];
90589 }
90590 }
90591 lexer.setInput(input, sharedState.yy);
90592 sharedState.yy.lexer = lexer;
90593 sharedState.yy.parser = this;
90594 if (typeof lexer.yylloc == 'undefined') {
90595 lexer.yylloc = {};
90596 }
90597 var yyloc = lexer.yylloc;
90598 lstack.push(yyloc);
90599 var ranges = lexer.options && lexer.options.ranges;
90600 if (typeof sharedState.yy.parseError === 'function') {
90601 this.parseError = sharedState.yy.parseError;
90602 } else {
90603 this.parseError = Object.getPrototypeOf(this).parseError;
90604 }
90605 function popStack(n) {
90606 stack.length = stack.length - 2 * n;
90607 vstack.length = vstack.length - n;
90608 lstack.length = lstack.length - n;
90609 }
90610 function lex() {
90611 var token;
90612 token = tstack.pop() || lexer.lex() || EOF;
90613 if (typeof token !== 'number') {
90614 if (token instanceof Array) {
90615 tstack = token;
90616 token = tstack.pop();
90617 }
90618 token = self.symbols_[token] || token;
90619 }
90620 return token;
90621 }
90622 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
90623 while (true) {
90624 state = stack[stack.length - 1];
90625 if (this.defaultActions[state]) {
90626 action = this.defaultActions[state];
90627 } else {
90628 if (symbol === null || typeof symbol == 'undefined') {
90629 symbol = lex();
90630 }
90631 action = table[state] && table[state][symbol];
90632 }
90633 if (typeof action === 'undefined' || !action.length || !action[0]) {
90634 var errStr = '';
90635 expected = [];
90636 for (p in table[state]) {
90637 if (this.terminals_[p] && p > TERROR) {
90638 expected.push('\'' + this.terminals_[p] + '\'');
90639 }
90640 }
90641 if (lexer.showPosition) {
90642 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
90643 } else {
90644 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
90645 }
90646 this.parseError(errStr, {
90647 text: lexer.match,
90648 token: this.terminals_[symbol] || symbol,
90649 line: lexer.yylineno,
90650 loc: yyloc,
90651 expected: expected
90652 });
90653 }
90654 if (action[0] instanceof Array && action.length > 1) {
90655 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
90656 }
90657 switch (action[0]) {
90658 case 1:
90659 stack.push(symbol);
90660 vstack.push(lexer.yytext);
90661 lstack.push(lexer.yylloc);
90662 stack.push(action[1]);
90663 symbol = null;
90664 if (!preErrorSymbol) {
90665 yyleng = lexer.yyleng;
90666 yytext = lexer.yytext;
90667 yylineno = lexer.yylineno;
90668 yyloc = lexer.yylloc;
90669 if (recovering > 0) {
90670 recovering--;
90671 }
90672 } else {
90673 symbol = preErrorSymbol;
90674 preErrorSymbol = null;
90675 }
90676 break;
90677 case 2:
90678 len = this.productions_[action[1]][1];
90679 yyval.$ = vstack[vstack.length - len];
90680 yyval._$ = {
90681 first_line: lstack[lstack.length - (len || 1)].first_line,
90682 last_line: lstack[lstack.length - 1].last_line,
90683 first_column: lstack[lstack.length - (len || 1)].first_column,
90684 last_column: lstack[lstack.length - 1].last_column
90685 };
90686 if (ranges) {
90687 yyval._$.range = [
90688 lstack[lstack.length - (len || 1)].range[0],
90689 lstack[lstack.length - 1].range[1]
90690 ];
90691 }
90692 r = this.performAction.apply(yyval, [
90693 yytext,
90694 yyleng,
90695 yylineno,
90696 sharedState.yy,
90697 action[1],
90698 vstack,
90699 lstack
90700 ].concat(args));
90701 if (typeof r !== 'undefined') {
90702 return r;
90703 }
90704 if (len) {
90705 stack = stack.slice(0, -1 * len * 2);
90706 vstack = vstack.slice(0, -1 * len);
90707 lstack = lstack.slice(0, -1 * len);
90708 }
90709 stack.push(this.productions_[action[1]][0]);
90710 vstack.push(yyval.$);
90711 lstack.push(yyval._$);
90712 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
90713 stack.push(newState);
90714 break;
90715 case 3:
90716 return true;
90717 }
90718 }
90719 return true;
90720}};
90721
90722/* generated by jison-lex 0.3.4 */
90723var lexer = (function(){
90724var lexer = ({
90725
90726EOF:1,
90727
90728parseError:function parseError(str, hash) {
90729 if (this.yy.parser) {
90730 this.yy.parser.parseError(str, hash);
90731 } else {
90732 throw new Error(str);
90733 }
90734 },
90735
90736// resets the lexer, sets new input
90737setInput:function (input, yy) {
90738 this.yy = yy || this.yy || {};
90739 this._input = input;
90740 this._more = this._backtrack = this.done = false;
90741 this.yylineno = this.yyleng = 0;
90742 this.yytext = this.matched = this.match = '';
90743 this.conditionStack = ['INITIAL'];
90744 this.yylloc = {
90745 first_line: 1,
90746 first_column: 0,
90747 last_line: 1,
90748 last_column: 0
90749 };
90750 if (this.options.ranges) {
90751 this.yylloc.range = [0,0];
90752 }
90753 this.offset = 0;
90754 return this;
90755 },
90756
90757// consumes and returns one char from the input
90758input:function () {
90759 var ch = this._input[0];
90760 this.yytext += ch;
90761 this.yyleng++;
90762 this.offset++;
90763 this.match += ch;
90764 this.matched += ch;
90765 var lines = ch.match(/(?:\r\n?|\n).*/g);
90766 if (lines) {
90767 this.yylineno++;
90768 this.yylloc.last_line++;
90769 } else {
90770 this.yylloc.last_column++;
90771 }
90772 if (this.options.ranges) {
90773 this.yylloc.range[1]++;
90774 }
90775
90776 this._input = this._input.slice(1);
90777 return ch;
90778 },
90779
90780// unshifts one char (or a string) into the input
90781unput:function (ch) {
90782 var len = ch.length;
90783 var lines = ch.split(/(?:\r\n?|\n)/g);
90784
90785 this._input = ch + this._input;
90786 this.yytext = this.yytext.substr(0, this.yytext.length - len);
90787 //this.yyleng -= len;
90788 this.offset -= len;
90789 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
90790 this.match = this.match.substr(0, this.match.length - 1);
90791 this.matched = this.matched.substr(0, this.matched.length - 1);
90792
90793 if (lines.length - 1) {
90794 this.yylineno -= lines.length - 1;
90795 }
90796 var r = this.yylloc.range;
90797
90798 this.yylloc = {
90799 first_line: this.yylloc.first_line,
90800 last_line: this.yylineno + 1,
90801 first_column: this.yylloc.first_column,
90802 last_column: lines ?
90803 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
90804 + oldLines[oldLines.length - lines.length].length - lines[0].length :
90805 this.yylloc.first_column - len
90806 };
90807
90808 if (this.options.ranges) {
90809 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
90810 }
90811 this.yyleng = this.yytext.length;
90812 return this;
90813 },
90814
90815// When called from action, caches matched text and appends it on next action
90816more:function () {
90817 this._more = true;
90818 return this;
90819 },
90820
90821// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
90822reject:function () {
90823 if (this.options.backtrack_lexer) {
90824 this._backtrack = true;
90825 } else {
90826 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
90827 text: "",
90828 token: null,
90829 line: this.yylineno
90830 });
90831
90832 }
90833 return this;
90834 },
90835
90836// retain first n characters of the match
90837less:function (n) {
90838 this.unput(this.match.slice(n));
90839 },
90840
90841// displays already matched input, i.e. for error messages
90842pastInput:function () {
90843 var past = this.matched.substr(0, this.matched.length - this.match.length);
90844 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
90845 },
90846
90847// displays upcoming input, i.e. for error messages
90848upcomingInput:function () {
90849 var next = this.match;
90850 if (next.length < 20) {
90851 next += this._input.substr(0, 20-next.length);
90852 }
90853 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
90854 },
90855
90856// displays the character position where the lexing error occurred, i.e. for error messages
90857showPosition:function () {
90858 var pre = this.pastInput();
90859 var c = new Array(pre.length + 1).join("-");
90860 return pre + this.upcomingInput() + "\n" + c + "^";
90861 },
90862
90863// test the lexed token: return FALSE when not a match, otherwise return token
90864test_match:function(match, indexed_rule) {
90865 var token,
90866 lines,
90867 backup;
90868
90869 if (this.options.backtrack_lexer) {
90870 // save context
90871 backup = {
90872 yylineno: this.yylineno,
90873 yylloc: {
90874 first_line: this.yylloc.first_line,
90875 last_line: this.last_line,
90876 first_column: this.yylloc.first_column,
90877 last_column: this.yylloc.last_column
90878 },
90879 yytext: this.yytext,
90880 match: this.match,
90881 matches: this.matches,
90882 matched: this.matched,
90883 yyleng: this.yyleng,
90884 offset: this.offset,
90885 _more: this._more,
90886 _input: this._input,
90887 yy: this.yy,
90888 conditionStack: this.conditionStack.slice(0),
90889 done: this.done
90890 };
90891 if (this.options.ranges) {
90892 backup.yylloc.range = this.yylloc.range.slice(0);
90893 }
90894 }
90895
90896 lines = match[0].match(/(?:\r\n?|\n).*/g);
90897 if (lines) {
90898 this.yylineno += lines.length;
90899 }
90900 this.yylloc = {
90901 first_line: this.yylloc.last_line,
90902 last_line: this.yylineno + 1,
90903 first_column: this.yylloc.last_column,
90904 last_column: lines ?
90905 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
90906 this.yylloc.last_column + match[0].length
90907 };
90908 this.yytext += match[0];
90909 this.match += match[0];
90910 this.matches = match;
90911 this.yyleng = this.yytext.length;
90912 if (this.options.ranges) {
90913 this.yylloc.range = [this.offset, this.offset += this.yyleng];
90914 }
90915 this._more = false;
90916 this._backtrack = false;
90917 this._input = this._input.slice(match[0].length);
90918 this.matched += match[0];
90919 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
90920 if (this.done && this._input) {
90921 this.done = false;
90922 }
90923 if (token) {
90924 return token;
90925 } else if (this._backtrack) {
90926 // recover context
90927 for (var k in backup) {
90928 this[k] = backup[k];
90929 }
90930 return false; // rule action called reject() implying the next rule should be tested instead.
90931 }
90932 return false;
90933 },
90934
90935// return next match in input
90936next:function () {
90937 if (this.done) {
90938 return this.EOF;
90939 }
90940 if (!this._input) {
90941 this.done = true;
90942 }
90943
90944 var token,
90945 match,
90946 tempMatch,
90947 index;
90948 if (!this._more) {
90949 this.yytext = '';
90950 this.match = '';
90951 }
90952 var rules = this._currentRules();
90953 for (var i = 0; i < rules.length; i++) {
90954 tempMatch = this._input.match(this.rules[rules[i]]);
90955 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
90956 match = tempMatch;
90957 index = i;
90958 if (this.options.backtrack_lexer) {
90959 token = this.test_match(tempMatch, rules[i]);
90960 if (token !== false) {
90961 return token;
90962 } else if (this._backtrack) {
90963 match = false;
90964 continue; // rule action called reject() implying a rule MISmatch.
90965 } else {
90966 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
90967 return false;
90968 }
90969 } else if (!this.options.flex) {
90970 break;
90971 }
90972 }
90973 }
90974 if (match) {
90975 token = this.test_match(match, rules[index]);
90976 if (token !== false) {
90977 return token;
90978 }
90979 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
90980 return false;
90981 }
90982 if (this._input === "") {
90983 return this.EOF;
90984 } else {
90985 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
90986 text: "",
90987 token: null,
90988 line: this.yylineno
90989 });
90990 }
90991 },
90992
90993// return next match that has a token
90994lex:function lex () {
90995 var r = this.next();
90996 if (r) {
90997 return r;
90998 } else {
90999 return this.lex();
91000 }
91001 },
91002
91003// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
91004begin:function begin (condition) {
91005 this.conditionStack.push(condition);
91006 },
91007
91008// pop the previously active lexer condition state off the condition stack
91009popState:function popState () {
91010 var n = this.conditionStack.length - 1;
91011 if (n > 0) {
91012 return this.conditionStack.pop();
91013 } else {
91014 return this.conditionStack[0];
91015 }
91016 },
91017
91018// produce the lexer rule set which is active for the currently active lexer condition state
91019_currentRules:function _currentRules () {
91020 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
91021 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
91022 } else {
91023 return this.conditions["INITIAL"].rules;
91024 }
91025 },
91026
91027// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
91028topState:function topState (n) {
91029 n = this.conditionStack.length - 1 - Math.abs(n || 0);
91030 if (n >= 0) {
91031 return this.conditionStack[n];
91032 } else {
91033 return "INITIAL";
91034 }
91035 },
91036
91037// alias for begin(condition)
91038pushState:function pushState (condition) {
91039 this.begin(condition);
91040 },
91041
91042// return the number of states currently on the stack
91043stateStackSize:function stateStackSize() {
91044 return this.conditionStack.length;
91045 },
91046options: {},
91047performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
91048var YYSTATE=YY_START;
91049switch($avoiding_name_collisions) {
91050case 0:/* do nothing */
91051break;
91052case 1:this.begin("string");
91053break;
91054case 2:this.popState();
91055break;
91056case 3:return "STR";
91057break;
91058case 4:return 61;
91059break;
91060case 5:return 70;
91061break;
91062case 6:return 62;
91063break;
91064case 7:return 75;
91065break;
91066case 8:return 63;
91067break;
91068case 9:return 64;
91069break;
91070case 10:return 65;
91071break;
91072case 11:if(yy.lex.firstGraph()){this.begin("dir");} return 12;
91073break;
91074case 12:return 26;
91075break;
91076case 13:return 30;
91077break;
91078case 14: this.popState(); return 13;
91079break;
91080case 15: this.popState(); return 13;
91081break;
91082case 16: this.popState(); return 13;
91083break;
91084case 17: this.popState(); return 13;
91085break;
91086case 18: this.popState(); return 13;
91087break;
91088case 19: this.popState(); return 13;
91089break;
91090case 20: this.popState(); return 13;
91091break;
91092case 21: this.popState(); return 13;
91093break;
91094case 22: this.popState(); return 13;
91095break;
91096case 23: this.popState(); return 13;
91097break;
91098case 24: return 76;
91099break;
91100case 25:return 84;
91101break;
91102case 26:return 35;
91103break;
91104case 27:return 81;
91105break;
91106case 28:return 34;
91107break;
91108case 29:return 8;
91109break;
91110case 30:return 77;
91111break;
91112case 31:return 95;
91113break;
91114case 32:return 56;
91115break;
91116case 33:return 56;
91117break;
91118case 34:return 56;
91119break;
91120case 35:return 56;
91121break;
91122case 36:return 56;
91123break;
91124case 37:return 56;
91125break;
91126case 38:return 56;
91127break;
91128case 39:return 56;
91129break;
91130case 40:return 56;
91131break;
91132case 41:return 56;
91133break;
91134case 42:return 56;
91135break;
91136case 43:return 56;
91137break;
91138case 44:return 56;
91139break;
91140case 45:return 56;
91141break;
91142case 46:return 56;
91143break;
91144case 47:return 56;
91145break;
91146case 48:return 56;
91147break;
91148case 49:return 56;
91149break;
91150case 50:return 56;
91151break;
91152case 51:return 56;
91153break;
91154case 52:return 56;
91155break;
91156case 53:return 56;
91157break;
91158case 54:return 56;
91159break;
91160case 55:return 56;
91161break;
91162case 56:return 56;
91163break;
91164case 57:return 56;
91165break;
91166case 58:return 56;
91167break;
91168case 59:return 56;
91169break;
91170case 60:return 55;
91171break;
91172case 61:return 55;
91173break;
91174case 62:return 55;
91175break;
91176case 63:return 55;
91177break;
91178case 64:return 55;
91179break;
91180case 65:return 55;
91181break;
91182case 66:return 55;
91183break;
91184case 67:return 55;
91185break;
91186case 68:return 55;
91187break;
91188case 69:return 55;
91189break;
91190case 70:return 55;
91191break;
91192case 71:return 55;
91193break;
91194case 72:return 39;
91195break;
91196case 73:return 40;
91197break;
91198case 74:return 41;
91199break;
91200case 75:return 42;
91201break;
91202case 76:return 43;
91203break;
91204case 77:return 44;
91205break;
91206case 78:return 82;
91207break;
91208case 79:return 85;
91209break;
91210case 80:return 96;
91211break;
91212case 81:return 93;
91213break;
91214case 82:return 86;
91215break;
91216case 83:return 94;
91217break;
91218case 84:return 94;
91219break;
91220case 85:return 87;
91221break;
91222case 86:return 47;
91223break;
91224case 87:return 67;
91225break;
91226case 88:return 'SEP';
91227break;
91228case 89:return 66;
91229break;
91230case 90:return 80;
91231break;
91232case 91:return 49;
91233break;
91234case 92:return 48;
91235break;
91236case 93:return 51;
91237break;
91238case 94:return 50;
91239break;
91240case 95:return 91;
91241break;
91242case 96:return 92;
91243break;
91244case 97:return 57;
91245break;
91246case 98:return 37;
91247break;
91248case 99:return 38;
91249break;
91250case 100:return 28;
91251break;
91252case 101:return 29;
91253break;
91254case 102:return 45
91255break;
91256case 103:return 46
91257break;
91258case 104:return 102;
91259break;
91260case 105:return 9;
91261break;
91262case 106:return 10;
91263break;
91264case 107:return 11;
91265break;
91266}
91267},
91268rules: [/^(?:%%[^\n]*\n*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r|\n|\r\n)+)/,/^(?:\s)/,/^(?:$)/],
91269conditions: {"vertex":{"rules":[],"inclusive":false},"dir":{"rules":[14,15,16,17,18,19,20,21,22,23],"inclusive":false},"string":{"rules":[2,3],"inclusive":false},"INITIAL":{"rules":[0,1,4,5,6,7,8,9,10,11,12,13,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"inclusive":true}}
91270});
91271return lexer;
91272})();
91273parser.lexer = lexer;
91274function Parser () {
91275 this.yy = {};
91276}
91277Parser.prototype = parser;parser.Parser = Parser;
91278return new Parser;
91279})();
91280
91281
91282if (true) {
91283exports.parser = parser;
91284exports.Parser = parser.Parser;
91285exports.parse = function () { return parser.parse.apply(parser, arguments); };
91286exports.main = function commonjsMain (args) {
91287 if (!args[1]) {
91288 console.log('Usage: '+args[0]+' FILE');
91289 process.exit(1);
91290 }
91291 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
91292 return exports.parser.parse(source);
91293};
91294if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
91295 exports.main(process.argv.slice(1));
91296}
91297}
91298/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
91299
91300/***/ }),
91301
91302/***/ "./src/diagrams/gantt/ganttDb.js":
91303/*!***************************************!*\
91304 !*** ./src/diagrams/gantt/ganttDb.js ***!
91305 \***************************************/
91306/*! exports provided: clear, setAxisFormat, getAxisFormat, setDateFormat, enableInclusiveEndDates, endDatesAreInclusive, getDateFormat, setExcludes, getExcludes, setTitle, getTitle, addSection, getSections, getTasks, addTask, findTaskById, addTaskOrg, setLink, setClass, setClickEvent, bindFunctions, default */
91307/***/ (function(module, __webpack_exports__, __webpack_require__) {
91308
91309"use strict";
91310__webpack_require__.r(__webpack_exports__);
91311/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
91312/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAxisFormat", function() { return setAxisFormat; });
91313/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAxisFormat", function() { return getAxisFormat; });
91314/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDateFormat", function() { return setDateFormat; });
91315/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableInclusiveEndDates", function() { return enableInclusiveEndDates; });
91316/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "endDatesAreInclusive", function() { return endDatesAreInclusive; });
91317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDateFormat", function() { return getDateFormat; });
91318/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setExcludes", function() { return setExcludes; });
91319/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getExcludes", function() { return getExcludes; });
91320/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
91321/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
91322/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSection", function() { return addSection; });
91323/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSections", function() { return getSections; });
91324/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTasks", function() { return getTasks; });
91325/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTask", function() { return addTask; });
91326/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "findTaskById", function() { return findTaskById; });
91327/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTaskOrg", function() { return addTaskOrg; });
91328/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLink", function() { return setLink; });
91329/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClass", function() { return setClass; });
91330/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setClickEvent", function() { return setClickEvent; });
91331/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bindFunctions", function() { return bindFunctions; });
91332/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "./node_modules/moment-mini/moment.min.js");
91333/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
91334/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @braintree/sanitize-url */ "./node_modules/@braintree/sanitize-url/index.js");
91335/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__);
91336/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
91337/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../config */ "./src/config.js");
91338function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
91339
91340function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
91341
91342function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
91343
91344function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
91345
91346
91347
91348
91349
91350var config = Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])();
91351var dateFormat = '';
91352var axisFormat = '';
91353var excludes = [];
91354var title = '';
91355var sections = [];
91356var tasks = [];
91357var currentSection = '';
91358var tags = ['active', 'done', 'crit', 'milestone'];
91359var funs = [];
91360var inclusiveEndDates = false;
91361var clear = function clear() {
91362 sections = [];
91363 tasks = [];
91364 currentSection = '';
91365 funs = [];
91366 title = '';
91367 taskCnt = 0;
91368 lastTask = undefined;
91369 lastTaskID = undefined;
91370 rawTasks = [];
91371 dateFormat = '';
91372 axisFormat = '';
91373 excludes = [];
91374 inclusiveEndDates = false;
91375};
91376var setAxisFormat = function setAxisFormat(txt) {
91377 axisFormat = txt;
91378};
91379var getAxisFormat = function getAxisFormat() {
91380 return axisFormat;
91381};
91382var setDateFormat = function setDateFormat(txt) {
91383 dateFormat = txt;
91384};
91385var enableInclusiveEndDates = function enableInclusiveEndDates() {
91386 inclusiveEndDates = true;
91387};
91388var endDatesAreInclusive = function endDatesAreInclusive() {
91389 return inclusiveEndDates;
91390};
91391var getDateFormat = function getDateFormat() {
91392 return dateFormat;
91393};
91394var setExcludes = function setExcludes(txt) {
91395 excludes = txt.toLowerCase().split(/[\s,]+/);
91396};
91397var getExcludes = function getExcludes() {
91398 return excludes;
91399};
91400var setTitle = function setTitle(txt) {
91401 title = txt;
91402};
91403var getTitle = function getTitle() {
91404 return title;
91405};
91406var addSection = function addSection(txt) {
91407 currentSection = txt;
91408 sections.push(txt);
91409};
91410var getSections = function getSections() {
91411 return sections;
91412};
91413var getTasks = function getTasks() {
91414 var allItemsPricessed = compileTasks();
91415 var maxDepth = 10;
91416 var iterationCount = 0;
91417
91418 while (!allItemsPricessed && iterationCount < maxDepth) {
91419 allItemsPricessed = compileTasks();
91420 iterationCount++;
91421 }
91422
91423 tasks = rawTasks;
91424 return tasks;
91425};
91426
91427var isInvalidDate = function isInvalidDate(date, dateFormat, excludes) {
91428 if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {
91429 return true;
91430 }
91431
91432 if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {
91433 return true;
91434 }
91435
91436 return excludes.indexOf(date.format(dateFormat.trim())) >= 0;
91437};
91438
91439var checkTaskDates = function checkTaskDates(task, dateFormat, excludes) {
91440 if (!excludes.length || task.manualEndTime) return;
91441 var startTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.startTime, dateFormat, true);
91442 startTime.add(1, 'd');
91443 var endTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(task.endTime, dateFormat, true);
91444 var renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes);
91445 task.endTime = endTime.toDate();
91446 task.renderEndTime = renderEndTime;
91447};
91448
91449var fixTaskDates = function fixTaskDates(startTime, endTime, dateFormat, excludes) {
91450 var invalid = false;
91451 var renderEndTime = null;
91452
91453 while (startTime <= endTime) {
91454 if (!invalid) {
91455 renderEndTime = endTime.toDate();
91456 }
91457
91458 invalid = isInvalidDate(startTime, dateFormat, excludes);
91459
91460 if (invalid) {
91461 endTime.add(1, 'd');
91462 }
91463
91464 startTime.add(1, 'd');
91465 }
91466
91467 return renderEndTime;
91468};
91469
91470var getStartDate = function getStartDate(prevTime, dateFormat, str) {
91471 str = str.trim(); // Test for after
91472
91473 var re = /^after\s+([\d\w- ]+)/;
91474 var afterStatement = re.exec(str.trim());
91475
91476 if (afterStatement !== null) {
91477 // check all after ids and take the latest
91478 var latestEndingTask = null;
91479 afterStatement[1].split(' ').forEach(function (id) {
91480 var task = findTaskById(id);
91481
91482 if (typeof task !== 'undefined') {
91483 if (!latestEndingTask) {
91484 latestEndingTask = task;
91485 } else {
91486 if (task.endTime > latestEndingTask.endTime) {
91487 latestEndingTask = task;
91488 }
91489 }
91490 }
91491 });
91492
91493 if (!latestEndingTask) {
91494 var dt = new Date();
91495 dt.setHours(0, 0, 0, 0);
91496 return dt;
91497 } else {
91498 return latestEndingTask.endTime;
91499 }
91500 } // Check for actual date set
91501
91502
91503 var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
91504
91505 if (mDate.isValid()) {
91506 return mDate.toDate();
91507 } else {
91508 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Invalid date:' + str);
91509 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('With date format:' + dateFormat.trim());
91510 } // Default date - now
91511
91512
91513 return new Date();
91514};
91515
91516var durationToDate = function durationToDate(durationStatement, relativeTime) {
91517 if (durationStatement !== null) {
91518 switch (durationStatement[2]) {
91519 case 's':
91520 relativeTime.add(durationStatement[1], 'seconds');
91521 break;
91522
91523 case 'm':
91524 relativeTime.add(durationStatement[1], 'minutes');
91525 break;
91526
91527 case 'h':
91528 relativeTime.add(durationStatement[1], 'hours');
91529 break;
91530
91531 case 'd':
91532 relativeTime.add(durationStatement[1], 'days');
91533 break;
91534
91535 case 'w':
91536 relativeTime.add(durationStatement[1], 'weeks');
91537 break;
91538 }
91539 } // Default date - now
91540
91541
91542 return relativeTime.toDate();
91543};
91544
91545var getEndDate = function getEndDate(prevTime, dateFormat, str, inclusive) {
91546 inclusive = inclusive || false;
91547 str = str.trim(); // Check for actual date
91548
91549 var mDate = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(str, dateFormat.trim(), true);
91550
91551 if (mDate.isValid()) {
91552 if (inclusive) {
91553 mDate.add(1, 'd');
91554 }
91555
91556 return mDate.toDate();
91557 }
91558
91559 return durationToDate(/^([\d]+)([wdhms])/.exec(str.trim()), moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(prevTime));
91560};
91561
91562var taskCnt = 0;
91563
91564var parseId = function parseId(idStr) {
91565 if (typeof idStr === 'undefined') {
91566 taskCnt = taskCnt + 1;
91567 return 'task' + taskCnt;
91568 }
91569
91570 return idStr;
91571}; // id, startDate, endDate
91572// id, startDate, length
91573// id, after x, endDate
91574// id, after x, length
91575// startDate, endDate
91576// startDate, length
91577// after x, endDate
91578// after x, length
91579// endDate
91580// length
91581
91582
91583var compileData = function compileData(prevTask, dataStr) {
91584 var ds;
91585
91586 if (dataStr.substr(0, 1) === ':') {
91587 ds = dataStr.substr(1, dataStr.length);
91588 } else {
91589 ds = dataStr;
91590 }
91591
91592 var data = ds.split(',');
91593 var task = {}; // Get tags like active, done, crit and milestone
91594
91595 getTaskTags(data, task, tags);
91596
91597 for (var i = 0; i < data.length; i++) {
91598 data[i] = data[i].trim();
91599 }
91600
91601 var endTimeData = '';
91602
91603 switch (data.length) {
91604 case 1:
91605 task.id = parseId();
91606 task.startTime = prevTask.endTime;
91607 endTimeData = data[0];
91608 break;
91609
91610 case 2:
91611 task.id = parseId();
91612 task.startTime = getStartDate(undefined, dateFormat, data[0]);
91613 endTimeData = data[1];
91614 break;
91615
91616 case 3:
91617 task.id = parseId(data[0]);
91618 task.startTime = getStartDate(undefined, dateFormat, data[1]);
91619 endTimeData = data[2];
91620 break;
91621
91622 default:
91623 }
91624
91625 if (endTimeData) {
91626 task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);
91627 task.manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(endTimeData, 'YYYY-MM-DD', true).isValid();
91628 checkTaskDates(task, dateFormat, excludes);
91629 }
91630
91631 return task;
91632};
91633
91634var parseData = function parseData(prevTaskId, dataStr) {
91635 var ds;
91636
91637 if (dataStr.substr(0, 1) === ':') {
91638 ds = dataStr.substr(1, dataStr.length);
91639 } else {
91640 ds = dataStr;
91641 }
91642
91643 var data = ds.split(',');
91644 var task = {}; // Get tags like active, done, crit and milestone
91645
91646 getTaskTags(data, task, tags);
91647
91648 for (var i = 0; i < data.length; i++) {
91649 data[i] = data[i].trim();
91650 }
91651
91652 switch (data.length) {
91653 case 1:
91654 task.id = parseId();
91655 task.startTime = {
91656 type: 'prevTaskEnd',
91657 id: prevTaskId
91658 };
91659 task.endTime = {
91660 data: data[0]
91661 };
91662 break;
91663
91664 case 2:
91665 task.id = parseId();
91666 task.startTime = {
91667 type: 'getStartDate',
91668 startData: data[0]
91669 };
91670 task.endTime = {
91671 data: data[1]
91672 };
91673 break;
91674
91675 case 3:
91676 task.id = parseId(data[0]);
91677 task.startTime = {
91678 type: 'getStartDate',
91679 startData: data[1]
91680 };
91681 task.endTime = {
91682 data: data[2]
91683 };
91684 break;
91685
91686 default:
91687 }
91688
91689 return task;
91690};
91691
91692var lastTask;
91693var lastTaskID;
91694var rawTasks = [];
91695var taskDb = {};
91696var addTask = function addTask(descr, data) {
91697 var rawTask = {
91698 section: currentSection,
91699 type: currentSection,
91700 processed: false,
91701 manualEndTime: false,
91702 renderEndTime: null,
91703 raw: {
91704 data: data
91705 },
91706 task: descr,
91707 classes: []
91708 };
91709 var taskInfo = parseData(lastTaskID, data);
91710 rawTask.raw.startTime = taskInfo.startTime;
91711 rawTask.raw.endTime = taskInfo.endTime;
91712 rawTask.id = taskInfo.id;
91713 rawTask.prevTaskId = lastTaskID;
91714 rawTask.active = taskInfo.active;
91715 rawTask.done = taskInfo.done;
91716 rawTask.crit = taskInfo.crit;
91717 rawTask.milestone = taskInfo.milestone;
91718 var pos = rawTasks.push(rawTask);
91719 lastTaskID = rawTask.id; // Store cross ref
91720
91721 taskDb[rawTask.id] = pos - 1;
91722};
91723var findTaskById = function findTaskById(id) {
91724 var pos = taskDb[id];
91725 return rawTasks[pos];
91726};
91727var addTaskOrg = function addTaskOrg(descr, data) {
91728 var newTask = {
91729 section: currentSection,
91730 type: currentSection,
91731 description: descr,
91732 task: descr,
91733 classes: []
91734 };
91735 var taskInfo = compileData(lastTask, data);
91736 newTask.startTime = taskInfo.startTime;
91737 newTask.endTime = taskInfo.endTime;
91738 newTask.id = taskInfo.id;
91739 newTask.active = taskInfo.active;
91740 newTask.done = taskInfo.done;
91741 newTask.crit = taskInfo.crit;
91742 newTask.milestone = taskInfo.milestone;
91743 lastTask = newTask;
91744 tasks.push(newTask);
91745};
91746
91747var compileTasks = function compileTasks() {
91748 var compileTask = function compileTask(pos) {
91749 var task = rawTasks[pos];
91750 var startTime = '';
91751
91752 switch (rawTasks[pos].raw.startTime.type) {
91753 case 'prevTaskEnd':
91754 {
91755 var prevTask = findTaskById(task.prevTaskId);
91756 task.startTime = prevTask.endTime;
91757 break;
91758 }
91759
91760 case 'getStartDate':
91761 startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);
91762
91763 if (startTime) {
91764 rawTasks[pos].startTime = startTime;
91765 }
91766
91767 break;
91768 }
91769
91770 if (rawTasks[pos].startTime) {
91771 rawTasks[pos].endTime = getEndDate(rawTasks[pos].startTime, dateFormat, rawTasks[pos].raw.endTime.data, inclusiveEndDates);
91772
91773 if (rawTasks[pos].endTime) {
91774 rawTasks[pos].processed = true;
91775 rawTasks[pos].manualEndTime = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()(rawTasks[pos].raw.endTime.data, 'YYYY-MM-DD', true).isValid();
91776 checkTaskDates(rawTasks[pos], dateFormat, excludes);
91777 }
91778 }
91779
91780 return rawTasks[pos].processed;
91781 };
91782
91783 var allProcessed = true;
91784
91785 for (var i = 0; i < rawTasks.length; i++) {
91786 compileTask(i);
91787 allProcessed = allProcessed && rawTasks[i].processed;
91788 }
91789
91790 return allProcessed;
91791};
91792/**
91793 * Called by parser when a link is found. Adds the URL to the vertex data.
91794 * @param ids Comma separated list of ids
91795 * @param linkStr URL to create a link for
91796 */
91797
91798
91799var setLink = function setLink(ids, _linkStr) {
91800 var linkStr = _linkStr;
91801
91802 if (config.securityLevel !== 'loose') {
91803 linkStr = Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__["sanitizeUrl"])(_linkStr);
91804 }
91805
91806 ids.split(',').forEach(function (id) {
91807 var rawTask = findTaskById(id);
91808
91809 if (typeof rawTask !== 'undefined') {
91810 pushFun(id, function () {
91811 window.open(linkStr, '_self');
91812 });
91813 }
91814 });
91815 setClass(ids, 'clickable');
91816};
91817/**
91818 * Called by parser when a special node is found, e.g. a clickable element.
91819 * @param ids Comma separated list of ids
91820 * @param className Class to add
91821 */
91822
91823var setClass = function setClass(ids, className) {
91824 ids.split(',').forEach(function (id) {
91825 var rawTask = findTaskById(id);
91826
91827 if (typeof rawTask !== 'undefined') {
91828 rawTask.classes.push(className);
91829 }
91830 });
91831};
91832
91833var setClickFun = function setClickFun(id, functionName, functionArgs) {
91834 if (config.securityLevel !== 'loose') {
91835 return;
91836 }
91837
91838 if (typeof functionName === 'undefined') {
91839 return;
91840 }
91841
91842 var argList = [];
91843
91844 if (typeof functionArgs === 'string') {
91845 /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */
91846 argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
91847
91848 for (var i = 0; i < argList.length; i++) {
91849 var item = argList[i].trim();
91850 /* Removes all double quotes at the start and end of an argument */
91851
91852 /* This preserves all starting and ending whitespace inside */
91853
91854 if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
91855 item = item.substr(1, item.length - 2);
91856 }
91857
91858 argList[i] = item;
91859 }
91860 }
91861 /* if no arguments passed into callback, default to passing in id */
91862
91863
91864 if (argList.length === 0) {
91865 argList.push(id);
91866 }
91867
91868 var rawTask = findTaskById(id);
91869
91870 if (typeof rawTask !== 'undefined') {
91871 pushFun(id, function () {
91872 var _window;
91873
91874 (_window = window)[functionName].apply(_window, _toConsumableArray(argList));
91875 });
91876 }
91877};
91878/**
91879 * The callbackFunction is executed in a click event bound to the task with the specified id or the task's assigned text
91880 * @param id The task's id
91881 * @param callbackFunction A function to be executed when clicked on the task or the task's text
91882 */
91883
91884
91885var pushFun = function pushFun(id, callbackFunction) {
91886 funs.push(function () {
91887 // const elem = d3.select(element).select(`[id="${id}"]`)
91888 var elem = document.querySelector("[id=\"".concat(id, "\"]"));
91889
91890 if (elem !== null) {
91891 elem.addEventListener('click', function () {
91892 callbackFunction();
91893 });
91894 }
91895 });
91896 funs.push(function () {
91897 // const elem = d3.select(element).select(`[id="${id}-text"]`)
91898 var elem = document.querySelector("[id=\"".concat(id, "-text\"]"));
91899
91900 if (elem !== null) {
91901 elem.addEventListener('click', function () {
91902 callbackFunction();
91903 });
91904 }
91905 });
91906};
91907/**
91908 * Called by parser when a click definition is found. Registers an event handler.
91909 * @param ids Comma separated list of ids
91910 * @param functionName Function to be called on click
91911 * @param functionArgs Function args the function should be called with
91912 */
91913
91914
91915var setClickEvent = function setClickEvent(ids, functionName, functionArgs) {
91916 ids.split(',').forEach(function (id) {
91917 setClickFun(id, functionName, functionArgs);
91918 });
91919 setClass(ids, 'clickable');
91920};
91921/**
91922 * Binds all functions previously added to fun (specified through click) to the element
91923 * @param element
91924 */
91925
91926var bindFunctions = function bindFunctions(element) {
91927 funs.forEach(function (fun) {
91928 fun(element);
91929 });
91930};
91931/* harmony default export */ __webpack_exports__["default"] = ({
91932 clear: clear,
91933 setDateFormat: setDateFormat,
91934 getDateFormat: getDateFormat,
91935 enableInclusiveEndDates: enableInclusiveEndDates,
91936 endDatesAreInclusive: endDatesAreInclusive,
91937 setAxisFormat: setAxisFormat,
91938 getAxisFormat: getAxisFormat,
91939 setTitle: setTitle,
91940 getTitle: getTitle,
91941 addSection: addSection,
91942 getSections: getSections,
91943 getTasks: getTasks,
91944 addTask: addTask,
91945 findTaskById: findTaskById,
91946 addTaskOrg: addTaskOrg,
91947 setExcludes: setExcludes,
91948 getExcludes: getExcludes,
91949 setClickEvent: setClickEvent,
91950 setLink: setLink,
91951 bindFunctions: bindFunctions,
91952 durationToDate: durationToDate
91953});
91954
91955function getTaskTags(data, task, tags) {
91956 var matchFound = true;
91957
91958 while (matchFound) {
91959 matchFound = false;
91960 tags.forEach(function (t) {
91961 var pattern = '^\\s*' + t + '\\s*$';
91962 var regex = new RegExp(pattern);
91963
91964 if (data[0].match(regex)) {
91965 task[t] = true;
91966 data.shift(1);
91967 matchFound = true;
91968 }
91969 });
91970 }
91971}
91972
91973/***/ }),
91974
91975/***/ "./src/diagrams/gantt/ganttRenderer.js":
91976/*!*********************************************!*\
91977 !*** ./src/diagrams/gantt/ganttRenderer.js ***!
91978 \*********************************************/
91979/*! exports provided: setConf, draw, default */
91980/***/ (function(module, __webpack_exports__, __webpack_require__) {
91981
91982"use strict";
91983__webpack_require__.r(__webpack_exports__);
91984/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
91985/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
91986/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
91987/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison");
91988/* harmony import */ var _parser_gantt__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__);
91989/* harmony import */ var _ganttDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ganttDb */ "./src/diagrams/gantt/ganttDb.js");
91990
91991
91992
91993_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy = _ganttDb__WEBPACK_IMPORTED_MODULE_2__["default"];
91994var conf = {
91995 titleTopMargin: 25,
91996 barHeight: 20,
91997 barGap: 4,
91998 topPadding: 50,
91999 rightPadding: 75,
92000 leftPadding: 75,
92001 gridLineStartPadding: 35,
92002 fontSize: 11,
92003 fontFamily: '"Open-Sans", "sans-serif"'
92004};
92005var setConf = function setConf(cnf) {
92006 var keys = Object.keys(cnf);
92007 keys.forEach(function (key) {
92008 conf[key] = cnf[key];
92009 });
92010};
92011var w;
92012var draw = function draw(text, id) {
92013 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.clear();
92014 _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].parse(text);
92015 var elem = document.getElementById(id);
92016 w = elem.parentElement.offsetWidth;
92017
92018 if (typeof w === 'undefined') {
92019 w = 1200;
92020 }
92021
92022 if (typeof conf.useWidth !== 'undefined') {
92023 w = conf.useWidth;
92024 }
92025
92026 var taskArray = _parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTasks(); // Set height based on number of tasks
92027
92028 var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;
92029 elem.setAttribute('height', '100%'); // Set viewBox
92030
92031 elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
92032 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id=\"".concat(id, "\"]")); // Set timescale
92033
92034 var timeScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleTime"]().domain([d3__WEBPACK_IMPORTED_MODULE_0__["min"](taskArray, function (d) {
92035 return d.startTime;
92036 }), d3__WEBPACK_IMPORTED_MODULE_0__["max"](taskArray, function (d) {
92037 return d.endTime;
92038 })]).rangeRound([0, w - conf.leftPadding - conf.rightPadding]);
92039 var categories = [];
92040
92041 for (var i = 0; i < taskArray.length; i++) {
92042 categories.push(taskArray[i].type);
92043 }
92044
92045 var catsUnfiltered = categories; // for vert labels
92046
92047 categories = checkUnique(categories);
92048 makeGant(taskArray, w, h);
92049
92050 if (typeof conf.useWidth !== 'undefined') {
92051 elem.setAttribute('width', w);
92052 }
92053
92054 svg.append('text').text(_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getTitle()).attr('x', w / 2).attr('y', conf.titleTopMargin).attr('class', 'titleText');
92055
92056 function makeGant(tasks, pageWidth, pageHeight) {
92057 var barHeight = conf.barHeight;
92058 var gap = barHeight + conf.barGap;
92059 var topPadding = conf.topPadding;
92060 var leftPadding = conf.leftPadding;
92061 var colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleLinear"]().domain([0, categories.length]).range(['#00B9FA', '#F95002']).interpolate(d3__WEBPACK_IMPORTED_MODULE_0__["interpolateHcl"]);
92062 makeGrid(leftPadding, topPadding, pageWidth, pageHeight);
92063 drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);
92064 vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);
92065 drawToday(leftPadding, topPadding, pageWidth, pageHeight);
92066 }
92067
92068 function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {
92069 // Draw background rects covering the entire width of the graph, these form the section rows.
92070 svg.append('g').selectAll('rect').data(theArray).enter().append('rect').attr('x', 0).attr('y', function (d, i) {
92071 return i * theGap + theTopPad - 2;
92072 }).attr('width', function () {
92073 return w - conf.rightPadding / 2;
92074 }).attr('height', theGap).attr('class', function (d) {
92075 for (var _i = 0; _i < categories.length; _i++) {
92076 if (d.type === categories[_i]) {
92077 return 'section section' + _i % conf.numberSectionStyles;
92078 }
92079 }
92080
92081 return 'section section0';
92082 }); // Draw the rects representing the tasks
92083
92084 var rectangles = svg.append('g').selectAll('rect').data(theArray).enter();
92085 rectangles.append('rect').attr('id', function (d) {
92086 return d.id;
92087 }).attr('rx', 3).attr('ry', 3).attr('x', function (d) {
92088 if (d.milestone) {
92089 return timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
92090 }
92091
92092 return timeScale(d.startTime) + theSidePad;
92093 }).attr('y', function (d, i) {
92094 return i * theGap + theTopPad;
92095 }).attr('width', function (d) {
92096 if (d.milestone) {
92097 return theBarHeight;
92098 }
92099
92100 return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);
92101 }).attr('height', theBarHeight).attr('transform-origin', function (d, i) {
92102 return (timeScale(d.startTime) + theSidePad + 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))).toString() + 'px ' + (i * theGap + theTopPad + 0.5 * theBarHeight).toString() + 'px';
92103 }).attr('class', function (d) {
92104 var res = 'task';
92105 var classStr = '';
92106
92107 if (d.classes.length > 0) {
92108 classStr = d.classes.join(' ');
92109 }
92110
92111 var secNum = 0;
92112
92113 for (var _i2 = 0; _i2 < categories.length; _i2++) {
92114 if (d.type === categories[_i2]) {
92115 secNum = _i2 % conf.numberSectionStyles;
92116 }
92117 }
92118
92119 var taskClass = '';
92120
92121 if (d.active) {
92122 if (d.crit) {
92123 taskClass += ' activeCrit';
92124 } else {
92125 taskClass = ' active';
92126 }
92127 } else if (d.done) {
92128 if (d.crit) {
92129 taskClass = ' doneCrit';
92130 } else {
92131 taskClass = ' done';
92132 }
92133 } else {
92134 if (d.crit) {
92135 taskClass += ' crit';
92136 }
92137 }
92138
92139 if (taskClass.length === 0) {
92140 taskClass = ' task';
92141 }
92142
92143 if (d.milestone) {
92144 taskClass = ' milestone ' + taskClass;
92145 }
92146
92147 taskClass += secNum;
92148 taskClass += ' ' + classStr;
92149 return res + taskClass;
92150 }); // Append task labels
92151
92152 rectangles.append('text').attr('id', function (d) {
92153 return d.id + '-text';
92154 }).text(function (d) {
92155 return d.task;
92156 }).attr('font-size', conf.fontSize).attr('x', function (d) {
92157 var startX = timeScale(d.startTime);
92158 var endX = timeScale(d.renderEndTime || d.endTime);
92159
92160 if (d.milestone) {
92161 startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;
92162 }
92163
92164 if (d.milestone) {
92165 endX = startX + theBarHeight;
92166 }
92167
92168 var textWidth = this.getBBox().width; // Check id text width > width of rectangle
92169
92170 if (textWidth > endX - startX) {
92171 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
92172 return startX + theSidePad - 5;
92173 } else {
92174 return endX + theSidePad + 5;
92175 }
92176 } else {
92177 return (endX - startX) / 2 + startX + theSidePad;
92178 }
92179 }).attr('y', function (d, i) {
92180 return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;
92181 }).attr('text-height', theBarHeight).attr('class', function (d) {
92182 var startX = timeScale(d.startTime);
92183 var endX = timeScale(d.endTime);
92184
92185 if (d.milestone) {
92186 endX = startX + theBarHeight;
92187 }
92188
92189 var textWidth = this.getBBox().width;
92190 var classStr = '';
92191
92192 if (d.classes.length > 0) {
92193 classStr = d.classes.join(' ');
92194 }
92195
92196 var secNum = 0;
92197
92198 for (var _i3 = 0; _i3 < categories.length; _i3++) {
92199 if (d.type === categories[_i3]) {
92200 secNum = _i3 % conf.numberSectionStyles;
92201 }
92202 }
92203
92204 var taskType = '';
92205
92206 if (d.active) {
92207 if (d.crit) {
92208 taskType = 'activeCritText' + secNum;
92209 } else {
92210 taskType = 'activeText' + secNum;
92211 }
92212 }
92213
92214 if (d.done) {
92215 if (d.crit) {
92216 taskType = taskType + ' doneCritText' + secNum;
92217 } else {
92218 taskType = taskType + ' doneText' + secNum;
92219 }
92220 } else {
92221 if (d.crit) {
92222 taskType = taskType + ' critText' + secNum;
92223 }
92224 }
92225
92226 if (d.milestone) {
92227 taskType += ' milestoneText';
92228 } // Check id text width > width of rectangle
92229
92230
92231 if (textWidth > endX - startX) {
92232 if (endX + textWidth + 1.5 * conf.leftPadding > w) {
92233 return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;
92234 } else {
92235 return classStr + ' taskTextOutsideRight taskTextOutside' + secNum + ' ' + taskType + ' width-' + textWidth;
92236 }
92237 } else {
92238 return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;
92239 }
92240 });
92241 }
92242
92243 function makeGrid(theSidePad, theTopPad, w, h) {
92244 var xAxis = d3__WEBPACK_IMPORTED_MODULE_0__["axisBottom"](timeScale).tickSize(-h + theTopPad + conf.gridLineStartPadding).tickFormat(d3__WEBPACK_IMPORTED_MODULE_0__["timeFormat"](_parser_gantt__WEBPACK_IMPORTED_MODULE_1__["parser"].yy.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));
92245 svg.append('g').attr('class', 'grid').attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')').call(xAxis).selectAll('text').style('text-anchor', 'middle').attr('fill', '#000').attr('stroke', 'none').attr('font-size', 10).attr('dy', '1em');
92246 }
92247
92248 function vertLabels(theGap, theTopPad) {
92249 var numOccurances = [];
92250 var prevGap = 0;
92251
92252 for (var _i4 = 0; _i4 < categories.length; _i4++) {
92253 numOccurances[_i4] = [categories[_i4], getCount(categories[_i4], catsUnfiltered)];
92254 }
92255
92256 svg.append('g') // without doing this, impossible to put grid lines behind text
92257 .selectAll('text').data(numOccurances).enter().append('text').text(function (d) {
92258 return d[0];
92259 }).attr('x', 10).attr('y', function (d, i) {
92260 if (i > 0) {
92261 for (var j = 0; j < i; j++) {
92262 prevGap += numOccurances[i - 1][1];
92263 return d[1] * theGap / 2 + prevGap * theGap + theTopPad;
92264 }
92265 } else {
92266 return d[1] * theGap / 2 + theTopPad;
92267 }
92268 }).attr('class', function (d) {
92269 for (var _i5 = 0; _i5 < categories.length; _i5++) {
92270 if (d[0] === categories[_i5]) {
92271 return 'sectionTitle sectionTitle' + _i5 % conf.numberSectionStyles;
92272 }
92273 }
92274
92275 return 'sectionTitle';
92276 });
92277 }
92278
92279 function drawToday(theSidePad, theTopPad, w, h) {
92280 var todayG = svg.append('g').attr('class', 'today');
92281 var today = new Date();
92282 todayG.append('line').attr('x1', timeScale(today) + theSidePad).attr('x2', timeScale(today) + theSidePad).attr('y1', conf.titleTopMargin).attr('y2', h - conf.titleTopMargin).attr('class', 'today');
92283 } // from this stackexchange question: http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript
92284
92285
92286 function checkUnique(arr) {
92287 var hash = {};
92288 var result = [];
92289
92290 for (var _i6 = 0, l = arr.length; _i6 < l; ++_i6) {
92291 if (!hash.hasOwnProperty(arr[_i6])) {
92292 // eslint-disable-line
92293 // it works with objects! in FF, at least
92294 hash[arr[_i6]] = true;
92295 result.push(arr[_i6]);
92296 }
92297 }
92298
92299 return result;
92300 } // from this stackexchange question: http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array
92301
92302
92303 function getCounts(arr) {
92304 var i = arr.length; // const to loop over
92305
92306 var obj = {}; // obj to store results
92307
92308 while (i) {
92309 obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences
92310 }
92311
92312 return obj;
92313 } // get specific from everything
92314
92315
92316 function getCount(word, arr) {
92317 return getCounts(arr)[word] || 0;
92318 }
92319};
92320/* harmony default export */ __webpack_exports__["default"] = ({
92321 setConf: setConf,
92322 draw: draw
92323});
92324
92325/***/ }),
92326
92327/***/ "./src/diagrams/gantt/parser/gantt.jison":
92328/*!***********************************************!*\
92329 !*** ./src/diagrams/gantt/parser/gantt.jison ***!
92330 \***********************************************/
92331/*! no static exports found */
92332/***/ (function(module, exports, __webpack_require__) {
92333
92334/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
92335/*
92336 Returns a Parser object of the following structure:
92337
92338 Parser: {
92339 yy: {}
92340 }
92341
92342 Parser.prototype: {
92343 yy: {},
92344 trace: function(),
92345 symbols_: {associative list: name ==> number},
92346 terminals_: {associative list: number ==> name},
92347 productions_: [...],
92348 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
92349 table: [...],
92350 defaultActions: {...},
92351 parseError: function(str, hash),
92352 parse: function(input),
92353
92354 lexer: {
92355 EOF: 1,
92356 parseError: function(str, hash),
92357 setInput: function(input),
92358 input: function(),
92359 unput: function(str),
92360 more: function(),
92361 less: function(n),
92362 pastInput: function(),
92363 upcomingInput: function(),
92364 showPosition: function(),
92365 test_match: function(regex_match_array, rule_index),
92366 next: function(),
92367 lex: function(),
92368 begin: function(condition),
92369 popState: function(),
92370 _currentRules: function(),
92371 topState: function(),
92372 pushState: function(condition),
92373
92374 options: {
92375 ranges: boolean (optional: true ==> token location info will include a .range[] member)
92376 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
92377 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
92378 },
92379
92380 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
92381 rules: [...],
92382 conditions: {associative list: name ==> set},
92383 }
92384 }
92385
92386
92387 token location info (@$, _$, etc.): {
92388 first_line: n,
92389 last_line: n,
92390 first_column: n,
92391 last_column: n,
92392 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
92393 }
92394
92395
92396 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
92397 text: (matched text)
92398 token: (the produced terminal token, if any)
92399 line: (yylineno)
92400 }
92401 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
92402 loc: (yylloc)
92403 expected: (string describing the set of expected tokens)
92404 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
92405 }
92406*/
92407var parser = (function(){
92408var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,8,10,11,12,13,14,15,16,18,20],$V1=[1,9],$V2=[1,10],$V3=[1,11],$V4=[1,12],$V5=[1,13],$V6=[1,14],$V7=[1,16],$V8=[1,17];
92409var parser = {trace: function trace () { },
92410yy: {},
92411symbols_: {"error":2,"start":3,"gantt":4,"document":5,"EOF":6,"line":7,"SPACE":8,"statement":9,"NL":10,"dateFormat":11,"inclusiveEndDates":12,"axisFormat":13,"excludes":14,"title":15,"section":16,"clickStatement":17,"taskTxt":18,"taskData":19,"click":20,"callbackname":21,"callbackargs":22,"href":23,"clickStatementDebug":24,"$accept":0,"$end":1},
92412terminals_: {2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"title",16:"section",18:"taskTxt",19:"taskData",20:"click",21:"callbackname",22:"callbackargs",23:"href"},
92413productions_: [0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[17,2],[17,3],[17,3],[17,4],[17,3],[17,4],[17,2],[24,2],[24,3],[24,3],[24,4],[24,3],[24,4],[24,2]],
92414performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
92415/* this == yyval */
92416
92417var $0 = $$.length - 1;
92418switch (yystate) {
92419case 1:
92420 return $$[$0-1];
92421break;
92422case 2:
92423 this.$ = []
92424break;
92425case 3:
92426$$[$0-1].push($$[$0]);this.$ = $$[$0-1]
92427break;
92428case 4: case 5:
92429 this.$ = $$[$0]
92430break;
92431case 6: case 7:
92432 this.$=[];
92433break;
92434case 8:
92435yy.setDateFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
92436break;
92437case 9:
92438yy.enableInclusiveEndDates();this.$=$$[$0].substr(18);
92439break;
92440case 10:
92441yy.setAxisFormat($$[$0].substr(11));this.$=$$[$0].substr(11);
92442break;
92443case 11:
92444yy.setExcludes($$[$0].substr(9));this.$=$$[$0].substr(9);
92445break;
92446case 12:
92447yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
92448break;
92449case 13:
92450yy.addSection($$[$0].substr(8));this.$=$$[$0].substr(8);
92451break;
92452case 15:
92453yy.addTask($$[$0-1],$$[$0]);this.$='task';
92454break;
92455case 16:
92456this.$ = $$[$0-1];yy.setClickEvent($$[$0-1], $$[$0], null);
92457break;
92458case 17:
92459this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);
92460break;
92461case 18:
92462this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0-1], null);yy.setLink($$[$0-2],$$[$0]);
92463break;
92464case 19:
92465this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setLink($$[$0-3],$$[$0]);
92466break;
92467case 20:
92468this.$ = $$[$0-2];yy.setClickEvent($$[$0-2], $$[$0], null);yy.setLink($$[$0-2],$$[$0-1]);
92469break;
92470case 21:
92471this.$ = $$[$0-3];yy.setClickEvent($$[$0-3], $$[$0-1], $$[$0]);yy.setLink($$[$0-3],$$[$0-2]);
92472break;
92473case 22:
92474this.$ = $$[$0-1];yy.setLink($$[$0-1], $$[$0]);
92475break;
92476case 23: case 29:
92477this.$=$$[$0-1] + ' ' + $$[$0];
92478break;
92479case 24: case 25: case 27:
92480this.$=$$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
92481break;
92482case 26: case 28:
92483this.$=$$[$0-3] + ' ' + $$[$0-2] + ' ' + $$[$0-1] + ' ' + $$[$0];
92484break;
92485}
92486},
92487table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,7],{1:[2,1]}),o($V0,[2,3]),{9:18,11:$V1,12:$V2,13:$V3,14:$V4,15:$V5,16:$V6,17:15,18:$V7,20:$V8},o($V0,[2,5]),o($V0,[2,6]),o($V0,[2,8]),o($V0,[2,9]),o($V0,[2,10]),o($V0,[2,11]),o($V0,[2,12]),o($V0,[2,13]),o($V0,[2,14]),{19:[1,19]},{21:[1,20],23:[1,21]},o($V0,[2,4]),o($V0,[2,15]),o($V0,[2,16],{22:[1,22],23:[1,23]}),o($V0,[2,22],{21:[1,24]}),o($V0,[2,17],{23:[1,25]}),o($V0,[2,18]),o($V0,[2,20],{22:[1,26]}),o($V0,[2,19]),o($V0,[2,21])],
92488defaultActions: {},
92489parseError: function parseError (str, hash) {
92490 if (hash.recoverable) {
92491 this.trace(str);
92492 } else {
92493 var error = new Error(str);
92494 error.hash = hash;
92495 throw error;
92496 }
92497},
92498parse: function parse(input) {
92499 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
92500 var args = lstack.slice.call(arguments, 1);
92501 var lexer = Object.create(this.lexer);
92502 var sharedState = { yy: {} };
92503 for (var k in this.yy) {
92504 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
92505 sharedState.yy[k] = this.yy[k];
92506 }
92507 }
92508 lexer.setInput(input, sharedState.yy);
92509 sharedState.yy.lexer = lexer;
92510 sharedState.yy.parser = this;
92511 if (typeof lexer.yylloc == 'undefined') {
92512 lexer.yylloc = {};
92513 }
92514 var yyloc = lexer.yylloc;
92515 lstack.push(yyloc);
92516 var ranges = lexer.options && lexer.options.ranges;
92517 if (typeof sharedState.yy.parseError === 'function') {
92518 this.parseError = sharedState.yy.parseError;
92519 } else {
92520 this.parseError = Object.getPrototypeOf(this).parseError;
92521 }
92522 function popStack(n) {
92523 stack.length = stack.length - 2 * n;
92524 vstack.length = vstack.length - n;
92525 lstack.length = lstack.length - n;
92526 }
92527 function lex() {
92528 var token;
92529 token = tstack.pop() || lexer.lex() || EOF;
92530 if (typeof token !== 'number') {
92531 if (token instanceof Array) {
92532 tstack = token;
92533 token = tstack.pop();
92534 }
92535 token = self.symbols_[token] || token;
92536 }
92537 return token;
92538 }
92539 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
92540 while (true) {
92541 state = stack[stack.length - 1];
92542 if (this.defaultActions[state]) {
92543 action = this.defaultActions[state];
92544 } else {
92545 if (symbol === null || typeof symbol == 'undefined') {
92546 symbol = lex();
92547 }
92548 action = table[state] && table[state][symbol];
92549 }
92550 if (typeof action === 'undefined' || !action.length || !action[0]) {
92551 var errStr = '';
92552 expected = [];
92553 for (p in table[state]) {
92554 if (this.terminals_[p] && p > TERROR) {
92555 expected.push('\'' + this.terminals_[p] + '\'');
92556 }
92557 }
92558 if (lexer.showPosition) {
92559 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
92560 } else {
92561 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
92562 }
92563 this.parseError(errStr, {
92564 text: lexer.match,
92565 token: this.terminals_[symbol] || symbol,
92566 line: lexer.yylineno,
92567 loc: yyloc,
92568 expected: expected
92569 });
92570 }
92571 if (action[0] instanceof Array && action.length > 1) {
92572 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
92573 }
92574 switch (action[0]) {
92575 case 1:
92576 stack.push(symbol);
92577 vstack.push(lexer.yytext);
92578 lstack.push(lexer.yylloc);
92579 stack.push(action[1]);
92580 symbol = null;
92581 if (!preErrorSymbol) {
92582 yyleng = lexer.yyleng;
92583 yytext = lexer.yytext;
92584 yylineno = lexer.yylineno;
92585 yyloc = lexer.yylloc;
92586 if (recovering > 0) {
92587 recovering--;
92588 }
92589 } else {
92590 symbol = preErrorSymbol;
92591 preErrorSymbol = null;
92592 }
92593 break;
92594 case 2:
92595 len = this.productions_[action[1]][1];
92596 yyval.$ = vstack[vstack.length - len];
92597 yyval._$ = {
92598 first_line: lstack[lstack.length - (len || 1)].first_line,
92599 last_line: lstack[lstack.length - 1].last_line,
92600 first_column: lstack[lstack.length - (len || 1)].first_column,
92601 last_column: lstack[lstack.length - 1].last_column
92602 };
92603 if (ranges) {
92604 yyval._$.range = [
92605 lstack[lstack.length - (len || 1)].range[0],
92606 lstack[lstack.length - 1].range[1]
92607 ];
92608 }
92609 r = this.performAction.apply(yyval, [
92610 yytext,
92611 yyleng,
92612 yylineno,
92613 sharedState.yy,
92614 action[1],
92615 vstack,
92616 lstack
92617 ].concat(args));
92618 if (typeof r !== 'undefined') {
92619 return r;
92620 }
92621 if (len) {
92622 stack = stack.slice(0, -1 * len * 2);
92623 vstack = vstack.slice(0, -1 * len);
92624 lstack = lstack.slice(0, -1 * len);
92625 }
92626 stack.push(this.productions_[action[1]][0]);
92627 vstack.push(yyval.$);
92628 lstack.push(yyval._$);
92629 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
92630 stack.push(newState);
92631 break;
92632 case 3:
92633 return true;
92634 }
92635 }
92636 return true;
92637}};
92638
92639/* generated by jison-lex 0.3.4 */
92640var lexer = (function(){
92641var lexer = ({
92642
92643EOF:1,
92644
92645parseError:function parseError(str, hash) {
92646 if (this.yy.parser) {
92647 this.yy.parser.parseError(str, hash);
92648 } else {
92649 throw new Error(str);
92650 }
92651 },
92652
92653// resets the lexer, sets new input
92654setInput:function (input, yy) {
92655 this.yy = yy || this.yy || {};
92656 this._input = input;
92657 this._more = this._backtrack = this.done = false;
92658 this.yylineno = this.yyleng = 0;
92659 this.yytext = this.matched = this.match = '';
92660 this.conditionStack = ['INITIAL'];
92661 this.yylloc = {
92662 first_line: 1,
92663 first_column: 0,
92664 last_line: 1,
92665 last_column: 0
92666 };
92667 if (this.options.ranges) {
92668 this.yylloc.range = [0,0];
92669 }
92670 this.offset = 0;
92671 return this;
92672 },
92673
92674// consumes and returns one char from the input
92675input:function () {
92676 var ch = this._input[0];
92677 this.yytext += ch;
92678 this.yyleng++;
92679 this.offset++;
92680 this.match += ch;
92681 this.matched += ch;
92682 var lines = ch.match(/(?:\r\n?|\n).*/g);
92683 if (lines) {
92684 this.yylineno++;
92685 this.yylloc.last_line++;
92686 } else {
92687 this.yylloc.last_column++;
92688 }
92689 if (this.options.ranges) {
92690 this.yylloc.range[1]++;
92691 }
92692
92693 this._input = this._input.slice(1);
92694 return ch;
92695 },
92696
92697// unshifts one char (or a string) into the input
92698unput:function (ch) {
92699 var len = ch.length;
92700 var lines = ch.split(/(?:\r\n?|\n)/g);
92701
92702 this._input = ch + this._input;
92703 this.yytext = this.yytext.substr(0, this.yytext.length - len);
92704 //this.yyleng -= len;
92705 this.offset -= len;
92706 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
92707 this.match = this.match.substr(0, this.match.length - 1);
92708 this.matched = this.matched.substr(0, this.matched.length - 1);
92709
92710 if (lines.length - 1) {
92711 this.yylineno -= lines.length - 1;
92712 }
92713 var r = this.yylloc.range;
92714
92715 this.yylloc = {
92716 first_line: this.yylloc.first_line,
92717 last_line: this.yylineno + 1,
92718 first_column: this.yylloc.first_column,
92719 last_column: lines ?
92720 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
92721 + oldLines[oldLines.length - lines.length].length - lines[0].length :
92722 this.yylloc.first_column - len
92723 };
92724
92725 if (this.options.ranges) {
92726 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
92727 }
92728 this.yyleng = this.yytext.length;
92729 return this;
92730 },
92731
92732// When called from action, caches matched text and appends it on next action
92733more:function () {
92734 this._more = true;
92735 return this;
92736 },
92737
92738// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
92739reject:function () {
92740 if (this.options.backtrack_lexer) {
92741 this._backtrack = true;
92742 } else {
92743 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
92744 text: "",
92745 token: null,
92746 line: this.yylineno
92747 });
92748
92749 }
92750 return this;
92751 },
92752
92753// retain first n characters of the match
92754less:function (n) {
92755 this.unput(this.match.slice(n));
92756 },
92757
92758// displays already matched input, i.e. for error messages
92759pastInput:function () {
92760 var past = this.matched.substr(0, this.matched.length - this.match.length);
92761 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
92762 },
92763
92764// displays upcoming input, i.e. for error messages
92765upcomingInput:function () {
92766 var next = this.match;
92767 if (next.length < 20) {
92768 next += this._input.substr(0, 20-next.length);
92769 }
92770 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
92771 },
92772
92773// displays the character position where the lexing error occurred, i.e. for error messages
92774showPosition:function () {
92775 var pre = this.pastInput();
92776 var c = new Array(pre.length + 1).join("-");
92777 return pre + this.upcomingInput() + "\n" + c + "^";
92778 },
92779
92780// test the lexed token: return FALSE when not a match, otherwise return token
92781test_match:function(match, indexed_rule) {
92782 var token,
92783 lines,
92784 backup;
92785
92786 if (this.options.backtrack_lexer) {
92787 // save context
92788 backup = {
92789 yylineno: this.yylineno,
92790 yylloc: {
92791 first_line: this.yylloc.first_line,
92792 last_line: this.last_line,
92793 first_column: this.yylloc.first_column,
92794 last_column: this.yylloc.last_column
92795 },
92796 yytext: this.yytext,
92797 match: this.match,
92798 matches: this.matches,
92799 matched: this.matched,
92800 yyleng: this.yyleng,
92801 offset: this.offset,
92802 _more: this._more,
92803 _input: this._input,
92804 yy: this.yy,
92805 conditionStack: this.conditionStack.slice(0),
92806 done: this.done
92807 };
92808 if (this.options.ranges) {
92809 backup.yylloc.range = this.yylloc.range.slice(0);
92810 }
92811 }
92812
92813 lines = match[0].match(/(?:\r\n?|\n).*/g);
92814 if (lines) {
92815 this.yylineno += lines.length;
92816 }
92817 this.yylloc = {
92818 first_line: this.yylloc.last_line,
92819 last_line: this.yylineno + 1,
92820 first_column: this.yylloc.last_column,
92821 last_column: lines ?
92822 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
92823 this.yylloc.last_column + match[0].length
92824 };
92825 this.yytext += match[0];
92826 this.match += match[0];
92827 this.matches = match;
92828 this.yyleng = this.yytext.length;
92829 if (this.options.ranges) {
92830 this.yylloc.range = [this.offset, this.offset += this.yyleng];
92831 }
92832 this._more = false;
92833 this._backtrack = false;
92834 this._input = this._input.slice(match[0].length);
92835 this.matched += match[0];
92836 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
92837 if (this.done && this._input) {
92838 this.done = false;
92839 }
92840 if (token) {
92841 return token;
92842 } else if (this._backtrack) {
92843 // recover context
92844 for (var k in backup) {
92845 this[k] = backup[k];
92846 }
92847 return false; // rule action called reject() implying the next rule should be tested instead.
92848 }
92849 return false;
92850 },
92851
92852// return next match in input
92853next:function () {
92854 if (this.done) {
92855 return this.EOF;
92856 }
92857 if (!this._input) {
92858 this.done = true;
92859 }
92860
92861 var token,
92862 match,
92863 tempMatch,
92864 index;
92865 if (!this._more) {
92866 this.yytext = '';
92867 this.match = '';
92868 }
92869 var rules = this._currentRules();
92870 for (var i = 0; i < rules.length; i++) {
92871 tempMatch = this._input.match(this.rules[rules[i]]);
92872 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
92873 match = tempMatch;
92874 index = i;
92875 if (this.options.backtrack_lexer) {
92876 token = this.test_match(tempMatch, rules[i]);
92877 if (token !== false) {
92878 return token;
92879 } else if (this._backtrack) {
92880 match = false;
92881 continue; // rule action called reject() implying a rule MISmatch.
92882 } else {
92883 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
92884 return false;
92885 }
92886 } else if (!this.options.flex) {
92887 break;
92888 }
92889 }
92890 }
92891 if (match) {
92892 token = this.test_match(match, rules[index]);
92893 if (token !== false) {
92894 return token;
92895 }
92896 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
92897 return false;
92898 }
92899 if (this._input === "") {
92900 return this.EOF;
92901 } else {
92902 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
92903 text: "",
92904 token: null,
92905 line: this.yylineno
92906 });
92907 }
92908 },
92909
92910// return next match that has a token
92911lex:function lex () {
92912 var r = this.next();
92913 if (r) {
92914 return r;
92915 } else {
92916 return this.lex();
92917 }
92918 },
92919
92920// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
92921begin:function begin (condition) {
92922 this.conditionStack.push(condition);
92923 },
92924
92925// pop the previously active lexer condition state off the condition stack
92926popState:function popState () {
92927 var n = this.conditionStack.length - 1;
92928 if (n > 0) {
92929 return this.conditionStack.pop();
92930 } else {
92931 return this.conditionStack[0];
92932 }
92933 },
92934
92935// produce the lexer rule set which is active for the currently active lexer condition state
92936_currentRules:function _currentRules () {
92937 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
92938 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
92939 } else {
92940 return this.conditions["INITIAL"].rules;
92941 }
92942 },
92943
92944// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
92945topState:function topState (n) {
92946 n = this.conditionStack.length - 1 - Math.abs(n || 0);
92947 if (n >= 0) {
92948 return this.conditionStack[n];
92949 } else {
92950 return "INITIAL";
92951 }
92952 },
92953
92954// alias for begin(condition)
92955pushState:function pushState (condition) {
92956 this.begin(condition);
92957 },
92958
92959// return the number of states currently on the stack
92960stateStackSize:function stateStackSize() {
92961 return this.conditionStack.length;
92962 },
92963options: {"case-insensitive":true},
92964performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
92965var YYSTATE=YY_START;
92966switch($avoiding_name_collisions) {
92967case 0:return 10;
92968break;
92969case 1:/* skip whitespace */
92970break;
92971case 2:/* skip comments */
92972break;
92973case 3:/* skip comments */
92974break;
92975case 4:this.begin("href");
92976break;
92977case 5:this.popState();
92978break;
92979case 6:return 23;
92980break;
92981case 7:this.begin("callbackname");
92982break;
92983case 8:this.popState();
92984break;
92985case 9:this.popState(); this.begin("callbackargs");
92986break;
92987case 10:return 21;
92988break;
92989case 11:this.popState();
92990break;
92991case 12:return 22;
92992break;
92993case 13:this.begin("click");
92994break;
92995case 14:this.popState();
92996break;
92997case 15:return 20;
92998break;
92999case 16:return 4;
93000break;
93001case 17:return 11;
93002break;
93003case 18:return 12;
93004break;
93005case 19:return 13;
93006break;
93007case 20:return 14;
93008break;
93009case 21:return 'date';
93010break;
93011case 22:return 15;
93012break;
93013case 23:return 16;
93014break;
93015case 24:return 18;
93016break;
93017case 25:return 19;
93018break;
93019case 26:return ':';
93020break;
93021case 27:return 6;
93022break;
93023case 28:return 'INVALID';
93024break;
93025}
93026},
93027rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],
93028conditions: {"callbackargs":{"rules":[11,12],"inclusive":false},"callbackname":{"rules":[8,9,10],"inclusive":false},"href":{"rules":[5,6],"inclusive":false},"click":{"rules":[14,15],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28],"inclusive":true}}
93029});
93030return lexer;
93031})();
93032parser.lexer = lexer;
93033function Parser () {
93034 this.yy = {};
93035}
93036Parser.prototype = parser;parser.Parser = Parser;
93037return new Parser;
93038})();
93039
93040
93041if (true) {
93042exports.parser = parser;
93043exports.Parser = parser.Parser;
93044exports.parse = function () { return parser.parse.apply(parser, arguments); };
93045exports.main = function commonjsMain (args) {
93046 if (!args[1]) {
93047 console.log('Usage: '+args[0]+' FILE');
93048 process.exit(1);
93049 }
93050 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
93051 return exports.parser.parse(source);
93052};
93053if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
93054 exports.main(process.argv.slice(1));
93055}
93056}
93057/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
93058
93059/***/ }),
93060
93061/***/ "./src/diagrams/git/gitGraphAst.js":
93062/*!*****************************************!*\
93063 !*** ./src/diagrams/git/gitGraphAst.js ***!
93064 \*****************************************/
93065/*! exports provided: setDirection, setOptions, getOptions, commit, branch, merge, checkout, reset, prettyPrint, clear, getBranchesAsObjArray, getBranches, getCommits, getCommitsArray, getCurrentBranch, getDirection, getHead, default */
93066/***/ (function(module, __webpack_exports__, __webpack_require__) {
93067
93068"use strict";
93069__webpack_require__.r(__webpack_exports__);
93070/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDirection", function() { return setDirection; });
93071/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setOptions", function() { return setOptions; });
93072/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getOptions", function() { return getOptions; });
93073/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "commit", function() { return commit; });
93074/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "branch", function() { return branch; });
93075/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return merge; });
93076/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkout", function() { return checkout; });
93077/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reset", function() { return reset; });
93078/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prettyPrint", function() { return prettyPrint; });
93079/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
93080/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranchesAsObjArray", function() { return getBranchesAsObjArray; });
93081/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getBranches", function() { return getBranches; });
93082/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommits", function() { return getCommits; });
93083/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCommitsArray", function() { return getCommitsArray; });
93084/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCurrentBranch", function() { return getCurrentBranch; });
93085/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDirection", function() { return getDirection; });
93086/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getHead", function() { return getHead; });
93087/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
93088/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__);
93089/* harmony import */ var crypto_random_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! crypto-random-string */ "./node_modules/crypto-random-string/index.js");
93090/* harmony import */ var crypto_random_string__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(crypto_random_string__WEBPACK_IMPORTED_MODULE_1__);
93091/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
93092
93093
93094
93095var commits = {};
93096var head = null;
93097var branches = {
93098 master: head
93099};
93100var curBranch = 'master';
93101var direction = 'LR';
93102var seq = 0;
93103
93104function getId() {
93105 return crypto_random_string__WEBPACK_IMPORTED_MODULE_1___default()({
93106 length: 7,
93107 characters: '0123456789abcdef'
93108 });
93109}
93110
93111function isfastforwardable(currentCommit, otherCommit) {
93112 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);
93113
93114 while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit) {
93115 // only if other branch has more commits
93116 if (otherCommit.parent == null) break;
93117
93118 if (Array.isArray(otherCommit.parent)) {
93119 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('In merge commit:', otherCommit.parent);
93120 return isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) || isfastforwardable(currentCommit, commits[otherCommit.parent[1]]);
93121 } else {
93122 otherCommit = commits[otherCommit.parent];
93123 }
93124 }
93125
93126 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(currentCommit.id, otherCommit.id);
93127 return currentCommit.id === otherCommit.id;
93128}
93129
93130function isReachableFrom(currentCommit, otherCommit) {
93131 var currentSeq = currentCommit.seq;
93132 var otherSeq = otherCommit.seq;
93133 if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);
93134 return false;
93135}
93136
93137var setDirection = function setDirection(dir) {
93138 direction = dir;
93139};
93140var options = {};
93141var setOptions = function setOptions(rawOptString) {
93142 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('options str', rawOptString);
93143 rawOptString = rawOptString && rawOptString.trim();
93144 rawOptString = rawOptString || '{}';
93145
93146 try {
93147 options = JSON.parse(rawOptString);
93148 } catch (e) {
93149 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while parsing gitGraph options', e.message);
93150 }
93151};
93152var getOptions = function getOptions() {
93153 return options;
93154};
93155var commit = function commit(msg) {
93156 var commit = {
93157 id: getId(),
93158 message: msg,
93159 seq: seq++,
93160 parent: head == null ? null : head.id
93161 };
93162 head = commit;
93163 commits[commit.id] = commit;
93164 branches[curBranch] = commit.id;
93165 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('in pushCommit ' + commit.id);
93166};
93167var branch = function branch(name) {
93168 branches[name] = head != null ? head.id : null;
93169 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('in createBranch');
93170};
93171var merge = function merge(otherBranch) {
93172 var currentCommit = commits[branches[curBranch]];
93173 var otherCommit = commits[branches[otherBranch]];
93174
93175 if (isReachableFrom(currentCommit, otherCommit)) {
93176 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('Already merged');
93177 return;
93178 }
93179
93180 if (isfastforwardable(currentCommit, otherCommit)) {
93181 branches[curBranch] = branches[otherBranch];
93182 head = commits[branches[curBranch]];
93183 } else {
93184 // create merge commit
93185 var _commit = {
93186 id: getId(),
93187 message: 'merged branch ' + otherBranch + ' into ' + curBranch,
93188 seq: seq++,
93189 parent: [head == null ? null : head.id, branches[otherBranch]]
93190 };
93191 head = _commit;
93192 commits[_commit.id] = _commit;
93193 branches[curBranch] = _commit.id;
93194 }
93195
93196 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(branches);
93197 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('in mergeBranch');
93198};
93199var checkout = function checkout(branch) {
93200 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('in checkout');
93201 curBranch = branch;
93202 var id = branches[curBranch];
93203 head = commits[id];
93204};
93205var reset = function reset(commitRef) {
93206 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('in reset', commitRef);
93207 var ref = commitRef.split(':')[0];
93208 var parentCount = parseInt(commitRef.split(':')[1]);
93209 var commit = ref === 'HEAD' ? head : commits[branches[ref]];
93210 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(commit, parentCount);
93211
93212 while (parentCount > 0) {
93213 commit = commits[commit.parent];
93214 parentCount--;
93215
93216 if (!commit) {
93217 var err = 'Critical error - unique parent commit not found during reset';
93218 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error(err);
93219 throw err;
93220 }
93221 }
93222
93223 head = commit;
93224 branches[curBranch] = commit.id;
93225};
93226
93227function upsert(arr, key, newval) {
93228 var index = arr.indexOf(key);
93229
93230 if (index === -1) {
93231 arr.push(newval);
93232 } else {
93233 arr.splice(index, 1, newval);
93234 }
93235}
93236
93237function prettyPrintCommitHistory(commitArr) {
93238 var commit = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.maxBy(commitArr, 'seq');
93239
93240 var line = '';
93241 commitArr.forEach(function (c) {
93242 if (c === commit) {
93243 line += '\t*';
93244 } else {
93245 line += '\t|';
93246 }
93247 });
93248 var label = [line, commit.id, commit.seq];
93249
93250 for (var _branch in branches) {
93251 if (branches[_branch] === commit.id) label.push(_branch);
93252 }
93253
93254 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(label.join(' '));
93255
93256 if (Array.isArray(commit.parent)) {
93257 var newCommit = commits[commit.parent[0]];
93258 upsert(commitArr, commit, newCommit);
93259 commitArr.push(commits[commit.parent[1]]);
93260 } else if (commit.parent == null) {
93261 return;
93262 } else {
93263 var nextCommit = commits[commit.parent];
93264 upsert(commitArr, commit, nextCommit);
93265 }
93266
93267 commitArr = lodash__WEBPACK_IMPORTED_MODULE_0___default.a.uniqBy(commitArr, 'id');
93268 prettyPrintCommitHistory(commitArr);
93269}
93270
93271var prettyPrint = function prettyPrint() {
93272 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(commits);
93273 var node = getCommitsArray()[0];
93274 prettyPrintCommitHistory([node]);
93275};
93276var clear = function clear() {
93277 commits = {};
93278 head = null;
93279 branches = {
93280 master: head
93281 };
93282 curBranch = 'master';
93283 seq = 0;
93284};
93285var getBranchesAsObjArray = function getBranchesAsObjArray() {
93286 var branchArr = [];
93287
93288 for (var _branch2 in branches) {
93289 branchArr.push({
93290 name: _branch2,
93291 commit: commits[branches[_branch2]]
93292 });
93293 }
93294
93295 return branchArr;
93296};
93297var getBranches = function getBranches() {
93298 return branches;
93299};
93300var getCommits = function getCommits() {
93301 return commits;
93302};
93303var getCommitsArray = function getCommitsArray() {
93304 var commitArr = Object.keys(commits).map(function (key) {
93305 return commits[key];
93306 });
93307 commitArr.forEach(function (o) {
93308 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug(o.id);
93309 });
93310 return lodash__WEBPACK_IMPORTED_MODULE_0___default.a.orderBy(commitArr, ['seq'], ['desc']);
93311};
93312var getCurrentBranch = function getCurrentBranch() {
93313 return curBranch;
93314};
93315var getDirection = function getDirection() {
93316 return direction;
93317};
93318var getHead = function getHead() {
93319 return head;
93320};
93321/* harmony default export */ __webpack_exports__["default"] = ({
93322 setDirection: setDirection,
93323 setOptions: setOptions,
93324 getOptions: getOptions,
93325 commit: commit,
93326 branch: branch,
93327 merge: merge,
93328 checkout: checkout,
93329 reset: reset,
93330 prettyPrint: prettyPrint,
93331 clear: clear,
93332 getBranchesAsObjArray: getBranchesAsObjArray,
93333 getBranches: getBranches,
93334 getCommits: getCommits,
93335 getCommitsArray: getCommitsArray,
93336 getCurrentBranch: getCurrentBranch,
93337 getDirection: getDirection,
93338 getHead: getHead
93339});
93340
93341/***/ }),
93342
93343/***/ "./src/diagrams/git/gitGraphRenderer.js":
93344/*!**********************************************!*\
93345 !*** ./src/diagrams/git/gitGraphRenderer.js ***!
93346 \**********************************************/
93347/*! exports provided: setConf, draw, default */
93348/***/ (function(module, __webpack_exports__, __webpack_require__) {
93349
93350"use strict";
93351__webpack_require__.r(__webpack_exports__);
93352/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
93353/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
93354/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
93355/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
93356/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);
93357/* harmony import */ var _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
93358/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
93359/* harmony import */ var _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_gitGraph__WEBPACK_IMPORTED_MODULE_3__);
93360/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
93361/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
93362
93363
93364
93365
93366
93367
93368var allCommitsDict = {};
93369var branchNum;
93370var config = {
93371 nodeSpacing: 150,
93372 nodeFillColor: 'yellow',
93373 nodeStrokeWidth: 2,
93374 nodeStrokeColor: 'grey',
93375 lineStrokeWidth: 4,
93376 branchOffset: 50,
93377 lineColor: 'grey',
93378 leftMargin: 50,
93379 branchColors: ['#442f74', '#983351', '#609732', '#AA9A39'],
93380 nodeRadius: 10,
93381 nodeLabel: {
93382 width: 75,
93383 height: 100,
93384 x: -25,
93385 y: 0
93386 }
93387};
93388var apiConfig = {};
93389var setConf = function setConf(c) {
93390 apiConfig = c;
93391};
93392
93393function svgCreateDefs(svg) {
93394 svg.append('defs').append('g').attr('id', 'def-commit').append('circle').attr('r', config.nodeRadius).attr('cx', 0).attr('cy', 0);
93395 svg.select('#def-commit').append('foreignObject').attr('width', config.nodeLabel.width).attr('height', config.nodeLabel.height).attr('x', config.nodeLabel.x).attr('y', config.nodeLabel.y).attr('class', 'node-label').attr('requiredFeatures', 'http://www.w3.org/TR/SVG11/feature#Extensibility').append('p').html('');
93396}
93397
93398function svgDrawLine(svg, points, colorIdx, interpolate) {
93399 var curve = Object(_utils__WEBPACK_IMPORTED_MODULE_5__["interpolateToCurve"])(interpolate, d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
93400 var color = config.branchColors[colorIdx % config.branchColors.length];
93401 var lineGen = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
93402 return Math.round(d.x);
93403 }).y(function (d) {
93404 return Math.round(d.y);
93405 }).curve(curve);
93406 svg.append('svg:path').attr('d', lineGen(points)).style('stroke', color).style('stroke-width', config.lineStrokeWidth).style('fill', 'none');
93407} // Pass in the element and its pre-transform coords
93408
93409
93410function getElementCoords(element, coords) {
93411 coords = coords || element.node().getBBox();
93412 var ctm = element.node().getCTM();
93413 var xn = ctm.e + coords.x * ctm.a;
93414 var yn = ctm.f + coords.y * ctm.d;
93415 return {
93416 left: xn,
93417 top: yn,
93418 width: coords.width,
93419 height: coords.height
93420 };
93421}
93422
93423function svgDrawLineForCommits(svg, fromId, toId, direction, color) {
93424 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('svgDrawLineForCommits: ', fromId, toId);
93425 var fromBbox = getElementCoords(svg.select('#node-' + fromId + ' circle'));
93426 var toBbox = getElementCoords(svg.select('#node-' + toId + ' circle'));
93427
93428 switch (direction) {
93429 case 'LR':
93430 // (toBbox)
93431 // +--------
93432 // + (fromBbox)
93433 if (fromBbox.left - toBbox.left > config.nodeSpacing) {
93434 var lineStart = {
93435 x: fromBbox.left - config.nodeSpacing,
93436 y: toBbox.top + toBbox.height / 2
93437 };
93438 var lineEnd = {
93439 x: toBbox.left + toBbox.width,
93440 y: toBbox.top + toBbox.height / 2
93441 };
93442 svgDrawLine(svg, [lineStart, lineEnd], color, 'linear');
93443 svgDrawLine(svg, [{
93444 x: fromBbox.left,
93445 y: fromBbox.top + fromBbox.height / 2
93446 }, {
93447 x: fromBbox.left - config.nodeSpacing / 2,
93448 y: fromBbox.top + fromBbox.height / 2
93449 }, {
93450 x: fromBbox.left - config.nodeSpacing / 2,
93451 y: lineStart.y
93452 }, lineStart], color);
93453 } else {
93454 svgDrawLine(svg, [{
93455 x: fromBbox.left,
93456 y: fromBbox.top + fromBbox.height / 2
93457 }, {
93458 x: fromBbox.left - config.nodeSpacing / 2,
93459 y: fromBbox.top + fromBbox.height / 2
93460 }, {
93461 x: fromBbox.left - config.nodeSpacing / 2,
93462 y: toBbox.top + toBbox.height / 2
93463 }, {
93464 x: toBbox.left + toBbox.width,
93465 y: toBbox.top + toBbox.height / 2
93466 }], color);
93467 }
93468
93469 break;
93470
93471 case 'BT':
93472 // + (fromBbox)
93473 // |
93474 // |
93475 // + (toBbox)
93476 if (toBbox.top - fromBbox.top > config.nodeSpacing) {
93477 var _lineStart = {
93478 x: toBbox.left + toBbox.width / 2,
93479 y: fromBbox.top + fromBbox.height + config.nodeSpacing
93480 };
93481 var _lineEnd = {
93482 x: toBbox.left + toBbox.width / 2,
93483 y: toBbox.top
93484 };
93485 svgDrawLine(svg, [_lineStart, _lineEnd], color, 'linear');
93486 svgDrawLine(svg, [{
93487 x: fromBbox.left + fromBbox.width / 2,
93488 y: fromBbox.top + fromBbox.height
93489 }, {
93490 x: fromBbox.left + fromBbox.width / 2,
93491 y: fromBbox.top + fromBbox.height + config.nodeSpacing / 2
93492 }, {
93493 x: toBbox.left + toBbox.width / 2,
93494 y: _lineStart.y - config.nodeSpacing / 2
93495 }, _lineStart], color);
93496 } else {
93497 svgDrawLine(svg, [{
93498 x: fromBbox.left + fromBbox.width / 2,
93499 y: fromBbox.top + fromBbox.height
93500 }, {
93501 x: fromBbox.left + fromBbox.width / 2,
93502 y: fromBbox.top + config.nodeSpacing / 2
93503 }, {
93504 x: toBbox.left + toBbox.width / 2,
93505 y: toBbox.top - config.nodeSpacing / 2
93506 }, {
93507 x: toBbox.left + toBbox.width / 2,
93508 y: toBbox.top
93509 }], color);
93510 }
93511
93512 break;
93513 }
93514}
93515
93516function cloneNode(svg, selector) {
93517 return svg.select(selector).node().cloneNode(true);
93518}
93519
93520function renderCommitHistory(svg, commitid, branches, direction) {
93521 var commit;
93522 var numCommits = Object.keys(allCommitsDict).length;
93523
93524 if (typeof commitid === 'string') {
93525 do {
93526 commit = allCommitsDict[commitid];
93527 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in renderCommitHistory', commit.id, commit.seq);
93528
93529 if (svg.select('#node-' + commitid).size() > 0) {
93530 return;
93531 }
93532
93533 svg.append(function () {
93534 return cloneNode(svg, '#def-commit');
93535 }).attr('class', 'commit').attr('id', function () {
93536 return 'node-' + commit.id;
93537 }).attr('transform', function () {
93538 switch (direction) {
93539 case 'LR':
93540 return 'translate(' + (commit.seq * config.nodeSpacing + config.leftMargin) + ', ' + branchNum * config.branchOffset + ')';
93541
93542 case 'BT':
93543 return 'translate(' + (branchNum * config.branchOffset + config.leftMargin) + ', ' + (numCommits - commit.seq) * config.nodeSpacing + ')';
93544 }
93545 }).attr('fill', config.nodeFillColor).attr('stroke', config.nodeStrokeColor).attr('stroke-width', config.nodeStrokeWidth);
93546 var branch = void 0;
93547
93548 for (var branchName in branches) {
93549 if (branches[branchName].commit === commit) {
93550 branch = branches[branchName];
93551 break;
93552 }
93553 }
93554
93555 if (branch) {
93556 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found branch ', branch.name);
93557 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'branch-label').text(branch.name + ', ');
93558 }
93559
93560 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-id').text(commit.id);
93561
93562 if (commit.message !== '' && direction === 'BT') {
93563 svg.select('#node-' + commit.id + ' p').append('xhtml:span').attr('class', 'commit-msg').text(', ' + commit.message);
93564 }
93565
93566 commitid = commit.parent;
93567 } while (commitid && allCommitsDict[commitid]);
93568 }
93569
93570 if (Array.isArray(commitid)) {
93571 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('found merge commmit', commitid);
93572 renderCommitHistory(svg, commitid[0], branches, direction);
93573 branchNum++;
93574 renderCommitHistory(svg, commitid[1], branches, direction);
93575 branchNum--;
93576 }
93577}
93578
93579function renderLines(svg, commit, direction, branchColor) {
93580 branchColor = branchColor || 0;
93581
93582 while (commit.seq > 0 && !commit.lineDrawn) {
93583 if (typeof commit.parent === 'string') {
93584 svgDrawLineForCommits(svg, commit.id, commit.parent, direction, branchColor);
93585 commit.lineDrawn = true;
93586 commit = allCommitsDict[commit.parent];
93587 } else if (Array.isArray(commit.parent)) {
93588 svgDrawLineForCommits(svg, commit.id, commit.parent[0], direction, branchColor);
93589 svgDrawLineForCommits(svg, commit.id, commit.parent[1], direction, branchColor + 1);
93590 renderLines(svg, allCommitsDict[commit.parent[1]], direction, branchColor + 1);
93591 commit.lineDrawn = true;
93592 commit = allCommitsDict[commit.parent[0]];
93593 }
93594 }
93595}
93596
93597var draw = function draw(txt, id, ver) {
93598 try {
93599 var parser = _parser_gitGraph__WEBPACK_IMPORTED_MODULE_3___default.a.parser;
93600 parser.yy = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"];
93601 parser.yy.clear();
93602 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('in gitgraph renderer', txt + '\n', 'id:', id, ver); // Parse the graph definition
93603
93604 parser.parse(txt + '\n');
93605 config = lodash__WEBPACK_IMPORTED_MODULE_1___default.a.assign(config, apiConfig, _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getOptions());
93606 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('effective options', config);
93607 var direction = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getDirection();
93608 allCommitsDict = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getCommits();
93609 var branches = _gitGraphAst__WEBPACK_IMPORTED_MODULE_2__["default"].getBranchesAsObjArray();
93610
93611 if (direction === 'BT') {
93612 config.nodeLabel.x = branches.length * config.branchOffset;
93613 config.nodeLabel.width = '100%';
93614 config.nodeLabel.y = -1 * 2 * config.nodeRadius;
93615 }
93616
93617 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id=\"".concat(id, "\"]"));
93618 svgCreateDefs(svg);
93619 branchNum = 1;
93620
93621 for (var branch in branches) {
93622 var v = branches[branch];
93623 renderCommitHistory(svg, v.commit.id, branches, direction);
93624 renderLines(svg, v.commit, direction);
93625 branchNum++;
93626 }
93627
93628 svg.attr('height', function () {
93629 if (direction === 'BT') return Object.keys(allCommitsDict).length * config.nodeSpacing;
93630 return (branches.length + 1) * config.branchOffset;
93631 });
93632 } catch (e) {
93633 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error('Error while rendering gitgraph');
93634 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].error(e.message);
93635 }
93636};
93637/* harmony default export */ __webpack_exports__["default"] = ({
93638 setConf: setConf,
93639 draw: draw
93640});
93641
93642/***/ }),
93643
93644/***/ "./src/diagrams/git/parser/gitGraph.jison":
93645/*!************************************************!*\
93646 !*** ./src/diagrams/git/parser/gitGraph.jison ***!
93647 \************************************************/
93648/*! no static exports found */
93649/***/ (function(module, exports, __webpack_require__) {
93650
93651/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
93652/*
93653 Returns a Parser object of the following structure:
93654
93655 Parser: {
93656 yy: {}
93657 }
93658
93659 Parser.prototype: {
93660 yy: {},
93661 trace: function(),
93662 symbols_: {associative list: name ==> number},
93663 terminals_: {associative list: number ==> name},
93664 productions_: [...],
93665 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
93666 table: [...],
93667 defaultActions: {...},
93668 parseError: function(str, hash),
93669 parse: function(input),
93670
93671 lexer: {
93672 EOF: 1,
93673 parseError: function(str, hash),
93674 setInput: function(input),
93675 input: function(),
93676 unput: function(str),
93677 more: function(),
93678 less: function(n),
93679 pastInput: function(),
93680 upcomingInput: function(),
93681 showPosition: function(),
93682 test_match: function(regex_match_array, rule_index),
93683 next: function(),
93684 lex: function(),
93685 begin: function(condition),
93686 popState: function(),
93687 _currentRules: function(),
93688 topState: function(),
93689 pushState: function(condition),
93690
93691 options: {
93692 ranges: boolean (optional: true ==> token location info will include a .range[] member)
93693 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
93694 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
93695 },
93696
93697 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
93698 rules: [...],
93699 conditions: {associative list: name ==> set},
93700 }
93701 }
93702
93703
93704 token location info (@$, _$, etc.): {
93705 first_line: n,
93706 last_line: n,
93707 first_column: n,
93708 last_column: n,
93709 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
93710 }
93711
93712
93713 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
93714 text: (matched text)
93715 token: (the produced terminal token, if any)
93716 line: (yylineno)
93717 }
93718 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
93719 loc: (yylloc)
93720 expected: (string describing the set of expected tokens)
93721 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
93722 }
93723*/
93724var parser = (function(){
93725var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[2,3],$V1=[1,7],$V2=[7,12,15,17,19,20,21],$V3=[7,11,12,15,17,19,20,21],$V4=[2,20],$V5=[1,32];
93726var parser = {trace: function trace () { },
93727yy: {},
93728symbols_: {"error":2,"start":3,"GG":4,":":5,"document":6,"EOF":7,"DIR":8,"options":9,"body":10,"OPT":11,"NL":12,"line":13,"statement":14,"COMMIT":15,"commit_arg":16,"BRANCH":17,"ID":18,"CHECKOUT":19,"MERGE":20,"RESET":21,"reset_arg":22,"STR":23,"HEAD":24,"reset_parents":25,"CARET":26,"$accept":0,"$end":1},
93729terminals_: {2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},
93730productions_: [0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],
93731performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
93732/* this == yyval */
93733
93734var $0 = $$.length - 1;
93735switch (yystate) {
93736case 1:
93737 return $$[$0-1];
93738break;
93739case 2:
93740yy.setDirection($$[$0-3]); return $$[$0-1];
93741break;
93742case 4:
93743 yy.setOptions($$[$0-1]); this.$ = $$[$0]
93744break;
93745case 5:
93746$$[$0-1] +=$$[$0]; this.$=$$[$0-1]
93747break;
93748case 7:
93749this.$ = []
93750break;
93751case 8:
93752$$[$0-1].push($$[$0]); this.$=$$[$0-1];
93753break;
93754case 9:
93755this.$ =$$[$0-1]
93756break;
93757case 11:
93758yy.commit($$[$0])
93759break;
93760case 12:
93761yy.branch($$[$0])
93762break;
93763case 13:
93764yy.checkout($$[$0])
93765break;
93766case 14:
93767yy.merge($$[$0])
93768break;
93769case 15:
93770yy.reset($$[$0])
93771break;
93772case 16:
93773this.$ = ""
93774break;
93775case 17:
93776this.$=$$[$0]
93777break;
93778case 18:
93779this.$ = $$[$0-1]+ ":" + $$[$0]
93780break;
93781case 19:
93782this.$ = $$[$0-1]+ ":" + yy.count; yy.count = 0
93783break;
93784case 20:
93785yy.count = 0
93786break;
93787case 21:
93788 yy.count += 1
93789break;
93790}
93791},
93792table: [{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:$V0,9:6,12:$V1},{5:[1,8]},{7:[1,9]},o($V2,[2,7],{10:10,11:[1,11]}),o($V3,[2,6]),{6:12,7:$V0,9:6,12:$V1},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},o($V3,[2,5]),{7:[1,21]},o($V2,[2,8]),{12:[1,22]},o($V2,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},o($V2,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:$V4,25:31,26:$V5},{12:$V4,25:33,26:$V5},{12:[2,18]},{12:$V4,25:34,26:$V5},{12:[2,19]},{12:[2,21]}],
93793defaultActions: {9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},
93794parseError: function parseError (str, hash) {
93795 if (hash.recoverable) {
93796 this.trace(str);
93797 } else {
93798 var error = new Error(str);
93799 error.hash = hash;
93800 throw error;
93801 }
93802},
93803parse: function parse(input) {
93804 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
93805 var args = lstack.slice.call(arguments, 1);
93806 var lexer = Object.create(this.lexer);
93807 var sharedState = { yy: {} };
93808 for (var k in this.yy) {
93809 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
93810 sharedState.yy[k] = this.yy[k];
93811 }
93812 }
93813 lexer.setInput(input, sharedState.yy);
93814 sharedState.yy.lexer = lexer;
93815 sharedState.yy.parser = this;
93816 if (typeof lexer.yylloc == 'undefined') {
93817 lexer.yylloc = {};
93818 }
93819 var yyloc = lexer.yylloc;
93820 lstack.push(yyloc);
93821 var ranges = lexer.options && lexer.options.ranges;
93822 if (typeof sharedState.yy.parseError === 'function') {
93823 this.parseError = sharedState.yy.parseError;
93824 } else {
93825 this.parseError = Object.getPrototypeOf(this).parseError;
93826 }
93827 function popStack(n) {
93828 stack.length = stack.length - 2 * n;
93829 vstack.length = vstack.length - n;
93830 lstack.length = lstack.length - n;
93831 }
93832 function lex() {
93833 var token;
93834 token = tstack.pop() || lexer.lex() || EOF;
93835 if (typeof token !== 'number') {
93836 if (token instanceof Array) {
93837 tstack = token;
93838 token = tstack.pop();
93839 }
93840 token = self.symbols_[token] || token;
93841 }
93842 return token;
93843 }
93844 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
93845 while (true) {
93846 state = stack[stack.length - 1];
93847 if (this.defaultActions[state]) {
93848 action = this.defaultActions[state];
93849 } else {
93850 if (symbol === null || typeof symbol == 'undefined') {
93851 symbol = lex();
93852 }
93853 action = table[state] && table[state][symbol];
93854 }
93855 if (typeof action === 'undefined' || !action.length || !action[0]) {
93856 var errStr = '';
93857 expected = [];
93858 for (p in table[state]) {
93859 if (this.terminals_[p] && p > TERROR) {
93860 expected.push('\'' + this.terminals_[p] + '\'');
93861 }
93862 }
93863 if (lexer.showPosition) {
93864 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
93865 } else {
93866 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
93867 }
93868 this.parseError(errStr, {
93869 text: lexer.match,
93870 token: this.terminals_[symbol] || symbol,
93871 line: lexer.yylineno,
93872 loc: yyloc,
93873 expected: expected
93874 });
93875 }
93876 if (action[0] instanceof Array && action.length > 1) {
93877 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
93878 }
93879 switch (action[0]) {
93880 case 1:
93881 stack.push(symbol);
93882 vstack.push(lexer.yytext);
93883 lstack.push(lexer.yylloc);
93884 stack.push(action[1]);
93885 symbol = null;
93886 if (!preErrorSymbol) {
93887 yyleng = lexer.yyleng;
93888 yytext = lexer.yytext;
93889 yylineno = lexer.yylineno;
93890 yyloc = lexer.yylloc;
93891 if (recovering > 0) {
93892 recovering--;
93893 }
93894 } else {
93895 symbol = preErrorSymbol;
93896 preErrorSymbol = null;
93897 }
93898 break;
93899 case 2:
93900 len = this.productions_[action[1]][1];
93901 yyval.$ = vstack[vstack.length - len];
93902 yyval._$ = {
93903 first_line: lstack[lstack.length - (len || 1)].first_line,
93904 last_line: lstack[lstack.length - 1].last_line,
93905 first_column: lstack[lstack.length - (len || 1)].first_column,
93906 last_column: lstack[lstack.length - 1].last_column
93907 };
93908 if (ranges) {
93909 yyval._$.range = [
93910 lstack[lstack.length - (len || 1)].range[0],
93911 lstack[lstack.length - 1].range[1]
93912 ];
93913 }
93914 r = this.performAction.apply(yyval, [
93915 yytext,
93916 yyleng,
93917 yylineno,
93918 sharedState.yy,
93919 action[1],
93920 vstack,
93921 lstack
93922 ].concat(args));
93923 if (typeof r !== 'undefined') {
93924 return r;
93925 }
93926 if (len) {
93927 stack = stack.slice(0, -1 * len * 2);
93928 vstack = vstack.slice(0, -1 * len);
93929 lstack = lstack.slice(0, -1 * len);
93930 }
93931 stack.push(this.productions_[action[1]][0]);
93932 vstack.push(yyval.$);
93933 lstack.push(yyval._$);
93934 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
93935 stack.push(newState);
93936 break;
93937 case 3:
93938 return true;
93939 }
93940 }
93941 return true;
93942}};
93943/* generated by jison-lex 0.3.4 */
93944var lexer = (function(){
93945var lexer = ({
93946
93947EOF:1,
93948
93949parseError:function parseError(str, hash) {
93950 if (this.yy.parser) {
93951 this.yy.parser.parseError(str, hash);
93952 } else {
93953 throw new Error(str);
93954 }
93955 },
93956
93957// resets the lexer, sets new input
93958setInput:function (input, yy) {
93959 this.yy = yy || this.yy || {};
93960 this._input = input;
93961 this._more = this._backtrack = this.done = false;
93962 this.yylineno = this.yyleng = 0;
93963 this.yytext = this.matched = this.match = '';
93964 this.conditionStack = ['INITIAL'];
93965 this.yylloc = {
93966 first_line: 1,
93967 first_column: 0,
93968 last_line: 1,
93969 last_column: 0
93970 };
93971 if (this.options.ranges) {
93972 this.yylloc.range = [0,0];
93973 }
93974 this.offset = 0;
93975 return this;
93976 },
93977
93978// consumes and returns one char from the input
93979input:function () {
93980 var ch = this._input[0];
93981 this.yytext += ch;
93982 this.yyleng++;
93983 this.offset++;
93984 this.match += ch;
93985 this.matched += ch;
93986 var lines = ch.match(/(?:\r\n?|\n).*/g);
93987 if (lines) {
93988 this.yylineno++;
93989 this.yylloc.last_line++;
93990 } else {
93991 this.yylloc.last_column++;
93992 }
93993 if (this.options.ranges) {
93994 this.yylloc.range[1]++;
93995 }
93996
93997 this._input = this._input.slice(1);
93998 return ch;
93999 },
94000
94001// unshifts one char (or a string) into the input
94002unput:function (ch) {
94003 var len = ch.length;
94004 var lines = ch.split(/(?:\r\n?|\n)/g);
94005
94006 this._input = ch + this._input;
94007 this.yytext = this.yytext.substr(0, this.yytext.length - len);
94008 //this.yyleng -= len;
94009 this.offset -= len;
94010 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
94011 this.match = this.match.substr(0, this.match.length - 1);
94012 this.matched = this.matched.substr(0, this.matched.length - 1);
94013
94014 if (lines.length - 1) {
94015 this.yylineno -= lines.length - 1;
94016 }
94017 var r = this.yylloc.range;
94018
94019 this.yylloc = {
94020 first_line: this.yylloc.first_line,
94021 last_line: this.yylineno + 1,
94022 first_column: this.yylloc.first_column,
94023 last_column: lines ?
94024 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
94025 + oldLines[oldLines.length - lines.length].length - lines[0].length :
94026 this.yylloc.first_column - len
94027 };
94028
94029 if (this.options.ranges) {
94030 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
94031 }
94032 this.yyleng = this.yytext.length;
94033 return this;
94034 },
94035
94036// When called from action, caches matched text and appends it on next action
94037more:function () {
94038 this._more = true;
94039 return this;
94040 },
94041
94042// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
94043reject:function () {
94044 if (this.options.backtrack_lexer) {
94045 this._backtrack = true;
94046 } else {
94047 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
94048 text: "",
94049 token: null,
94050 line: this.yylineno
94051 });
94052
94053 }
94054 return this;
94055 },
94056
94057// retain first n characters of the match
94058less:function (n) {
94059 this.unput(this.match.slice(n));
94060 },
94061
94062// displays already matched input, i.e. for error messages
94063pastInput:function () {
94064 var past = this.matched.substr(0, this.matched.length - this.match.length);
94065 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
94066 },
94067
94068// displays upcoming input, i.e. for error messages
94069upcomingInput:function () {
94070 var next = this.match;
94071 if (next.length < 20) {
94072 next += this._input.substr(0, 20-next.length);
94073 }
94074 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
94075 },
94076
94077// displays the character position where the lexing error occurred, i.e. for error messages
94078showPosition:function () {
94079 var pre = this.pastInput();
94080 var c = new Array(pre.length + 1).join("-");
94081 return pre + this.upcomingInput() + "\n" + c + "^";
94082 },
94083
94084// test the lexed token: return FALSE when not a match, otherwise return token
94085test_match:function(match, indexed_rule) {
94086 var token,
94087 lines,
94088 backup;
94089
94090 if (this.options.backtrack_lexer) {
94091 // save context
94092 backup = {
94093 yylineno: this.yylineno,
94094 yylloc: {
94095 first_line: this.yylloc.first_line,
94096 last_line: this.last_line,
94097 first_column: this.yylloc.first_column,
94098 last_column: this.yylloc.last_column
94099 },
94100 yytext: this.yytext,
94101 match: this.match,
94102 matches: this.matches,
94103 matched: this.matched,
94104 yyleng: this.yyleng,
94105 offset: this.offset,
94106 _more: this._more,
94107 _input: this._input,
94108 yy: this.yy,
94109 conditionStack: this.conditionStack.slice(0),
94110 done: this.done
94111 };
94112 if (this.options.ranges) {
94113 backup.yylloc.range = this.yylloc.range.slice(0);
94114 }
94115 }
94116
94117 lines = match[0].match(/(?:\r\n?|\n).*/g);
94118 if (lines) {
94119 this.yylineno += lines.length;
94120 }
94121 this.yylloc = {
94122 first_line: this.yylloc.last_line,
94123 last_line: this.yylineno + 1,
94124 first_column: this.yylloc.last_column,
94125 last_column: lines ?
94126 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
94127 this.yylloc.last_column + match[0].length
94128 };
94129 this.yytext += match[0];
94130 this.match += match[0];
94131 this.matches = match;
94132 this.yyleng = this.yytext.length;
94133 if (this.options.ranges) {
94134 this.yylloc.range = [this.offset, this.offset += this.yyleng];
94135 }
94136 this._more = false;
94137 this._backtrack = false;
94138 this._input = this._input.slice(match[0].length);
94139 this.matched += match[0];
94140 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
94141 if (this.done && this._input) {
94142 this.done = false;
94143 }
94144 if (token) {
94145 return token;
94146 } else if (this._backtrack) {
94147 // recover context
94148 for (var k in backup) {
94149 this[k] = backup[k];
94150 }
94151 return false; // rule action called reject() implying the next rule should be tested instead.
94152 }
94153 return false;
94154 },
94155
94156// return next match in input
94157next:function () {
94158 if (this.done) {
94159 return this.EOF;
94160 }
94161 if (!this._input) {
94162 this.done = true;
94163 }
94164
94165 var token,
94166 match,
94167 tempMatch,
94168 index;
94169 if (!this._more) {
94170 this.yytext = '';
94171 this.match = '';
94172 }
94173 var rules = this._currentRules();
94174 for (var i = 0; i < rules.length; i++) {
94175 tempMatch = this._input.match(this.rules[rules[i]]);
94176 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
94177 match = tempMatch;
94178 index = i;
94179 if (this.options.backtrack_lexer) {
94180 token = this.test_match(tempMatch, rules[i]);
94181 if (token !== false) {
94182 return token;
94183 } else if (this._backtrack) {
94184 match = false;
94185 continue; // rule action called reject() implying a rule MISmatch.
94186 } else {
94187 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
94188 return false;
94189 }
94190 } else if (!this.options.flex) {
94191 break;
94192 }
94193 }
94194 }
94195 if (match) {
94196 token = this.test_match(match, rules[index]);
94197 if (token !== false) {
94198 return token;
94199 }
94200 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
94201 return false;
94202 }
94203 if (this._input === "") {
94204 return this.EOF;
94205 } else {
94206 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
94207 text: "",
94208 token: null,
94209 line: this.yylineno
94210 });
94211 }
94212 },
94213
94214// return next match that has a token
94215lex:function lex () {
94216 var r = this.next();
94217 if (r) {
94218 return r;
94219 } else {
94220 return this.lex();
94221 }
94222 },
94223
94224// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
94225begin:function begin (condition) {
94226 this.conditionStack.push(condition);
94227 },
94228
94229// pop the previously active lexer condition state off the condition stack
94230popState:function popState () {
94231 var n = this.conditionStack.length - 1;
94232 if (n > 0) {
94233 return this.conditionStack.pop();
94234 } else {
94235 return this.conditionStack[0];
94236 }
94237 },
94238
94239// produce the lexer rule set which is active for the currently active lexer condition state
94240_currentRules:function _currentRules () {
94241 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
94242 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
94243 } else {
94244 return this.conditions["INITIAL"].rules;
94245 }
94246 },
94247
94248// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
94249topState:function topState (n) {
94250 n = this.conditionStack.length - 1 - Math.abs(n || 0);
94251 if (n >= 0) {
94252 return this.conditionStack[n];
94253 } else {
94254 return "INITIAL";
94255 }
94256 },
94257
94258// alias for begin(condition)
94259pushState:function pushState (condition) {
94260 this.begin(condition);
94261 },
94262
94263// return the number of states currently on the stack
94264stateStackSize:function stateStackSize() {
94265 return this.conditionStack.length;
94266 },
94267options: {"case-insensitive":true},
94268performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
94269var YYSTATE=YY_START;
94270switch($avoiding_name_collisions) {
94271case 0:return 12;
94272break;
94273case 1:/* skip all whitespace */
94274break;
94275case 2:/* skip comments */
94276break;
94277case 3:/* skip comments */
94278break;
94279case 4:return 4;
94280break;
94281case 5:return 15;
94282break;
94283case 6:return 17;
94284break;
94285case 7:return 20;
94286break;
94287case 8:return 21;
94288break;
94289case 9:return 19;
94290break;
94291case 10:return 8;
94292break;
94293case 11:return 8;
94294break;
94295case 12:return 5;
94296break;
94297case 13:return 26
94298break;
94299case 14:this.begin("options");
94300break;
94301case 15:this.popState();
94302break;
94303case 16:return 11;
94304break;
94305case 17:this.begin("string");
94306break;
94307case 18:this.popState();
94308break;
94309case 19:return 23;
94310break;
94311case 20:return 18;
94312break;
94313case 21:return 7;
94314break;
94315}
94316},
94317rules: [/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],
94318conditions: {"options":{"rules":[15,16],"inclusive":false},"string":{"rules":[18,19],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],"inclusive":true}}
94319});
94320return lexer;
94321})();
94322parser.lexer = lexer;
94323function Parser () {
94324 this.yy = {};
94325}
94326Parser.prototype = parser;parser.Parser = Parser;
94327return new Parser;
94328})();
94329
94330
94331if (true) {
94332exports.parser = parser;
94333exports.Parser = parser.Parser;
94334exports.parse = function () { return parser.parse.apply(parser, arguments); };
94335exports.main = function commonjsMain (args) {
94336 if (!args[1]) {
94337 console.log('Usage: '+args[0]+' FILE');
94338 process.exit(1);
94339 }
94340 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
94341 return exports.parser.parse(source);
94342};
94343if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
94344 exports.main(process.argv.slice(1));
94345}
94346}
94347/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
94348
94349/***/ }),
94350
94351/***/ "./src/diagrams/info/infoDb.js":
94352/*!*************************************!*\
94353 !*** ./src/diagrams/info/infoDb.js ***!
94354 \*************************************/
94355/*! exports provided: setMessage, getMessage, setInfo, getInfo, default */
94356/***/ (function(module, __webpack_exports__, __webpack_require__) {
94357
94358"use strict";
94359__webpack_require__.r(__webpack_exports__);
94360/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setMessage", function() { return setMessage; });
94361/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessage", function() { return getMessage; });
94362/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setInfo", function() { return setInfo; });
94363/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInfo", function() { return getInfo; });
94364/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
94365/**
94366 * Created by knut on 15-01-14.
94367 */
94368
94369var message = '';
94370var info = false;
94371var setMessage = function setMessage(txt) {
94372 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Setting message to: ' + txt);
94373 message = txt;
94374};
94375var getMessage = function getMessage() {
94376 return message;
94377};
94378var setInfo = function setInfo(inf) {
94379 info = inf;
94380};
94381var getInfo = function getInfo() {
94382 return info;
94383}; // export const parseError = (err, hash) => {
94384// global.mermaidAPI.parseError(err, hash)
94385// }
94386
94387/* harmony default export */ __webpack_exports__["default"] = ({
94388 setMessage: setMessage,
94389 getMessage: getMessage,
94390 setInfo: setInfo,
94391 getInfo: getInfo // parseError
94392
94393});
94394
94395/***/ }),
94396
94397/***/ "./src/diagrams/info/infoRenderer.js":
94398/*!*******************************************!*\
94399 !*** ./src/diagrams/info/infoRenderer.js ***!
94400 \*******************************************/
94401/*! exports provided: setConf, draw, default */
94402/***/ (function(module, __webpack_exports__, __webpack_require__) {
94403
94404"use strict";
94405__webpack_require__.r(__webpack_exports__);
94406/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
94407/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
94408/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
94409/* harmony import */ var _infoDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./infoDb */ "./src/diagrams/info/infoDb.js");
94410/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/info */ "./src/diagrams/info/parser/info.jison");
94411/* harmony import */ var _parser_info__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_info__WEBPACK_IMPORTED_MODULE_2__);
94412/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
94413/**
94414 * Created by knut on 14-12-11.
94415 */
94416
94417
94418
94419
94420var conf = {};
94421var setConf = function setConf(cnf) {
94422 var keys = Object.keys(cnf);
94423 keys.forEach(function (key) {
94424 conf[key] = cnf[key];
94425 });
94426};
94427/**
94428 * Draws a an info picture in the tag with id: id based on the graph definition in text.
94429 * @param text
94430 * @param id
94431 */
94432
94433var draw = function draw(txt, id, ver) {
94434 try {
94435 var parser = _parser_info__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
94436 parser.yy = _infoDb__WEBPACK_IMPORTED_MODULE_1__["default"];
94437 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Renering info diagram\n' + txt); // Parse the graph definition
94438
94439 parser.parse(txt);
94440 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram'); // Fetch the default direction, use TD if none was found
94441
94442 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id);
94443 var g = svg.append('g');
94444 g.append('text') // text label for the x axis
94445 .attr('x', 100).attr('y', 40).attr('class', 'version').attr('font-size', '32px').style('text-anchor', 'middle').text('v ' + ver);
94446 svg.attr('height', 100);
94447 svg.attr('width', 400); // svg.attr('viewBox', '0 0 300 150');
94448 } catch (e) {
94449 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
94450 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
94451 }
94452};
94453/* harmony default export */ __webpack_exports__["default"] = ({
94454 setConf: setConf,
94455 draw: draw
94456});
94457
94458/***/ }),
94459
94460/***/ "./src/diagrams/info/parser/info.jison":
94461/*!*********************************************!*\
94462 !*** ./src/diagrams/info/parser/info.jison ***!
94463 \*********************************************/
94464/*! no static exports found */
94465/***/ (function(module, exports, __webpack_require__) {
94466
94467/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
94468/*
94469 Returns a Parser object of the following structure:
94470
94471 Parser: {
94472 yy: {}
94473 }
94474
94475 Parser.prototype: {
94476 yy: {},
94477 trace: function(),
94478 symbols_: {associative list: name ==> number},
94479 terminals_: {associative list: number ==> name},
94480 productions_: [...],
94481 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
94482 table: [...],
94483 defaultActions: {...},
94484 parseError: function(str, hash),
94485 parse: function(input),
94486
94487 lexer: {
94488 EOF: 1,
94489 parseError: function(str, hash),
94490 setInput: function(input),
94491 input: function(),
94492 unput: function(str),
94493 more: function(),
94494 less: function(n),
94495 pastInput: function(),
94496 upcomingInput: function(),
94497 showPosition: function(),
94498 test_match: function(regex_match_array, rule_index),
94499 next: function(),
94500 lex: function(),
94501 begin: function(condition),
94502 popState: function(),
94503 _currentRules: function(),
94504 topState: function(),
94505 pushState: function(condition),
94506
94507 options: {
94508 ranges: boolean (optional: true ==> token location info will include a .range[] member)
94509 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
94510 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
94511 },
94512
94513 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
94514 rules: [...],
94515 conditions: {associative list: name ==> set},
94516 }
94517 }
94518
94519
94520 token location info (@$, _$, etc.): {
94521 first_line: n,
94522 last_line: n,
94523 first_column: n,
94524 last_column: n,
94525 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
94526 }
94527
94528
94529 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
94530 text: (matched text)
94531 token: (the produced terminal token, if any)
94532 line: (yylineno)
94533 }
94534 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
94535 loc: (yylloc)
94536 expected: (string describing the set of expected tokens)
94537 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
94538 }
94539*/
94540var parser = (function(){
94541var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10];
94542var parser = {trace: function trace () { },
94543yy: {},
94544symbols_: {"error":2,"start":3,"info":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"showInfo":10,"$accept":0,"$end":1},
94545terminals_: {2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},
94546productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],
94547performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
94548/* this == yyval */
94549
94550var $0 = $$.length - 1;
94551switch (yystate) {
94552case 1:
94553 return yy;
94554break;
94555case 4:
94556
94557break;
94558case 6:
94559 yy.setInfo(true);
94560break;
94561}
94562},
94563table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),o($V0,[2,6])],
94564defaultActions: {4:[2,1]},
94565parseError: function parseError (str, hash) {
94566 if (hash.recoverable) {
94567 this.trace(str);
94568 } else {
94569 var error = new Error(str);
94570 error.hash = hash;
94571 throw error;
94572 }
94573},
94574parse: function parse(input) {
94575 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
94576 var args = lstack.slice.call(arguments, 1);
94577 var lexer = Object.create(this.lexer);
94578 var sharedState = { yy: {} };
94579 for (var k in this.yy) {
94580 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
94581 sharedState.yy[k] = this.yy[k];
94582 }
94583 }
94584 lexer.setInput(input, sharedState.yy);
94585 sharedState.yy.lexer = lexer;
94586 sharedState.yy.parser = this;
94587 if (typeof lexer.yylloc == 'undefined') {
94588 lexer.yylloc = {};
94589 }
94590 var yyloc = lexer.yylloc;
94591 lstack.push(yyloc);
94592 var ranges = lexer.options && lexer.options.ranges;
94593 if (typeof sharedState.yy.parseError === 'function') {
94594 this.parseError = sharedState.yy.parseError;
94595 } else {
94596 this.parseError = Object.getPrototypeOf(this).parseError;
94597 }
94598 function popStack(n) {
94599 stack.length = stack.length - 2 * n;
94600 vstack.length = vstack.length - n;
94601 lstack.length = lstack.length - n;
94602 }
94603 function lex() {
94604 var token;
94605 token = tstack.pop() || lexer.lex() || EOF;
94606 if (typeof token !== 'number') {
94607 if (token instanceof Array) {
94608 tstack = token;
94609 token = tstack.pop();
94610 }
94611 token = self.symbols_[token] || token;
94612 }
94613 return token;
94614 }
94615 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
94616 while (true) {
94617 state = stack[stack.length - 1];
94618 if (this.defaultActions[state]) {
94619 action = this.defaultActions[state];
94620 } else {
94621 if (symbol === null || typeof symbol == 'undefined') {
94622 symbol = lex();
94623 }
94624 action = table[state] && table[state][symbol];
94625 }
94626 if (typeof action === 'undefined' || !action.length || !action[0]) {
94627 var errStr = '';
94628 expected = [];
94629 for (p in table[state]) {
94630 if (this.terminals_[p] && p > TERROR) {
94631 expected.push('\'' + this.terminals_[p] + '\'');
94632 }
94633 }
94634 if (lexer.showPosition) {
94635 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
94636 } else {
94637 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
94638 }
94639 this.parseError(errStr, {
94640 text: lexer.match,
94641 token: this.terminals_[symbol] || symbol,
94642 line: lexer.yylineno,
94643 loc: yyloc,
94644 expected: expected
94645 });
94646 }
94647 if (action[0] instanceof Array && action.length > 1) {
94648 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
94649 }
94650 switch (action[0]) {
94651 case 1:
94652 stack.push(symbol);
94653 vstack.push(lexer.yytext);
94654 lstack.push(lexer.yylloc);
94655 stack.push(action[1]);
94656 symbol = null;
94657 if (!preErrorSymbol) {
94658 yyleng = lexer.yyleng;
94659 yytext = lexer.yytext;
94660 yylineno = lexer.yylineno;
94661 yyloc = lexer.yylloc;
94662 if (recovering > 0) {
94663 recovering--;
94664 }
94665 } else {
94666 symbol = preErrorSymbol;
94667 preErrorSymbol = null;
94668 }
94669 break;
94670 case 2:
94671 len = this.productions_[action[1]][1];
94672 yyval.$ = vstack[vstack.length - len];
94673 yyval._$ = {
94674 first_line: lstack[lstack.length - (len || 1)].first_line,
94675 last_line: lstack[lstack.length - 1].last_line,
94676 first_column: lstack[lstack.length - (len || 1)].first_column,
94677 last_column: lstack[lstack.length - 1].last_column
94678 };
94679 if (ranges) {
94680 yyval._$.range = [
94681 lstack[lstack.length - (len || 1)].range[0],
94682 lstack[lstack.length - 1].range[1]
94683 ];
94684 }
94685 r = this.performAction.apply(yyval, [
94686 yytext,
94687 yyleng,
94688 yylineno,
94689 sharedState.yy,
94690 action[1],
94691 vstack,
94692 lstack
94693 ].concat(args));
94694 if (typeof r !== 'undefined') {
94695 return r;
94696 }
94697 if (len) {
94698 stack = stack.slice(0, -1 * len * 2);
94699 vstack = vstack.slice(0, -1 * len);
94700 lstack = lstack.slice(0, -1 * len);
94701 }
94702 stack.push(this.productions_[action[1]][0]);
94703 vstack.push(yyval.$);
94704 lstack.push(yyval._$);
94705 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
94706 stack.push(newState);
94707 break;
94708 case 3:
94709 return true;
94710 }
94711 }
94712 return true;
94713}};
94714
94715/* generated by jison-lex 0.3.4 */
94716var lexer = (function(){
94717var lexer = ({
94718
94719EOF:1,
94720
94721parseError:function parseError(str, hash) {
94722 if (this.yy.parser) {
94723 this.yy.parser.parseError(str, hash);
94724 } else {
94725 throw new Error(str);
94726 }
94727 },
94728
94729// resets the lexer, sets new input
94730setInput:function (input, yy) {
94731 this.yy = yy || this.yy || {};
94732 this._input = input;
94733 this._more = this._backtrack = this.done = false;
94734 this.yylineno = this.yyleng = 0;
94735 this.yytext = this.matched = this.match = '';
94736 this.conditionStack = ['INITIAL'];
94737 this.yylloc = {
94738 first_line: 1,
94739 first_column: 0,
94740 last_line: 1,
94741 last_column: 0
94742 };
94743 if (this.options.ranges) {
94744 this.yylloc.range = [0,0];
94745 }
94746 this.offset = 0;
94747 return this;
94748 },
94749
94750// consumes and returns one char from the input
94751input:function () {
94752 var ch = this._input[0];
94753 this.yytext += ch;
94754 this.yyleng++;
94755 this.offset++;
94756 this.match += ch;
94757 this.matched += ch;
94758 var lines = ch.match(/(?:\r\n?|\n).*/g);
94759 if (lines) {
94760 this.yylineno++;
94761 this.yylloc.last_line++;
94762 } else {
94763 this.yylloc.last_column++;
94764 }
94765 if (this.options.ranges) {
94766 this.yylloc.range[1]++;
94767 }
94768
94769 this._input = this._input.slice(1);
94770 return ch;
94771 },
94772
94773// unshifts one char (or a string) into the input
94774unput:function (ch) {
94775 var len = ch.length;
94776 var lines = ch.split(/(?:\r\n?|\n)/g);
94777
94778 this._input = ch + this._input;
94779 this.yytext = this.yytext.substr(0, this.yytext.length - len);
94780 //this.yyleng -= len;
94781 this.offset -= len;
94782 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
94783 this.match = this.match.substr(0, this.match.length - 1);
94784 this.matched = this.matched.substr(0, this.matched.length - 1);
94785
94786 if (lines.length - 1) {
94787 this.yylineno -= lines.length - 1;
94788 }
94789 var r = this.yylloc.range;
94790
94791 this.yylloc = {
94792 first_line: this.yylloc.first_line,
94793 last_line: this.yylineno + 1,
94794 first_column: this.yylloc.first_column,
94795 last_column: lines ?
94796 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
94797 + oldLines[oldLines.length - lines.length].length - lines[0].length :
94798 this.yylloc.first_column - len
94799 };
94800
94801 if (this.options.ranges) {
94802 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
94803 }
94804 this.yyleng = this.yytext.length;
94805 return this;
94806 },
94807
94808// When called from action, caches matched text and appends it on next action
94809more:function () {
94810 this._more = true;
94811 return this;
94812 },
94813
94814// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
94815reject:function () {
94816 if (this.options.backtrack_lexer) {
94817 this._backtrack = true;
94818 } else {
94819 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
94820 text: "",
94821 token: null,
94822 line: this.yylineno
94823 });
94824
94825 }
94826 return this;
94827 },
94828
94829// retain first n characters of the match
94830less:function (n) {
94831 this.unput(this.match.slice(n));
94832 },
94833
94834// displays already matched input, i.e. for error messages
94835pastInput:function () {
94836 var past = this.matched.substr(0, this.matched.length - this.match.length);
94837 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
94838 },
94839
94840// displays upcoming input, i.e. for error messages
94841upcomingInput:function () {
94842 var next = this.match;
94843 if (next.length < 20) {
94844 next += this._input.substr(0, 20-next.length);
94845 }
94846 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
94847 },
94848
94849// displays the character position where the lexing error occurred, i.e. for error messages
94850showPosition:function () {
94851 var pre = this.pastInput();
94852 var c = new Array(pre.length + 1).join("-");
94853 return pre + this.upcomingInput() + "\n" + c + "^";
94854 },
94855
94856// test the lexed token: return FALSE when not a match, otherwise return token
94857test_match:function(match, indexed_rule) {
94858 var token,
94859 lines,
94860 backup;
94861
94862 if (this.options.backtrack_lexer) {
94863 // save context
94864 backup = {
94865 yylineno: this.yylineno,
94866 yylloc: {
94867 first_line: this.yylloc.first_line,
94868 last_line: this.last_line,
94869 first_column: this.yylloc.first_column,
94870 last_column: this.yylloc.last_column
94871 },
94872 yytext: this.yytext,
94873 match: this.match,
94874 matches: this.matches,
94875 matched: this.matched,
94876 yyleng: this.yyleng,
94877 offset: this.offset,
94878 _more: this._more,
94879 _input: this._input,
94880 yy: this.yy,
94881 conditionStack: this.conditionStack.slice(0),
94882 done: this.done
94883 };
94884 if (this.options.ranges) {
94885 backup.yylloc.range = this.yylloc.range.slice(0);
94886 }
94887 }
94888
94889 lines = match[0].match(/(?:\r\n?|\n).*/g);
94890 if (lines) {
94891 this.yylineno += lines.length;
94892 }
94893 this.yylloc = {
94894 first_line: this.yylloc.last_line,
94895 last_line: this.yylineno + 1,
94896 first_column: this.yylloc.last_column,
94897 last_column: lines ?
94898 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
94899 this.yylloc.last_column + match[0].length
94900 };
94901 this.yytext += match[0];
94902 this.match += match[0];
94903 this.matches = match;
94904 this.yyleng = this.yytext.length;
94905 if (this.options.ranges) {
94906 this.yylloc.range = [this.offset, this.offset += this.yyleng];
94907 }
94908 this._more = false;
94909 this._backtrack = false;
94910 this._input = this._input.slice(match[0].length);
94911 this.matched += match[0];
94912 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
94913 if (this.done && this._input) {
94914 this.done = false;
94915 }
94916 if (token) {
94917 return token;
94918 } else if (this._backtrack) {
94919 // recover context
94920 for (var k in backup) {
94921 this[k] = backup[k];
94922 }
94923 return false; // rule action called reject() implying the next rule should be tested instead.
94924 }
94925 return false;
94926 },
94927
94928// return next match in input
94929next:function () {
94930 if (this.done) {
94931 return this.EOF;
94932 }
94933 if (!this._input) {
94934 this.done = true;
94935 }
94936
94937 var token,
94938 match,
94939 tempMatch,
94940 index;
94941 if (!this._more) {
94942 this.yytext = '';
94943 this.match = '';
94944 }
94945 var rules = this._currentRules();
94946 for (var i = 0; i < rules.length; i++) {
94947 tempMatch = this._input.match(this.rules[rules[i]]);
94948 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
94949 match = tempMatch;
94950 index = i;
94951 if (this.options.backtrack_lexer) {
94952 token = this.test_match(tempMatch, rules[i]);
94953 if (token !== false) {
94954 return token;
94955 } else if (this._backtrack) {
94956 match = false;
94957 continue; // rule action called reject() implying a rule MISmatch.
94958 } else {
94959 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
94960 return false;
94961 }
94962 } else if (!this.options.flex) {
94963 break;
94964 }
94965 }
94966 }
94967 if (match) {
94968 token = this.test_match(match, rules[index]);
94969 if (token !== false) {
94970 return token;
94971 }
94972 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
94973 return false;
94974 }
94975 if (this._input === "") {
94976 return this.EOF;
94977 } else {
94978 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
94979 text: "",
94980 token: null,
94981 line: this.yylineno
94982 });
94983 }
94984 },
94985
94986// return next match that has a token
94987lex:function lex () {
94988 var r = this.next();
94989 if (r) {
94990 return r;
94991 } else {
94992 return this.lex();
94993 }
94994 },
94995
94996// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
94997begin:function begin (condition) {
94998 this.conditionStack.push(condition);
94999 },
95000
95001// pop the previously active lexer condition state off the condition stack
95002popState:function popState () {
95003 var n = this.conditionStack.length - 1;
95004 if (n > 0) {
95005 return this.conditionStack.pop();
95006 } else {
95007 return this.conditionStack[0];
95008 }
95009 },
95010
95011// produce the lexer rule set which is active for the currently active lexer condition state
95012_currentRules:function _currentRules () {
95013 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
95014 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
95015 } else {
95016 return this.conditions["INITIAL"].rules;
95017 }
95018 },
95019
95020// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
95021topState:function topState (n) {
95022 n = this.conditionStack.length - 1 - Math.abs(n || 0);
95023 if (n >= 0) {
95024 return this.conditionStack[n];
95025 } else {
95026 return "INITIAL";
95027 }
95028 },
95029
95030// alias for begin(condition)
95031pushState:function pushState (condition) {
95032 this.begin(condition);
95033 },
95034
95035// return the number of states currently on the stack
95036stateStackSize:function stateStackSize() {
95037 return this.conditionStack.length;
95038 },
95039options: {"case-insensitive":true},
95040performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
95041 // Pre-lexer code can go here
95042
95043var YYSTATE=YY_START;
95044switch($avoiding_name_collisions) {
95045case 0:return 4 ;
95046break;
95047case 1:return 9 ;
95048break;
95049case 2:return 'space';
95050break;
95051case 3:return 10;
95052break;
95053case 4:return 6 ;
95054break;
95055case 5:return 'TXT' ;
95056break;
95057}
95058},
95059rules: [/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],
95060conditions: {"INITIAL":{"rules":[0,1,2,3,4,5],"inclusive":true}}
95061});
95062return lexer;
95063})();
95064parser.lexer = lexer;
95065function Parser () {
95066 this.yy = {};
95067}
95068Parser.prototype = parser;parser.Parser = Parser;
95069return new Parser;
95070})();
95071
95072
95073if (true) {
95074exports.parser = parser;
95075exports.Parser = parser.Parser;
95076exports.parse = function () { return parser.parse.apply(parser, arguments); };
95077exports.main = function commonjsMain (args) {
95078 if (!args[1]) {
95079 console.log('Usage: '+args[0]+' FILE');
95080 process.exit(1);
95081 }
95082 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
95083 return exports.parser.parse(source);
95084};
95085if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
95086 exports.main(process.argv.slice(1));
95087}
95088}
95089/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
95090
95091/***/ }),
95092
95093/***/ "./src/diagrams/pie/parser/pie.jison":
95094/*!*******************************************!*\
95095 !*** ./src/diagrams/pie/parser/pie.jison ***!
95096 \*******************************************/
95097/*! no static exports found */
95098/***/ (function(module, exports, __webpack_require__) {
95099
95100/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
95101/*
95102 Returns a Parser object of the following structure:
95103
95104 Parser: {
95105 yy: {}
95106 }
95107
95108 Parser.prototype: {
95109 yy: {},
95110 trace: function(),
95111 symbols_: {associative list: name ==> number},
95112 terminals_: {associative list: number ==> name},
95113 productions_: [...],
95114 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
95115 table: [...],
95116 defaultActions: {...},
95117 parseError: function(str, hash),
95118 parse: function(input),
95119
95120 lexer: {
95121 EOF: 1,
95122 parseError: function(str, hash),
95123 setInput: function(input),
95124 input: function(),
95125 unput: function(str),
95126 more: function(),
95127 less: function(n),
95128 pastInput: function(),
95129 upcomingInput: function(),
95130 showPosition: function(),
95131 test_match: function(regex_match_array, rule_index),
95132 next: function(),
95133 lex: function(),
95134 begin: function(condition),
95135 popState: function(),
95136 _currentRules: function(),
95137 topState: function(),
95138 pushState: function(condition),
95139
95140 options: {
95141 ranges: boolean (optional: true ==> token location info will include a .range[] member)
95142 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
95143 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
95144 },
95145
95146 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
95147 rules: [...],
95148 conditions: {associative list: name ==> set},
95149 }
95150 }
95151
95152
95153 token location info (@$, _$, etc.): {
95154 first_line: n,
95155 last_line: n,
95156 first_column: n,
95157 last_column: n,
95158 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
95159 }
95160
95161
95162 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
95163 text: (matched text)
95164 token: (the produced terminal token, if any)
95165 line: (yylineno)
95166 }
95167 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
95168 loc: (yylloc)
95169 expected: (string describing the set of expected tokens)
95170 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
95171 }
95172*/
95173var parser = (function(){
95174var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[6,9,10,12];
95175var parser = {trace: function trace () { },
95176yy: {},
95177symbols_: {"error":2,"start":3,"pie":4,"document":5,"EOF":6,"line":7,"statement":8,"NL":9,"STR":10,"VALUE":11,"title":12,"$accept":0,"$end":1},
95178terminals_: {2:"error",4:"pie",6:"EOF",9:"NL",10:"STR",11:"VALUE",12:"title"},
95179productions_: [0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],
95180performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
95181/* this == yyval */
95182
95183var $0 = $$.length - 1;
95184switch (yystate) {
95185case 4:
95186
95187break;
95188case 6:
95189
95190 /*console.log('str:'+$$[$0-1]+' value: '+$$[$0])*/
95191 yy.addSection($$[$0-1],yy.cleanupValue($$[$0]));
95192break;
95193case 7:
95194yy.setTitle($$[$0].substr(6));this.$=$$[$0].substr(6);
95195break;
95196}
95197},
95198table: [{3:1,4:[1,2]},{1:[3]},o($V0,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],12:[1,9]},{1:[2,1]},o($V0,[2,3]),o($V0,[2,4]),o($V0,[2,5]),{11:[1,10]},o($V0,[2,7]),o($V0,[2,6])],
95199defaultActions: {4:[2,1]},
95200parseError: function parseError (str, hash) {
95201 if (hash.recoverable) {
95202 this.trace(str);
95203 } else {
95204 var error = new Error(str);
95205 error.hash = hash;
95206 throw error;
95207 }
95208},
95209parse: function parse(input) {
95210 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
95211 var args = lstack.slice.call(arguments, 1);
95212 var lexer = Object.create(this.lexer);
95213 var sharedState = { yy: {} };
95214 for (var k in this.yy) {
95215 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
95216 sharedState.yy[k] = this.yy[k];
95217 }
95218 }
95219 lexer.setInput(input, sharedState.yy);
95220 sharedState.yy.lexer = lexer;
95221 sharedState.yy.parser = this;
95222 if (typeof lexer.yylloc == 'undefined') {
95223 lexer.yylloc = {};
95224 }
95225 var yyloc = lexer.yylloc;
95226 lstack.push(yyloc);
95227 var ranges = lexer.options && lexer.options.ranges;
95228 if (typeof sharedState.yy.parseError === 'function') {
95229 this.parseError = sharedState.yy.parseError;
95230 } else {
95231 this.parseError = Object.getPrototypeOf(this).parseError;
95232 }
95233 function popStack(n) {
95234 stack.length = stack.length - 2 * n;
95235 vstack.length = vstack.length - n;
95236 lstack.length = lstack.length - n;
95237 }
95238 function lex() {
95239 var token;
95240 token = tstack.pop() || lexer.lex() || EOF;
95241 if (typeof token !== 'number') {
95242 if (token instanceof Array) {
95243 tstack = token;
95244 token = tstack.pop();
95245 }
95246 token = self.symbols_[token] || token;
95247 }
95248 return token;
95249 }
95250 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
95251 while (true) {
95252 state = stack[stack.length - 1];
95253 if (this.defaultActions[state]) {
95254 action = this.defaultActions[state];
95255 } else {
95256 if (symbol === null || typeof symbol == 'undefined') {
95257 symbol = lex();
95258 }
95259 action = table[state] && table[state][symbol];
95260 }
95261 if (typeof action === 'undefined' || !action.length || !action[0]) {
95262 var errStr = '';
95263 expected = [];
95264 for (p in table[state]) {
95265 if (this.terminals_[p] && p > TERROR) {
95266 expected.push('\'' + this.terminals_[p] + '\'');
95267 }
95268 }
95269 if (lexer.showPosition) {
95270 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
95271 } else {
95272 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
95273 }
95274 this.parseError(errStr, {
95275 text: lexer.match,
95276 token: this.terminals_[symbol] || symbol,
95277 line: lexer.yylineno,
95278 loc: yyloc,
95279 expected: expected
95280 });
95281 }
95282 if (action[0] instanceof Array && action.length > 1) {
95283 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
95284 }
95285 switch (action[0]) {
95286 case 1:
95287 stack.push(symbol);
95288 vstack.push(lexer.yytext);
95289 lstack.push(lexer.yylloc);
95290 stack.push(action[1]);
95291 symbol = null;
95292 if (!preErrorSymbol) {
95293 yyleng = lexer.yyleng;
95294 yytext = lexer.yytext;
95295 yylineno = lexer.yylineno;
95296 yyloc = lexer.yylloc;
95297 if (recovering > 0) {
95298 recovering--;
95299 }
95300 } else {
95301 symbol = preErrorSymbol;
95302 preErrorSymbol = null;
95303 }
95304 break;
95305 case 2:
95306 len = this.productions_[action[1]][1];
95307 yyval.$ = vstack[vstack.length - len];
95308 yyval._$ = {
95309 first_line: lstack[lstack.length - (len || 1)].first_line,
95310 last_line: lstack[lstack.length - 1].last_line,
95311 first_column: lstack[lstack.length - (len || 1)].first_column,
95312 last_column: lstack[lstack.length - 1].last_column
95313 };
95314 if (ranges) {
95315 yyval._$.range = [
95316 lstack[lstack.length - (len || 1)].range[0],
95317 lstack[lstack.length - 1].range[1]
95318 ];
95319 }
95320 r = this.performAction.apply(yyval, [
95321 yytext,
95322 yyleng,
95323 yylineno,
95324 sharedState.yy,
95325 action[1],
95326 vstack,
95327 lstack
95328 ].concat(args));
95329 if (typeof r !== 'undefined') {
95330 return r;
95331 }
95332 if (len) {
95333 stack = stack.slice(0, -1 * len * 2);
95334 vstack = vstack.slice(0, -1 * len);
95335 lstack = lstack.slice(0, -1 * len);
95336 }
95337 stack.push(this.productions_[action[1]][0]);
95338 vstack.push(yyval.$);
95339 lstack.push(yyval._$);
95340 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
95341 stack.push(newState);
95342 break;
95343 case 3:
95344 return true;
95345 }
95346 }
95347 return true;
95348}};
95349
95350/* generated by jison-lex 0.3.4 */
95351var lexer = (function(){
95352var lexer = ({
95353
95354EOF:1,
95355
95356parseError:function parseError(str, hash) {
95357 if (this.yy.parser) {
95358 this.yy.parser.parseError(str, hash);
95359 } else {
95360 throw new Error(str);
95361 }
95362 },
95363
95364// resets the lexer, sets new input
95365setInput:function (input, yy) {
95366 this.yy = yy || this.yy || {};
95367 this._input = input;
95368 this._more = this._backtrack = this.done = false;
95369 this.yylineno = this.yyleng = 0;
95370 this.yytext = this.matched = this.match = '';
95371 this.conditionStack = ['INITIAL'];
95372 this.yylloc = {
95373 first_line: 1,
95374 first_column: 0,
95375 last_line: 1,
95376 last_column: 0
95377 };
95378 if (this.options.ranges) {
95379 this.yylloc.range = [0,0];
95380 }
95381 this.offset = 0;
95382 return this;
95383 },
95384
95385// consumes and returns one char from the input
95386input:function () {
95387 var ch = this._input[0];
95388 this.yytext += ch;
95389 this.yyleng++;
95390 this.offset++;
95391 this.match += ch;
95392 this.matched += ch;
95393 var lines = ch.match(/(?:\r\n?|\n).*/g);
95394 if (lines) {
95395 this.yylineno++;
95396 this.yylloc.last_line++;
95397 } else {
95398 this.yylloc.last_column++;
95399 }
95400 if (this.options.ranges) {
95401 this.yylloc.range[1]++;
95402 }
95403
95404 this._input = this._input.slice(1);
95405 return ch;
95406 },
95407
95408// unshifts one char (or a string) into the input
95409unput:function (ch) {
95410 var len = ch.length;
95411 var lines = ch.split(/(?:\r\n?|\n)/g);
95412
95413 this._input = ch + this._input;
95414 this.yytext = this.yytext.substr(0, this.yytext.length - len);
95415 //this.yyleng -= len;
95416 this.offset -= len;
95417 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
95418 this.match = this.match.substr(0, this.match.length - 1);
95419 this.matched = this.matched.substr(0, this.matched.length - 1);
95420
95421 if (lines.length - 1) {
95422 this.yylineno -= lines.length - 1;
95423 }
95424 var r = this.yylloc.range;
95425
95426 this.yylloc = {
95427 first_line: this.yylloc.first_line,
95428 last_line: this.yylineno + 1,
95429 first_column: this.yylloc.first_column,
95430 last_column: lines ?
95431 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
95432 + oldLines[oldLines.length - lines.length].length - lines[0].length :
95433 this.yylloc.first_column - len
95434 };
95435
95436 if (this.options.ranges) {
95437 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
95438 }
95439 this.yyleng = this.yytext.length;
95440 return this;
95441 },
95442
95443// When called from action, caches matched text and appends it on next action
95444more:function () {
95445 this._more = true;
95446 return this;
95447 },
95448
95449// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
95450reject:function () {
95451 if (this.options.backtrack_lexer) {
95452 this._backtrack = true;
95453 } else {
95454 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
95455 text: "",
95456 token: null,
95457 line: this.yylineno
95458 });
95459
95460 }
95461 return this;
95462 },
95463
95464// retain first n characters of the match
95465less:function (n) {
95466 this.unput(this.match.slice(n));
95467 },
95468
95469// displays already matched input, i.e. for error messages
95470pastInput:function () {
95471 var past = this.matched.substr(0, this.matched.length - this.match.length);
95472 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
95473 },
95474
95475// displays upcoming input, i.e. for error messages
95476upcomingInput:function () {
95477 var next = this.match;
95478 if (next.length < 20) {
95479 next += this._input.substr(0, 20-next.length);
95480 }
95481 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
95482 },
95483
95484// displays the character position where the lexing error occurred, i.e. for error messages
95485showPosition:function () {
95486 var pre = this.pastInput();
95487 var c = new Array(pre.length + 1).join("-");
95488 return pre + this.upcomingInput() + "\n" + c + "^";
95489 },
95490
95491// test the lexed token: return FALSE when not a match, otherwise return token
95492test_match:function(match, indexed_rule) {
95493 var token,
95494 lines,
95495 backup;
95496
95497 if (this.options.backtrack_lexer) {
95498 // save context
95499 backup = {
95500 yylineno: this.yylineno,
95501 yylloc: {
95502 first_line: this.yylloc.first_line,
95503 last_line: this.last_line,
95504 first_column: this.yylloc.first_column,
95505 last_column: this.yylloc.last_column
95506 },
95507 yytext: this.yytext,
95508 match: this.match,
95509 matches: this.matches,
95510 matched: this.matched,
95511 yyleng: this.yyleng,
95512 offset: this.offset,
95513 _more: this._more,
95514 _input: this._input,
95515 yy: this.yy,
95516 conditionStack: this.conditionStack.slice(0),
95517 done: this.done
95518 };
95519 if (this.options.ranges) {
95520 backup.yylloc.range = this.yylloc.range.slice(0);
95521 }
95522 }
95523
95524 lines = match[0].match(/(?:\r\n?|\n).*/g);
95525 if (lines) {
95526 this.yylineno += lines.length;
95527 }
95528 this.yylloc = {
95529 first_line: this.yylloc.last_line,
95530 last_line: this.yylineno + 1,
95531 first_column: this.yylloc.last_column,
95532 last_column: lines ?
95533 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
95534 this.yylloc.last_column + match[0].length
95535 };
95536 this.yytext += match[0];
95537 this.match += match[0];
95538 this.matches = match;
95539 this.yyleng = this.yytext.length;
95540 if (this.options.ranges) {
95541 this.yylloc.range = [this.offset, this.offset += this.yyleng];
95542 }
95543 this._more = false;
95544 this._backtrack = false;
95545 this._input = this._input.slice(match[0].length);
95546 this.matched += match[0];
95547 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
95548 if (this.done && this._input) {
95549 this.done = false;
95550 }
95551 if (token) {
95552 return token;
95553 } else if (this._backtrack) {
95554 // recover context
95555 for (var k in backup) {
95556 this[k] = backup[k];
95557 }
95558 return false; // rule action called reject() implying the next rule should be tested instead.
95559 }
95560 return false;
95561 },
95562
95563// return next match in input
95564next:function () {
95565 if (this.done) {
95566 return this.EOF;
95567 }
95568 if (!this._input) {
95569 this.done = true;
95570 }
95571
95572 var token,
95573 match,
95574 tempMatch,
95575 index;
95576 if (!this._more) {
95577 this.yytext = '';
95578 this.match = '';
95579 }
95580 var rules = this._currentRules();
95581 for (var i = 0; i < rules.length; i++) {
95582 tempMatch = this._input.match(this.rules[rules[i]]);
95583 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
95584 match = tempMatch;
95585 index = i;
95586 if (this.options.backtrack_lexer) {
95587 token = this.test_match(tempMatch, rules[i]);
95588 if (token !== false) {
95589 return token;
95590 } else if (this._backtrack) {
95591 match = false;
95592 continue; // rule action called reject() implying a rule MISmatch.
95593 } else {
95594 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
95595 return false;
95596 }
95597 } else if (!this.options.flex) {
95598 break;
95599 }
95600 }
95601 }
95602 if (match) {
95603 token = this.test_match(match, rules[index]);
95604 if (token !== false) {
95605 return token;
95606 }
95607 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
95608 return false;
95609 }
95610 if (this._input === "") {
95611 return this.EOF;
95612 } else {
95613 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
95614 text: "",
95615 token: null,
95616 line: this.yylineno
95617 });
95618 }
95619 },
95620
95621// return next match that has a token
95622lex:function lex () {
95623 var r = this.next();
95624 if (r) {
95625 return r;
95626 } else {
95627 return this.lex();
95628 }
95629 },
95630
95631// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
95632begin:function begin (condition) {
95633 this.conditionStack.push(condition);
95634 },
95635
95636// pop the previously active lexer condition state off the condition stack
95637popState:function popState () {
95638 var n = this.conditionStack.length - 1;
95639 if (n > 0) {
95640 return this.conditionStack.pop();
95641 } else {
95642 return this.conditionStack[0];
95643 }
95644 },
95645
95646// produce the lexer rule set which is active for the currently active lexer condition state
95647_currentRules:function _currentRules () {
95648 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
95649 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
95650 } else {
95651 return this.conditions["INITIAL"].rules;
95652 }
95653 },
95654
95655// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
95656topState:function topState (n) {
95657 n = this.conditionStack.length - 1 - Math.abs(n || 0);
95658 if (n >= 0) {
95659 return this.conditionStack[n];
95660 } else {
95661 return "INITIAL";
95662 }
95663 },
95664
95665// alias for begin(condition)
95666pushState:function pushState (condition) {
95667 this.begin(condition);
95668 },
95669
95670// return the number of states currently on the stack
95671stateStackSize:function stateStackSize() {
95672 return this.conditionStack.length;
95673 },
95674options: {"case-insensitive":true},
95675performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
95676 // Pre-lexer code can go here
95677
95678var YYSTATE=YY_START;
95679switch($avoiding_name_collisions) {
95680case 0:/* do nothing */
95681break;
95682case 1:/* skip whitespace */
95683break;
95684case 2:return 4 ;
95685break;
95686case 3:return 9 ;
95687break;
95688case 4:return 'space';
95689break;
95690case 5:return 12;
95691break;
95692case 6:/*console.log('begin str');*/this.begin("string");
95693break;
95694case 7:/*console.log('pop-state');*/this.popState();
95695break;
95696case 8:/*console.log('ending string')*/return "STR";
95697break;
95698case 9:return "VALUE";
95699break;
95700case 10:return 6 ;
95701break;
95702}
95703},
95704rules: [/^(?:%%[^\n]*)/i,/^(?:\s+)/i,/^(?:pie\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:title\s[^#\n;]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],
95705conditions: {"string":{"rules":[7,8],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,5,6,9,10],"inclusive":true}}
95706});
95707return lexer;
95708})();
95709parser.lexer = lexer;
95710function Parser () {
95711 this.yy = {};
95712}
95713Parser.prototype = parser;parser.Parser = Parser;
95714return new Parser;
95715})();
95716
95717
95718if (true) {
95719exports.parser = parser;
95720exports.Parser = parser.Parser;
95721exports.parse = function () { return parser.parse.apply(parser, arguments); };
95722exports.main = function commonjsMain (args) {
95723 if (!args[1]) {
95724 console.log('Usage: '+args[0]+' FILE');
95725 process.exit(1);
95726 }
95727 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
95728 return exports.parser.parse(source);
95729};
95730if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
95731 exports.main(process.argv.slice(1));
95732}
95733}
95734/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
95735
95736/***/ }),
95737
95738/***/ "./src/diagrams/pie/pieDb.js":
95739/*!***********************************!*\
95740 !*** ./src/diagrams/pie/pieDb.js ***!
95741 \***********************************/
95742/*! exports provided: default */
95743/***/ (function(module, __webpack_exports__, __webpack_require__) {
95744
95745"use strict";
95746__webpack_require__.r(__webpack_exports__);
95747/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
95748/**
95749 *
95750 */
95751
95752var sections = {};
95753var title = '';
95754
95755var addSection = function addSection(id, value) {
95756 if (typeof sections[id] === 'undefined') {
95757 sections[id] = value;
95758 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Added new section :', id); // console.log('Added new section:', id, value)
95759 }
95760};
95761
95762var getSections = function getSections() {
95763 return sections;
95764};
95765
95766var setTitle = function setTitle(txt) {
95767 title = txt;
95768};
95769
95770var getTitle = function getTitle() {
95771 return title;
95772};
95773
95774var cleanupValue = function cleanupValue(value) {
95775 if (value.substring(0, 1) === ':') {
95776 value = value.substring(1).trim();
95777 return Number(value.trim());
95778 } else {
95779 return Number(value.trim());
95780 }
95781};
95782
95783var clear = function clear() {
95784 sections = {};
95785 title = '';
95786}; // export const parseError = (err, hash) => {
95787// global.mermaidAPI.parseError(err, hash)
95788// }
95789
95790
95791/* harmony default export */ __webpack_exports__["default"] = ({
95792 addSection: addSection,
95793 getSections: getSections,
95794 cleanupValue: cleanupValue,
95795 clear: clear,
95796 setTitle: setTitle,
95797 getTitle: getTitle // parseError
95798
95799});
95800
95801/***/ }),
95802
95803/***/ "./src/diagrams/pie/pieRenderer.js":
95804/*!*****************************************!*\
95805 !*** ./src/diagrams/pie/pieRenderer.js ***!
95806 \*****************************************/
95807/*! exports provided: setConf, draw, default */
95808/***/ (function(module, __webpack_exports__, __webpack_require__) {
95809
95810"use strict";
95811__webpack_require__.r(__webpack_exports__);
95812/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
95813/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
95814/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
95815/* harmony import */ var _pieDb__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pieDb */ "./src/diagrams/pie/pieDb.js");
95816/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./parser/pie */ "./src/diagrams/pie/parser/pie.jison");
95817/* harmony import */ var _parser_pie__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_parser_pie__WEBPACK_IMPORTED_MODULE_2__);
95818/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
95819/**
95820 * Created by AshishJ on 11-09-2019.
95821 */
95822
95823
95824
95825
95826var conf = {};
95827var setConf = function setConf(cnf) {
95828 var keys = Object.keys(cnf);
95829 keys.forEach(function (key) {
95830 conf[key] = cnf[key];
95831 });
95832};
95833/**
95834 * Draws a Pie Chart with the data given in text.
95835 * @param text
95836 * @param id
95837 */
95838
95839var w;
95840var draw = function draw(txt, id) {
95841 try {
95842 var parser = _parser_pie__WEBPACK_IMPORTED_MODULE_2___default.a.parser;
95843 parser.yy = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"];
95844 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Rendering info diagram\n' + txt); // Parse the Pie Chart definition
95845
95846 parser.yy.clear();
95847 parser.parse(txt);
95848 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Parsed info diagram');
95849 var elem = document.getElementById(id);
95850 w = elem.parentElement.offsetWidth;
95851
95852 if (typeof w === 'undefined') {
95853 w = 1200;
95854 }
95855
95856 if (typeof conf.useWidth !== 'undefined') {
95857 w = conf.useWidth;
95858 }
95859
95860 var h = 450;
95861 elem.setAttribute('height', '100%'); // Set viewBox
95862
95863 elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h); // Fetch the default direction, use TD if none was found
95864
95865 var width = w; // 450
95866
95867 var height = 450;
95868 var margin = 40;
95869 var legendRectSize = 18;
95870 var legendSpacing = 4;
95871 var radius = Math.min(width, height) / 2 - margin;
95872 var svg = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + id).append('svg').attr('width', width).attr('height', height).append('g').attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');
95873 var data = _pieDb__WEBPACK_IMPORTED_MODULE_1__["default"].getSections();
95874 var sum = 0;
95875 Object.keys(data).forEach(function (key) {
95876 sum += data[key];
95877 });
95878 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info(data); // set the color scale
95879
95880 var color = d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"]().domain(data).range(d3__WEBPACK_IMPORTED_MODULE_0__["schemeSet2"]); // Compute the position of each group on the pie:
95881
95882 var pie = d3__WEBPACK_IMPORTED_MODULE_0__["pie"]().value(function (d) {
95883 return d.value;
95884 });
95885 var dataReady = pie(d3__WEBPACK_IMPORTED_MODULE_0__["entries"](data)); // shape helper to build arcs:
95886
95887 var arcGenerator = d3__WEBPACK_IMPORTED_MODULE_0__["arc"]().innerRadius(0).outerRadius(radius); // Build the pie chart: Basically, each part of the pie is a path that we build using the arc function.
95888
95889 svg.selectAll('mySlices').data(dataReady).enter().append('path').attr('d', arcGenerator).attr('fill', function (d) {
95890 return color(d.data.key);
95891 }).attr('stroke', 'black').style('stroke-width', '2px').style('opacity', 0.7); // Now add the Percentage. Use the centroid method to get the best coordinates
95892
95893 svg.selectAll('mySlices').data(dataReady).enter().append('text').text(function (d) {
95894 return (d.data.value / sum * 100).toFixed(0) + '%';
95895 }).attr('transform', function (d) {
95896 return 'translate(' + arcGenerator.centroid(d) + ')';
95897 }).style('text-anchor', 'middle').attr('class', 'slice').style('font-size', 17);
95898 svg.append('text').text(parser.yy.getTitle()).attr('x', 0).attr('y', -(h - 50) / 2).attr('class', 'pieTitleText'); //Add the slegend/annotations for each section
95899
95900 var legend = svg.selectAll('.legend').data(color.domain()).enter().append('g').attr('class', 'legend').attr('transform', function (d, i) {
95901 var height = legendRectSize + legendSpacing;
95902 var offset = height * color.domain().length / 2;
95903 var horz = 12 * legendRectSize;
95904 var vert = i * height - offset;
95905 return 'translate(' + horz + ',' + vert + ')';
95906 });
95907 legend.append('rect').attr('width', legendRectSize).attr('height', legendRectSize).style('fill', color).style('stroke', color);
95908 legend.append('text').attr('x', legendRectSize + legendSpacing).attr('y', legendRectSize - legendSpacing).text(function (d) {
95909 return d;
95910 });
95911 } catch (e) {
95912 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error('Error while rendering info diagram');
95913 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].error(e.message);
95914 }
95915};
95916/* harmony default export */ __webpack_exports__["default"] = ({
95917 setConf: setConf,
95918 draw: draw
95919});
95920
95921/***/ }),
95922
95923/***/ "./src/diagrams/sequence/parser/sequenceDiagram.jison":
95924/*!************************************************************!*\
95925 !*** ./src/diagrams/sequence/parser/sequenceDiagram.jison ***!
95926 \************************************************************/
95927/*! no static exports found */
95928/***/ (function(module, exports, __webpack_require__) {
95929
95930/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
95931/*
95932 Returns a Parser object of the following structure:
95933
95934 Parser: {
95935 yy: {}
95936 }
95937
95938 Parser.prototype: {
95939 yy: {},
95940 trace: function(),
95941 symbols_: {associative list: name ==> number},
95942 terminals_: {associative list: number ==> name},
95943 productions_: [...],
95944 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
95945 table: [...],
95946 defaultActions: {...},
95947 parseError: function(str, hash),
95948 parse: function(input),
95949
95950 lexer: {
95951 EOF: 1,
95952 parseError: function(str, hash),
95953 setInput: function(input),
95954 input: function(),
95955 unput: function(str),
95956 more: function(),
95957 less: function(n),
95958 pastInput: function(),
95959 upcomingInput: function(),
95960 showPosition: function(),
95961 test_match: function(regex_match_array, rule_index),
95962 next: function(),
95963 lex: function(),
95964 begin: function(condition),
95965 popState: function(),
95966 _currentRules: function(),
95967 topState: function(),
95968 pushState: function(condition),
95969
95970 options: {
95971 ranges: boolean (optional: true ==> token location info will include a .range[] member)
95972 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
95973 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
95974 },
95975
95976 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
95977 rules: [...],
95978 conditions: {associative list: name ==> set},
95979 }
95980 }
95981
95982
95983 token location info (@$, _$, etc.): {
95984 first_line: n,
95985 last_line: n,
95986 first_column: n,
95987 last_column: n,
95988 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
95989 }
95990
95991
95992 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
95993 text: (matched text)
95994 token: (the produced terminal token, if any)
95995 line: (yylineno)
95996 }
95997 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
95998 loc: (yylloc)
95999 expected: (string describing the set of expected tokens)
96000 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
96001 }
96002*/
96003var parser = (function(){
96004var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,12],$V7=[1,14],$V8=[1,15],$V9=[1,17],$Va=[1,18],$Vb=[1,19],$Vc=[1,20],$Vd=[1,21],$Ve=[1,22],$Vf=[1,24],$Vg=[1,25],$Vh=[1,4,5,10,15,16,18,20,21,22,23,24,26,28,29,30,41],$Vi=[1,33],$Vj=[4,5,10,15,16,18,20,21,22,23,24,26,30,41],$Vk=[4,5,10,15,16,18,20,21,22,23,24,26,29,30,41],$Vl=[4,5,10,15,16,18,20,21,22,23,24,26,28,30,41],$Vm=[39,40,41];
96005var parser = {trace: function trace () { },
96006yy: {},
96007symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"SD":6,"document":7,"line":8,"statement":9,"participant":10,"actor":11,"AS":12,"restOfLine":13,"signal":14,"activate":15,"deactivate":16,"note_statement":17,"title":18,"text2":19,"loop":20,"end":21,"rect":22,"opt":23,"alt":24,"else_sections":25,"par":26,"par_sections":27,"and":28,"else":29,"note":30,"placement":31,"over":32,"actor_pair":33,"spaceList":34,",":35,"left_of":36,"right_of":37,"signaltype":38,"+":39,"-":40,"ACTOR":41,"SOLID_OPEN_ARROW":42,"DOTTED_OPEN_ARROW":43,"SOLID_ARROW":44,"DOTTED_ARROW":45,"SOLID_CROSS":46,"DOTTED_CROSS":47,"TXT":48,"$accept":0,"$end":1},
96008terminals_: {2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"rect",23:"opt",24:"alt",26:"par",28:"and",29:"else",30:"note",32:"over",35:",",36:"left_of",37:"right_of",39:"+",40:"-",41:"ACTOR",42:"SOLID_OPEN_ARROW",43:"DOTTED_OPEN_ARROW",44:"SOLID_ARROW",45:"DOTTED_ARROW",46:"SOLID_CROSS",47:"DOTTED_CROSS",48:"TXT"},
96009productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,4],[9,4],[9,4],[27,1],[27,4],[25,1],[25,4],[17,4],[17,4],[34,2],[34,1],[33,3],[33,1],[31,1],[31,1],[14,5],[14,5],[14,4],[11,1],[38,1],[38,1],[38,1],[38,1],[38,1],[38,1],[19,1]],
96010performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
96011/* this == yyval */
96012
96013var $0 = $$.length - 1;
96014switch (yystate) {
96015case 3:
96016 yy.apply($$[$0]);return $$[$0];
96017break;
96018case 4:
96019 this.$ = []
96020break;
96021case 5:
96022$$[$0-1].push($$[$0]);this.$ = $$[$0-1]
96023break;
96024case 6: case 7:
96025 this.$ = $$[$0]
96026break;
96027case 8:
96028 this.$=[];
96029break;
96030case 9:
96031$$[$0-3].description=$$[$0-1]; this.$=$$[$0-3];
96032break;
96033case 10:
96034this.$=$$[$0-1];
96035break;
96036case 12:
96037this.$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]};
96038break;
96039case 13:
96040this.$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-1]};
96041break;
96042case 15:
96043this.$=[{type:'setTitle', text:$$[$0-1]}]
96044break;
96045case 16:
96046
96047 $$[$0-1].unshift({type: 'loopStart', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_START});
96048 $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END});
96049 this.$=$$[$0-1];
96050break;
96051case 17:
96052
96053 $$[$0-1].unshift({type: 'rectStart', color:$$[$0-2], signalType: yy.LINETYPE.RECT_START });
96054 $$[$0-1].push({type: 'rectEnd', color:$$[$0-2], signalType: yy.LINETYPE.RECT_END });
96055 this.$=$$[$0-1];
96056break;
96057case 18:
96058
96059 $$[$0-1].unshift({type: 'optStart', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_START});
96060 $$[$0-1].push({type: 'optEnd', optText:$$[$0-2], signalType: yy.LINETYPE.OPT_END});
96061 this.$=$$[$0-1];
96062break;
96063case 19:
96064
96065 // Alt start
96066 $$[$0-1].unshift({type: 'altStart', altText:$$[$0-2], signalType: yy.LINETYPE.ALT_START});
96067 // Content in alt is already in $$[$0-1]
96068 // End
96069 $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});
96070 this.$=$$[$0-1];
96071break;
96072case 20:
96073
96074 // Parallel start
96075 $$[$0-1].unshift({type: 'parStart', parText:$$[$0-2], signalType: yy.LINETYPE.PAR_START});
96076 // Content in par is already in $$[$0-1]
96077 // End
96078 $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});
96079 this.$=$$[$0-1];
96080break;
96081case 22:
96082 this.$ = $$[$0-3].concat([{type: 'and', parText:$$[$0-1], signalType: yy.LINETYPE.PAR_AND}, $$[$0]]);
96083break;
96084case 24:
96085 this.$ = $$[$0-3].concat([{type: 'else', altText:$$[$0-1], signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]);
96086break;
96087case 25:
96088
96089 this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}];
96090break;
96091case 26:
96092
96093 // Coerce actor_pair into a [to, from, ...] array
96094 $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2);
96095 $$[$0-2][0] = $$[$0-2][0].actor;
96096 $$[$0-2][1] = $$[$0-2][1].actor;
96097 this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}];
96098break;
96099case 29:
96100 this.$ = [$$[$0-2], $$[$0]];
96101break;
96102case 30:
96103 this.$ = $$[$0];
96104break;
96105case 31:
96106 this.$ = yy.PLACEMENT.LEFTOF;
96107break;
96108case 32:
96109 this.$ = yy.PLACEMENT.RIGHTOF;
96110break;
96111case 33:
96112 this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
96113 {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]}
96114 ]
96115break;
96116case 34:
96117 this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]},
96118 {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]}
96119 ]
96120break;
96121case 35:
96122 this.$ = [$$[$0-3],$$[$0-1],{type: 'addMessage', from:$$[$0-3].actor, to:$$[$0-1].actor, signalType:$$[$0-2], msg:$$[$0]}]
96123break;
96124case 36:
96125this.$={type: 'addActor', actor:$$[$0]}
96126break;
96127case 37:
96128 this.$ = yy.LINETYPE.SOLID_OPEN;
96129break;
96130case 38:
96131 this.$ = yy.LINETYPE.DOTTED_OPEN;
96132break;
96133case 39:
96134 this.$ = yy.LINETYPE.SOLID;
96135break;
96136case 40:
96137 this.$ = yy.LINETYPE.DOTTED;
96138break;
96139case 41:
96140 this.$ = yy.LINETYPE.SOLID_CROSS;
96141break;
96142case 42:
96143 this.$ = yy.LINETYPE.DOTTED_CROSS;
96144break;
96145case 43:
96146this.$ = $$[$0].substring(1).trim().replace(/\\n/gm, "\n");
96147break;
96148}
96149},
96150table: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,10,15,16,18,20,22,23,24,26,30,41],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,5]),{9:26,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},o($Vh,[2,7]),o($Vh,[2,8]),{11:27,41:$Vg},{5:[1,28]},{11:29,41:$Vg},{11:30,41:$Vg},{5:[1,31]},{19:32,48:$Vi},{13:[1,34]},{13:[1,35]},{13:[1,36]},{13:[1,37]},{13:[1,38]},{38:39,42:[1,40],43:[1,41],44:[1,42],45:[1,43],46:[1,44],47:[1,45]},{31:46,32:[1,47],36:[1,48],37:[1,49]},o([5,12,35,42,43,44,45,46,47,48],[2,36]),o($Vh,[2,6]),{5:[1,51],12:[1,50]},o($Vh,[2,11]),{5:[1,52]},{5:[1,53]},o($Vh,[2,14]),{5:[1,54]},{5:[2,43]},o($Vj,$V3,{7:55}),o($Vj,$V3,{7:56}),o($Vj,$V3,{7:57}),o($Vk,$V3,{25:58,7:59}),o($Vl,$V3,{27:60,7:61}),{11:64,39:[1,62],40:[1,63],41:$Vg},o($Vm,[2,37]),o($Vm,[2,38]),o($Vm,[2,39]),o($Vm,[2,40]),o($Vm,[2,41]),o($Vm,[2,42]),{11:65,41:$Vg},{11:67,33:66,41:$Vg},{41:[2,31]},{41:[2,32]},{13:[1,68]},o($Vh,[2,10]),o($Vh,[2,12]),o($Vh,[2,13]),o($Vh,[2,15]),{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,69],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,70],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[1,71],22:$Vb,23:$Vc,24:$Vd,26:$Ve,30:$Vf,41:$Vg},{21:[1,72]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,23],22:$Vb,23:$Vc,24:$Vd,26:$Ve,29:[1,73],30:$Vf,41:$Vg},{21:[1,74]},{4:$V4,5:$V5,8:8,9:10,10:$V6,11:23,14:13,15:$V7,16:$V8,17:16,18:$V9,20:$Va,21:[2,21],22:$Vb,23:$Vc,24:$Vd,26:$Ve,28:[1,75],30:$Vf,41:$Vg},{11:76,41:$Vg},{11:77,41:$Vg},{19:78,48:$Vi},{19:79,48:$Vi},{19:80,48:$Vi},{35:[1,81],48:[2,30]},{5:[1,82]},o($Vh,[2,16]),o($Vh,[2,17]),o($Vh,[2,18]),o($Vh,[2,19]),{13:[1,83]},o($Vh,[2,20]),{13:[1,84]},{19:85,48:$Vi},{19:86,48:$Vi},{5:[2,35]},{5:[2,25]},{5:[2,26]},{11:87,41:$Vg},o($Vh,[2,9]),o($Vk,$V3,{7:59,25:88}),o($Vl,$V3,{7:61,27:89}),{5:[2,33]},{5:[2,34]},{48:[2,29]},{21:[2,24]},{21:[2,22]}],
96151defaultActions: {5:[2,1],6:[2,2],33:[2,43],48:[2,31],49:[2,32],78:[2,35],79:[2,25],80:[2,26],85:[2,33],86:[2,34],87:[2,29],88:[2,24],89:[2,22]},
96152parseError: function parseError (str, hash) {
96153 if (hash.recoverable) {
96154 this.trace(str);
96155 } else {
96156 var error = new Error(str);
96157 error.hash = hash;
96158 throw error;
96159 }
96160},
96161parse: function parse(input) {
96162 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
96163 var args = lstack.slice.call(arguments, 1);
96164 var lexer = Object.create(this.lexer);
96165 var sharedState = { yy: {} };
96166 for (var k in this.yy) {
96167 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
96168 sharedState.yy[k] = this.yy[k];
96169 }
96170 }
96171 lexer.setInput(input, sharedState.yy);
96172 sharedState.yy.lexer = lexer;
96173 sharedState.yy.parser = this;
96174 if (typeof lexer.yylloc == 'undefined') {
96175 lexer.yylloc = {};
96176 }
96177 var yyloc = lexer.yylloc;
96178 lstack.push(yyloc);
96179 var ranges = lexer.options && lexer.options.ranges;
96180 if (typeof sharedState.yy.parseError === 'function') {
96181 this.parseError = sharedState.yy.parseError;
96182 } else {
96183 this.parseError = Object.getPrototypeOf(this).parseError;
96184 }
96185 function popStack(n) {
96186 stack.length = stack.length - 2 * n;
96187 vstack.length = vstack.length - n;
96188 lstack.length = lstack.length - n;
96189 }
96190 function lex() {
96191 var token;
96192 token = tstack.pop() || lexer.lex() || EOF;
96193 if (typeof token !== 'number') {
96194 if (token instanceof Array) {
96195 tstack = token;
96196 token = tstack.pop();
96197 }
96198 token = self.symbols_[token] || token;
96199 }
96200 return token;
96201 }
96202 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
96203 while (true) {
96204 state = stack[stack.length - 1];
96205 if (this.defaultActions[state]) {
96206 action = this.defaultActions[state];
96207 } else {
96208 if (symbol === null || typeof symbol == 'undefined') {
96209 symbol = lex();
96210 }
96211 action = table[state] && table[state][symbol];
96212 }
96213 if (typeof action === 'undefined' || !action.length || !action[0]) {
96214 var errStr = '';
96215 expected = [];
96216 for (p in table[state]) {
96217 if (this.terminals_[p] && p > TERROR) {
96218 expected.push('\'' + this.terminals_[p] + '\'');
96219 }
96220 }
96221 if (lexer.showPosition) {
96222 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
96223 } else {
96224 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
96225 }
96226 this.parseError(errStr, {
96227 text: lexer.match,
96228 token: this.terminals_[symbol] || symbol,
96229 line: lexer.yylineno,
96230 loc: yyloc,
96231 expected: expected
96232 });
96233 }
96234 if (action[0] instanceof Array && action.length > 1) {
96235 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
96236 }
96237 switch (action[0]) {
96238 case 1:
96239 stack.push(symbol);
96240 vstack.push(lexer.yytext);
96241 lstack.push(lexer.yylloc);
96242 stack.push(action[1]);
96243 symbol = null;
96244 if (!preErrorSymbol) {
96245 yyleng = lexer.yyleng;
96246 yytext = lexer.yytext;
96247 yylineno = lexer.yylineno;
96248 yyloc = lexer.yylloc;
96249 if (recovering > 0) {
96250 recovering--;
96251 }
96252 } else {
96253 symbol = preErrorSymbol;
96254 preErrorSymbol = null;
96255 }
96256 break;
96257 case 2:
96258 len = this.productions_[action[1]][1];
96259 yyval.$ = vstack[vstack.length - len];
96260 yyval._$ = {
96261 first_line: lstack[lstack.length - (len || 1)].first_line,
96262 last_line: lstack[lstack.length - 1].last_line,
96263 first_column: lstack[lstack.length - (len || 1)].first_column,
96264 last_column: lstack[lstack.length - 1].last_column
96265 };
96266 if (ranges) {
96267 yyval._$.range = [
96268 lstack[lstack.length - (len || 1)].range[0],
96269 lstack[lstack.length - 1].range[1]
96270 ];
96271 }
96272 r = this.performAction.apply(yyval, [
96273 yytext,
96274 yyleng,
96275 yylineno,
96276 sharedState.yy,
96277 action[1],
96278 vstack,
96279 lstack
96280 ].concat(args));
96281 if (typeof r !== 'undefined') {
96282 return r;
96283 }
96284 if (len) {
96285 stack = stack.slice(0, -1 * len * 2);
96286 vstack = vstack.slice(0, -1 * len);
96287 lstack = lstack.slice(0, -1 * len);
96288 }
96289 stack.push(this.productions_[action[1]][0]);
96290 vstack.push(yyval.$);
96291 lstack.push(yyval._$);
96292 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
96293 stack.push(newState);
96294 break;
96295 case 3:
96296 return true;
96297 }
96298 }
96299 return true;
96300}};
96301
96302/* generated by jison-lex 0.3.4 */
96303var lexer = (function(){
96304var lexer = ({
96305
96306EOF:1,
96307
96308parseError:function parseError(str, hash) {
96309 if (this.yy.parser) {
96310 this.yy.parser.parseError(str, hash);
96311 } else {
96312 throw new Error(str);
96313 }
96314 },
96315
96316// resets the lexer, sets new input
96317setInput:function (input, yy) {
96318 this.yy = yy || this.yy || {};
96319 this._input = input;
96320 this._more = this._backtrack = this.done = false;
96321 this.yylineno = this.yyleng = 0;
96322 this.yytext = this.matched = this.match = '';
96323 this.conditionStack = ['INITIAL'];
96324 this.yylloc = {
96325 first_line: 1,
96326 first_column: 0,
96327 last_line: 1,
96328 last_column: 0
96329 };
96330 if (this.options.ranges) {
96331 this.yylloc.range = [0,0];
96332 }
96333 this.offset = 0;
96334 return this;
96335 },
96336
96337// consumes and returns one char from the input
96338input:function () {
96339 var ch = this._input[0];
96340 this.yytext += ch;
96341 this.yyleng++;
96342 this.offset++;
96343 this.match += ch;
96344 this.matched += ch;
96345 var lines = ch.match(/(?:\r\n?|\n).*/g);
96346 if (lines) {
96347 this.yylineno++;
96348 this.yylloc.last_line++;
96349 } else {
96350 this.yylloc.last_column++;
96351 }
96352 if (this.options.ranges) {
96353 this.yylloc.range[1]++;
96354 }
96355
96356 this._input = this._input.slice(1);
96357 return ch;
96358 },
96359
96360// unshifts one char (or a string) into the input
96361unput:function (ch) {
96362 var len = ch.length;
96363 var lines = ch.split(/(?:\r\n?|\n)/g);
96364
96365 this._input = ch + this._input;
96366 this.yytext = this.yytext.substr(0, this.yytext.length - len);
96367 //this.yyleng -= len;
96368 this.offset -= len;
96369 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
96370 this.match = this.match.substr(0, this.match.length - 1);
96371 this.matched = this.matched.substr(0, this.matched.length - 1);
96372
96373 if (lines.length - 1) {
96374 this.yylineno -= lines.length - 1;
96375 }
96376 var r = this.yylloc.range;
96377
96378 this.yylloc = {
96379 first_line: this.yylloc.first_line,
96380 last_line: this.yylineno + 1,
96381 first_column: this.yylloc.first_column,
96382 last_column: lines ?
96383 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
96384 + oldLines[oldLines.length - lines.length].length - lines[0].length :
96385 this.yylloc.first_column - len
96386 };
96387
96388 if (this.options.ranges) {
96389 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
96390 }
96391 this.yyleng = this.yytext.length;
96392 return this;
96393 },
96394
96395// When called from action, caches matched text and appends it on next action
96396more:function () {
96397 this._more = true;
96398 return this;
96399 },
96400
96401// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
96402reject:function () {
96403 if (this.options.backtrack_lexer) {
96404 this._backtrack = true;
96405 } else {
96406 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
96407 text: "",
96408 token: null,
96409 line: this.yylineno
96410 });
96411
96412 }
96413 return this;
96414 },
96415
96416// retain first n characters of the match
96417less:function (n) {
96418 this.unput(this.match.slice(n));
96419 },
96420
96421// displays already matched input, i.e. for error messages
96422pastInput:function () {
96423 var past = this.matched.substr(0, this.matched.length - this.match.length);
96424 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
96425 },
96426
96427// displays upcoming input, i.e. for error messages
96428upcomingInput:function () {
96429 var next = this.match;
96430 if (next.length < 20) {
96431 next += this._input.substr(0, 20-next.length);
96432 }
96433 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
96434 },
96435
96436// displays the character position where the lexing error occurred, i.e. for error messages
96437showPosition:function () {
96438 var pre = this.pastInput();
96439 var c = new Array(pre.length + 1).join("-");
96440 return pre + this.upcomingInput() + "\n" + c + "^";
96441 },
96442
96443// test the lexed token: return FALSE when not a match, otherwise return token
96444test_match:function(match, indexed_rule) {
96445 var token,
96446 lines,
96447 backup;
96448
96449 if (this.options.backtrack_lexer) {
96450 // save context
96451 backup = {
96452 yylineno: this.yylineno,
96453 yylloc: {
96454 first_line: this.yylloc.first_line,
96455 last_line: this.last_line,
96456 first_column: this.yylloc.first_column,
96457 last_column: this.yylloc.last_column
96458 },
96459 yytext: this.yytext,
96460 match: this.match,
96461 matches: this.matches,
96462 matched: this.matched,
96463 yyleng: this.yyleng,
96464 offset: this.offset,
96465 _more: this._more,
96466 _input: this._input,
96467 yy: this.yy,
96468 conditionStack: this.conditionStack.slice(0),
96469 done: this.done
96470 };
96471 if (this.options.ranges) {
96472 backup.yylloc.range = this.yylloc.range.slice(0);
96473 }
96474 }
96475
96476 lines = match[0].match(/(?:\r\n?|\n).*/g);
96477 if (lines) {
96478 this.yylineno += lines.length;
96479 }
96480 this.yylloc = {
96481 first_line: this.yylloc.last_line,
96482 last_line: this.yylineno + 1,
96483 first_column: this.yylloc.last_column,
96484 last_column: lines ?
96485 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
96486 this.yylloc.last_column + match[0].length
96487 };
96488 this.yytext += match[0];
96489 this.match += match[0];
96490 this.matches = match;
96491 this.yyleng = this.yytext.length;
96492 if (this.options.ranges) {
96493 this.yylloc.range = [this.offset, this.offset += this.yyleng];
96494 }
96495 this._more = false;
96496 this._backtrack = false;
96497 this._input = this._input.slice(match[0].length);
96498 this.matched += match[0];
96499 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
96500 if (this.done && this._input) {
96501 this.done = false;
96502 }
96503 if (token) {
96504 return token;
96505 } else if (this._backtrack) {
96506 // recover context
96507 for (var k in backup) {
96508 this[k] = backup[k];
96509 }
96510 return false; // rule action called reject() implying the next rule should be tested instead.
96511 }
96512 return false;
96513 },
96514
96515// return next match in input
96516next:function () {
96517 if (this.done) {
96518 return this.EOF;
96519 }
96520 if (!this._input) {
96521 this.done = true;
96522 }
96523
96524 var token,
96525 match,
96526 tempMatch,
96527 index;
96528 if (!this._more) {
96529 this.yytext = '';
96530 this.match = '';
96531 }
96532 var rules = this._currentRules();
96533 for (var i = 0; i < rules.length; i++) {
96534 tempMatch = this._input.match(this.rules[rules[i]]);
96535 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
96536 match = tempMatch;
96537 index = i;
96538 if (this.options.backtrack_lexer) {
96539 token = this.test_match(tempMatch, rules[i]);
96540 if (token !== false) {
96541 return token;
96542 } else if (this._backtrack) {
96543 match = false;
96544 continue; // rule action called reject() implying a rule MISmatch.
96545 } else {
96546 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
96547 return false;
96548 }
96549 } else if (!this.options.flex) {
96550 break;
96551 }
96552 }
96553 }
96554 if (match) {
96555 token = this.test_match(match, rules[index]);
96556 if (token !== false) {
96557 return token;
96558 }
96559 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
96560 return false;
96561 }
96562 if (this._input === "") {
96563 return this.EOF;
96564 } else {
96565 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
96566 text: "",
96567 token: null,
96568 line: this.yylineno
96569 });
96570 }
96571 },
96572
96573// return next match that has a token
96574lex:function lex () {
96575 var r = this.next();
96576 if (r) {
96577 return r;
96578 } else {
96579 return this.lex();
96580 }
96581 },
96582
96583// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
96584begin:function begin (condition) {
96585 this.conditionStack.push(condition);
96586 },
96587
96588// pop the previously active lexer condition state off the condition stack
96589popState:function popState () {
96590 var n = this.conditionStack.length - 1;
96591 if (n > 0) {
96592 return this.conditionStack.pop();
96593 } else {
96594 return this.conditionStack[0];
96595 }
96596 },
96597
96598// produce the lexer rule set which is active for the currently active lexer condition state
96599_currentRules:function _currentRules () {
96600 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
96601 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
96602 } else {
96603 return this.conditions["INITIAL"].rules;
96604 }
96605 },
96606
96607// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
96608topState:function topState (n) {
96609 n = this.conditionStack.length - 1 - Math.abs(n || 0);
96610 if (n >= 0) {
96611 return this.conditionStack[n];
96612 } else {
96613 return "INITIAL";
96614 }
96615 },
96616
96617// alias for begin(condition)
96618pushState:function pushState (condition) {
96619 this.begin(condition);
96620 },
96621
96622// return the number of states currently on the stack
96623stateStackSize:function stateStackSize() {
96624 return this.conditionStack.length;
96625 },
96626options: {"case-insensitive":true},
96627performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
96628var YYSTATE=YY_START;
96629switch($avoiding_name_collisions) {
96630case 0:return 5;
96631break;
96632case 1:/* skip all whitespace */
96633break;
96634case 2:/* skip same-line whitespace */
96635break;
96636case 3:/* skip comments */
96637break;
96638case 4:/* skip comments */
96639break;
96640case 5: this.begin('ID'); return 10;
96641break;
96642case 6: yy_.yytext = yy_.yytext.trim(); this.begin('ALIAS'); return 41;
96643break;
96644case 7: this.popState(); this.popState(); this.begin('LINE'); return 12;
96645break;
96646case 8: this.popState(); this.popState(); return 5;
96647break;
96648case 9: this.begin('LINE'); return 20;
96649break;
96650case 10: this.begin('LINE'); return 22;
96651break;
96652case 11: this.begin('LINE'); return 23;
96653break;
96654case 12: this.begin('LINE'); return 24;
96655break;
96656case 13: this.begin('LINE'); return 29;
96657break;
96658case 14: this.begin('LINE'); return 26;
96659break;
96660case 15: this.begin('LINE'); return 28;
96661break;
96662case 16: this.popState(); return 13;
96663break;
96664case 17:return 21;
96665break;
96666case 18:return 36;
96667break;
96668case 19:return 37;
96669break;
96670case 20:return 32;
96671break;
96672case 21:return 30;
96673break;
96674case 22: this.begin('ID'); return 15;
96675break;
96676case 23: this.begin('ID'); return 16;
96677break;
96678case 24:return 18;
96679break;
96680case 25:return 6;
96681break;
96682case 26:return 35;
96683break;
96684case 27:return 5;
96685break;
96686case 28: yy_.yytext = yy_.yytext.trim(); return 41;
96687break;
96688case 29:return 44;
96689break;
96690case 30:return 45;
96691break;
96692case 31:return 42;
96693break;
96694case 32:return 43;
96695break;
96696case 33:return 46;
96697break;
96698case 34:return 47;
96699break;
96700case 35:return 48;
96701break;
96702case 36:return 39;
96703break;
96704case 37:return 40;
96705break;
96706case 38:return 5;
96707break;
96708case 39:return 'INVALID';
96709break;
96710}
96711},
96712rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],
96713conditions: {"LINE":{"rules":[2,3,16],"inclusive":false},"ALIAS":{"rules":[2,3,7,8],"inclusive":false},"ID":{"rules":[2,3,6],"inclusive":false},"INITIAL":{"rules":[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39],"inclusive":true}}
96714});
96715return lexer;
96716})();
96717parser.lexer = lexer;
96718function Parser () {
96719 this.yy = {};
96720}
96721Parser.prototype = parser;parser.Parser = Parser;
96722return new Parser;
96723})();
96724
96725
96726if (true) {
96727exports.parser = parser;
96728exports.Parser = parser.Parser;
96729exports.parse = function () { return parser.parse.apply(parser, arguments); };
96730exports.main = function commonjsMain (args) {
96731 if (!args[1]) {
96732 console.log('Usage: '+args[0]+' FILE');
96733 process.exit(1);
96734 }
96735 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
96736 return exports.parser.parse(source);
96737};
96738if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
96739 exports.main(process.argv.slice(1));
96740}
96741}
96742/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
96743
96744/***/ }),
96745
96746/***/ "./src/diagrams/sequence/sequenceDb.js":
96747/*!*********************************************!*\
96748 !*** ./src/diagrams/sequence/sequenceDb.js ***!
96749 \*********************************************/
96750/*! exports provided: addActor, addMessage, addSignal, getMessages, getActors, getActor, getActorKeys, getTitle, clear, LINETYPE, ARROWTYPE, PLACEMENT, addNote, setTitle, apply, default */
96751/***/ (function(module, __webpack_exports__, __webpack_require__) {
96752
96753"use strict";
96754__webpack_require__.r(__webpack_exports__);
96755/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addActor", function() { return addActor; });
96756/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addMessage", function() { return addMessage; });
96757/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addSignal", function() { return addSignal; });
96758/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMessages", function() { return getMessages; });
96759/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActors", function() { return getActors; });
96760/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActor", function() { return getActor; });
96761/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getActorKeys", function() { return getActorKeys; });
96762/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTitle", function() { return getTitle; });
96763/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
96764/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LINETYPE", function() { return LINETYPE; });
96765/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARROWTYPE", function() { return ARROWTYPE; });
96766/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PLACEMENT", function() { return PLACEMENT; });
96767/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addNote", function() { return addNote; });
96768/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setTitle", function() { return setTitle; });
96769/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "apply", function() { return apply; });
96770/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
96771
96772var actors = {};
96773var messages = [];
96774var notes = [];
96775var title = '';
96776var addActor = function addActor(id, name, description) {
96777 // Don't allow description nulling
96778 var old = actors[id];
96779 if (old && name === old.name && description == null) return; // Don't allow null descriptions, either
96780
96781 if (description == null) description = name;
96782 actors[id] = {
96783 name: name,
96784 description: description
96785 };
96786};
96787var addMessage = function addMessage(idFrom, idTo, message, answer) {
96788 messages.push({
96789 from: idFrom,
96790 to: idTo,
96791 message: message,
96792 answer: answer
96793 });
96794};
96795var addSignal = function addSignal(idFrom, idTo, message, messageType) {
96796 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].debug('Adding message from=' + idFrom + ' to=' + idTo + ' message=' + message + ' type=' + messageType);
96797 messages.push({
96798 from: idFrom,
96799 to: idTo,
96800 message: message,
96801 type: messageType
96802 });
96803};
96804var getMessages = function getMessages() {
96805 return messages;
96806};
96807var getActors = function getActors() {
96808 return actors;
96809};
96810var getActor = function getActor(id) {
96811 return actors[id];
96812};
96813var getActorKeys = function getActorKeys() {
96814 return Object.keys(actors);
96815};
96816var getTitle = function getTitle() {
96817 return title;
96818};
96819var clear = function clear() {
96820 actors = {};
96821 messages = [];
96822};
96823var LINETYPE = {
96824 SOLID: 0,
96825 DOTTED: 1,
96826 NOTE: 2,
96827 SOLID_CROSS: 3,
96828 DOTTED_CROSS: 4,
96829 SOLID_OPEN: 5,
96830 DOTTED_OPEN: 6,
96831 LOOP_START: 10,
96832 LOOP_END: 11,
96833 ALT_START: 12,
96834 ALT_ELSE: 13,
96835 ALT_END: 14,
96836 OPT_START: 15,
96837 OPT_END: 16,
96838 ACTIVE_START: 17,
96839 ACTIVE_END: 18,
96840 PAR_START: 19,
96841 PAR_AND: 20,
96842 PAR_END: 21,
96843 RECT_START: 22,
96844 RECT_END: 23
96845};
96846var ARROWTYPE = {
96847 FILLED: 0,
96848 OPEN: 1
96849};
96850var PLACEMENT = {
96851 LEFTOF: 0,
96852 RIGHTOF: 1,
96853 OVER: 2
96854};
96855var addNote = function addNote(actor, placement, message) {
96856 var note = {
96857 actor: actor,
96858 placement: placement,
96859 message: message
96860 }; // Coerce actor into a [to, from, ...] array
96861
96862 var actors = [].concat(actor, actor);
96863 notes.push(note);
96864 messages.push({
96865 from: actors[0],
96866 to: actors[1],
96867 message: message,
96868 type: LINETYPE.NOTE,
96869 placement: placement
96870 });
96871};
96872var setTitle = function setTitle(titleText) {
96873 title = titleText;
96874};
96875var apply = function apply(param) {
96876 if (param instanceof Array) {
96877 param.forEach(function (item) {
96878 apply(item);
96879 });
96880 } else {
96881 switch (param.type) {
96882 case 'addActor':
96883 addActor(param.actor, param.actor, param.description);
96884 break;
96885
96886 case 'activeStart':
96887 addSignal(param.actor, undefined, undefined, param.signalType);
96888 break;
96889
96890 case 'activeEnd':
96891 addSignal(param.actor, undefined, undefined, param.signalType);
96892 break;
96893
96894 case 'addNote':
96895 addNote(param.actor, param.placement, param.text);
96896 break;
96897
96898 case 'addMessage':
96899 addSignal(param.from, param.to, param.msg, param.signalType);
96900 break;
96901
96902 case 'loopStart':
96903 addSignal(undefined, undefined, param.loopText, param.signalType);
96904 break;
96905
96906 case 'loopEnd':
96907 addSignal(undefined, undefined, undefined, param.signalType);
96908 break;
96909
96910 case 'rectStart':
96911 addSignal(undefined, undefined, param.color, param.signalType);
96912 break;
96913
96914 case 'rectEnd':
96915 addSignal(undefined, undefined, undefined, param.signalType);
96916 break;
96917
96918 case 'optStart':
96919 addSignal(undefined, undefined, param.optText, param.signalType);
96920 break;
96921
96922 case 'optEnd':
96923 addSignal(undefined, undefined, undefined, param.signalType);
96924 break;
96925
96926 case 'altStart':
96927 addSignal(undefined, undefined, param.altText, param.signalType);
96928 break;
96929
96930 case 'else':
96931 addSignal(undefined, undefined, param.altText, param.signalType);
96932 break;
96933
96934 case 'altEnd':
96935 addSignal(undefined, undefined, undefined, param.signalType);
96936 break;
96937
96938 case 'setTitle':
96939 setTitle(param.text);
96940 break;
96941
96942 case 'parStart':
96943 addSignal(undefined, undefined, param.parText, param.signalType);
96944 break;
96945
96946 case 'and':
96947 addSignal(undefined, undefined, param.parText, param.signalType);
96948 break;
96949
96950 case 'parEnd':
96951 addSignal(undefined, undefined, undefined, param.signalType);
96952 break;
96953 }
96954 }
96955};
96956/* harmony default export */ __webpack_exports__["default"] = ({
96957 addActor: addActor,
96958 addMessage: addMessage,
96959 addSignal: addSignal,
96960 getMessages: getMessages,
96961 getActors: getActors,
96962 getActor: getActor,
96963 getActorKeys: getActorKeys,
96964 getTitle: getTitle,
96965 clear: clear,
96966 LINETYPE: LINETYPE,
96967 ARROWTYPE: ARROWTYPE,
96968 PLACEMENT: PLACEMENT,
96969 addNote: addNote,
96970 setTitle: setTitle,
96971 apply: apply
96972});
96973
96974/***/ }),
96975
96976/***/ "./src/diagrams/sequence/sequenceRenderer.js":
96977/*!***************************************************!*\
96978 !*** ./src/diagrams/sequence/sequenceRenderer.js ***!
96979 \***************************************************/
96980/*! exports provided: bounds, drawActors, setConf, draw, default */
96981/***/ (function(module, __webpack_exports__, __webpack_require__) {
96982
96983"use strict";
96984__webpack_require__.r(__webpack_exports__);
96985/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bounds", function() { return bounds; });
96986/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActors", function() { return drawActors; });
96987/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
96988/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
96989/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
96990/* harmony import */ var _svgDraw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./svgDraw */ "./src/diagrams/sequence/svgDraw.js");
96991/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
96992/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison");
96993/* harmony import */ var _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__);
96994/* harmony import */ var _sequenceDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
96995
96996
96997
96998
96999
97000_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy = _sequenceDb__WEBPACK_IMPORTED_MODULE_4__["default"];
97001var conf = {
97002 diagramMarginX: 50,
97003 diagramMarginY: 30,
97004 // Margin between actors
97005 actorMargin: 50,
97006 // Width of actor boxes
97007 width: 150,
97008 // Height of actor boxes
97009 height: 65,
97010 actorFontSize: 14,
97011 actorFontFamily: '"Open-Sans", "sans-serif"',
97012 // Margin around loop boxes
97013 boxMargin: 10,
97014 boxTextMargin: 5,
97015 noteMargin: 10,
97016 // Space between messages
97017 messageMargin: 35,
97018 // mirror actors under diagram
97019 mirrorActors: false,
97020 // Depending on css styling this might need adjustment
97021 // Prolongs the edge of the diagram downwards
97022 bottomMarginAdj: 1,
97023 // width of activation box
97024 activationWidth: 10,
97025 // text placement as: tspan | fo | old only text as before
97026 textPlacement: 'tspan',
97027 showSequenceNumbers: false
97028};
97029var bounds = {
97030 data: {
97031 startx: undefined,
97032 stopx: undefined,
97033 starty: undefined,
97034 stopy: undefined
97035 },
97036 verticalPos: 0,
97037 sequenceItems: [],
97038 activations: [],
97039 init: function init() {
97040 this.sequenceItems = [];
97041 this.activations = [];
97042 this.data = {
97043 startx: undefined,
97044 stopx: undefined,
97045 starty: undefined,
97046 stopy: undefined
97047 };
97048 this.verticalPos = 0;
97049 },
97050 updateVal: function updateVal(obj, key, val, fun) {
97051 if (typeof obj[key] === 'undefined') {
97052 obj[key] = val;
97053 } else {
97054 obj[key] = fun(val, obj[key]);
97055 }
97056 },
97057 updateBounds: function updateBounds(startx, starty, stopx, stopy) {
97058 var _self = this;
97059
97060 var cnt = 0;
97061
97062 function updateFn(type) {
97063 return function updateItemBounds(item) {
97064 cnt++; // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems
97065
97066 var n = _self.sequenceItems.length - cnt + 1;
97067
97068 _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);
97069
97070 _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);
97071
97072 _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);
97073
97074 _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);
97075
97076 if (!(type === 'activation')) {
97077 _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);
97078
97079 _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);
97080
97081 _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);
97082
97083 _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);
97084 }
97085 };
97086 }
97087
97088 this.sequenceItems.forEach(updateFn());
97089 this.activations.forEach(updateFn('activation'));
97090 },
97091 insert: function insert(startx, starty, stopx, stopy) {
97092 var _startx = Math.min(startx, stopx);
97093
97094 var _stopx = Math.max(startx, stopx);
97095
97096 var _starty = Math.min(starty, stopy);
97097
97098 var _stopy = Math.max(starty, stopy);
97099
97100 this.updateVal(bounds.data, 'startx', _startx, Math.min);
97101 this.updateVal(bounds.data, 'starty', _starty, Math.min);
97102 this.updateVal(bounds.data, 'stopx', _stopx, Math.max);
97103 this.updateVal(bounds.data, 'stopy', _stopy, Math.max);
97104 this.updateBounds(_startx, _starty, _stopx, _stopy);
97105 },
97106 newActivation: function newActivation(message, diagram) {
97107 var actorRect = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors()[message.from.actor];
97108 var stackedSize = actorActivations(message.from.actor).length;
97109 var x = actorRect.x + conf.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
97110 this.activations.push({
97111 startx: x,
97112 starty: this.verticalPos + 2,
97113 stopx: x + conf.activationWidth,
97114 stopy: undefined,
97115 actor: message.from.actor,
97116 anchored: _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].anchorElement(diagram)
97117 });
97118 },
97119 endActivation: function endActivation(message) {
97120 // find most recent activation for given actor
97121 var lastActorActivationIdx = this.activations.map(function (activation) {
97122 return activation.actor;
97123 }).lastIndexOf(message.from.actor);
97124 var activation = this.activations.splice(lastActorActivationIdx, 1)[0];
97125 return activation;
97126 },
97127 newLoop: function newLoop(title, fill) {
97128 this.sequenceItems.push({
97129 startx: undefined,
97130 starty: this.verticalPos,
97131 stopx: undefined,
97132 stopy: undefined,
97133 title: title,
97134 fill: fill
97135 });
97136 },
97137 endLoop: function endLoop() {
97138 var loop = this.sequenceItems.pop();
97139 return loop;
97140 },
97141 addSectionToLoop: function addSectionToLoop(message) {
97142 var loop = this.sequenceItems.pop();
97143 loop.sections = loop.sections || [];
97144 loop.sectionTitles = loop.sectionTitles || [];
97145 loop.sections.push(bounds.getVerticalPos());
97146 loop.sectionTitles.push(message);
97147 this.sequenceItems.push(loop);
97148 },
97149 bumpVerticalPos: function bumpVerticalPos(bump) {
97150 this.verticalPos = this.verticalPos + bump;
97151 this.data.stopy = this.verticalPos;
97152 },
97153 getVerticalPos: function getVerticalPos() {
97154 return this.verticalPos;
97155 },
97156 getBounds: function getBounds() {
97157 return this.data;
97158 }
97159};
97160
97161var _drawLongText = function _drawLongText(text, x, y, g, width) {
97162 var textHeight = 0;
97163 var lines = text.split(/<br\s*\/?>/gi);
97164 var _iteratorNormalCompletion = true;
97165 var _didIteratorError = false;
97166 var _iteratorError = undefined;
97167
97168 try {
97169 for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
97170 var line = _step.value;
97171 var textObj = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getTextObj();
97172 textObj.x = x;
97173 textObj.y = y + textHeight;
97174 textObj.textMargin = conf.noteMargin;
97175 textObj.dy = '1em';
97176 textObj.text = line;
97177 textObj.class = 'noteText';
97178 var textElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawText(g, textObj, width);
97179 textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
97180 }
97181 } catch (err) {
97182 _didIteratorError = true;
97183 _iteratorError = err;
97184 } finally {
97185 try {
97186 if (!_iteratorNormalCompletion && _iterator.return != null) {
97187 _iterator.return();
97188 }
97189 } finally {
97190 if (_didIteratorError) {
97191 throw _iteratorError;
97192 }
97193 }
97194 }
97195
97196 return textHeight;
97197};
97198/**
97199 * Draws an actor in the diagram with the attaced line
97200 * @param center - The center of the the actor
97201 * @param pos The position if the actor in the liost of actors
97202 * @param description The text in the box
97203 */
97204
97205
97206var drawNote = function drawNote(elem, startx, verticalPos, msg, forceWidth) {
97207 var rect = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].getNoteRect();
97208 rect.x = startx;
97209 rect.y = verticalPos;
97210 rect.width = forceWidth || conf.width;
97211 rect.class = 'note';
97212 var g = elem.append('g');
97213 var rectElem = _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawRect(g, rect);
97214
97215 var textHeight = _drawLongText(msg.message, startx - 4, verticalPos + 24, g, rect.width - conf.noteMargin);
97216
97217 bounds.insert(startx, verticalPos, startx + rect.width, verticalPos + 2 * conf.noteMargin + textHeight);
97218 rectElem.attr('height', textHeight + 2 * conf.noteMargin);
97219 bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
97220};
97221/**
97222 * Draws a message
97223 * @param elem
97224 * @param startx
97225 * @param stopx
97226 * @param verticalPos
97227 * @param txtCenter
97228 * @param msg
97229 */
97230
97231
97232var drawMessage = function drawMessage(elem, startx, stopx, verticalPos, msg, sequenceIndex) {
97233 var g = elem.append('g');
97234 var txtCenter = startx + (stopx - startx) / 2;
97235 var textElem;
97236 var counterBreaklines = 0;
97237 var breaklineOffset = 17;
97238 var breaklines = msg.message.split(/<br\s*\/?>/gi);
97239 var _iteratorNormalCompletion2 = true;
97240 var _didIteratorError2 = false;
97241 var _iteratorError2 = undefined;
97242
97243 try {
97244 for (var _iterator2 = breaklines[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
97245 var breakline = _step2.value;
97246 textElem = g.append('text') // text label for the x axis
97247 .attr('x', txtCenter).attr('y', verticalPos - 7 + counterBreaklines * breaklineOffset).style('text-anchor', 'middle').attr('class', 'messageText').text(breakline.trim());
97248 counterBreaklines++;
97249 }
97250 } catch (err) {
97251 _didIteratorError2 = true;
97252 _iteratorError2 = err;
97253 } finally {
97254 try {
97255 if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
97256 _iterator2.return();
97257 }
97258 } finally {
97259 if (_didIteratorError2) {
97260 throw _iteratorError2;
97261 }
97262 }
97263 }
97264
97265 var offsetLineCounter = counterBreaklines - 1;
97266 var totalOffset = offsetLineCounter * breaklineOffset;
97267 var textWidth = (textElem._groups || textElem)[0][0].getBBox().width;
97268 var line;
97269
97270 if (startx === stopx) {
97271 if (conf.rightAngles) {
97272 line = g.append('path').attr('d', "M ".concat(startx, ",").concat(verticalPos + totalOffset, " H ").concat(startx + conf.width / 2, " V ").concat(verticalPos + 25 + totalOffset, " H ").concat(startx));
97273 } else {
97274 line = g.append('path').attr('d', 'M ' + startx + ',' + (verticalPos + totalOffset) + ' C ' + (startx + 60) + ',' + (verticalPos - 10 + totalOffset) + ' ' + (startx + 60) + ',' + (verticalPos + 30 + totalOffset) + ' ' + startx + ',' + (verticalPos + 20 + totalOffset));
97275 }
97276
97277 bounds.bumpVerticalPos(30 + totalOffset);
97278 var dx = Math.max(textWidth / 2, 100);
97279 bounds.insert(startx - dx, bounds.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds.getVerticalPos() + totalOffset);
97280 } else {
97281 line = g.append('line');
97282 line.attr('x1', startx);
97283 line.attr('y1', verticalPos);
97284 line.attr('x2', stopx);
97285 line.attr('y2', verticalPos);
97286 bounds.insert(startx, bounds.getVerticalPos() - 10 + totalOffset, stopx, bounds.getVerticalPos() + totalOffset);
97287 } // Make an SVG Container
97288 // Draw the line
97289
97290
97291 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN) {
97292 line.style('stroke-dasharray', '3, 3');
97293 line.attr('class', 'messageLine1');
97294 } else {
97295 line.attr('class', 'messageLine0');
97296 }
97297
97298 var url = '';
97299
97300 if (conf.arrowMarkerAbsolute) {
97301 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
97302 url = url.replace(/\(/g, '\\(');
97303 url = url.replace(/\)/g, '\\)');
97304 }
97305
97306 line.attr('stroke-width', 2);
97307 line.attr('stroke', 'black');
97308 line.style('fill', 'none'); // remove any fill colour
97309
97310 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED) {
97311 line.attr('marker-end', 'url(' + url + '#arrowhead)');
97312 }
97313
97314 if (msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS || msg.type === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS) {
97315 line.attr('marker-end', 'url(' + url + '#crosshead)');
97316 } // add node number
97317
97318
97319 if (conf.showSequenceNumbers) {
97320 line.attr('marker-start', 'url(' + url + '#sequencenumber)');
97321 g.append('text').attr('x', startx).attr('y', verticalPos + 4).attr('font-family', 'sans-serif').attr('font-size', '12px').attr('text-anchor', 'middle').attr('textLength', '16px').attr('class', 'sequenceNumber').text(sequenceIndex);
97322 }
97323};
97324
97325var drawActors = function drawActors(diagram, actors, actorKeys, verticalPos) {
97326 // Draw the actors
97327 for (var i = 0; i < actorKeys.length; i++) {
97328 var key = actorKeys[i]; // Add some rendering data to the object
97329
97330 actors[key].x = i * conf.actorMargin + i * conf.width;
97331 actors[key].y = verticalPos;
97332 actors[key].width = conf.diagramMarginX;
97333 actors[key].height = conf.diagramMarginY; // Draw the box with the attached line
97334
97335 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActor(diagram, actors[key].x, verticalPos, actors[key].description, conf);
97336 bounds.insert(actors[key].x, verticalPos, actors[key].x + conf.width, conf.height);
97337 } // Add a margin between the actor boxes and the first arrow
97338
97339
97340 bounds.bumpVerticalPos(conf.height);
97341};
97342var setConf = function setConf(cnf) {
97343 var keys = Object.keys(cnf);
97344 keys.forEach(function (key) {
97345 conf[key] = cnf[key];
97346 });
97347 conf.actorFontFamily = cnf.fontFamily;
97348};
97349
97350var actorActivations = function actorActivations(actor) {
97351 return bounds.activations.filter(function (activation) {
97352 return activation.actor === actor;
97353 });
97354};
97355
97356var actorFlowVerticaBounds = function actorFlowVerticaBounds(actor) {
97357 // handle multiple stacked activations for same actor
97358 var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
97359 var activations = actorActivations(actor);
97360 var left = activations.reduce(function (acc, activation) {
97361 return Math.min(acc, activation.startx);
97362 }, actors[actor].x + conf.width / 2);
97363 var right = activations.reduce(function (acc, activation) {
97364 return Math.max(acc, activation.stopx);
97365 }, actors[actor].x + conf.width / 2);
97366 return [left, right];
97367};
97368/**
97369 * Draws a flowchart in the tag with id: id based on the graph definition in text.
97370 * @param text
97371 * @param id
97372 */
97373
97374
97375var draw = function draw(text, id) {
97376 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.clear();
97377 _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].parse(text + '\n');
97378 bounds.init();
97379 var diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id=\"".concat(id, "\"]"));
97380 var startx;
97381 var stopx;
97382 var forceWidth; // Fetch data from the parsing
97383
97384 var actors = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActors();
97385 var actorKeys = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getActorKeys();
97386 var messages = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getMessages();
97387 var title = _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.getTitle();
97388 drawActors(diagram, actors, actorKeys, 0); // The arrow head definition is attached to the svg once
97389
97390 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowHead(diagram);
97391 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertArrowCrossHead(diagram);
97392 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].insertSequenceNumber(diagram);
97393
97394 function activeEnd(msg, verticalPos) {
97395 var activationData = bounds.endActivation(msg);
97396
97397 if (activationData.starty + 18 > verticalPos) {
97398 activationData.starty = verticalPos - 6;
97399 verticalPos += 12;
97400 }
97401
97402 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawActivation(diagram, activationData, verticalPos, conf, actorActivations(msg.from.actor).length);
97403 bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
97404 } // const lastMsg
97405 // Draw the messages/signals
97406
97407
97408 var sequenceIndex = 1;
97409 messages.forEach(function (msg) {
97410 var loopData;
97411
97412 switch (msg.type) {
97413 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.NOTE:
97414 bounds.bumpVerticalPos(conf.boxMargin);
97415 startx = actors[msg.from].x;
97416 stopx = actors[msg.to].x;
97417
97418 if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.RIGHTOF) {
97419 drawNote(diagram, startx + (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
97420 } else if (msg.placement === _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.PLACEMENT.LEFTOF) {
97421 drawNote(diagram, startx - (conf.width + conf.actorMargin) / 2, bounds.getVerticalPos(), msg);
97422 } else if (msg.to === msg.from) {
97423 // Single-actor over
97424 drawNote(diagram, startx, bounds.getVerticalPos(), msg);
97425 } else {
97426 // Multi-actor over
97427 forceWidth = Math.abs(startx - stopx) + conf.actorMargin;
97428 drawNote(diagram, (startx + stopx + conf.width - forceWidth) / 2, bounds.getVerticalPos(), msg, forceWidth);
97429 }
97430
97431 break;
97432
97433 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_START:
97434 bounds.newActivation(msg, diagram);
97435 break;
97436
97437 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ACTIVE_END:
97438 activeEnd(msg, bounds.getVerticalPos());
97439 break;
97440
97441 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_START:
97442 bounds.bumpVerticalPos(conf.boxMargin);
97443 bounds.newLoop(msg.message);
97444 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
97445 break;
97446
97447 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.LOOP_END:
97448 loopData = bounds.endLoop();
97449 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'loop', conf);
97450 bounds.bumpVerticalPos(conf.boxMargin);
97451 break;
97452
97453 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_START:
97454 bounds.bumpVerticalPos(conf.boxMargin);
97455 bounds.newLoop(undefined, msg.message);
97456 bounds.bumpVerticalPos(conf.boxMargin);
97457 break;
97458
97459 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.RECT_END:
97460 {
97461 var rectData = bounds.endLoop();
97462 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawBackgroundRect(diagram, rectData);
97463 bounds.bumpVerticalPos(conf.boxMargin);
97464 break;
97465 }
97466
97467 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_START:
97468 bounds.bumpVerticalPos(conf.boxMargin);
97469 bounds.newLoop(msg.message);
97470 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
97471 break;
97472
97473 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.OPT_END:
97474 loopData = bounds.endLoop();
97475 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'opt', conf);
97476 bounds.bumpVerticalPos(conf.boxMargin);
97477 break;
97478
97479 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_START:
97480 bounds.bumpVerticalPos(conf.boxMargin);
97481 bounds.newLoop(msg.message);
97482 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
97483 break;
97484
97485 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_ELSE:
97486 bounds.bumpVerticalPos(conf.boxMargin);
97487 loopData = bounds.addSectionToLoop(msg.message);
97488 bounds.bumpVerticalPos(conf.boxMargin);
97489 break;
97490
97491 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.ALT_END:
97492 loopData = bounds.endLoop();
97493 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'alt', conf);
97494 bounds.bumpVerticalPos(conf.boxMargin);
97495 break;
97496
97497 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_START:
97498 bounds.bumpVerticalPos(conf.boxMargin);
97499 bounds.newLoop(msg.message);
97500 bounds.bumpVerticalPos(conf.boxMargin + conf.boxTextMargin);
97501 break;
97502
97503 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_AND:
97504 bounds.bumpVerticalPos(conf.boxMargin);
97505 loopData = bounds.addSectionToLoop(msg.message);
97506 bounds.bumpVerticalPos(conf.boxMargin);
97507 break;
97508
97509 case _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.PAR_END:
97510 loopData = bounds.endLoop();
97511 _svgDraw__WEBPACK_IMPORTED_MODULE_1__["default"].drawLoop(diagram, loopData, 'par', conf);
97512 bounds.bumpVerticalPos(conf.boxMargin);
97513 break;
97514
97515 default:
97516 try {
97517 // lastMsg = msg
97518 bounds.bumpVerticalPos(conf.messageMargin);
97519 var fromBounds = actorFlowVerticaBounds(msg.from);
97520 var toBounds = actorFlowVerticaBounds(msg.to);
97521 var fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
97522 var toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
97523 startx = fromBounds[fromIdx];
97524 stopx = toBounds[toIdx];
97525 var verticalPos = bounds.getVerticalPos();
97526 drawMessage(diagram, startx, stopx, verticalPos, msg, sequenceIndex);
97527 var allBounds = fromBounds.concat(toBounds);
97528 bounds.insert(Math.min.apply(null, allBounds), verticalPos, Math.max.apply(null, allBounds), verticalPos);
97529 } catch (e) {
97530 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].error('error while drawing message', e);
97531 }
97532
97533 } // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)
97534
97535
97536 if ([_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_OPEN, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.SOLID_CROSS, _parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_3__["parser"].yy.LINETYPE.DOTTED_CROSS].includes(msg.type)) {
97537 sequenceIndex++;
97538 }
97539 });
97540
97541 if (conf.mirrorActors) {
97542 // Draw actors below diagram
97543 bounds.bumpVerticalPos(conf.boxMargin * 2);
97544 drawActors(diagram, actors, actorKeys, bounds.getVerticalPos());
97545 }
97546
97547 var box = bounds.getBounds(); // Adjust line height of actor lines now that the height of the diagram is known
97548
97549 _logger__WEBPACK_IMPORTED_MODULE_2__["logger"].debug('For line height fix Querying: #' + id + ' .actor-line');
97550 var actorLines = d3__WEBPACK_IMPORTED_MODULE_0__["selectAll"]('#' + id + ' .actor-line');
97551 actorLines.attr('y2', box.stopy);
97552 var height = box.stopy - box.starty + 2 * conf.diagramMarginY;
97553
97554 if (conf.mirrorActors) {
97555 height = height - conf.boxMargin + conf.bottomMarginAdj;
97556 }
97557
97558 var width = box.stopx - box.startx + 2 * conf.diagramMarginX;
97559
97560 if (title) {
97561 diagram.append('text').text(title).attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr('y', -25);
97562 }
97563
97564 if (conf.useMaxWidth) {
97565 diagram.attr('height', '100%');
97566 diagram.attr('width', '100%');
97567 diagram.attr('style', 'max-width:' + width + 'px;');
97568 } else {
97569 diagram.attr('height', height);
97570 diagram.attr('width', width);
97571 }
97572
97573 var extraVertForTitle = title ? 40 : 0;
97574 diagram.attr('viewBox', box.startx - conf.diagramMarginX + ' -' + (conf.diagramMarginY + extraVertForTitle) + ' ' + width + ' ' + (height + extraVertForTitle));
97575};
97576/* harmony default export */ __webpack_exports__["default"] = ({
97577 bounds: bounds,
97578 drawActors: drawActors,
97579 setConf: setConf,
97580 draw: draw
97581});
97582
97583/***/ }),
97584
97585/***/ "./src/diagrams/sequence/svgDraw.js":
97586/*!******************************************!*\
97587 !*** ./src/diagrams/sequence/svgDraw.js ***!
97588 \******************************************/
97589/*! exports provided: drawRect, drawText, drawLabel, drawActor, anchorElement, drawActivation, drawLoop, drawBackgroundRect, insertArrowHead, insertSequenceNumber, insertArrowCrossHead, getTextObj, getNoteRect, default */
97590/***/ (function(module, __webpack_exports__, __webpack_require__) {
97591
97592"use strict";
97593__webpack_require__.r(__webpack_exports__);
97594/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawRect", function() { return drawRect; });
97595/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
97596/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLabel", function() { return drawLabel; });
97597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActor", function() { return drawActor; });
97598/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "anchorElement", function() { return anchorElement; });
97599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawActivation", function() { return drawActivation; });
97600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawLoop", function() { return drawLoop; });
97601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawBackgroundRect", function() { return drawBackgroundRect; });
97602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowHead", function() { return insertArrowHead; });
97603/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertSequenceNumber", function() { return insertSequenceNumber; });
97604/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertArrowCrossHead", function() { return insertArrowCrossHead; });
97605/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTextObj", function() { return getTextObj; });
97606/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getNoteRect", function() { return getNoteRect; });
97607var drawRect = function drawRect(elem, rectData) {
97608 var rectElem = elem.append('rect');
97609 rectElem.attr('x', rectData.x);
97610 rectElem.attr('y', rectData.y);
97611 rectElem.attr('fill', rectData.fill);
97612 rectElem.attr('stroke', rectData.stroke);
97613 rectElem.attr('width', rectData.width);
97614 rectElem.attr('height', rectData.height);
97615 rectElem.attr('rx', rectData.rx);
97616 rectElem.attr('ry', rectData.ry);
97617
97618 if (typeof rectData.class !== 'undefined') {
97619 rectElem.attr('class', rectData.class);
97620 }
97621
97622 return rectElem;
97623};
97624var drawText = function drawText(elem, textData) {
97625 // Remove and ignore br:s
97626 var nText = textData.text.replace(/<br\s*\/?>/gi, ' ');
97627 var textElem = elem.append('text');
97628 textElem.attr('x', textData.x);
97629 textElem.attr('y', textData.y);
97630 textElem.style('text-anchor', textData.anchor);
97631 textElem.attr('fill', textData.fill);
97632
97633 if (typeof textData.class !== 'undefined') {
97634 textElem.attr('class', textData.class);
97635 }
97636
97637 var span = textElem.append('tspan');
97638 span.attr('x', textData.x + textData.textMargin * 2);
97639 span.attr('fill', textData.fill);
97640 span.text(nText);
97641 return textElem;
97642};
97643var drawLabel = function drawLabel(elem, txtObject) {
97644 function genPoints(x, y, width, height, cut) {
97645 return x + ',' + y + ' ' + (x + width) + ',' + y + ' ' + (x + width) + ',' + (y + height - cut) + ' ' + (x + width - cut * 1.2) + ',' + (y + height) + ' ' + x + ',' + (y + height);
97646 }
97647
97648 var polygon = elem.append('polygon');
97649 polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));
97650 polygon.attr('class', 'labelBox');
97651 txtObject.y = txtObject.y + txtObject.labelMargin;
97652 txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
97653 drawText(elem, txtObject);
97654};
97655var actorCnt = -1;
97656/**
97657 * Draws an actor in the diagram with the attaced line
97658 * @param center - The center of the the actor
97659 * @param pos The position if the actor in the liost of actors
97660 * @param description The text in the box
97661 */
97662
97663var drawActor = function drawActor(elem, left, verticalPos, description, conf) {
97664 var center = left + conf.width / 2;
97665 var g = elem.append('g');
97666
97667 if (verticalPos === 0) {
97668 actorCnt++;
97669 g.append('line').attr('id', 'actor' + actorCnt).attr('x1', center).attr('y1', 5).attr('x2', center).attr('y2', 2000).attr('class', 'actor-line').attr('stroke-width', '0.5px').attr('stroke', '#999');
97670 }
97671
97672 var rect = getNoteRect();
97673 rect.x = left;
97674 rect.y = verticalPos;
97675 rect.fill = '#eaeaea';
97676 rect.width = conf.width;
97677 rect.height = conf.height;
97678 rect.class = 'actor';
97679 rect.rx = 3;
97680 rect.ry = 3;
97681 drawRect(g, rect);
97682
97683 _drawTextCandidateFunc(conf)(description, g, rect.x, rect.y, rect.width, rect.height, {
97684 class: 'actor'
97685 }, conf);
97686};
97687var anchorElement = function anchorElement(elem) {
97688 return elem.append('g');
97689};
97690/**
97691 * Draws an actor in the diagram with the attaced line
97692 * @param elem - element to append activation rect
97693 * @param bounds - activation box bounds
97694 * @param verticalPos - precise y cooridnate of bottom activation box edge
97695 */
97696
97697var drawActivation = function drawActivation(elem, bounds, verticalPos, conf, actorActivations) {
97698 var rect = getNoteRect();
97699 var g = bounds.anchored;
97700 rect.x = bounds.startx;
97701 rect.y = bounds.starty;
97702 rect.class = 'activation' + actorActivations % 3; // Will evaluate to 0, 1 or 2
97703
97704 rect.width = bounds.stopx - bounds.startx;
97705 rect.height = verticalPos - bounds.starty;
97706 drawRect(g, rect);
97707};
97708/**
97709 * Draws an actor in the diagram with the attaced line
97710 * @param center - The center of the the actor
97711 * @param pos The position if the actor in the list of actors
97712 * @param description The text in the box
97713 */
97714
97715var drawLoop = function drawLoop(elem, bounds, labelText, conf) {
97716 var g = elem.append('g');
97717
97718 var drawLoopLine = function drawLoopLine(startx, starty, stopx, stopy) {
97719 return g.append('line').attr('x1', startx).attr('y1', starty).attr('x2', stopx).attr('y2', stopy).attr('class', 'loopLine');
97720 };
97721
97722 drawLoopLine(bounds.startx, bounds.starty, bounds.stopx, bounds.starty);
97723 drawLoopLine(bounds.stopx, bounds.starty, bounds.stopx, bounds.stopy);
97724 drawLoopLine(bounds.startx, bounds.stopy, bounds.stopx, bounds.stopy);
97725 drawLoopLine(bounds.startx, bounds.starty, bounds.startx, bounds.stopy);
97726
97727 if (typeof bounds.sections !== 'undefined') {
97728 bounds.sections.forEach(function (item) {
97729 drawLoopLine(bounds.startx, item, bounds.stopx, item).style('stroke-dasharray', '3, 3');
97730 });
97731 }
97732
97733 var txt = getTextObj();
97734 txt.text = labelText;
97735 txt.x = bounds.startx;
97736 txt.y = bounds.starty;
97737 txt.labelMargin = 1.5 * 10; // This is the small box that says "loop"
97738
97739 txt.class = 'labelText'; // Its size & position are fixed.
97740
97741 drawLabel(g, txt);
97742 txt = getTextObj();
97743 txt.text = '[ ' + bounds.title + ' ]';
97744 txt.x = bounds.startx + (bounds.stopx - bounds.startx) / 2;
97745 txt.y = bounds.starty + 1.5 * conf.boxMargin;
97746 txt.anchor = 'middle';
97747 txt.class = 'loopText';
97748 drawText(g, txt);
97749
97750 if (typeof bounds.sectionTitles !== 'undefined') {
97751 bounds.sectionTitles.forEach(function (item, idx) {
97752 if (item !== '') {
97753 txt.text = '[ ' + item + ' ]';
97754 txt.y = bounds.sections[idx] + 1.5 * conf.boxMargin;
97755 drawText(g, txt);
97756 }
97757 });
97758 }
97759};
97760/**
97761 * Draws a background rectangle
97762 * @param color - The fill color for the background
97763 */
97764
97765var drawBackgroundRect = function drawBackgroundRect(elem, bounds) {
97766 var rectElem = drawRect(elem, {
97767 x: bounds.startx,
97768 y: bounds.starty,
97769 width: bounds.stopx - bounds.startx,
97770 height: bounds.stopy - bounds.starty,
97771 fill: bounds.fill,
97772 class: 'rect'
97773 });
97774 rectElem.lower();
97775};
97776/**
97777 * Setup arrow head and define the marker. The result is appended to the svg.
97778 */
97779
97780var insertArrowHead = function insertArrowHead(elem) {
97781 elem.append('defs').append('marker').attr('id', 'arrowhead').attr('refX', 5).attr('refY', 2).attr('markerWidth', 6).attr('markerHeight', 4).attr('orient', 'auto').append('path').attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead
97782};
97783/**
97784 * Setup node number. The result is appended to the svg.
97785 */
97786
97787var insertSequenceNumber = function insertSequenceNumber(elem) {
97788 elem.append('defs').append('marker').attr('id', 'sequencenumber').attr('refX', 15).attr('refY', 15).attr('markerWidth', 60).attr('markerHeight', 40).attr('orient', 'auto').append('circle').attr('cx', 15).attr('cy', 15).attr('r', 6); // .style("fill", '#f00');
97789};
97790/**
97791 * Setup arrow head and define the marker. The result is appended to the svg.
97792 */
97793
97794var insertArrowCrossHead = function insertArrowCrossHead(elem) {
97795 var defs = elem.append('defs');
97796 var marker = defs.append('marker').attr('id', 'crosshead').attr('markerWidth', 15).attr('markerHeight', 8).attr('orient', 'auto').attr('refX', 16).attr('refY', 4); // The arrow
97797
97798 marker.append('path').attr('fill', 'black').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 9,2 V 6 L16,4 Z'); // The cross
97799
97800 marker.append('path').attr('fill', 'none').attr('stroke', '#000000').style('stroke-dasharray', '0, 0').attr('stroke-width', '1px').attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7'); // this is actual shape for arrowhead
97801};
97802var getTextObj = function getTextObj() {
97803 var txt = {
97804 x: 0,
97805 y: 0,
97806 fill: undefined,
97807 'text-anchor': 'start',
97808 style: '#666',
97809 width: 100,
97810 height: 100,
97811 textMargin: 0,
97812 rx: 0,
97813 ry: 0
97814 };
97815 return txt;
97816};
97817var getNoteRect = function getNoteRect() {
97818 var rect = {
97819 x: 0,
97820 y: 0,
97821 fill: '#EDF2AE',
97822 stroke: '#666',
97823 width: 100,
97824 anchor: 'start',
97825 height: 100,
97826 rx: 0,
97827 ry: 0
97828 };
97829 return rect;
97830};
97831
97832var _drawTextCandidateFunc = function () {
97833 function byText(content, g, x, y, width, height, textAttrs) {
97834 var text = g.append('text').attr('x', x + width / 2).attr('y', y + height / 2 + 5).style('text-anchor', 'middle').text(content);
97835
97836 _setTextAttrs(text, textAttrs);
97837 }
97838
97839 function byTspan(content, g, x, y, width, height, textAttrs, conf) {
97840 var actorFontSize = conf.actorFontSize,
97841 actorFontFamily = conf.actorFontFamily;
97842 var lines = content.split(/<br\s*\/?>/gi);
97843
97844 for (var i = 0; i < lines.length; i++) {
97845 var dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
97846 var text = g.append('text').attr('x', x + width / 2).attr('y', y).style('text-anchor', 'middle').style('font-size', actorFontSize).style('font-family', actorFontFamily);
97847 text.append('tspan').attr('x', x + width / 2).attr('dy', dy).text(lines[i]);
97848 text.attr('y', y + height / 2.0).attr('dominant-baseline', 'central').attr('alignment-baseline', 'central');
97849
97850 _setTextAttrs(text, textAttrs);
97851 }
97852 }
97853
97854 function byFo(content, g, x, y, width, height, textAttrs, conf) {
97855 var s = g.append('switch');
97856 var f = s.append('foreignObject').attr('x', x).attr('y', y).attr('width', width).attr('height', height);
97857 var text = f.append('div').style('display', 'table').style('height', '100%').style('width', '100%');
97858 text.append('div').style('display', 'table-cell').style('text-align', 'center').style('vertical-align', 'middle').text(content);
97859 byTspan(content, s, x, y, width, height, textAttrs, conf);
97860
97861 _setTextAttrs(text, textAttrs);
97862 }
97863
97864 function _setTextAttrs(toText, fromTextAttrsDict) {
97865 for (var key in fromTextAttrsDict) {
97866 if (fromTextAttrsDict.hasOwnProperty(key)) {
97867 // eslint-disable-line
97868 toText.attr(key, fromTextAttrsDict[key]);
97869 }
97870 }
97871 }
97872
97873 return function (conf) {
97874 return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;
97875 };
97876}();
97877
97878/* harmony default export */ __webpack_exports__["default"] = ({
97879 drawRect: drawRect,
97880 drawText: drawText,
97881 drawLabel: drawLabel,
97882 drawActor: drawActor,
97883 anchorElement: anchorElement,
97884 drawActivation: drawActivation,
97885 drawLoop: drawLoop,
97886 drawBackgroundRect: drawBackgroundRect,
97887 insertArrowHead: insertArrowHead,
97888 insertSequenceNumber: insertSequenceNumber,
97889 insertArrowCrossHead: insertArrowCrossHead,
97890 getTextObj: getTextObj,
97891 getNoteRect: getNoteRect
97892});
97893
97894/***/ }),
97895
97896/***/ "./src/diagrams/state/id-cache.js":
97897/*!****************************************!*\
97898 !*** ./src/diagrams/state/id-cache.js ***!
97899 \****************************************/
97900/*! exports provided: set, get, keys, size, default */
97901/***/ (function(module, __webpack_exports__, __webpack_require__) {
97902
97903"use strict";
97904__webpack_require__.r(__webpack_exports__);
97905/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "set", function() { return set; });
97906/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
97907/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keys", function() { return keys; });
97908/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "size", function() { return size; });
97909var idCache = {};
97910var set = function set(key, val) {
97911 idCache[key] = val;
97912};
97913var get = function get(k) {
97914 return idCache[k];
97915};
97916var keys = function keys() {
97917 return Object.keys(idCache);
97918};
97919var size = function size() {
97920 return keys().length;
97921};
97922/* harmony default export */ __webpack_exports__["default"] = ({
97923 get: get,
97924 set: set,
97925 keys: keys,
97926 size: size
97927});
97928
97929/***/ }),
97930
97931/***/ "./src/diagrams/state/parser/stateDiagram.jison":
97932/*!******************************************************!*\
97933 !*** ./src/diagrams/state/parser/stateDiagram.jison ***!
97934 \******************************************************/
97935/*! no static exports found */
97936/***/ (function(module, exports, __webpack_require__) {
97937
97938/* WEBPACK VAR INJECTION */(function(process, module) {/* parser generated by jison 0.4.18 */
97939/*
97940 Returns a Parser object of the following structure:
97941
97942 Parser: {
97943 yy: {}
97944 }
97945
97946 Parser.prototype: {
97947 yy: {},
97948 trace: function(),
97949 symbols_: {associative list: name ==> number},
97950 terminals_: {associative list: number ==> name},
97951 productions_: [...],
97952 performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),
97953 table: [...],
97954 defaultActions: {...},
97955 parseError: function(str, hash),
97956 parse: function(input),
97957
97958 lexer: {
97959 EOF: 1,
97960 parseError: function(str, hash),
97961 setInput: function(input),
97962 input: function(),
97963 unput: function(str),
97964 more: function(),
97965 less: function(n),
97966 pastInput: function(),
97967 upcomingInput: function(),
97968 showPosition: function(),
97969 test_match: function(regex_match_array, rule_index),
97970 next: function(),
97971 lex: function(),
97972 begin: function(condition),
97973 popState: function(),
97974 _currentRules: function(),
97975 topState: function(),
97976 pushState: function(condition),
97977
97978 options: {
97979 ranges: boolean (optional: true ==> token location info will include a .range[] member)
97980 flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)
97981 backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)
97982 },
97983
97984 performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),
97985 rules: [...],
97986 conditions: {associative list: name ==> set},
97987 }
97988 }
97989
97990
97991 token location info (@$, _$, etc.): {
97992 first_line: n,
97993 last_line: n,
97994 first_column: n,
97995 last_column: n,
97996 range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)
97997 }
97998
97999
98000 the parseError function receives a 'hash' object with these members for lexer and parser errors: {
98001 text: (matched text)
98002 token: (the produced terminal token, if any)
98003 line: (yylineno)
98004 }
98005 while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {
98006 loc: (yylloc)
98007 expected: (string describing the set of expected tokens)
98008 recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)
98009 }
98010*/
98011var parser = (function(){
98012var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,13],$V7=[1,14],$V8=[1,15],$V9=[1,16],$Va=[1,21],$Vb=[1,17],$Vc=[1,18],$Vd=[1,19],$Ve=[1,20],$Vf=[1,22],$Vg=[1,4,5,13,14,16,18,19,21,22,23,24,25,28],$Vh=[1,4,5,11,12,13,14,16,18,19,21,22,23,24,25,28],$Vi=[4,5,13,14,16,18,19,21,22,23,24,25,28];
98013var parser = {trace: function trace () { },
98014yy: {},
98015symbols_: {"error":2,"start":3,"SPACE":4,"NL":5,"SD":6,"document":7,"line":8,"statement":9,"idStatement":10,"DESCR":11,"-->":12,"HIDE_EMPTY":13,"scale":14,"WIDTH":15,"COMPOSIT_STATE":16,"STRUCT_START":17,"STRUCT_STOP":18,"STATE_DESCR":19,"AS":20,"ID":21,"FORK":22,"JOIN":23,"CONCURRENT":24,"note":25,"notePosition":26,"NOTE_TEXT":27,"EDGE_STATE":28,"left_of":29,"right_of":30,"$accept":0,"$end":1},
98016terminals_: {2:"error",4:"SPACE",5:"NL",6:"SD",11:"DESCR",12:"-->",13:"HIDE_EMPTY",14:"scale",15:"WIDTH",16:"COMPOSIT_STATE",17:"STRUCT_START",18:"STRUCT_STOP",19:"STATE_DESCR",20:"AS",21:"ID",22:"FORK",23:"JOIN",24:"CONCURRENT",25:"note",27:"NOTE_TEXT",28:"EDGE_STATE",29:"left_of",30:"right_of"},
98017productions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,4],[9,4],[10,1],[10,1],[26,1],[26,1]],
98018performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
98019/* this == yyval */
98020
98021var $0 = $$.length - 1;
98022switch (yystate) {
98023case 3:
98024 /*console.warn('Root document', $$[$0]);*/ yy.setRootDoc($$[$0]);return $$[$0];
98025break;
98026case 4:
98027 this.$ = []
98028break;
98029case 5:
98030
98031 if($$[$0]!='nl'){
98032 $$[$0-1].push($$[$0]);this.$ = $$[$0-1]
98033 }
98034 // console.warn('Got document',$$[$0-1], $$[$0]);
98035
98036break;
98037case 6: case 7:
98038 this.$ = $$[$0]
98039break;
98040case 8:
98041 this.$='nl';
98042break;
98043case 9:
98044 /*console.warn('got id and descr', $$[$0]);*/this.$={ stmt: 'state', id: $$[$0], type: 'default', description: ''};
98045break;
98046case 10:
98047 /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: $$[$0].trim()};
98048break;
98049case 11:
98050
98051 /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/
98052 this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}};
98053
98054break;
98055case 12:
98056
98057 /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/
98058 this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()};
98059
98060break;
98061case 16:
98062
98063
98064 /* console.warn('Adding document for state without id ', $$[$0-3]);*/
98065 this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }
98066
98067break;
98068case 17:
98069
98070 var id=$$[$0];
98071 var description = $$[$0-2].trim();
98072 if($$[$0].match(':')){
98073 var parts = $$[$0].split(':');
98074 id=parts[0];
98075 description = [description, parts[1]];
98076 }
98077 this.$={stmt: 'state', id: id, type: 'default', description: description};
98078
98079
98080break;
98081case 18:
98082
98083 //console.warn('Adding document for state with id ', $$[$0-3], $$[$0-2]); yy.addDocument($$[$0-3]);
98084 this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }
98085
98086break;
98087case 19:
98088
98089 this.$={ stmt: 'state', id: $$[$0], type: 'fork' }
98090
98091break;
98092case 20:
98093
98094 this.$={ stmt: 'state', id: $$[$0], type: 'join' }
98095
98096break;
98097case 21:
98098
98099 this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }
98100
98101break;
98102case 22:
98103
98104 /*console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/
98105 this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};
98106
98107break;
98108case 24: case 25:
98109this.$=$$[$0];
98110break;
98111}
98112},
98113table: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,13,14,16,19,21,22,23,24,25,28],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,5]),{9:23,10:12,13:$V6,14:$V7,16:$V8,19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,7]),o($Vg,[2,8]),o($Vg,[2,9],{11:[1,24],12:[1,25]}),o($Vg,[2,13]),{15:[1,26]},o($Vg,[2,15],{17:[1,27]}),{20:[1,28]},o($Vg,[2,19]),o($Vg,[2,20]),o($Vg,[2,21]),{26:29,27:[1,30],29:[1,31],30:[1,32]},o($Vh,[2,24]),o($Vh,[2,25]),o($Vg,[2,6]),o($Vg,[2,10]),{10:33,21:$Va,28:$Vf},o($Vg,[2,14]),o($Vi,$V3,{7:34}),{21:[1,35]},{21:[1,36]},{20:[1,37]},{21:[2,26]},{21:[2,27]},o($Vg,[2,11],{11:[1,38]}),{4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,18:[1,39],19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,17],{17:[1,40]}),{27:[1,41]},{21:[1,42]},o($Vg,[2,12]),o($Vg,[2,16]),o($Vi,$V3,{7:43}),o($Vg,[2,22]),o($Vg,[2,23]),{4:$V4,5:$V5,8:8,9:10,10:12,13:$V6,14:$V7,16:$V8,18:[1,44],19:$V9,21:$Va,22:$Vb,23:$Vc,24:$Vd,25:$Ve,28:$Vf},o($Vg,[2,18])],
98114defaultActions: {5:[2,1],6:[2,2],31:[2,26],32:[2,27]},
98115parseError: function parseError (str, hash) {
98116 if (hash.recoverable) {
98117 this.trace(str);
98118 } else {
98119 var error = new Error(str);
98120 error.hash = hash;
98121 throw error;
98122 }
98123},
98124parse: function parse(input) {
98125 var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
98126 var args = lstack.slice.call(arguments, 1);
98127 var lexer = Object.create(this.lexer);
98128 var sharedState = { yy: {} };
98129 for (var k in this.yy) {
98130 if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
98131 sharedState.yy[k] = this.yy[k];
98132 }
98133 }
98134 lexer.setInput(input, sharedState.yy);
98135 sharedState.yy.lexer = lexer;
98136 sharedState.yy.parser = this;
98137 if (typeof lexer.yylloc == 'undefined') {
98138 lexer.yylloc = {};
98139 }
98140 var yyloc = lexer.yylloc;
98141 lstack.push(yyloc);
98142 var ranges = lexer.options && lexer.options.ranges;
98143 if (typeof sharedState.yy.parseError === 'function') {
98144 this.parseError = sharedState.yy.parseError;
98145 } else {
98146 this.parseError = Object.getPrototypeOf(this).parseError;
98147 }
98148 function popStack(n) {
98149 stack.length = stack.length - 2 * n;
98150 vstack.length = vstack.length - n;
98151 lstack.length = lstack.length - n;
98152 }
98153 function lex() {
98154 var token;
98155 token = tstack.pop() || lexer.lex() || EOF;
98156 if (typeof token !== 'number') {
98157 if (token instanceof Array) {
98158 tstack = token;
98159 token = tstack.pop();
98160 }
98161 token = self.symbols_[token] || token;
98162 }
98163 return token;
98164 }
98165 var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
98166 while (true) {
98167 state = stack[stack.length - 1];
98168 if (this.defaultActions[state]) {
98169 action = this.defaultActions[state];
98170 } else {
98171 if (symbol === null || typeof symbol == 'undefined') {
98172 symbol = lex();
98173 }
98174 action = table[state] && table[state][symbol];
98175 }
98176 if (typeof action === 'undefined' || !action.length || !action[0]) {
98177 var errStr = '';
98178 expected = [];
98179 for (p in table[state]) {
98180 if (this.terminals_[p] && p > TERROR) {
98181 expected.push('\'' + this.terminals_[p] + '\'');
98182 }
98183 }
98184 if (lexer.showPosition) {
98185 errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\'';
98186 } else {
98187 errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\'');
98188 }
98189 this.parseError(errStr, {
98190 text: lexer.match,
98191 token: this.terminals_[symbol] || symbol,
98192 line: lexer.yylineno,
98193 loc: yyloc,
98194 expected: expected
98195 });
98196 }
98197 if (action[0] instanceof Array && action.length > 1) {
98198 throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);
98199 }
98200 switch (action[0]) {
98201 case 1:
98202 stack.push(symbol);
98203 vstack.push(lexer.yytext);
98204 lstack.push(lexer.yylloc);
98205 stack.push(action[1]);
98206 symbol = null;
98207 if (!preErrorSymbol) {
98208 yyleng = lexer.yyleng;
98209 yytext = lexer.yytext;
98210 yylineno = lexer.yylineno;
98211 yyloc = lexer.yylloc;
98212 if (recovering > 0) {
98213 recovering--;
98214 }
98215 } else {
98216 symbol = preErrorSymbol;
98217 preErrorSymbol = null;
98218 }
98219 break;
98220 case 2:
98221 len = this.productions_[action[1]][1];
98222 yyval.$ = vstack[vstack.length - len];
98223 yyval._$ = {
98224 first_line: lstack[lstack.length - (len || 1)].first_line,
98225 last_line: lstack[lstack.length - 1].last_line,
98226 first_column: lstack[lstack.length - (len || 1)].first_column,
98227 last_column: lstack[lstack.length - 1].last_column
98228 };
98229 if (ranges) {
98230 yyval._$.range = [
98231 lstack[lstack.length - (len || 1)].range[0],
98232 lstack[lstack.length - 1].range[1]
98233 ];
98234 }
98235 r = this.performAction.apply(yyval, [
98236 yytext,
98237 yyleng,
98238 yylineno,
98239 sharedState.yy,
98240 action[1],
98241 vstack,
98242 lstack
98243 ].concat(args));
98244 if (typeof r !== 'undefined') {
98245 return r;
98246 }
98247 if (len) {
98248 stack = stack.slice(0, -1 * len * 2);
98249 vstack = vstack.slice(0, -1 * len);
98250 lstack = lstack.slice(0, -1 * len);
98251 }
98252 stack.push(this.productions_[action[1]][0]);
98253 vstack.push(yyval.$);
98254 lstack.push(yyval._$);
98255 newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
98256 stack.push(newState);
98257 break;
98258 case 3:
98259 return true;
98260 }
98261 }
98262 return true;
98263}};
98264
98265/* generated by jison-lex 0.3.4 */
98266var lexer = (function(){
98267var lexer = ({
98268
98269EOF:1,
98270
98271parseError:function parseError(str, hash) {
98272 if (this.yy.parser) {
98273 this.yy.parser.parseError(str, hash);
98274 } else {
98275 throw new Error(str);
98276 }
98277 },
98278
98279// resets the lexer, sets new input
98280setInput:function (input, yy) {
98281 this.yy = yy || this.yy || {};
98282 this._input = input;
98283 this._more = this._backtrack = this.done = false;
98284 this.yylineno = this.yyleng = 0;
98285 this.yytext = this.matched = this.match = '';
98286 this.conditionStack = ['INITIAL'];
98287 this.yylloc = {
98288 first_line: 1,
98289 first_column: 0,
98290 last_line: 1,
98291 last_column: 0
98292 };
98293 if (this.options.ranges) {
98294 this.yylloc.range = [0,0];
98295 }
98296 this.offset = 0;
98297 return this;
98298 },
98299
98300// consumes and returns one char from the input
98301input:function () {
98302 var ch = this._input[0];
98303 this.yytext += ch;
98304 this.yyleng++;
98305 this.offset++;
98306 this.match += ch;
98307 this.matched += ch;
98308 var lines = ch.match(/(?:\r\n?|\n).*/g);
98309 if (lines) {
98310 this.yylineno++;
98311 this.yylloc.last_line++;
98312 } else {
98313 this.yylloc.last_column++;
98314 }
98315 if (this.options.ranges) {
98316 this.yylloc.range[1]++;
98317 }
98318
98319 this._input = this._input.slice(1);
98320 return ch;
98321 },
98322
98323// unshifts one char (or a string) into the input
98324unput:function (ch) {
98325 var len = ch.length;
98326 var lines = ch.split(/(?:\r\n?|\n)/g);
98327
98328 this._input = ch + this._input;
98329 this.yytext = this.yytext.substr(0, this.yytext.length - len);
98330 //this.yyleng -= len;
98331 this.offset -= len;
98332 var oldLines = this.match.split(/(?:\r\n?|\n)/g);
98333 this.match = this.match.substr(0, this.match.length - 1);
98334 this.matched = this.matched.substr(0, this.matched.length - 1);
98335
98336 if (lines.length - 1) {
98337 this.yylineno -= lines.length - 1;
98338 }
98339 var r = this.yylloc.range;
98340
98341 this.yylloc = {
98342 first_line: this.yylloc.first_line,
98343 last_line: this.yylineno + 1,
98344 first_column: this.yylloc.first_column,
98345 last_column: lines ?
98346 (lines.length === oldLines.length ? this.yylloc.first_column : 0)
98347 + oldLines[oldLines.length - lines.length].length - lines[0].length :
98348 this.yylloc.first_column - len
98349 };
98350
98351 if (this.options.ranges) {
98352 this.yylloc.range = [r[0], r[0] + this.yyleng - len];
98353 }
98354 this.yyleng = this.yytext.length;
98355 return this;
98356 },
98357
98358// When called from action, caches matched text and appends it on next action
98359more:function () {
98360 this._more = true;
98361 return this;
98362 },
98363
98364// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
98365reject:function () {
98366 if (this.options.backtrack_lexer) {
98367 this._backtrack = true;
98368 } else {
98369 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), {
98370 text: "",
98371 token: null,
98372 line: this.yylineno
98373 });
98374
98375 }
98376 return this;
98377 },
98378
98379// retain first n characters of the match
98380less:function (n) {
98381 this.unput(this.match.slice(n));
98382 },
98383
98384// displays already matched input, i.e. for error messages
98385pastInput:function () {
98386 var past = this.matched.substr(0, this.matched.length - this.match.length);
98387 return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
98388 },
98389
98390// displays upcoming input, i.e. for error messages
98391upcomingInput:function () {
98392 var next = this.match;
98393 if (next.length < 20) {
98394 next += this._input.substr(0, 20-next.length);
98395 }
98396 return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\n/g, "");
98397 },
98398
98399// displays the character position where the lexing error occurred, i.e. for error messages
98400showPosition:function () {
98401 var pre = this.pastInput();
98402 var c = new Array(pre.length + 1).join("-");
98403 return pre + this.upcomingInput() + "\n" + c + "^";
98404 },
98405
98406// test the lexed token: return FALSE when not a match, otherwise return token
98407test_match:function(match, indexed_rule) {
98408 var token,
98409 lines,
98410 backup;
98411
98412 if (this.options.backtrack_lexer) {
98413 // save context
98414 backup = {
98415 yylineno: this.yylineno,
98416 yylloc: {
98417 first_line: this.yylloc.first_line,
98418 last_line: this.last_line,
98419 first_column: this.yylloc.first_column,
98420 last_column: this.yylloc.last_column
98421 },
98422 yytext: this.yytext,
98423 match: this.match,
98424 matches: this.matches,
98425 matched: this.matched,
98426 yyleng: this.yyleng,
98427 offset: this.offset,
98428 _more: this._more,
98429 _input: this._input,
98430 yy: this.yy,
98431 conditionStack: this.conditionStack.slice(0),
98432 done: this.done
98433 };
98434 if (this.options.ranges) {
98435 backup.yylloc.range = this.yylloc.range.slice(0);
98436 }
98437 }
98438
98439 lines = match[0].match(/(?:\r\n?|\n).*/g);
98440 if (lines) {
98441 this.yylineno += lines.length;
98442 }
98443 this.yylloc = {
98444 first_line: this.yylloc.last_line,
98445 last_line: this.yylineno + 1,
98446 first_column: this.yylloc.last_column,
98447 last_column: lines ?
98448 lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length :
98449 this.yylloc.last_column + match[0].length
98450 };
98451 this.yytext += match[0];
98452 this.match += match[0];
98453 this.matches = match;
98454 this.yyleng = this.yytext.length;
98455 if (this.options.ranges) {
98456 this.yylloc.range = [this.offset, this.offset += this.yyleng];
98457 }
98458 this._more = false;
98459 this._backtrack = false;
98460 this._input = this._input.slice(match[0].length);
98461 this.matched += match[0];
98462 token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
98463 if (this.done && this._input) {
98464 this.done = false;
98465 }
98466 if (token) {
98467 return token;
98468 } else if (this._backtrack) {
98469 // recover context
98470 for (var k in backup) {
98471 this[k] = backup[k];
98472 }
98473 return false; // rule action called reject() implying the next rule should be tested instead.
98474 }
98475 return false;
98476 },
98477
98478// return next match in input
98479next:function () {
98480 if (this.done) {
98481 return this.EOF;
98482 }
98483 if (!this._input) {
98484 this.done = true;
98485 }
98486
98487 var token,
98488 match,
98489 tempMatch,
98490 index;
98491 if (!this._more) {
98492 this.yytext = '';
98493 this.match = '';
98494 }
98495 var rules = this._currentRules();
98496 for (var i = 0; i < rules.length; i++) {
98497 tempMatch = this._input.match(this.rules[rules[i]]);
98498 if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
98499 match = tempMatch;
98500 index = i;
98501 if (this.options.backtrack_lexer) {
98502 token = this.test_match(tempMatch, rules[i]);
98503 if (token !== false) {
98504 return token;
98505 } else if (this._backtrack) {
98506 match = false;
98507 continue; // rule action called reject() implying a rule MISmatch.
98508 } else {
98509 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
98510 return false;
98511 }
98512 } else if (!this.options.flex) {
98513 break;
98514 }
98515 }
98516 }
98517 if (match) {
98518 token = this.test_match(match, rules[index]);
98519 if (token !== false) {
98520 return token;
98521 }
98522 // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)
98523 return false;
98524 }
98525 if (this._input === "") {
98526 return this.EOF;
98527 } else {
98528 return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), {
98529 text: "",
98530 token: null,
98531 line: this.yylineno
98532 });
98533 }
98534 },
98535
98536// return next match that has a token
98537lex:function lex () {
98538 var r = this.next();
98539 if (r) {
98540 return r;
98541 } else {
98542 return this.lex();
98543 }
98544 },
98545
98546// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
98547begin:function begin (condition) {
98548 this.conditionStack.push(condition);
98549 },
98550
98551// pop the previously active lexer condition state off the condition stack
98552popState:function popState () {
98553 var n = this.conditionStack.length - 1;
98554 if (n > 0) {
98555 return this.conditionStack.pop();
98556 } else {
98557 return this.conditionStack[0];
98558 }
98559 },
98560
98561// produce the lexer rule set which is active for the currently active lexer condition state
98562_currentRules:function _currentRules () {
98563 if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
98564 return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
98565 } else {
98566 return this.conditions["INITIAL"].rules;
98567 }
98568 },
98569
98570// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
98571topState:function topState (n) {
98572 n = this.conditionStack.length - 1 - Math.abs(n || 0);
98573 if (n >= 0) {
98574 return this.conditionStack[n];
98575 } else {
98576 return "INITIAL";
98577 }
98578 },
98579
98580// alias for begin(condition)
98581pushState:function pushState (condition) {
98582 this.begin(condition);
98583 },
98584
98585// return the number of states currently on the stack
98586stateStackSize:function stateStackSize() {
98587 return this.conditionStack.length;
98588 },
98589options: {"case-insensitive":true},
98590performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
98591var YYSTATE=YY_START;
98592switch($avoiding_name_collisions) {
98593case 0:return 5;
98594break;
98595case 1:/* skip all whitespace */
98596break;
98597case 2:/* skip same-line whitespace */
98598break;
98599case 3:/* skip comments */
98600break;
98601case 4:/* skip comments */
98602break;
98603case 5: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 14;
98604break;
98605case 6:return 15;
98606break;
98607case 7:this.popState();
98608break;
98609case 8: this.pushState('STATE');
98610break;
98611case 9:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 22;
98612break;
98613case 10:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 23;
98614break;
98615case 11:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 22;
98616break;
98617case 12:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 23;
98618break;
98619case 13:this.begin("STATE_STRING");
98620break;
98621case 14:this.popState();this.pushState('STATE_ID');return "AS";
98622break;
98623case 15:this.popState();/* console.log('STATE_ID', yy_.yytext);*/return "ID";
98624break;
98625case 16:this.popState();
98626break;
98627case 17: /*console.log('Long description:', yy_.yytext);*/return "STATE_DESCR";
98628break;
98629case 18:/*console.log('COMPOSIT_STATE', yy_.yytext);*/return 16;
98630break;
98631case 19:this.popState();
98632break;
98633case 20:this.popState();this.pushState('struct'); /*console.log('begin struct', yy_.yytext);*/return 17;
98634break;
98635case 21: /*console.log('Ending struct');*/ this.popState(); return 18;
98636break;
98637case 22:/* nothing */
98638break;
98639case 23: this.begin('NOTE'); return 25;
98640break;
98641case 24: this.popState();this.pushState('NOTE_ID');return 29;
98642break;
98643case 25: this.popState();this.pushState('NOTE_ID');return 30;
98644break;
98645case 26: this.popState();this.pushState('FLOATING_NOTE');
98646break;
98647case 27:this.popState();this.pushState('FLOATING_NOTE_ID');return "AS";
98648break;
98649case 28:/**/
98650break;
98651case 29: /*console.log('Floating note text: ', yy_.yytext);*/return "NOTE_TEXT";
98652break;
98653case 30:this.popState();/*console.log('Floating note ID', yy_.yytext);*/return "ID";
98654break;
98655case 31: this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yy_.yytext);*/return 21;
98656break;
98657case 32: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim();return 27;
98658break;
98659case 33: this.popState();/*console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim();return 27;
98660break;
98661case 34: /*console.log('Got state diagram', yy_.yytext,'#');*/return 6;
98662break;
98663case 35: /*console.log('HIDE_EMPTY', yy_.yytext,'#');*/return 13;
98664break;
98665case 36: /*console.log('EDGE_STATE=',yy_.yytext);*/ return 28;
98666break;
98667case 37: /*console.log('=>ID=',yy_.yytext);*/ return 21;
98668break;
98669case 38: yy_.yytext = yy_.yytext.trim(); /*console.log('Descr = ', yy_.yytext);*/ return 11;
98670break;
98671case 39:return 12;
98672break;
98673case 40:return 24;
98674break;
98675case 41:return 5;
98676break;
98677case 42:return 'INVALID';
98678break;
98679}
98680},
98681rules: [/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:as\s*)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],
98682conditions: {"LINE":{"rules":[2,3],"inclusive":false},"struct":{"rules":[2,3,8,21,22,23,36,37,38,39,40],"inclusive":false},"FLOATING_NOTE_ID":{"rules":[30],"inclusive":false},"FLOATING_NOTE":{"rules":[27,28,29],"inclusive":false},"NOTE_TEXT":{"rules":[32,33],"inclusive":false},"NOTE_ID":{"rules":[31],"inclusive":false},"NOTE":{"rules":[24,25,26],"inclusive":false},"SCALE":{"rules":[6,7],"inclusive":false},"ALIAS":{"rules":[],"inclusive":false},"STATE_ID":{"rules":[15],"inclusive":false},"STATE_STRING":{"rules":[16,17],"inclusive":false},"FORK_STATE":{"rules":[],"inclusive":false},"STATE":{"rules":[2,3,9,10,11,12,13,14,18,19,20],"inclusive":false},"ID":{"rules":[2,3],"inclusive":false},"INITIAL":{"rules":[0,1,3,4,5,8,20,23,34,35,36,37,38,39,41,42],"inclusive":true}}
98683});
98684return lexer;
98685})();
98686parser.lexer = lexer;
98687function Parser () {
98688 this.yy = {};
98689}
98690Parser.prototype = parser;parser.Parser = Parser;
98691return new Parser;
98692})();
98693
98694
98695if (true) {
98696exports.parser = parser;
98697exports.Parser = parser.Parser;
98698exports.parse = function () { return parser.parse.apply(parser, arguments); };
98699exports.main = function commonjsMain (args) {
98700 if (!args[1]) {
98701 console.log('Usage: '+args[0]+' FILE');
98702 process.exit(1);
98703 }
98704 var source = __webpack_require__(/*! fs */ "./node_modules/node-libs-browser/mock/empty.js").readFileSync(__webpack_require__(/*! path */ "./node_modules/path-browserify/index.js").normalize(args[1]), "utf8");
98705 return exports.parser.parse(source);
98706};
98707if ( true && __webpack_require__.c[__webpack_require__.s] === module) {
98708 exports.main(process.argv.slice(1));
98709}
98710}
98711/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../../../node_modules/webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
98712
98713/***/ }),
98714
98715/***/ "./src/diagrams/state/shapes.js":
98716/*!**************************************!*\
98717 !*** ./src/diagrams/state/shapes.js ***!
98718 \**************************************/
98719/*! exports provided: drawStartState, drawDivider, drawSimpleState, drawDescrState, addTitleAndBox, drawText, drawNote, drawState, drawEdge */
98720/***/ (function(module, __webpack_exports__, __webpack_require__) {
98721
98722"use strict";
98723__webpack_require__.r(__webpack_exports__);
98724/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawStartState", function() { return drawStartState; });
98725/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDivider", function() { return drawDivider; });
98726/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawSimpleState", function() { return drawSimpleState; });
98727/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawDescrState", function() { return drawDescrState; });
98728/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addTitleAndBox", function() { return addTitleAndBox; });
98729/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawText", function() { return drawText; });
98730/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawNote", function() { return drawNote; });
98731/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawState", function() { return drawState; });
98732/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "drawEdge", function() { return drawEdge; });
98733/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
98734/* harmony import */ var _id_cache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./id-cache.js */ "./src/diagrams/state/id-cache.js");
98735/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js");
98736/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils */ "./src/utils.js");
98737/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config */ "./src/config.js");
98738
98739
98740
98741
98742 // let conf;
98743
98744/**
98745 * Draws a start state as a black circle
98746 */
98747
98748var drawStartState = function drawStartState(g) {
98749 return g.append('circle').style('stroke', 'black').style('fill', 'black').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit);
98750};
98751/**
98752 * Draws a start state as a black circle
98753 */
98754
98755var drawDivider = function drawDivider(g) {
98756 return g.append('line').style('stroke', 'grey').style('stroke-dasharray', '3').attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight).attr('class', 'divider').attr('x2', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight * 2).attr('y1', 0).attr('y2', 0);
98757};
98758/**
98759 * Draws a an end state as a black circle
98760 */
98761
98762var drawSimpleState = function drawSimpleState(g, stateDef) {
98763 var state = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);
98764 var classBox = state.node().getBBox();
98765 g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('width', classBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('height', classBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.radius);
98766 return state;
98767};
98768/**
98769 * Draws a state with descriptions
98770 * @param {*} g
98771 * @param {*} stateDef
98772 */
98773
98774var drawDescrState = function drawDescrState(g, stateDef) {
98775 var addTspan = function addTspan(textEl, txt, isFirst) {
98776 var tSpan = textEl.append('tspan').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).text(txt);
98777
98778 if (!isFirst) {
98779 tSpan.attr('dy', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight);
98780 }
98781 };
98782
98783 var title = g.append('text').attr('x', 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight + 1.3 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.descriptions[0]);
98784 var titleBox = title.node().getBBox();
98785 var titleHeight = titleBox.height;
98786 var description = g.append('text') // text label for the x axis
98787 .attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding * 0.4 + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.dividerMargin + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight).attr('class', 'state-description');
98788 var isFirst = true;
98789 var isSecond = true;
98790 stateDef.descriptions.forEach(function (descr) {
98791 if (!isFirst) {
98792 addTspan(description, descr, isSecond);
98793 isSecond = false;
98794 }
98795
98796 isFirst = false;
98797 });
98798 var descrLine = g.append('line') // text label for the x axis
98799 .attr('x1', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y1', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.dividerMargin / 2).attr('y2', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + titleHeight + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.dividerMargin / 2).attr('class', 'descr-divider');
98800 var descrBox = description.node().getBBox();
98801 var width = Math.max(descrBox.width, titleBox.width);
98802 descrLine.attr('x2', width + 3 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding); // const classBox = title.node().getBBox();
98803
98804 g.insert('rect', ':first-child').attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('width', width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('height', descrBox.height + titleHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.radius);
98805 return g;
98806};
98807/**
98808 * Adds the creates a box around the existing content and adds a
98809 * panel for the id on top of the content.
98810 */
98811
98812/**
98813 * Function that creates an title row and a frame around a substate for a composit state diagram.
98814 * The function returns a new d3 svg object with updated width and height properties;
98815 * @param {*} g The d3 svg object for the substate to framed
98816 * @param {*} stateDef The info about the
98817 */
98818
98819var addTitleAndBox = function addTitleAndBox(g, stateDef, altBkg) {
98820 var pad = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding;
98821 var dblPad = 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding;
98822 var orgBox = g.node().getBBox();
98823 var orgWidth = orgBox.width;
98824 var orgX = orgBox.x;
98825 var title = g.append('text').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.titleShift).attr('font-size', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.fontSize).attr('class', 'state-title').text(stateDef.id);
98826 var titleBox = title.node().getBBox();
98827 var titleWidth = titleBox.width + dblPad;
98828 var width = Math.max(titleWidth, orgWidth); // + dblPad;
98829
98830 if (width === orgWidth) {
98831 width = width + dblPad;
98832 }
98833
98834 var startX; // const lineY = 1 - getConfig().state.textHeight;
98835 // const descrLine = g
98836 // .append('line') // text label for the x axis
98837 // .attr('x1', 0)
98838 // .attr('y1', lineY)
98839 // .attr('y2', lineY)
98840 // .attr('class', 'descr-divider');
98841
98842 var graphBox = g.node().getBBox(); // console.warn(width / 2, titleWidth / 2, getConfig().state.padding, orgBox);
98843 // descrLine.attr('x2', graphBox.width + getConfig().state.padding);
98844
98845 if (stateDef.doc) {// cnsole.warn(
98846 // stateDef.id,
98847 // 'orgX: ',
98848 // orgX,
98849 // 'width: ',
98850 // width,
98851 // 'titleWidth: ',
98852 // titleWidth,
98853 // 'orgWidth: ',
98854 // orgWidth,
98855 // 'width',
98856 // width
98857 // );
98858 }
98859
98860 startX = orgX - pad;
98861
98862 if (titleWidth > orgWidth) {
98863 startX = (orgWidth - width) / 2 + pad;
98864 }
98865
98866 if (Math.abs(orgX - graphBox.x) < pad) {
98867 if (titleWidth > orgWidth) {
98868 startX = orgX - (titleWidth - orgWidth) / 2;
98869 }
98870 }
98871
98872 var lineY = 1 - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight; // White color
98873
98874 g.insert('rect', ':first-child').attr('x', startX).attr('y', lineY).attr('class', altBkg ? 'alt-composit' : 'composit').attr('width', width).attr('height', graphBox.height + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.titleShift + 1).attr('rx', '0');
98875 title.attr('x', startX + pad);
98876 if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); // Title background
98877
98878 g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('width', width) // Just needs to be higher then the descr line, will be clipped by the white color box
98879 .attr('height', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight * 3).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.radius); // Full background
98880
98881 g.insert('rect', ':first-child').attr('x', startX).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.titleShift - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('width', width).attr('height', graphBox.height + 3 + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.textHeight).attr('rx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.radius);
98882 return g;
98883};
98884
98885var drawEndState = function drawEndState(g) {
98886 g.append('circle').style('stroke', 'black').style('fill', 'white').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.miniPadding).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.miniPadding).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.miniPadding);
98887 return g.append('circle').style('stroke', 'black').style('fill', 'black').attr('r', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit).attr('cx', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit + 2).attr('cy', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.sizeUnit + 2);
98888};
98889
98890var drawForkJoinState = function drawForkJoinState(g, stateDef) {
98891 var width = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.forkWidth;
98892 var height = Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.forkHeight;
98893
98894 if (stateDef.parentId) {
98895 var tmp = width;
98896 width = height;
98897 height = tmp;
98898 }
98899
98900 return g.append('rect').style('stroke', 'black').style('fill', 'black').attr('width', width).attr('height', height).attr('x', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding);
98901};
98902
98903var drawText = function drawText(elem, textData) {
98904 // Remove and ignore br:s
98905 var nText = textData.text.replace(/<br\/?>/gi, ' ');
98906 var textElem = elem.append('text');
98907 textElem.attr('x', textData.x);
98908 textElem.attr('y', textData.y);
98909 textElem.style('text-anchor', textData.anchor);
98910 textElem.attr('fill', textData.fill);
98911
98912 if (typeof textData.class !== 'undefined') {
98913 textElem.attr('class', textData.class);
98914 }
98915
98916 var span = textElem.append('tspan');
98917 span.attr('x', textData.x + textData.textMargin * 2);
98918 span.attr('fill', textData.fill);
98919 span.text(nText);
98920 return textElem;
98921};
98922
98923var _drawLongText = function _drawLongText(_text, x, y, g) {
98924 var textHeight = 0;
98925 var textElem = g.append('text');
98926 textElem.style('text-anchor', 'start');
98927 textElem.attr('class', 'noteText');
98928
98929 var text = _text.replace(/\r\n/g, '<br/>');
98930
98931 text = text.replace(/\n/g, '<br/>');
98932 var lines = text.split(/<br\/?>/gi);
98933 var tHeight = 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin;
98934 var _iteratorNormalCompletion = true;
98935 var _didIteratorError = false;
98936 var _iteratorError = undefined;
98937
98938 try {
98939 for (var _iterator = lines[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
98940 var line = _step.value;
98941 var txt = line.trim();
98942
98943 if (txt.length > 0) {
98944 var span = textElem.append('tspan');
98945 span.text(txt);
98946
98947 if (tHeight === 0) {
98948 var textBounds = span.node().getBBox();
98949 tHeight += textBounds.height;
98950 } // console.warn('textBounds', textBounds);
98951
98952
98953 textHeight += tHeight;
98954 span.attr('x', x + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin);
98955 span.attr('y', y + textHeight + 1.25 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin);
98956 }
98957 }
98958 } catch (err) {
98959 _didIteratorError = true;
98960 _iteratorError = err;
98961 } finally {
98962 try {
98963 if (!_iteratorNormalCompletion && _iterator.return != null) {
98964 _iterator.return();
98965 }
98966 } finally {
98967 if (_didIteratorError) {
98968 throw _iteratorError;
98969 }
98970 }
98971 }
98972
98973 return {
98974 textWidth: textElem.node().getBBox().width,
98975 textHeight: textHeight
98976 };
98977};
98978/**
98979 * Draws an actor in the diagram with the attaced line
98980 * @param center - The center of the the actor
98981 * @param pos The position if the actor in the liost of actors
98982 * @param description The text in the box
98983 */
98984
98985
98986var drawNote = function drawNote(text, g) {
98987 g.attr('class', 'state-note');
98988 var note = g.append('rect').attr('x', 0).attr('y', Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding);
98989 var rectElem = g.append('g');
98990
98991 var _drawLongText2 = _drawLongText(text, 0, 0, rectElem),
98992 textWidth = _drawLongText2.textWidth,
98993 textHeight = _drawLongText2.textHeight;
98994
98995 note.attr('height', textHeight + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin);
98996 note.attr('width', textWidth + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.noteMargin * 2);
98997 return note;
98998};
98999/**
99000 * Starting point for drawing a state. The function finds out the specifics
99001 * about the state and renders with approprtiate function.
99002 * @param {*} elem
99003 * @param {*} stateDef
99004 */
99005
99006var drawState = function drawState(elem, stateDef) {
99007 var id = stateDef.id;
99008 var stateInfo = {
99009 id: id,
99010 label: stateDef.id,
99011 width: 0,
99012 height: 0
99013 };
99014 var g = elem.append('g').attr('id', id).attr('class', 'stateGroup');
99015 if (stateDef.type === 'start') drawStartState(g);
99016 if (stateDef.type === 'end') drawEndState(g);
99017 if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef);
99018 if (stateDef.type === 'note') drawNote(stateDef.note.text, g);
99019 if (stateDef.type === 'divider') drawDivider(g);
99020 if (stateDef.type === 'default' && stateDef.descriptions.length === 0) drawSimpleState(g, stateDef);
99021 if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef);
99022 var stateBox = g.node().getBBox();
99023 stateInfo.width = stateBox.width + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding;
99024 stateInfo.height = stateBox.height + 2 * Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding;
99025 _id_cache_js__WEBPACK_IMPORTED_MODULE_1__["default"].set(id, stateInfo); // stateCnt++;
99026
99027 return stateInfo;
99028};
99029
99030var getRows = function getRows(s) {
99031 var str = s.replace(/<br\/?>/gi, '#br#');
99032 str = str.replace(/\\n/g, '#br#');
99033 return str.split('#br#');
99034};
99035
99036var edgeCount = 0;
99037var drawEdge = function drawEdge(elem, path, relation) {
99038 var getRelationType = function getRelationType(type) {
99039 switch (type) {
99040 case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.AGGREGATION:
99041 return 'aggregation';
99042
99043 case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.EXTENSION:
99044 return 'extension';
99045
99046 case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.COMPOSITION:
99047 return 'composition';
99048
99049 case _stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY:
99050 return 'dependency';
99051 }
99052 };
99053
99054 path.points = path.points.filter(function (p) {
99055 return !Number.isNaN(p.y);
99056 }); // The data for our line
99057
99058 var lineData = path.points; // This is the accessor function we talked about above
99059
99060 var lineFunction = d3__WEBPACK_IMPORTED_MODULE_0__["line"]().x(function (d) {
99061 return d.x;
99062 }).y(function (d) {
99063 return d.y;
99064 }).curve(d3__WEBPACK_IMPORTED_MODULE_0__["curveBasis"]);
99065 var svgPath = elem.append('path').attr('d', lineFunction(lineData)).attr('id', 'edge' + edgeCount).attr('class', 'transition');
99066 var url = '';
99067
99068 if (Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.arrowMarkerAbsolute) {
99069 url = window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search;
99070 url = url.replace(/\(/g, '\\(');
99071 url = url.replace(/\)/g, '\\)');
99072 }
99073
99074 svgPath.attr('marker-end', 'url(' + url + '#' + getRelationType(_stateDb__WEBPACK_IMPORTED_MODULE_2__["default"].relationType.DEPENDENCY) + 'End' + ')');
99075
99076 if (typeof relation.title !== 'undefined') {
99077 var label = elem.append('g').attr('class', 'stateLabel');
99078
99079 var _utils$calcLabelPosit = _utils__WEBPACK_IMPORTED_MODULE_3__["default"].calcLabelPosition(path.points),
99080 x = _utils$calcLabelPosit.x,
99081 y = _utils$calcLabelPosit.y;
99082
99083 var rows = getRows(relation.title); // console.warn(rows);
99084
99085 var titleHeight = 0;
99086 var titleRows = [];
99087
99088 for (var i = 0; i <= rows.length; i++) {
99089 var title = label.append('text').attr('text-anchor', 'middle').text(rows[i]).attr('x', x).attr('y', y + titleHeight);
99090
99091 if (titleHeight === 0) {
99092 var titleBox = title.node().getBBox();
99093 titleHeight = titleBox.height;
99094 }
99095
99096 titleRows.push(title);
99097 }
99098
99099 if (rows.length > 1) {
99100 var heightAdj = rows.length * titleHeight * 0.25;
99101 titleRows.forEach(function (title, i) {
99102 return title.attr('y', y + i * titleHeight - heightAdj);
99103 });
99104 }
99105
99106 var bounds = label.node().getBBox();
99107 label.insert('rect', ':first-child').attr('class', 'box').attr('x', bounds.x - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding / 2).attr('y', bounds.y - Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding / 2).attr('width', bounds.width + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding).attr('height', bounds.height + Object(_config__WEBPACK_IMPORTED_MODULE_4__["getConfig"])().state.padding); //label.attr('transform', '0 -' + (bounds.y / 2));
99108 // Debug points
99109 // path.points.forEach(point => {
99110 // g.append('circle')
99111 // .style('stroke', 'red')
99112 // .style('fill', 'red')
99113 // .attr('r', 1)
99114 // .attr('cx', point.x)
99115 // .attr('cy', point.y);
99116 // });
99117 // g.append('circle')
99118 // .style('stroke', 'blue')
99119 // .style('fill', 'blue')
99120 // .attr('r', 1)
99121 // .attr('cx', x)
99122 // .attr('cy', y);
99123 }
99124
99125 edgeCount++;
99126};
99127
99128/***/ }),
99129
99130/***/ "./src/diagrams/state/stateDb.js":
99131/*!***************************************!*\
99132 !*** ./src/diagrams/state/stateDb.js ***!
99133 \***************************************/
99134/*! exports provided: addState, clear, getState, getStates, logDocuments, getRelations, addRelation, cleanupLabel, lineType, relationType, default */
99135/***/ (function(module, __webpack_exports__, __webpack_require__) {
99136
99137"use strict";
99138__webpack_require__.r(__webpack_exports__);
99139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addState", function() { return addState; });
99140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clear", function() { return clear; });
99141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getState", function() { return getState; });
99142/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStates", function() { return getStates; });
99143/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logDocuments", function() { return logDocuments; });
99144/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRelations", function() { return getRelations; });
99145/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addRelation", function() { return addRelation; });
99146/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cleanupLabel", function() { return cleanupLabel; });
99147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineType", function() { return lineType; });
99148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "relationType", function() { return relationType; });
99149/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
99150function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
99151
99152
99153var rootDoc = [];
99154
99155var setRootDoc = function setRootDoc(o) {
99156 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].info('Setting root doc', o);
99157 rootDoc = o;
99158};
99159
99160var getRootDoc = function getRootDoc() {
99161 return rootDoc;
99162};
99163
99164var extract = function extract(doc) {
99165 // const res = { states: [], relations: [] };
99166 clear();
99167 doc.forEach(function (item) {
99168 if (item.stmt === 'state') {
99169 addState(item.id, item.type, item.doc, item.description, item.note);
99170 }
99171
99172 if (item.stmt === 'relation') {
99173 addRelation(item.state1.id, item.state2.id, item.description);
99174 }
99175 });
99176};
99177
99178var newDoc = function newDoc() {
99179 return {
99180 relations: [],
99181 states: {},
99182 documents: {}
99183 };
99184};
99185
99186var documents = {
99187 root: newDoc()
99188};
99189var currentDocument = documents.root;
99190var startCnt = 0;
99191var endCnt = 0; // eslint-disable-line
99192// let stateCnt = 0;
99193
99194/**
99195 * Function called by parser when a node definition has been found.
99196 * @param id
99197 * @param text
99198 * @param type
99199 * @param style
99200 */
99201
99202var addState = function addState(id, type, doc, descr, note) {
99203 if (typeof currentDocument.states[id] === 'undefined') {
99204 currentDocument.states[id] = {
99205 id: id,
99206 descriptions: [],
99207 type: type,
99208 doc: doc,
99209 note: note
99210 };
99211 } else {
99212 if (!currentDocument.states[id].doc) {
99213 currentDocument.states[id].doc = doc;
99214 }
99215
99216 if (!currentDocument.states[id].type) {
99217 currentDocument.states[id].type = type;
99218 }
99219 }
99220
99221 if (descr) {
99222 if (typeof descr === 'string') addDescription(id, descr.trim());
99223
99224 if (_typeof(descr) === 'object') {
99225 descr.forEach(function (des) {
99226 return addDescription(id, des.trim());
99227 });
99228 }
99229 }
99230
99231 if (note) currentDocument.states[id].note = note;
99232};
99233var clear = function clear() {
99234 documents = {
99235 root: newDoc()
99236 };
99237 currentDocument = documents.root;
99238};
99239var getState = function getState(id) {
99240 return currentDocument.states[id];
99241};
99242var getStates = function getStates() {
99243 return currentDocument.states;
99244};
99245var logDocuments = function logDocuments() {
99246 _logger__WEBPACK_IMPORTED_MODULE_0__["logger"].info('Documents = ', documents);
99247};
99248var getRelations = function getRelations() {
99249 return currentDocument.relations;
99250};
99251var addRelation = function addRelation(_id1, _id2, title) {
99252 var id1 = _id1;
99253 var id2 = _id2;
99254 var type1 = 'default';
99255 var type2 = 'default';
99256
99257 if (_id1 === '[*]') {
99258 startCnt++;
99259 id1 = 'start' + startCnt;
99260 type1 = 'start';
99261 }
99262
99263 if (_id2 === '[*]') {
99264 endCnt++;
99265 id2 = 'end' + startCnt;
99266 type2 = 'end';
99267 }
99268
99269 addState(id1, type1);
99270 addState(id2, type2);
99271 currentDocument.relations.push({
99272 id1: id1,
99273 id2: id2,
99274 title: title
99275 });
99276};
99277
99278var addDescription = function addDescription(id, _descr) {
99279 var theState = currentDocument.states[id];
99280 var descr = _descr;
99281
99282 if (descr[0] === ':') {
99283 descr = descr.substr(1).trim();
99284 }
99285
99286 theState.descriptions.push(descr);
99287};
99288
99289var cleanupLabel = function cleanupLabel(label) {
99290 if (label.substring(0, 1) === ':') {
99291 return label.substr(2).trim();
99292 } else {
99293 return label.trim();
99294 }
99295};
99296var lineType = {
99297 LINE: 0,
99298 DOTTED_LINE: 1
99299};
99300var dividerCnt = 0;
99301
99302var getDividerId = function getDividerId() {
99303 dividerCnt++;
99304 return 'divider-id-' + dividerCnt;
99305};
99306
99307var relationType = {
99308 AGGREGATION: 0,
99309 EXTENSION: 1,
99310 COMPOSITION: 2,
99311 DEPENDENCY: 3
99312};
99313/* harmony default export */ __webpack_exports__["default"] = ({
99314 addState: addState,
99315 clear: clear,
99316 getState: getState,
99317 getStates: getStates,
99318 getRelations: getRelations,
99319 addRelation: addRelation,
99320 getDividerId: getDividerId,
99321 // addDescription,
99322 cleanupLabel: cleanupLabel,
99323 lineType: lineType,
99324 relationType: relationType,
99325 logDocuments: logDocuments,
99326 getRootDoc: getRootDoc,
99327 setRootDoc: setRootDoc,
99328 extract: extract
99329});
99330
99331/***/ }),
99332
99333/***/ "./src/diagrams/state/stateRenderer.js":
99334/*!*********************************************!*\
99335 !*** ./src/diagrams/state/stateRenderer.js ***!
99336 \*********************************************/
99337/*! exports provided: setConf, draw, default */
99338/***/ (function(module, __webpack_exports__, __webpack_require__) {
99339
99340"use strict";
99341__webpack_require__.r(__webpack_exports__);
99342/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConf", function() { return setConf; });
99343/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "draw", function() { return draw; });
99344/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
99345/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! dagre */ "./node_modules/dagre/index.js");
99346/* harmony import */ var dagre__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dagre__WEBPACK_IMPORTED_MODULE_1__);
99347/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js");
99348/* harmony import */ var graphlib__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(graphlib__WEBPACK_IMPORTED_MODULE_2__);
99349/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../logger */ "./src/logger.js");
99350/* harmony import */ var _stateDb__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateDb */ "./src/diagrams/state/stateDb.js");
99351/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison");
99352/* harmony import */ var _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5__);
99353/* harmony import */ var _shapes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./shapes */ "./src/diagrams/state/shapes.js");
99354/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../config */ "./src/config.js");
99355
99356
99357
99358
99359
99360 // import idCache from './id-cache';
99361
99362
99363
99364_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"]; // TODO Move conf object to main conf in mermaidAPI
99365
99366var conf;
99367var transformationLog = {};
99368var setConf = function setConf() {}; // Todo optimize
99369
99370/**
99371 * Setup arrow head and define the marker. The result is appended to the svg.
99372 */
99373
99374var insertMarkers = function insertMarkers(elem) {
99375 elem.append('defs').append('marker').attr('id', 'dependencyEnd').attr('refX', 19).attr('refY', 7).attr('markerWidth', 20).attr('markerHeight', 28).attr('orient', 'auto').append('path').attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');
99376};
99377/**
99378 * Draws a flowchart in the tag with id: id based on the graph definition in text.
99379 * @param text
99380 * @param id
99381 */
99382
99383
99384var draw = function draw(text, id) {
99385 conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().state;
99386 _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].yy.clear();
99387 _parser_stateDiagram__WEBPACK_IMPORTED_MODULE_5__["parser"].parse(text);
99388 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Rendering diagram ' + text); // Fetch the default direction, use TD if none was found
99389
99390 var diagram = d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id='".concat(id, "']"));
99391 insertMarkers(diagram); // Layout graph, Create a new directed graph
99392
99393 var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
99394 multigraph: false,
99395 compound: true,
99396 // acyclicer: 'greedy',
99397 rankdir: 'RL' // ranksep: '20'
99398
99399 }); // Default to assigning a new object as a label for each new edge.
99400
99401 graph.setDefaultEdgeLabel(function () {
99402 return {};
99403 });
99404 var rootDoc = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRootDoc();
99405 renderDoc(rootDoc, diagram, undefined, false);
99406 var padding = conf.padding;
99407 var bounds = diagram.node().getBBox();
99408 var width = bounds.width + padding * 2;
99409 var height = bounds.height + padding * 2; // diagram.attr('height', '100%');
99410 // diagram.attr('style', `width: ${bounds.width * 3 + conf.padding * 2};`);
99411 // diagram.attr('height', height);
99412 // Zoom in a bit
99413
99414 diagram.attr('width', width * 1.75); // diagram.attr('height', bounds.height * 3 + conf.padding * 2);
99415
99416 diagram.attr('viewBox', "".concat(bounds.x - conf.padding, " ").concat(bounds.y - conf.padding, " ") + width + ' ' + height); // diagram.attr('transform', `translate(, 0)`);
99417 // diagram.attr(
99418 // 'viewBox',
99419 // `${conf.padding * -1} ${conf.padding * -1} ` +
99420 // (bounds.width * 1.5 + conf.padding * 2) +
99421 // ' ' +
99422 // (bounds.height + conf.padding * 5)
99423 // );
99424};
99425
99426var getLabelWidth = function getLabelWidth(text) {
99427 return text ? text.length * conf.fontSizeFactor : 1;
99428};
99429/* TODO: REMOVE DUPLICATION, SEE SHAPES */
99430
99431
99432var getRows = function getRows(s) {
99433 if (!s) return 1;
99434 var str = s.replace(/<br\/?>/gi, '#br#');
99435 str = str.replace(/\\n/g, '#br#');
99436 return str.split('#br#');
99437};
99438
99439var renderDoc = function renderDoc(doc, diagram, parentId, altBkg) {
99440 // // Layout graph, Create a new directed graph
99441 var graph = new graphlib__WEBPACK_IMPORTED_MODULE_2___default.a.Graph({
99442 compound: true
99443 });
99444 var i;
99445 var edgeFreeDoc = true;
99446
99447 for (i = 0; i < doc.length; i++) {
99448 if (doc[i].stmt === 'relation') {
99449 edgeFreeDoc = false;
99450 break;
99451 }
99452 } // Set an object for the graph label
99453
99454
99455 if (parentId) graph.setGraph({
99456 rankdir: 'LR',
99457 // multigraph: false,
99458 compound: true,
99459 // acyclicer: 'greedy',
99460 ranker: 'tight-tree',
99461 ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
99462 nodeSep: edgeFreeDoc ? 1 : 50 // isMultiGraph: false
99463 // ranksep: 5,
99464 // nodesep: 1
99465
99466 });else {
99467 graph.setGraph({
99468 rankdir: 'TB',
99469 compound: true,
99470 // isCompound: true,
99471 // acyclicer: 'greedy',
99472 // ranker: 'longest-path'
99473 ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,
99474 nodeSep: edgeFreeDoc ? 1 : 50,
99475 ranker: 'tight-tree' // ranker: 'network-simplex'
99476 // isMultiGraph: false
99477
99478 });
99479 } // Default to assigning a new object as a label for each new edge.
99480
99481 graph.setDefaultEdgeLabel(function () {
99482 return {};
99483 });
99484 _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].extract(doc);
99485 var states = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getStates();
99486 var relations = _stateDb__WEBPACK_IMPORTED_MODULE_4__["default"].getRelations();
99487 var keys = Object.keys(states);
99488 var first = true;
99489
99490 for (var _i = 0; _i < keys.length; _i++) {
99491 var stateDef = states[keys[_i]];
99492
99493 if (parentId) {
99494 stateDef.parentId = parentId;
99495 }
99496
99497 var node = void 0;
99498
99499 if (stateDef.doc) {
99500 var sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');
99501 node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg);
99502
99503 if (first) {
99504 // first = false;
99505 sub = Object(_shapes__WEBPACK_IMPORTED_MODULE_6__["addTitleAndBox"])(sub, stateDef, altBkg);
99506 var boxBounds = sub.node().getBBox();
99507 node.width = boxBounds.width;
99508 node.height = boxBounds.height + conf.padding / 2;
99509 transformationLog[stateDef.id] = {
99510 y: conf.compositTitleSize
99511 };
99512 } else {
99513 // sub = addIdAndBox(sub, stateDef);
99514 var _boxBounds = sub.node().getBBox();
99515
99516 node.width = _boxBounds.width;
99517 node.height = _boxBounds.height; // transformationLog[stateDef.id] = { y: conf.compositTitleSize };
99518 }
99519 } else {
99520 node = Object(_shapes__WEBPACK_IMPORTED_MODULE_6__["drawState"])(diagram, stateDef, graph);
99521 }
99522
99523 if (stateDef.note) {
99524 // Draw note note
99525 var noteDef = {
99526 descriptions: [],
99527 id: stateDef.id + '-note',
99528 note: stateDef.note,
99529 type: 'note'
99530 };
99531 var note = Object(_shapes__WEBPACK_IMPORTED_MODULE_6__["drawState"])(diagram, noteDef, graph); // graph.setNode(node.id, node);
99532
99533 if (stateDef.note.position === 'left of') {
99534 graph.setNode(node.id + '-note', note);
99535 graph.setNode(node.id, node);
99536 } else {
99537 graph.setNode(node.id, node);
99538 graph.setNode(node.id + '-note', note);
99539 } // graph.setNode(node.id);
99540
99541
99542 graph.setParent(node.id, node.id + '-group');
99543 graph.setParent(node.id + '-note', node.id + '-group');
99544 } else {
99545 // Add nodes to the graph. The first argument is the node id. The second is
99546 // metadata about the node. In this case we're going to add labels to each of
99547 // our nodes.
99548 graph.setNode(node.id, node);
99549 }
99550 }
99551
99552 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Count=', graph.nodeCount());
99553 relations.forEach(function (relation) {
99554 graph.setEdge(relation.id1, relation.id2, {
99555 relation: relation,
99556 width: getLabelWidth(relation.title),
99557 height: conf.labelHeight * getRows(relation.title).length,
99558 labelpos: 'c'
99559 });
99560 });
99561 dagre__WEBPACK_IMPORTED_MODULE_1___default.a.layout(graph);
99562 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Graph after layout', graph.nodes());
99563 var svgElem = diagram.node();
99564 graph.nodes().forEach(function (v) {
99565 if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {
99566 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));
99567 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + svgElem.id + ' #' + v).attr('transform', 'translate(' + (graph.node(v).x - graph.node(v).width / 2) + ',' + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + ' )');
99568 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#' + svgElem.id + ' #' + v).attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);
99569 var dividers = document.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');
99570 dividers.forEach(function (divider) {
99571 var parent = divider.parentElement;
99572 var pWidth = 0;
99573 var pShift = 0;
99574
99575 if (parent) {
99576 if (parent.parentElement) pWidth = parent.parentElement.getBBox().width;
99577 pShift = parseInt(parent.getAttribute('data-x-shift'), 10);
99578
99579 if (Number.isNaN(pShift)) {
99580 pShift = 0;
99581 }
99582 }
99583
99584 divider.setAttribute('x1', 0 - pShift + 8);
99585 divider.setAttribute('x2', pWidth - pShift - 8);
99586 });
99587 } else {
99588 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));
99589 }
99590 });
99591 var stateBox = svgElem.getBBox();
99592 graph.edges().forEach(function (e) {
99593 if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {
99594 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));
99595 Object(_shapes__WEBPACK_IMPORTED_MODULE_6__["drawEdge"])(diagram, graph.edge(e), graph.edge(e).relation);
99596 }
99597 });
99598 stateBox = svgElem.getBBox();
99599 var stateInfo = {
99600 id: parentId ? parentId : 'root',
99601 label: parentId ? parentId : 'root',
99602 width: 0,
99603 height: 0
99604 };
99605 stateInfo.width = stateBox.width + 2 * conf.padding;
99606 stateInfo.height = stateBox.height + 2 * conf.padding;
99607 _logger__WEBPACK_IMPORTED_MODULE_3__["logger"].info('Doc rendered', stateInfo, graph);
99608 return stateInfo;
99609};
99610
99611/* harmony default export */ __webpack_exports__["default"] = ({
99612 setConf: setConf,
99613 draw: draw
99614});
99615
99616/***/ }),
99617
99618/***/ "./src/logger.js":
99619/*!***********************!*\
99620 !*** ./src/logger.js ***!
99621 \***********************/
99622/*! exports provided: LEVELS, logger, setLogLevel */
99623/***/ (function(module, __webpack_exports__, __webpack_require__) {
99624
99625"use strict";
99626__webpack_require__.r(__webpack_exports__);
99627/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LEVELS", function() { return LEVELS; });
99628/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logger", function() { return logger; });
99629/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setLogLevel", function() { return setLogLevel; });
99630/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment-mini */ "./node_modules/moment-mini/moment.min.js");
99631/* harmony import */ var moment_mini__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment_mini__WEBPACK_IMPORTED_MODULE_0__);
99632
99633var LEVELS = {
99634 debug: 1,
99635 info: 2,
99636 warn: 3,
99637 error: 4,
99638 fatal: 5
99639};
99640var logger = {
99641 debug: function debug() {},
99642 info: function info() {},
99643 warn: function warn() {},
99644 error: function error() {},
99645 fatal: function fatal() {}
99646};
99647var setLogLevel = function setLogLevel(level) {
99648 logger.debug = function () {};
99649
99650 logger.info = function () {};
99651
99652 logger.warn = function () {};
99653
99654 logger.error = function () {};
99655
99656 logger.fatal = function () {};
99657
99658 if (level <= LEVELS.fatal) {
99659 logger.fatal = console.error ? console.error.bind(console, format('FATAL'), 'color: orange') : console.log.bind(console, '\x1b[35m', format('FATAL'));
99660 }
99661
99662 if (level <= LEVELS.error) {
99663 logger.error = console.error ? console.error.bind(console, format('ERROR'), 'color: orange') : console.log.bind(console, '\x1b[31m', format('ERROR'));
99664 }
99665
99666 if (level <= LEVELS.warn) {
99667 logger.warn = console.warn ? console.warn.bind(console, format('WARN'), 'color: orange') : console.log.bind(console, "\x1B[33m", format('WARN'));
99668 }
99669
99670 if (level <= LEVELS.info) {
99671 logger.info = console.info ? // ? console.info.bind(console, '\x1b[34m', format('INFO'), 'color: blue')
99672 console.info.bind(console, format('INFO'), 'color: lightblue') : console.log.bind(console, '\x1b[34m', format('INFO'));
99673 }
99674
99675 if (level <= LEVELS.debug) {
99676 logger.debug = console.debug ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen') : console.log.bind(console, '\x1b[32m', format('DEBUG'));
99677 }
99678};
99679
99680var format = function format(level) {
99681 var time = moment_mini__WEBPACK_IMPORTED_MODULE_0___default()().format('ss.SSS');
99682 return "%c".concat(time, " : ").concat(level, " : ");
99683};
99684
99685/***/ }),
99686
99687/***/ "./src/mermaidAPI.js":
99688/*!***************************!*\
99689 !*** ./src/mermaidAPI.js ***!
99690 \***************************/
99691/*! exports provided: encodeEntities, decodeEntities, default */
99692/***/ (function(module, __webpack_exports__, __webpack_require__) {
99693
99694"use strict";
99695__webpack_require__.r(__webpack_exports__);
99696/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "encodeEntities", function() { return encodeEntities; });
99697/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "decodeEntities", function() { return decodeEntities; });
99698/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
99699/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scope-css */ "./node_modules/scope-css/index.js");
99700/* harmony import */ var scope_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(scope_css__WEBPACK_IMPORTED_MODULE_1__);
99701/* harmony import */ var _package_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../package.json */ "./package.json");
99702var _package_json__WEBPACK_IMPORTED_MODULE_2___namespace = /*#__PURE__*/__webpack_require__.t(/*! ../package.json */ "./package.json", 1);
99703/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config */ "./src/config.js");
99704/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
99705/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/utils.js");
99706/* harmony import */ var _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./diagrams/flowchart/flowRenderer */ "./src/diagrams/flowchart/flowRenderer.js");
99707/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./diagrams/flowchart/parser/flow */ "./src/diagrams/flowchart/parser/flow.jison");
99708/* harmony import */ var _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7__);
99709/* harmony import */ var _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./diagrams/flowchart/flowDb */ "./src/diagrams/flowchart/flowDb.js");
99710/* harmony import */ var _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./diagrams/sequence/sequenceRenderer */ "./src/diagrams/sequence/sequenceRenderer.js");
99711/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./diagrams/sequence/parser/sequenceDiagram */ "./src/diagrams/sequence/parser/sequenceDiagram.jison");
99712/* harmony import */ var _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10__);
99713/* harmony import */ var _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./diagrams/sequence/sequenceDb */ "./src/diagrams/sequence/sequenceDb.js");
99714/* harmony import */ var _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./diagrams/gantt/ganttRenderer */ "./src/diagrams/gantt/ganttRenderer.js");
99715/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./diagrams/gantt/parser/gantt */ "./src/diagrams/gantt/parser/gantt.jison");
99716/* harmony import */ var _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13__);
99717/* harmony import */ var _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./diagrams/gantt/ganttDb */ "./src/diagrams/gantt/ganttDb.js");
99718/* harmony import */ var _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./diagrams/class/classRenderer */ "./src/diagrams/class/classRenderer.js");
99719/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./diagrams/class/parser/classDiagram */ "./src/diagrams/class/parser/classDiagram.jison");
99720/* harmony import */ var _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16__);
99721/* harmony import */ var _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./diagrams/class/classDb */ "./src/diagrams/class/classDb.js");
99722/* harmony import */ var _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./diagrams/state/stateRenderer */ "./src/diagrams/state/stateRenderer.js");
99723/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./diagrams/state/parser/stateDiagram */ "./src/diagrams/state/parser/stateDiagram.jison");
99724/* harmony import */ var _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_19__);
99725/* harmony import */ var _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./diagrams/state/stateDb */ "./src/diagrams/state/stateDb.js");
99726/* harmony import */ var _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./diagrams/git/gitGraphRenderer */ "./src/diagrams/git/gitGraphRenderer.js");
99727/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./diagrams/git/parser/gitGraph */ "./src/diagrams/git/parser/gitGraph.jison");
99728/* harmony import */ var _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_22__);
99729/* harmony import */ var _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./diagrams/git/gitGraphAst */ "./src/diagrams/git/gitGraphAst.js");
99730/* harmony import */ var _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./diagrams/info/infoRenderer */ "./src/diagrams/info/infoRenderer.js");
99731/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./diagrams/info/parser/info */ "./src/diagrams/info/parser/info.jison");
99732/* harmony import */ var _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_25__);
99733/* harmony import */ var _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./diagrams/info/infoDb */ "./src/diagrams/info/infoDb.js");
99734/* harmony import */ var _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./diagrams/pie/pieRenderer */ "./src/diagrams/pie/pieRenderer.js");
99735/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./diagrams/pie/parser/pie */ "./src/diagrams/pie/parser/pie.jison");
99736/* harmony import */ var _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_28__);
99737/* harmony import */ var _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./diagrams/pie/pieDb */ "./src/diagrams/pie/pieDb.js");
99738function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
99739
99740/**
99741 * This is the api to be used when optionally handling the integration with the web page, instead of using the default integration provided by mermaid.js.
99742 *
99743 * The core of this api is the [**render**](https://github.com/knsv/mermaid/blob/master/docs/mermaidAPI.md#render) function which, given a graph
99744 * definition as text, renders the graph/diagram and returns an svg element for the graph.
99745 *
99746 * It is is then up to the user of the API to make use of the svg, either insert it somewhere in the page or do something completely different.
99747 *
99748 * In addition to the render function, a number of behavioral configuration options are available.
99749 *
99750 * @name mermaidAPI
99751 */
99752
99753
99754
99755
99756
99757
99758
99759
99760
99761
99762
99763
99764
99765
99766
99767
99768
99769
99770
99771
99772
99773
99774
99775
99776
99777
99778
99779
99780
99781
99782var themes = {};
99783
99784for (var _i = 0, _arr = ['default', 'forest', 'dark', 'neutral']; _i < _arr.length; _i++) {
99785 var themeName = _arr[_i];
99786 themes[themeName] = __webpack_require__("./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$")("./".concat(themeName, "/index.scss"));
99787}
99788/**
99789 * These are the default options which can be overridden with the initialization call like so:
99790 * **Example 1:**
99791 * <pre>
99792 * mermaid.initialize({
99793 * flowchart:{
99794 * htmlLabels: false
99795 * }
99796 * });
99797 * </pre>
99798 *
99799 * **Example 2:**
99800 * <pre>
99801 * <script>
99802 * var config = {
99803 * startOnLoad:true,
99804 * flowchart:{
99805 * useMaxWidth:true,
99806 * htmlLabels:true,
99807 * curve:'cardinal',
99808 * },
99809 *
99810 * securityLevel:'loose',
99811 * };
99812 * mermaid.initialize(config);
99813 * </script>
99814 * </pre>
99815 * A summary of all options and their defaults is found [here](https://github.com/knsv/mermaid/blob/master/docs/mermaidAPI.md#mermaidapi-configuration-defaults). A description of each option follows below.
99816 *
99817 * @name Configuration
99818 */
99819
99820
99821var config = {
99822 /** theme , the CSS style sheet
99823 *
99824 * **theme** - Choose one of the built-in themes:
99825 * * default
99826 * * forest
99827 * * dark
99828 * * neutral.
99829 * To disable any pre-defined mermaid theme, use "null".
99830 *
99831 * **themeCSS** - Use your own CSS. This overrides **theme**.
99832 * <pre>
99833 * "theme": "forest",
99834 * "themeCSS": ".node rect { fill: red; }"
99835 * </pre>
99836 */
99837 theme: 'default',
99838 themeCSS: undefined,
99839
99840 /**
99841 * **fontFamily** The font to be used for the rendered diagrams. Default value is \"trebuchet ms\", verdana, arial;
99842 */
99843 fontFamily: '"trebuchet ms", verdana, arial;',
99844
99845 /**
99846 * This option decides the amount of logging to be used.
99847 * * debug: 1
99848 * * info: 2
99849 * * warn: 3
99850 * * error: 4
99851 * * fatal: (**default**) 5
99852 */
99853 logLevel: 5,
99854
99855 /**
99856 * Sets the level of trust to be used on the parsed diagrams.
99857 * * **strict**: (**default**) tags in text are encoded, click functionality is disabeled
99858 * * **loose**: tags in text are allowed, click functionality is enabled
99859 */
99860 securityLevel: 'strict',
99861
99862 /**
99863 * This options controls whether or mermaid starts when the page loads
99864 * **Default value true**.
99865 */
99866 startOnLoad: true,
99867
99868 /**
99869 * This options controls whether or arrow markers in html code will be absolute paths or
99870 * an anchor, #. This matters if you are using base tag settings.
99871 * **Default value false**.
99872 */
99873 arrowMarkerAbsolute: false,
99874
99875 /**
99876 * The object containing configurations specific for flowcharts
99877 */
99878 flowchart: {
99879 /**
99880 * Flag for setting whether or not a html tag should be used for rendering labels
99881 * on the edges.
99882 * **Default value true**.
99883 */
99884 htmlLabels: true,
99885
99886 /**
99887 * How mermaid renders curves for flowcharts. Possible values are
99888 * * basis
99889 * * linear **default**
99890 * * cardinal
99891 */
99892 curve: 'linear'
99893 },
99894
99895 /**
99896 * The object containing configurations specific for sequence diagrams
99897 */
99898 sequence: {
99899 /**
99900 * margin to the right and left of the sequence diagram.
99901 * **Default value 50**.
99902 */
99903 diagramMarginX: 50,
99904
99905 /**
99906 * margin to the over and under the sequence diagram.
99907 * **Default value 10**.
99908 */
99909 diagramMarginY: 10,
99910
99911 /**
99912 * Margin between actors.
99913 * **Default value 50**.
99914 */
99915 actorMargin: 50,
99916
99917 /**
99918 * Width of actor boxes
99919 * **Default value 150**.
99920 */
99921 width: 150,
99922
99923 /**
99924 * Height of actor boxes
99925 * **Default value 65**.
99926 */
99927 height: 65,
99928
99929 /**
99930 * Margin around loop boxes
99931 * **Default value 10**.
99932 */
99933 boxMargin: 10,
99934
99935 /**
99936 * margin around the text in loop/alt/opt boxes
99937 * **Default value 5**.
99938 */
99939 boxTextMargin: 5,
99940
99941 /**
99942 * margin around notes.
99943 * **Default value 10**.
99944 */
99945 noteMargin: 10,
99946
99947 /**
99948 * Space between messages.
99949 * **Default value 35**.
99950 */
99951 messageMargin: 35,
99952
99953 /**
99954 * mirror actors under diagram.
99955 * **Default value true**.
99956 */
99957 mirrorActors: true,
99958
99959 /**
99960 * Depending on css styling this might need adjustment.
99961 * Prolongs the edge of the diagram downwards.
99962 * **Default value 1**.
99963 */
99964 bottomMarginAdj: 1,
99965
99966 /**
99967 * when this flag is set the height and width is set to 100% and is then scaling with the
99968 * available space if not the absolute space required is used.
99969 * **Default value true**.
99970 */
99971 useMaxWidth: true,
99972
99973 /**
99974 * This will display arrows that start and begin at the same node as right angles, rather than a curve
99975 * **Default value false**.
99976 */
99977 rightAngles: false,
99978
99979 /**
99980 * This will show the node numbers
99981 * **Default value false**.
99982 */
99983 showSequenceNumbers: false
99984 },
99985
99986 /**
99987 * The object containing configurations specific for gantt diagrams*
99988 */
99989 gantt: {
99990 /**
99991 * Margin top for the text over the gantt diagram
99992 * **Default value 25**.
99993 */
99994 titleTopMargin: 25,
99995
99996 /**
99997 * The height of the bars in the graph
99998 * **Default value 20**.
99999 */
100000 barHeight: 20,
100001
100002 /**
100003 * The margin between the different activities in the gantt diagram.
100004 * **Default value 4**.
100005 */
100006 barGap: 4,
100007
100008 /**
100009 * Margin between title and gantt diagram and between axis and gantt diagram.
100010 * **Default value 50**.
100011 */
100012 topPadding: 50,
100013
100014 /**
100015 * The space allocated for the section name to the left of the activities.
100016 * **Default value 75**.
100017 */
100018 leftPadding: 75,
100019
100020 /**
100021 * Vertical starting position of the grid lines.
100022 * **Default value 35**.
100023 */
100024 gridLineStartPadding: 35,
100025
100026 /**
100027 * Font size ...
100028 * **Default value 11**.
100029 */
100030 fontSize: 11,
100031
100032 /**
100033 * font family ...
100034 * **Default value '"Open-Sans", "sans-serif"'**.
100035 */
100036 fontFamily: '"Open-Sans", "sans-serif"',
100037
100038 /**
100039 * The number of alternating section styles.
100040 * **Default value 4**.
100041 */
100042 numberSectionStyles: 4,
100043
100044 /**
100045 * Datetime format of the axis. This might need adjustment to match your locale and preferences
100046 * **Default value '%Y-%m-%d'**.
100047 */
100048 axisFormat: '%Y-%m-%d'
100049 },
100050 class: {},
100051 git: {},
100052 state: {
100053 dividerMargin: 10,
100054 sizeUnit: 5,
100055 padding: 8,
100056 textHeight: 10,
100057 titleShift: -15,
100058 noteMargin: 10,
100059 forkWidth: 70,
100060 forkHeight: 7,
100061 // Used
100062 miniPadding: 2,
100063 // Font size factor, this is used to guess the width of the edges labels before rendering by dagre
100064 // layout. This might need updating if/when switching font
100065 fontSizeFactor: 5.02,
100066 fontSize: 24,
100067 labelHeight: 16,
100068 edgeLengthFactor: '20',
100069 compositTitleSize: 35,
100070 radius: 5
100071 }
100072};
100073Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
100074Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
100075
100076function parse(text) {
100077 var graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(text);
100078 var parser;
100079 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Type ' + graphType);
100080
100081 switch (graphType) {
100082 case 'git':
100083 parser = _diagrams_git_parser_gitGraph__WEBPACK_IMPORTED_MODULE_22___default.a;
100084 parser.parser.yy = _diagrams_git_gitGraphAst__WEBPACK_IMPORTED_MODULE_23__["default"];
100085 break;
100086
100087 case 'flowchart':
100088 _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].clear();
100089 parser = _diagrams_flowchart_parser_flow__WEBPACK_IMPORTED_MODULE_7___default.a;
100090 parser.parser.yy = _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"];
100091 break;
100092
100093 case 'sequence':
100094 parser = _diagrams_sequence_parser_sequenceDiagram__WEBPACK_IMPORTED_MODULE_10___default.a;
100095 parser.parser.yy = _diagrams_sequence_sequenceDb__WEBPACK_IMPORTED_MODULE_11__["default"];
100096 break;
100097
100098 case 'gantt':
100099 parser = _diagrams_gantt_parser_gantt__WEBPACK_IMPORTED_MODULE_13___default.a;
100100 parser.parser.yy = _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"];
100101 break;
100102
100103 case 'class':
100104 parser = _diagrams_class_parser_classDiagram__WEBPACK_IMPORTED_MODULE_16___default.a;
100105 parser.parser.yy = _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__["default"];
100106 break;
100107
100108 case 'state':
100109 parser = _diagrams_state_parser_stateDiagram__WEBPACK_IMPORTED_MODULE_19___default.a;
100110 parser.parser.yy = _diagrams_state_stateDb__WEBPACK_IMPORTED_MODULE_20__["default"];
100111 break;
100112
100113 case 'info':
100114 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('info info info');
100115 parser = _diagrams_info_parser_info__WEBPACK_IMPORTED_MODULE_25___default.a;
100116 parser.parser.yy = _diagrams_info_infoDb__WEBPACK_IMPORTED_MODULE_26__["default"];
100117 break;
100118
100119 case 'pie':
100120 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('pie');
100121 parser = _diagrams_pie_parser_pie__WEBPACK_IMPORTED_MODULE_28___default.a;
100122 parser.parser.yy = _diagrams_pie_pieDb__WEBPACK_IMPORTED_MODULE_29__["default"];
100123 break;
100124 }
100125
100126 parser.parser.yy.parseError = function (str, hash) {
100127 var error = {
100128 str: str,
100129 hash: hash
100130 };
100131 throw error;
100132 };
100133
100134 parser.parse(text);
100135}
100136
100137var encodeEntities = function encodeEntities(text) {
100138 var txt = text;
100139 txt = txt.replace(/style.*:\S*#.*;/g, function (s) {
100140 var innerTxt = s.substring(0, s.length - 1);
100141 return innerTxt;
100142 });
100143 txt = txt.replace(/classDef.*:\S*#.*;/g, function (s) {
100144 var innerTxt = s.substring(0, s.length - 1);
100145 return innerTxt;
100146 });
100147 txt = txt.replace(/#\w+;/g, function (s) {
100148 var innerTxt = s.substring(1, s.length - 1);
100149 var isInt = /^\+?\d+$/.test(innerTxt);
100150
100151 if (isInt) {
100152 return 'fl°°' + innerTxt + '¶ß';
100153 } else {
100154 return 'fl°' + innerTxt + '¶ß';
100155 }
100156 });
100157 return txt;
100158};
100159var decodeEntities = function decodeEntities(text) {
100160 var txt = text;
100161 txt = txt.replace(/fl°°/g, function () {
100162 return '&#';
100163 });
100164 txt = txt.replace(/fl°/g, function () {
100165 return '&';
100166 });
100167 txt = txt.replace(/¶ß/g, function () {
100168 return ';';
100169 });
100170 return txt;
100171};
100172/**
100173 * Function that renders an svg with a graph from a chart definition. Usage example below.
100174 *
100175 * ```js
100176 * mermaidAPI.initialize({
100177 * startOnLoad:true
100178 * });
100179 * $(function(){
100180 * const graphDefinition = 'graph TB\na-->b';
100181 * const cb = function(svgGraph){
100182 * console.log(svgGraph);
100183 * };
100184 * mermaidAPI.render('id1',graphDefinition,cb);
100185 * });
100186 *```
100187 * @param id the id of the element to be rendered
100188 * @param txt the graph definition
100189 * @param cb callback which is called after rendering is finished with the svg code as inparam.
100190 * @param container selector to element in which a div with the graph temporarily will be inserted. In one is
100191 * provided a hidden div will be inserted in the body of the page instead. The element will be removed when rendering is
100192 * completed.
100193 */
100194
100195var render = function render(id, txt, cb, container) {
100196 if (typeof container !== 'undefined') {
100197 container.innerHTML = '';
100198 d3__WEBPACK_IMPORTED_MODULE_0__["select"](container).append('div').attr('id', 'd' + id).attr('style', 'font-family: ' + config.fontFamily).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
100199 } else {
100200 var existingSvg = document.getElementById(id);
100201
100202 if (existingSvg) {
100203 existingSvg.remove();
100204 }
100205
100206 var _element = document.querySelector('#' + 'd' + id);
100207
100208 if (_element) {
100209 _element.innerHTML = '';
100210 }
100211
100212 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('body').append('div').attr('id', 'd' + id).append('svg').attr('id', id).attr('width', '100%').attr('xmlns', 'http://www.w3.org/2000/svg').append('g');
100213 }
100214
100215 window.txt = txt;
100216 txt = encodeEntities(txt);
100217 var element = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
100218 var graphType = _utils__WEBPACK_IMPORTED_MODULE_5__["default"].detectType(txt); // insert inline style into svg
100219
100220 var svg = element.firstChild;
100221 var firstChild = svg.firstChild; // pre-defined theme
100222
100223 var style = themes[config.theme];
100224
100225 if (style === undefined) {
100226 style = '';
100227 } // user provided theme CSS
100228
100229
100230 if (config.themeCSS !== undefined) {
100231 style += "\n".concat(config.themeCSS);
100232 } // user provided theme CSS
100233
100234
100235 if (config.fontFamily !== undefined) {
100236 style += "\n:root { --mermaid-font-family: ".concat(config.fontFamily, "}");
100237 } // user provided theme CSS
100238
100239
100240 if (config.altFontFamily !== undefined) {
100241 style += "\n:root { --mermaid-alt-font-family: ".concat(config.altFontFamily, "}");
100242 } // classDef
100243
100244
100245 if (graphType === 'flowchart') {
100246 var classes = _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].getClasses(txt);
100247
100248 for (var className in classes) {
100249 style += "\n.".concat(className, " > * { ").concat(classes[className].styles.join(' !important; '), " !important; }");
100250 }
100251 }
100252
100253 var style1 = document.createElement('style');
100254 style1.innerHTML = scope_css__WEBPACK_IMPORTED_MODULE_1___default()(style, "#".concat(id));
100255 svg.insertBefore(style1, firstChild);
100256 var style2 = document.createElement('style');
100257 var cs = window.getComputedStyle(svg);
100258 style2.innerHTML = "#".concat(id, " {\n color: ").concat(cs.color, ";\n font: ").concat(cs.font, ";\n }");
100259 svg.insertBefore(style2, firstChild);
100260
100261 switch (graphType) {
100262 case 'git':
100263 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100264 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].setConf(config.git);
100265 _diagrams_git_gitGraphRenderer__WEBPACK_IMPORTED_MODULE_21__["default"].draw(txt, id, false);
100266 break;
100267
100268 case 'flowchart':
100269 config.flowchart.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100270 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].setConf(config.flowchart);
100271 _diagrams_flowchart_flowRenderer__WEBPACK_IMPORTED_MODULE_6__["default"].draw(txt, id, false);
100272 break;
100273
100274 case 'sequence':
100275 config.sequence.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100276
100277 if (config.sequenceDiagram) {
100278 // backwards compatibility
100279 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(Object.assign(config.sequence, config.sequenceDiagram));
100280 console.error('`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.');
100281 } else {
100282 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].setConf(config.sequence);
100283 }
100284
100285 _diagrams_sequence_sequenceRenderer__WEBPACK_IMPORTED_MODULE_9__["default"].draw(txt, id);
100286 break;
100287
100288 case 'gantt':
100289 config.gantt.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100290 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].setConf(config.gantt);
100291 _diagrams_gantt_ganttRenderer__WEBPACK_IMPORTED_MODULE_12__["default"].draw(txt, id);
100292 break;
100293
100294 case 'class':
100295 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100296 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].setConf(config.class);
100297 _diagrams_class_classRenderer__WEBPACK_IMPORTED_MODULE_15__["default"].draw(txt, id);
100298 break;
100299
100300 case 'state':
100301 // config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100302 _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].setConf(config.state);
100303 _diagrams_state_stateRenderer__WEBPACK_IMPORTED_MODULE_18__["default"].draw(txt, id);
100304 break;
100305
100306 case 'info':
100307 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100308 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].setConf(config.class);
100309 _diagrams_info_infoRenderer__WEBPACK_IMPORTED_MODULE_24__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
100310 break;
100311
100312 case 'pie':
100313 config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;
100314 _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].setConf(config.class);
100315 _diagrams_pie_pieRenderer__WEBPACK_IMPORTED_MODULE_27__["default"].draw(txt, id, _package_json__WEBPACK_IMPORTED_MODULE_2__.version);
100316 break;
100317 }
100318
100319 d3__WEBPACK_IMPORTED_MODULE_0__["select"]("[id=\"".concat(id, "\"]")).selectAll('foreignobject > *').attr('xmlns', 'http://www.w3.org/1999/xhtml'); // if (config.arrowMarkerAbsolute) {
100320 // url =
100321 // window.location.protocol +
100322 // '//' +
100323 // window.location.host +
100324 // window.location.pathname +
100325 // window.location.search;
100326 // url = url.replace(/\(/g, '\\(');
100327 // url = url.replace(/\)/g, '\\)');
100328 // }
100329 // Fix for when the base tag is used
100330
100331 var svgCode = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().innerHTML;
100332
100333 if (!config.arrowMarkerAbsolute || config.arrowMarkerAbsolute === 'false') {
100334 svgCode = svgCode.replace(/marker-end="url\(.*?#/g, 'marker-end="url(#', 'g');
100335 }
100336
100337 svgCode = decodeEntities(svgCode);
100338
100339 if (typeof cb !== 'undefined') {
100340 switch (graphType) {
100341 case 'flowchart':
100342 cb(svgCode, _diagrams_flowchart_flowDb__WEBPACK_IMPORTED_MODULE_8__["default"].bindFunctions);
100343 break;
100344
100345 case 'gantt':
100346 cb(svgCode, _diagrams_gantt_ganttDb__WEBPACK_IMPORTED_MODULE_14__["default"].bindFunctions);
100347 break;
100348
100349 case 'class':
100350 cb(svgCode, _diagrams_class_classDb__WEBPACK_IMPORTED_MODULE_17__["default"].bindFunctions);
100351 break;
100352
100353 default:
100354 cb(svgCode);
100355 }
100356 } else {
100357 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('CB = undefined!');
100358 }
100359
100360 var node = d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node();
100361
100362 if (node !== null && typeof node.remove === 'function') {
100363 d3__WEBPACK_IMPORTED_MODULE_0__["select"]('#d' + id).node().remove();
100364 }
100365
100366 return svgCode;
100367};
100368
100369var setConf = function setConf(cnf) {
100370 // Top level initially mermaid, gflow, sequenceDiagram and gantt
100371 var lvl1Keys = Object.keys(cnf);
100372
100373 for (var i = 0; i < lvl1Keys.length; i++) {
100374 if (_typeof(cnf[lvl1Keys[i]]) === 'object' && cnf[lvl1Keys[i]] != null) {
100375 var lvl2Keys = Object.keys(cnf[lvl1Keys[i]]);
100376
100377 for (var j = 0; j < lvl2Keys.length; j++) {
100378 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting conf ', lvl1Keys[i], '-', lvl2Keys[j]);
100379
100380 if (typeof config[lvl1Keys[i]] === 'undefined') {
100381 config[lvl1Keys[i]] = {};
100382 }
100383
100384 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Setting config: ' + lvl1Keys[i] + ' ' + lvl2Keys[j] + ' to ' + cnf[lvl1Keys[i]][lvl2Keys[j]]);
100385 config[lvl1Keys[i]][lvl2Keys[j]] = cnf[lvl1Keys[i]][lvl2Keys[j]];
100386 }
100387 } else {
100388 config[lvl1Keys[i]] = cnf[lvl1Keys[i]];
100389 }
100390 }
100391};
100392
100393function initialize(options) {
100394 _logger__WEBPACK_IMPORTED_MODULE_4__["logger"].debug('Initializing mermaidAPI ', _package_json__WEBPACK_IMPORTED_MODULE_2__.version); // Update default config with options supplied at initialization
100395
100396 if (_typeof(options) === 'object') {
100397 setConf(options);
100398 }
100399
100400 Object(_config__WEBPACK_IMPORTED_MODULE_3__["setConfig"])(config);
100401 Object(_logger__WEBPACK_IMPORTED_MODULE_4__["setLogLevel"])(config.logLevel);
100402} // function getConfig () {
100403// console.warn('get config')
100404// return config
100405// }
100406
100407
100408var mermaidAPI = {
100409 render: render,
100410 parse: parse,
100411 initialize: initialize,
100412 getConfig: _config__WEBPACK_IMPORTED_MODULE_3__["getConfig"]
100413};
100414/* harmony default export */ __webpack_exports__["default"] = (mermaidAPI);
100415/**
100416 * ## mermaidAPI configuration defaults
100417 * <pre>
100418 *
100419 * &lt;script>
100420 * var config = {
100421 * theme:'default',
100422 * logLevel:'fatal',
100423 * securityLevel:'strict',
100424 * startOnLoad:true,
100425 * arrowMarkerAbsolute:false,
100426 *
100427 * flowchart:{
100428 * htmlLabels:true,
100429 * curve:'linear',
100430 * },
100431 * sequence:{
100432 * diagramMarginX:50,
100433 * diagramMarginY:10,
100434 * actorMargin:50,
100435 * width:150,
100436 * height:65,
100437 * boxMargin:10,
100438 * boxTextMargin:5,
100439 * noteMargin:10,
100440 * messageMargin:35,
100441 * mirrorActors:true,
100442 * bottomMarginAdj:1,
100443 * useMaxWidth:true,
100444 * rightAngles:false,
100445 * showSequenceNumbers:false,
100446 * },
100447 * gantt:{
100448 * titleTopMargin:25,
100449 * barHeight:20,
100450 * barGap:4,
100451 * topPadding:50,
100452 * leftPadding:75,
100453 * gridLineStartPadding:35,
100454 * fontSize:11,
100455 * fontFamily:'"Open-Sans", "sans-serif"',
100456 * numberSectionStyles:4,
100457 * axisFormat:'%Y-%m-%d',
100458 * }
100459 * };
100460 * mermaid.initialize(config);
100461 * &lt;/script>
100462 *</pre>
100463 */
100464
100465/***/ }),
100466
100467/***/ "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$":
100468/*!***********************************************!*\
100469 !*** ./src/themes sync ^\.\/.*\/index\.scss$ ***!
100470 \***********************************************/
100471/*! no static exports found */
100472/***/ (function(module, exports, __webpack_require__) {
100473
100474var map = {
100475 "./dark/index.scss": "./src/themes/dark/index.scss",
100476 "./default/index.scss": "./src/themes/default/index.scss",
100477 "./forest/index.scss": "./src/themes/forest/index.scss",
100478 "./neutral/index.scss": "./src/themes/neutral/index.scss"
100479};
100480
100481
100482function webpackContext(req) {
100483 var id = webpackContextResolve(req);
100484 return __webpack_require__(id);
100485}
100486function webpackContextResolve(req) {
100487 if(!__webpack_require__.o(map, req)) {
100488 var e = new Error("Cannot find module '" + req + "'");
100489 e.code = 'MODULE_NOT_FOUND';
100490 throw e;
100491 }
100492 return map[req];
100493}
100494webpackContext.keys = function webpackContextKeys() {
100495 return Object.keys(map);
100496};
100497webpackContext.resolve = webpackContextResolve;
100498module.exports = webpackContext;
100499webpackContext.id = "./src/themes sync recursive ^\\.\\/.*\\/index\\.scss$";
100500
100501/***/ }),
100502
100503/***/ "./src/themes/dark/index.scss":
100504/*!************************************!*\
100505 !*** ./src/themes/dark/index.scss ***!
100506 \************************************/
100507/*! no static exports found */
100508/***/ (function(module, exports, __webpack_require__) {
100509
100510// css-to-string-loader: transforms styles from css-loader to a string output
100511
100512// Get the styles
100513var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/dark/index.scss");
100514
100515if (typeof styles === 'string') {
100516 // Return an existing string
100517 module.exports = styles;
100518} else {
100519 // Call the custom toString method from css-loader module
100520 module.exports = styles.toString();
100521}
100522
100523/***/ }),
100524
100525/***/ "./src/themes/default/index.scss":
100526/*!***************************************!*\
100527 !*** ./src/themes/default/index.scss ***!
100528 \***************************************/
100529/*! no static exports found */
100530/***/ (function(module, exports, __webpack_require__) {
100531
100532// css-to-string-loader: transforms styles from css-loader to a string output
100533
100534// Get the styles
100535var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/default/index.scss");
100536
100537if (typeof styles === 'string') {
100538 // Return an existing string
100539 module.exports = styles;
100540} else {
100541 // Call the custom toString method from css-loader module
100542 module.exports = styles.toString();
100543}
100544
100545/***/ }),
100546
100547/***/ "./src/themes/forest/index.scss":
100548/*!**************************************!*\
100549 !*** ./src/themes/forest/index.scss ***!
100550 \**************************************/
100551/*! no static exports found */
100552/***/ (function(module, exports, __webpack_require__) {
100553
100554// css-to-string-loader: transforms styles from css-loader to a string output
100555
100556// Get the styles
100557var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/forest/index.scss");
100558
100559if (typeof styles === 'string') {
100560 // Return an existing string
100561 module.exports = styles;
100562} else {
100563 // Call the custom toString method from css-loader module
100564 module.exports = styles.toString();
100565}
100566
100567/***/ }),
100568
100569/***/ "./src/themes/neutral/index.scss":
100570/*!***************************************!*\
100571 !*** ./src/themes/neutral/index.scss ***!
100572 \***************************************/
100573/*! no static exports found */
100574/***/ (function(module, exports, __webpack_require__) {
100575
100576// css-to-string-loader: transforms styles from css-loader to a string output
100577
100578// Get the styles
100579var styles = __webpack_require__(/*! !../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./index.scss */ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/themes/neutral/index.scss");
100580
100581if (typeof styles === 'string') {
100582 // Return an existing string
100583 module.exports = styles;
100584} else {
100585 // Call the custom toString method from css-loader module
100586 module.exports = styles.toString();
100587}
100588
100589/***/ }),
100590
100591/***/ "./src/utils.js":
100592/*!**********************!*\
100593 !*** ./src/utils.js ***!
100594 \**********************/
100595/*! exports provided: detectType, isSubstringInArray, interpolateToCurve, sanitize, formatUrl, default */
100596/***/ (function(module, __webpack_exports__, __webpack_require__) {
100597
100598"use strict";
100599__webpack_require__.r(__webpack_exports__);
100600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectType", function() { return detectType; });
100601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSubstringInArray", function() { return isSubstringInArray; });
100602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolateToCurve", function() { return interpolateToCurve; });
100603/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitize", function() { return sanitize; });
100604/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatUrl", function() { return formatUrl; });
100605/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "./node_modules/d3/index.js");
100606/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logger */ "./src/logger.js");
100607/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @braintree/sanitize-url */ "./node_modules/@braintree/sanitize-url/index.js");
100608/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__);
100609
100610
100611
100612/**
100613 * @function detectType
100614 * Detects the type of the graph text.
100615 * ```mermaid
100616 * graph LR
100617 * a-->b
100618 * b-->c
100619 * c-->d
100620 * d-->e
100621 * e-->f
100622 * f-->g
100623 * g-->h
100624 * ```
100625 *
100626 * @param {string} text The text defining the graph
100627 * @returns {string} A graph definition key
100628 */
100629
100630var detectType = function detectType(text) {
100631 text = text.replace(/^\s*%%.*\n/g, '\n');
100632 _logger__WEBPACK_IMPORTED_MODULE_1__["logger"].debug('Detecting diagram type based on the text ' + text);
100633
100634 if (text.match(/^\s*sequenceDiagram/)) {
100635 return 'sequence';
100636 }
100637
100638 if (text.match(/^\s*gantt/)) {
100639 return 'gantt';
100640 }
100641
100642 if (text.match(/^\s*classDiagram/)) {
100643 return 'class';
100644 }
100645
100646 if (text.match(/^\s*stateDiagram/)) {
100647 return 'state';
100648 }
100649
100650 if (text.match(/^\s*gitGraph/)) {
100651 return 'git';
100652 }
100653
100654 if (text.match(/^\s*info/)) {
100655 return 'info';
100656 }
100657
100658 if (text.match(/^\s*pie/)) {
100659 return 'pie';
100660 }
100661
100662 return 'flowchart';
100663};
100664/**
100665 * @function isSubstringInArray
100666 * Detects whether a substring in present in a given array
100667 * @param {string} str The substring to detect
100668 * @param {array} arr The array to search
100669 * @returns {number} the array index containing the substring or -1 if not present
100670 **/
100671
100672var isSubstringInArray = function isSubstringInArray(str, arr) {
100673 for (var i = 0; i < arr.length; i++) {
100674 if (arr[i].match(str)) return i;
100675 }
100676
100677 return -1;
100678};
100679var interpolateToCurve = function interpolateToCurve(interpolate, defaultCurve) {
100680 if (!interpolate) {
100681 return defaultCurve;
100682 }
100683
100684 var curveName = "curve".concat(interpolate.charAt(0).toUpperCase() + interpolate.slice(1));
100685 return d3__WEBPACK_IMPORTED_MODULE_0__[curveName] || defaultCurve;
100686};
100687var sanitize = function sanitize(text, config) {
100688 var txt = text;
100689 var htmlLabels = true;
100690 if (config.flowchart && (config.flowchart.htmlLabels === false || config.flowchart.htmlLabels === 'false')) htmlLabels = false;
100691
100692 if (config.securityLevel !== 'loose' && htmlLabels) {
100693 // eslint-disable-line
100694 txt = txt.replace(/<br>/g, '#br#');
100695 txt = txt.replace(/<br\S*?\/>/g, '#br#');
100696 txt = txt.replace(/</g, '&lt;').replace(/>/g, '&gt;');
100697 txt = txt.replace(/=/g, '&equals;');
100698 txt = txt.replace(/#br#/g, '<br/>');
100699 }
100700
100701 return txt;
100702};
100703var formatUrl = function formatUrl(linkStr, config) {
100704 var url = linkStr.trim();
100705
100706 if (url) {
100707 if (config.securityLevel !== 'loose') {
100708 return Object(_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__["sanitizeUrl"])(url);
100709 } else {
100710 if (!/^(https?:)?\/\//i.test(url)) {
100711 url = 'http://' + url;
100712 }
100713 }
100714
100715 return url;
100716 }
100717};
100718
100719var distance = function distance(p1, p2) {
100720 return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;
100721};
100722
100723var traverseEdge = function traverseEdge(points) {
100724 var prevPoint;
100725 var totalDistance = 0;
100726 points.forEach(function (point) {
100727 totalDistance += distance(point, prevPoint);
100728 prevPoint = point;
100729 }); // Traverse half of total distance along points
100730
100731 var distanceToLabel = totalDistance / 2;
100732 var remainingDistance = distanceToLabel;
100733 var center;
100734 prevPoint = undefined;
100735 points.forEach(function (point) {
100736 if (prevPoint && !center) {
100737 var vectorDistance = distance(point, prevPoint);
100738
100739 if (vectorDistance < remainingDistance) {
100740 remainingDistance -= vectorDistance;
100741 } else {
100742 // The point is remainingDistance from prevPoint in the vector between prevPoint and point
100743 // Calculate the coordinates
100744 var distanceRatio = remainingDistance / vectorDistance;
100745 if (distanceRatio <= 0) center = prevPoint;
100746 if (distanceRatio >= 1) center = {
100747 x: point.x,
100748 y: point.y
100749 };
100750
100751 if (distanceRatio > 0 && distanceRatio < 1) {
100752 center = {
100753 x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,
100754 y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y
100755 };
100756 }
100757 }
100758 }
100759
100760 prevPoint = point;
100761 });
100762 return center;
100763};
100764
100765var calcLabelPosition = function calcLabelPosition(points) {
100766 var p = traverseEdge(points);
100767 return p;
100768};
100769
100770var calcCardinalityPosition = function calcCardinalityPosition(isRelationTypePresent, points, initialPosition) {
100771 var prevPoint;
100772 var totalDistance = 0; // eslint-disable-line
100773
100774 if (points[0] !== initialPosition) {
100775 points = points.reverse();
100776 }
100777
100778 points.forEach(function (point) {
100779 totalDistance += distance(point, prevPoint);
100780 prevPoint = point;
100781 }); // Traverse only 25 total distance along points to find cardinality point
100782
100783 var distanceToCardinalityPoint = 25;
100784 var remainingDistance = distanceToCardinalityPoint;
100785 var center;
100786 prevPoint = undefined;
100787 points.forEach(function (point) {
100788 if (prevPoint && !center) {
100789 var vectorDistance = distance(point, prevPoint);
100790
100791 if (vectorDistance < remainingDistance) {
100792 remainingDistance -= vectorDistance;
100793 } else {
100794 // The point is remainingDistance from prevPoint in the vector between prevPoint and point
100795 // Calculate the coordinates
100796 var distanceRatio = remainingDistance / vectorDistance;
100797 if (distanceRatio <= 0) center = prevPoint;
100798 if (distanceRatio >= 1) center = {
100799 x: point.x,
100800 y: point.y
100801 };
100802
100803 if (distanceRatio > 0 && distanceRatio < 1) {
100804 center = {
100805 x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,
100806 y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y
100807 };
100808 }
100809 }
100810 }
100811
100812 prevPoint = point;
100813 }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d)
100814
100815 var d = isRelationTypePresent ? 10 : 5; //Calculate Angle for x and y axis
100816
100817 var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);
100818 var cardinalityPosition = {
100819 x: 0,
100820 y: 0
100821 }; //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance
100822
100823 cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;
100824 cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;
100825 return cardinalityPosition;
100826};
100827
100828/* harmony default export */ __webpack_exports__["default"] = ({
100829 detectType: detectType,
100830 isSubstringInArray: isSubstringInArray,
100831 interpolateToCurve: interpolateToCurve,
100832 calcLabelPosition: calcLabelPosition,
100833 calcCardinalityPosition: calcCardinalityPosition,
100834 sanitize: sanitize,
100835 formatUrl: formatUrl
100836});
100837
100838/***/ }),
100839
100840/***/ 0:
100841/*!**********************!*\
100842 !*** util (ignored) ***!
100843 \**********************/
100844/*! no static exports found */
100845/***/ (function(module, exports) {
100846
100847/* (ignored) */
100848
100849/***/ }),
100850
100851/***/ 1:
100852/*!**********************!*\
100853 !*** util (ignored) ***!
100854 \**********************/
100855/*! no static exports found */
100856/***/ (function(module, exports) {
100857
100858/* (ignored) */
100859
100860/***/ }),
100861
100862/***/ 2:
100863/*!************************!*\
100864 !*** buffer (ignored) ***!
100865 \************************/
100866/*! no static exports found */
100867/***/ (function(module, exports) {
100868
100869/* (ignored) */
100870
100871/***/ }),
100872
100873/***/ 3:
100874/*!************************!*\
100875 !*** crypto (ignored) ***!
100876 \************************/
100877/*! no static exports found */
100878/***/ (function(module, exports) {
100879
100880/* (ignored) */
100881
100882/***/ })
100883
100884/******/ })["default"];
100885});
100886//# sourceMappingURL=mermaidAPI.js.map
\No newline at end of file